Files
confirms/public/architectui/assets/scripts/toastr.98288b227c064e6a107f.js
yangsh 735120f1cb
Some checks failed
Close Pull Request / main (pull_request_target) Has been cancelled
new
2025-12-09 17:28:31 +09:00

1 line
9.0 KiB
JavaScript

(()=>{"use strict";var t,e={3488:(t,e,o)=>{var n=o(9875);function a(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"info",a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=function(){var t=document.getElementById("toastContainer");return t||((t=document.createElement("div")).id="toastContainer",t.className="toast-container position-fixed p-3",t.style.zIndex="9999",t.style.top="0",t.style.right="0",document.body.appendChild(t)),t}();if(a.positionClass)switch(s.className="toast-container position-fixed p-3",a.positionClass){case"toast-top-right":default:s.style.top="0",s.style.right="0",s.style.bottom="",s.style.left="";break;case"toast-bottom-right":s.style.top="",s.style.right="0",s.style.bottom="0",s.style.left="";break;case"toast-bottom-left":s.style.top="",s.style.right="",s.style.bottom="0",s.style.left="0";break;case"toast-top-left":s.style.top="0",s.style.right="",s.style.bottom="",s.style.left="0";break;case"toast-top-full-width":s.style.top="0",s.style.right="0",s.style.left="0",s.style.bottom="",s.className="toast-container position-fixed p-3 w-100";break;case"toast-bottom-full-width":s.style.top="",s.style.right="0",s.style.left="0",s.style.bottom="0",s.className="toast-container position-fixed p-3 w-100";break;case"toast-top-center":s.style.top="0",s.style.right="50%",s.style.transform="translateX(50%)",s.style.bottom="",s.style.left="";break;case"toast-bottom-center":s.style.top="",s.style.right="50%",s.style.transform="translateX(50%)",s.style.bottom="0",s.style.left=""}var i=document.createElement("div");i.className="toast border-0",i.setAttribute("role","alert"),i.setAttribute("aria-live","assertive"),i.setAttribute("aria-atomic","true");var r={success:{headerClass:"bg-success text-white",bodyClass:a.coloredBody?"bg-success bg-opacity-10 text-success":"bg-white text-dark",icon:'<i class="pe-7s-check"></i>'},error:{headerClass:"bg-danger text-white",bodyClass:a.coloredBody?"bg-danger bg-opacity-10 text-danger":"bg-white text-dark",icon:'<i class="pe-7s-close-circle"></i>'},warning:{headerClass:"bg-warning text-dark",bodyClass:a.coloredBody?"bg-warning bg-opacity-10 text-warning-emphasis":"bg-white text-dark",icon:'<i class="pe-7s-attention"></i>'},info:{headerClass:"bg-info text-white",bodyClass:a.coloredBody?"bg-info bg-opacity-10 text-info":"bg-white text-dark",icon:'<i class="pe-7s-info"></i>'}},l=r[o]||r.info;if(i.innerHTML='\n <div class="toast-header '.concat(l.headerClass,' border-0">\n <span class="me-2">').concat(l.icon,'</span>\n <strong class="me-auto">').concat(e||o.charAt(0).toUpperCase()+o.slice(1),"</strong>\n ").concat(!1!==a.closeButton?'<button type="button" class="btn-close '.concat(l.headerClass.includes("bg-warning")?"":"btn-close-white",'" data-bs-dismiss="toast" aria-label="Close"></button>'):"",'\n </div>\n <div class="toast-body ').concat(l.bodyClass," border-top border-").concat("error"===o?"danger":o,' border-opacity-25">\n ').concat(t,"\n </div>\n "),a.progressBar){var d=document.createElement("div");d.className="toast-progress",d.style.cssText="height: 3px; background: rgba(0,0,0,0.2); position: relative; overflow: hidden;",d.innerHTML='<div style="height: 100%; background: currentColor; width: 100%; transition: width linear;"></div>',i.appendChild(d)}s.appendChild(i);var c=new n.Toast(i,{animation:!0,autohide:!1!==a.autohide,delay:a.timeOut||5e3});if(c.show(),a.progressBar&&!1!==a.autohide){var u=i.querySelector(".toast-progress div");setTimeout(function(){u.style.transitionDuration="".concat(a.timeOut||5e3,"ms"),u.style.width="0%"},100)}return i.addEventListener("hidden.bs.toast",function(){i.remove()}),c}const s={success:function(t,e,o){return a(t,e,"success",o)},error:function(t,e,o){return a(t,e,"error",o)},warning:function(t,e,o){return a(t,e,"warning",o)},info:function(t,e,o){return a(t,e,"info",o)},options:{closeButton:!0,progressBar:!1,positionClass:"toast-top-right",timeOut:5e3,extendedTimeOut:1e3},clear:function(){var t=document.getElementById("toastContainer");t&&t.querySelectorAll(".toast").forEach(function(t){var e=n.Toast.getInstance(t);e&&e.hide()})}};document.addEventListener("DOMContentLoaded",function(){var t=document.querySelectorAll('#toastTypeGroup input[type="radio"]');t.length>0&&t.forEach(function(t,e){t.checked=0===e});var e=document.querySelectorAll('#positionGroup input[type="radio"]');e.length>0&&e.forEach(function(t,e){t.checked=0===e});var o,n=-1,a=function(){var t=["My name is Inigo Montoya. You killed my father. Prepare to die!",'<div><input class="form-control form-control-sm" value="textbox"/>&nbsp;<a href="http://johnpapa.net" target="_blank">This is a hyperlink</a></div><div><button type="button" id="okBtn" class="btn btn-primary btn-sm">Close me</button><button type="button" id="surpriseBtn" class="btn btn-sm" style="margin: 0 8px 0 8px">Surprise me</button></div>',"Are you the six fingered man?","Inconceivable!","I do not think that means what you think it means.","Have fun storming the castle!"];return++n===t.length&&(n=0),t[n]},i=document.getElementById("closeButton"),r=document.getElementById("addBehaviorOnToastCloseClick");i&&i.addEventListener("change",function(){this.checked?r.disabled=!1:(r.disabled=!0,r.checked=!1)});var l=document.getElementById("showtoast");l&&l.addEventListener("click",function(){var t,e,n,r,l,d,c,u,m,h,p,y,g=(null===(t=document.querySelector("#toastTypeGroup input[type='radio']:checked"))||void 0===t?void 0:t.value)||"info",v=(null===(e=document.getElementById("message"))||void 0===e?void 0:e.value)||"",b=(null===(n=document.getElementById("title"))||void 0===n?void 0:n.value)||"",f=(document.getElementById("showDuration"),document.getElementById("hideDuration"),document.getElementById("timeOut")),k=document.getElementById("extendedTimeOut"),E=(document.getElementById("showEasing"),document.getElementById("hideEasing"),document.getElementById("showMethod"),document.getElementById("hideMethod"),(null===(r=document.getElementById("addClear"))||void 0===r?void 0:r.checked)||!1),B=(null===(l=document.getElementById("addBehaviorOnToastClick"))||void 0===l||l.checked,null===(d=document.getElementById("addBehaviorOnToastCloseClick"))||void 0===d||d.checked,(null===(c=document.getElementById("debugInfo"))||void 0===c?void 0:c.checked)||!1),w=(null===(u=document.getElementById("progressBar"))||void 0===u?void 0:u.checked)||!1,C=(null===(m=document.getElementById("preventDuplicates"))||void 0===m||m.checked,null===(h=document.getElementById("newestOnTop"))||void 0===h||h.checked,(null===(p=document.getElementById("positionClass"))||void 0===p?void 0:p.value)||(null===(y=document.querySelector("#positionGroup input[type='radio']:checked"))||void 0===y?void 0:y.value)||"toast-top-right"),x={closeButton:!1!==(null==i?void 0:i.checked),progressBar:w,timeOut:E?0:parseInt((null==f?void 0:f.value)||5e3),extendedTimeOut:E?0:parseInt((null==k?void 0:k.value)||1e3),autohide:!E,positionClass:C},I=document.getElementById("toastrOptions");if(I){var O='Command: toast["'.concat(g,'"]("').concat(v||a(),'", "').concat(b,'")\n\ntoast.options = ').concat(JSON.stringify(x,null,2));I.textContent=O}var T=v||a();o=s[g](T,b,x),T.includes('class="clear"')&&setTimeout(function(){var t=document.querySelector(".toast:last-child .clear");t&&t.addEventListener("click",function(){s.clear()})},100),B&&console.log("Toast shown:",{type:g,message:T,title:b,options:x})});var d=document.getElementById("clearlasttoast");d&&d.addEventListener("click",function(){o&&o.hide()});var c=document.getElementById("cleartoasts");c&&c.addEventListener("click",function(){s.clear()}),document.querySelectorAll(".show-toastr-example").forEach(function(t){t.addEventListener("click",function(){s.info("You can add custom buttons to a toast message.","Example Toast")})})})}},o={};function n(t){var a=o[t];if(void 0!==a)return a.exports;var s=o[t]={id:t,loaded:!1,exports:{}};return e[t].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=e,t=[],n.O=(e,o,a,s)=>{if(!o){var i=1/0;for(c=0;c<t.length;c++){for(var[o,a,s]=t[c],r=!0,l=0;l<o.length;l++)(!1&s||i>=s)&&Object.keys(n.O).every(t=>n.O[t](o[l]))?o.splice(l--,1):(r=!1,s<i&&(i=s));if(r){t.splice(c--,1);var d=a();void 0!==d&&(e=d)}}return e}s=s||0;for(var c=t.length;c>0&&t[c-1][2]>s;c--)t[c]=t[c-1];t[c]=[o,a,s]},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n.j=706,(()=>{var t={706:0};n.O.j=e=>0===t[e];var e=(e,o)=>{var a,s,[i,r,l]=o,d=0;if(i.some(e=>0!==t[e])){for(a in r)n.o(r,a)&&(n.m[a]=r[a]);if(l)var c=l(n)}for(e&&e(o);d<i.length;d++)s=i[d],n.o(t,s)&&t[s]&&t[s][0](),t[s]=0;return n.O(c)},o=self.webpackChunkarchitectui_html_pro=self.webpackChunkarchitectui_html_pro||[];o.forEach(e.bind(null,0)),o.push=e.bind(null,o.push.bind(o))})();var a=n.O(void 0,[96],()=>n(3488));a=n.O(a)})();