whoami7 - Manager
:
/
home
/
techyfnq
/
www
/
wp-content
/
plugins
/
easy-digital-downloads
/
assets
/
js
/
Upload File:
files >> //home/techyfnq/www/wp-content/plugins/easy-digital-downloads/assets/js/edd-admin-notifications.js
!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=324)}({324:function(t,e){document.addEventListener("alpine:init",(function(){Alpine.store("eddNotifications",{isPanelOpen:!1,notificationsLoaded:!1,numberActiveNotifications:0,activeNotifications:[],inactiveNotifications:[],init:function(){var t=this,e=document.querySelector("#edd-notification-button .edd-number");e&&e.classList.remove("edd-hidden"),document.addEventListener("keydown",(function(e){"Escape"===e.key&&t.closePanel()}));var i=new URLSearchParams(window.location.search);i.has("notifications")&&"true"===i.get("notifications")&&t.openPanel()},openPanel:function(){var t=this,e=document.getElementById("edd-notifications-header");if(this.notificationsLoaded)return this.isPanelOpen=!0,void(e&&setTimeout((function(){e.focus()})));this.isPanelOpen=!0,this.apiRequest("/notifications","GET").then((function(i){t.activeNotifications=i.active,t.inactiveNotifications=i.dismissed,t.notificationsLoaded=!0,e&&e.focus()})).catch((function(t){console.log("Notification error",t)}))},closePanel:function(){if(this.isPanelOpen){this.isPanelOpen=!1;var t=document.getElementById("edd-notification-button");t&&t.focus()}},apiRequest:function(t,e){return fetch(edd_vars.restBase+t,{method:e,credentials:"same-origin",headers:{"Content-Type":"application/json","X-WP-Nonce":edd_vars.restNonce}}).then((function(t){return t.ok?t.text():Promise.reject(t)})).then((function(t){return t?JSON.parse(t):null}))},dismiss:function(t,e){var i=this;if(void 0!==this.activeNotifications[e]){t.target.disabled=!0;var n=this.activeNotifications[e];this.apiRequest("/notifications/"+n.id,"DELETE").then((function(t){i.activeNotifications.splice(e,1),i.numberActiveNotifications=i.activeNotifications.length})).catch((function(t){console.log("Dismiss error",t)}))}}})}))}});
Copyright ©2021 || Defacer Indonesia