yox
Version:
A lightweight mvvm framework
3 lines (2 loc) • 17.9 kB
JavaScript
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).Yox=n()}(this,(function(){"use strict";var t=!0,n=!1,e=null,r=void 0,o="undefined",i="function",u="length",s=".",a=typeof window!==o?window:r,f=function(){},c=Object.freeze({}),p=Object.freeze([]),h="",l=/yox/.test(f.toString())?2:3,v={leftDelimiter:"{",rightDelimiter:"}",uglifyCompiled:n,minifyCompiled:n,logLevel:l};function y(t){return typeof t===i}function d(t){return Array.isArray(t)}function g(t){return t!==e&&"object"==typeof t}function m(t){return"string"==typeof t}function b(t){return"number"==typeof t&&!isNaN(t)}function w(e){return e===t||e===n}function x(t){return!isNaN(t-parseFloat(t))}var E=Object.freeze({__proto__:null,func:y,array:d,object:g,string:m,number:b,boolean:w,numeric:x});function k(t,n,e){return d(e)?t.apply(n,e):n!==r?t.call(n,e):e!==r?t(e):t()}var $=function(t,n){this.type=t,this.phase=$.PHASE_CURRENT,n&&(this.originalEvent=n)};function O(t,e,r){var o=t.length;if(o)if(r)for(var i=o-1;i>=0&&e(t[i],i)!==n;i--);else for(var u=0;u<o&&e(t[u],u)!==n;u++);}function A(t,n){t[t.length]=n}function D(t,n){t.unshift(n)}function _(t,n,e){d(n)?O(n,(function(n){e(t,n)})):e(t,n)}function C(t,n){_(t,n,A)}function j(t,n){_(t,n,D)}function T(t,e,r){var o=-1;return O(t,(function(t,i){if(r===n?t==e:t===e)return o=i,n})),o}function P(e,r,o){var i=0;return O(e,(function(t,u){(o===n?t==r:t===r)&&(e.splice(u,1),i++)}),t),i}function S(t,n,e){return T(t,n,e)>=0}function z(t,n,e){var r={};return O(t,(function(t){r[n?t[n]:t]=e||t})),r}function R(t,n){return t.join(n)}function N(t){return!d(t)||!t.length}$.is=function(t){return t instanceof $},$.prototype.preventDefault=function(){var n=this;if(!n.isPrevented){var e=n.originalEvent;e&&e.preventDefault(),n.isPrevented=t}return n},$.prototype.stopPropagation=function(){var n=this;if(!n.isStoped){var e=n.originalEvent;e&&e.stopPropagation(),n.isStoped=t}return n},$.prototype.prevent=function(){return this.preventDefault()},$.prototype.stop=function(){return this.stopPropagation()},$.PHASE_CURRENT=0,$.PHASE_UPWARD=1,$.PHASE_DOWNWARD=-1;var W=Object.freeze({__proto__:null,each:O,push:C,unshift:j,indexOf:T,last:function(t){var n=t.length;if(n>0)return t[n-1]},pop:function(t){if(t.length>0)return t.pop()},remove:P,has:S,toArray:function(t){return d(t)?t:k(p.slice,t)},toObject:z,join:R,falsy:N});function F(t){return y(t)&&function(t,n){return t!=e&&t.toString?t.toString():n!==r?n:h}(t).indexOf("[native code]")>=0}var U=function(){var t=Object.create(e);return{get:function(n){return t[n]},set:function(n,e){t[n]=e},has:function(n){return n in t},keys:function(){return Object.keys(t)}}};function H(t){var n=U();return function(e){var o=n.get(e);if(o!==r)return o;var i=t(e);return n.set(e,i),i}}function I(t){var n=U();return function(e,r){var o=n.get(e);if(o){var i=o.get(r);if(i)return i}else o=U(),n.set(e,o);var u=t(e,r);return o.set(r,u),u}}var M=/-([a-z])/gi,Y=/\B([A-Z])/g,K=/^[a-z]/,L=H((function(t){return t.replace(M,(function(t,n){return X(n)}))})),V=H((function(t){return t.replace(Y,(function(t,n){return"-"+tt(n)}))})),B=H((function(t){return t.replace(K,X)}));function G(t,n,e){return b(e)?n===e?h:t.slice(n,e):t.slice(n)}function Z(t,n,e){return t.indexOf(n,e!==r?e:0)}function q(t,n,e){return t.lastIndexOf(n,e!==r?e:t.length)}function J(t,n){return 0===Z(t,n)}function Q(t,n){return t.charCodeAt(n||0)}function X(t){return t.toUpperCase()}function tt(t){return t.toLowerCase()}function nt(t,n){return Z(t,n)>=0}function et(n,r){var o=Object.create(e);return O(n.split(r||","),(function(n){o[n]=t})),o}function rt(t){return!m(t)||!t.length}var ot=Object.freeze({__proto__:null,camelize:L,hyphenate:V,capitalize:B,repeat:function(t,n){return R(new Array(n+1),t)},trim:function(t){return rt(t)?h:t.trim()},slice:G,indexOf:Z,lastIndexOf:q,startsWith:J,endsWith:function(t,n){var e=t.length-n.length;return e>=0&&q(t,n)===e},charAt:function(t,n){return t.charAt(n||0)},codeAt:Q,upper:X,lower:tt,has:nt,toMap:et,falsy:rt}),it=/\./g,ut=/\*/g,st=/\*\*/g,at=I((function(t,n){return t===n||J(t,n+=s)?n.length:-1})),ft=H((function(t){return Z(t,s)<0?[t]:t.split(s)}));function ct(t,e){for(var r=m(t)?ft(t):t,o=0,i=r.length-1;o<=i&&e(r[o],o,i)!==n;o++);}var pt=I((function(t,n){return t&&n?t+s+n:t||n})),ht=H((function(t){return nt(t,"*")})),lt=H((function(t){return new RegExp("^"+t.replace(it,"\\.").replace(ut,"(\\w+)").replace(st,"([.\\w]+?)")+"$")})),vt=I((function(t,n){var e=t.match(lt(n));return e?e[1]:r})),yt={value:r};function dt(t){return Object.keys(t)}function gt(t,e){for(var r in t)if(e(t[r],r)===n)break}function mt(t,n){return gt(n,(function(n,e){t[e]=n})),t}function bt(t,n){var e=t;return d(t)?n?(e=[],O(t,(function(t,r){e[r]=bt(t,n)}))):e=t.slice():g(t)&&(e={},gt(t,(function(t,r){e[r]=n?bt(t,n):t}))),e}function wt(t){return y(t.get)?t.get():t}function xt(t,o,i){var u=t;return ct(o,(function(t,o,s){if(u==e)return u=r,n;var a=u[t],f=a!==r;a&&(a=(i||wt)(a)),o===s?f?(yt.value=a,u=yt):u=r:u=a})),u}var Et=Object.freeze({__proto__:null,keys:dt,each:gt,extend:mt,merge:function(t,n){return t&&n?mt(mt({},t),n):t||n},copy:bt,get:xt,set:function(t,e,r,o){var i=t;ct(e,(function(t,e,u){if(e===u)i[t]=r;else if(i[t])i=i[t];else{if(!o)return n;i=i[t]={}}}))},has:function(t,n){return t[n]!==r},falsy:function(t){return!g(t)||d(t)||!dt(t).length}}),kt=typeof console!==o?console:e,$t=a&&/edge|msie|trident/i.test(a.navigator.userAgent)?h:"%c",Ot=kt?$t?function(t,n,e){kt.log($t+t,e,n)}:function(t,n){kt.log(t,n)}:f;function At(){var t=v.logLevel;return t>=1&&t<=5?t:l}function Dt(t){return"background-color:"+t+";border-radius:12px;color:#fff;font-size:10px;padding:3px 6px;"}var _t=Object.freeze({__proto__:null,DEBUG:1,INFO:2,WARN:3,ERROR:4,FATAL:5,debug:function(t,n){At()<=1&&Ot(n||"Yox debug",t,Dt("#999"))},info:function(t,n){At()<=2&&Ot(n||"Yox info",t,Dt("#2db7f5"))},warn:function(t,n){At()<=3&&Ot(n||"Yox warn",t,Dt("#f90"))},error:function(t,n){At()<=4&&Ot(n||"Yox error",t,Dt("#ed4014"))},fatal:function(t,n){if(At()<=5)throw new Error("["+(n||"Yox fatal")+"]: "+t)}}),Ct=function(t){this.ns=t||n,this.listeners={}};function jt(n,e){return n?n===e.listener:t}function Tt(n,e){var r=e.ns;return r&&n?r===n:t}Ct.prototype.fire=function(e,o,i){var u=this,s=m(e)?u.toEvent(e):e,a=u.listeners[s.type],f=t;if(a){a=a.slice();for(var c=o&&$.is(o[0])?o[0]:r,p=0,h=a.length;p<h;p++){var l=a[p];if(Tt(s.ns,l)&&S(a,l)&&(!i||i(s,o,l))){var v=k(l.listener,l.ctx,o);if(l.num=l.num?l.num+1:1,l.num===l.max&&u.off(s.type,{ns:s.ns,listener:l.listener}),c&&(v===n?c.prevent().stop():c.isStoped&&(v=n)),v===n){f=n;break}}}}return f},Ct.prototype.on=function(t,n){var e=this.listeners,r=y(n)?{listener:n}:n;if(g(r)&&y(r.listener)){if(!m(r.ns)){var o=this.toEvent(t);r.ns=o.ns,t=o.type}C(e[t]||(e[t]=[]),r)}},Ct.prototype.off=function(n,e){var r=this,o=r.listeners;if(n){var i=r.toFilter(n,e),u=function(n,e){O(n,(function(t,e){jt(i.listener,t)&&Tt(i.ns,t)&&n.splice(e,1)}),t),n.length||delete o[e]};i.type?o[i.type]&&u(o[i.type],i.type):i.ns&>(o,u)}else r.listeners={}},Ct.prototype.has=function(e,r){var o=this.listeners,i=this.toFilter(e,r),u=t,s=function(t){return O(t,(function(t){if(jt(i.listener,t)&&Tt(i.ns,t))return u=n})),u};return i.type?o[i.type]&&s(o[i.type]):i.ns&>(o,s),!u},Ct.prototype.toEvent=function(t){var n={type:t,ns:h};if(this.ns){var e=Z(t,s);e>=0&&(n.type=G(t,0,e),n.ns=G(t,e+1))}return n},Ct.prototype.toFilter=function(t,n){var e;if(m((e=n?y(n)?{listener:n}:n:{}).ns))e.type=t;else{var r=this.toEvent(t);e.type=r.type,e.ns=r.ns}return e},typeof setImmediate===i&&F(setImmediate)&&setImmediate;var Pt,St=typeof MessageChannel===i&&F(MessageChannel)?function(t){var n=new MessageChannel;n.port1.onmessage=t,n.port2.postMessage(1)}:setTimeout,zt=function(t){this.tasks=[],this.hooks=t||c};zt.shared=function(){return Pt||(Pt=new zt)},zt.prototype.append=function(t,n){var e=this,r=e.tasks;C(r,{fn:t,ctx:n}),1===r.length&&St((function(){e.run()}))},zt.prototype.prepend=function(t,n){var e=this,r=e.tasks;j(r,{fn:t,ctx:n}),1===r.length&&St((function(){e.run()}))},zt.prototype.clear=function(){this.tasks.length=0},zt.prototype.run=function(){var t=this,n=t.tasks,e=t.hooks,r=n.length;if(r){t.tasks=[],e.beforeTask&&e.beforeTask();for(var o=0;o<r;o++)k(n[o].fn,n[o].ctx);e.afterTask&&e.afterTask()}},et("abstract,goto,native,static,enum,implements,package,super,byte,export,import,private,protected,public,synchronized,char,extends,int,throws,class,final,interface,transient,yield,let,const,float,double,boolean,long,short,volatile,default");function Rt(t){var n=t.input,e=t.getter;t.value=n?e.apply(r,n):e()}var Nt=function(){this.map={},this.list=[]};Nt.prototype.add=function(t,n){var e=this.map[t.id]||(this.map[t.id]={});e[n]||(e[n]=t,this.list.push([t,n]))},Nt.prototype.watch=function(t){var n=this.list;if(n)for(var e=0,r=n.length;e<r;e++)n[e][0].watch(n[e][1],t)},Nt.prototype.unwatch=function(t){var n=this.list;if(n)for(var e=0,r=n.length;e<r;e++)n[e][0].unwatch(n[e][1],t)};var Wt=function(t,n,e,r,o,i,u,s){var a=this;a.status=1,a.keypath=t,a.cache=n,a.input=r,a.output=o,a.setter=u,a.getter=i,a.onChange=s,a.watcherOptions={sync:e,watcher:function(){a.refresh()}}};function Ft(t,n){return x(t)?+t:n!==r?n:0}function Ut(t,n){if(t==e||n===h)return t;var r=xt(t,n);return r?r.value:void 0}function Ht(n,e,o,i,s,a){var f=function(t,e,o){if(e!==o){for(var u=pt(n,t),f=0;f<s;f++){var c=i[f];vt(u,c)!==r&&a(c,u,e,o)}Ht(u,e,o,i,s,a)}};(function(n,e,o){var i=m(n),s=m(e);if(i||s)return o(u,i?n.length:r,s?e.length:r),t})(e,o,f)||function(n,e,o){var i=d(n),s=d(e);if(i||s){var a=i?n.length:r,f=s?e.length:r;o(u,a,f);for(var c=0,p=Math.max(a||0,f||0);c<p;c++)o(h+c,i?n[c]:r,s?e[c]:r);return t}}(e,o,f)||function(n,e,o){var i=g(n),u=g(e);if(i||u){var s=U(),a=i?n:c,f=u?e:c;if(i)for(var p in a){var h=a[p];h!==f[p]&&(s.set(p,t),o(p,h,f[p]))}if(u)for(var l in f){var v=f[l];s.get(l)===r&&v!==a[l]&&o(l,a[l],v)}}}(e,o,f)}function It(t,n,e,o,i,u){var s;for(var a in o)if(ht(a))vt(t,a)!==r?u(a,t,n,e):i&&(s?s.push(a):s=[a]);else{var f=at(a,t);if(f>=0){var c=G(a,f),p=Ut(n,c),h=Ut(e,c);p!==h&&u(a,a,p,h)}}s&&Ht(t,n,e,s,s.length,u)}Wt.prototype.get=function(){var t=this,n=t.status,e=t.watcherOptions;if(t.cache){if(2!==n)if(t.staticDeps)Rt(t);else{var o=t.dynamicDeps;o&&o.unwatch(e.watcher),t.dynamicDeps=r;var i=Wt.current;Wt.current=t,Rt(t),Wt.current=i,(o=t.dynamicDeps)&&o.watch(e)}}else Rt(t);return 2!==n&&(t.status=2),function(t){var n=t.value,e=t.output;return e?e(n):n}(t)},Wt.prototype.set=function(t){var n=this.setter;n?n(t):y(t)&&(this.getter=t,this.refresh())},Wt.prototype.refresh=function(){var t=this.value;this.status=3;var n=this.get();n!==t&&this.onChange(this.keypath,n,t)},Wt.prototype.addStaticDeps=function(t,n){for(var e=this.staticDeps||(this.staticDeps=new Nt),r=0,o=n.length;r<o;r++)e.add(t,n[r]);e.watch(this.watcherOptions)},Wt.prototype.addDynamicDep=function(t,n){(this.dynamicDeps||(this.dynamicDeps=new Nt)).add(t,n)};var Mt={watcher:f};function Yt(n,e){return y(n)?(Mt.watcher=n,Mt.immediate=e===t,Mt):n}var Kt=0,Lt=function(t,n,e){var r=this;r.id=Kt++,r.data=t||{},r.context=n||r,r.nextTask=e||new zt,r.syncEmitter=new Ct,r.asyncEmitter=new Ct,r.asyncOldValues={},r.asyncKeypaths={},r.onComputedChange=function(t,n,e){r.diff(t,n,e)}};Lt.prototype.get=function(t,n,e){var r=this.data,o=Wt.current;if(t===h)return r;o&&!e&&o.addDynamicDep(this,t);var i=xt(r,t);return i?i.value:n},Lt.prototype.set=function(t,n){var e=this,r=e.data,o=function(t,n){var o,i=e.get(t);n!==i&&(ct(t,(function(t,e,i){if(0!==e)o&&(e===i?o[t]=n:o=o[t]||(o[t]={}));else{var u=r[t];u&&u instanceof Wt?0===i?u.set(n):o=u.get():0===i?r[t]=n:o=r[t]||(r[t]={})}})),e.diff(t,n,i))};if(m(t))o(t,n);else if(g(t))for(var i in t)o(i,t[i])},Lt.prototype.diff=function(n,e,r){var o=this,i=o.syncEmitter,u=o.asyncEmitter,s=o.asyncOldValues,a=o.asyncKeypaths,f=36!==Q(n);It(n,e,r,i.listeners,f,(function(t,n,e,r){i.fire({type:t,ns:h},[e,r,n])})),It(n,e,r,u.listeners,f,(function(n,e,r,i){for(var f=u.listeners[n],c=0,p=f.length;c<p;c++)f[c].count++;a[e]||(s[e]=i,a[e]={}),a[e][n]=t,o.pending||(o.pending=t,o.nextTask.append((function(){o.pending&&o.diffAsync()})))}))},Lt.prototype.diffAsync=function(){var t=this,n=t.asyncEmitter,e=t.asyncOldValues,o=t.asyncKeypaths;t.pending=r,t.asyncOldValues={},t.asyncKeypaths={};var i=function(r){var i=[t.get(r),e[r],r],u=o[r],s=i[0]!==i[1],a=function(t,n,e){if(e.count)return e.count--,s};for(var f in u)n.fire({type:f,ns:h},i,a)};for(var u in e)i(u)},Lt.prototype.addComputed=function(n,e){var r,o,i,u,s,a=this,f=a.context,c=t,p=t;if(y(e))i=e.bind(f);else if(g(e)){var h=e;w(h.cache)&&(c=h.cache),w(h.sync)&&(p=h.sync),d(h.deps)&&(r=h.deps),N(h.input)||(o=h.input),y(h.output)&&(s=h.output),y(h.get)&&(i=h.get.bind(f)),y(h.set)&&(u=h.set.bind(f))}if(i){var l=new Wt(n,c,p,o,s,i,u,a.onComputedChange);return c&&r&&l.addStaticDeps(a,r),a.data[n]=l}},Lt.prototype.removeComputed=function(t){delete this.data[t]},Lt.prototype.watch=function(t,n,e){var o=this,i=o.context,u=o.syncEmitter,s=o.asyncEmitter,a=function(t,n){var e=n.sync?u:s,a={ns:h,listener:n.watcher,ctx:i,count:0};n.once&&(a.max=1),e.on(t,a),n.immediate&&n.watcher.call(i,o.get(t),r,t)};if(m(t))a(t,Yt(n,e));else for(var f in t)a(f,Yt(t[f]))},Lt.prototype.unwatch=function(t,n){this.syncEmitter.off(t,n),this.asyncEmitter.off(t,n)},Lt.prototype.toggle=function(t){var n=!this.get(t);return this.set(t,n),n},Lt.prototype.increase=function(t,n,e){var r=Ft(this.get(t),0)+(n||1);if(!b(e)||r<=e)return this.set(t,r),r},Lt.prototype.decrease=function(t,n,e){var r=Ft(this.get(t),0)-(n||1);if(!b(e)||r>=e)return this.set(t,r),r},Lt.prototype.insert=function(e,r,o){var i=this.get(e),u=(i=d(i)?i.slice():[]).length;if(o===t||o===u)i.push(r);else if(o===n||0===o)i.unshift(r);else{if(!(o>0&&o<u))return;i.splice(o,0,r)}return this.set(e,i),t},Lt.prototype.append=function(n,e){return this.insert(n,e,t)},Lt.prototype.prepend=function(t,e){return this.insert(t,e,n)},Lt.prototype.removeAt=function(n,e){var r=this.get(n);if(d(r)&&e>=0&&e<r.length)return(r=r.slice()).splice(e,1),this.set(n,r),t},Lt.prototype.remove=function(n,e){var r=this.get(n);if(d(r)&&P(r=r.slice(),e))return this.set(n,r),t},Lt.prototype.copy=function(t,n){return bt(t,n)},Lt.prototype.destroy=function(){var t=this;t.syncEmitter.off(),t.asyncEmitter.off(),t.nextTask.clear(),t.data={}};var Vt=function(n){var e=this,r=n||c;e.$emitter=new Ct(t),r.events&&e.on(r.events);var o=r.data,i=r.props;r.vnode,r.propTypes;var u=r.computed,s=r.methods,a=r.watchers,f=r.extensions;e.$options=r,f&&mt(e,f);var p=i?bt(i):{},h=e.$observer=new Lt(p,e,e.$nextTask=new zt);u&>(u,(function(t,n){h.addComputed(n,t)}));var l=y(o)?o.call(e,n):o;g(l)&>(l,(function(t,n){p[n]=t})),s&>(s,(function(t,n){e[n]=t})),a&&h.watch(a)};Vt.define=function(t){return t},Vt.use=function(t){t.install(Vt)},Vt.nextTick=function(t,n){zt.shared().append(t,n)},Vt.compile=function(t,n){return t},Vt.directive=function(t,n){},Vt.transition=function(t,n){},Vt.component=function(t,n){},Vt.filter=function(t,n){},Vt.method=function(t,n){if(m(t)&&!n)return Bt[t];!function(t,n,e,r){m(n)?Gt(t,n,e,r):gt(n,(function(n,e){Gt(t,e,n,r)}))}(Bt,t,n)},Vt.prototype.get=function(t,n){return this.$observer.get(t,n)},Vt.prototype.set=function(t,n){var e=this.$observer;e&&e.set(t,n)},Vt.prototype.on=function(t,n){return qt(this,t,n),this},Vt.prototype.once=function(n,e){return qt(this,n,e,t),this},Vt.prototype.off=function(t,n){return this.$emitter.off(t,n),this},Vt.prototype.fire=function(n,e,o){var i,u=this,s=u.$emitter,a=u.$parent,f=u.$children;if($.is(n))i=n;else if(m(n))i=new $(n);else{var c=n;(i=new $(c.type)).ns=c.ns}if(i.ns===r){var p=s.toEvent(i.type);i.type=p.type,i.ns=p.ns}i.target||(i.target=u);var h,l=[i];return g(e)?C(l,e):e===t&&(o=t),(h=o&&i.target===u?t:s.fire(i,l))&&(o?f&&(i.phase=$.PHASE_DOWNWARD,O(f,(function(n){return h=n.fire(i,e,t)}))):a&&(i.phase=$.PHASE_UPWARD,h=a.fire(i,e))),h},Vt.prototype.watch=function(t,n,e){return this.$observer.watch(t,n,e),this},Vt.prototype.unwatch=function(t,n){return this.$observer.unwatch(t,n),this},Vt.prototype.loadComponent=function(t,n){},Vt.prototype.createComponent=function(t,n){return this},Vt.prototype.directive=function(t,n){},Vt.prototype.transition=function(t,n){},Vt.prototype.component=function(t,n){},Vt.prototype.filter=function(t,n){},Vt.prototype.forceUpdate=function(t){},Vt.prototype.render=function(){},Vt.prototype.update=function(t,n){},Vt.prototype.checkProp=function(t,n){},Vt.prototype.destroy=function(){var t=this;t.$parent,t.$options;var n=t.$emitter;t.$observer.destroy(),n.off(),t.$el=r},Vt.prototype.nextTick=function(t){this.$nextTask.append(t,this)},Vt.prototype.toggle=function(t){return this.$observer.toggle(t)},Vt.prototype.increase=function(t,n,e){return this.$observer.increase(t,n,e)},Vt.prototype.decrease=function(t,n,e){return this.$observer.decrease(t,n,e)},Vt.prototype.insert=function(t,n,e){return this.$observer.insert(t,n,e)},Vt.prototype.append=function(t,n){return this.$observer.append(t,n)},Vt.prototype.prepend=function(t,n){return this.$observer.prepend(t,n)},Vt.prototype.removeAt=function(t,n){return this.$observer.removeAt(t,n)},Vt.prototype.remove=function(t,n){return this.$observer.remove(t,n)},Vt.prototype.copy=function(t,n){return this.$observer.copy(t,n)},Vt.version="1.0.0-alpha.408",Vt.is=E,Vt.array=W,Vt.object=Et,Vt.string=ot,Vt.logger=_t,Vt.Event=$,Vt.Emitter=Ct,Vt.config=v;var Bt=Vt.prototype;function Gt(t,n,e,r){r&&r.format&&(e=r.format(e)),t[n]=e}function Zt(t,n,e){t.$emitter.on(n.type,{listener:n.listener,ns:n.ns,max:e?1:-1,ctx:t})}function qt(t,n,e,r){var o=t.$emitter;m(n)?Zt(t,o.toFilter(n,e),r):d(n)?O(n,(function(n){Zt(t,n,r)})):gt(n,(function(n,e){Zt(t,o.toFilter(e,n),r)}))}return z(dt(Bt)),Vt}));
//# sourceMappingURL=yox.min.js.map