!(function (e) {
var t = {};
function n(a) {
if (t[a]) return t[a].exports;
var o = (t[a] = { i: a, l: !1, exports: {} });
return e[a].call(o.exports, o, o.exports, n), (o.l = !0), o.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 o in e)
n.d(
a,
o,
function (t) {
return e[t];
}.bind(null, o)
);
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 = 0));
})([
function (module, exports) {
let mobile = "",
abCurrentPage,
commonData,
abApiSetting;
window.shipping = [];
let dakaasApiData = window.dakaasprotector;
function httpGetAsync(e, t) {
let n = new XMLHttpRequest();
(n.onreadystatechange = function () {
4 == n.readyState && 200 == n.status && t(JSON.parse(n.responseText));
}),
n.open("GET", e, !0),
n.send(null);
}
function loadApp() {
dakaasApiData.shopUrl && apiData();
}
function apiData() {
if (((abApiSetting = dakaasApiData), abApiSetting.showBrand)) {
let e = document.createElement("div");
(e.id = "dakaasprotectormark"),
(e.innerHTML =
'
'),
document.body.append(e);
}
var e = document.createElement("style");
(e.id = "dakaas-protector-style"),
(e.textContent =
"\n #dakaasprotectormark {\n font-size : 13px;\n width: fit-content;\n position: fixed;\n z-index: 9999999999;\n bottom: 0;\n background: #ffffff;\n left: 0;\n padding: 3px 0px;\n padding-right: 7px;\n padding-left: 3px;\n border-top-right-radius: 8px;\n box-shadow : rgba(64, 60, 67, 0.16) 1px -2px 4px 1px;\n\n #dakaas-protector-mark{\n display: flex;\n justify-content: center;\n align-items: center;\n gap:2px;\n }\n \n #dakaas-protector-mark svg{\n background: #3b86f2;\n padding: 5px;\n border-radius: 5px;\n }\n\n @media screen and (max-width : 700px) {\n font-size : 9px;\n padding: 2px 4px;\n border-top-right-radius: 5px;\n\n }\n }"),
document.head.appendChild(e);
const t = new Proxy(new URLSearchParams(window.location.search), { get: (e, t) => e.get(t) }).DakaasPWD;
t && localStorage.setItem("DakaasPWD", t);
var n =
null == abApiSetting.adminLink ||
null == abApiSetting.adminLink ||
!(t == abApiSetting.adminLink || localStorage.getItem("DakaasPWD") == abApiSetting.adminLink);
const a = window.navigator.userAgent.match(/mobi/i);
abApiSetting &&
n &&
!Shopify.designMode &&
(abApiSetting.laptop.disRightClick && !a && disableRightClick(),
abApiSetting.laptop.proText && !a && disableSelection(),
abApiSetting.laptop.disShortCuts && !a && disableShortcuts(),
abApiSetting.laptop.proImages && !a && disableDragDropImage(),
abApiSetting.laptop.proInspect && !a && disableDevTools(),
abApiSetting.laptop.proSaveimg && !a && disableSaveImage(),
abApiSetting.laptop.proVideoimg && !a && disableSaveVideo(),
abApiSetting.mobile.proText && a && disableSelectionMobile(),
abApiSetting.mobile.proImages && a && disableImageMobile(),
abApiSetting.mobile.disRightClick && a && (disableImageMobile(), disableRightClick()),
abApiSetting &&
abApiSetting.blockIp &&
abApiSetting.blockIpAdd &&
abApiSetting.blockIpAdd.length > 0 &&
getUserIP(),
((abApiSetting.countryData && abApiSetting.countryData.length > 0) || abApiSetting.isVpnBlock) &&
getCountry(),
abApiSetting.isLog && addNotice());
}
async function protectCounter(e, t) {
const n = { shopUrl: window.Shopify.shop, protectType: e, userData: JSON.stringify(t) };
try {
await httpPostAsync(
"https://protector.dakaas.com/apps/api/admin/counter?shopUrl=" + n.shopUrl,
n,
function (e) {}
);
} catch (e) {
console.error("Error saving click data:", e);
}
}
function httpPostAsync(e, t, n) {
let a = new XMLHttpRequest();
(a.onreadystatechange = function () {
4 == a.readyState && 200 == a.status && n(JSON.parse(a.responseText));
}),
a.open("POST", e, !0),
a.setRequestHeader("Content-Type", "application/json"),
a.send(JSON.stringify(t));
}
function disableSaveImage() {
let e = document.createElement("style");
document.addEventListener("contextmenu", function (t) {
(e.textContent = "img { pointer-events: none !important; }"),
abApiSetting.laptop.disRightClick || protectCounter("protectImages");
}),
document.head.appendChild(e);
}
function disableSaveVideo() {
let e = document.createElement("style");
document.addEventListener("contextmenu", function (t) {
(e.textContent = "video { pointer-events: none !important; }"),
document.head.appendChild(e),
abApiSetting.laptop.proSaveimg || protectCounter("protectImages");
}),
(window.onclick = function (t) {
e.textContent = "video { pointer-events: unset !important; }";
}),
document.head.appendChild(e);
}
function disableSelectionMobile() {
const e = document.createElement("style");
(e.type = "text/css"),
(e.innerHTML =
"body {-webkit-touch-callout: none;-webkit-user-select: none;-khtml-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}"),
document.head.appendChild(e);
}
function disableImageMobile() {
const e = document.createElement("style");
(e.type = "text/css"),
(e.innerHTML =
"\n img {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .dakaas-pointer {\n pointer-events: none !important;\n }\n "),
document.head.appendChild(e);
document.querySelectorAll("img").forEach((e) => {
let t;
const n = () => {
t = setTimeout(() => {
e.classList.add("dakaas-pointer");
}, 500);
},
a = () => {
clearTimeout(t), e.classList.remove("dakaas-pointer");
};
e.addEventListener("mousedown", n),
e.addEventListener("touchstart", n),
e.addEventListener("mouseup", a),
e.addEventListener("mouseleave", a),
e.addEventListener("touchend", a),
e.addEventListener("touchcancel", a);
}),
document.addEventListener("contextmenu", function (e) {
abApiSetting.mobile.disRightClick ||
(protectCounter("protectImages"), showAlert("Content is protected")),
"img" === (e.target || e.srcElement).tagName.toLowerCase() && e.preventDefault();
});
}
function disableRightClick() {
document.addEventListener("contextmenu", function (e) {
var t = (e.target || e.srcElement).tagName.toLowerCase();
"input" === t ||
"textarea" === t ||
(e.preventDefault(), showAlert("Content is protected"), protectCounter("protectContent"));
});
}
function disableDevTools() {
document.onkeydown = function (e) {
(123 != e.keyCode &&
((!e.ctrlKey && !e.metaKey) ||
(!e.altKey && !e.shiftKey) ||
(67 != e.keyCode && 73 != e.keyCode && 74 != e.keyCode))) ||
((e.cancelBubble = !0),
e.preventDefault(),
showAlert("Developer tools protected"),
e.stopImmediatePropagation(),
protectCounter("protectDevTools"));
};
}
function disableSelection() {
const e = document.createElement("style");
(e.type = "text/css"),
(e.innerHTML =
"\n body {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n .powr-countdown-timer iframe {\n pointer-events: none;\n }\n "),
document.head.appendChild(e),
window.addEventListener("selectstart", function (e) {
e.preventDefault();
});
}
function disableShortcuts() {
document.onkeydown = function (e) {
(!e.ctrlKey && !e.metaKey) ||
("p" != e.key && 16 != e.charCode && 112 !== e.charCode && 80 != e.keyCode) ||
((e.cancelBubble = !0),
e.preventDefault(),
showAlert("You can not print"),
e.stopImmediatePropagation(),
protectCounter("protectContent"));
};
}
function disableDragDropImage() {
window.addEventListener("dragstart", function (e) {
showAlert("You can not drag image"),
e.preventDefault(),
e.dataTransfer.setData("text/plain", "This is some text"),
protectCounter("protectImages");
});
}
function showAlert(e) {
if (abApiSetting.showAlert) {
var t = document.createElement("div");
t.id = "dakaas-alert";
var n = document.createElement("style");
(n.id = "dakaas-style"),
(n.innerHTML =
"\n @keyframes dakaas-fadeIn {\n from {\n opacity: 0\n }\n \n to {\n opacity: 1\n }\n }\n \n @keyframes dakaas-fadeOut {\n from {\n opacity: 1\n }\n \n to {\n opacity: 0\n }\n }\n \n #dakaas-alert {\n display: flex;\n align-items: center;\n position: fixed;\n z-index: 2147483000;\n top: 50%;\n left: 50%;\n transform: translate(-50%,-50%);\n min-width: 200px;\n max-width: 230px;\n width : max-content;\n padding: 10px 12px;\n border-radius: 8px;\n color: #202223;\n background-color: #fff4f4;\n border: 1px solid #e0b3b2;\n box-shadow: #e0b3b2 0 20px 30px -10px;\n pointer-events: none;\n opacity: 0;\n animation-duration: .5s;\n animation-fill-mode: both;\n animation-name: dakaas-fadeIn;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale\n }\n \n .dakaas-ribbon {\n flex: 0 0 18px;\n padding-right: 5px;\n }\n \n .dakaas-svg {\n position: relative;\n display: block;\n width: 100%;\n max-width: 100%;\n max-height: 100%;\n fill: #d72c0d\n }"),
(t.innerHTML = `\n ${e}
\n `),
document.getElementById("dakaas-alert") || (document.body.appendChild(t), document.body.appendChild(n)),
setTimeout(() => {
t.style = "animation-duration: .3s;animation-name: dakaas-fadeOut";
}, 2e3),
setTimeout(() => {
document.getElementById("dakaas-alert") &&
(document.getElementById("dakaas-alert").remove(), document.getElementById("dakaas-style").remove());
}, 2300);
}
}
function getCountry() {
httpGetAsync("https://pro.ip-api.com/json/?fields=proxy,countryCode&key=SXs3XvNnKoUQP2y", setCountry);
}
async function getUserIP() {
try {
const e = await fetch("https://ip.tinytabs.io/"),
t = await e.json(),
n = dakaasApiData.blockIpAdd ? dakaasApiData.blockIpAdd : [];
if ((dakaasApiData.whiteListIpAdd ? dakaasApiData.whiteListIpAdd : []).includes(t.ip)) return !0;
if (n.includes(t.ip)) return void addElement("Ip");
} catch (e) {
console.error("Error fetching IP:", e);
}
}
async function setCountry(e) {
if (
dakaasApiData &&
dakaasApiData.blockIp &&
dakaasApiData.whiteListIpAdd &&
0 != dakaasApiData.whiteListIpAdd.length
) {
if (await getUserIP()) return;
}
abApiSetting.countryData.includes(e.countryCode) && addElement("Country"),
abApiSetting.isVpnBlock && e.proxy && addElement("Vpn");
}
function getBrowserName() {
const e = navigator.userAgent;
return !e.includes("Chrome") || e.includes("Edg") || e.includes("OPR")
? e.includes("Firefox")
? "Mozilla Firefox"
: e.includes("Safari") && !e.includes("Chrome")
? "Safari"
: e.includes("Edg")
? "Microsoft Edge"
: e.includes("OPR") || e.includes("Opera")
? "Opera"
: e.includes("MSIE") || e.includes("Trident")
? "Internet Explorer"
: "Unknown Browser"
: "Google Chrome";
}
async function getUserData(e) {
try {
const t = await fetch("https://pro.ip-api.com/json/?fields=query,countryCode&key=SXs3XvNnKoUQP2y"),
n = await t.json(),
a = n.countryCode,
o = n.query,
i = Date.now().toString(),
s = getBrowserName();
return { country: a, ip: o, browser: s, timestamp: i, blockType: e };
} catch (e) {
console.log(e);
}
}
async function addElement(e) {
if (
(removeAllElement(),
null == abApiSetting.option || null == abApiSetting.option || "pop" == abApiSetting.option)
) {
var t =
abApiSetting.customeMsg && abApiSetting.customeMsg.message
? abApiSetting.customeMsg.message
: "Access Denied ! You are not authorized to acess this site",
n = abApiSetting.customeMsg && abApiSetting.customeMsg.title ? abApiSetting.customeMsg.title : "402",
a =
abApiSetting.customeMsg && abApiSetting.customeMsg.customCss ? abApiSetting.customeMsg.customCss : "",
o = document.createElement("div");
(o.style =
" z-index: 9999999999;width: 100%;display: flex;align-items: center;justify-content: center;height: 100vh;position: fixed;top: 0px;max-width: 100%;background: white;"),
(o.className = "dakas-pop"),
(o.innerHTML +=
'