/** * Minified by jsDelivr using Terser v5.37.0. * Original file: /npm/arrive@2.5.2/src/arrive.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ var Arrive=function(e,t,n){"use strict";if(e.MutationObserver&&"undefined"!=typeof HTMLElement){var r,o=0,i=(r=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector,{matchesSelector:function(e,t){return e instanceof HTMLElement&&r.call(e,t)},addMethod:function(e,t,n){var r=e[t];e[t]=function(){return n.length==arguments.length?n.apply(this,arguments):"function"==typeof r?r.apply(this,arguments):void 0}},callCallbacks:function(e,t,n){if(e.length){t&&t.options.onceOnly&&(e=[e[0]],t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback));for(var r,o=0;r=e[o];o++)r&&r.callback&&r.callback.call(r.elem,r.elem);t&&t.callback&&n&&n.addTimeoutHandler(t.target,t.selector,t.callback,t.options,t.data)}},checkChildNodesRecursively:function(e,t,n,r){for(var o,l=0;o=e[l];l++)n(o,t,r)&&r.push({callback:t.callback,elem:o}),o.childNodes.length>0&&i.checkChildNodesRecursively(o.childNodes,t,n,r)},mergeArrays:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},toElementsArray:function(t){return void 0===t||"number"==typeof t.length&&t!==e||(t=[t]),t}}),l=function(){var e=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return e.prototype.addEvent=function(e,t,n,r,o){var i={target:e,selector:t,options:n,callback:r,data:o,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},e.prototype.removeEvent=function(e){for(var t,n=this._eventsBucket.length-1;t=this._eventsBucket[n];n--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t),t.data&&t.data.timeoutId&&clearTimeout(t.data.timeoutId);var r=this._eventsBucket.splice(n,1);r&&r.length&&(r[0].callback=null)}},e.prototype.beforeAdding=function(e){this._beforeAdding=e},e.prototype.beforeRemoving=function(e){this._beforeRemoving=e},e}(),c=function(t,r){var o=new l,c=this,a={fireOnAttributesModification:!1};return o.beforeAdding((function(n){var o,i=n.target;i!==e.document&&i!==e||(i=document.getElementsByTagName("html")[0]),o=new MutationObserver((function(e){r.call(this,e,n)}));var l=t(n.options);o.observe(i,l),n.observer=o,n.me=c})),o.beforeRemoving((function(e){e.observer.disconnect()})),this.bindEvent=function(e,t,n){t=i.mergeArrays(a,t);for(var r=i.toElementsArray(this),l=0;l{c.unbindEventWithSelectorAndCallback.call(e,t,n),n.call(null,null)}),r.timeout))},this},a=new function(){var e={fireOnAttributesModification:!1,onceOnly:!1,existing:!1,timeout:0};function t(e,t,r){return!(!i.matchesSelector(e,t.selector)||(e._id===n&&(e._id=o++),-1!=t.firedElems.indexOf(e._id)))&&(t.firedElems.push(e._id),!0)}var r=(a=new c((function(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t}),(function(e,n){e.forEach((function(e){var r=e.addedNodes,o=e.target,l=[];null!==r&&r.length>0?i.checkChildNodesRecursively(r,n,t,l):"attributes"===e.type&&t(o,n,l)&&l.push({callback:n.callback,elem:o}),i.callCallbacks(l,n,a)}))}))).bindEvent;return a.bindEvent=function(t,o,l){var c="object"==typeof o?i.mergeArrays(e,o):{...e},a="function"==typeof l?l:"function"==typeof o?o:n,u=i.toElementsArray(this);if(a||(c.onceOnly=!0),c.existing){for(var s=[],d=0;dr.call(v,t,c,e)))}r.call(this,t,c,a)},a},u=new function(){var e={onceOnly:!1,timeout:0};function t(e,t){return i.matchesSelector(e,t.selector)}var r=(u=new c((function(){return{childList:!0,subtree:!0}}),(function(e,n){e.forEach((function(e){var r=e.removedNodes,o=[];null!==r&&r.length>0&&i.checkChildNodesRecursively(r,n,t,o),i.callCallbacks(o,n,u)}))}))).bindEvent;return u.bindEvent=function(t,o,l){var c="object"==typeof o?i.mergeArrays(e,o):{...e},a="function"==typeof l?l:"function"==typeof o?o:n;if(!a){c.onceOnly=!0;var u=this;return new Promise((e=>r.call(u,t,c,e)))}r.call(this,t,c,a)},u};t&&f(t.fn),f(HTMLElement.prototype),f(NodeList.prototype),f(HTMLCollection.prototype),f(HTMLDocument.prototype),f(Window.prototype);var s={};return d(a,s,"unbindAllArrive"),d(u,s,"unbindAllLeave"),s}function d(e,t,n){i.addMethod(t,n,e.unbindEvent),i.addMethod(t,n,e.unbindEventWithSelectorOrCallback),i.addMethod(t,n,e.unbindEventWithSelectorAndCallback)}function f(e){e.arrive=a.bindEvent,d(a,e,"unbindArrive"),e.leave=u.bindEvent,d(u,e,"unbindLeave")}}(window,"undefined"==typeof jQuery?null:jQuery,void 0); //# sourceMappingURL=/sm/111de82da240d8dbde3ab2ad49933bfb890046691d2a507889e6d1a0fd1615c1.map