Sindbad~EG File Manager
!function s(a,i,n){function r(o,e){if(!i[o]){if(!a[o]){var t="function"==typeof require&&require;if(!e&&t)return t(o,!0);if(p)return p(o,!0);throw(e=new Error("Cannot find module '"+o+"'")).code="MODULE_NOT_FOUND",e}t=i[o]={exports:{}},a[o][0].call(t.exports,function(e){return r(a[o][1][e]||e)},t,t.exports,s,a,i,n)}return i[o].exports}for(var p="function"==typeof require&&require,e=0;e<n.length;e++)r(n[e]);return r}({1:[function(e,o,t){function s(){c(window).on("peepso_activity_deleted",function(e,o,t){o.success&&(c(".photo-item[data-id="+t+"]").remove(),void 0!==o.data.photo_total)&&o.data.photo_total<=0&&c(".ps-js-activity--"+o.data.post_act_id).remove()})}var a,i,c,l,n;a=jQuery||$,i=peepso,c=a,n=(l=i).photos=new s,s.prototype.set_as_avatar=function(e){e=jQuery.extend({user_id:peepsodata.userid,photo_id:jQuery("#photoid_tobe_photo_profile").val(),_wpnonce:jQuery("#_photoprofilenonce").val()},e||{});l.postJson("photosajax.set_photo_as_avatar",e,function(e){e.success&&window.location.reload()})},s.prototype.set_as_cover=function(e){e=jQuery.extend({user_id:peepsodata.userid,photo_id:jQuery("#photoid_tobe_photo_profile").val(),_wpnonce:jQuery("#_photoprofilenonce").val()},e||{});l.postJson("photosajax.set_photo_as_cover",e,function(e){e.success&&window.location.reload()})},s.prototype.set_as_album_cover=function(e){e=jQuery.extend({user_id:peepsodata.userid,photo_id:jQuery("#photoid_tobe_photo_profile").val(),_wpnonce:jQuery("#_photoprofilenonce").val()},e||{});l.postJson("photosajax.set_photo_as_album_cover",e,function(e){e.success&&window.location.reload()})},s.prototype.arrange_images=_.debounce(function(){var n="photo-container-placeholder",r="ps-js-initialized";c(".ps-js-photos").not("."+r).each(c.proxy(function(e,o){var t=c(o),s=t.children(".ps-js-photo"),a=t.children(".ps-js-loading"),i=t.hasClass(n),o=s.map(function(){return c(this).find("img").data("src")});this.load_images(o).always(c.proxy(function(){a.remove(),s.each(function(){var e=c(this).find("img");e.attr("src",e.data("src")),e.removeData("src").removeAttr("data-src")}),i&&s.each(function(e,o){var o=c(o),t=o.find("img");o.data({width:t[0].naturalWidth,height:t[0].naturalHeight})}),i&&(t.css({opacity:0}).removeClass(n),t.animate({opacity:1})),t.addClass(r)},this))},this))},100),s.prototype.rearrange_images=function(){var e="ps-js-initialized";c(".photo-container").filter("."+e).removeClass(e),this.arrange_images()},s.prototype.comment_attach_photo=function(e,o){var t,s,a,e=c(e).closest(".ps-js-comment-new,.ps-comment-edit").find(".ps-js-addons"),i=e.find(".ps-js-addon-photo");(a=i.data("initialized"))||(s=c('<input type="file" name="filedata[]" accept=".gif,.jpg,.jpeg,.png,.tif,.tiff,.webp" />').uniqueId(),(t=c("<div />").append(s)).css({position:"absolute",top:0,right:0,width:1,height:1,overflow:"hidden"}),t.insertAfter(i),s.psFileupload&&s.psFileupload({formData:{user_id:peepsodata.currentuserid},singleFileUploads:!1,sequentialUploads:!1,replaceFileInput:/^((?!chrome|android).)*safari/i.test(navigator.userAgent),dropZone:e.closest(".ps-textarea-wrapper"),pasteZone:null,dataType:"json",url:peepsodata.ajaxurl_legacy+"photosajax.upload_photo",beforeSend:function(e){e.setRequestHeader("X-PeepSo-Nonce",peepsodata.peepso_nonce)},add:c.proxy(function(e,o){this.validate_photo(o)},this),submit:function(){return i.find(".ps-js-remove").hide(),i.find(".ps-js-loading").show(),i.find(".ps-js-img").hide(),i.show(),c(document).trigger("ps_comment_addon_added",i),!0},done:c.proxy(function(e,o){o=o.result;o.success&&(i.find(".ps-js-remove").show(),i.find(".ps-js-loading").hide(),i.find(".ps-js-img").attr("src",o.data.thumbs[0]).data("id",o.data.files[0]).show(),c(document).trigger("ps_comment_addon_added",i))},this)}),a=s.attr("id"),i.data("initialized",a)),o instanceof FileList||l.isWebdriver()||c("#"+a).trigger("click")},s.prototype.validate_photo=function(o){for(var e,t=/\.(gif|jpg|jpeg|png|tif|tiff|webp)$/i,s=0,a=0;a<o.files.length;a++){if(e=o.files[a],!t.test(e.name))return l.dialog(peepsophotosdata.error_unsupported_format,{error:!0}).show().autohide(),!1;s+=parseInt(e.size)}var i={size:s,filesize:s,photos:o.files.length},i=l.observer.applyFilters("photos_validate_req",i);l.postJson("photosajax.validate_photo_upload",i,function(e){e.success?o.submit():l.dialog(e.errors[0],{error:!0}).show().autohide()})},s.prototype.show_dialog_album=function(e){new l.PhotoAlbumDialog(e)},s.prototype.show_dialog_add_photos=function(e,o){new l.PhotoAlbumUploadDialog(e,o)},s.prototype.show_dialog_delete_album=function(e,o,t){var s=jQuery.extend({album_id:o,uid:e,_wpnonce:jQuery("#_delete_album_nonce").val()},t||{}),e=jQuery("[data-album-delete-id="+o+"]"),t="";return e.length&&(t=e.text()),pswindow.confirm_delete(function(){s=l.observer.applyFilters("photos_delete_album",s),l.postJson("photosajax.delete_album",s,function(e){e.success?window.location.reload():l.dialog(e.errors[0],{error:!0}).show().autohide()})},t),!1},s.prototype.delete_stream_album=function(e,o){var t={post_id:e,uid:peepsodata.currentuserid},e=jQuery("[data-act-delete-id="+o+"]"),o="";return e.length&&(o=e.text()),pswindow.confirm_delete(function(){t=l.observer.applyFilters("photos_delete_stream_album",t),l.postJson("photosajax.delete_stream_album",t,function(e){e.success?window.location.reload():l.dialog(e.errors[0],{error:!0}).show().autohide()})},o),!1},s.prototype.select_menu=function(e){var e=c(e.options[e.selectedIndex]),o=e.val(),t=e.data("url");(window.location+"").match(/\/requests/)&&t.match(/\/requests/)?c(".ps-js-photos-submenu").siblings(".tab-content").find("album"===o?"#album":"#latest").addClass("active").siblings().removeClass("active"):window.location=e.data("url")},s.prototype.load_image=function(a){return c.Deferred(function(e){var o=new Image;function t(){s(),e.reject(o)}function s(){o.onload=null,o.onerror=null,o.onabort=null}o.onload=function(){s(),e.resolve(o)},o.onerror=t,o.onabort=t,o.src=a}).promise()},s.prototype.load_images=function(e){var o,t=[];for("object"==typeof e&&"number"==typeof e.length||(e=[e]),o=0;o<e.length;o++)t.push(this.load_image(e[o]));return c.when.apply(c,t)},s.prototype.show_image=function(e){var o,t,s="ps-js-photo-popup",r=/\.gif/i,p=/\.jpe?g/i;/\.(gif|jpe?g|png|webp)/i.test(e)&&((o=c("."+s).eq(0)).length||((o=c(peepsophotosdata.template_popup)).addClass(s).appendTo(document.body),o.on("click",".ps-lightbox-padding, .ps-lightbox-close",function(e){c(e.currentTarget).closest(".ps-lightbox").hide()}),o.on("click",".ps-lightbox-wrapper",function(e){e.stopPropagation()}),o.on("click",".ps-lightbox-play",function(e){var o=c(e.currentTarget),e=o.siblings(".ps-js-img").find("img"),t="gcis gci-play",s="gcis gci-stop",a=e.attr("src"),i=o.data("played"),n=o.data("timer-stop");i?(o.removeData("played"),o.removeClass(s).addClass(t),e.attr("src",a.replace(r,".jpg")),o.removeData("timer-stop"),clearTimeout(n)):(o.data("played",1),o.removeClass(t).addClass(s),e.attr("src",a.replace(p,".gif")),l.browser.isTouch()&&(clearTimeout(n),n=setTimeout(function(){o.removeClass(s)},1e3),o.data("timer-stop",n),e.one("click",function(){o.click()})))})),s=o.find(".ps-js-img"),t=+peepsophotosdata.gif_autoplay,r.test(e)&&!t?(e=e.replace(r,".jpg"),s.html('<img src="'+e+'" />'),s.next(".ps-lightbox-play").removeClass("gcis gci-stop").addClass("gcis gci-play").show()):(s.html('<img src="'+e+'" />'),s.next(".ps-lightbox-play").hide()),o.show())},c(document).ready(function(){c(window).on("load",function(){n.arrange_images()}),l.observer.addAction("browser.resize",function(){n.rearrange_images()}),c(document).on("ps_activitystream_loaded ps_activitystream_append peepso_repost_shown peepso_report_shown peepso_repost_added peepso_post_edit_saved peepso_messages_list_displayed ps_comment_added",function(e){"ps_activitystream_append"===e.type?setTimeout(function(){n.arrange_images()},3e3):n.arrange_images(),pswindow.is_visible&&pswindow.refresh()}),c(document).on("ps_comment_aftersave",function(e,o,t){t=c(t).closest(".ps-js-comment-new, .ps-js-comment-edit").find(".ps-js-addon-photo");t.find(".ps-js-remove").hide(),t.find(".ps-js-loading").hide(),t.find(".ps-js-img").attr("src","").removeData("id").hide(),t.hide(),c(document).trigger("ps_comment_addon_removed",t)}),c(document).on("ps_comment_save ps_lightbox_navigate",function(){n.arrange_images()}),c(document).on("click",".ps-js-addon-photo .ps-js-remove",function(){var e=c(this).closest(".ps-js-addon-photo"),o=e.find(".ps-js-img"),t=o.data("id"),o=(e.find(".ps-js-remove").hide(),e.find(".ps-js-loading").hide(),o.attr("src","").removeData("id").removeAttr("data-id").hide(),e.hide(),{user_id:peepsodata.currentuserid,photo:[t],_wpnonce:e.find("[name=_wpnonce_remove_temp_comment_photos]").val(),_wp_http_referer:e.find("[name=_wp_http_referer]").val()}),o=l.observer.applyFilters("photos_remove_temp_files",o);l.postJson("photosajax.remove_temp_files",o),c(document).trigger("ps_comment_addon_removed",e)}),l.observer.addAction("comment_edit",function(e,o){var o=c(o).find(".ps-js-addon-photo"),t=o.find(".ps-js-img");t.length&&t.data("id")?(o.find(".ps-js-remove").show(),o.find(".ps-js-loading").hide(),o.find(".ps-js-img").show(),o.show(),c(document).trigger("ps_comment_addon_added",o)):(o.find(".ps-js-remove").hide(),o.find(".ps-js-loading").hide(),o.find(".ps-js-img").hide(),o.hide(),c(document).trigger("ps_comment_addon_removed",o))},10,2),c(document).on("click",".ps-lightbox .ps-js-btn-gif",function(e){var o,t=c(e.currentTarget),s=t.siblings(".ps-js-photo-gif"),a="gcis gci-play",i="gcis gci-stop",n="ps-lightbox__spinner",r=s.attr("src"),p=t.data("played"),d=t.data("timer-stop");e.preventDefault(),e.stopPropagation(),p?(t.removeData("played"),t.removeClass(i).addClass(a),s.attr("src",r.replace(".gif",".jpg")),t.removeData("timer-stop"),clearTimeout(d)):(o=setTimeout(function(){t.addClass(n).removeClass(a)},500),r=r.replace(".jpg",".gif"),(e=new Image).onload=function(){t.data("played",1),t.removeClass(a).removeClass(n),t.addClass(i),s.attr("src",r),clearTimeout(o),l.browser.isTouch()&&(clearTimeout(d),d=setTimeout(function(){t.removeClass(i)},1e3),t.data("timer-stop",d),s.one("click",function(){t.click()}))},e.src=r)})}),l.observer.addFilter("ps_photos_available",function(e){return!0},10,1),l.observer.addFilter("comment_req",function(e,o){var o=c(o).closest(".ps-js-comment-new,.ps-comment-edit").find(".ps-js-addon-photo");return o.is(":visible")&&(o=o.find(".ps-js-img")).length&&o.data("id")&&(e.photo=o.data("id")),e},10,2),l.observer.addFilter("comment_can_submit",function(e){var o=c(e.el).closest(".ps-js-comment-new, .ps-js-comment-edit").find(".ps-js-addon-photo");return o.is(":visible")&&(o=o.find(".ps-js-img")).length&&o.data("id")&&(e.can_submit=!0),e},10,1),l.observer.addFilter("comment_show_button",function(e){var o=c(e.el).closest(".ps-js-comment-new, .ps-js-comment-edit").find(".ps-js-addon-photo");return o.is(":visible")&&(o=o.find(".ps-js-img")).length&&o.data("id")&&(e.show=!0),e},10,1),i.observer.addAction("peepso_delete_post",function(e){a(".ps-widget--photos").find(".ps-js-photo").filter('[data-post-id="'+e+'"]').remove()},10,1),i.observer.addAction("commentbox_drop_files",function(e,o){i.photos.comment_attach_photo(e,o)},10,2),i.observer.addFilter("human_friendly_extras",function(e,o,t){return o||!t||t.querySelector(".ps-js-post-header")||(o=a(t).find(".ps-comment-media .ps-media-photos [data-preview]")).length&&e.push(o.data("preview")),e},20,3),a(function(){var e=window.location.href.match(/#(.+&)?photo=(\d+)/);e&&window.ps_comments&&ps_comments.open(e[2],"photo")})},{}]},{},[1]);
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists