!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";function t(t,e){for(var n=0;e.length>n;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var e,n,r,o=(e=function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function i(t,e,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var c=new o(r,i||t,s),u=n?n+e:e;return t._events[u]?t._events[u].fn?t._events[u]=[t._events[u],c]:t._events[u].push(c):(t._events[u]=c,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function c(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var t,r,o=[];if(0===this._eventsCount)return o;for(r in t=this._events)e.call(t,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(t)):o},c.prototype.listeners=function(t){var e=this._events[n?n+t:t];if(!e)return[];if(e.fn)return[e.fn];for(var r=0,o=e.length,i=Array(o);o>r;r++)i[r]=e[r].fn;return i},c.prototype.listenerCount=function(t){var e=this._events[n?n+t:t];return e?e.fn?1:e.length:0},c.prototype.emit=function(t,e,r,o,i,s){var c=n?n+t:t;if(!this._events[c])return!1;var u,f,a=this._events[c],p=arguments.length;if(a.fn){switch(a.once&&this.removeListener(t,a.fn,void 0,!0),p){case 1:return a.fn.call(a.context),!0;case 2:return a.fn.call(a.context,e),!0;case 3:return a.fn.call(a.context,e,r),!0;case 4:return a.fn.call(a.context,e,r,o),!0;case 5:return a.fn.call(a.context,e,r,o,i),!0;case 6:return a.fn.call(a.context,e,r,o,i,s),!0}for(f=1,u=Array(p-1);p>f;f++)u[f-1]=arguments[f];a.fn.apply(a.context,u)}else{var l,h=a.length;for(f=0;h>f;f++)switch(a[f].once&&this.removeListener(t,a[f].fn,void 0,!0),p){case 1:a[f].fn.call(a[f].context);break;case 2:a[f].fn.call(a[f].context,e);break;case 3:a[f].fn.call(a[f].context,e,r);break;case 4:a[f].fn.call(a[f].context,e,r,o);break;default:if(!u)for(l=1,u=Array(p-1);p>l;l++)u[l-1]=arguments[l];a[f].fn.apply(a[f].context,u)}}return!0},c.prototype.on=function(t,e,n){return i(this,t,e,n,!1)},c.prototype.once=function(t,e,n){return i(this,t,e,n,!0)},c.prototype.removeListener=function(t,e,r,o){var i=n?n+t:t;if(!this._events[i])return this;if(!e)return s(this,i),this;var c=this._events[i];if(c.fn)c.fn!==e||o&&!c.once||r&&c.context!==r||s(this,i);else{for(var u=0,f=[],a=c.length;a>u;u++)(c[u].fn!==e||o&&!c[u].once||r&&c[u].context!==r)&&f.push(c[u]);f.length?this._events[i]=1===f.length?f[0]:f:s(this,i)}return this},c.prototype.removeAllListeners=function(t){var e;return t?this._events[e=n?n+t:t]&&s(this,e):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,t.exports=c},e(r={path:n,exports:{},require:function(t,e){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},r.exports),r.exports);function i(t){if("string"!=typeof t)throw new TypeError("path must be string");return t.replace(/\]/,"").split(/[.[]/)}var s=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.bus=new o,this.rootState=t}var n,r,s;return n=e,r=[{key:"get",value:function(t){return i(t).reduce((function(t,e){if(t)return t[e]}),this.rootState)}},{key:"set",value:function(t,e){if("function"==typeof e)throw TypeError("newValue must not be a function");var n,r=i(t);r.reduce((function(t,o,i){return i===r.length-1&&(n=t[o],t[o]=e),t[o]}),this.rootState),this.bus.emit(t,e,n)}},{key:"on",value:function(){var t;return(t=this.bus).on.apply(t,arguments)}},{key:"off",value:function(){var t;return(t=this.bus).off.apply(t,arguments)}}],r&&t(n.prototype,r),s&&t(n,s),Object.defineProperty(n,"prototype",{writable:!1}),e}();window.__PRELOAD_STATE__||(window.__PRELOAD_STATE__={}),window.SL_State||(window.SL_State=new s(window.__PRELOAD_STATE__))}));