!function(){"use strict";varn={d:function(t,r){for(vareinr)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:function(n,t){returnObject.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{actions:function(){returnS},addAction:function(){returnm},addFilter:function(){returnp},applyFilters:function(){returnk},createHooks:function(){returnf},currentAction:function(){returnw},currentFilter:function(){returnI},defaultHooks:function(){returnh},didAction:function(){returnO},didFilter:function(){returnj},doAction:function(){returnb},doingAction:function(){returnx},doingFilter:function(){returnT},filters:function(){returnz},hasAction:function(){return_},hasFilter:function(){returny},removeAction:function(){returnA},removeAllActions:function(){returnF},removeAllFilters:function(){returng},removeFilter:function(){returnv}});varr=function(n){return"string"!=typeofn||""===n?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(n)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};vare=function(n){return"string"!=typeofn||""===n?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(n)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(n)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};varo=function(n,t){returnfunction(o,i,c,s=10){constu=n[t];if(!e(o))return;if(!r(i))return;if("function"!=typeofc)returnvoidconsole.error("The hook callback must be a function.");if("number"!=typeofs)returnvoidconsole.error("If specified, the hook priority must be a number.");constl={callback:c,priority:s,namespace:i};if(u[o]){constn=u[o].handlers;lett;for(t=n.length;t>0&&!(s>=n[t-1].priority);t--);t===n.length?n[t]=l:n.splice(t,0,l),u.__current.forEach((n=>{n.name===o&&n.currentIndex>=t&&n.currentIndex++}))}elseu[o]={handlers:[l],runs:0};"hookAdded"!==o&&n.doAction("hookAdded",o,i,c,s)}};vari=function(n,t,o=!1){returnfunction(i,c){consts=n[t];if(!e(i))return;if(!o&&!r(c))return;if(!s[i])return0;letu=0;if(o)u=s[i].handlers.length,s[i]={runs:s[i].runs,handlers:[]};else{constn=s[i].handlers;for(lett=n.length-1;t>=0;t--)n[t].namespace===c&&(n.splice(t,1),u++,s.__current.forEach((n=>{n.name===i&&n.currentIndex>=t&&n.currentIndex--})))}return"hookRemoved"!==i&&n.doAction("hookRemoved",i,c),u}};varc=function(n,t){returnfunction(r,e){consto=n[t];returnvoid0!==e?rino&&o[r].handlers.some((n=>n.namespace===e)):rino}};vars=function(n,t,r=!1){returnfunction(e,...o){consti=n[t];i[e]||(i[e]={handlers:[],runs:0}),i[e].runs++;constc=i[e].handlers;if(!c||!c.length)returnr?o[0]:void0;consts={name:e,currentIndex:0};for(i.__current.push(s);s.currentIndex<c.length;){constn=c[s.currentIndex].callback.apply(null,o);r&&(o[0]=n),s.currentIndex++}returni.__current.pop(),r?o[0]:void0}};varu=function(n,t){returnfunction(){varr;conste=n[t];returnnull!==(r=e.__current[e.__current.length-1]?.name)&&void0!==r?r:null}};varl=function(n,t){returnfunction(r){conste=n[t];returnvoid0===r?void0!==e.__current[0]:!!e.__current[0]&&r===e.__current[0].name}};vara=function(n,t){returnfunction(r){consto=n[t];if(e(r))returno[r]&&o[r].runs?o[r].runs:0}};classd{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=o(this,"actions"),this.addFilter=o(this,"filters"),this.removeAction=i(this,"actions"),this.removeFilter=i(this,"filters"),this.hasAction=c(this,"actions"),this.hasFilter=c(this,"filters"),this.removeAllActions=i(this,"actions",!0),this.removeAllFilters=i(this,"filters",!0),this.doAction=s(this,"actions"),this.applyFilters=s(this,"filters",!0),this.currentAction=u(this,"actions"),this.cu