meta-lightbox/dist/js/app.js
2021-01-31 19:10:29 +07:00

1 line
45 KiB
JavaScript

!function(){var e={313:function(e,t,r){e.exports=r(906)},161:function(e,t,r){"use strict";var n=r(572),i=r(969),h=r(352),d=r(67),g=r(66),y=r(109),b=r(954),v=r(536);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,r){var w=e.data,_=e.headers;n.isFormData(w)&&delete _["Content-Type"];var x=new XMLHttpRequest;if(e.auth){var E=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(E+":"+S)}var C=g(e.baseURL,e.url);if(x.open(e.method.toUpperCase(),d(C,e.params,e.paramsSerializer),!0),x.timeout=e.timeout,x.onreadystatechange=function handleLoad(){if(x&&4===x.readyState&&(0!==x.status||x.responseURL&&0===x.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in x?y(x.getAllResponseHeaders()):null,h={data:e.responseType&&"text"!==e.responseType?x.response:x.responseText,status:x.status,statusText:x.statusText,headers:n,config:e,request:x};i(t,r,h),x=null}},x.onabort=function handleAbort(){x&&(r(v("Request aborted",e,"ECONNABORTED",x)),x=null)},x.onerror=function handleError(){r(v("Network Error",e,null,x)),x=null},x.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(v(t,e,"ECONNABORTED",x)),x=null},n.isStandardBrowserEnv()){var A=(e.withCredentials||b(C))&&e.xsrfCookieName?h.read(e.xsrfCookieName):void 0;A&&(_[e.xsrfHeaderName]=A)}if("setRequestHeader"in x&&n.forEach(_,(function setRequestHeader(e,t){"undefined"===typeof w&&"content-type"===t.toLowerCase()?delete _[t]:x.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(x.withCredentials=!!e.withCredentials),e.responseType)try{x.responseType=e.responseType}catch(R){if("json"!==e.responseType)throw R}"function"===typeof e.onDownloadProgress&&x.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&x.upload&&x.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){x&&(x.abort(),r(e),x=null)})),w||(w=null),x.send(w)}))}},906:function(e,t,r){"use strict";var n=r(572),i=r(202),h=r(160),d=r(32);function createInstance(e){var t=new h(e),r=i(h.prototype.request,t);return n.extend(r,h.prototype,t),n.extend(r,t),r}var g=createInstance(r(178));g.Axios=h,g.create=function create(e){return createInstance(d(g.defaults,e))},g.Cancel=r(619),g.CancelToken=r(801),g.isCancel=r(327),g.all=function all(e){return Promise.all(e)},g.spread=r(428),g.isAxiosError=r(513),e.exports=g,e.exports.default=g},619: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},801:function(e,t,r){"use strict";var n=r(619);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 r=this;e((function cancel(e){r.reason||(r.reason=new n(e),t(r.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},327:function(e){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},160:function(e,t,r){"use strict";var n=r(572),i=r(67),h=r(664),d=r(457),g=r(32);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],r=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;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function getUri(e){return e=g(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(g(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,r,n){return this.request(g(n||{},{method:e,url:t,data:r}))}})),e.exports=Axios},664:function(e,t,r){"use strict";var n=r(572);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){n.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},66:function(e,t,r){"use strict";var n=r(96),i=r(431);e.exports=function buildFullPath(e,t){return e&&!n(t)?i(e,t):t}},536:function(e,t,r){"use strict";var n=r(706);e.exports=function createError(e,t,r,i,h){var d=new Error(e);return n(d,t,r,i,h)}},457:function(e,t,r){"use strict";var n=r(572),i=r(427),h=r(327),d=r(178);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=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.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)}))}},706:function(e){"use strict";e.exports=function enhanceError(e,t,r,n,i){return e.config=t,r&&(e.code=r),e.request=n,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}},32:function(e,t,r){"use strict";var n=r(572);e.exports=function mergeConfig(e,t){t=t||{};var r={},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 n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function mergeDeepProperties(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(e[i],t[i])}n.forEach(i,(function valueFromConfig2(e){n.isUndefined(t[e])||(r[e]=getMergedValue(void 0,t[e]))})),n.forEach(h,mergeDeepProperties),n.forEach(d,(function defaultToConfig2(i){n.isUndefined(t[i])?n.isUndefined(e[i])||(r[i]=getMergedValue(void 0,e[i])):r[i]=getMergedValue(void 0,t[i])})),n.forEach(g,(function merge(n){n in t?r[n]=getMergedValue(e[n],t[n]):n in e&&(r[n]=getMergedValue(void 0,e[n]))}));var y=i.concat(h).concat(d).concat(g),b=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===y.indexOf(e)}));return n.forEach(b,mergeDeepProperties),r}},969:function(e,t,r){"use strict";var n=r(536);e.exports=function settle(e,t,r){var i=r.config.validateStatus;r.status&&i&&!i(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},427:function(e,t,r){"use strict";var n=r(572);e.exports=function transformData(e,t,r){return n.forEach(r,(function transform(r){e=r(e,t)})),e}},178:function(e,t,r){"use strict";var n=r(572),i=r(418),h={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!n.isUndefined(e)&&n.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=r(161)),e}(),transformRequest:[function transformRequest(e,t){return i(t,"Accept"),i(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.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, */*"}}};n.forEach(["delete","get","head"],(function forEachMethodNoData(e){d.headers[e]={}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){d.headers[e]=n.merge(h)})),e.exports=d},202:function(e){"use strict";e.exports=function bind(e,t){return function wrap(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},67:function(e,t,r){"use strict";var n=r(572);function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function buildURL(e,t,r){if(!t)return e;var i;if(r)i=r(t);else if(n.isURLSearchParams(t))i=t.toString();else{var h=[];n.forEach(t,(function serialize(e,t){null!==e&&"undefined"!==typeof e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function parseValue(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),h.push(encode(t)+"="+encode(e))})))})),i=h.join("&")}if(i){var d=e.indexOf("#");-1!==d&&(e=e.slice(0,d)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},431:function(e){"use strict";e.exports=function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},352:function(e,t,r){"use strict";var n=r(572);e.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(e,t,r,i,h,d){var g=[];g.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&g.push("expires="+new Date(r).toGMTString()),n.isString(i)&&g.push("path="+i),n.isString(h)&&g.push("domain="+h),!0===d&&g.push("secure"),document.cookie=g.join("; ")},read:function read(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():{write:function write(){},read:function read(){return null},remove:function remove(){}}},96:function(e){"use strict";e.exports=function isAbsoluteURL(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},513:function(e){"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)}e.exports=function isAxiosError(e){return"object"===_typeof(e)&&!0===e.isAxiosError}},954:function(e,t,r){"use strict";var n=r(572);e.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function resolveURL(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=resolveURL(window.location.href),function isURLSameOrigin(t){var r=n.isString(t)?resolveURL(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function isURLSameOrigin(){return!0}},418:function(e,t,r){"use strict";var n=r(572);e.exports=function normalizeHeaderName(e,t){n.forEach(e,(function processHeader(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},109:function(e,t,r){"use strict";var n=r(572),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function parseHeaders(e){var t,r,h,d={};return e?(n.forEach(e.split("\n"),(function parser(e){if(h=e.indexOf(":"),t=n.trim(e.substr(0,h)).toLowerCase(),r=n.trim(e.substr(h+1)),t){if(d[t]&&i.indexOf(t)>=0)return;d[t]="set-cookie"===t?(d[t]?d[t]:[]).concat([r]):d[t]?d[t]+", "+r:r}})),d):d}},428:function(e){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},572:function(e,t,r){"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 n=r(202),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 r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:isArray,isArrayBuffer:function isArrayBuffer(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function isFormData(e){return"undefined"!==typeof FormData&&e instanceof FormData},isArrayBufferView:function isArrayBufferView(e){return"undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function isString(e){return"string"===typeof e},isNumber:function isNumber(e){return"number"===typeof e},isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:function isDate(e){return"[object Date]"===i.call(e)},isFile:function isFile(e){return"[object File]"===i.call(e)},isBlob:function isBlob(e){return"[object Blob]"===i.call(e)},isFunction:isFunction,isStream:function isStream(e){return isObject(e)&&isFunction(e.pipe)},isURLSearchParams:function isURLSearchParams(e){return"undefined"!==typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function isStandardBrowserEnv(){return("undefined"===typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!==typeof window&&"undefined"!==typeof document)},forEach:forEach,merge:function merge(){var e={};function assignValue(t,r){isPlainObject(e[r])&&isPlainObject(t)?e[r]=merge(e[r],t):isPlainObject(t)?e[r]=merge({},t):isArray(t)?e[r]=t.slice():e[r]=t}for(var t=0,r=arguments.length;t<r;t++)forEach(arguments[t],assignValue);return e},extend:function extend(e,t,r){return forEach(t,(function assignValue(t,i){e[i]=r&&"function"===typeof t?n(t,r):t})),e},trim:function trim(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},417:function(e){"use strict";function balanced(e,t,r){e instanceof RegExp&&(e=maybeMatch(e,r)),t instanceof RegExp&&(t=maybeMatch(t,r));var n=range(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function maybeMatch(e,t){var r=t.match(e);return r?r[0]:null}function range(e,t,r){var n,i,h,d,g,y=r.indexOf(e),b=r.indexOf(t,y+1),v=y;if(y>=0&&b>0){for(n=[],h=r.length;v>=0&&!g;)v==y?(n.push(v),y=r.indexOf(e,v+1)):1==n.length?g=[n.pop(),b]:((i=n.pop())<h&&(h=i,d=b),b=r.indexOf(t,v+1)),v=y<b&&y>=0?y:b;n.length&&(g=[h,d])}return g}e.exports=balanced,balanced.range=range},708:function(e,t,r){var n=r(417);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=[],r=n("{","}",e);if(!r)return e.split(",");var i=r.pre,h=r.body,d=r.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 r=[],i=n("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var h,g=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),y=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),b=g||y,v=i.body.indexOf(",")>=0;if(!b&&!v)return i.post.match(/,.*\}/)?expand(e=i.pre+"{"+i.body+d+i.post):[e];if(b)h=i.body.split(/\.\./);else if(1===(h=parseCommaParts(i.body)).length&&1===(h=expand(h[0],!1).map(embrace)).length)return(x=i.post.length?expand(i.post,!1):[""]).map((function(e){return i.pre+h[0]+e}));var w,_=i.pre,x=i.post.length?expand(i.post,!1):[""];if(b){var E=numeric(h[0]),S=numeric(h[1]),C=Math.max(h[0].length,h[1].length),A=3==h.length?Math.abs(numeric(h[2])):1,R=lte;S<E&&(A*=-1,R=gte);var j=h.some(isPadded);w=[];for(var O=E;R(O,S);O+=A){var T;if(y)"\\"===(T=String.fromCharCode(O))&&(T="");else if(T=String(O),j){var k=C-T.length;if(k>0){var P=new Array(k+1).join("0");T=O<0?"-"+P+T.slice(1):P+T}}w.push(T)}}else{w=[];for(var I=0;I<h.length;I++)w.push.apply(w,expand(h[I],!1))}for(I=0;I<w.length;I++)for(var M=0;M<x.length;M++){var N=_+w[I]+x[M];(!t||b||N)&&r.push(N)}return r}},158:function(e,t,r){e.exports=minimatch,minimatch.Minimatch=Minimatch;var n={sep:"/"};try{n=r(386)}catch(_){}var i=minimatch.GLOBSTAR=Minimatch.GLOBSTAR={},h=r(708),d={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},g="[^/]",y="[^/]*?",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 r={};return Object.keys(t).forEach((function(e){r[e]=t[e]})),Object.keys(e).forEach((function(t){r[t]=e[t]})),r}function minimatch(e,t,r){if("string"!==typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new Minimatch(t,r).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(),"/"!==n.sep&&(e=e.split(n.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]:h(e)}minimatch.filter=function filter(e,t){return t=t||{},function(r,n,i){return minimatch(r,e,t)}},minimatch.defaults=function(e){if(!e||!Object.keys(e).length)return minimatch;var t=minimatch,r=function minimatch(r,n,i){return t.minimatch(r,n,ext(e,i))};return r.Minimatch=function Minimatch(r,n){return new t.Minimatch(r,ext(e,n))},r},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 r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(e){return e.split(v)})),this.debug(this.pattern,r),r=r.map((function(e,t,r){return e.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},Minimatch.prototype.parseNegate=function parseNegate(){var e=this.pattern,t=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,h=e.length;i<h&&"!"===e.charAt(i);i++)t=!t,n++;n&&(this.pattern=e.substr(n));this.negate=t},minimatch.braceExpand=function(e,t){return braceExpand(e,t)},Minimatch.prototype.braceExpand=braceExpand,Minimatch.prototype.parse=function parse(e,t){if(e.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===e)return i;if(""===e)return"";var n,h="",v=!!r.nocase,x=!1,E=[],S=[],C=!1,A=-1,R=-1,j="."===e.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",O=this;function clearStateChar(){if(n){switch(n){case"*":h+=y,v=!0;break;case"?":h+=g,v=!0;break;default:h+="\\"+n}O.debug("clearStateChar %j %j",n,h),n=!1}}for(var T,k=0,P=e.length;k<P&&(T=e.charAt(k));k++)if(this.debug("%s\t%s %s %j",e,k,h,T),x&&b[T])h+="\\"+T,x=!1;else switch(T){case"/":return!1;case"\\":clearStateChar(),x=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,k,h,T),C){this.debug(" in class"),"!"===T&&k===R+1&&(T="^"),h+=T;continue}O.debug("call clearStateChar %j",n),clearStateChar(),n=T,r.noext&&clearStateChar();continue;case"(":if(C){h+="(";continue}if(!n){h+="\\(";continue}E.push({type:n,start:k-1,reStart:h.length,open:d[n].open,close:d[n].close}),h+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,h),n=!1;continue;case")":if(C||!E.length){h+="\\)";continue}clearStateChar(),v=!0;var I=E.pop();h+=I.close,"!"===I.type&&S.push(I),I.reEnd=h.length;continue;case"|":if(C||!E.length||x){h+="\\|",x=!1;continue}clearStateChar(),h+="|";continue;case"[":if(clearStateChar(),C){h+="\\"+T;continue}C=!0,R=k,A=h.length,h+=T;continue;case"]":if(k===R+1||!C){h+="\\"+T,x=!1;continue}if(C){var M=e.substring(R+1,k);try{RegExp("["+M+"]")}catch(_){var N=this.parse(M,w);h=h.substr(0,A)+"\\["+N[0]+"\\]",v=v||N[1],C=!1;continue}}v=!0,C=!1,h+=T;continue;default:clearStateChar(),x?x=!1:!b[T]||"^"===T&&C||(h+="\\"),h+=T}C&&(M=e.substr(R+1),N=this.parse(M,w),h=h.substr(0,A)+"\\["+N[0],v=v||N[1]);for(I=E.pop();I;I=E.pop()){var q=h.slice(I.reStart+I.open.length);this.debug("setting tail",h,I),q=q.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,r){return r||(r="\\"),t+t+r+"|"})),this.debug("tail=%j\n %s",q,q,I,h);var U="*"===I.type?y:"?"===I.type?g:"\\"+I.type;v=!0,h=h.slice(0,I.reStart)+U+"\\("+q}clearStateChar(),x&&(h+="\\\\");var L=!1;switch(h.charAt(0)){case".":case"[":case"(":L=!0}for(var B=S.length-1;B>-1;B--){var z=S[B],D=h.slice(0,z.reStart),F=h.slice(z.reStart,z.reEnd-8),H=h.slice(z.reEnd-8,z.reEnd),V=h.slice(z.reEnd);H+=V;var W=D.split("(").length-1,G=V;for(k=0;k<W;k++)G=G.replace(/\)[+*?]?/,"");var J="";""===(V=G)&&t!==w&&(J="$"),h=D+F+V+J+H}""!==h&&v&&(h="(?=.)"+h);L&&(h=j+h);if(t===w)return[h,v];if(!v)return function globUnescape(e){return e.replace(/\\(.)/g,"$1")}(e);var X=r.nocase?"i":"";try{var K=new RegExp("^"+h+"$",X)}catch(_){return new RegExp("$.")}return K._glob=e,K._src=h,K};var w={};minimatch.makeRe=function(e,t){return new Minimatch(e,t||{}).makeRe()},Minimatch.prototype.makeRe=function makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,r=t.noglobstar?y:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=t.nocase?"i":"",h=e.map((function(e){return e.map((function(e){return e===i?r:"string"===typeof e?function regExpEscape(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(e):e._src})).join("\\/")})).join("|");h="^(?:"+h+")$",this.negate&&(h="^(?!"+h+").*$");try{this.regexp=new RegExp(h,n)}catch(d){this.regexp=!1}return this.regexp},minimatch.match=function(e,t,r){var n=new Minimatch(t,r=r||{});return e=e.filter((function(e){return n.match(e)})),n.options.nonull&&!e.length&&e.push(t),e},Minimatch.prototype.match=function match(e,t){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var r=this.options;"/"!==n.sep&&(e=e.split(n.sep).join("/"));e=e.split(v),this.debug(this.pattern,"split",e);var i,h,d=this.set;for(this.debug(this.pattern,"set",d),h=e.length-1;h>=0&&!(i=e[h]);h--);for(h=0;h<d.length;h++){var g=d[h],y=e;if(r.matchBase&&1===g.length&&(y=[i]),this.matchOne(y,g,t))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},Minimatch.prototype.matchOne=function(e,t,r){var n=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var h=0,d=0,g=e.length,y=t.length;h<g&&d<y;h++,d++){this.debug("matchOne loop");var b,v=t[d],w=e[h];if(this.debug(t,v,w),!1===v)return!1;if(v===i){this.debug("GLOBSTAR",[t,v,w]);var _=h,x=d+1;if(x===y){for(this.debug("** at the end");h<g;h++)if("."===e[h]||".."===e[h]||!n.dot&&"."===e[h].charAt(0))return!1;return!0}for(;_<g;){var E=e[_];if(this.debug("\nglobstar while",e,_,t,x,E),this.matchOne(e.slice(_),t.slice(x),r))return this.debug("globstar found match!",_,g,E),!0;if("."===E||".."===E||!n.dot&&"."===E.charAt(0)){this.debug("dot detected!",e,_,t,x);break}this.debug("globstar swallow a segment, and continue"),_++}return!(!r||(this.debug("\n>>> no match, partial?",e,_,t,x),_!==g))}if("string"===typeof v?(b=n.nocase?w.toLowerCase()===v.toLowerCase():w===v,this.debug("string match",v,w,b)):(b=w.match(v),this.debug("pattern match",v,w,b)),!b)return!1}if(h===g&&d===y)return!0;if(h===g)return r;if(d===y)return h===g-1&&""===e[h];throw new Error("wtf?")}},555:function(e,t,r){var n,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,r,n){"use strict";function o(e){return e&&"object"==_typeof(e)&&"default"in e?e:{default:e}}var i=o(t),h=o(r),d=o(n),g=function a(){return(g=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function u(e,t,r,n){return new(r||(r=Promise))((function(i,h){function c(e){try{a(n.next(e))}catch(e){h(e)}}function s(e){try{a(n.throw(e))}catch(e){h(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(c,s)}a((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,i,h,d={label:0,sent:function sent(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return h={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h;function s(h){return function(g){return function(h){if(r)throw new TypeError("Generator is already executing.");for(;d;)try{if(r=1,n&&(i=2&h[0]?n.return:h[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,h[1])).done)return i;switch(n=0,i&&(h=[2&h[0],i.value]),h[0]){case 0:case 1:i=h;break;case 4:return d.label++,{value:h[1],done:!1};case 5:d.label++,n=h[1],h=[0];continue;case 7:h=d.ops.pop(),d.trys.pop();continue;default:if(!((i=(i=d.trys).length>0&&i[i.length-1])||6!==h[0]&&2!==h[0])){d=0;continue}if(3===h[0]&&(!i||h[1]>i[0]&&h[1]<i[3])){d.label=h[1];break}if(6===h[0]&&d.label<i[1]){d.label=i[1],i=h;break}if(i&&d.label<i[2]){d.label=i[2],d.ops.push(h);break}i[2]&&d.ops.pop(),d.trys.pop();continue}h=t.call(e,d)}catch(e){h=[6,e],n=0}finally{r=i=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([h,g])}}}var y=[{provider_name:"YouTube",provider_url:"https://www.youtube.com/",endpoints:[{schemes:["https://*.youtube.com/watch*","https://*.youtube.com/v/*","https://youtu.be/*"],url:"https://www.youtube.com/oembed",discovery:!0}]},{provider_name:"Reddit",provider_url:"https://reddit.com/",endpoints:[{schemes:["https://reddit.com/r/*/comments/*/*","https://www.reddit.com/r/*/comments/*/*"],url:"https://www.reddit.com/oembed"}]},{provider_name:"Flickr",provider_url:"https://www.flickr.com/",endpoints:[{schemes:["http://*.flickr.com/photos/*","http://flic.kr/p/*","https://*.flickr.com/photos/*","https://flic.kr/p/*"],url:"https://www.flickr.com/services/oembed/",discovery:!0}]},{provider_name:"Vimeo",provider_url:"https://vimeo.com/",endpoints:[{schemes:["https://vimeo.com/*","https://vimeo.com/album/*/video/*","https://vimeo.com/channels/*/*","https://vimeo.com/groups/*/videos/*","https://vimeo.com/ondemand/*/*","https://player.vimeo.com/video/*"],url:"https://vimeo.com/api/oembed.{format}",discovery:!0}]},{provider_name:"SoundCloud",provider_url:"http://soundcloud.com/",endpoints:[{schemes:["http://soundcloud.com/*","https://soundcloud.com/*","https://soundcloud.app.goog.gl/*"],url:"https://soundcloud.com/oembed"}]},{provider_name:"Twitter",provider_url:"http://www.twitter.com/",endpoints:[{schemes:["https://twitter.com/*/status/*","https://*.twitter.com/*/status/*","https://twitter.com/*/moments/*","https://*.twitter.com/*/moments/*"],url:"https://publish.twitter.com/oembed"}]},{provider_name:"GIPHY",provider_url:"https://giphy.com",endpoints:[{schemes:["https://giphy.com/gifs/*","http://gph.is/*","https://media.giphy.com/media/*/giphy.gif"],url:"https://giphy.com/services/oembed",discovery:!0}]}];function m(e,t,r){return u(this,void 0,void 0,(function(){var n,i,h,g,y,b;return l(this,(function(v){switch(v.label){case 0:if(n=p(r.url,t),i=n.base_url,h=n.requestInterceptor,g=n.responceInterceptor,!i)throw Error("Invalid url: cannot guess oembed endpoint");return y=function(e,t){e.endsWith("/")&&(e=e.slice(0,-1));var r=/\{format\}/gi;if(e.match(r)&&(e=e.replace(r,"json")),!t)return e;var n=/\{url\}/gi,i=/\{raw_url\}/gi;return t.match(i)?t.replace(i,e):t.match(n)?(e=encodeURIComponent(e),t.replace(n,e)):(t.endsWith("/")&&(t=t.slice(0,-1)),t+"/"+e)}(i,e),b=d.default.create(),h&&b.interceptors.request.use(h),g&&b.interceptors.response.use(g),[4,b.get(y,{params:r})];case 1:return[2,v.sent().data]}}))}))}function p(e,t){var r,n,i;return(t=t||y).forEach((function(t){var d;t.endpoints.forEach((function(t){(function(e,t){return Boolean(t.find((function(t){return h.default(e,t,{nocase:!0})})))||Boolean(t.find((function(t){return h.default(e,t.replace(/\*/g,"**"),{nocase:!0})})))})(e,t.schemes)&&(d=t)})),d&&(r=d.url,n=t.requestInterceptor,i=t.responceInterceptor)})),{base_url:r,requestInterceptor:n,responceInterceptor:i}}function f(e,r,n){var i=[];t.useEffect((function(){var t=document.createElement("div");return t.innerHTML=e,t.querySelectorAll("script").forEach((function(e){var t=document.createElement("script");Array.from(e.attributes).forEach((function(e){"id"!==e.nodeName&&t.setAttribute(e.nodeName,e.nodeValue||"")})),t.innerHTML=e.innerHTML,Object.entries(r||{}).forEach((function(e){var r=e[0],n=e[1];t.setAttribute(r,n)})),document.body.appendChild(t),i=i.concat(t)})),function(){i.forEach((function(e){document.body.removeChild(e)})),i=[]}}),n||[e])}e.default=function(e){var r=e.url,n=e.proxy,h=e.style,d=e.options,y=e.providers,b=e.ImgComponent,v=e.LinkComponent,w=e.FallbackElement,_=e.LoadingFallbackElement,x=t.useState(void 0),E=x[0],S=x[1],C=t.useState("idle"),A=C[0],R=C[1],j=t.useState(""),O=j[0],T=j[1];f(O,{defer:""}),t.useEffect((function(){"idle"===A&&function(){u(this,void 0,void 0,(function(){var e,t;return l(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),R("loading"),[4,m(n,y,g(g({url:r,maxwidth:700,maxheight:500,align:"center"},d),{format:"json"}))];case 1:if(!(e=i.sent()))throw Error("Nill embed responce");return R("done"),S(e),e.html&&T(e.html),[3,3];case 2:return t=i.sent(),console.error("Error",t),R("error"),[3,3];case 3:return[2]}}))}))}()}),[A]);var k,P=i.default.createElement("a",{href:r,target:"_blank",rel:"nofollow noreferrer noopener"},r);return E&&!E.html&&("photo"===E.type?k=b?i.default.createElement(b,{responce:E}):i.default.createElement("img",{alt:"",src:E.url}):"link"===E.type&&(k=v?i.default.createElement(v,{responce:E}):i.default.createElement("a",{href:r,target:"_blank",rel:"nofollow noreferrer noopener"},r))),"loading"===A||"idle"===A?_||P:"error"===A?w||P:i.default.createElement("span",{style:h,className:"__embed __embed_column"},k,O&&i.default.createElement("span",{className:"__embed_column",dangerouslySetInnerHTML:{__html:O}}),i.default.createElement("style",null,".__embed {\n margin: auto;\n width: 100%;\n max-width: 700px;\n} \n.__embed iframe {\n width: 100%;\n margin: auto;\n}\n.__embed img, .__embed video {\n width: 100%;\n margin: 0;\n}\n.__embed blockquote {\n margin: 0;\n}\n.__embed span {\n border: 0;\n} \n.__embed_column {\n width: 100%;\n display: flex;\n flex-direction: column;\n}"))},e.defaultProviders=y,e.getEndpoint=p,e.requestEmbed=m,e.useScript=f,Object.defineProperty(e,"__esModule",{value:!0})},"object"==_typeof(t)?d(t,r(804),r(158),r(313)):(i=[t,r(804),r(158),r(313)],void 0===(h="function"===typeof(n=d)?n.apply(t,i):n)||(e.exports=h))},804:function(e){"use strict";e.exports=React},386:function(){}},t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=__webpack_require__(804),t=__webpack_require__.n(e),r=ReactDOM,n=__webpack_require__.n(r),i=__webpack_require__(555),h=__webpack_require__.n(i);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)}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _arrayLikeToArray(e,t)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=function _isNativeReflectConstruct(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function _createSuperInternal(){var r,n=_getPrototypeOf(e);if(t){var i=_getPrototypeOf(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!==typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d={provider_name:"Instagram",provider_url:"https://instagram.com",endpoints:[{schemes:["http://instagram.com/*/p/*,","http://www.instagram.com/*/p/*,","https://instagram.com/*/p/*,","https://www.instagram.com/*/p/*,","http://instagram.com/p/*","http://instagr.am/p/*","http://www.instagram.com/p/*","http://www.instagr.am/p/*","https://instagram.com/p/*","https://instagr.am/p/*","https://www.instagram.com/p/*","https://www.instagr.am/p/*","http://instagram.com/tv/*","http://instagr.am/tv/*","http://www.instagram.com/tv/*","http://www.instagr.am/tv/*","https://instagram.com/tv/*","https://instagr.am/tv/*","https://www.instagram.com/tv/*","https://www.instagr.am/tv/*"],url:"https://graph.facebook.com/v9.0/instagram_oembed",formats:["json"]},{schemes:["http://instagram.com/*/p/*,","http://www.instagram.com/*/p/*,","https://instagram.com/*/p/*,","https://www.instagram.com/*/p/*,","http://instagram.com/p/*","http://instagr.am/p/*","http://www.instagram.com/p/*","http://www.instagr.am/p/*","https://instagram.com/p/*","https://instagr.am/p/*","https://www.instagram.com/p/*","https://www.instagr.am/p/*","http://instagram.com/tv/*","http://instagr.am/tv/*","http://www.instagram.com/tv/*","http://www.instagr.am/tv/*","https://instagram.com/tv/*","https://instagr.am/tv/*","https://www.instagram.com/tv/*","https://www.instagr.am/tv/*"],url:"https://api.instagram.com/oembed",formats:["json"]}]},g=__webpack_require__(313),y=function(e){!function _inherits(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}}),t&&_setPrototypeOf(e,t)}(MetaWindow,e);var t=_createSuper(MetaWindow);function MetaWindow(e){var r;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MetaWindow),_defineProperty(_assertThisInitialized(r=t.call(this,e)),"state",{content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null}),_defineProperty(_assertThisInitialized(r),"_currIndex",(function(){var e=_assertThisInitialized(r),t=e.state.current,n=t.getAttribute("data-gallery");return e.state.collections[n].indexOf(t)})),_defineProperty(_assertThisInitialized(r),"next",(function(){var e=_assertThisInitialized(r),t=e.state.current.getAttribute("data-gallery"),n=e._currIndex();n<e.state.collections[t].length-1?n++:n=0,e.state.collections[t][n].click()})),_defineProperty(_assertThisInitialized(r),"prev",(function(){var e=_assertThisInitialized(r),t=e.state.current.getAttribute("data-gallery"),n=e._currIndex();n>0?n--:n=e.state.collections[t].length-1,e.state.collections[t][n].click()})),_defineProperty(_assertThisInitialized(r),"reset",(function(){_assertThisInitialized(r).setState({content:"",type:[],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(_assertThisInitialized(r),"embed",(function(e){var t=_assertThisInitialized(r);console.log("".concat(t.name,": embed")),t.reset(),t.setState({embed:e,loading:!1,type:["embed","video"]}),t.show()})),_defineProperty(_assertThisInitialized(r),"load",(function(e){var t=_assertThisInitialized(r),n=t.axios;t.reset(),t.setState({loading:!0}),t.show(),n.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('<img src="data:'.concat(e.headers["content-type"],";base64,").concat(t._imageEncode(e.data),'" />'),"image");break;case"application/json":case"application/ld+json":case"application/json; charset=UTF-8":var r=JSON.parse(t._abToString(e.data));t.setContent("".concat(r.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!"))}})).catch((function(e){console.error(e);var r="";if(e.response)switch(e.response.status){case 404:r="Not Found.";break;case 500:r="Server issue, please try again latter.";break;default:r="Something went wrong."}else e.request?r="No response received":console.warn("Error",e.message);t.setState({error:r})})).then((function(){t.setState({loading:!1})}))})),_defineProperty(_assertThisInitialized(r),"_abToString",(function(e){return String.fromCharCode.apply(null,new Uint8Array(e))})),_defineProperty(_assertThisInitialized(r),"_imageEncode",(function(e){new Uint8Array(e);return btoa([].reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),""))})),_defineProperty(_assertThisInitialized(r),"setContent",(function(e,t){var n=_assertThisInitialized(r);console.log("".concat(n.name,": setContent"));var i=t||["html","text"];Array.isArray(i)||(i=t.split(" ")),n.setState({content:e,type:i})})),_defineProperty(_assertThisInitialized(r),"show",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": show")),e.setState({shown:!0})})),_defineProperty(_assertThisInitialized(r),"hide",(function(){var e=_assertThisInitialized(r);console.log("".concat(e.name,": hide")),e.setState({shown:!1})})),_defineProperty(_assertThisInitialized(r),"getHtml",(function(){return{__html:_assertThisInitialized(r).state.content}}));var n=_assertThisInitialized(r);return n.name=n.constructor.name,console.log("".concat(n.name,": init")),n.axios=g,document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){var t=e.getAttribute("data-gallery");t&&(n.state.collections[t]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(t,'"]')).forEach((function(e){n.state.collections[t].push(e)}))),e.addEventListener("click",(function(e){e.preventDefault();var t=e.currentTarget,r=t.getAttribute("href")||t.getAttribute("data-href"),i=t.getAttribute("data-embed");n.state.current=t,i?n.embed(r):n.load(r)}))})),r}return function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}(MetaWindow,[{key:"render",value:function render(){var e=this,t=e.name,r=null,n=e.state.current;if(n){var g=n.getAttribute("data-gallery");g&&e.state.collections[g].length>1&&(r=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 y=e.state.embed?React.createElement("section",{className:"meta-wrap typography"},React.createElement(h(),{url:e.state.embed,providers:[].concat(_toConsumableArray(i.defaultProviders),[d]),LoadingFallbackElement:React.createElement("div",{className:"meta-spinner_embed"},"... Loading ...")})):React.createElement("section",{className:"meta-wrap typography",dangerouslySetInnerHTML:e.getHtml()}),b="meta-".concat(t," meta-").concat(t,"__").concat(e.state.type.join(" meta-".concat(t,"__"))),v="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("div",{className:b},React.createElement("div",{className:v},React.createElement("article",{className:"meta-content"},r,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),y)))}}]),MetaWindow}(e.Component);n().render(t().createElement(y,null),document.getElementById("MetaLightboxApp"))}()}();