(()=>{"use strict";var e={27723(e){e.exports=window.wp.i18n}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{NOTICE_TYPES:()=>i,createDismissibleNotice:()=>s,createNotice:()=>c});var r=n(27723);const i={SUCCESS:"success",ERROR:"error",WARNING:"warning",INFO:"info"};function c(e,t=i.SUCCESS,n=!0,o=null){const c=document.querySelector(".wrap h1")||document.querySelector(".wrap h2")||document.querySelector(".wrap");if(!c)return void console.error("Could not find container for admin notice");let s=e;if(o&&"object"==typeof o){const t=o.message||"",n=o.code||"";t&&(s=`${e}: ${t}`),n&&(s=`${s}<br />Error Code: <code>${n}</code>`)}const a=document.createElement("div");if(a.className=`notice notice-${t}${n?" is-dismissible":""}`,a.style.transition="opacity 0.5s ease-out",a.innerHTML=`\n\t\t<p>${s}</p>\n\t\t${n?`<button type="button" class="notice-dismiss"><span class="screen-reader-text">${(0,r.__)("Dismiss this notice.")}</span></button>`:""}\n\t`,c.insertAdjacentElement("afterend",a),n){const e=a.querySelector(".notice-dismiss");e?.addEventListener("click",()=>{a.remove()})}}function s(e,t=i.SUCCESS,n=null){c(e,t,!1,n);const o=document.querySelector(".wrap h1")||document.querySelector(".wrap h2")||document.querySelector(".wrap");return o?o.nextElementSibling:null}(this.kadence=this.kadence||{})["extension-admin-notices"]=o})();