function _typeof(n){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}zk.Event=zk.$extends(zk.Object,{$init:function(n,e,t,i,r){this.currentTarget=this.target=n,this.name=e,(this.data=t)&&"object"==_typeof(t)&&!jq.isArray(t)&&zk.$default(this,t),this.opts=i||{rtags:{}},(this.domEvent=r)&&(this.domTarget=r.target)},addOptions:function(n){this.opts=zk.copy(this.opts,n)},stop:function(n){var e=!n||!n.revoke;n&&!n.propagation||(this.stopped=e),n&&!n.dom||(this.domStopped=e),n&&n.au&&(this.auStopped=e)},isPressed:function(){for(var n=0,e=!0,t=0,i=arguments.length;t<i;t++){var r=arguments[t];if(r!=zKeys.META&&r!=zKeys.ALT&&r!=zKeys.CONTROL&&r!=zKeys.SHIFT){if(1<++n)throw"Invalid key combination";r!=this.key&&(e=!1)}else if(r==zKeys.META&&!this.metaKey||r==zKeys.ALT&&!this.altKey||r==zKeys.CONTROL&&!this.ctrlKey||r==zKeys.SHIFT&&!this.shiftKey)return!1}return e}}),zWatch=function(){var h,c={onFitSize:!0,onSize:!0,onShow:!0,onHide:!0,beforeSize:!0,afterSize:!0},y={},p=zk.$extends(zk.Object,{$init:function(n,e,t,i,r){this.name=n,this.xinfs=e,this.args=t,this.origin=i,this.fns=r},fire:function(n){var e,t,i=this.name,r=this.xinfs,o=this.args,s=this.fns;if(n)for(var f=0,a=r.length;f<a;++f)r[f][0]==n&&(e=r[f][1],r.splice(f--,1),--a,u(i,e,n,o,s));else for(;t=r.shift();)u(i,t[1],t[0],o,s)},fireDown:function(n){n&&null!=n.bindLevel||this.fire(n),new p(this.name,z(this.name,this.xinfs,n,!0),this.args,this.origin,this.fns).fire()}});function u(n,e,t,i,r){for(var o,s=0,f=e.length;s<f;){var a=function(n,e,t){n=jq.isArray(n)?n[1]:e[t];if(!n)throw(e.className||e)+":"+t+" not found";return n}(e[s++],t,n);r?r.push([a,t]):a.apply(t,i)}"onSize"!=n||(o=t.onAfterSize)&&o.apply(t,i)}function v(n,e){return e.isWatchable_&&e.isWatchable_(n)}function z(n,e,t,i){var r,o=[],s=t.bindLevel,f=c[n]&&{};if(t.isWatchable_)for(var a=e.length;a--;){var u=e[a],l=u[0];if(s>l.bindLevel)break;if(!r&&f){if(!(r=v(n,t)))break;f[t.uuid]=!0}!function(n,e,t,i){for(var r=t;r;r=r.parent)if(e==r)return!i||t.isWatchable_(n,e,i)}(n,t,l,f)||(i&&e.splice(a,1),o.unshift(u))}return o}function a(n){return jq.isArray(n)?n[0]:n}function t(n){return null==(n=n.bindLevel)||isNaN(n)?-1:n}function d(n,e){return t(n[0])-t(e[0])}function b(n,e){if(n)for(var t,i,r,o,s=n.length,f=s-1;0<=s;){if(--s<0||r!=(o=n[s][1].parent)&&r){for(t=s;++t<=f;)(i=n[t])[0].apply(i[1],e);f=s}r=o}}function i(n,e,t,i){var r=y[n];if(r&&r.length){var o=t&&t.down&&null!=e.bindLevel;o&&function(){if(h)for(var n in h=!1,y){n=y[n];n.length&&null!=n[0][0].bindLevel&&n.sort(d)}}();var s=[],f=t&&t.reverse?[]:null,a=new p(n,o?z(n,r,e):function(n,e){if(e=e.$clone(),c[n])for(var t=e.length;t--;)v(n,e[t][0])||e.splice(t,1);return e}(n,r),s,e,f);s.push(a);for(var u=2,l=i.length;u<l;)s.push(i[u++]);t&&0<=t.timeout?setTimeout(function(){a.fire(),b(f,s),zk._zsyncFns(n,e)},t.timeout):(a.fire(),b(f,s),zk._zsyncFns(n,e))}else zk._zsyncFns(n,e)}return zk._zsyncFns=function(n,e){"onSize"!=n&&"onShow"!=n&&"onHide"!=n||(jq.zsync(e),"onSize"==n&&setTimeout(zk.doAfterResize,20)),"onResponse"==n&&jq.doSyncScroll()},{listen:function(n){for(var e in n){var t=y[e],i=n[e],r=a(i),o=[r,[i]];if(t){var s=r.bindLevel;if(null!=s)for(var f=t.length;;){if(--f<0){t.unshift(o);break}if(t[f][0]==r){!function(n,e){if(n){if(jq.isArray(e)){for(var t=!1,i=n.length;0<i;i--)if(jq.isArray(n[i])&&n[i].$equals(e)){t=!0;break}return t}return n.$contains(e)}}(t[f][1],i)&&t[f][1].push(i);break}if(s>=t[f][0].bindLevel){t.splice(f+1,0,o);break}}else for(f=t.length;;){if(--f<0){t.push(o);break}if(t[f][0]==r){t[f][1].push(i);break}}}else y[e]=[o]}},unlisten:function(n){for(var e in n){var t=y[e];if(t)for(var i=n[e],r=a(i),o=t.length;o--;)if(t[o][0]==r&&t[o][1].$remove(i)){t[o][1].length||t.splice(o,1);break}}},unlistenAll:function(n){delete y[n]},fire:function(n,e,t){i(n,e,t,arguments)},fireDown:function(n,e,t){i(n,e,zk.copy(t,{down:!0}),arguments)},onBindLevelMove:function(){h=!0}}}(),zWatch.listen({onBindLevelMove:zWatch});