System.register([],function(e,t){"use strict";return{execute:function(){jQuery(function(e){var t;function o(t){e(t||document).find("#coupon-error-notice").each((t,o)=>{const n=e(o),c=n.text(),r=n.html();let u="";if(c.includes("&lt;"))u=e("<textarea/>").html(c).text(),n.html(u);else if(r.match(/&lt;.*&gt;/)){const e=document.createElement("textarea");e.innerHTML=r,u=e.value,n.html(u)}u&&/<.*>/.test(u)&&n.css("margin-top","10px")})}o(),e(document).on("updated_checkout updated_cart_totals updated_wc_div applied_coupon removed_coupon",()=>o());const n=null!==(t=document.querySelector(".coupon"))&&void 0!==t?t:document.body;window.MutationObserver&&n&&new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(e.nodeType!==Node.ELEMENT_NODE)return;const t=e;("coupon-error-notice"===t.id||t.querySelector("#coupon-error-notice"))&&o(t)})})}).observe(n,{childList:!0,subtree:!0})})}}});
