let TF_Notification;((t,i,n)=>{"use strict";let s=!1,e=!0;const o=()=>{e="visible"===n.document.visibilityState,!0===e&&(s=!1)},a=function(){!0!==s&&!0===e&&(s=!0,this.classList.add("show"),this.tfOn("pointerleave",(t=>{i.triggerEvent(t.currentTarget,t.type)}),{passive:!0,once:!0}))},c=i=>{const n="http://www.w3.org/2000/svg",s=t.createElementNS(n,"use"),e=t.createElementNS(n,"svg");return i="tf-"+i.trim().replace(" ","-"),e.setAttribute("class","tf_fa "+i),s.setAttributeNS(null,"href","#"+i),e.appendChild(s),e};TF_Notification={el:null,async init(){let s;try{s=n.top.document}catch(t){s=n.document}let e=s.tfId("tf_notification_root"),a=[];if(null===e){n.document.tfOff("visibilitychange",o,{passive:!0}).tfOn("visibilitychange",o,{passive:!0}),e=t.createElement("div");const s={info:"info",error:"tf_close",warning:"alert",done:"check"},r=t.createDocumentFragment();r.appendChild(t.querySelector("#tf_svg").cloneNode(!0)),e.id="tf_notification_root",e.className="tf_hide tf_w";for(let i in s){let n,e=t.createElement("div"),o=t.createElement("div"),a=s[i];"tf_close"===a||"tf"===a?(n=t.createElement("div"),n.className=a,"tf_close"===a&&(n.className+=" tf_w tf_h")):n=c("ti-"+a),e.className="notify "+i+" tf_abs_t tf_opacity",o.className="icon tf_hide",o.appendChild(n),e.appendChild(o),r.appendChild(e)}e.attachShadow({mode:"open"}).appendChild(r),a.push(i.loadCss(i.url+"css/base.min",null,null,e.shadowRoot.querySelector(".notify"))),a.push(i.loadCss(i.url+"css/notification","tf_notify",null,e.shadowRoot.querySelector(".notify"))),e.classList.add("tf_hidden"),e.classList.remove("tf_hide"),this.el=e,t.body.appendChild(e),e.classList.remove("tf_hidden")}return await Promise.all(a),e},async show(i,n,s){return null===this.el?(await this.init(),this.show(i,n,s)):new Promise((async o=>{const c=this.el.shadowRoot.querySelector("."+i),r=t=>{n instanceof DocumentFragment||n instanceof HTMLElement||n instanceof Document?t.replaceChildren(n):t.innerHTML=n||""};if(null===c||c.classList.contains("show"))return c&&r(c.tfClass("msg")[0]),void(!0===e&&s>0?setTimeout(o,s):o());await this.showHide();const f=t.createElement("div");if(f.className="msg",r(f),c.appendChild(f),!0===e){const t=function(i){this.tfOff("transitioncancel transitionend",t,{passive:!0,once:!0}),!0===e&&s>0?setTimeout(o,s):o()};c.tfOff("pointerenter",a,{passive:!0}).tfOn("pointerenter",a,{passive:!0}).tfOn("transitionend transitioncancel",t,{passive:!0,once:!0}).classList.add("show")}else c.classList.add("show"),o()}))},async showHide(t,i,n=3e3){return null===this.el?(await this.init(),this.showHide(t,i,n)):new Promise((async o=>{const c=this.el.shadowRoot.querySelector(".show");if(t)return null===c||c.classList.contains(t)||await this.showHide(),await this.show(t,i),void(!0===e?setTimeout((()=>{this.showHide().then(o)}),n):(await this.showHide(),o()));if(null===c)return void o();const r=function(){!1===s&&(this.tfOff("pointerenter",a,{passive:!0}).tfOff("pointerleave",f,{passive:!0}).tfOff("transitioncancel transitionend",r,{passive:!0,once:!0}),this.tfClass("msg")[0]?.remove(),o())},f=function(){!0===s&&(s=!1,this.tfOff("pointerenter",a,{passive:!0}).tfOff("transitioncancel transitionend",r,{passive:!0,once:!0}).tfOn("transitionend transitioncancel",r,{passive:!0,once:!0}).classList.remove("show"))};!0===e?!1!==s&&c.matches(":hover")?c.tfOn("pointerleave",f,{passive:!0}):(s=!0,f.call(c)):(c.classList.remove("show"),r.call(c))}))}}})(document,Themify,window);