HEX
Server: Apache
System: Linux server 5.4.0-56-generic #62-Ubuntu SMP Mon Nov 23 19:20:19 UTC 2020 x86_64
User: losadagest (10000)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/aceitunaslosada.com/insta-gallery/assets/backend/js/gutenberg.js
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)a.d(n,l,function(t){return e[t]}.bind(null,l));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=24)}([function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.components}()},function(e,t){e.exports=function(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}},function(e,t){!function(){e.exports=this.jQuery}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.lodash}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){function a(t){return e.exports=a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(t)}e.exports=a},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function a(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}},function(e,t,a){var n=a(17);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},function(e,t,a){var n=a(18),l=a(7);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?l(e):t}},function(e,t){!function(){e.exports=this.wp.serverSideRender}()},function(e,t,a){var n=a(19),l=a(20),r=a(21),o=a(23);e.exports=function(e,t){return n(e)||l(e,t)||r(e,t)||o()}},function(e,t,a){var n;
/*!
  Copyright (c) 2017 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/!function(){"use strict";var a={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)&&n.length){var o=l.apply(null,n);o&&e.push(o)}else if("object"===r)for(var i in n)a.call(n,i)&&n[i]&&e.push(i)}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function a(t,n){return e.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(t,n)}e.exports=a},function(e,t){function a(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=a=function(e){return typeof e}:e.exports=a=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(t)}e.exports=a},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var a=[],n=!0,l=!1,r=void 0;try{for(var o,i=e[Symbol.iterator]();!(n=(o=i.next()).done)&&(a.push(o.value),!t||a.length!==t);n=!0);}catch(e){l=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(l)throw r}}return a}}},function(e,t,a){var n=a(22);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?n(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}},function(e,t){e.exports=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(e,t,a){"use strict";a.r(t);a(25);var n=a(9),l=a.n(n),r=a(10),o=a.n(r),i=a(7),c=a.n(i),s=a(11),u=a.n(s),g=a(12),p=a.n(g),b=a(8),d=a.n(b),m=a(1),f=a(6),y=a(4),_=a.n(y),h=a(13),O=a.n(h),j=a(0),v=a(2),C=a(3),x=a.n(C),E=a(14),k=a.n(E),w=a(15),P=a.n(w),I=a(5);function q(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function T(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?q(Object(a),!0).forEach((function(t){x()(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var B=function(e){var t=e.attributes,a=e.setAttributes,n=Object(m.useState)({name:!0,biography:!0,picture:!0}),l=k()(n,2),r=l[0],o=l[1],i=qligg_gutenberg.image_url,c=qligg_gutenberg.accounts;return Object(m.createElement)(I.InspectorControls,{key:"inspector"},Object(m.createElement)(v.PanelBody,{initialOpen:!0,title:Object(j.__)("General","insta-gallery")},Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),help:Object(j.__)("Please select Instagram account","insta-gallery"),value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(c,(function(e,t){return{value:e.id,label:Object(j.__)(e.name,"insta-gallery")}}))}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Feed","insta-gallery"),value:t.type,onChange:function(e){return a({type:e})},options:[{value:"tag",label:Object(j.__)("Tag","insta-gallery")},{value:"username",label:Object(j.__)("Username","insta-gallery")}]}),"tag"==t.type&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Tag","insta-gallery"),help:Object(j.__)("Please enter Instagram tag","insta-gallery"),value:t.tag,onChange:function(e){return a({tag:e})}}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Order by","insta-gallery"),help:Object(j.__)("Please enter Instagram tag order","insta-gallery"),value:t.order_by,onChange:function(e){return a({order_by:e})},options:[{value:"recend_media",label:Object(j.__)("Recent (Within 24 hours)","insta-gallery")},{value:"top_media",label:Object(j.__)("Top (Most popular first)","insta-gallery")}]})),Object(m.createElement)(m.Fragment,null,Object(m.createElement)("ul",{className:"qligg-list-videos"},Object(f.map)(["carousel","gallery","masonry","highlight"],(function(e,n){return Object(m.createElement)("li",{className:P()("qligg-modal-image",t.layout==e&&"active","carousel"!==e&&"gallery"!==e&&"qligg-premium-field"),onClick:function(){return a({layout:e})}},Object(m.createElement)("span",null,e.replace("-"," ")),Object(m.createElement)("img",{src:"".concat(i,"/").concat(e,".png")}))})))),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Limit","insta-gallery"),help:Object(j.__)("Number of videos to display","insta-gallery"),value:t.limit,onChange:function(e){a({limit:e})},min:1,max:33}),"carousel"!=t.layout&&Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Columns","insta-gallery"),help:Object(j.__)("Number of videos in a row","insta-gallery"),value:t.columns,onChange:function(e){return a({columns:e})},min:1,max:20}),"highlight"==t.layout&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by tag","insta-gallery"),help:Object(j.__)("highlightfeeds items with this tags","insta-gallery"),value:t.highlight.tag,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"tag",e))})}}),Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by id","insta-gallery"),help:Object(j.__)(" highlight by id","insta-gallery"),value:t.highlight.id,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"id",e))})}}),Object(m.createElement)(v.TextControl,{label:Object(j.__)(" highlight by position","insta-gallery"),help:Object(j.__)("highlightfeeds items in this positions","insta-gallery"),value:t.highlight.position,onChange:function(e){return a({highlight:T(T({},t.highlight),{},x()({},"position",e))})}}))),"carousel"==t.layout&&Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Carousel","insta-gallery")},Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Slides per view","insta-gallery"),help:Object(j.__)("Number of images per slide","insta-gallery"),value:t.carousel.slidespv,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"slidespv",e))})},min:1,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Autoplay","insta-gallery"),help:Object(j.__)("Autoplay carousel items","insta-gallery"),checked:!!t.carousel.autoplay,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay",e))})}}),t.carousel.autoplay&&Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Autoplay Interval","insta-gallery"),help:Object(j.__)("Moves to next picture after specified time interval","insta-gallery"),value:t.carousel.autoplay_interval,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"autoplay_interval",e))})},min:1,max:1e4}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Navigation","insta-gallery"),help:Object(j.__)("Display navigation arrows","insta-gallery"),checked:!!t.carousel.navarrows,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows",e))})}}),t.carousel.navarrows&&Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Navigation color","insta-gallery"),help:Object(j.__)("Change navigation arrows color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.carousel.navarrows_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"navarrows_color",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Pagination","insta-gallery"),help:Object(j.__)("Display pagination dots","insta-gallery"),checked:!!t.carousel.pagination,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination",e))})}}),t.carousel.pagination&&Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Pagination color","insta-gallery"),help:Object(j.__)("Change pagination dots color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.carousel.pagination_color,onChange:function(e){return a({carousel:T(T({},t.carousel),{},x()({},"pagination_color",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Profile","insta-gallery")},Object(m.createElement)(v.TextControl,{label:Object(j.__)("Full name","insta-gallery"),help:Object(j.__)("Feed profile full name","insta-gallery"),value:!t.profile.name&&r.name&&c[t.username].name||t.profile.name,onChange:function(e){o(T(T({},r),{},x()({},"name",!1))),a({profile:T(T({},t.profile),{},x()({},"name",e))})}}),Object(m.createElement)(v.TextareaControl,{label:Object(j.__)("Biography","insta-gallery"),help:Object(j.__)("Feed profile biography","insta-gallery"),value:!t.profile.biography&&r.biography&&c[t.username].biography||t.profile.biography,onChange:function(e){o(T(T({},r),{},x()({},"biography",!1))),a({profile:T(T({},t.profile),{},x()({},"biography",e))})}}),Object(m.createElement)(m.Fragment,null,Object(m.createElement)("img",{style:{objectFit:"cover",width:"230px",height:"230px"},src:!t.profile.profile_picture_url&&r.picture&&c[t.username].profile_picture_url||t.profile.profile_picture_url}),Object(m.createElement)(I.MediaUpload,{onSelect:function(e){o(T(T({},r),{},x()({},"picture",!1))),a({profile:T(T({},t.profile),{},x()({},"profile_picture_url",e.url))})},allowedTypes:["image"],value:t.profile.profile_picture_url,render:function(e){var t=e.open;return Object(m.createElement)(v.Button,{onClick:t},Object(j.__)("Upload","insta-gallery"))}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Box","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Box","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display the Instagram Feed inside a customizable box","insta-gallery"),checked:!!t.box.display,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"display",e))})}}),t.box.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Box padding","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Add padding to the Instagram Feed","insta-gallery"),value:t.box.padding,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"padding",e))})},min:1,max:100}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Border Radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.box.radius,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"radius",e))})},min:0,max:100}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Box background","insta-gallery"),help:Object(j.__)("Color which is displayed on box background","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.box.background,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Box text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed on box text","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.box.color_text,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"color_text",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Profile","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display user profile or tag info","insta-gallery"),checked:!!t.box.profile,onChange:function(e){return a({box:T(T({},t.box),{},x()({},"profile",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image","insta-gallery")},Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Account","insta-gallery"),value:t.resolution,onChange:function(e){return a({resolution:e})},options:[{value:"madium",label:Object(j.__)("Medium (320 x auto)","insta-gallery")},{value:"small",label:Object(j.__)("Small (150 x 150)","insta-gallery")}]}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Images spacing","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),value:t.spacing,onChange:function(e){return a({spacing:e})},min:0,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images lazy load","insta-gallery"),help:Object(j.__)("Defers feed images loading","insta-gallery"),checked:!!t.lazy,onChange:function(e){return a({lazy:e})}})),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image card","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images card","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display card gallery by clicking on image","insta-gallery"),checked:!!t.card.display,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"display",e))})}}),t.card.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card radius","insta-gallery"),help:Object(j.__)("Add radius to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.radius,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"radius",e))})},min:0,max:100}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card font size","insta-gallery"),help:Object(j.__)("Add font-size to the Instagram Feed","insta-gallery"),className:"qligg-premium-field",value:t.card.font_size,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"font_size",e))})},min:0,max:100}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Card background","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color which is displayed when over images","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.card.background,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Card text color","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Color Text","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.card.text_color,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"text_color",e))})}})),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card padding","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.padding,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"padding",e))})},min:0,max:100}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Card info","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.card.info,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"info",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Card caption","insta-gallery"),className:"qligg-premium-field",help:Object(j.__)("Display caption count of images","insta-gallery"),checked:!!t.card.caption,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"caption",e))})}}),Object(m.createElement)(v.RangeControl,{label:Object(j.__)("Card length","insta-gallery"),help:Object(j.__)("Add blank space between images","insta-gallery"),className:"qligg-premium-field",value:t.card.length,onChange:function(e){return a({card:T(T({},t.card),{},x()({},"length",e))})},min:0,max:100}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image mask","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask","insta-gallery"),help:Object(j.__)("Image mouseover effect","insta-gallery"),checked:!!t.mask.display,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"display",e))})}}),t.mask.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Images mask color","insta-gallery"),help:Object(j.__)("Image mask background color","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.mask.background,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"background",e))})}})),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),checked:!!t.mask.likes,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"likes",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images mask comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),checked:!!t.mask.comments,onChange:function(e){return a({mask:T(T({},t.mask),{},x()({},"comments",e))})}}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Image popup","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup","insta-gallery"),help:Object(j.__)("Display popup gallery by clicking on image","insta-gallery"),checked:!!t.popup.display,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"display",e))})}}),t.popup.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup profile","insta-gallery"),help:Object(j.__)("Display user profile or tag info","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.profile,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"profile",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup caption","insta-gallery"),help:Object(j.__)("Display caption in the popup","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.caption,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"caption",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup likes","insta-gallery"),help:Object(j.__)("Display likes count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.likes,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"likes",e))})}}),Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Images popup comments","insta-gallery"),help:Object(j.__)("Display comments count of images","insta-gallery"),className:"qligg-premium-field",checked:!!t.popup.comments,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"comments",e))})}}),Object(m.createElement)(v.SelectControl,{label:Object(j.__)("Images popup align","insta-gallery"),help:Object(j.__)("Align item description in popup","insta-gallery"),className:"qligg-premium-field",value:t.popup.align,onChange:function(e){return a({popup:T(T({},t.popup),{},x()({},"align",e))})},options:[{value:"left",label:Object(j.__)("Left","insta-gallery")},{value:"right",label:Object(j.__)("Right","insta-gallery")},{value:"bottom",label:Object(j.__)("Bottom","insta-gallery")},{value:"top",label:Object(j.__)("Top","insta-gallery")}]}))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),checked:!!t.button.display,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"display",e))})}}),t.button.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),value:t.button.text,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"text",e))})}}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.button.background,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery")},Object(m.createElement)(I.ColorPalette,{value:t.button.background_hover,onChange:function(e){return a({button:T(T({},t.button),{},x()({},"background_hover",e))})}})))),Object(m.createElement)(v.PanelBody,{initialOpen:!1,title:Object(j.__)("Botton load more","insta-gallery")},Object(m.createElement)(v.ToggleControl,{label:Object(j.__)("Instagram button","insta-gallery"),help:Object(j.__)("Display the button to open Instagram site link","insta-gallery"),className:"qligg-premium-field",checked:!!t.button_load.display,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"display",e))})}}),t.button_load.display&&Object(m.createElement)(m.Fragment,null,Object(m.createElement)(v.TextControl,{label:Object(j.__)("Instagram button text","insta-gallery"),help:Object(j.__)("Instagram button text here","insta-gallery"),className:"qligg-premium-field",value:t.button_load.text,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"text",e))})}}),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button background","insta-gallery"),help:Object(j.__)("Color which is displayed on button background","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.button_load.background,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background",e))})}})),Object(m.createElement)(v.BaseControl,{label:Object(j.__)("Instagram button hover background","insta-gallery"),help:Object(j.__)("Color which is displayed when hovered over button","insta-gallery"),className:"qligg-premium-field"},Object(m.createElement)(I.ColorPalette,{value:t.button_load.background_hover,onChange:function(e){return a({button_load:T(T({},t.button_load),{},x()({},"background_hover",e))})}})))))},N=(a(27),0),S={};function D(e,t){var a=_()(".insta-gallery-list",e),n=_()(".insta-gallery-spinner",e),l=e.data("feed");_.a.ajax({url:qligg.ajax_url,type:"post",timeout:3e4,data:{action:"qligg_load_item_images",next_max_id:t,feed:JSON.stringify(l)},beforeSend:function(){n.show()},success:function(e){if(!0!==e.success)return a.append(_()(e.data)),void n.hide();var t=_()(e.data);a.append(t).trigger("qligg.loaded",[t])},complete:function(){},error:function(e,t){n.hide()}})}function A(){_()(".insta-gallery-feed").on("qligg.loaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a),l=_()(".insta-gallery-spinner",a),r=_()(".insta-gallery-button.load",a),o=a.data("feed"),i=_()(t).length,c=0;i&&n.find(".insta-gallery-image").on("load loadstart",(function(e){("loadstart"==e.type&&"VIDEO"==_()(e.target).prop("tagName")||"load"==e.type&&"IMG"==_()(e.target).prop("tagName"))&&c++,c>=i&&n.trigger("qligg.imagesLoaded",[t])})),i<o.limit&&(l.hide(),setTimeout((function(){r.fadeOut()}),300))})),_()(".insta-gallery-feed").on("qligg.imagesLoaded",(function(e){var t=_()(e.delegateTarget);_()(".insta-gallery-spinner",t).hide()})),_()(".insta-gallery-feed[data-feed_layout=gallery]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){setTimeout((function(){_()(t).addClass("ig-image-loaded")}),150+30*e)}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed[data-feed_layout=carousel]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".swiper-container",a),l=a.data("feed");l.carousel.slides=l.carousel.slidespv,N++,S[N]=new Swiper(n,{loop:!0,autoHeight:!0,observer:!0,observeParents:!0,slidesPerView:1,spaceBetween:2,autoplay:!!l.carousel.autoplay&&{delay:parseInt(l.carousel.autoplay_interval)},pagination:{el:".swiper-pagination",dynamicBullets:!0,clickable:!0,type:"bullets"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{320:{slidesPerView:1,spaceBetween:1},480:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(2,parseInt(l.carousel.slides))},768:{spaceBetween:parseInt(l.spacing),slidesPerView:Math.min(3,parseInt(l.carousel.slides))},1024:{spaceBetween:parseInt(l.spacing),slidesPerView:parseInt(l.carousel.slides)}}})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("qligg.imagesLoaded",(function(e,t){var a=_()(e.delegateTarget),n=_()(".insta-gallery-list",a);n.data("masonry")?n.masonry("appended",t,!1):n.masonry({itemSelector:".insta-gallery-item",isResizable:!0,isAnimated:!1,transitionDuration:0,percentPosition:!0,columnWidth:".insta-gallery-item:last-child"})})),_()(".insta-gallery-feed[data-feed_layout=masonry]").on("layoutComplete",(function(e,t){_()(e.delegateTarget).addClass("loaded"),_()(t).each((function(e,t){_()(t.element).addClass("ig-image-loaded")}))})),_()(".insta-gallery-feed").on("qligg.loaded",(function(e){var t=_()(e.delegateTarget),a=_()(".insta-gallery-list",t),n=t.data("feed");_()(".insta-gallery-item .insta-gallery-icon.qligg-icon-instagram",a).on("click",(function(e){e.stopPropagation()})),n.popup.display&&_()(".insta-gallery-item",a).magnificPopup({type:"inline",callbacks:{beforeOpen:function(){this.st.mainClass=this.st.mainClass+" qligg-mfp-wrap"},elementParse:function(e){var t,l="",r="",o="",i="",c="",s="",u="";l=!e.el.data("item").type||"video"!=e.el.data("item").type&&"video"!=e.el.data("item").file_type?'<img src="'+e.el.data("item").images.standard+'"/>':'\n              <video autoplay>\n                <source src="'+e.el.data("item").videos.standard+'" type="video/mp4">\n              </video>',t='<div class="mfp-icons"><div class="mfp-counter">'+(e.index+1)+" / "+_()(".insta-gallery-item",a).length+'</div><a class="mfp-link" href="'+e.el.data("item").link+'" target="_blank" rel="noopener"><i class="qligg-icon-instagram"></i>Instagram</a></div>',n.popup.profile&&(r='<div class="mfp-user"><img src="'+n.profile.profile_picture_url+'"><a href="https://www.instagram.com/'+n.profile.username+'" title="'+n.profile.name+'" target="_blank" rel="noopener">'+n.profile.username+"</a></div>"),n.popup.caption&&(o='<div class="mfp-caption">'+e.el.data("item").caption+"</div>"),e.el.data("item").date&&(s='<div class="mfp-date">'+e.el.data("item").date+"</div>"),e.el.data("item").comments&&n.popup.comments&&(u='<div class="mfp-comments"><i class="qligg-icon-comment"></i>'+e.el.data("item").comments+"</div>"),e.el.data("item").likes&&n.popup.likes&&(c='<div class="mfp-likes"><i class="qligg-icon-heart"></i>'+e.el.data("item").likes+"</div>"),(n.popup.likes||n.popup.comments)&&(i='<div class="mfp-info">'+c+u+s+"</div>"),e.src='<div class="mfp-figure '+n.popup.align+'">'+l+'<div class="mfp-close"></div><div class="mfp-bottom-bar"><div class="mfp-title">'+r+t+o+i+"</div></div></div>"}},gallery:{enabled:!0}})})),_()(".insta-gallery-feed").on("click",".insta-gallery-button.load",(function(e){e.preventDefault();var t=_()(e.delegateTarget);if(!t.hasClass("loaded"))return!1;D(t,_()(".insta-gallery-list .insta-gallery-item:last-child",t).data("item").i)})),_()(".insta-gallery-feed").each((function(e,t){var a=_()(t);if(a.hasClass("loaded"))return!1;D(a,0)}))}function F(e){var t=function(){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(){var a,n=d()(e);if(t){var l=d()(this).constructor;a=Reflect.construct(n,arguments,l)}else a=n.apply(this,arguments);return p()(this,a)}}A(),-1!=navigator.appVersion.indexOf("MSIE 8.")&&(document.body.className+=" instagal-ie-8"),-1!=navigator.appVersion.indexOf("MSIE 9.")&&(document.body.className+=" instagal-ie-9");var R=function(e){u()(a,e);var t=F(a);function a(e){var n;return l()(this,a),(n=t.call(this,e)).method=Object(f.debounce)(n.method.bind(c()(n)),1e3),n}return o()(a,[{key:"method",value:function(){this.initLayout()}},{key:"initLayout",value:function(){var e=!1,t=setInterval((function(){_()(".tiktok-feed-feed")&&(A(),e=!0),e&&clearInterval(t)}),3e3)}},{key:"componentDidMount",value:function(){this.initLayout()}},{key:"debounceOnChange",value:function(e){var t=this,a=Object(f.debounce)((function(e){t.initLayout()}),350);a(e)}},{key:"componentDidUpdate",value:function(){this.method()}},{key:"render",value:function(){var e=this.props,t=e.attributes,a=e.setAttributes,n=qligg_gutenberg.accounts;return n&&0!=n.length?n[t.username]?Object(m.createElement)(m.Fragment,null,Object(m.createElement)(B,this.props),Object(m.createElement)("div",{className:"tiktok-site-render"}),Object(m.createElement)(O.a,{block:"qligg/box",attributes:t})):Object(m.createElement)("div",null,Object(m.createElement)(v.Placeholder,{label:Object(j.__)("Please select account","insta-gallery"),instructions:Object(m.createElement)(v.RadioControl,{value:t.username,onChange:function(e){return a({username:e})},options:Object(f.map)(n,(function(e,t){return{value:e.id,label:e.name||e.username}}))})})):Object(m.createElement)("div",null,Object(m.createElement)(v.Placeholder,{label:Object(j.__)("Please create access token","insta-gallery"),instructions:Object(m.createElement)(m.Fragment,null,Object(j.__)("Before start creating feeds, you have to create an access token. Please go to","insta-gallery")," ",Object(m.createElement)("a",{href:qligg_gutenberg.create_account,target:"_blank"},Object(j.__)("the account tab","insta-gallery")),Object(j.__)(" to connect your Instagram account and then reload this page.","insta-gallery"))}))}}]),a}(m.Component),M=a(16);Object(M.registerBlockType)("qligg/box",{title:Object(j.__)("Social Feed Gallery","insta-gallery"),description:Object(j.__)("Display beautiful and responsive galleries on your website from your Instagram feed account.","insta-gallery"),icon:"awards",category:"qligg",keywords:[Object(j.__)("qligg","insta-gallery"),Object(j.__)("instagram","insta-gallery"),Object(j.__)("quadlayers","insta-gallery")],attributes:qligg_gutenberg.attributes,edit:R})},function(e,t){},,function(e,t){}]);