define(["require","exports","tslib","react"],function(t,e,r,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),a=r.__importDefault(a);var n,i="__navigator",r=(n=a.default.Component,r.__extends(o,n),o.find=function(t){for(var e=t.target;e!==t.currentTarget&&e instanceof HTMLElement;){var r=e[i];if(r instanceof o)return r;e=e.parentNode}},o.prototype.init=function(t){var e=this.target;void 0!==e&&(this.target=void 0,e[i]=void 0),null!==t&&((this.target=t)[i]=this)},o.prototype.focus=function(){this.target.focus()},o.prototype.scrollTo=function(t){var e=this.props.children;if(Array.isArray(e)){var r=this.target,n=r.scrollHeight/e.length,i=n/2,e=t%n,e=(r.scrollHeight-r.clientHeight)/2+(e+(e<-i?n:i<=e?-n:0));return r.scrollTop=e,Math.round(t/n)}return 0},o.prototype.hasStates=function(){var t=this.state;if(null==t)return!1;t=t.states;return null!=t},o.prototype.render=function(){var e=this,t=this.props,r=this.state||{},n=r.states,i=[t.className];if(null!=n)for(var o in n)!0===n[o]&&i.push(o);return a.default.createElement("div",{className:i.join(" "),tabIndex:r.tabIndex,ref:function(t){return e.init(t)}},this.props.children)},o);function o(){return null!==n&&n.apply(this,arguments)||this}e.Navigator=r});