/home/s/h/a/shalekuihb/www/wp-content/plugins/insta-gallery/build/frontend/js/index.js
/*! For license information please see index.js.LICENSE.txt */
(()=>{var t={500(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t,e,r,o,i,a,l,u,c,s,d,_,f,m,p,g={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h=Array.isArray;function b(t,e){for(var n in e)t[n]=e[n];return t}function w(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function S(e,n,r){var o,i,a,l={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return k(e,l,o,i,null)}function k(t,n,o,i,a){var l={type:t,props:n,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=e.vnode&&e.vnode(l),l}function O(t){return t.children}function x(t,e){this.props=t,this.context=e}function N(t,e){if(null==e)return t.__?N(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?N(t):null}function I(t){if(t.__P&&t.__d){var n=t.__v,r=n.__e,o=[],i=[],a=b({},n);a.__v=n.__v+1,e.vnode&&e.vnode(a),U(t.__P,a,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?N(n):r,!!(32&n.__u),i),a.__v=n.__v,a.__.__k[a.__i]=a,G(o,a,i),n.__e=n.__=null,a.__e!=r&&P(a)}}function P(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),P(t)}function j(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!E.__r++||i!=e.debounceRendering)&&((i=e.debounceRendering)||a)(E)}function E(){try{for(var t,e=1;o.length;)o.length>e&&o.sort(l),t=o.shift(),e=o.length,I(t)}finally{o.length=E.__r=0}}function A(t,e,n,r,o,i,a,l,u,c,s){var d,_,f,m,p,y,h,b=r&&r.__k||v,w=e.length;for(u=C(n,e,b,u,w),d=0;d<w;d++)null!=(f=n.__k[d])&&(_=-1!=f.__i&&b[f.__i]||g,f.__i=d,y=U(t,f,_,o,i,a,l,u,c,s),m=f.__e,f.ref&&_.ref!=f.ref&&(_.ref&&V(_.ref,null,f),s.push(f.ref,f.__c||m,f)),null==p&&null!=m&&(p=m),(h=!!(4&f.__u))||_.__k===f.__k?(u=T(f,u,t,h),h&&_.__e&&(_.__e=null)):"function"==typeof f.type&&void 0!==y?u=y:m&&(u=m.nextSibling),f.__u&=-7);return n.__e=p,u}function C(t,e,n,r,o){var i,a,l,u,c,s=n.length,d=s,_=0;for(t.__k=new Array(o),i=0;i<o;i++)null!=(a=e[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=t.__k[i]=k(null,a,null,null,null):h(a)?a=t.__k[i]=k(O,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=t.__k[i]=k(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):t.__k[i]=a,u=i+_,a.__=t,a.__b=t.__b+1,l=null,-1!=(c=a.__i=M(a,n,u,d))&&(d--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(o>s?_--:o<s&&_++),"function"!=typeof a.type&&(a.__u|=4)):c!=u&&(c==u-1?_--:c==u+1?_++:(c>u?_--:_++,a.__u|=4))):t.__k[i]=null;if(d)for(i=0;i<s;i++)null!=(l=n[i])&&!(2&l.__u)&&(l.__e==r&&(r=N(l)),B(l,l));return r}function T(t,e,n,r){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=T(o[i],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=N(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function q(t,e){return e=e||[],null==t||"boolean"==typeof t||(h(t)?t.some(function(t){q(t,e)}):e.push(t)),e}function M(t,e,n,r){var o,i,a,l=t.key,u=t.type,c=e[n],s=null!=c&&!(2&c.__u);if(null===c&&null==l||s&&l==c.key&&u==c.type)return n;if(r>(s?1:0))for(o=n-1,i=n+1;o>=0||i<e.length;)if(null!=(c=e[a=o>=0?o--:i++])&&!(2&c.__u)&&l==c.key&&u==c.type)return a;return-1}function F(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||y.test(e)?n:n+"px"}function L(t,e,n,r,o){var i,a;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||F(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||F(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])i=e!=(e=e.replace(d,"$1")),a=e.toLowerCase(),e=a in t||"onFocusOut"==e||"onFocusIn"==e?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n[s]=r[s]:(n[s]=_,t.addEventListener(e,i?m:f,i)):t.removeEventListener(e,i?m:f,i);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function D(t){return function(n){if(this.l){var r=this.l[n.type+t];if(null==n[c])n[c]=_++;else if(n[c]<r[s])return;return r(e.event?e.event(n):n)}}}function U(t,n,r,o,i,a,l,u,c,s){var d,_,f,m,p,g,y,S,k,N,I,P,j,E,C,T=n.type;if(void 0!==n.constructor)return null;128&r.__u&&(c=!!(32&r.__u),a=[u=n.__e=r.__e]),(d=e.__b)&&d(n);t:if("function"==typeof T)try{if(S=n.props,k=T.prototype&&T.prototype.render,N=(d=T.contextType)&&o[d.__c],I=d?N?N.props.value:d.__:o,r.__c?y=(_=n.__c=r.__c).__=_.__E:(k?n.__c=_=new T(S,I):(n.__c=_=new x(S,I),_.constructor=T,_.render=z),N&&N.sub(_),_.state||(_.state={}),_.__n=o,f=_.__d=!0,_.__h=[],_._sb=[]),k&&null==_.__s&&(_.__s=_.state),k&&null!=T.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=b({},_.__s)),b(_.__s,T.getDerivedStateFromProps(S,_.__s))),m=_.props,p=_.state,_.__v=n,f)k&&null==T.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),k&&null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(k&&null==T.getDerivedStateFromProps&&S!==m&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(S,I),n.__v==r.__v||!_.__e&&null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(S,_.__s,I)){n.__v!=r.__v&&(_.props=S,_.state=_.__s,_.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(t){t&&(t.__=n)}),v.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&l.push(_);break t}null!=_.componentWillUpdate&&_.componentWillUpdate(S,_.__s,I),k&&null!=_.componentDidUpdate&&_.__h.push(function(){_.componentDidUpdate(m,p,g)})}if(_.context=I,_.props=S,_.__P=t,_.__e=!1,P=e.__r,j=0,k)_.state=_.__s,_.__d=!1,P&&P(n),d=_.render(_.props,_.state,_.context),v.push.apply(_.__h,_._sb),_._sb=[];else do{_.__d=!1,P&&P(n),d=_.render(_.props,_.state,_.context),_.state=_.__s}while(_.__d&&++j<25);_.state=_.__s,null!=_.getChildContext&&(o=b(b({},o),_.getChildContext())),k&&!f&&null!=_.getSnapshotBeforeUpdate&&(g=_.getSnapshotBeforeUpdate(m,p)),E=null!=d&&d.type===O&&null==d.key?W(d.props.children):d,u=A(t,h(E)?E:[E],n,r,o,i,a,l,u,c,s),_.base=n.__e,n.__u&=-161,_.__h.length&&l.push(_),y&&(_.__E=_.__=null)}catch(t){if(n.__v=null,c||null!=a)if(t.then){for(n.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,n.__e=u}else{for(C=a.length;C--;)w(a[C]);R(n)}else n.__e=r.__e,n.__k=r.__k,t.then||R(n);e.__e(t,n,r)}else null==a&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=H(r.__e,n,r,o,i,a,l,c,s);return(d=e.diffed)&&d(n),128&n.__u?void 0:u}function R(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(R))}function G(t,n,r){for(var o=0;o<r.length;o++)V(r[o],r[++o],r[++o]);e.__c&&e.__c(n,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(t){t.call(n)})}catch(t){e.__e(t,n.__v)}})}function W(t){return"object"!=typeof t||null==t||t.__b>0?t:h(t)?t.map(W):b({},t)}function H(n,r,o,i,a,l,u,c,s){var d,_,f,m,p,v,y,b=o.props||g,S=r.props,k=r.type;if("svg"==k?a="http://www.w3.org/2000/svg":"math"==k?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;d<l.length;d++)if((p=l[d])&&"setAttribute"in p==!!k&&(k?p.localName==k:3==p.nodeType)){n=p,l[d]=null;break}if(null==n){if(null==k)return document.createTextNode(S);n=document.createElementNS(a,k,S.is&&S),c&&(e.__m&&e.__m(r,l),c=!1),l=null}if(null==k)b===S||c&&n.data==S||(n.data=S);else{if(l=l&&t.call(n.childNodes),!c&&null!=l)for(b={},d=0;d<n.attributes.length;d++)b[(p=n.attributes[d]).name]=p.value;for(d in b)p=b[d],"dangerouslySetInnerHTML"==d?f=p:"children"==d||d in S||"value"==d&&"defaultValue"in S||"checked"==d&&"defaultChecked"in S||L(n,d,null,p,a);for(d in S)p=S[d],"children"==d?m=p:"dangerouslySetInnerHTML"==d?_=p:"value"==d?v=p:"checked"==d?y=p:c&&"function"!=typeof p||b[d]===p||L(n,d,p,b[d],a);if(_)c||f&&(_.__html==f.__html||_.__html==n.innerHTML)||(n.innerHTML=_.__html),r.__k=[];else if(f&&(n.innerHTML=""),A("template"==r.type?n.content:n,h(m)?m:[m],r,o,i,"foreignObject"==k?"http://www.w3.org/1999/xhtml":a,l,u,l?l[0]:o.__k&&N(o,0),c,s),null!=l)for(d=l.length;d--;)w(l[d]);c||(d="value","progress"==k&&null==v?n.removeAttribute("value"):null!=v&&(v!==n[d]||"progress"==k&&!v||"option"==k&&v!=b[d])&&L(n,d,v,b[d],a),d="checked",null!=y&&y!=n[d]&&L(n,d,y,b[d],a))}return n}function V(t,n,r){try{if("function"==typeof t){var o="function"==typeof t.__u;o&&t.__u(),o&&null==n||(t.__u=t(n))}else t.current=n}catch(t){e.__e(t,r)}}function B(t,n,r){var o,i;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||V(o,null,n)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){e.__e(t,n)}o.base=o.__P=null}if(o=t.__k)for(i=0;i<o.length;i++)o[i]&&B(o[i],n,r||"function"!=typeof t.type);r||w(t.__e),t.__c=t.__=t.__e=void 0}function z(t,e,n){return this.constructor(t,n)}function Z(n,r,o){var i,a,l,u;r==document&&(r=document.documentElement),e.__&&e.__(n,r),a=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],u=[],U(r,n=(!i&&o||r).__k=S(O,null,[n]),a||g,g,r.namespaceURI,!i&&o?[o]:a?null:r.firstChild?t.call(r.childNodes):null,l,!i&&o?o:a?a.__e:r.firstChild,i,u),G(l,n,u)}t=v.slice,e={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},r=0,x.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=b({},this.state),"function"==typeof t&&(t=t(b({},n),this.props)),t&&b(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),j(this))},x.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),j(this))},x.prototype.render=O,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(t,e){return t.__v.__b-e.__v.__b},E.__r=0,u=Math.random().toString(8),c="__d"+u,s="__a"+u,d=/(PointerCapture)$|Capture$/i,_=0,f=D(!1),m=D(!0),p=0;var $,J,X,Y,K=0,Q=[],tt=e,et=tt.__b,nt=tt.__r,rt=tt.diffed,ot=tt.__c,it=tt.unmount,at=tt.__;function lt(t,e){tt.__h&&tt.__h(J,t,K||e),K=0;var n=J.__H||(J.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ut(t){return K=1,ct(bt,t)}function ct(t,e,n){var r=lt($++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):bt(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=J,!J.__f)){var o=function(t,e,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(t){return t.__c});if(o.every(function(t){return!t.__N}))return!i||i.call(this,t,e,n);var a=r.__c.props!==t;return o.some(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}}),i&&i.call(this,t,e,n)||a};J.__f=!0;var i=J.shouldComponentUpdate,a=J.componentWillUpdate;J.componentWillUpdate=function(t,e,n){if(this.__e){var r=i;i=void 0,o(t,e,n),i=r}a&&a.call(this,t,e,n)},J.shouldComponentUpdate=o}return r.__N||r.__}function st(t,e){var n=lt($++,3);!tt.__s&&ht(n.__H,e)&&(n.__=t,n.u=e,J.__H.__h.push(n))}function dt(t){return K=5,_t(function(){return{current:t}},[])}function _t(t,e){var n=lt($++,7);return ht(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ft(t,e){return K=8,_t(function(){return t},e)}function mt(){for(var t;t=Q.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(vt),e.__h.some(yt),e.__h=[]}catch(n){e.__h=[],tt.__e(n,t.__v)}}}tt.__b=function(t){J=null,et&&et(t)},tt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),at&&at(t,e)},tt.__r=function(t){nt&&nt(t),$=0;var e=(J=t.__c).__H;e&&(X===J?(e.__h=[],J.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(vt),e.__h.some(yt),e.__h=[],$=0)),X=J},tt.diffed=function(t){rt&&rt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==Q.push(e)&&Y===tt.requestAnimationFrame||((Y=tt.requestAnimationFrame)||gt)(mt)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),X=J=null},tt.__c=function(t,e){e.some(function(t){try{t.__h.some(vt),t.__h=t.__h.filter(function(t){return!t.__||yt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],tt.__e(n,t.__v)}}),ot&&ot(t,e)},tt.unmount=function(t){it&&it(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(t){try{vt(t)}catch(t){e=t}}),n.__H=void 0,e&&tt.__e(e,n.__v))};var pt="function"==typeof requestAnimationFrame;function gt(t){var e,n=function(){clearTimeout(r),pt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);pt&&(e=requestAnimationFrame(n))}function vt(t){var e=J,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),J=e}function yt(t){var e=J;t.__c=t.__(),J=e}function ht(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function bt(t,e){return"function"==typeof e?e(t):e}function wt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return St(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],f=_.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=_.n<0)?u:n.call(r,_))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(St(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,St(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,St(d,"constructor",c),St(c,"constructor",u),u.displayName="GeneratorFunction",St(c,o,"GeneratorFunction"),St(d),St(d,o,"Generator"),St(d,r,function(){return this}),St(d,"toString",function(){return"[object Generator]"}),(wt=function(){return{w:i,m:_}})()}function St(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}St=function(t,e,n,r){function i(e,n){St(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},St(t,e,n,r)}function kt(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function Ot(t){return xt.apply(this,arguments)}function xt(){return xt=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){kt(i,r,o,a,l,"next",t)}function l(t){kt(i,r,o,a,l,"throw",t)}a(void 0)})}}(wt().m(function t(e){var n,r,o,i;return wt().w(function(t){for(;;)switch(t.n){case 0:if(n=e.url,r=e.data,o=e.method,n){t.n=1;break}throw new Error("Empty url: ".concat(n));case 1:return i={"Content-Type":"application/json"},"undefined"!=typeof wpApiSettings&&wpApiSettings.nonce&&(i["X-WP-Nonce"]=wpApiSettings.nonce),t.n=2,fetch(n,{body:r?JSON.stringify(r):void 0,method:o,headers:i,credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(t.code)throw new Error("".concat(t.code,": ").concat((null==t?void 0:t.message)||"Unknown"));return t}).catch(function(t){throw new Error(t)});case 2:return t.a(2,t.v)}},t)})),xt.apply(this,arguments)}function Nt(t){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nt(t)}function It(t,e){var n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=e?e+"["+r+"]":r,i=t[r];n.push(null!==i&&"object"===Nt(i)?It(i,o):encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}function Pt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return jt(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],f=_.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=_.n<0)?u:n.call(r,_))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(jt(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,jt(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,jt(d,"constructor",c),jt(c,"constructor",u),u.displayName="GeneratorFunction",jt(c,o,"GeneratorFunction"),jt(d),jt(d,o,"Generator"),jt(d,r,function(){return this}),jt(d,"toString",function(){return"[object Generator]"}),(Pt=function(){return{w:i,m:_}})()}function jt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}jt=function(t,e,n,r){function i(e,n){jt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},jt(t,e,n,r)}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return At(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?At(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Ct(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function Tt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Ct(i,r,o,a,l,"next",t)}function l(t){Ct(i,r,o,a,l,"throw",t)}a(void 0)})}}function qt(t){return Mt.apply(this,arguments)}function Mt(){return(Mt=Tt(Pt().m(function t(e){var n,r,o,i;return Pt().w(function(t){for(;;)switch(t.n){case 0:return r=null===(n=window)||void 0===n||null===(n=n.qligg_frontend)||void 0===n?void 0:n.restRoutePaths.userprofile,o=It({account_id:e.account_id}).toString(),i="".concat(r).concat(r.includes("?")?"&":"?").concat(o),t.n=1,Ot({url:i,method:"GET"});case 1:return t.a(2,t.v)}},t)}))).apply(this,arguments)}function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Dt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Ut(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Dt(Object(n),!0).forEach(function(e){Rt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Dt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Rt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gt=function(t){function e(t){var n,r;return this.getChildContext||(n=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!=t.value&&n.forEach(function(t){t.__e=!0,j(t)})},this.sub=function(t){n.add(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.delete(t),e&&e.call(t)}}),t.children}return e.__c="__cC"+p++,e.__=t,e.Provider=e.__l=(e.Consumer=function(t,e){return t.children(e)}).contextType=e,e}({}),Wt=function(){return function(t){var e=J.context[t.__c],n=lt($++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(J)),e.props.value):t.__}(Gt)},Ht=function(t,e){switch(e.type){case"SET_CURRENT_FEED_INDEX":case"SET_IS_OPEN":case"SET_COUNTER":return Ut(Ut({},t),e.payload)}},Vt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Lt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ct(Ht,{currentFeedIndex:0,isOpen:!1,isImageLoad:!1,counter:0}),2),r=n[0],o=n[1];return S(Gt.Provider,{value:Ut(Ut({},r),{},{setCurrentFeedIndex:function(t){r.currentFeedIndex!=t&&o({type:"SET_CURRENT_FEED_INDEX",payload:{currentFeedIndex:t}})},setIsOpen:function(t){r.isOpen!=t&&o({type:"SET_IS_OPEN",payload:{isOpen:t}})},setCounter:function(t){r.counter!=t&&o({type:"SET_COUNTER",payload:{counter:t}})}})},e)};function Bt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return zt(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],f=_.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=_.n<0)?u:n.call(r,_))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(zt(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,zt(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,zt(d,"constructor",c),zt(c,"constructor",u),u.displayName="GeneratorFunction",zt(c,o,"GeneratorFunction"),zt(d),zt(d,o,"Generator"),zt(d,r,function(){return this}),zt(d,"toString",function(){return"[object Generator]"}),(Bt=function(){return{w:i,m:_}})()}function zt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}zt=function(t,e,n,r){function i(e,n){zt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},zt(t,e,n,r)}function Zt(t){return function(t){if(Array.isArray(t))return Xt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Jt(t)||function(){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 $t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||Jt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jt(t,e){if(t){if("string"==typeof t)return Xt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xt(t,e):void 0}}function Xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Yt(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function Kt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Yt(i,r,o,a,l,"next",t)}function l(t){Yt(i,r,o,a,l,"throw",t)}a(void 0)})}}function Qt(t){return te.apply(this,arguments)}function te(){return te=Kt(Bt().m(function t(e){var n,r,o,i,a,l,u,c,s,d,_,f,m,p,g,v=arguments;return Bt().w(function(t){for(;;)switch(t.n){case 0:if(i=v.length>1&&void 0!==v[1]?v[1]:"",a=v.length>2&&void 0!==v[2]?v[2]:0,l=null==e?void 0:e.account_id,u=null==e?void 0:e.limit,c=null==e||null===(n=e.copyright)||void 0===n?void 0:n.hide,s=null==e||null===(r=e.reel)||void 0===r?void 0:r.hide,d=null==e?void 0:e.order_by,_=null==e?void 0:e.tag,f=null==e?void 0:e.source,m=null===(o=window)||void 0===o||null===(o=o.qligg_frontend)||void 0===o||null===(o=o.restRoutePaths)||void 0===o?void 0:o[f]){t.n=1;break}throw new Error("Unknown source: ".concat(f));case 1:return p=It({account_id:l,limit:u,hide_items_with_copyright:c,hide_reels:s,after:i,pagination:a,order_by:d,tag:_}).toString(),g="".concat(m).concat(m.includes("?")?"&":"?").concat(p),t.n=2,Ot({url:g,method:"GET"});case 2:return t.a(2,t.v)}},t)})),te.apply(this,arguments)}Gt.Consumer;var ee=n(500),ne=n.n(ee);const re=function(t){var e=t.href,n=t.className,r=t.children,o=t.onClick,i=t.disabled;return S("a",{href:e,target:"blank",onClick:o,className:ne()("instagram-gallery__button",n,i&&"instagram-gallery__button--disabled")},r)};function oe(t,e){var n=t.tag,r=t.source,o=null==e?void 0:e.username;switch(r){case"username":return"https://www.instagram.com/".concat(o);case"tag":return"https://www.instagram.com/explore/tags/".concat(n);default:return"https://www.instagram.com"}}const ie=function(t){var e,n,r=t.userProfile,o=t.feedSettings,i=t.onClick,a=t.after,l=!(null==o||null===(e=o.button)||void 0===e||!e.display),u=!(null==o||null===(n=o.button_load)||void 0===n||!n.display);return S("div",{className:"instagram-gallery__actions"},l&&S(re,{feedSettings:o,href:oe(o,r),target:"blank",className:"instagram-gallery__button--follow"},S("i",{className:"qligg-icon-instagram "}),o.button.text),u&&S(re,{feedSettings:o,className:"instagram-gallery__button--load",disabled:""===a,onClick:i},o.button_load.text))},ae=function(){return S("div",{className:"instagram-gallery__spinner"})},le=function(t){var e=t.errorUserProfile,n=t.errorUserMediaList;return S("div",{className:"instagram-gallery__alert"},S("ul",null,e&&S("li",null,S("b",null,e.error),S("p",null,e.message)),n&&S("li",null,S("b",null,n.error),S("p",null,n.message))))};function ue(t,e){for(var n in e)t[n]=e[n];return t}function ce(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function se(t,e){this.props=t,this.context=e}function de(t,e){function n(t){var n=this.props.ref;return n!=t.ref&&n&&("function"==typeof n?n(null):n.current=null),e?!e(this.props,t)||n!=t.ref:ce(this.props,t)}function r(e){return this.shouldComponentUpdate=n,S(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=t,r}(se.prototype=new x).isPureReactComponent=!0,se.prototype.shouldComponentUpdate=function(t,e){return ce(this.props,t)||ce(this.state,e)};var _e=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),_e&&_e(t)};var fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var me=e.__e;e.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);me(t,e,n,r)};var pe=e.unmount;function ge(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=ue({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return ge(t,e,n)})),t}function ve(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return ve(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function ye(){this.__u=0,this.o=null,this.__b=null}function he(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function be(){this.i=null,this.l=null}e.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),pe&&pe(t)},(ye.prototype=new x).__c=function(t,e){var n=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=he(r.__v),i=!1,a=function(){i||r.__z||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var l=n.__P;n.__P=null;var u=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=ve(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.__P=l,e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},ye.prototype.componentWillUnmount=function(){this.o=[]},ye.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ge(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&S(O,null,t.fallback);return o&&(o.__u&=-33),[S(O,null,e.__a?null:t.children),o]};var we=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Se(t){return this.getChildContext=function(){return t.context},t.children}function ke(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){Z(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(t,n){this.childNodes.push(t),e.h.insertBefore(t,n)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.h.removeChild(t)}}}Z(S(Se,{context:e.context},t.__v),e.v)}(be.prototype=new x).__a=function(t){var e=this,n=he(e.__v),r=e.l.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),we(e,t,r)):o()};n?n(i):i()}},be.prototype.render=function(t){this.i=null,this.l=new Map;var e=q(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},be.prototype.componentDidUpdate=be.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){we(t,n,e)})};var Oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,xe=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ne=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ie=/[A-Z0-9]/g,Pe="undefined"!=typeof document,je=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};x.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(x.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ee=e.event;e.event=function(t){return Ee&&(t=Ee(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var Ae={configurable:!0,get:function(){return this.class}},Ce=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},o=-1==n.indexOf("-");for(var i in e){var a=e[i];if(!("value"===i&&"defaultValue"in e&&null==a||Pe&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||je(e.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":Ne.test(i)&&(i=l):l=i="oninput":o&&xe.test(i)?i=i.replace(Ie,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=a}}"select"==n&&(r.multiple&&Array.isArray(r.value)&&(r.value=q(e.children).forEach(function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)})),null!=r.defaultValue&&(r.value=q(e.children).forEach(function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value}))),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Ae)):e.className&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=Oe,Ce&&Ce(t)};var Te=e.__r;e.__r=function(t){Te&&Te(t),t.__c};var qe=e.diffed;function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Fe(Object(n),!0).forEach(function(e){De(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function De(t,e,n){return(e=function(t){var e=function(t){if("object"!=Me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Me(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.diffed=function(t){qe&&qe(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};const Ue=de(function(t){var e,n=t.feedSettings,r=Le(Le({},t.userProfile),function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&""!==t[n]&&(e[n]=t[n]);return e}(n.profile));return!(null==n||null===(e=n.profile)||void 0===e||!e.display)&&S("div",{className:"instagram-gallery__profile"},S("div",{className:"avatar"},S("img",{src:r.avatar||"http://2.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s=150&d=mm&r=g",alt:r.nickname})),S("div",{className:"info"},S("div",null,S("span",{className:"user"},"@",r.username),r.nickname&&S(O,null,S("span",{className:"separator"},"•"),S("span",{className:"user"},r.nickname)),S("span",{className:"separator"},"•"),S("a",{className:"follow",href:r.link,target:"_blank",rel:"noopener noreferrer"},r.link_text),!!r.website&&S(O,null,S("span",{className:"separator"},"•"),S("a",{className:"follow",href:r.website,target:"_blank",rel:"noopener noreferrer"},r.website_text)),S("div",{className:"description"},r.biography))))}),Re=function(t){var e=t.feedSettings,n=t.feedItem;return S(O,null,S("div",{className:"instagram-gallery-item__media-mask"}),"BUSINESS"==(null==n?void 0:n.user_type)&&S("div",{className:"instagram-gallery-item__media-mask--content"},!!e.mask.likes_count&&S("span",{className:"instagram-gallery-item__likes_count--mask"},S("i",{className:"qligg-icon-heart instagram-gallery-item__icon-heart"}),n.likes_count||0),!!e.mask.comments_count&&S("span",{className:"instagram-gallery-item__comments_count--mask"},S("i",{className:"qligg-icon-comment instagram-gallery-item__icon-bubble_chat"}),n.comments_count||0)))},Ge=function(t){var e=t.feedItem,n=t.feedSettings,r="CAROUSEL_ALBUM"===e.media_type&&"VIDEO"===e.media.type,o=null===e.media.url;return S("div",{className:"instagram-gallery-item__media-wrap"},o?S("img",{alt:"instagram",className:ne()("instagram-gallery-item__media"),src:n.copyright.placeholder?n.copyright.placeholder:e.media.thumbnail}):"VIDEO"===e.media_type||r?S("video",{alt:"instagram",poster:e.media.thumbnail,className:"instagram-gallery-item__media",src:e.media.url}):S("img",{alt:"instagram",className:"instagram-gallery-item__media",src:e.media.url}),n.mask.display&&S(Re,{feedItem:e,feedSettings:n}),"VIDEO"===e.media_type&&!o&&S("i",{className:"instagram-gallery-item__icon qligg-icon-video instagram-gallery-item__icon--views"}),"CAROUSEL_ALBUM"===e.media_type&&S("i",{className:"instagram-gallery-item__icon qligg-icon-gallery instagram-gallery-item__icon--views"}),!!e.share_url&&S("a",{className:"instagram-gallery-item__icon qligg-icon-instagram instagram-gallery-item__icon--link",href:e.share_url,target:"_blank",rel:"noreferrer"}))};var We=/<[^>]+>/g,He=/[\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFF66-\uFF9F]/,Ve=function(t){var e;return(null===(e=t.highlight.tag)||void 0===e?void 0:e.split(" ")).map(function(t){return t.includes("#")?t:t.split(" ").map(function(t){return"#"+t}).join(" ")})},Be=function(t,e){if(t){var n,r=t.replace(We,"");return(n=He.test(t)?r.split("",e).join(""):r.split(" ",e).join(" ")).length<t.length?"".concat(n,"..."):n}};const ze=de(function(t){var e=t.feedSettings,n=t.feedItem;return S("div",{className:"instagram-gallery-item__media-card"},S("div",{className:"instagram-gallery-item__info"},!!n.date&&S("span",{className:"instagram-gallery-item__date"},S("i",{className:"qligg-icon-date"}),n.date),"BUSINESS"==(null==n?void 0:n.user_type)&&S("div",{className:"instagram-gallery-item__icons"},!!e.card.likes_count&&S("span",{className:"instagram-gallery-item__likes_count"},S("i",{className:"qligg-icon-heart"}),n.likes_count||0),!!e.card.comments_count&&S("span",{className:"instagram-gallery-item__comments_count"},S("i",{className:"qligg-icon-comment"}),n.comments_count||0))),!!e.card.text_length&&!!n.media_description&&S("p",{className:"instagram-gallery-item__media_description"},Be(n.media_description,e.card.text_length)))});var Ze=/<[^>]+>/g;const $e=function(t){var e,n,r,o=t.index,i=t.length,a=t.feedSettings,l=t.feedItem,u=t.onClick,c=function(t,e,n){var r;if(!["highlight","highlight-square"].includes(t.layout))return!1;if(null==t||!t.highlight)return!1;for(var o in t.highlight){var i=t.highlight[o].split(",").map(function(t){return t.toString().trim()});switch(o){case"position":if(i.includes(n.toString()))return!0;break;case"id":if(i.includes(e.id))return!0;break;case"tag":if(null===(r=e.tags)||void 0===r?void 0:r.filter(function(e){return Ve(t).includes(e)}).length)return!0}}return!1}(a,l,o),s=function(t){return["carousel","carousel-vertical"].includes(t.layout)}(a),d=!(null!=a&&null!==(e=a.modal)&&void 0!==e&&e.display||null==l||!l.share_url);return S(d?"a":"div",{href:d?l.share_url:void 0,target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,className:ne()("instagram-gallery-item",s&&"swiper-slide",c&&"instagram-gallery-item--highlight","instagram-gallery-item--cols-".concat(a.columns)),"data-elementor-open-lightbox":"no","data-feed-item-index":o,onClick:u,onKeyDown:d?void 0:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),u(t))},tabIndex:d?void 0:0,role:d?void 0:"button","aria-label":(n="VIDEO"===l.media_type?"Video":"Image",r=l.media_description?": ".concat(l.media_description.replace(Ze,"")):"",r.length>100&&(r=r.substring(0,100)+"..."),"Instagram ".concat(n).concat(r))},S("div",{className:"instagram-gallery-item__wrap"},S(Ge,{index:o,feedItem:l,length:i,feedSettings:a}),a.card.display&&S(ze,{feedItem:l,feedSettings:a})))};window.React;const Je="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSItbXMtdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTsgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE2IDE3SDJsMy41LTQuNWwyLjUgM2wzLTMuODFBMiAyIDAgMCAxIDEwIDEwVjZIMmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNmgtNS43NXoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMTkgNGgtLjVWMi41YTIuNSAyLjUgMCAwIDAtNSAwVjRIMTNhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjVhMSAxIDAgMCAwLTEtMXptLTMgNGExIDEgMCAxIDEgMS0xYTEgMSAwIDAgMS0xIDF6bTEuNS00aC0zVjIuNzVDMTQuNSAyIDE0LjUgMSAxNiAxczEuNSAxIDEuNSAxLjc1eiIvPjwvc3ZnPgo=",Xe=function(t){var e=t.currentFeedItem,n=t.feedSettings,r=dt(null);return S("section",{className:"instagram-gallery-modal__media-container insta-gallery-slider-container"},S("div",{ref:r,className:"insta-gallery-slider"},e.children.map(function(t){return S("div",{key:t.id,className:"insta-gallery__media"},null===t.media.url?S("img",{className:ne()("instagram-gallery-modal__media",!n.copyright.placeholder&&"instagram-gallery-modal__media--placeholder"),src:n.copyright.placeholder?n.copyright.placeholder:Je,alt:t.media.alt}):"VIDEO"===t.media.type?S("video",{controls:!0,poster:t.media.thumbnail,className:"instagram-gallery-modal__media",src:t.media.url}):S("img",{className:"instagram-gallery-modal__media",src:t.media.url,alt:t.media.alt}))})),S("div",{className:"insta-gallery-slider__button-container"},S("span",{onClick:function(){if(r.current.children.length>0){var t=r.current.children.length-1,e=r.current.children[t];r.current.insertBefore(e,r.current.firstChild),r.current.style.transition="none";var n=r.current.children[0].offsetWidth;r.current.style.transform="translateX(-".concat(n,"px)"),setTimeout(function(){r.current.style.transition="200ms ease-out all",r.current.style.transform="translateX(0)"},30)}},className:"insta-gallery-slider__button insta-gallery-slider__button--left qligg-icon-prev"}),S("span",{onClick:function(){if(r.current.children.length>0){var t=r.current.children[0];r.current.style.transition="300ms ease-out all";var e=r.current.children[0].offsetWidth;r.current.style.transform="translateX(-".concat(e,"px)");var n=function(){r.current.style.transition="none",r.current.style.transform="translateX(0)",r.current.appendChild(t),r.current.removeEventListener("transitionend",n)};r.current.addEventListener("transitionend",n)}},className:"insta-gallery-slider__button insta-gallery-slider__button--right qligg-icon-next"})))},Ye=de(function(t){var e,n,r,o,i=t.currentFeedItem,a=t.feedSettings,l=!(null!=i&&null!==(e=i.media)&&void 0!==e&&e.url);switch(i.media_type){case"CAROUSEL_ALBUM":return S(Xe,{feedSettings:a,currentFeedItem:i});case"VIDEO":return S("section",{className:"instagram-gallery-modal__media-container"},l?S("img",{src:Je,alt:"thumbnail",className:"instagram-gallery-item__icon qligg-icon-video instagram-gallery-item__icon--views"}):S("video",{poster:i.media.thumbnail,src:i.media.url,controls:!0,className:"instagram-gallery-modal__media"}));default:return S("section",{className:"instagram-gallery-modal__media-container"},S("img",l?{src:null!==(n=null==i||null===(r=i.media)||void 0===r?void 0:r.thumbnail)&&void 0!==n?n:null==a||null===(o=a.copyright)||void 0===o?void 0:o.placeholder,className:"instagram-gallery-modal__media"}:{src:i.media.url,className:"instagram-gallery-modal__media"}))}});function Ke(t){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(t)}function Qe(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return tn(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],f=_.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=_.n<0)?u:n.call(r,_))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(tn(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,tn(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,tn(d,"constructor",c),tn(c,"constructor",u),u.displayName="GeneratorFunction",tn(c,o,"GeneratorFunction"),tn(d),tn(d,o,"Generator"),tn(d,r,function(){return this}),tn(d,"toString",function(){return"[object Generator]"}),(Qe=function(){return{w:i,m:_}})()}function tn(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}tn=function(t,e,n,r){function i(e,n){tn(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},tn(t,e,n,r)}function en(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return nn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function rn(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function on(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){rn(i,r,o,a,l,"next",t)}function l(t){rn(i,r,o,a,l,"throw",t)}a(void 0)})}}function an(t){return ln.apply(this,arguments)}function ln(){return(ln=on(Qe().m(function t(e){var n,r,o,i,a,l,u,c,s,d;return Qe().w(function(t){for(;;)switch(t.n){case 0:return r=e.account_id,o=e.media_id,i=e.limit,a=void 0===i?25:i,l=null===(n=window)||void 0===n||null===(n=n.qligg_frontend)||void 0===n?void 0:n.restRoutePaths.comments,u=It({account_id:r,media_id:o,limit:a}).toString(),c="".concat(l).concat(l.includes("?")?"&":"?").concat(u),t.n=1,Ot({url:c,method:"GET"});case 1:if(s=t.v,d=s.data,!Array.isArray(d)){t.n=2;break}return t.a(2,d);case 2:if(!d||"object"!==Ke(d)){t.n=3;break}return t.a(2,[d]);case 3:return t.a(2,[])}},t)}))).apply(this,arguments)}function un(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const cn=function(t){var e,n,r,o,i=t.currentFeedItem,a=t.userProfile,l=t.feedItemsNumber,u=t.feedSettings,c=Wt().currentFeedIndex,s=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return un(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?un(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ut(5),2),d=s[0],_=s[1],f=function(t){var e,n=t.feedSettings,r=t.currentFeedItem,o=t.maxRetries,i=void 0===o?2:o,a=t.retryDelay,l=void 0===a?1500:a,u=en(ut([]),2),c=u[0],s=u[1],d=en(ut(!1),2),_=d[0],f=d[1],m=en(ut(null),2),p=m[0],g=m[1];return null===(e=window)||void 0===e||null===(e=e.qligg_frontend)||void 0===e||e.restRoutePaths.comments,st(function(){var t;if((null==n||null===(t=n.modal)||void 0===t?void 0:t.comments_list)&&"BUSINESS"===(null==r?void 0:r.user_type)&&(null==r?void 0:r.id)&&(null==n?void 0:n.account_id)){var e=!0,o=function(){var t=on(Qe().m(function t(){var o;return Qe().w(function(t){for(;;)switch(t.n){case 0:return f(!0),s([]),g(null),o=function(){var t=on(Qe().m(function t(a){var u,c;return Qe().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,an({account_id:n.account_id,media_id:r.id});case 1:u=t.v,e&&(s(u),f(!1)),t.n=4;break;case 2:if(t.p=2,c=t.v,e){t.n=3;break}return t.a(2);case 3:a<i?setTimeout(function(){e&&o(a+1)},l):(g(c),f(!1));case 4:return t.a(2)}},t,null,[[0,2]])}));return function(e){return t.apply(this,arguments)}}(),t.n=1,o(0);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return o(),function(){e=!1}}},[null==r?void 0:r.id,null==n?void 0:n.account_id,i,l]),{comments:c,loading:_,error:p}}({feedSettings:u,currentFeedItem:i}),m=f.comments,p=f.loading,g=f.error,v=ft(function(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},[]),y=ft(function(){_(function(t){return t+5})},[]),h=m.slice(0,d),b=m.length>d,w="BUSINESS"===i.user_type;return S("section",{className:"instagram-gallery-modal__media-sidebar"},u.modal.profile&&a.username&&a.link&&S("div",{className:"instagram-gallery-modal__profile"},a.avatar&&S("img",{alt:null!==(e=a.nickname)&&void 0!==e?e:a.username,src:a.avatar}),S("div",null,S("span",null,null!==(n=a.nickname)&&void 0!==n?n:a.username),S("a",{href:a.link,title:null!==(r=a.nickname)&&void 0!==r?r:a.username,target:"_blank",rel:"noopener noreferrer","aria-label":"Visit ".concat(null!==(o=a.nickname)&&void 0!==o?o:a.username,"'s Instagram profile")},"@".concat(a.username)))),S("div",{className:"instagram-gallery-modal__icons"},S("span",{className:"instagram-gallery-modal__counter","aria-live":"polite"},"".concat(c+1," / ").concat(l)),S("a",{className:"instagram-gallery-modal__link",href:i.share_url,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Instagram"},S("i",{className:"qligg-icon-instagram","aria-hidden":"true"})," ","Instagram")),u.modal.media_description&&!!i.media_description&&S("div",{className:"instagram-gallery-modal__media_description"},S("p",{dangerouslySetInnerHTML:{__html:Be(i.media_description,u.modal.text_length)}})),(u.modal.likes_count||u.modal.comments_count)&&w&&S("div",{className:"instagram-gallery-modal__info"},u.modal.likes_count&&S("span",{className:"instagram-gallery-modal__likes_count"},S("i",{className:"qligg-icon-heart","aria-hidden":"true"}),i.likes_count||0),u.modal.comments_count&&S("span",{className:"instagram-gallery-modal__comments_count"},S("i",{className:"qligg-icon-comment","aria-hidden":"true"}),i.comments_count||0)),u.modal.comments_list&&w&&S("div",{className:"instagram-gallery-modal__comments-list"},S("p",null,S("b",null,"Comments")),p?S("p",{"aria-live":"polite"},"Loading comments..."):g?S("p",{className:"instagram-gallery-modal__error","aria-live":"assertive"},"Unable to load comments. Please try again later."):h.length>0?S(O,null,S("ul",null,h.map(function(t){return S("li",{key:t.id,className:"instagram-gallery-modal__comment"},S("div",{className:"instagram-gallery-modal__comment-header"},S("strong",null,t.username),S("span",{className:"instagram-gallery-modal__comment-time"},v(t.timestamp))),S("p",null,t.text),t.replies&&t.replies.length>0&&S("ul",{className:"instagram-gallery-modal__comment-replies"},t.replies.map(function(t){return S("li",{key:t.id,className:"instagram-gallery-modal__comment-reply"},S("div",{className:"instagram-gallery-modal__comment-header"},S("strong",null,t.username),S("span",{className:"instagram-gallery-modal__comment-time"},v(t.timestamp))),S("p",null,t.text))})))})),b&&S("button",{className:"instagram-gallery-modal__load-more",onClick:y,"aria-label":"Load more comments"},"Load more comments")):S("div",null,S("p",null,"No comments available for this post."),window.qligg_frontend&&window.qligg_frontend.QLIGG_DEVELOPER&&S("p",null,"Comment count in feed item:"," ",i.comments_count))))};var sn=["isPrevious","classname","onClick"];function dn(){return dn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},dn.apply(null,arguments)}const _n=function(t){var e=t.isPrevious,n=t.classname,r=t.onClick,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,sn);return S("span",dn({className:ne()("instagram-gallery-modal__button-arrow",n,e&&"qligg-icon-prev",!e&&"qligg-icon-next"),onClick:r,onKeyPress:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(t))},role:"button",tabIndex:"0"},o))};var fn=["onClick"];function mn(){return mn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},mn.apply(null,arguments)}const pn=function(t){var e=t.onClick,n=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,fn);return S("span",mn({className:"instagram-gallery-modal__button-close",onClick:e,onKeyPress:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e(t))},role:"button"},n))},gn=function(t){var e=t.children,n=t.id,r=Wt(),o=r.isOpen,i=r.setIsOpen;return o?S("div",{className:"instagram-gallery-modal__overlay",id:n,onClick:function(){return i(!1)},onKeyDown:function(t){"Escape"===t.key&&i(!1)},role:"dialog","aria-modal":"true",tabIndex:"-1"},e):null};function vn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const yn=function(t){var e=t.feedItems,n=t.feedSettings,r=t.userProfile,o=Wt(),i=o.currentFeedIndex,a=o.setCurrentFeedIndex,l=Wt(),u=l.setIsOpen,c=l.isOpen,s=dt(null),d=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return vn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ut(e[i]),2),_=d[0],f=d[1],m=!!e[i-1]||e.length>1,p=!!e[i+1]||e.length>1,g=ft(function(){m&&(e[i-1]?a(i-1):a(e.length-1))},[i,e,m,a]),v=ft(function(){p&&(e[i+1]?a(i+1):a(0))},[i,e,p,a]),y=ft(function(t){"ArrowLeft"===t.key?g():"ArrowRight"===t.key?v():"Escape"===t.key&&u(!1)},[g,v,u]);return st(function(){f(e[i])},[i,e]),st(function(){return document.addEventListener("keydown",y),s.current&&s.current.focus(),c&&(document.body.style.overflow="hidden"),function(){document.removeEventListener("keydown",y),document.body.style.overflow=""}},[y,c]),S(gn,{id:"instagram-gallery-modal-".concat(n.id)},S("div",{className:"instagram-gallery-modal",onClick:function(t){return t.stopPropagation()},ref:s,tabIndex:"-1","aria-modal":"true",role:"dialog","aria-label":"Instagram media viewer"},S("div",{className:"instagram-gallery-modal__options"},S("div",{className:"instagram-gallery-modal__options--arrows"},S(_n,{isPrevious:!0,onClick:function(t){t.stopPropagation(),g()},"aria-label":"Previous image",tabIndex:"0"}),S(_n,{next:!0,onClick:function(t){t.stopPropagation(),v()},"aria-label":"Next image",tabIndex:"0"})),S(pn,{onClick:function(){return u(!1)},"aria-label":"Close modal",tabIndex:"0"})),S("section",{className:ne()("instagram-gallery-modal__body","right"!==n.modal.modal_align&&"instagram-gallery-modal__body--sidebar-".concat(n.modal.modal_align))},S(Ye,{feedSettings:n,currentFeedItem:_}),S(cn,{feedSettings:n,currentFeedItem:_,userProfile:r,feedItemsNumber:e.length}))))};var hn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null==e||""===e?"":"".concat(t,": ").concat(e).concat(n,";")};function bn(){return bn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bn.apply(null,arguments)}const wn=function(t){function e(e){var n=ue({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=fe,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((Sn=function(t){var e,n=t.target.parentNode,r=t.masonryRef,o=t.userMediaList,i=t.feedSettings,a=t.className,l=t.userProfile,u=Wt(),c=u.currentFeedIndex,s=u.setCurrentFeedIndex,d=Wt().setIsOpen,_=!(null==i||null===(e=i.modal)||void 0===e||!e.display);return S(O,null,S("div",{ref:r,className:ne()("instagram-gallery-list",a),"data-feed_layout":i.layout},o.data.map(function(t,e){var n=o.data.length;return S($e,{key:t.id,index:e,length:n,feedItem:t,feedSettings:i,onClick:function(){_&&(s(e),d(!0))}})})),_&&function(t,e){var n=S(ke,{__v:t,h:e});return n.containerInfo=e,n}(S(yn,{userProfile:l,feedSettings:i,currentFeedIndex:c,feedItems:o.data}),n))},function(t,e){var n,r,o,i,a,l,u,c,s,d,_,f,m,p,g,v,y,h=t.feedSettings,b=h.responsive||{desktop:{columns:h.columns||3,spacing:h.spacing||10},tablet:{columns:2,spacing:8},mobile:{columns:1,spacing:6},breakpoints:{tablet:768,mobile:480}},w=(null===(n=b.breakpoints)||void 0===n?void 0:n.tablet)||768,k=(null===(r=b.breakpoints)||void 0===r?void 0:r.mobile)||480,x=!(null===(o=h.box)||void 0===o||!o.display),N=!(null===(i=h.card)||void 0===i||!i.display),I="carousel"===h.layout,P=!(null===(a=h.mask)||void 0===a||!a.display),j=!(null===(l=h.button)||void 0===l||!l.display),E=!(null===(u=h.button_load)||void 0===u||!u.display),A="instagram-gallery-feed-".concat(h.id),C="instagram-gallery-modal-".concat(h.id);return S(O,null,S("style",null,"\n\t\t\t\t\t#".concat(C," {\n\t\t\t\t\t\t").concat(hn("--qligg-modal-text-align",(null===(c=h.modal)||void 0===c?void 0:c.text_align)||"left"),"\n\t\t\t\t\t\t").concat(hn("--qligg-modal-font-size",(null===(s=h.modal)||void 0===s?void 0:s.font_size)||14,"px"),"\n\t\t\t\t\t\t--qligg-modal-body-height: 75vh;\n\t\t\t\t\t\t--qligg-modal-body-width: 75vw;\n\t\t\t\t\t\t--qligg-modal-sidebar-width: 360px;\n\t\t\t\t\t\t--qligg-modal-button-size: 40px;\n\t\t\t\t\t\t--qligg-modal-comments-height: 400px;\n\t\t\t\t\t\t--qligg-modal-border-color: #eeeeee;\n\t\t\t\t\t\t--qligg-modal-border-color-dark: #dddddd;\n\t\t\t\t\t\t--qligg-modal-button-border: #efefef;\n\t\t\t\t\t\t--qligg-modal-button-hover: #fafafa;\n\t\t\t\t\t\t--qligg-modal-error-color: #e74c3c;\n\t\t\t\t\t}\n\t\t\t\t")),S("style",null,"\n\t\t\t\t\t\t#".concat(A," {\n\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(d=b.desktop)||void 0===d?void 0:d.columns)||3,";\n\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(_=b.desktop)||void 0===_?void 0:_.spacing)||10,"px;\n\t\t\t\t\t\t\t--qligg-item-width: calc(100% / var(--qligg-columns));\n\t\t\t\t\t\t\t--qligg-aspect-ratio: ").concat((null===(f=h.aspect_ratio)||void 0===f?void 0:f.width)||1," / ").concat((null===(m=h.aspect_ratio)||void 0===m?void 0:m.height)||1,";\n\t\t\t\t\t\t\t").concat(x?hn("--qligg-box-bg",h.box.background):"","\n\t\t\t\t\t\t\t").concat(x?hn("--qligg-box-color",h.box.text_color):"","\n\t\t\t\t\t\t\t").concat(x?hn("--qligg-box-radius",h.box.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(x?hn("--qligg-box-padding",h.box.padding,"px"):"","\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Feed card settings */\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-bg",h.card.background):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-bg-hover",h.card.background_hover):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-color",h.card.text_color):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-font-size",h.card.font_size,"px"):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-padding",h.card.padding,"px"):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-radius",h.card.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(N&&h.card.boxed?hn("--qligg-card-boxed","1px solid #f5f5f5"):"","\n\t\t\t\t\t\t\t").concat(N&&h.card.boxed?hn("--qligg-card-shadow","0 1px 3px rgba(0,0,0,0.05)"):"","\n\t\t\t\t\t\t\t").concat(N&&h.card.boxed?hn("--qligg-card-shadow-hover","0 3px 10px rgba(0,0,0,0.06)"):"","\n\t\t\t\t\t\t\t").concat(N?hn("--qligg-card-text-align",h.card.text_align||"left"):"","\n\t\t\t\t\t\t\t").concat(P?hn("--qligg-mask-bg",h.mask.background):"","\n\t\t\t\t\t\t\t").concat(P?hn("--qligg-mask-icon-color",h.mask.icon_color||"#ffffff"):"","\n\t\t\t\t\t\t\t").concat(I?hn("--qligg-carousel-arrow-color",h.carousel.navarrows_color):"","\n\t\t\t\t\t\t\t").concat(I?hn("--qligg-carousel-pagination-color",h.carousel.pagination_color):"","\n\t\t\t\t\t\t\t").concat(j?hn("--qligg-button-color",h.button.text_color):"","\n\t\t\t\t\t\t\t").concat(j?hn("--qligg-button-bg",h.button.background):"","\n\t\t\t\t\t\t\t").concat(j?hn("--qligg-button-bg-hover",h.button.background_hover):"","\n\t\t\t\t\t\t\t").concat(E?hn("--qligg-load-button-color",h.button_load.text_color):"","\n\t\t\t\t\t\t\t").concat(E?hn("--qligg-load-button-bg",h.button_load.background):"","\n\t\t\t\t\t\t\t").concat(E?hn("--qligg-load-button-bg-hover",h.button_load.background_hover):"","\n\t\t\t\t\t\t}\n\t\t\t\t\t")),S("style",null,"\n\t\t\t\t\t\t@media (max-width: ".concat(w,"px) {\n\t\t\t\t\t\t\t#").concat(A," {\n\t\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(p=b.tablet)||void 0===p?void 0:p.columns)||2,";\n\t\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(g=b.tablet)||void 0===g?void 0:g.spacing)||8,"px;\n\t\t\t\t\t\t\t\t--qligg-mask-icon-size: 26px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," {\n\t\t\t\t\t\t\t\t--qligg-modal-body-height: 80vh;\n\t\t\t\t\t\t\t\t--qligg-modal-body-width: 80vw;\n\t\t\t\t\t\t\t\t--qligg-modal-sidebar-width: 100%;\n\t\t\t\t\t\t\t\t--qligg-modal-button-size: 36px;\n\t\t\t\t\t\t\t\t--qligg-modal-comments-height: 250px;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__body {\n\t\t\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__media-sidebar {\n\t\t\t\t\t\t\t\tmax-height: 40vh;\n\t\t\t\t\t\t\t\tborder-left: none;\n\t\t\t\t\t\t\t\tborder-top: 1px solid #f5f5f5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__media-container {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\toverflow: visible;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-close:before, \n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-close:after {\n\t\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t")),S("style",null,"\n\t\t\t\t\t\t@media (max-width: ".concat(k,"px) {\n\t\t\t\t\t\t\t#").concat(A," {\n\t\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(v=b.mobile)||void 0===v?void 0:v.columns)||1,";\n\t\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(y=b.mobile)||void 0===y?void 0:y.spacing)||6,"px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," {\n\t\t\t\t\t\t\t\t--qligg-modal-body-height: 85vh;\n\t\t\t\t\t\t\t\t--qligg-modal-body-width: 90vw;\n\t\t\t\t\t\t\t\t--qligg-modal-sidebar-width: 100%;\n\t\t\t\t\t\t\t\t--qligg-modal-button-size: 32px;\n\t\t\t\t\t\t\t\t--qligg-modal-comments-height: 200px;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-arrow {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tfont-size: 1rem;\n\t\t\t\t\t\t\t\ttop: auto;\n\t\t\t\t\t\t\t\tleft: auto;\n\t\t\t\t\t\t\t\tright: auto;\n\t\t\t\t\t\t\t\tbottom: auto;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t")),S(Sn,bn({},t,{forwardRef:e})))}));var Sn;function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},kn.apply(null,arguments)}function On(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const xn=function(t){var e,n,r,o=t.target,i=t.userMediaList,a=t.feedSettings,l=t.calculateWidth,u=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return On(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?On(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ut(!0),2),c=u[0],s=u[1],d=(Wt().isImageLoad,dt(null)),_=dt(null),f=dt(new Set),m=dt(0),p=ft(function(){_.current&&clearTimeout(_.current),_.current=setTimeout(function(){d.current&&d.current.layout()},100)},[]),g=ft(function(t){f.current.add(t),p(),f.current.size>=m.current&&m.current>0&&(s(!1),o.classList.add("loaded"))},[p,o]),v=(e=function(t){var e=t.ownerDocument.defaultView;if(e.Masonry){var n={itemSelector:".instagram-gallery-item",isResizable:!0,isAnimated:!1,transitionDuration:0,percentPosition:!0,gutter:0};n.columnWidth=l&&"function"==typeof l?l(t,a):".instagram-gallery-item";var r=new e.Masonry(t,n);d.current=r;var i=t.querySelectorAll(".instagram-gallery-item__media");m.current=i.length,f.current.clear(),i.forEach(function(t,e){var n="media-".concat(e),r=function(){g(n),t.removeEventListener("load",r),t.removeEventListener("loadeddata",r),t.removeEventListener("canplay",r),t.removeEventListener("error",r)};"IMG"===t.tagName?t.complete&&0!==t.naturalWidth?g(n):(t.addEventListener("load",r),t.addEventListener("error",r)):"VIDEO"===t.tagName&&(t.readyState>=3?g(n):(t.addEventListener("loadeddata",r),t.addEventListener("canplay",r),t.addEventListener("error",r)))}),0===m.current&&(s(!1),o.classList.add("loaded"));var u=new e.MutationObserver(function(t){var e=!1;t.forEach(function(t){"childList"===t.type&&t.addedNodes.length>0&&(e=!0)}),e&&p()}),c=t.querySelector(".instagram-gallery-item__wrap")||t;return u.observe(c,{childList:!0,subtree:!0}),setTimeout(function(){r.layout()},50),function(){_.current&&clearTimeout(_.current),u.disconnect(),r.destroy(),d.current=null}}},n=[i,g,p,o,l,a],r=dt(),ft(function(t){t?r.current=e(t):r.current&&r.current()},n));return S(O,null,c&&S(ae,null),S(wn,kn({},t,{masonryRef:v})))};function Nn(t){return Nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nn(t)}function In(){return In=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},In.apply(null,arguments)}function Pn(t,e,n){return(e=function(t){var e=function(t){if("object"!=Nn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Nn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const jn=function(t){var e=t.userMediaList,n=t.feedSettings,r=Wt().setCurrentFeedIndex,o=Wt().setIsOpen,i=ft(function(t){if(t){var e,i,a,l,u,c,s,d,_,f,m=document.defaultView;if(!m.Swiper)return;new m.Swiper(t,{slideClass:"instagram-gallery-item",loop:!0,loopedSlidesLimit:!1,centeredSlides:n.carousel.centered_slides,allowTouchMove:!1,slidesPerView:(null===(e=n.responsive)||void 0===e||null===(e=e.desktop)||void 0===e?void 0:e.columns)||n.carousel.slidespv||n.columns||3,spaceBetween:(null===(i=n.responsive)||void 0===i||null===(i=i.desktop)||void 0===i?void 0:i.spacing)||n.spacing||10,autoplay:n.carousel.autoplay&&{delay:n.carousel.autoplay_interval},pagination:{el:t.querySelector(".swiper-pagination"),dynamicBullets:!0,clickable:!0,type:"bullets"},navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},breakpoints:Pn(Pn({0:{slidesPerView:(null===(a=n.responsive)||void 0===a||null===(a=a.mobile)||void 0===a?void 0:a.columns)||1,spaceBetween:(null===(l=n.responsive)||void 0===l||null===(l=l.mobile)||void 0===l?void 0:l.spacing)||6}},(null===(u=n.responsive)||void 0===u||null===(u=u.breakpoints)||void 0===u?void 0:u.mobile)||480,{slidesPerView:(null===(c=n.responsive)||void 0===c||null===(c=c.tablet)||void 0===c?void 0:c.columns)||2,spaceBetween:(null===(s=n.responsive)||void 0===s||null===(s=s.tablet)||void 0===s?void 0:s.spacing)||8}),(null===(d=n.responsive)||void 0===d||null===(d=d.breakpoints)||void 0===d?void 0:d.tablet)||768,{slidesPerView:(null===(_=n.responsive)||void 0===_||null===(_=_.desktop)||void 0===_?void 0:_.columns)||3,spaceBetween:(null===(f=n.responsive)||void 0===f||null===(f=f.desktop)||void 0===f?void 0:f.spacing)||10})}),t.addEventListener("click",function(t){(t.target.classList.contains(".swiper-slide-duplicate")||t.target.closest(".swiper-slide-duplicate"))&&(o(!0),r(Number(t.target.closest(".swiper-slide-duplicate").dataset.feedItemIndex)))})}},[e,n]);return S("div",{ref:i,className:"swiper-container"},S(wn,In({className:"swiper-wrapper instagram-gallery-square"},t)),n.carousel.pagination&&S("div",{className:"swiper-pagination"}),n.carousel.navarrows&&S(O,null,S("div",{tabIndex:"1",className:"swiper-button-prev"}),S("div",{tabIndex:"1",className:"swiper-button-next"})))};function En(){return En=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},En.apply(null,arguments)}const An=function(t){var e=dt();return S(wn,En({ref:e,className:"instagram-gallery-square"},t))},Cn=function(t){switch(t.feedSettings.layout){case"masonry":case"highlight":return S(xn,t);case"carousel":return S(jn,t);default:return S(An,t)}},Tn=function(t){var e,n,r=t.target,o=t.feedSettings,i=function(t){var e=t.account_id,n=Et(ut(!0),2),r=n[0],o=n[1],i=Et(ut(null),2),a=i[0],l=i[1],u=Et(ut(null),2),c=u[0],s=u[1];return st(function(){var e=function(){var e=Tt(Pt().m(function e(){var n,r;return Pt().w(function(e){for(;;)switch(e.p=e.n){case 0:return o(!0),e.p=1,e.n=2,qt(t);case 2:n=e.v,l(n),o(!1),e.n=4;break;case 3:e.p=3,r=e.v,o(!1),s(r);case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}();e()},[e]),{isLoading:r,userProfile:a,error:c}}(o),a=i.isLoading,l=i.userProfile,u=i.error,c=function(t){var e=t.source,n=t.limit,r=t.account_id,o=t.tag,i=t.order_by,a=t.copyright,l=t.reel,u=Wt().counter,c=$t(ut(!0),2),s=c[0],d=c[1],_=$t(ut(!1),2),f=_[0],m=_[1],p=$t(ut({paging:{next:null,prev:null},data:[]}),2),g=p[0],v=p[1],y=$t(ut(""),2),h=y[0],b=y[1],w=$t(ut(null),2),S=w[0],k=w[1];return st(function(){k(null);var e=function(){var e=Kt(Bt().m(function e(){var n,r;return Bt().w(function(e){for(;;)switch(e.p=e.n){case 0:return 0===u?d(!0):m(!0),e.p=1,e.n=2,Qt(t,h,u);case 2:n=e.v,v(0===u?{paging:null==n?void 0:n.paging,data:null==n?void 0:n.data}:{paging:null==n?void 0:n.paging,data:[].concat(Zt(null==g?void 0:g.data),Zt(null==n?void 0:n.data))}),d(!1),m(!1),e.n=4;break;case 3:e.p=3,r=e.v,d(!1),m(!1),k(r);case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}();e()},[n,i,r,e,o,null==a?void 0:a.hide,null==l?void 0:l.hide,u]),{isLoading:s,isLoadingMore:f,userMediaList:g,error:S,setAfter:b}}(o),s=c.isLoading,d=c.isLoadingMore,_=c.userMediaList,f=c.error,m=c.setAfter,p=a||s,g=u||f,v=Wt(),y=v.counter,h=v.setCounter;return st(function(){p||["masonry","highlight"].includes(o.layout)||r.classList.add("loaded")},[p]),p?S(ae,null):g?S(le,{errorUserProfile:u,errorUserMediaList:f}):S(O,null,!(null==o||null===(e=o.profile)||void 0===e||!e.display)&&S(Ue,{feedSettings:o,userProfile:l}),S(Cn,{target:r,feedSettings:o,userMediaList:_,userProfile:l}),d&&S(ae,null),S(ie,{userProfile:l,feedSettings:o,onClick:function(t){t.preventDefault(),m(_.paging.next),h(y+1)},after:null==_||null===(n=_.paging)||void 0===n?void 0:n.next}))};var qn,Mn,Fn,Ln=new WeakMap;function Dn(t){var e,n;if(t){var r={};try{r=JSON.parse(t.dataset.feed||"{}")}catch(t){return void console.warn("Invalid JSON in data-feed:",t)}if(null!==(e=r)&&void 0!==e&&e.account_id)if(null!==(n=r)&&void 0!==n&&n.source){var o=t.querySelector(".instagram-gallery-feed");o||((o=document.createElement("div")).className="instagram-gallery-feed",t.appendChild(o)),Ln.has(o)&&Z(null,o),Z(S(O,null,S(Vt,null,S(Tn,{target:t,feedSettings:r}))),o),Ln.set(o,!0)}else console.warn("Missing source:",r);else console.warn("Missing account_id:",r)}}function Un(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll(".instagram-gallery-feed");Array.from(t).forEach(Dn)}null!==(qn=window.elementorFrontend)&&void 0!==qn&&null!==(Mn=qn.isEditMode)&&void 0!==Mn&&Mn.call(qn)||Un(),window.qliggFrontend={init:Un,renderFeed:Dn},null!==(Fn=window.elementorFrontend)&&void 0!==Fn&&Fn.hooks&&window.elementorFrontend.hooks.addAction("frontend/element_ready/instagram_feed.default",function(t){return Un((null==t?void 0:t[0])||t)})})()})();