PageSourceSearch

https://provincia.vercelli.it/WebInterface/new-ui/assets/app/components/toast.js?v=1181-5hn4

js provincia.vercelli.it collected 2026-10-01 11:54:38 UTC 2,481 bytes, 2 lines download raw bytes

1import{_ as T}from"../../utils/dom.js?v=1181-5hn4";const b=()=>{if(document.querySelector(".Toastify"))return;const e=document.body||document.documentElement;e&&e.prepend(T("<div>").addClass("Toastify").el())};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",b,{once:!0}):b();const _={success:'<i class="icon-ok-circle"></i>',error:'<i class="icon-exclamation-sign"></i>',warning:'<i class="icon-info-sign"></i>'};let p={};const $=({type:e="success",position:a="top-right",title:t,message:n,autoClose:g=!1,delay:u=3e3})=>{const f=`${t}_${n}_${e}_${a}`;if(p[f])return;const m=utils.getUId();let c=T(`.Toastify__toast-container.Toastify__toast-container--${a}`).el();if(!c){b();const i=document.querySelector(".Toastify");if(!i)return;c=document.createElement("div"),c.classList.add("Toastify__toast-container",`Toastify__toast-container--${a}`),i.insertAdjacentElement("afterbegin",c)}const v=i=>{var l;if(i){const d=document.getElementById(i);if(d){if(((l=document.body)==null?void 0:l.getAttribute("data-electron-upload-host"))==="true"){d.remove(),delete p[f];return}d.classList.add("remove-animation"),d.addEventListener("animationend",()=>{d.remove(),delete p[f]})}}};let o=t,s=n;if(typeof utils.sanitizeWithKeepingOnlyFormatting=="function")o=utils.sanitizeWithKeepingOnlyFormatting(t),s=utils.sanitizeWithKeepingOnlyFormatting(n);else if(typeof utils.sanitizePure=="function")o=utils.sanitizePure(t),s=utils.sanitizePure(n);else if(typeof utils.sanitize=="function")o=utils.sanitize(t),s=utils.sanitize(n);else{const i=l=>l?l.replace(/<[^>]*>?/gm,""):"";o=i(t),s=i(n)}const r=document.createElement("div");r.classList.add("toast",`toast-${e}`),r.setAttribute("id",m),r.innerHTML+=`<div class="toast-icon"> ${_[e]} </div><div class="text-sm is-flex-grow-1 text-primaryMain">${s?`<p class="text-sm has-text-weight-semibold">${s}</p>`:""} ${o&&`<p class="text-sm word-break-all">${o}</p>`}</div>`;const y=document.createElement("button");y.classList.add("toast-close-btn"),y.innerHTML='<i class="icon-remove"></i>',y.onclick=()=>{v(m)},r.insertAdjacentElement("beforeend",y),c.insertAdjacentElement("beforeend",r),p[f]=m,g&&window.setTimeout(v.bind(null,m),u)},z=(e,a,t,n)=>{var u;const g=((u=document.body)==null?void 0:u.getAttribute("data-electron-upload-host"))==="true";$({title:e,message:a,delay:t||void 0,autoClose:!!t,type:n?"error":"success",position:g?"bottom-center":"top-right"})};export{z as g,$ as t};
2//# sourceMappingURL=toast.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.