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/feed.js
!function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){!function(){e.exports=this.jQuery}()},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a);n(2),n(3),n(4),n(5),n(6);!function(e){var t,n=0,a=function(){e("#qligg_modal").removeClass("processing")};_.mixin({escapeHtml:function(e){return e.replace("&amp;",/&/g).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&#039;/g,"'")},getFormData:function(e){return e.serializeJSON({checkboxUncheckedValue:"false",parseBooleans:!0,parseNulls:!0})}});var i=Backbone.Model.extend({defaults:qligg_feed.args}),o=Backbone.View.extend({initialize:function(t){var n=e(t.target).closest("[data-feed_position]").data("feed_id"),a=new i;Object.keys(qligg_feed.accounts).length?(a.set({id:n}),n||a.set({username:Object.keys(qligg_feed.accounts)[0]}),new l({model:a}).render()):confirm(qligg_feed.message.confirm_username)&&(window.location.href=qligg_feed.redirect.accounts)}}),l=Backbone.View.extend({events:{"change input":"enableSave","change textarea":"enableSave","change select":"enableSave","click .media-modal-image":"setLayout","click .media-modal-backdrop":"close","click .media-modal-close":"close","click .media-modal-prev":"edit","click .media-modal-next":"edit","click .media-modal-tab":"tab","change .media-modal-render-tabs":"renderTabs","change .media-modal-render-panels":"renderPanels","submit .media-modal-form":"submit","qligg.color.change input":"enableSave"},templates:{},initialize:function(){_.bindAll(this,"open","tab","edit","load","render","close","submit"),this.init(),this.open()},init:function(){this.templates.window=wp.template("qligg-modal-main")},assign:function(e,t){e.setElement(this.$(t)).render()},updateModel:function(e){e&&e.preventDefault();var t=this.$el.find("#qligg_modal").find("form"),n=_.getFormData(t);this.model.set(n)},reload:function(e){this.$el.find("#qligg_modal").hasClass("reload")?location.reload():this.remove()},close:function(t){t.preventDefault(),this.undelegateEvents(),e(document).off("focusin"),e("body").removeClass("modal-open"),this.$el.find("#qligg_modal").addClass("reload"),this.reload(t)},enableSave:function(t){e(".media-modal-submit").prop("disabled",!1),this.updateModel(t)},disableSave:function(t){e(".media-modal-submit").prop("disabled",!0)},tab:function(t){t.preventDefault();var n=this.$el.find("#qligg_modal"),a=e(t.currentTarget),i=n.find("ul.qligg-tabs"),o=a.find("a").attr("href").replace("#","");i.find(".active").removeClass("active"),a.addClass("active"),this.model.attributes.panel=o,this.model.changed.panel=o,this.renderPanels(t)},renderTabs:function(e){this.renderPanels(e),this.tabs.render()},renderPanels:function(e){this.updateModel(e),this.panels.render()},render:function(){var e=this;e.$el.html(e.templates.window(e.model.attributes)),this.tabs=new r({model:e.model}),this.panels=new d({model:e.model}),this.assign(this.tabs,"#qligg-modal-tabs"),this.assign(this.panels,"#qligg-modal-panels"),_.delay((function(){e.$el.trigger("qligg-enhanced-color")}),100)},open:function(t){e("body").addClass("modal-open").append(this.$el),this.load()},load:function(){var t=this;if(null==t.model.attributes.id)return t.render(),void _.delay((function(){a()}),300);e.ajax({url:ajaxurl,data:{action:"qligg_edit_feed",nonce:qligg_feed.nonce.qligg_edit_feed,feed_id:this.model.attributes.id},dataType:"json",type:"POST",complete:function(){qligg_feed.accounts[t.model.attributes.username]||(t.enableSave(),alert(qligg_feed.message.save)),a()},error:function(){alert("Error!")},success:function(e){e.success?(t.model.set(e.data),t.render()):alert(e.data)}})},edit:function(a){a.preventDefault();var i=this,o=e(a.target),l=parseInt(e("#qligg_feeds_table tr[data-feed_id]").length),r=parseInt(e("#qligg_feeds_table tr[data-feed_id="+i.model.get("id")+"]").data("feed_position"));n++,t&&clearTimeout(t),t=setTimeout((function(){r=o.hasClass("media-modal-next")?Math.min(r+n,l):Math.max(r-n,1),i.model.set({id:parseInt(e("#qligg_feeds_table tr[data-feed_position="+r+"]").data("feed_id"))}),n=0,i.load()}),300)},submit:function(t){t.preventDefault();var n=this,a=n.$el.find("#qligg_modal"),i=a.find(".settings-save-status .spinner"),o=a.find(".settings-save-status .saved");return e.ajax({url:ajaxurl,data:{action:"qligg_save_feed",nonce:qligg_feed.nonce.qligg_save_feed,feed:JSON.stringify(n.model.attributes)},dataType:"json",type:"POST",beforeSend:function(){e(".media-modal-submit").prop("disabled",!0),i.addClass("is-active")},complete:function(){o.addClass("is-active"),i.removeClass("is-active"),_.delay((function(){o.removeClass("is-active")}),1e3)},error:function(e){alert("Error!")},success:function(e){console.log(e),e.success?null==n.model.attributes.id&&(a.addClass("reload"),n.reload(t),n.close(t)):alert(e.data)}}),!1},setLayout:function(t){t.preventDefault(),t.stopPropagation(),e(t.target).find("input[type=radio]").prop("checked",!0),e(t.target).siblings().find("input[type=radio]").prop("checked",!1),this.updateModel(t),this.renderPanels(t),this.renderTabs(t),this.enableSave(t)}}),r=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-tabs")},render:function(){this.model.attributes.panel="tab_panel_feed",this.$el.html(this.templates.window(this.model.attributes))}}),d=Backbone.View.extend({templates:{},initialize:function(){this.templates.window=wp.template("qligg-modal-panels")},render:function(){this.$el.html(this.templates.window(this.model.attributes)),this.$el.trigger("qligg-enhanced-color")}});e(document).on("qligg-enhanced-color",(function(t){e(".color-picker").filter(":not(.enhanced)").each((function(){e(this).is("[readonly]")&&e(this).parent(".form-field").addClass("disabled-field"),e(this).wpColorPicker({change:function(t,n){console.log("wpColorPicker"),e(t.target).trigger("qligg.color.change")}})}))})),e("#qligg-add-feed").on("click",(function(e){e.preventDefault(),new o(e)}));var s=!1;e(".qligg_edit_feed").on("click",(function(e){e.preventDefault(),s||(new o(e),s=!0)})),e(".qligg_delete_feed").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_delete))return!1;var n=e(t.target),a=n.parent().find(".spinner"),i=n.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,data:{action:"qligg_delete_feed",nonce:qligg_feed.nonce.qligg_delete_feed,feed_id:i},dataType:"json",type:"POST",beforeSend:function(){a.addClass("is-active")},complete:function(){a.removeClass("is-active")},error:function(e){},success:function(e){e.data?(console.log(e.data),location.reload()):alert(e.data)}})})),e(".qligg_clear_cache").on("click",(function(t){if(t.preventDefault(),!confirm(qligg_feed.message.confirm_clear_cache))return!1;var n=e(t.target),a=n.parent().find(".spinner"),i=n.closest("[data-feed_id]").data("feed_id");e.ajax({url:ajaxurl,type:"post",data:{action:"qligg_clear_cache",feed_id:i,nonce:qligg_feed.nonce.qligg_clear_cache},beforeSend:function(){a.addClass("is-active")},success:function(e){e.success?setTimeout((function(){a.removeClass("is-active")}),300):alert(e.data)},complete:function(){setTimeout((function(){a.removeClass("is-active")}),600)},error:function(e,t){console.log(t)}})})),e(document).on("click",".upload_image_button",(function(t){t.preventDefault();var n=wp.media.editor.send.attachment,a=e(this);return wp.media.editor.send.attachment=function(t,i){e(a).parent().prev().attr("src",i.url),e(a).prev().val(i.url).trigger("change"),wp.media.editor.send.attachment=n},wp.media.editor.open(a),!1})),e(document).on("click",".remove_image_button",(function(t){t.preventDefault();var n=e(this).parent().prev().attr("data-src");return e(this).parent().prev().attr("src",n),e(this).prev().prev().val("").trigger("change"),!1})),e(document).on("click","[data-qligg-copy-feed-shortcode]",(function(t){t.preventDefault(),e(e(this).data("qligg-copy-feed-shortcode")).select(),document.execCommand("copy")}))}(i.a)},function(e,t){!function(){e.exports=this._["."]}()},function(e,t){!function(){e.exports=this.window.serializeJSON}()},function(e,t){!function(){e.exports=this.window.wpColorPicker}()},function(e,t){!function(){e.exports=this.wp.util}()},function(e,t){!function(){e.exports=this.window.Backbone}()}]);