jQuery(document).ready(function(i){"use strict";window.GianSays={divs:[],str:["updated","error"],pushMsg:function(s,t){const n=i("<div><p></p></div>");n.addClass(t).find("p").html(s.replace(/\+/g," ")),this.divs.push(n)},grabMessage:function(){for(let i=0;i<2;i++){const s="gianism_"+this.str[i],t=Cookies.get(s);if(t){const n=JSON.parse(t);for(let s=0,t=n.length;s<t;s++)this.pushMsg(n[s],this.str[i]);Cookies.remove(s,{path:"/",domain:location.host})}}},flushMessage:function(){if(this.divs.length){const s=i('<div class="wpg-notices toggle"></div>');i.each(this.divs,function(t,n){s.append(n);const e=i('<a href="#close" class="close-btn"><i class="lsf lsf-close"></i></a>');e.click(function(s){s.preventDefault(),i(n).remove()}),i(n).append(e),i("body").append(s),s.removeClass("toggle").find("div.updated, div.error").effect("highlight",{},1e3,function(){setTimeout(function(){s.fadeOut(2e3,function(){i(this).remove()})},15e3)})}),this.div=[]}},confirm:function(s){const t=i(this),n=t.attr("data-gianism-confirmation"),e=t.attr("data-gianism-target").split(",");s.preventDefault(),GianSays.confirmDialog(n,e,t.attr("href"))},confirmDialog:function(s,t,n){const e=i.map(t,function(i){return"<li>"+i+"</li>"}).join(""),a=i('<div class="wpg-confirm-container"><div class="wpg-confirm-body"><div class="wpg-confirm-title">'+GianismHelper.confirmLabel+'</div><div class="wpg-confirm-content"><p>'+s+"</p><ul>"+e+'</ul></div><div class="wpg-confirm-footer"><button class="deny">'+GianismHelper.btnCancel+'</button><button class="confirm">'+GianismHelper.btnConfirm+"</button></div></div></div>");i("body").append(a),a.on("click","button",function(){i(this).hasClass("deny")?a.remove():i(this).hasClass("confirm")&&(window.location.href=n)})}},GianSays.grabMessage(),GianSays.flushMessage();const s=/gianism_debug_message=(updated|error)/.exec(window.location.hash);s&&(GianSays.pushMsg("This is a test message. Just check for that.",s[1]),GianSays.flushMessage()),i(".wpg-button[data-gianism-confirmation]").click(GianSays.confirm)});