/*! For license information please see toolbar.js.LICENSE.txt */
(()=>{"use strict";function e(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)e[n]=o[n]}return e}var t=function t(o,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in i)i[c]&&(a+="; "+c,!0!==i[c]&&(a+="="+i[c].split(";")[0]));return document.cookie=t+"="+o.write(r,t)+a}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],n={},r=0;r<t.length;r++){var i=t[r].split("="),a=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(n[c]=o.read(a,c),e===c)break}catch(e){}}return e?n[e]:n}},remove:function(t,o){r(t,"",e({},o,{expires:-1}))},withAttributes:function(o){return t(this.converter,e({},this.attributes,o))},withConverter:function(o){return t(e({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(o)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});window.addEventListener("DOMContentLoaded",(function(){var e,o,n,r;e="#wp-admin-bar-age-gate-toggle",o="click",n=".ab-item",r=function(e){e.preventDefault();var o=new URLSearchParams(e.target.href).get("ls"),n=window,r=n.ag_cookie_domain,i=n.ag_cookie_name;if(o)if(localStorage.getItem(i))localStorage.removeItem(i);else{var a=(new Date).getTime(),c={value:99,expires:new Date(a+36e5).getTime()};localStorage.setItem(i,JSON.stringify(c))}else t.get(i)?((new FormData).append("action","ag_clear_cookie"),t.set(i,1,{path:"/",domain:r,expires:-1,secure:!!window.location.protocol.match(/https/),sameSite:!!window.location.protocol.match(/https/)&&"None"})):t.set(i,"99",{path:"/",domain:r,secure:!!window.location.protocol.match(/https/),sameSite:!!window.location.protocol.match(/https/)&&"None"});window.location.reload()},Array.from(document.querySelectorAll(e)).forEach((function(e){e.addEventListener(o,(function(e){e.target.matches(n)&&r(e)}))}))}))})();