proxy-based Twister client written with react-js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
36 KiB

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";e.DefaultRoute=n(1),e.Link=n(18),e.NotFoundRoute=n(19),e.Redirect=n(20),e.Route=n(17),e.ActiveHandler=n(15),e.RouteHandler=e.ActiveHandler,e.HashLocation=n(21),e.HistoryLocation=n(25),e.RefreshLocation=n(26),e.StaticLocation=n(27),e.TestLocation=n(28),e.ImitateBrowserBehavior=n(29),e.ScrollToTopBehavior=n(30),e.History=n(23),e.Navigation=n(31),e.State=n(32),e.createRoute=n(5).createRoute,e.createDefaultRoute=n(5).createDefaultRoute,e.createNotFoundRoute=n(5).createNotFoundRoute,e.createRedirect=n(5).createRedirect,e.createRoutesFromReactChildren=n(33),e.create=n(34),e.run=n(43)},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var i=function(t,e,n){for(var r=!0;r;){var o=t,i=e,a=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,i);if(void 0!==u){if("value"in u)return u.value;var c=u.get;return void 0===c?void 0:c.call(a)}var s=Object.getPrototypeOf(o);if(null===s)return void 0;t=s,e=i,n=a,r=!0,u=s=void 0}},a=n(2),u=n(15),c=n(17),s=function(t){function e(){r(this,e),i(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return o(e,t),e}(c);s.propTypes={name:a.string,path:a.falsy,children:a.falsy,handler:a.func.isRequired},s.defaultProps={handler:u},t.exports=s},function(t,e,n){"use strict";var r=n(3),o=n(4).PropTypes,i=n(5),a=r({},o,{falsy:function(t,e,n){return t[e]?new Error("<"+n+'> should not have a "'+e+'" prop'):void 0},route:o.instanceOf(i),router:o.func});t.exports=a},function(t,e){"use strict";function n(t,e){if(null==t)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(t),r=Object.prototype.hasOwnProperty,o=1;o<arguments.length;o++){var i=arguments[o];if(null!=i){var a=Object(i);for(var u in a)r.call(a,u)&&(n[u]=a[u])}}return n}t.exports=n},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o,i=function(){function t(t,e){for(var n=0;n<e.length;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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(3),u=n(6),c=n(7),s=n(8),l=function(){function t(e,n,o,i,a,u,c,l){r(this,t),this.name=e,this.path=n,this.paramNames=s.extractParamNames(this.path),this.ignoreScrollBehavior=!!o,this.isDefault=!!i,this.isNotFound=!!a,this.onEnter=u,this.onLeave=c,this.handler=l}return i(t,null,[{key:"createRoute",value:function(e,n){e=e||{},"string"==typeof e&&(e={path:e});var r=o;r?c(null==e.parentRoute||e.parentRoute===r,"You should not use parentRoute with createRoute inside another route's child callback; it is ignored"):r=e.parentRoute;var i=e.name,a=e.path||i;!a||e.isDefault||e.isNotFound?a=r?r.path:"/":s.isAbsolute(a)?r&&u(a===r.path||0===r.paramNames.length,'You cannot nest path "%s" inside "%s"; the parent requires URL parameters',a,r.path):a=r?s.join(r.path,a):"/"+a,e.isNotFound&&!/\*$/.test(a)&&(a+="*");var l=new t(i,a,e.ignoreScrollBehavior,e.isDefault,e.isNotFound,e.onEnter,e.onLeave,e.handler);if(r&&(l.isDefault?(u(null==r.defaultRoute,"%s may not have more than one default route",r),r.defaultRoute=l):l.isNotFound&&(u(n
this.setState(s=y)},componentWillUnmount:function(){N.stop()},render:function(){var t=N.getRouteAtDepth(0);return t?l.createElement(t.handler,this.props):null}});return N.clearAllRoutes(),t.routes&&N.addRoutes(t.routes),N}var l=n(4),f=n(7),p=n(6),h=n(24),d=n(22),y=n(29),v=n(21),m=n(25),g=n(26),b=n(27),w=n(35),O=n(33),P=n(37),R=n(38),x=n(2),C=n(40),j=n(23),k=n(39),E=n(41),L=n(5),T=n(42),S=n(8),A=h?v:"/",_=h?y:null;t.exports=s},function(t,e,n){"use strict";function r(t,e){if(!e)return!0;if(t.pathname===e.pathname)return!1;var n=t.routes,r=e.routes,o=n.filter(function(t){return-1!==r.indexOf(t)});return!o.some(function(t){return t.ignoreScrollBehavior})}var o=n(6),i=n(24),a=n(36),u={statics:{recordScrollPosition:function(t){this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[t]=a()},getScrollPosition:function(t){return this.scrollHistory||(this.scrollHistory={}),this.scrollHistory[t]||null}},componentWillMount:function(){o(null==this.constructor.getScrollBehavior()||i,"Cannot use scroll behavior without a DOM")},componentDidMount:function(){this._updateScroll()},componentDidUpdate:function(t,e){this._updateScroll(e)},_updateScroll:function(t){if(r(this.state,t)){var e=this.constructor.getScrollBehavior();e&&e.updateScrollPosition(this.constructor.getScrollPosition(this.state.path),this.state.action)}}};t.exports=u},function(t,e,n){"use strict";function r(){return o(i,"Cannot get current scroll position without a DOM"),{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}}var o=n(6),i=n(24);t.exports=r},function(t,e,n){"use strict";function r(t){return null==t||i.isValidElement(t)}function o(t){return r(t)||Array.isArray(t)&&t.every(r)}var i=n(4);t.exports=o},function(t,e,n){"use strict";function r(t,e){this.path=t,this.abortReason=null,this.retry=e.bind(this)}var o=n(39),i=n(40);r.prototype.abort=function(t){null==this.abortReason&&(this.abortReason=t||"ABORT")},r.prototype.redirect=function(t,e,n){this.abort(new i(t,e,n))},r.prototype.cancel=function(){this.abort(new o)},r.from=function(t,e,n,r){e.reduce(function(e,r,o){return function(i){if(i||t.abortReason)e(i);else if(r.onLeave)try{r.onLeave(t,n[o],e),r.onLeave.length<3&&e()}catch(a){e(a)}else e()}},r)()},r.to=function(t,e,n,r,o){e.reduceRight(function(e,o){return function(i){if(i||t.abortReason)e(i);else if(o.onEnter)try{o.onEnter(t,n,r,e),o.onEnter.length<4&&e()}catch(a){e(a)}else e()}},o)()},t.exports=r},function(t,e){"use strict";function n(){}t.exports=n},function(t,e){"use strict";function n(t,e,n){this.to=t,this.params=e,this.query=n}t.exports=n},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=t.childRoutes;if(r)for(var i,c,s=0,l=r.length;l>s;++s)if(c=r[s],!c.isDefault&&!c.isNotFound&&(i=o(c,e,n)))return i.routes.unshift(t),i;var f=t.defaultRoute;if(f&&(h=a.extractParams(f.path,e)))return new u(e,h,n,[t,f]);var p=t.notFoundRoute;if(p&&(h=a.extractParams(p.path,e)))return new u(e,h,n,[t,p]);var h=a.extractParams(t.path,e);return h?new u(e,h,n,[t]):null}var i=function(){function t(t,e){for(var n=0;n<e.length;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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(8),u=function(){function t(e,n,o,i){r(this,t),this.pathname=e,this.params=n,this.query=o,this.routes=i}return i(t,null,[{key:"findMatch",value:function(t,e){for(var n=a.withoutQuery(e),r=a.extractQuery(e),i=null,u=0,c=t.length;null==i&&c>u;++u)i=o(t[u],n,r);return i}}]),t}();t.exports=u},function(t,e){"use strict";function n(){/*! taken from modernizr
10 years ago
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
* changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
*/
var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}t.exports=n},function(t,e,n){"use strict";function r(t,e,n){"function"==typeof e&&(n=e,e=null);var r=o({routes:t,location:e});return r.run(n),r}var o=n(34);t.exports=r}])});