react-reflex
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -1,3 +0,3 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports["react-reflex"]=t(require("react"),require("react-dom")):e["react-reflex"]=t(e.React,e.ReactDOM)}(window,(function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){e.exports=n(25)()},function(t,n){t.exports=e},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(20),i=n(21),o=n(22);e.exports=function(e){return r(e)||i(e)||o()}},function(e,t,n){var r=n(3);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),i.forEach((function(t){r(e,t,n[t])}))}return e}},function(e,n){e.exports=t},function(e,t,n){var r=n(23),i=n(0);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=n(28)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),s=(f(o),f(n(1))),a=f(n(31)),u=f(n(32)),c=f(n(33));function f(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.default=function(e){return function(t){var n,f;return f=n=function(n){function s(){var t,n,r;l(this,s);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=h(this,(t=s.__proto__||Object.getPrototypeOf(s)).call.apply(t,[this].concat(o))),r.state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},r.measure=function(t){var n=(0,c.default)(r._node,e||(0,u.default)(r.props));t&&(n.entry=t[0].contentRect),r.setState({contentRect:n}),"function"==typeof r.props.onResize&&r.props.onResize(n)},r._handleRef=function(e){r._resizeObserver&&(e?r._resizeObserver.observe(e):r._resizeObserver.disconnect(r._node)),r._node=e,"function"==typeof r.props.innerRef&&r.props.innerRef(e)},h(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,n),i(s,[{key:"componentWillMount",value:function(){this._resizeObserver=new a.default(this.measure)}},{key:"componentWillUnmount",value:function(){this._resizeObserver&&this._node&&this._resizeObserver.disconnect(this._node),this._resizeObserver=null}},{key:"render",value:function(){var e=this.props,n=(e.innerRef,e.onResize,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["innerRef","onResize"]));return(0,o.createElement)(t,r({},n,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))}}]),s}(o.Component),n.propTypes={client:s.default.bool,offset:s.default.bool,scroll:s.default.bool,bounds:s.default.bool,margin:s.default.bool,innerRef:s.default.func,onResize:s.default.func},f}}},function(e,t){function n(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,u,"next",e)}function u(e){n(s,i,o,a,u,"throw",e)}a(void 0)}))}}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt,a="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")(),f=Object.prototype.toString,l=Math.max,h=Math.min,p=function(){return c.Date.now()};function d(e,t,n){var r,i,o,s,a,u,c=0,f=!1,d=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=i;return r=i=void 0,c=t,s=e.apply(o,n)}function g(e){return c=e,a=setTimeout(x,t),f?b(e):s}function w(e){var n=e-u;return void 0===u||n>=t||n<0||d&&e-c>=o}function x(){var e=p();if(w(e))return _(e);a=setTimeout(x,function(e){var n=t-(e-u);return d?h(n,o-(e-c)):n}(e))}function _(e){return a=void 0,y&&r?b(e):(r=i=void 0,s)}function O(){var e=p(),n=w(e);if(r=arguments,i=this,u=e,n){if(void 0===a)return g(u);if(d)return a=setTimeout(x,t),b(u)}return void 0===a&&(a=setTimeout(x,t)),s}return t=m(t)||0,v(n)&&(f=!!n.leading,o=(d="maxWait"in n)?l(m(n.maxWait)||0,t):o,y="trailing"in n?!!n.trailing:y),O.cancel=function(){void 0!==a&&clearTimeout(a),c=0,r=u=i=a=void 0},O.flush=function(){return void 0===a?s:_(p())},O}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==f.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=i.test(e);return a||o.test(e)?s(e.slice(2),a?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return v(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),d(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(14))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withContentRect=t.default=void 0;var r=o(n(30)),i=o(n(15));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.withContentRect=i.default},function(e,t,n){e.exports=n(34)},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(26);function i(){}e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var i,o,s=0|t,a=Math.max(s>=0?s:r-Math.abs(s),0);for(;a<r;){if((i=n[a])===(o=e)||"number"==typeof i&&"number"==typeof o&&isNaN(i)&&isNaN(o))return!0;a++}return!1}}),Math.sign||(Math.sign=function(e){return(e>0)-(e<0)||+e})},function(e,t,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(29),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",u="object"==typeof e,c=t.regeneratorRuntime;if(c)u&&(e.exports=c);else{(c=t.regeneratorRuntime=u?e.exports:{}).wrap=v;var f={},l={};l[o]=function(){return this};var h=Object.getPrototypeOf,p=h&&h(h(M([])));p&&p!==n&&r.call(p,o)&&(l=p);var d=g.prototype=y.prototype=Object.create(l);b.prototype=d.constructor=g,g.constructor=b,g[a]=b.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(d),e},c.awrap=function(e){return{__await:e}},w(x.prototype),x.prototype[s]=function(){return this},c.AsyncIterator=x,c.async=function(e,t,n,r){var i=new x(v(e,t,n,r));return c.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(d),d[a]="Generator",d[o]=function(){return this},d.toString=function(){return"[object Generator]"},c.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=M,z.prototype={constructor:z,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:M(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}}}function v(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=Object.create(i.prototype),s=new z(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===f)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=m(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,s),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function y(){}function b(){}function g(){}function w(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function x(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,s){var a=m(e[n],e,i);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,o,s)}),(function(e){t("throw",e,o,s)})):Promise.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return t("throw",e,o,s)}))}s(a.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=m(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function z(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function M(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:R}}function R(){return{value:void 0,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i(n(2));var r=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var o=(0,i(n(15)).default)()((function(e){var t=e.measure,n=e.measureRef,r=e.contentRect;return(0,e.children)({measure:t,measureRef:n,contentRect:r})}));o.displayName="Measure",o.propTypes.children=r.default.func,t.default=o},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},s=["top","right","bottom","left","width","height","size","weight"],a="undefined"!=typeof MutationObserver,u=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function s(){n&&(n=!1,e()),r&&u()}function a(){o(s)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(a,t);i=e}return u}(this.refresh.bind(this),20)};u.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},u.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},u.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},u.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},u.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),a?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},u.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},u.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),s.some((function(e){return!!~t.indexOf(e)}))&&this.refresh()},u.getInstance=function(){return this.instance_||(this.instance_=new u),this.instance_},u.instance_=null;var c=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},f=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},l=y(0,0,0,0);function h(e){return parseFloat(e)||0}function p(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function d(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return l;var r=f(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,s=i.top+i.bottom,a=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==t&&(a-=p(r,"left","right")+o),Math.round(u+s)!==n&&(u-=p(r,"top","bottom")+s)),!function(e){return e===f(e).document.documentElement}(e)){var c=Math.round(a+o)-t,d=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(d)&&(u-=d)}return y(i.left,i.top,a,u)}var v="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof f(e).SVGGraphicsElement}:function(e){return e instanceof f(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?v(e)?function(e){var t=e.getBBox();return y(0,0,t.width,t.height)}(e):d(e):l}function y(e,t,n,r){return{x:e,y:t,width:n,height:r}}var b=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=y(0,0,0,0),this.target=e};b.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},b.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var g=function(e,t){var n,r,i,o,s,a,u,f=(r=(n=t).x,i=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(a.prototype),c(u,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),u);c(this,{target:e,contentRect:f})},w=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};w.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new b(e)),this.controller_.addObserver(this),this.controller_.refresh())}},w.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof f(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},w.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},w.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},w.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new g(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},w.prototype.clearActive=function(){this.activeObservations_.splice(0)},w.prototype.hasActive=function(){return this.activeObservations_.length>0};var x="undefined"!=typeof WeakMap?new WeakMap:new n,_=function(e){if(!(this instanceof _))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=u.getInstance(),n=new w(e,t,this);x.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){_.prototype[e]=function(){return(t=x.get(this))[e].apply(t,arguments);var t}}));var O=void 0!==i.ResizeObserver?i.ResizeObserver:_;t.default=O}.call(this,n(14))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return r.forEach((function(n){e[n]&&t.push(n)})),t};var r=["client","offset","scroll","bounds","margin"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};if(t.indexOf("client")>-1&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),t.indexOf("offset")>-1&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),t.indexOf("scroll")>-1&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),t.indexOf("bounds")>-1){var r=e.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(t.indexOf("margin")>-1){var i=getComputedStyle(e);n.margin={top:parseInt(i.marginTop),right:parseInt(i.marginRight),bottom:parseInt(i.marginBottom),left:parseInt(i.marginLeft)}}return n}},function(e,t,n){"use strict";n.r(t),n.d(t,"ReflexContainer",(function(){return L})),n.d(t,"ReflexSplitter",(function(){return j})),n.d(t,"ReflexElement",(function(){return G})),n.d(t,"ReflexHandle",(function(){return W}));var r=n(12),i=n.n(r),o=n(7),s=n.n(o),a=n(6),u=n.n(a),c=n(5),f=n.n(c),l=n(4),h=n.n(l),p=n(9),d=n.n(p),v=n(10),m=n.n(v),y=n(11),b=n.n(y),g=n(0),w=n.n(g),x=n(3),_=n.n(x),O=function(){function e(){f()(this,e)}return h()(e,null,[{key:"isBrowser",value:function(){return"undefined"!=typeof window}},{key:"isOpera",value:function(){return e.isBrowser()&&(!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0)}},{key:"isFirefox",value:function(){return e.isBrowser()&&"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(){return!!e.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isIE",value:function(){ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],t):"object"==typeof exports?exports["react-reflex"]=t(require("react"),require("react-dom")):e["react-reflex"]=t(e.React,e.ReactDOM)}(window,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=19)}([function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t,n){e.exports=n(25)()},function(t,n){t.exports=e},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){var r=n(20),i=n(21),o=n(22);e.exports=function(e){return r(e)||i(e)||o()}},function(e,t,n){var r=n(3);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}},function(e,n){e.exports=t},function(e,t,n){var r=n(23),i=n(0);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(24);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=n(28)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(2),s=(f(o),f(n(1))),a=f(n(31)),u=f(n(32)),c=f(n(33));function f(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.default=function(e){return function(t){var n,f;return f=n=function(n){function s(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var i=arguments.length,o=Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=r=l(this,(t=s.__proto__||Object.getPrototypeOf(s)).call.apply(t,[this].concat(o))),r.state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},r.measure=function(t){var n=(0,c.default)(r._node,e||(0,u.default)(r.props));t&&(n.entry=t[0].contentRect),r.setState({contentRect:n}),"function"==typeof r.props.onResize&&r.props.onResize(n)},r._handleRef=function(e){r._resizeObserver&&(e?r._resizeObserver.observe(e):r._resizeObserver.disconnect(r._node)),r._node=e,"function"==typeof r.props.innerRef&&r.props.innerRef(e)},l(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(s,o.Component),i(s,[{key:"componentWillMount",value:function(){this._resizeObserver=new a.default(this.measure)}},{key:"componentWillUnmount",value:function(){this._resizeObserver&&this._node&&this._resizeObserver.disconnect(this._node),this._resizeObserver=null}},{key:"render",value:function(){var e=this.props,n=(e.innerRef,e.onResize,function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["innerRef","onResize"]));return(0,o.createElement)(t,r({},n,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))}}]),s}(),n.propTypes={client:s.default.bool,offset:s.default.bool,scroll:s.default.bool,bounds:s.default.bool,margin:s.default.bool,innerRef:s.default.func,onResize:s.default.func},f}}},function(e,t){function n(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(i,o){var s=e.apply(t,r);function a(e){n(s,i,o,a,u,"next",e)}function u(e){n(s,i,o,a,u,"throw",e)}a(void 0)})}}},function(e,t,n){(function(t){var n="Expected a function",r=NaN,i="[object Symbol]",o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt,f="object"==typeof t&&t&&t.Object===Object&&t,l="object"==typeof self&&self&&self.Object===Object&&self,h=f||l||Function("return this")(),p=Object.prototype.toString,d=Math.max,v=Math.min,m=function(){return h.Date.now()};function y(e,t,r){var i,o,s,a,u,c,f=0,l=!1,h=!1,p=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var n=i,r=o;return i=o=void 0,f=t,a=e.apply(r,n)}function w(e){var n=e-c;return void 0===c||n>=t||n<0||h&&e-f>=s}function x(){var e=m();if(w(e))return _(e);u=setTimeout(x,function(e){var n=t-(e-c);return h?v(n,s-(e-f)):n}(e))}function _(e){return u=void 0,p&&i?y(e):(i=o=void 0,a)}function O(){var e=m(),n=w(e);if(i=arguments,o=this,c=e,n){if(void 0===u)return function(e){return f=e,u=setTimeout(x,t),l?y(e):a}(c);if(h)return u=setTimeout(x,t),y(c)}return void 0===u&&(u=setTimeout(x,t)),a}return t=g(t)||0,b(r)&&(l=!!r.leading,s=(h="maxWait"in r)?d(g(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),O.cancel=function(){void 0!==u&&clearTimeout(u),f=0,i=c=o=u=void 0},O.flush=function(){return void 0===u?a:_(m())},O}function b(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&p.call(e)==i}(e))return r;if(b(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=b(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||u.test(e)?c(e.slice(2),n?2:8):s.test(e)?r:+e}e.exports=function(e,t,r){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError(n);return b(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),y(e,t,{leading:i,maxWait:t,trailing:o})}}).call(this,n(14))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.withContentRect=t.default=void 0;var r=o(n(30)),i=o(n(15));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default,t.withContentRect=i.default},function(e,t,n){e.exports=n(34)},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(26);function i(){}e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(e,t){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var i=0|t,o=Math.max(i>=0?i:r-Math.abs(i),0);function s(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}for(;o<r;){if(s(n[o],e))return!0;o++}return!1}}),Math.sign||(Math.sign=function(e){return(e>0)-(e<0)||+e})},function(e,t,n){var r=function(){return this||"object"==typeof self&&self}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(29),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof e,f=t.regeneratorRuntime;if(f)c&&(e.exports=f);else{(f=t.regeneratorRuntime=c?e.exports:{}).wrap=w;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",v={},m={};m[s]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(j([])));b&&b!==r&&i.call(b,s)&&(m=b);var g=E.prototype=_.prototype=Object.create(m);O.prototype=g.constructor=E,E.constructor=O,E[u]=O.displayName="GeneratorFunction",f.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===O||"GeneratorFunction"===(t.displayName||t.name))},f.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(g),e},f.awrap=function(e){return{__await:e}},z(M.prototype),M.prototype[a]=function(){return this},f.AsyncIterator=M,f.async=function(e,t,n,r){var i=new M(w(e,t,n,r));return f.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},z(g),g[u]="Generator",g[s]=function(){return this},g.toString=function(){return"[object Generator]"},f.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},f.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=n)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,i){return a.type="throw",a.arg=e,t.next=r,i&&(t.method="next",t.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var u=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(u&&c){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:j(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=n),v}}}function w(e,t,n,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),s=new A(r||[]);return o._invoke=function(e,t,n){var r=l;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=R(s,n);if(a){if(a===v)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=x(e,t,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,s),o}function x(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function _(){}function O(){}function E(){}function z(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function M(e){var t;this._invoke=function(n,r){function o(){return new Promise(function(t,o){!function t(n,r,o,s){var a=x(e[n],e,r);if("throw"!==a.type){var u=a.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,o,s)},function(e){t("throw",e,o,s)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},function(e){return t("throw",e,o,s)})}s(a.arg)}(n,r,t,o)})}return t=t?t.then(o,o):o()}}function R(e,t){var r=e.iterator[t.method];if(r===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=n,R(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=x(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=n),t.delegate=null,v):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function j(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(i.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=n,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:n,done:!0}}}(function(){return this||"object"==typeof self&&self}()||Function("return this")())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});i(n(2));var r=i(n(1));function i(e){return e&&e.__esModule?e:{default:e}}var o=(0,i(n(15)).default)()(function(e){var t=e.measure,n=e.measureRef,r=e.contentRect;return(0,e.children)({measure:t,measureRef:n,contentRect:r})});o.displayName="Measure",o.propTypes.children=r.default.func,t.default=o},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}var n={size:{configurable:!0}};return n.size.get=function(){return this.__entries__.length},t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n+=1){var i=r[n];e.call(t,i[1],i[0])}},Object.defineProperties(t.prototype,n),t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},s=2,a=["top","right","bottom","left","width","height","size","weight"],u="undefined"!=typeof MutationObserver,c=function(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&c()}function u(){o(a)}function c(){var e=Date.now();if(n){if(e-i<s)return;r=!0}else n=!0,r=!1,setTimeout(u,t);i=e}return c}(this.refresh.bind(this),20)};c.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},c.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},c.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},c.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},c.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},c.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},c.prototype.onTransitionEnd_=function(e){var t=e.propertyName;void 0===t&&(t=""),a.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},c.getInstance=function(){return this.instance_||(this.instance_=new c),this.instance_},c.instance_=null;var f=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n+=1){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},h=b(0,0,0,0);function p(e){return parseFloat(e)||0}function d(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];return t.reduce(function(t,n){return t+p(e["border-"+n+"-width"])},0)}function v(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return h;var r=l(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n+=1){var i=r[n],o=e["padding-"+i];t[i]=p(o)}return t}(r),o=i.left+i.right,s=i.top+i.bottom,a=p(r.width),u=p(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==t&&(a-=d(r,"left","right")+o),Math.round(u+s)!==n&&(u-=d(r,"top","bottom")+s)),!function(e){return e===l(e).document.documentElement}(e)){var c=Math.round(a+o)-t,f=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(f)&&(u-=f)}return b(i.left,i.top,a,u)}var m="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"==typeof e.getBBox};function y(e){return r?m(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):v(e):h}function b(e,t,n,r){return{x:e,y:t,width:n,height:r}}var g=function(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e};g.prototype.isActive=function(){var e=y(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},g.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var w=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,o="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);return f(s,{x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:i+n,left:t}),s}(t);f(this,{target:e,contentRect:n})},x=function(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r};x.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},x.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},x.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},x.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},x.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new w(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},x.prototype.clearActive=function(){this.activeObservations_.splice(0)},x.prototype.hasActive=function(){return this.activeObservations_.length>0};var _="undefined"!=typeof WeakMap?new WeakMap:new n,O=function(e){if(!(this instanceof O))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var t=c.getInstance(),n=new x(e,t,this);_.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){O.prototype[e]=function(){return(t=_.get(this))[e].apply(t,arguments);var t}});var E=void 0!==i.ResizeObserver?i.ResizeObserver:O;t.default=E}.call(this,n(14))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return r.forEach(function(n){e[n]&&t.push(n)}),t};var r=["client","offset","scroll","bounds","margin"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n={};if(t.indexOf("client")>-1&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),t.indexOf("offset")>-1&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),t.indexOf("scroll")>-1&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),t.indexOf("bounds")>-1){var r=e.getBoundingClientRect();n.bounds={top:r.top,right:r.right,bottom:r.bottom,left:r.left,width:r.width,height:r.height}}if(t.indexOf("margin")>-1){var i=getComputedStyle(e);n.margin={top:parseInt(i.marginTop),right:parseInt(i.marginRight),bottom:parseInt(i.marginBottom),left:parseInt(i.marginLeft)}}return n}},function(e,t,n){"use strict";n.r(t);var r=n(12),i=n.n(r),o=n(7),s=n.n(o),a=n(6),u=n.n(a),c=n(5),f=n.n(c),l=n(4),h=n.n(l),p=n(9),d=n.n(p),v=n(10),m=n.n(v),y=n(11),b=n.n(y),g=n(0),w=n.n(g),x=n(3),_=n.n(x),O=function(){function e(){f()(this,e)}return h()(e,null,[{key:"isBrowser",value:function(){return"undefined"!=typeof window}},{key:"isOpera",value:function(){return e.isBrowser()&&(!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0)}},{key:"isFirefox",value:function(){return e.isBrowser()&&"undefined"!=typeof InstallTrigger}},{key:"isSafari",value:function(){return!!e.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}},{key:"isIE",value:function(){ | ||
/*@cc_on!@*/ | ||
return e.isBrowser()&&!!document.documentMode}},{key:"isEdge",value:function(){return e.isBrowser()&&!e.isIE()&&!!window.StyleMedia}},{key:"isChrome",value:function(){return e.isBrowser()&&!!window.chrome&&!!window.chrome.webstore}},{key:"isBlink",value:function(){return e.isBrowser()&&(e.isChrome()||e.isOpera())&&!!window.CSS}},{key:"getUserAgent",value:function(){return"undefined"==typeof navigator?"":navigator.userAgent}},{key:"isAndroid",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Android/i)}},{key:"isBlackBerry",value:function(){return e.isBrowser()&&e.getUserAgent().match(/BlackBerry/i)}},{key:"isIOS",value:function(){return e.isBrowser()&&e.getUserAgent().match(/iPhone|iPad|iPod/i)}},{key:"isOpera",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Opera Mini/i)}},{key:"isWindows",value:function(){return e.isBrowser()&&e.isWindowsDesktop()||e.isWindowsMobile()}},{key:"isWindowsMobile",value:function(){return e.isBrowser()&&e.getUserAgent().match(/IEMobile/i)}},{key:"isWindowsDesktop",value:function(){return e.isBrowser()&&e.getUserAgent().match(/WPDesktop/i)}},{key:"isMobile",value:function(){return e.isBrowser()&&(e.isWindowsMobile()||e.isBlackBerry()||e.isAndroid()||e.isIOS())}}]),e}(),E=function(e){return Object.keys(e).reduce((function(t,n){return"data-"===n.substr(0,5)?s()({},t,_()({},n,e[n])):t}),{})},z=n(1),M=n.n(z),R=n(8),S=n.n(R),k=n(2),A=n.n(k),j=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onMouseMove",(function(e){if(n.state.active){var t=S.a.findDOMNode(w()(w()(n)));n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}})),_()(w()(w()(n)),"onMouseDown",(function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})})),_()(w()(w()(n)),"onMouseUp",(function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))})),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=[O.isMobile()?"reflex-thin":""].concat(u()(this.props.className.split(" ")),[this.state.active?"active":"","reflex-splitter"]).join(" ").trim();return A.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id}),this.props.children)}}]),t}(A.a.Component);_()(j,"propTypes",{children:M.a.oneOfType([M.a.arrayOf(M.a.node),M.a.node]),onStartResize:M.a.func,onStopResize:M.a.func,className:M.a.string,propagate:M.a.bool,onResize:M.a.func,style:M.a.object}),_()(j,"defaultProps",{document:"undefined"!=typeof document?document:null,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var P=function(){function e(){f()(this,e),this._events={}}return h()(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n._events[e]=n._events[e]||[],n._events[e].push(t)})),this}},{key:"off",value:function(e,t){var n=this;if(null!=e)return e.split(" ").forEach((function(e){e in n._events!=!1&&(t?n._events[e].splice(n._events[e].indexOf(t),1):n._events[e]=[])})),this;this._events={}}},{key:"emit",value:function(e){if(void 0!==this._events[e])for(var t=this._events[e].slice(),n=0;n<t.length;++n){var r=t[n].apply(this,Array.prototype.slice.call(arguments,1));if(void 0!==r)return r}}}]),e}(),L=(n(27),function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onWindowResize",(function(){n.setState({flexData:n.computeFlexData()})})),_()(w()(w()(n)),"onStartResize",(function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event;switch(n.props.orientation){case"horizontal":document.body.classList.add("reflex-row-resize"),n.previousPos=t.clientY;break;case"vertical":default:document.body.classList.add("reflex-col-resize"),n.previousPos=t.clientX}n.elements=[n.children[e.index-1],n.children[e.index+1]],n.emitElementsEvent(n.elements,"onStartResize")})),_()(w()(w()(n)),"onResize",(function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event,r=n.getOffset(t,e.domElement);switch(n.props.orientation){case"horizontal":n.previousPos=t.clientY;break;case"vertical":default:n.previousPos=t.clientX}if(r){var i=n.computeAvailableOffset(e.index,r);i&&(n.elements=n.dispatchOffset(e.index,i),n.adjustFlex(n.elements),n.setState({resizing:!0},(function(){n.emitElementsEvent(n.elements,"onResize")})))}})),_()(w()(w()(n)),"onStopResize",(function(e){document.body.classList.remove("reflex-row-resize"),document.body.classList.remove("reflex-col-resize");var t=n.elements.map((function(e){return e.ref})),r=n.children.filter((function(e){return!j.isA(e)&&t.includes(e.ref)}));n.emitElementsEvent(r,"onStopResize"),n.setState({resizing:!1})})),_()(w()(w()(n)),"onElementSize",(function(e){return new Promise((function(t){try{var r=e.index,i=n.getSize(n.children[r]),o=e.size-i,s=e.direction,a=r+s,u=n.computeAvailableOffset(a,s*o);n.elements=null,u&&(n.elements=n.dispatchOffset(a,u),n.adjustFlex(n.elements)),n.setState(n.state,(function(){n.emitElementsEvent(n.elements,"onResize"),t()}))}catch(e){console.log(e)}}))})),n.events=new P,n.children=[],n.state={flexData:[]},n.ref=A.a.createRef(),n}return b()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.computeFlexData(),t=this.props.windowResizeAware;t&&window.addEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:t,flexData:e}),this.events.on("element.size",this.onElementSize),this.events.on("startResize",this.onStartResize),this.events.on("stopResize",this.onStopResize),this.events.on("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){this.events.off(),window.removeEventListener("resize",this.onWindowResize)}},{key:"getValidChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return this.toArray(e.children).filter((function(e){return!!e}))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.getValidChildren(e);if(t.length!==this.state.flexData.length||e.orientation!==this.props.orientation||this.flexHasChanged(e)){var n=this.computeFlexData(t,e);this.setState({flexData:n})}e.windowResizeAware!==this.state.windowResizeAware&&(e.windowResizeAware?window.addEventListener("resize",this.onWindowResize):window.removeEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:e.windowResizeAware}))}},{key:"flexHasChanged",value:function(e){var t=this.getValidChildren(e).map((function(e){return e.props.flex||0}));return!this.getValidChildren().map((function(e){return e.props.flex||0})).every((function(e,n){return e===t[n]}))}},{key:"getSize",value:function(e){var t=e.ref?this.refs[e.ref]:e,n=S.a.findDOMNode(t);switch(this.props.orientation){case"horizontal":return n.offsetHeight;case"vertical":default:return n.offsetWidth}}},{key:"getOffset",value:function(e,t){var n=t.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,s=n.right;switch(this.props.orientation){case"horizontal":var a=e.clientY-this.previousPos;if(a>0){if(e.clientY>=r)return a}else if(e.clientY<=i)return a;break;case"vertical":default:var u=e.clientX-this.previousPos;if(u>0){if(e.clientX>o)return u}else if(e.clientX<s)return u}return 0}},{key:"adjustFlex",value:function(e){var t=this,n=e.reduce((function(n,r){var i=r.props.index;return n+(r.props.flex-t.state.flexData[i].flex)/e.length}),0);e.forEach((function(e){t.state.flexData[e.props.index].flex+=n}))}},{key:"computeAvailableOffset",value:function(e,t){var n=this.computeAvailableStretch(e,t),r=this.computeAvailableShrink(e,t);return Math.min(n,r)*Math.sign(t)}},{key:"checkPropagate",value:function(e,t){if(t>0){if(e<this.children.length-2){var n=this.children[e+2];return j.isA(n)&&n.props.propagate}}else if(e>2){var r=this.children[e-2];return j.isA(r)&&r.props.propagate}return!1}},{key:"computeAvailableStretch",value:function(e,t){var n=t<0?e+1:e-1,r=this.children[n],i=this.getSize(r),o=r.props.maxSize-i;if(o<Math.abs(t)&&this.checkPropagate(e,-1*t)){var s=Math.sign(t)*(Math.abs(t)-o);return o+this.computeAvailableStretch(t<0?e+2:e-2,s)}return Math.min(o,Math.abs(t))}},{key:"computeAvailableShrink",value:function(e,t){var n=t>0?e+1:e-1,r=this.children[n],i=this.getSize(r)-Math.max(r.props.minSize,0);if(i<Math.abs(t)&&this.checkPropagate(e,t)){var o=Math.sign(t)*(Math.abs(t)-i);return i+this.computeAvailableShrink(t>0?e+2:e-2,o)}return Math.min(i,Math.abs(t))}},{key:"computePixelFlex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.orientation;if(!this.ref.current)return console.warn("Unable to locate ReflexContainer dom node"),0;switch(e){case"horizontal":return 0===this.ref.current.offsetHeight?(console.warn("Found ReflexContainer with height=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetHeight;case"vertical":default:return 0===this.ref.current.offsetWidth?(console.warn("Found ReflexContainer with width=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetWidth}}},{key:"addOffset",value:function(e,t){var n=this.getSize(e),r=e.props.index,i=Math.max(n+t,0),o=this.state.flexData[r].flex,s=o>0?o*i/n:this.computePixelFlex()*i;this.state.flexData[r].flex=!isFinite(s)||isNaN(s)?0:s}},{key:"dispatchStretch",value:function(e,t){var n=t<0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.min(r.props.maxSize,i+Math.abs(t))-i;if(this.addOffset(r,o),o<Math.abs(t)){var s=e-2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)-o);return[r].concat(u()(this.dispatchStretch(s,a)))}return[r]}},{key:"dispatchShrink",value:function(e,t){var n=t>0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.max(r.props.minSize,i-Math.abs(t))-i;if(this.addOffset(r,o),Math.abs(o)<Math.abs(t)){var s=e+2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)+o);return[r].concat(u()(this.dispatchShrink(s,a)))}return[r]}},{key:"dispatchOffset",value:function(e,t){return u()(this.dispatchStretch(e,t)).concat(u()(this.dispatchShrink(e,t)))}},{key:"emitElementsEvent",value:function(e,t){var n=this;this.toArray(e).forEach((function(e){if(e.props[t]){var r=n.refs[e.ref],i=S.a.findDOMNode(r);e.props[t]({domElement:i,component:e})}}))}},{key:"computeFlexData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getValidChildren(),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,r=this.computePixelFlex(n.orientation),i=function(e){return e.reduce((function(e,t){return!j.isA(t)&&t.constrained?e-t.flex:e}),1)},o=function(e){return e.reduce((function(e,t){return j.isA(t)||t.constrained?e:e+1}),0)},a=t.map((function(t){var n=t.props;return{maxFlex:(n.maxSize||Number.MAX_VALUE)*r,sizeFlex:(n.size||Number.MAX_VALUE)*r,minFlex:(n.minSize||1)*r,constrained:void 0!==n.flex,guid:n.ref||e.guid(),flex:n.flex||0,type:t.type}})),u=function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=!1,u=o(n),c=i(n),f=n.map((function(e){if(j.isA(e))return e;var t=e.constrained?e.flex:c/u,n=Math.min(e.sizeFlex,Math.min(e.maxFlex,Math.max(e.minFlex,t))),r=e.constrained||n!==t;return a=a||r,s()({},e,{flex:n,constrained:r})}));return a&&r<e.props.maxRecDepth?t(f,r+1):f},c=u(a);return c.map((function(e){return{flex:j.isA(e)?0:e.flex,guid:e.guid}}))}},{key:"guid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"xxxx-xxxx",t=(new Date).getTime();return e.replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:7&n|8).toString(16)}))}},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"render",value:function(){var e=this,t=[this.state.resizing?"reflex-resizing":""].concat(u()(this.props.className.split(" ")),[this.props.orientation,"reflex-container"]).join(" ").trim();return this.children=A.a.Children.map(this.getValidChildren(),(function(t,n){if(n>e.state.flexData.length-1)return A.a.createElement("div",null);var r=e.state.flexData[n],i=s()({},t.props,{maxSize:t.props.maxSize||Number.MAX_VALUE,orientation:e.props.orientation,minSize:t.props.minSize||1,events:e.events,flex:r.flex,ref:r.guid,index:n});return A.a.cloneElement(t,i)})),A.a.createElement("div",i()({},E(this.props),{style:this.props.style,className:t,ref:this.ref}),this.children)}}]),t}(A.a.Component));_()(L,"propTypes",{windowResizeAware:M.a.bool,orientation:M.a.oneOf(["horizontal","vertical"]),maxRecDepth:M.a.number,className:M.a.string,style:M.a.object}),_()(L,"defaultProps",{orientation:"horizontal",windowResizeAware:!1,maxRecDepth:100,className:"",style:{}});var D=n(13),T=n.n(D),N=n(16),C=n.n(N),W=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onMouseMove",(function(e){if(n.state.active){var t=S.a.findDOMNode(w()(w()(n)));n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}})),_()(w()(w()(n)),"onMouseDown",(function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})})),_()(w()(w()(n)),"onMouseUp",(function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))})),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.state.active?"active":"","reflex-handle"]).join(" ").trim();return A.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id}),this.props.children)}}]),t}(A.a.Component);_()(W,"propTypes",{children:M.a.oneOfType([M.a.arrayOf(M.a.node),M.a.node]),onStartResize:M.a.func,onStopResize:M.a.func,className:M.a.string,propagate:M.a.bool,onResize:M.a.func,style:M.a.object}),_()(W,"defaultProps",{document:"undefined"==typeof document?null:document,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var F=n(17),B=n.n(F),U=n(18),I=n.n(U),H=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onResize",(function(e){var t=n.props,r=t.resizeHeight,i=t.resizeWidth,o=Math.floor(e.bounds.height),a=Math.floor(e.bounds.width);n.setDimensions(s()({},r&&{height:o},i&&{width:a}))})),n.setDimensions=B()((function(e){n.setState(e)}),n.props.propagateDimensionsRate/1e3),n.state={height:"100%",width:"100%"},n}return b()(t,e),h()(t,[{key:"renderChildren",value:function(){var e=this,t=this.props.propagateDimensions;return A.a.Children.map(this.props.children,(function(n){return e.props.withHandle||W.isA(n)?A.a.cloneElement(n,s()({dimensions:t&&e.state},n.props,{index:e.props.index-1,events:e.props.events})):t?A.a.cloneElement(n,s()({},n.props,{dimensions:e.state})):n}))}},{key:"render",value:function(){var e=this;return A.a.createElement(I.a,{bounds:!0,onResize:this.onResize},(function(t){var n=t.measureRef;return A.a.createElement("div",{ref:n,className:"reflex-size-aware"},A.a.createElement("div",{style:e.state},e.renderChildren()))}))}}]),t}(A.a.Component),G=function(e){function t(e){var n;return f()(this,t),(n=d()(this,m()(t).call(this,e))).state={size:e.size},n}var n;return b()(t,e),h()(t,[{key:"componentDidUpdate",value:(n=C()(T.a.mark((function e(t,n,r){var i,o,s,a,u,c,f;return T.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.size===this.state.size){e.next=28;break}i=this.toArray(this.props.direction),o=!0,s=!1,a=void 0,e.prev=5,u=i[Symbol.iterator]();case 7:if(o=(c=u.next()).done){e.next=14;break}return f=c.value,e.next=11,this.props.events.emit("element.size",{index:this.props.index,size:this.props.size,direction:f});case 11:o=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),s=!0,a=e.t0;case 20:e.prev=20,e.prev=21,o||null==u.return||u.return();case 23:if(e.prev=23,!s){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(20);case 28:case"end":return e.stop()}}),e,this,[[5,16,20,28],[21,,23,27]])}))),function(e,t,r){return n.apply(this,arguments)})},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"renderChildren",value:function(){var e=this;return A.a.Children.map(this.props.children,(function(t){return e.props.withHandle||W.isA(t)?A.a.cloneElement(t,s()({},t.props,{index:e.props.index-1,events:e.props.events})):t}))}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.props.orientation,"reflex-element"]).join(" ").trim(),t=s()({},this.props.style,{flexGrow:this.props.flex,flexShrink:1,flexBasis:"0%"});return A.a.createElement("div",i()({},E(this.props),{className:e,style:t}),this.props.propagateDimensions?A.a.createElement(H,this.props):this.renderChildren())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.size!==t.size?s()({},t,{size:e.size}):null}}]),t}(A.a.Component);_()(G,"propTypes",{renderOnResizeRate:M.a.number,propagateDimensions:M.a.bool,resizeHeight:M.a.bool,resizeWidth:M.a.bool,className:M.a.string,size:M.a.number}),_()(G,"defaultProps",{propagateDimensionsRate:100,propagateDimensions:!1,resizeHeight:!0,resizeWidth:!0,direction:[1],className:""})}])})); | ||
return e.isBrowser()&&!!document.documentMode}},{key:"isEdge",value:function(){return e.isBrowser()&&!e.isIE()&&!!window.StyleMedia}},{key:"isChrome",value:function(){return e.isBrowser()&&!!window.chrome&&!!window.chrome.webstore}},{key:"isBlink",value:function(){return e.isBrowser()&&(e.isChrome()||e.isOpera())&&!!window.CSS}},{key:"getUserAgent",value:function(){return"undefined"==typeof navigator?"":navigator.userAgent}},{key:"isAndroid",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Android/i)}},{key:"isBlackBerry",value:function(){return e.isBrowser()&&e.getUserAgent().match(/BlackBerry/i)}},{key:"isIOS",value:function(){return e.isBrowser()&&e.getUserAgent().match(/iPhone|iPad|iPod/i)}},{key:"isOpera",value:function(){return e.isBrowser()&&e.getUserAgent().match(/Opera Mini/i)}},{key:"isWindows",value:function(){return e.isBrowser()&&e.isWindowsDesktop()||e.isWindowsMobile()}},{key:"isWindowsMobile",value:function(){return e.isBrowser()&&e.getUserAgent().match(/IEMobile/i)}},{key:"isWindowsDesktop",value:function(){return e.isBrowser()&&e.getUserAgent().match(/WPDesktop/i)}},{key:"isMobile",value:function(){return e.isBrowser()&&(e.isWindowsMobile()||e.isBlackBerry()||e.isAndroid()||e.isIOS())}}]),e}(),E=function(e){return Object.keys(e).reduce(function(t,n){return"data-"===n.substr(0,5)?s()({},t,_()({},n,e[n])):t},{})},z=n(1),M=n.n(z),R=n(8),S=n.n(R),k=n(2),A=n.n(k),j=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=S.a.findDOMNode(w()(w()(n)));n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=[O.isMobile()?"reflex-thin":""].concat(u()(this.props.className.split(" ")),[this.state.active?"active":"","reflex-splitter"]).join(" ").trim();return A.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id}),this.props.children)}}]),t}(A.a.Component);_()(j,"propTypes",{children:M.a.oneOfType([M.a.arrayOf(M.a.node),M.a.node]),onStartResize:M.a.func,onStopResize:M.a.func,className:M.a.string,propagate:M.a.bool,onResize:M.a.func,style:M.a.object}),_()(j,"defaultProps",{document:"undefined"!=typeof document?document:null,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var P=function(){function e(){f()(this,e),this._events={}}return h()(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach(function(e){n._events[e]=n._events[e]||[],n._events[e].push(t)}),this}},{key:"off",value:function(e,t){var n=this;if(void 0!=e)return e.split(" ").forEach(function(e){e in n._events!=!1&&(t?n._events[e].splice(n._events[e].indexOf(t),1):n._events[e]=[])}),this;this._events={}}},{key:"emit",value:function(e){if(void 0!==this._events[e])for(var t=this._events[e].slice(),n=0;n<t.length;++n){var r=t[n].apply(this,Array.prototype.slice.call(arguments,1));if(void 0!==r)return r}}}]),e}(),L=(n(27),function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onWindowResize",function(){n.setState({flexData:n.computeFlexData()})}),_()(w()(w()(n)),"onStartResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event;switch(n.props.orientation){case"horizontal":document.body.classList.add("reflex-row-resize"),n.previousPos=t.clientY;break;case"vertical":default:document.body.classList.add("reflex-col-resize"),n.previousPos=t.clientX}n.elements=[n.children[e.index-1],n.children[e.index+1]],n.emitElementsEvent(n.elements,"onStartResize")}),_()(w()(w()(n)),"onResize",function(e){var t=e.event.changedTouches?e.event.changedTouches[0]:e.event,r=n.getOffset(t,e.domElement);switch(n.props.orientation){case"horizontal":n.previousPos=t.clientY;break;case"vertical":default:n.previousPos=t.clientX}if(r){var i=n.computeAvailableOffset(e.index,r);i&&(n.elements=n.dispatchOffset(e.index,i),n.adjustFlex(n.elements),n.setState({resizing:!0},function(){n.emitElementsEvent(n.elements,"onResize")}))}}),_()(w()(w()(n)),"onStopResize",function(e){document.body.classList.remove("reflex-row-resize"),document.body.classList.remove("reflex-col-resize");var t=n.elements.map(function(e){return e.ref}),r=n.children.filter(function(e){return!j.isA(e)&&t.includes(e.ref)});n.emitElementsEvent(r,"onStopResize"),n.setState({resizing:!1})}),_()(w()(w()(n)),"onElementSize",function(e){return new Promise(function(t){try{var r=e.index,i=n.getSize(n.children[r]),o=e.size-i,s=e.direction,a=r+s,u=n.computeAvailableOffset(a,s*o);n.elements=null,u&&(n.elements=n.dispatchOffset(a,u),n.adjustFlex(n.elements)),n.setState(n.state,function(){n.emitElementsEvent(n.elements,"onResize"),t()})}catch(e){console.log(e)}})}),n.events=new P,n.children=[],n.state={flexData:[]},n.ref=A.a.createRef(),n}return b()(t,e),h()(t,[{key:"componentDidMount",value:function(){var e=this.computeFlexData(),t=this.props.windowResizeAware;t&&window.addEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:t,flexData:e}),this.events.on("element.size",this.onElementSize),this.events.on("startResize",this.onStartResize),this.events.on("stopResize",this.onStopResize),this.events.on("resize",this.onResize)}},{key:"componentWillUnmount",value:function(){this.events.off(),window.removeEventListener("resize",this.onWindowResize)}},{key:"getValidChildren",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return this.toArray(e.children).filter(function(e){return!!e})}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.getValidChildren(e);if(t.length!==this.state.flexData.length||e.orientation!==this.props.orientation||this.flexHasChanged(e)){var n=this.computeFlexData(t,e);this.setState({flexData:n})}e.windowResizeAware!==this.state.windowResizeAware&&(e.windowResizeAware?window.addEventListener("resize",this.onWindowResize):window.removeEventListener("resize",this.onWindowResize),this.setState({windowResizeAware:e.windowResizeAware}))}},{key:"flexHasChanged",value:function(e){var t=this.getValidChildren(e).map(function(e){return e.props.flex||0});return!this.getValidChildren().map(function(e){return e.props.flex||0}).every(function(e,n){return e===t[n]})}},{key:"getSize",value:function(e){var t=e.ref?this.refs[e.ref]:e,n=S.a.findDOMNode(t);switch(this.props.orientation){case"horizontal":return n.offsetHeight;case"vertical":default:return n.offsetWidth}}},{key:"getOffset",value:function(e,t){var n=t.getBoundingClientRect(),r=n.top,i=n.bottom,o=n.left,s=n.right;switch(this.props.orientation){case"horizontal":var a=e.clientY-this.previousPos;if(a>0){if(e.clientY>=r)return a}else if(e.clientY<=i)return a;break;case"vertical":default:var u=e.clientX-this.previousPos;if(u>0){if(e.clientX>o)return u}else if(e.clientX<s)return u}return 0}},{key:"adjustFlex",value:function(e){var t=this,n=e.reduce(function(n,r){var i=r.props.index;return n+(r.props.flex-t.state.flexData[i].flex)/e.length},0);e.forEach(function(e){t.state.flexData[e.props.index].flex+=n})}},{key:"computeAvailableOffset",value:function(e,t){var n=this.computeAvailableStretch(e,t),r=this.computeAvailableShrink(e,t);return Math.min(n,r)*Math.sign(t)}},{key:"checkPropagate",value:function(e,t){if(t>0){if(e<this.children.length-2){var n=this.children[e+2];return j.isA(n)&&n.props.propagate}}else if(e>2){var r=this.children[e-2];return j.isA(r)&&r.props.propagate}return!1}},{key:"computeAvailableStretch",value:function(e,t){var n=t<0?e+1:e-1,r=this.children[n],i=this.getSize(r),o=r.props.maxSize-i;if(o<Math.abs(t)&&this.checkPropagate(e,-1*t)){var s=Math.sign(t)*(Math.abs(t)-o);return o+this.computeAvailableStretch(t<0?e+2:e-2,s)}return Math.min(o,Math.abs(t))}},{key:"computeAvailableShrink",value:function(e,t){var n=t>0?e+1:e-1,r=this.children[n],i=this.getSize(r)-Math.max(r.props.minSize,0);if(i<Math.abs(t)&&this.checkPropagate(e,t)){var o=Math.sign(t)*(Math.abs(t)-i);return i+this.computeAvailableShrink(t>0?e+2:e-2,o)}return Math.min(i,Math.abs(t))}},{key:"computePixelFlex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.orientation;if(!this.ref.current)return console.warn("Unable to locate ReflexContainer dom node"),0;switch(e){case"horizontal":return 0===this.ref.current.offsetHeight?(console.warn("Found ReflexContainer with height=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetHeight;case"vertical":default:return 0===this.ref.current.offsetWidth?(console.warn("Found ReflexContainer with width=0, this will cause invalid behavior..."),console.warn(this.ref.current),0):1/this.ref.current.offsetWidth}}},{key:"addOffset",value:function(e,t){var n=this.getSize(e),r=e.props.index,i=Math.max(n+t,0),o=this.state.flexData[r].flex,s=o>0?o*i/n:this.computePixelFlex()*i;this.state.flexData[r].flex=!isFinite(s)||isNaN(s)?0:s}},{key:"dispatchStretch",value:function(e,t){var n=t<0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.min(r.props.maxSize,i+Math.abs(t))-i;if(this.addOffset(r,o),o<Math.abs(t)){var s=e-2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)-o);return[r].concat(u()(this.dispatchStretch(s,a)))}return[r]}},{key:"dispatchShrink",value:function(e,t){var n=t>0?e+1:e-1;if(n<0||n>this.children.length-1)return[];var r=this.children[n],i=this.getSize(r),o=Math.max(r.props.minSize,i-Math.abs(t))-i;if(this.addOffset(r,o),Math.abs(o)<Math.abs(t)){var s=e+2*Math.sign(t),a=Math.sign(t)*(Math.abs(t)+o);return[r].concat(u()(this.dispatchShrink(s,a)))}return[r]}},{key:"dispatchOffset",value:function(e,t){return u()(this.dispatchStretch(e,t)).concat(u()(this.dispatchShrink(e,t)))}},{key:"emitElementsEvent",value:function(e,t){var n=this;this.toArray(e).forEach(function(e){if(e.props[t]){var r=n.refs[e.ref],i=S.a.findDOMNode(r);e.props[t]({domElement:i,component:e})}})}},{key:"computeFlexData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getValidChildren(),n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.props,r=this.computePixelFlex(n.orientation);return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=!1,o=function(e){return e.reduce(function(e,t){return j.isA(t)||t.constrained?e:e+1},0)}(n),a=function(e){return e.reduce(function(e,t){return!j.isA(t)&&t.constrained?e-t.flex:e},1)}(n),u=n.map(function(e){if(j.isA(e))return e;var t=e.constrained?e.flex:a/o,n=Math.min(e.sizeFlex,Math.min(e.maxFlex,Math.max(e.minFlex,t))),r=e.constrained||n!==t;return i=i||r,s()({},e,{flex:n,constrained:r})});return i&&r<e.props.maxRecDepth?t(u,r+1):u}(t.map(function(t){var n=t.props;return{maxFlex:(n.maxSize||Number.MAX_VALUE)*r,sizeFlex:(n.size||Number.MAX_VALUE)*r,minFlex:(n.minSize||1)*r,constrained:void 0!==n.flex,guid:n.ref||e.guid(),flex:n.flex||0,type:t.type}})).map(function(e){return{flex:j.isA(e)?0:e.flex,guid:e.guid}})}},{key:"guid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"xxxx-xxxx",t=(new Date).getTime();return e.replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:7&n|8).toString(16)})}},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"render",value:function(){var e=this,t=[this.state.resizing?"reflex-resizing":""].concat(u()(this.props.className.split(" ")),[this.props.orientation,"reflex-container"]).join(" ").trim();return this.children=A.a.Children.map(this.getValidChildren(),function(t,n){if(n>e.state.flexData.length-1)return A.a.createElement("div",null);var r=e.state.flexData[n],i=s()({},t.props,{maxSize:t.props.maxSize||Number.MAX_VALUE,orientation:e.props.orientation,minSize:t.props.minSize||1,events:e.events,flex:r.flex,ref:r.guid,index:n});return A.a.cloneElement(t,i)}),A.a.createElement("div",i()({},E(this.props),{style:this.props.style,className:t,ref:this.ref}),this.children)}}]),t}(A.a.Component));_()(L,"propTypes",{windowResizeAware:M.a.bool,orientation:M.a.oneOf(["horizontal","vertical"]),maxRecDepth:M.a.number,className:M.a.string,style:M.a.object}),_()(L,"defaultProps",{orientation:"horizontal",windowResizeAware:!1,maxRecDepth:100,className:"",style:{}});var D=n(13),T=n.n(D),N=n(16),C=n.n(N),W=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onMouseMove",function(e){if(n.state.active){var t=S.a.findDOMNode(w()(w()(n)));n.props.events.emit("resize",{index:n.props.index,domElement:t,event:e}),n.props.onResize&&n.props.onResize({component:w()(w()(n)),domElement:t}),e.stopPropagation(),e.preventDefault()}}),_()(w()(w()(n)),"onMouseDown",function(e){n.setState({active:!0}),n.props.onStartResize&&n.props.onStartResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))})||n.props.events.emit("startResize",{index:n.props.index,event:e})}),_()(w()(w()(n)),"onMouseUp",function(e){n.state.active&&(n.setState({active:!1}),n.props.onStopResize&&n.props.onStopResize({domElement:S.a.findDOMNode(w()(w()(n))),component:w()(w()(n))}),n.props.events.emit("stopResize",{index:n.props.index,event:e}))}),n.state={active:!1},n.document=e.document,n}return b()(t,e),h()(t,null,[{key:"isA",value:function(e){return!!e&&e.type===t}}]),h()(t,[{key:"componentDidMount",value:function(){this.document&&(this.document.addEventListener("touchend",this.onMouseUp),this.document.addEventListener("mouseup",this.onMouseUp),this.document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),this.document.addEventListener("touchmove",this.onMouseMove,{passive:!1}))}},{key:"componentWillUnmount",value:function(){this.document&&(this.document.removeEventListener("mouseup",this.onMouseUp),this.document.removeEventListener("touchend",this.onMouseUp),this.document.removeEventListener("mousemove",this.onMouseMove),this.document.removeEventListener("touchmove",this.onMouseMove),this.state.active&&this.props.events.emit("stopResize",{index:this.props.index,event:null}))}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.state.active?"active":"","reflex-handle"]).join(" ").trim();return A.a.createElement("div",i()({},E(this.props),{onTouchStart:this.onMouseDown,onMouseDown:this.onMouseDown,style:this.props.style,className:e,id:this.props.id}),this.props.children)}}]),t}(A.a.Component);_()(W,"propTypes",{children:M.a.oneOfType([M.a.arrayOf(M.a.node),M.a.node]),onStartResize:M.a.func,onStopResize:M.a.func,className:M.a.string,propagate:M.a.bool,onResize:M.a.func,style:M.a.object}),_()(W,"defaultProps",{document:"undefined"==typeof document?null:document,onStartResize:null,onStopResize:null,propagate:!1,onResize:null,className:"",style:{}});var F=n(17),B=n.n(F),U=n(18),I=n.n(U),H=function(e){function t(e){var n;return f()(this,t),n=d()(this,m()(t).call(this,e)),_()(w()(w()(n)),"onResize",function(e){var t=n.props,r=t.resizeHeight,i=t.resizeWidth,o=Math.floor(e.bounds.height),a=Math.floor(e.bounds.width);n.setDimensions(s()({},r&&{height:o},i&&{width:a}))}),n.setDimensions=B()(function(e){n.setState(e)},n.props.propagateDimensionsRate/1e3),n.state={height:"100%",width:"100%"},n}return b()(t,e),h()(t,[{key:"renderChildren",value:function(){var e=this,t=this.props.propagateDimensions;return A.a.Children.map(this.props.children,function(n){return e.props.withHandle||W.isA(n)?A.a.cloneElement(n,s()({dimensions:t&&e.state},n.props,{index:e.props.index-1,events:e.props.events})):t?A.a.cloneElement(n,s()({},n.props,{dimensions:e.state})):n})}},{key:"render",value:function(){var e=this;return A.a.createElement(I.a,{bounds:!0,onResize:this.onResize},function(t){var n=t.measureRef;return A.a.createElement("div",{ref:n,className:"reflex-size-aware"},A.a.createElement("div",{style:e.state},e.renderChildren()))})}}]),t}(A.a.Component),G=function(e){function t(e){var n;return f()(this,t),(n=d()(this,m()(t).call(this,e))).state={size:e.size},n}return b()(t,e),h()(t,[{key:"componentDidUpdate",value:function(){var e=C()(T.a.mark(function e(t,n,r){var i,o,s,a,u,c,f;return T.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.size===this.state.size){e.next=28;break}i=this.toArray(this.props.direction),o=!0,s=!1,a=void 0,e.prev=5,u=i[Symbol.iterator]();case 7:if(o=(c=u.next()).done){e.next=14;break}return f=c.value,e.next=11,this.props.events.emit("element.size",{index:this.props.index,size:this.props.size,direction:f});case 11:o=!0,e.next=7;break;case 14:e.next=20;break;case 16:e.prev=16,e.t0=e.catch(5),s=!0,a=e.t0;case 20:e.prev=20,e.prev=21,o||null==u.return||u.return();case 23:if(e.prev=23,!s){e.next=26;break}throw a;case 26:return e.finish(23);case 27:return e.finish(20);case 28:case"end":return e.stop()}},e,this,[[5,16,20,28],[21,,23,27]])}));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"toArray",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"renderChildren",value:function(){var e=this;return A.a.Children.map(this.props.children,function(t){return e.props.withHandle||W.isA(t)?A.a.cloneElement(t,s()({},t.props,{index:e.props.index-1,events:e.props.events})):t})}},{key:"render",value:function(){var e=u()(this.props.className.split(" ")).concat([this.props.orientation,"reflex-element"]).join(" ").trim(),t=s()({},this.props.style,{flexGrow:this.props.flex,flexShrink:1,flexBasis:"0%"});return A.a.createElement("div",i()({},E(this.props),{className:e,style:t}),this.props.propagateDimensions?A.a.createElement(H,this.props):this.renderChildren())}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.size!==t.size?s()({},t,{size:e.size}):null}}]),t}(A.a.Component);_()(G,"propTypes",{renderOnResizeRate:M.a.number,propagateDimensions:M.a.bool,resizeHeight:M.a.bool,resizeWidth:M.a.bool,className:M.a.string,size:M.a.number}),_()(G,"defaultProps",{propagateDimensionsRate:100,propagateDimensions:!1,resizeHeight:!0,resizeWidth:!0,direction:[1],className:""}),n.d(t,"ReflexContainer",function(){return L}),n.d(t,"ReflexSplitter",function(){return j}),n.d(t,"ReflexElement",function(){return G}),n.d(t,"ReflexHandle",function(){return W})}])}); |
{ | ||
"name": "react-reflex", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Flex layout component for advanced React web applications", | ||
@@ -79,3 +79,3 @@ "main": "dist/commonjs/index.js", | ||
"eslint-plugin-react": "^2.3.0", | ||
"node-sass": "^4.14.1", | ||
"node-sass": "4.13.1", | ||
"postcss-cli": "^6.1.3", | ||
@@ -90,4 +90,4 @@ "postcss-loader": "3.0.0", | ||
"style-loader": "0.23.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.12" | ||
"webpack": "4.20.2", | ||
"webpack-cli": "3.1.2" | ||
}, | ||
@@ -101,5 +101,5 @@ "dependencies": { | ||
"peerDependencies": { | ||
"react": "^16.0.0", | ||
"react-dom": "^16.0.0" | ||
"react": "^16.0.0 || ^17.0.0", | ||
"react-dom": "^16.0.0 || ^17.0.0" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
9051
2058149
19