diff --git a/dist/js/app.js b/dist/js/app.js index f9380b8..6ab8b84 100644 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -1 +1 @@ -!function(){var e={419:function(e,t,n){e.exports=n(695)},31:function(e,t,n){"use strict";var r=n(264),i=n(998),h=n(689),d=n(840),g=n(189),y=n(300),v=n(465),w=n(910);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,n){var b=e.data,_=e.headers;r.isFormData(b)&&delete _["Content-Type"];var S=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(E+":"+x)}var R=g(e.baseURL,e.url);if(S.open(e.method.toUpperCase(),d(R,e.params,e.paramsSerializer),!0),S.timeout=e.timeout,S.onreadystatechange=function handleLoad(){if(S&&4===S.readyState&&(0!==S.status||S.responseURL&&0===S.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in S?y(S.getAllResponseHeaders()):null,h={data:e.responseType&&"text"!==e.responseType?S.response:S.responseText,status:S.status,statusText:S.statusText,headers:r,config:e,request:S};i(t,n,h),S=null}},S.onabort=function handleAbort(){S&&(n(w("Request aborted",e,"ECONNABORTED",S)),S=null)},S.onerror=function handleError(){n(w("Network Error",e,null,S)),S=null},S.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(w(t,e,"ECONNABORTED",S)),S=null},r.isStandardBrowserEnv()){var O=(e.withCredentials||v(R))&&e.xsrfCookieName?h.read(e.xsrfCookieName):void 0;O&&(_[e.xsrfHeaderName]=O)}if("setRequestHeader"in S&&r.forEach(_,(function setRequestHeader(e,t){"undefined"===typeof b&&"content-type"===t.toLowerCase()?delete _[t]:S.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(S.withCredentials=!!e.withCredentials),e.responseType)try{S.responseType=e.responseType}catch(M){if("json"!==e.responseType)throw M}"function"===typeof e.onDownloadProgress&&S.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&S.upload&&S.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){S&&(S.abort(),n(e),S=null)})),b||(b=null),S.send(b)}))}},695:function(e,t,n){"use strict";var r=n(264),i=n(372),h=n(958),d=n(169);function createInstance(e){var t=new h(e),n=i(h.prototype.request,t);return r.extend(n,h.prototype,t),r.extend(n,t),n}var g=createInstance(n(115));g.Axios=h,g.create=function create(e){return createInstance(d(g.defaults,e))},g.Cancel=n(573),g.CancelToken=n(921),g.isCancel=n(737),g.all=function all(e){return Promise.all(e)},g.spread=n(205),g.isAxiosError=n(392),e.exports=g,e.exports.default=g},573:function(e){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},921:function(e,t,n){"use strict";var r=n(573);function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var n=this;e((function cancel(e){n.reason||(n.reason=new r(e),t(n.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.source=function source(){var e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}},e.exports=CancelToken},737:function(e){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},958:function(e,t,n){"use strict";var r=n(264),i=n(840),h=n(644),d=n(890),g=n(169);function Axios(e){this.defaults=e,this.interceptors={request:new h,response:new h}}Axios.prototype.request=function request(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=g(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[d,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function unshiftRequestInterceptors(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function pushResponseInterceptors(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},Axios.prototype.getUri=function getUri(e){return e=g(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,n){return this.request(g(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,n,r){return this.request(g(r||{},{method:e,url:t,data:n}))}})),e.exports=Axios},644:function(e,t,n){"use strict";var r=n(264);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function forEach(e){r.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},189:function(e,t,n){"use strict";var r=n(49),i=n(931);e.exports=function buildFullPath(e,t){return e&&!r(t)?i(e,t):t}},910:function(e,t,n){"use strict";var r=n(923);e.exports=function createError(e,t,n,i,h){var d=new Error(e);return r(d,t,n,i,h)}},890:function(e,t,n){"use strict";var r=n(264),i=n(146),h=n(737),d=n(115);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]})),(e.adapter||d.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function onAdapterRejection(t){return h(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},923:function(e){"use strict";e.exports=function enhanceError(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},169:function(e,t,n){"use strict";var r=n(264);e.exports=function mergeConfig(e,t){t=t||{};var n={},i=["url","method","data"],h=["headers","auth","proxy","params"],d=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],g=["validateStatus"];function getMergedValue(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function mergeDeepProperties(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=getMergedValue(void 0,e[i])):n[i]=getMergedValue(e[i],t[i])}r.forEach(i,(function valueFromConfig2(e){r.isUndefined(t[e])||(n[e]=getMergedValue(void 0,t[e]))})),r.forEach(h,mergeDeepProperties),r.forEach(d,(function defaultToConfig2(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=getMergedValue(void 0,e[i])):n[i]=getMergedValue(void 0,t[i])})),r.forEach(g,(function merge(r){r in t?n[r]=getMergedValue(e[r],t[r]):r in e&&(n[r]=getMergedValue(void 0,e[r]))}));var y=i.concat(h).concat(d).concat(g),v=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===y.indexOf(e)}));return r.forEach(v,mergeDeepProperties),n}},998:function(e,t,n){"use strict";var r=n(910);e.exports=function settle(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},146:function(e,t,n){"use strict";var r=n(264);e.exports=function transformData(e,t,n){return r.forEach(n,(function transform(n){e=n(e,t)})),e}},115:function(e,t,n){"use strict";var r=n(264),i=n(322),h={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var d={adapter:function getDefaultAdapter(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(31)),e}(),transformRequest:[function transformRequest(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function transformResponse(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){d.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){d.headers[e]=r.merge(h)})),e.exports=d},372:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;d[t]="set-cookie"===t?(d[t]?d[t]:[]).concat([n]):d[t]?d[t]+", "+n:n}})),d):d}},205:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},264:function(e,t,n){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=n(372),i=Object.prototype.toString;function isArray(e){return"[object Array]"===i.call(e)}function isUndefined(e){return"undefined"===typeof e}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===i.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n=0&&v>0){for(r=[],h=n.length;w>=0&&!g;)w==y?(r.push(w),y=n.indexOf(e,w+1)):1==r.length?g=[r.pop(),v]:((i=r.pop())=0?y:v;r.length&&(g=[h,d])}return g}e.exports=balanced,balanced.range=range},467:function(e,t,n){var r=n(941);e.exports=function expandTop(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return expand(function escapeBraces(e){return e.split("\\\\").join(i).split("\\{").join(h).split("\\}").join(d).split("\\,").join(g).split("\\.").join(y)}(e),!0).map(unescapeBraces)};var i="\0SLASH"+Math.random()+"\0",h="\0OPEN"+Math.random()+"\0",d="\0CLOSE"+Math.random()+"\0",g="\0COMMA"+Math.random()+"\0",y="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function unescapeBraces(e){return e.split(i).join("\\").split(h).join("{").split(d).join("}").split(g).join(",").split(y).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,h=n.body,d=n.post,g=i.split(",");g[g.length-1]+="{"+h+"}";var y=parseCommaParts(d);return d.length&&(g[g.length-1]+=y.shift(),g.push.apply(g,y)),t.push.apply(t,g),t}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var h=i.pre,g=i.post.length?expand(i.post,!1):[""];if(/\$$/.test(i.pre))for(var y=0;y=0;if(!E&&!x)return i.post.match(/,.*\}/)?expand(e=i.pre+"{"+i.body+d+i.post):[e];if(E)w=i.body.split(/\.\./);else if(1===(w=parseCommaParts(i.body)).length&&1===(w=expand(w[0],!1).map(embrace)).length)return g.map((function(e){return i.pre+w[0]+e}));if(E){var R=numeric(w[0]),O=numeric(w[1]),M=Math.max(w[0].length,w[1].length),C=3==w.length?Math.abs(numeric(w[2])):1,j=lte;O0){var I=new Array(A+1).join("0");P=T<0?"-"+I+P.slice(1):I+P}}b.push(P)}}else{b=[];for(var N=0;N65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,h="",w=!!n.nocase,S=!1,E=[],x=[],R=!1,O=-1,M=-1,C="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",j=this;function clearStateChar(){if(r){switch(r){case"*":h+=y,w=!0;break;case"?":h+=g,w=!0;break;default:h+="\\"+r}j.debug("clearStateChar %j %j",r,h),r=!1}}for(var k,T=0,P=e.length;T-1;D--){var B=x[D],z=h.slice(0,B.reStart),F=h.slice(B.reStart,B.reEnd-8),H=h.slice(B.reEnd-8,B.reEnd),W=h.slice(B.reEnd);H+=W;var V=z.split("(").length-1,X=W;for(T=0;T=0&&!(i=e[h]);h--);for(h=0;h>> no match, partial?",e,_,t,S),_!==g))}if("string"===typeof w?(v=r.nocase?b.toLowerCase()===w.toLowerCase():b===w,this.debug("string match",w,b,v)):(v=b.match(w),this.debug("pattern match",w,b,v)),!v)return!1}if(h===g&&d===y)return!0;if(h===g)return n;if(d===y)return h===g-1&&""===e[h];throw new Error("wtf?")}},755:function(e,t,n){"use strict";var r=n(862);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,i,h,d){if(d!==r){var g=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 g.name="Invariant Violation",g}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},56:function(e,t,n){e.exports=n(755)()},862:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},873:function(e,t,n){var r,i,h;i=[t,n(882)],void 0===(h="function"===typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=_interopRequireDefault(t);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.default=n.default})?r.apply(t,i):r)||(e.exports=h)},882:function(e,t,n){var r,i,h;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=[t,n(804),n(56)],void 0===(h="function"===typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setHasSupportToCaptureOption=setHasSupportToCaptureOption;var r=_interopRequireDefault(t),i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var h=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var d=function(){function defineProperties(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{capture:!0};return g?e:e.capture}function getPosition(e){if("touches"in e){var t=e.touches[0];return{x:t.pageX,y:t.pageY}}return{x:e.screenX,y:e.screenY}}var y=function(e){function ReactSwipe(){var e;_classCallCheck(this,ReactSwipe);for(var t=arguments.length,n=Array(t),r=0;rt&&this.props.onSwipeRight(1,e),this.movePosition.deltaY<-t?this.props.onSwipeUp(1,e):this.movePosition.deltaY>t&&this.props.onSwipeDown(1,e)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function _setSwiperRef(e){this.swiper=e,this.props.innerRef(e)}},{key:"render",value:function render(){var e=this.props,t=(e.tagName,e.className),n=e.style,i=e.children,d=(e.allowMouseEvents,e.onSwipeUp,e.onSwipeDown,e.onSwipeLeft,e.onSwipeRight,e.onSwipeStart,e.onSwipeMove,e.onSwipeEnd,e.innerRef,e.tolerance,_objectWithoutProperties(e,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]));return r.default.createElement(this.props.tagName,h({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:t,style:n},d),i)}}]),ReactSwipe}(t.Component);y.displayName="ReactSwipe",y.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},y.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function onSwipeUp(){},onSwipeDown:function onSwipeDown(){},onSwipeLeft:function onSwipeLeft(){},onSwipeRight:function onSwipeRight(){},onSwipeStart:function onSwipeStart(){},onSwipeMove:function onSwipeMove(){},onSwipeEnd:function onSwipeEnd(){},innerRef:function innerRef(){},tolerance:0},e.default=y})?r.apply(t,i):r)||(e.exports=h)},527:function(e,t,n){var r,i,h,d;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}d=function(e,t,n,r){"use strict";function o(e){return e&&"object"==_typeof(e)&&"default"in e?e:{default:e}}var i=o(t),h=o(n),d=o(r),g=function a(){return(g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==h[0]&&2!==h[0])){d=0;continue}if(3===h[0]&&(!i||h[1]>i[0]&&h[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?r--:r=e.state.collections[t].length-1,e.state.collections[t][r].click(),w.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(_assertThisInitialized(n),"reset",(function(){_assertThisInitialized(n).setState({content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(_assertThisInitialized(n),"embed",(function(e){var t=_assertThisInitialized(n);console.log("".concat(t.name,": embed")),t.reset(),t.setState({embed:e,loading:!1,type:["embed","video"]}),t.show()})),_defineProperty(_assertThisInitialized(n),"load",(function(e){var t=_assertThisInitialized(n),r=t.axios;t.reset(),t.setState({loading:!0}),t.show(),r.get(e,{responseType:"arraybuffer"}).then((function(e){switch(console.log("".concat(t.name,": response content-type: ").concat(e.headers["content-type"])),e.headers["content-type"]){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.setContent(''),"image");break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":var n=JSON.parse(t._abToString(e.data));t.setContent("".concat(n.Content),"text html json");break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":t.setContent(t._abToString(e.data),"text html pajax");break;default:console.warn("".concat(t.name,": Unknown response content-type!"))}w.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var n="";if(e.response)switch(e.response.status){case 404:n="Not Found.";break;case 500:n="Server issue, please try again latter.";break;default:n="Something went wrong."}else e.request?n="No response received":console.warn("Error",e.message);t.setState({error:n}),w.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){t.setState({loading:!1})}))})),_defineProperty(_assertThisInitialized(n),"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(_assertThisInitialized(n),"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(_assertThisInitialized(n),"setContent",(function(e,t){var r=_assertThisInitialized(n);console.log("".concat(r.name,": setContent"));var i=t||["html","text"];Array.isArray(i)||(i=t.split(" ")),r.setState({content:e,type:i})})),_defineProperty(_assertThisInitialized(n),"show",(function(){var e=_assertThisInitialized(n);console.log("".concat(e.name,": show")),e.setState({shown:!0}),w.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(_assertThisInitialized(n),"hide",(function(){var e=_assertThisInitialized(n);console.log("".concat(e.name,": hide")),e.setState({shown:!1}),w.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(_assertThisInitialized(n),"getHtml",(function(){return{__html:_assertThisInitialized(n).state.content}}));var r=_assertThisInitialized(n);return r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.axios=_,w.dispatchEvent(new Event("{ui.name}.init")),n}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(MetaWindow,[{key:"onSwipeMove",value:function onSwipeMove(e,t){var n=this.ui,r=e.x;n.locked||Math.abs(r)<50||(n.locked=!0,setTimeout((function(){n.locked=!1}),1e3),r>0?(console.log("".concat(n.name,": swipe right")),n.prev()):(console.log("".concat(n.name,": swipe left")),n.next()))}},{key:"render",value:function render(){var e=this,t=e.name,n=null,r=e.state.current;if(r){var i=r.getAttribute("data-gallery");i&&e.state.collections[i].length>1&&(n=React.createElement("nav",{className:"meta-navs"},React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__prev a",onClick:e.prev},React.createElement("i",{className:"fa fas fa-chevron-left"}),React.createElement("span",{className:"sr-only"},"Previous")),React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__next a",onClick:e.next},React.createElement("i",{className:"fa fas fa-chevron-right"}),React.createElement("span",{className:"sr-only"},"Next"))))}var h=e.state.embed?React.createElement("section",{className:"meta-wrap typography"},React.createElement(v(),{url:e.state.embed,providers:[].concat(_toConsumableArray(y.defaultProviders),[b]),LoadingFallbackElement:React.createElement("div",{className:"meta-spinner_embed"},"... Loading ...")})):React.createElement("section",{className:"meta-wrap typography",dangerouslySetInnerHTML:e.getHtml()}),d="meta-".concat(t," meta-").concat(t,"__").concat(e.state.type.join(" meta-".concat(t,"__"))),w="meta-".concat(t,"-overlay").concat(e.state.shown?" meta-".concat(t,"-overlay__open"):"").concat(e.state.loading?" meta-".concat(t,"-overlay__loading"):"").concat(e.state.error?" meta-".concat(t,"-overlay__error"):"");return React.createElement(g(),{className:d,ui:e,onSwipeMove:e.onSwipeMove},React.createElement("div",{className:w},React.createElement("article",{className:"meta-content"},n,React.createElement("button",{className:"meta-nav meta-close a",onClick:e.hide},React.createElement("i",{className:"fa fas fa-times"}),React.createElement("span",{className:"sr-only"},"Close")),React.createElement("div",{className:"meta-spinner"},"... Loading ..."),React.createElement("div",{className:"meta-error alert alert-danger"},e.state.error),h)))}}]),MetaWindow}(n.Component);!function(n){var i=h().render(r().createElement(S,null),document.getElementById("MetaLightboxApp")),d=function initMetaWindowLinks(){var e=i;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),i=n.getAttribute("data-embed");e.state.current=n,i?e.embed(r):e.load(r)}))}))};n.addEventListener("".concat(t),d),n.addEventListener("".concat(e),d),n.addEventListener("MetaWindow.initLinks",d)}(window)}()}(); \ No newline at end of file +!function(){var e={419:function(e,t,n){e.exports=n(695)},31:function(e,t,n){"use strict";var r=n(264),i=n(998),d=n(689),h=n(840),y=n(189),g=n(300),b=n(465),v=n(910);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,n){var _=e.data,w=e.headers;r.isFormData(_)&&delete w["Content-Type"];var C=new XMLHttpRequest;if(e.auth){var S=e.auth.username||"",E=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";w.Authorization="Basic "+btoa(S+":"+E)}var x=y(e.baseURL,e.url);if(C.open(e.method.toUpperCase(),h(x,e.params,e.paramsSerializer),!0),C.timeout=e.timeout,C.onreadystatechange=function handleLoad(){if(C&&4===C.readyState&&(0!==C.status||C.responseURL&&0===C.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in C?g(C.getAllResponseHeaders()):null,d={data:e.responseType&&"text"!==e.responseType?C.response:C.responseText,status:C.status,statusText:C.statusText,headers:r,config:e,request:C};i(t,n,d),C=null}},C.onabort=function handleAbort(){C&&(n(v("Request aborted",e,"ECONNABORTED",C)),C=null)},C.onerror=function handleError(){n(v("Network Error",e,null,C)),C=null},C.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(v(t,e,"ECONNABORTED",C)),C=null},r.isStandardBrowserEnv()){var k=(e.withCredentials||b(x))&&e.xsrfCookieName?d.read(e.xsrfCookieName):void 0;k&&(w[e.xsrfHeaderName]=k)}if("setRequestHeader"in C&&r.forEach(w,(function setRequestHeader(e,t){"undefined"===typeof _&&"content-type"===t.toLowerCase()?delete w[t]:C.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(C.withCredentials=!!e.withCredentials),e.responseType)try{C.responseType=e.responseType}catch(K){if("json"!==e.responseType)throw K}"function"===typeof e.onDownloadProgress&&C.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&C.upload&&C.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){C&&(C.abort(),n(e),C=null)})),_||(_=null),C.send(_)}))}},695:function(e,t,n){"use strict";var r=n(264),i=n(372),d=n(958),h=n(169);function createInstance(e){var t=new d(e),n=i(d.prototype.request,t);return r.extend(n,d.prototype,t),r.extend(n,t),n}var y=createInstance(n(115));y.Axios=d,y.create=function create(e){return createInstance(h(y.defaults,e))},y.Cancel=n(573),y.CancelToken=n(921),y.isCancel=n(737),y.all=function all(e){return Promise.all(e)},y.spread=n(205),y.isAxiosError=n(392),e.exports=y,e.exports.default=y},573:function(e){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},921:function(e,t,n){"use strict";var r=n(573);function CancelToken(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var n=this;e((function cancel(e){n.reason||(n.reason=new r(e),t(n.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.source=function source(){var e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}},e.exports=CancelToken},737:function(e){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},958:function(e,t,n){"use strict";var r=n(264),i=n(840),d=n(644),h=n(890),y=n(169);function Axios(e){this.defaults=e,this.interceptors={request:new d,response:new d}}Axios.prototype.request=function request(e){"string"===typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=y(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[h,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function unshiftRequestInterceptors(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function pushResponseInterceptors(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},Axios.prototype.getUri=function getUri(e){return e=y(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,n){return this.request(y(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,n,r){return this.request(y(r||{},{method:e,url:t,data:n}))}})),e.exports=Axios},644:function(e,t,n){"use strict";var r=n(264);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function forEach(e){r.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},189:function(e,t,n){"use strict";var r=n(49),i=n(931);e.exports=function buildFullPath(e,t){return e&&!r(t)?i(e,t):t}},910:function(e,t,n){"use strict";var r=n(923);e.exports=function createError(e,t,n,i,d){var h=new Error(e);return r(h,t,n,i,d)}},890:function(e,t,n){"use strict";var r=n(264),i=n(146),d=n(737),h=n(115);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]})),(e.adapter||h.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function onAdapterRejection(t){return d(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},923:function(e){"use strict";e.exports=function enhanceError(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},169:function(e,t,n){"use strict";var r=n(264);e.exports=function mergeConfig(e,t){t=t||{};var n={},i=["url","method","data"],d=["headers","auth","proxy","params"],h=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],y=["validateStatus"];function getMergedValue(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function mergeDeepProperties(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=getMergedValue(void 0,e[i])):n[i]=getMergedValue(e[i],t[i])}r.forEach(i,(function valueFromConfig2(e){r.isUndefined(t[e])||(n[e]=getMergedValue(void 0,t[e]))})),r.forEach(d,mergeDeepProperties),r.forEach(h,(function defaultToConfig2(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=getMergedValue(void 0,e[i])):n[i]=getMergedValue(void 0,t[i])})),r.forEach(y,(function merge(r){r in t?n[r]=getMergedValue(e[r],t[r]):r in e&&(n[r]=getMergedValue(void 0,e[r]))}));var g=i.concat(d).concat(h).concat(y),b=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===g.indexOf(e)}));return r.forEach(b,mergeDeepProperties),n}},998:function(e,t,n){"use strict";var r=n(910);e.exports=function settle(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},146:function(e,t,n){"use strict";var r=n(264);e.exports=function transformData(e,t,n){return r.forEach(n,(function transform(n){e=n(e,t)})),e}},115:function(e,t,n){"use strict";var r=n(264),i=n(322),d={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var h={adapter:function getDefaultAdapter(){var e;return("undefined"!==typeof XMLHttpRequest||"undefined"!==typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(e=n(31)),e}(),transformRequest:[function transformRequest(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function transformResponse(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(t){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function forEachMethodNoData(e){h.headers[e]={}})),r.forEach(["post","put","patch"],(function forEachMethodWithData(e){h.headers[e]=r.merge(d)})),e.exports=h},372:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var n=new Array(arguments.length),r=0;r=0)return;h[t]="set-cookie"===t?(h[t]?h[t]:[]).concat([n]):h[t]?h[t]+", "+n:n}})),h):h}},205:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},264:function(e,t,n){"use strict";function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=n(372),i=Object.prototype.toString;function isArray(e){return"[object Array]"===i.call(e)}function isUndefined(e){return"undefined"===typeof e}function isObject(e){return null!==e&&"object"===_typeof(e)}function isPlainObject(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===i.call(e)}function forEach(e,t){if(null!==e&&"undefined"!==typeof e)if("object"!==_typeof(e)&&(e=[e]),isArray(e))for(var n=0,r=e.length;n=0&&b>0){for(r=[],d=n.length;v>=0&&!y;)v==g?(r.push(v),g=n.indexOf(e,v+1)):1==r.length?y=[r.pop(),b]:((i=r.pop())=0?g:b;r.length&&(y=[d,h])}return y}e.exports=balanced,balanced.range=range},467:function(e,t,n){var r=n(941);e.exports=function expandTop(e){if(!e)return[];"{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2));return expand(function escapeBraces(e){return e.split("\\\\").join(i).split("\\{").join(d).split("\\}").join(h).split("\\,").join(y).split("\\.").join(g)}(e),!0).map(unescapeBraces)};var i="\0SLASH"+Math.random()+"\0",d="\0OPEN"+Math.random()+"\0",h="\0CLOSE"+Math.random()+"\0",y="\0COMMA"+Math.random()+"\0",g="\0PERIOD"+Math.random()+"\0";function numeric(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function unescapeBraces(e){return e.split(i).join("\\").split(d).join("{").split(h).join("}").split(y).join(",").split(g).join(".")}function parseCommaParts(e){if(!e)return[""];var t=[],n=r("{","}",e);if(!n)return e.split(",");var i=n.pre,d=n.body,h=n.post,y=i.split(",");y[y.length-1]+="{"+d+"}";var g=parseCommaParts(h);return h.length&&(y[y.length-1]+=g.shift(),y.push.apply(y,g)),t.push.apply(t,y),t}function embrace(e){return"{"+e+"}"}function isPadded(e){return/^-?0\d/.test(e)}function lte(e,t){return e<=t}function gte(e,t){return e>=t}function expand(e,t){var n=[],i=r("{","}",e);if(!i)return[e];var d=i.pre,y=i.post.length?expand(i.post,!1):[""];if(/\$$/.test(i.pre))for(var g=0;g=0;if(!S&&!E)return i.post.match(/,.*\}/)?expand(e=i.pre+"{"+i.body+h+i.post):[e];if(S)v=i.body.split(/\.\./);else if(1===(v=parseCommaParts(i.body)).length&&1===(v=expand(v[0],!1).map(embrace)).length)return y.map((function(e){return i.pre+v[0]+e}));if(S){var x=numeric(v[0]),k=numeric(v[1]),K=Math.max(v[0].length,v[1].length),M=3==v.length?Math.abs(numeric(v[2])):1,R=lte;k0){var P=new Array(j+1).join("0");T=A<0?"-"+P+T.slice(1):P+T}}_.push(T)}}else{_=[];for(var L=0;Le.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1&&i.splice(y,1)}if(0!==i.length)return!1}return!0}},{key:"_checkSubCombo",value:function _checkSubCombo(e,t,n){e=e.slice(0),n=n.slice(t);for(var r=t,i=0;i-1&&(e.splice(i,1),i-=1,y>r&&(r=y),0===e.length))return r}return-1}}]),KeyCombo}();e.comboDeliminator=">",e.keyDeliminator="+",e.parseComboStr=function(t){for(var n=e._splitStr(t,e.comboDeliminator),r=[],i=0;i0&&n[h]===r&&"\\"!==n[h-1]&&(d.push(i.trim()),i="",h+=1),i+=n[h];return i&&d.push(i.trim()),d};var t=function(){function Locale(e){_classCallCheck(this,Locale),this.localeName=e,this.activeTargetKeys=[],this.pressedKeys=[],this._appliedMacros=[],this._keyMap={},this._killKeyCodes=[],this._macros=[]}return _createClass(Locale,[{key:"bindKeyCode",value:function bindKeyCode(e,t){"string"===typeof t&&(t=[t]),this._keyMap[e]=t}},{key:"bindMacro",value:function bindMacro(t,n){"string"===typeof n&&(n=[n]);var r=null;"function"===typeof n&&(r=n,n=null);var i={keyCombo:new e(t),keyNames:n,handler:r};this._macros.push(i)}},{key:"getKeyCodes",value:function getKeyCodes(e){var t=[];for(var n in this._keyMap)this._keyMap[n].indexOf(e)>-1&&t.push(0|n);return t}},{key:"getKeyNames",value:function getKeyNames(e){return this._keyMap[e]||[]}},{key:"setKillKey",value:function setKillKey(e){if("string"!==typeof e)this._killKeyCodes.push(e);else for(var t=this.getKeyCodes(e),n=0;n-1&&this.pressedKeys.splice(d,1)}this.activeTargetKeys.length=0,this._clearMacros()}}},{key:"_applyMacros",value:function _applyMacros(){for(var e=this._macros.slice(0),t=0;t-1&&this.pressedKeys.splice(r,1)}t.handler&&(t.keyNames=null),this._appliedMacros.splice(e,1),e-=1}}}}]),Locale}(),r=function(){function Keyboard(e,t,n,r){_classCallCheck(this,Keyboard),this._locale=null,this._currentContext="",this._contexts={},this._listeners=[],this._appliedListeners=[],this._locales={},this._targetElement=null,this._targetWindow=null,this._targetPlatform="",this._targetUserAgent="",this._isModernBrowser=!1,this._targetKeyDownBinding=null,this._targetKeyUpBinding=null,this._targetResetBinding=null,this._paused=!1,this._contexts.global={listeners:this._listeners,targetWindow:e,targetElement:t,targetPlatform:n,targetUserAgent:r},this.setContext("global")}return _createClass(Keyboard,[{key:"setLocale",value:function setLocale(e,n){var r=null;return"string"===typeof e?n?n(r=new t(e),this._targetPlatform,this._targetUserAgent):r=this._locales[e]||null:e=(r=e)._localeName,this._locale=r,this._locales[e]=r,r&&(this._locale.pressedKeys=r.pressedKeys),this}},{key:"getLocale",value:function getLocale(e){return e||(e=this._locale.localeName),this._locales[e]||null}},{key:"bind",value:function bind(t,n,r,i){if(null!==t&&"function"!==typeof t||(i=r,r=n,n=t,t=null),t&&"object"===_typeof(t)&&"number"===typeof t.length){for(var d=0;d"]),e.bindMacro("shift + /",["questionmark","?"]),t.match("Mac")?e.bindMacro("command",["mod","modifier"]):e.bindMacro("ctrl",["mod","modifier"]);for(var r=65;r<=90;r+=1){var i=String.fromCharCode(r+32),d=String.fromCharCode(r);e.bindKeyCode(r,i),e.bindMacro("shift + "+i,d),e.bindMacro("capslock + "+i,d)}var h,y,g=n.match("Firefox")?59:186,b=n.match("Firefox")?173:189,v=n.match("Firefox")?61:187;t.match("Mac")&&(n.match("Safari")||n.match("Chrome"))?(h=91,y=93):t.match("Mac")&&n.match("Opera")?(h=17,y=17):t.match("Mac")&&n.match("Firefox")&&(h=224,y=224),e.bindKeyCode(g,["semicolon",";"]),e.bindKeyCode(b,["dash","-"]),e.bindKeyCode(v,["equal","equalsign","="]),e.bindKeyCode(h,["command","windows","win","super","leftcommand","leftwindows","leftwin","leftsuper"]),e.bindKeyCode(y,["command","windows","win","super","rightcommand","rightwindows","rightwin","rightsuper"]),e.setKillKey("command")})),i.Keyboard=r,i.Locale=t,i.KeyCombo=e,i},"object"===_typeof2(t)?e.exports=d():void 0===(i="function"===typeof(r=d)?r.call(t,n,t,e):r)||(e.exports=i)},789:function(e,t,n){e.exports=minimatch,minimatch.Minimatch=Minimatch;var r={sep:"/"};try{r=n(61)}catch(w){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={},d=n(467),h={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},y="[^/]",g="[^/]*?",b=function charSet(e){return e.split("").reduce((function(e,t){return e[t]=!0,e}),{})}("().*{}+?[]^$\\!");var v=/\/+/;function ext(e,t){e=e||{},t=t||{};var n={};return Object.keys(t).forEach((function(e){n[e]=t[e]})),Object.keys(e).forEach((function(t){n[t]=e[t]})),n}function minimatch(e,t,n){if("string"!==typeof t)throw new TypeError("glob pattern string required");return n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new Minimatch(t,n).match(e))}function Minimatch(e,t){if(!(this instanceof Minimatch))return new Minimatch(e,t);if("string"!==typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==r.sep&&(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function braceExpand(e,t){if(t||(t=this instanceof Minimatch?this.options:{}),"undefined"===typeof(e="undefined"===typeof e?this.pattern:e))throw new TypeError("undefined pattern");return t.nobrace||!e.match(/\{.*\}/)?[e]:d(e)}minimatch.filter=function filter(e,t){return t=t||{},function(n,r,i){return minimatch(n,e,t)}},minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch,n=function minimatch(n,r,i){return t.minimatch(n,r,ext(e,i))};return n.Minimatch=function Minimatch(n,r){return new t.Minimatch(n,ext(e,r))},n},Minimatch.defaults=function(e){return e&&Object.keys(e).length?minimatch.defaults(e).Minimatch:Minimatch},Minimatch.prototype.debug=function(){},Minimatch.prototype.make=function make(){if(this._made)return;var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(v)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n},Minimatch.prototype.parseNegate=function parseNegate(){var e=this.pattern,t=!1,n=this.options,r=0;if(n.nonegate)return;for(var i=0,d=e.length;i65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return i;if(""===e)return"";var r,d="",v=!!n.nocase,C=!1,S=[],E=[],x=!1,k=-1,K=-1,M="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",R=this;function clearStateChar(){if(r){switch(r){case"*":d+=g,v=!0;break;case"?":d+=y,v=!0;break;default:d+="\\"+r}R.debug("clearStateChar %j %j",r,d),r=!1}}for(var O,A=0,T=e.length;A-1;B--){var q=E[B],D=d.slice(0,q.reStart),H=d.slice(q.reStart,q.reEnd-8),z=d.slice(q.reEnd-8,q.reEnd),F=d.slice(q.reEnd);z+=F;var W=D.split("(").length-1,V=F;for(A=0;A=0&&!(i=e[d]);d--);for(d=0;d>> no match, partial?",e,w,t,C),w!==y))}if("string"===typeof v?(b=r.nocase?_.toLowerCase()===v.toLowerCase():_===v,this.debug("string match",v,_,b)):(b=_.match(v),this.debug("pattern match",v,_,b)),!b)return!1}if(d===y&&h===g)return!0;if(d===y)return n;if(h===g)return d===y-1&&""===e[d];throw new Error("wtf?")}},755:function(e,t,n){"use strict";var r=n(862);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,n,i,d,h){if(h!==r){var y=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 y.name="Invariant Violation",y}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},56:function(e,t,n){e.exports=n(755)()},862:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},873:function(e,t,n){var r,i,d;i=[t,n(882)],void 0===(d="function"===typeof(r=function(e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=_interopRequireDefault(t);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}e.default=n.default})?r.apply(t,i):r)||(e.exports=d)},882:function(e,t,n){var r,i,d;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=[t,n(804),n(56)],void 0===(d="function"===typeof(r=function(e,t,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setHasSupportToCaptureOption=setHasSupportToCaptureOption;var r=_interopRequireDefault(t),i=_interopRequireDefault(n);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var d=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=function(){function defineProperties(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{capture:!0};return y?e:e.capture}function getPosition(e){if("touches"in e){var t=e.touches[0];return{x:t.pageX,y:t.pageY}}return{x:e.screenX,y:e.screenY}}var g=function(e){function ReactSwipe(){var e;_classCallCheck(this,ReactSwipe);for(var t=arguments.length,n=Array(t),r=0;rt&&this.props.onSwipeRight(1,e),this.movePosition.deltaY<-t?this.props.onSwipeUp(1,e):this.movePosition.deltaY>t&&this.props.onSwipeDown(1,e)),this.moveStart=null,this.moving=!1,this.movePosition=null}},{key:"_setSwiperRef",value:function _setSwiperRef(e){this.swiper=e,this.props.innerRef(e)}},{key:"render",value:function render(){var e=this.props,t=(e.tagName,e.className),n=e.style,i=e.children,h=(e.allowMouseEvents,e.onSwipeUp,e.onSwipeDown,e.onSwipeLeft,e.onSwipeRight,e.onSwipeStart,e.onSwipeMove,e.onSwipeEnd,e.innerRef,e.tolerance,_objectWithoutProperties(e,["tagName","className","style","children","allowMouseEvents","onSwipeUp","onSwipeDown","onSwipeLeft","onSwipeRight","onSwipeStart","onSwipeMove","onSwipeEnd","innerRef","tolerance"]));return r.default.createElement(this.props.tagName,d({ref:this._setSwiperRef,onMouseDown:this._onMouseDown,onTouchStart:this._handleSwipeStart,onTouchEnd:this._handleSwipeEnd,className:t,style:n},h),i)}}]),ReactSwipe}(t.Component);g.displayName="ReactSwipe",g.propTypes={tagName:i.default.string,className:i.default.string,style:i.default.object,children:i.default.node,allowMouseEvents:i.default.bool,onSwipeUp:i.default.func,onSwipeDown:i.default.func,onSwipeLeft:i.default.func,onSwipeRight:i.default.func,onSwipeStart:i.default.func,onSwipeMove:i.default.func,onSwipeEnd:i.default.func,innerRef:i.default.func,tolerance:i.default.number.isRequired},g.defaultProps={tagName:"div",allowMouseEvents:!1,onSwipeUp:function onSwipeUp(){},onSwipeDown:function onSwipeDown(){},onSwipeLeft:function onSwipeLeft(){},onSwipeRight:function onSwipeRight(){},onSwipeStart:function onSwipeStart(){},onSwipeMove:function onSwipeMove(){},onSwipeEnd:function onSwipeEnd(){},innerRef:function innerRef(){},tolerance:0},e.default=g})?r.apply(t,i):r)||(e.exports=d)},527:function(e,t,n){var r,i,d,h;function _typeof(e){return(_typeof="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}h=function(e,t,n,r){"use strict";function o(e){return e&&"object"==_typeof(e)&&"default"in e?e:{default:e}}var i=o(t),d=o(n),h=o(r),y=function a(){return(y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&i[i.length-1])||6!==d[0]&&2!==d[0])){h=0;continue}if(3===d[0]&&(!i||d[1]>i[0]&&d[1]e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?r--:r=e.state.collections[t].length-1,e.state.collections[t][r].click(),console.log("".concat(e.name,": prev")),w.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(_assertThisInitialized(n),"reset",(function(){_assertThisInitialized(n).setState({content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(_assertThisInitialized(n),"embed",(function(e){var t=_assertThisInitialized(n);console.log("".concat(t.name,": embed")),t.reset(),t.setState({embed:e,loading:!1,type:["embed","video"]}),t.show()})),_defineProperty(_assertThisInitialized(n),"load",(function(e){var t=_assertThisInitialized(n),r=t.axios;t.reset(),t.setState({loading:!0}),t.show(),r.get(e,{responseType:"arraybuffer"}).then((function(e){switch(console.log("".concat(t.name,": response content-type: ").concat(e.headers["content-type"])),e.headers["content-type"]){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":t.setContent(''),"image");break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":var n=JSON.parse(t._abToString(e.data));t.setContent("".concat(n.Content),"text html json");break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=UTF-8":case"application/xhtml+xml; charset=UTF-8":case"text/plain; charset=UTF-8":t.setContent(t._abToString(e.data),"text html pajax");break;default:console.warn("".concat(t.name,": Unknown response content-type!"))}w.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var n="";if(e.response)switch(e.response.status){case 404:n="Not Found.";break;case 500:n="Server issue, please try again latter.";break;default:n="Something went wrong."}else e.request?n="No response received":console.warn("Error",e.message);t.setState({error:n}),w.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){t.setState({loading:!1})}))})),_defineProperty(_assertThisInitialized(n),"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(_assertThisInitialized(n),"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(_assertThisInitialized(n),"setContent",(function(e,t){var r=_assertThisInitialized(n);console.log("".concat(r.name,": setContent"));var i=t||["html","text"];Array.isArray(i)||(i=t.split(" ")),r.setState({content:e,type:i})})),_defineProperty(_assertThisInitialized(n),"show",(function(){var e=_assertThisInitialized(n);console.log("".concat(e.name,": show")),e.setState({shown:!0}),w.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(_assertThisInitialized(n),"hide",(function(){var e=_assertThisInitialized(n);console.log("".concat(e.name,": hide")),b().withContext(name,(function(){b().unbind("left",e.prev),b().unbind("right",e.next)})),b().setContext("index"),e.setState({shown:!1}),w.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(_assertThisInitialized(n),"getHtml",(function(){return{__html:_assertThisInitialized(n).state.content}}));var r=_assertThisInitialized(n);return r.name=r.constructor.name,console.log("".concat(r.name,": init")),r.axios=S,w.dispatchEvent(new Event("{ui.name}.init")),n}return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}(MetaWindow,[{key:"onSwipeMove",value:function onSwipeMove(e,t){var n=this.ui,r=e.x;n.locked||Math.abs(r)<50||(n.locked=!0,setTimeout((function(){n.locked=!1}),1e3),r>0?(console.log("".concat(n.name,": swipe right")),n.prev()):(console.log("".concat(n.name,": swipe left")),n.next()))}},{key:"render",value:function render(){var e=this,t=e.name,n=null,r=e.state.current;if(b().setContext(t),b().withContext(t,(function(){b().unbind("left",e.prev),b().unbind("right",e.next)})),r){var i=r.getAttribute("data-gallery");i&&e.state.collections[i].length>1&&(n=React.createElement("nav",{className:"meta-navs"},React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__prev a",onClick:e.prev},React.createElement("i",{className:"fa fas fa-chevron-left"}),React.createElement("span",{className:"sr-only"},"Previous")),React.createElement("button",{className:"meta-nav meta-nav-arrow meta-nav-arrow__next a",onClick:e.next},React.createElement("i",{className:"fa fas fa-chevron-right"}),React.createElement("span",{className:"sr-only"},"Next"))),b().withContext(t,(function(){b().bind("left",e.prev),b().bind("right",e.next)})))}var d=e.state.embed?React.createElement("section",{className:"meta-wrap typography"},React.createElement(_(),{url:e.state.embed,providers:[].concat(_toConsumableArray(v.defaultProviders),[C]),LoadingFallbackElement:React.createElement("div",{className:"meta-spinner_embed"},"... Loading ...")})):React.createElement("section",{className:"meta-wrap typography",dangerouslySetInnerHTML:e.getHtml()}),h="meta-".concat(t," meta-").concat(t,"__").concat(e.state.type.join(" meta-".concat(t,"__"))),g="meta-".concat(t,"-overlay").concat(e.state.shown?" meta-".concat(t,"-overlay__open"):"").concat(e.state.loading?" meta-".concat(t,"-overlay__loading"):"").concat(e.state.error?" meta-".concat(t,"-overlay__error"):"");return React.createElement(y(),{className:h,ui:e,onSwipeMove:e.onSwipeMove},React.createElement("div",{className:g},React.createElement("article",{className:"meta-content"},n,React.createElement("button",{className:"meta-nav meta-close a",onClick:e.hide},React.createElement("i",{className:"fa fas fa-times"}),React.createElement("span",{className:"sr-only"},"Close")),React.createElement("div",{className:"meta-spinner"},"... Loading ..."),React.createElement("div",{className:"meta-error alert alert-danger"},e.state.error),d)))}}]),MetaWindow}(n.Component);!function(n){var i=d().render(r().createElement(E,null),document.getElementById("MetaLightboxApp")),h=function initMetaWindowLinks(){var e=i;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery="${gallery}"]').forEach((function(t){var n=t.getAttribute("data-gallery");n&&(e.state.collections[n]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(n,'"]')).forEach((function(t){e.state.collections[n].push(t)}))),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget,r=n.getAttribute("href")||n.getAttribute("data-href"),i=n.getAttribute("data-embed");e.state.current=n,i?e.embed(r):e.load(r)}))}))};n.addEventListener("".concat(t),h),n.addEventListener("".concat(e),h),n.addEventListener("MetaWindow.initLinks",h)}(window)}()}(); \ No newline at end of file diff --git a/dist/records.json b/dist/records.json index e659063..60700a4 100644 --- a/dist/records.json +++ b/dist/records.json @@ -35,31 +35,6 @@ 143 ] }, - "mini-css-extract-plugin /mnt/data/srv/dist/repositories/meta-lightbox/node_modules/.pnpm/css-loader@5.2.0_webpack@5.30.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.1_node-sass@5.0.0+webpack@5.30.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/scss/_window.scss": [ - { - "chunks": { - "byName": { - "child": 396 - }, - "bySource": { - "0 child": 396 - }, - "usedIds": [ - 396 - ] - }, - "modules": { - "byIdentifier": { - "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/css-loader@5.2.0_webpack@5.30.0/node_modules/css-loader/dist/runtime/api.js": 179, - "./node_modules/.pnpm/css-loader@5.2.0_webpack@5.30.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/resolve-url-loader@3.1.2/node_modules/resolve-url-loader/index.js!./node_modules/.pnpm/sass-loader@10.1.1_node-sass@5.0.0+webpack@5.30.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/scss/_window.scss": 396 - }, - "usedIds": [ - 179, - 396 - ] - } - } - ], "modules": { "byIdentifier": { "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/index.js": 419, @@ -91,6 +66,7 @@ "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/axios@0.21.1/node_modules/axios/lib/utils.js": 264, "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/balanced-match@1.0.0/node_modules/balanced-match/index.js": 941, "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js": 467, + "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/keyboardjs@2.6.4/node_modules/keyboardjs/dist/keyboard.js": 286, "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js": 789, "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/factoryWithThrowingShims.js": 755, "./node_modules/.pnpm/babel-loader@8.2.2_b74f0fb204bbf880165b1fc35f8d96c6/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/index.js": 56, @@ -113,6 +89,7 @@ 189, 205, 264, + 286, 300, 322, 372, diff --git a/dist/report.html b/dist/report.html index e8e76b1..468a73c 100644 --- a/dist/report.html +++ b/dist/report.html @@ -3,7 +3,7 @@ - @a2nt/meta-lightbox-react [2 Apr 2021 at 16:20] + @a2nt/meta-lightbox-react [2 Apr 2021 at 16:47] diff --git a/package.json b/package.json index a4aa350..f0b3fe9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@a2nt/meta-lightbox-react", - "version": "3.1.1", + "version": "3.1.2", "description": "ReactJS: Universal Lightbox window", "author": "Tony Air ", "license": "BSD-2-Clause", @@ -53,6 +53,7 @@ "bootstrap": "^4.6.0", "brace-expansion": "^2.0.0", "font-awesome": "^4.7.0", + "keyboardjs": "^2.6.4", "material-design-color": "^2.3.2", "minimatch": "^3.0.4", "react": "^17.0.1", diff --git a/src/js/_window.jsx b/src/js/_window.jsx index b19ea5d..b55243a 100755 --- a/src/js/_window.jsx +++ b/src/js/_window.jsx @@ -5,6 +5,7 @@ import Events from './_events'; import { Component } from 'react'; import Swipe from 'react-easy-swipe'; +import KeyboardJS from 'keyboardjs'; import Embed, { defaultProviders } from 'react-tiny-oembed'; @@ -115,6 +116,7 @@ class MetaWindow extends Component { ui.state.collections[gallery][i].click(); + console.log(`${ui.name}: next`); W.dispatchEvent(new Event(`{ui.name}.next`)); }; @@ -132,6 +134,7 @@ class MetaWindow extends Component { ui.state.collections[gallery][i].click(); + console.log(`${ui.name}: prev`); W.dispatchEvent(new Event(`{ui.name}.prev`)); }; @@ -301,6 +304,14 @@ class MetaWindow extends Component { const ui = this; console.log(`${ui.name}: hide`); + + KeyboardJS.withContext(name, () => { + KeyboardJS.unbind('left', ui.prev); + KeyboardJS.unbind('right', ui.next); + }); + + KeyboardJS.setContext('index'); + ui.setState({ shown: false }); W.dispatchEvent(new Event(`{ui.name}.hide`)); }; @@ -340,6 +351,12 @@ class MetaWindow extends Component { let navs = null; const el = ui.state.current; + KeyboardJS.setContext(name); + KeyboardJS.withContext(name, () => { + KeyboardJS.unbind('left', ui.prev); + KeyboardJS.unbind('right', ui.next); + }); + if (el) { const gallery = el.getAttribute('data-gallery'); if (gallery && ui.state.collections[gallery].length > 1) { @@ -361,6 +378,11 @@ class MetaWindow extends Component { ); + + KeyboardJS.withContext(name, () => { + KeyboardJS.bind('left', ui.prev); + KeyboardJS.bind('right', ui.next); + }); } }