REAPI/public/static/plugs/notify/notify.min.js

1 line
18 KiB
JavaScript
Raw Normal View History

2024-09-29 15:43:18 +08:00
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):"object"==typeof exports?exports.GrowlNotification=i():t.GrowlNotification=i()}(window,function(){return function(t){var i={};function o(n){if(i[n])return i[n].exports;var e=i[n]={i:n,l:!1,exports:{}};return t[n].call(e.exports,e,e.exports,o),e.l=!0,e.exports}return o.m=t,o.c=i,o.d=function(t,i,n){o.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,i){if(1&i&&(t=o(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var e in t)o.d(n,e,function(i){return t[i]}.bind(null,e));return n},o.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(i,"a",i),i},o.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},o.p="",o(o.s=7)}([function(t,i,o){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Number.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};var n=function(){function t(i,o){if(this.nodes=[],this.pseudoSelector="",this.callbacks={},o||(o=document),"string"==typeof i)if("<"===i[0]&&">"===i[i.length-1])this.nodes=[t.createNode(i)];else{if(-1!==i.search(/(:before|:after)$/gi)){var n=i.match(/(:before|:after)$/gi);i=i.split(n[0])[0],this.pseudoSelector=n[0]}this.nodes=[].slice.call(o.querySelectorAll(i))}else i instanceof NodeList?this.nodes=i.length>1?[].slice.call(i):[i]:(i instanceof HTMLDocument||i instanceof Window||i instanceof HTMLElement)&&(this.nodes=[i])}return t.select=function(i,o){return new t(i,o)},t.create=function(i){return new t(t.createNode(i))},t.prototype.attr=function(t,i){return void 0!=i?(this.each(this.nodes,function(o){o.setAttribute(t,i)}),this):this.getLastNode().getAttribute(t)},t.prototype.append=function(i){var o;return o=i instanceof t?i.get():i,this.each(this.nodes,function(t){t.appendChild(o)}),this},t.prototype.parent=function(){return new t(this.getLastNode().parentNode)},t.prototype.each=function(t,i){t instanceof Function&&(i=t,t=this.nodes);for(var o=0;o<t.length;o++)i.call(this.nodes[o],this.nodes[o],o);return this},t.prototype.hasClass=function(t){return this.getLastNode().classList.contains(t)},t.prototype.addClass=function(t){if(t){var i=t.split(" ");this.each(this.nodes,function(t){for(var o in i)t.classList.add(i[o])})}return this},t.prototype.removeClass=function(t){var i=t.split(" ");return this.each(this.nodes,function(t){for(var o in i)t.classList.remove(i[o])}),this},t.prototype.find=function(i){return new t(i,this.getLastNode())},t.prototype.trigger=function(t,i){var o=new CustomEvent(t,{detail:i});return this.each(this.nodes,function(t){t.dispatchEvent(o)}),this},t.prototype.text=function(t){return this.each(this.nodes,function(i){i.innerText=t}),this},t.prototype.css=function(i,o){if(void 0===o){var n=this.getLastNode(),e=null;if(i=t.convertToJsProperty(i),"function"!=typeof n.getBoundingClientRect||this.pseudoSelector||(e=n.getBoundingClientRect()[i]),!e){var s=getComputedStyle(n,this.pseudoSelector)[i];s.search("px")&&(e=parseInt(s,10))}if(isNaN(e))throw"Undefined css property: "+i;return e}return Number.isInteger(o)&&(o+="px"),this.nodes.length>1?this.each(this.nodes,function(t){t.style[i]=o}):this.nodes[0].style[i]=o,this},t.prototype.on=function(t,i){var o=this;return this.each(this.nodes,function(n){var e=function(t){i.call(n,t)};o.callbacks[t]=e,n.addEventListener(t,e)}),this},t.prototype.off=function(t){var i=this.callbacks[t];return this.each(this.nodes,function(o){o.removeEventListener(t,i,!1)}),this},t.prototype.val=function(t){return void 0===t?this.getLastNode().value:(this.each(this.nodes,function(i){i.value=t}),this)},t.prototype.is=function(t){return this.getLastNode().tagName.toLowe