UNPKG

react-touch-knob

Version:

Knob UI element for React with touch capabilities

14 lines 107 kB
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=4)}([function(e,t,n){"use strict";function r(e){return function(){return e}}var o=function(){};o.thatReturns=r,o.thatReturnsFalse=r(!1),o.thatReturnsTrue=r(!0),o.thatReturnsNull=r(null),o.thatReturnsThis=function(){return this},o.thatReturnsArgument=function(e){return e},e.exports=o},function(e,t,n){"use strict";e.exports=n(5)},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* object-assign (c) Sindre Sorhus @license MIT */ var o=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,l,u=r(e),s=1;s<arguments.length;s++){n=Object(arguments[s]);for(var c in n)a.call(n,c)&&(u[c]=n[c]);if(o){l=o(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r={};e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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}function a(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)}Object.defineProperty(t,"__esModule",{value:!0});var 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}}(),l=n(1),u=function(e){return e&&e.__esModule?e:{default:e}}(l),s=(n(6),.65*Math.PI),c=2.35*Math.PI,f=function(e){function t(e){r(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={min:e.min||0,max:null!==e.max?e.max:1,value:null!==e.value?e.value:e.min||0},n.state.value=Math.max(n.state.min,Math.min(n.state.max,n.state.value)),n.setTextValue(),n.state.range=Math.abs(n.state.max-n.state.min),n.state.rawValue=n.calculateRawValue(n.state.value),n.currentValue=n.state.rawValue,n.startX=n.startY=0,n.startTime=null,n.touchId=null,n.touchDirection=0,n.moveAxis=null,n}return a(t,e),i(t,[{key:"getValue",value:function(){return this.state.value}},{key:"setValue",value:function(e,t){e=Math.max(this.state.min,Math.min(this.state.max,e));var n=this.calculateRawValue(e);if(t||this.props.disableAnimation)return void this.setState({value:e,rawValue:n});this.animateToValue(n)}},{key:"componentDidUpdate",value:function(){this.container.offsetWidth!==this.width&&(this.width=this.container.offsetWidth,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.width)),this.draw(),this.props.onChange&&this.props.onChange(this.state.value)}},{key:"componentWillReceiveProps",value:function(e){e.value!==this.state.value&&this.setValue(e.value,this.props.disableAnimation)}},{key:"componentDidMount",value:function(){this.width=this.container.offsetWidth,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.width),this.draw(),this.initListeners()}},{key:"initListeners",value:function(){var e=this;window.addEventListener("resize",function(){e.width=e.container.offsetWidth,e.canvas.setAttribute("width",e.width),e.canvas.setAttribute("height",e.width),e.draw()}),this.canvas.onmousedown=function(t){if(!e.props.disabled){t.preventDefault();var n=e.pointerInLane(t);n?(e.state.rawValue=n,e.updateValue(),e.startedInLane=!0):(e.initMove(t),e.startedInLane=!1),e.mouseActive=!0}},window.addEventListener("mousemove",function(t){e.mouseActive&&(t.preventDefault(),e.handleMove(t))}),window.addEventListener("mouseup",function(t){e.mouseActive&&(t.preventDefault(),e.props.disableAnimation||e.flingIfFastEnough(t),e.mouseActive=!1)}),"ontouchstart"in document.documentElement&&(this.canvas.ontouchstart=function(t){if(!e.props.disabled){t.preventDefault();var n=t.targetTouches[0];e.touchId=n.identifier;var r=e.pointerInLane(n);r?(e.state.rawValue=r,e.updateValue(),e.startedInLane=!0):(e.initMove(n),e.startedInLane=!1)}},document.body.addEventListener("touchend",function(t){var n=e.getActiveTouch(t.changedTouches);n&&(t.preventDefault(),e.props.disableAnimation||e.flingIfFastEnough(n))}),document.body.addEventListener("touchmove",function(t){var n=e.getActiveTouch(t.changedTouches);n&&(t.preventDefault(),e.handleMove(n))}))}},{key:"initMove",value:function(e){clearTimeout(this.timer),this.startTime=Date.now(),this.startX=this.lastX=e.screenX,this.startY=this.lastY=e.screenY,this.moveAxis=null}},{key:"getActiveTouch",value:function(e){var t=e[0];if(t.identifier===this.touchId)return t}},{key:"handleMove",value:function(e){if(this.startedInLane)return this.state.rawValue=this.getNewRawValueFromPoint(e),void this.updateValue();var t=e.screenX-this.lastX,n=e.screenY-this.lastY,r=void 0;this.moveAxis&&(r=1===this.moveAxis?t:-1*n),r?Math.abs(r)/(Date.now()-this.lastMoveTime)<.03&&(this.moveAxis=null):(Math.abs(t)>Math.abs(n)?this.moveAxis=1:this.moveAxis=2,r=1===this.moveAxis?t:-1*n),this.lastMoveTime=Date.now(),this.lastX=e.screenX,this.lastY=e.screenY,this.state.rawValue+=r/(this.container.offsetWidth*(this.props.fineness||10)),this.state.rawValue=Math.max(0,Math.min(1,this.state.rawValue)),this.updateValue()}},{key:"flingIfFastEnough",value:function(e){var t=Date.now()-this.startTime;if(t>300)return void(this.props.onEnd&&this.props.onEnd(this.state.value));var n=e.screenX-this.startX,r=e.screenY-this.startY,o=void 0;o=Math.abs(n)>Math.abs(r)?n:-1*r,this.animateToValue(Math.max(0,Math.min(1,this.state.rawValue+1/(this.props.fineness||10)*o/t)))}},{key:"animateToValue",value:function(e){var t=this;if(Math.round(100*this.state.rawValue)===Math.round(100*e))return this.state.rawValue=e,this.updateValue(),void(this.props.onEnd&&this.props.onEnd(this.state.value));var n=e-this.state.rawValue;this.state.rawValue+=.25*n,this.updateValue(),this.timer=setTimeout(function(){t.animateToValue(e)},20)}},{key:"updateValue",value:function(){this.state.value=this.state.rawValue*this.state.range+this.state.min,this.props.showNumber&&this.setTextValue(),this.setState({value:this.state.value})}},{key:"setTextValue",value:function(){var e=void 0;e=this.props.valueTransformDisplay?this.props.valueTransformDisplay(this.state.value):Math.round(this.state.value).toString(),this.state.text=e}},{key:"calculateRawValue",value:function(e){return(e-this.state.min)/this.state.range}},{key:"pointerInLane",value:function(e){var t=e.clientX,n=e.clientY,r=.5*this.width,o=this.canvas.getBoundingClientRect(),a=o.left+r,i=o.top+r,l=getComputedStyle(this.container),u=parseFloat(l.lineHeight)||12,s=t-a,c=i-n,f=Math.sqrt(Math.pow(s,2)+Math.pow(c,2));if(f<=r&&f>=r-u){var p=Math.atan2(s,c)/Math.PI+1.5;return!(p<.65||p>2.35)&&(p-.65)/(2.35-.65)}return!1}},{key:"getNewRawValueFromPoint",value:function(e){var t=e.clientX,n=e.clientY,r=.5*this.width,o=this.canvas.getBoundingClientRect(),a=o.left+r,i=o.top+r,l=t-a,u=i-n,s=Math.atan2(l,u)/Math.PI+1.5;return((s=Math.max(.65,Math.min(2.35,s)))-.65)/(2.35-.65)}},{key:"draw",value:function(){var e=this.width,t=this.canvas.getContext("2d"),n=getComputedStyle(this.container),r=.5*e,o=parseFloat(n.lineHeight)||12,a=.5*o,i=n.borderBottomColor,l=n.borderTopColor;i===l&&(i="#ccc"),t.clearRect(0,0,e,e),t.beginPath(),t.strokeStyle=i,t.lineWidth=o,this.props.rounded&&(t.lineCap="round"),t.arc(r,r,r-a,s,c),t.stroke(),t.beginPath(),t.strokeStyle=l,t.arc(r,r,r-a,s,(this.state.rawValue*(2.35-.65)+.65)*Math.PI),t.stroke()}},{key:"render",value:function(){var e=this,t=void 0;return this.props.showNumber&&(t=u.default.createElement("div",{style:{position:"absolute",top:"50%",left:0,width:"100%",textAlign:"center",transform:"translateY(-50%)",zIndex:-1}},this.state.text)),u.default.createElement("div",{className:this.props.class,ref:function(t){return e.container=t},style:{position:"relative",borderWidth:0}},u.default.createElement("canvas",{ref:function(t){return e.canvas=t}}),t,u.default.createElement("input",{type:"number",name:this.props.name,value:this.state.value,onChange:function(e){},style:{display:"none"}}))}}]),t}(u.default.Component);t.default=f},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function a(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function i(){}function l(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||_}function u(e,t,n){var r,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)M.call(t,r)&&!D.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),s=0;s<l;s++)u[s]=arguments[s+2];o.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===o[r]&&(o[r]=l[r]);return{$$typeof:k,type:e,key:a,ref:i,props:o,_owner:I.current}}function s(e){return"object"==typeof e&&null!==e&&e.$$typeof===k}function c(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,function(e){return t[e]})}function f(e,t,n,r){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function p(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function d(e,t,n,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case k:case x:case E:case T:i=!0}}if(i)return n(o,e,""===t?"."+h(e,0):t),1;if(i=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){a=e[l];var u=t+h(a,l);i+=d(a,u,n,o)}else if(null===e||void 0===e?u=null:(u=P&&e[P]||e["@@iterator"],u="function"==typeof u?u:null),"function"==typeof u)for(e=u.call(e),l=0;!(a=e.next()).done;)a=a.value,u=t+h(a,l++),i+=d(a,u,n,o);else"object"===a&&(n=""+e,r("31","[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return i}function h(e,t){return"object"==typeof e&&null!==e&&null!=e.key?c(e.key):t.toString(36)}function m(e,t){e.func.call(e.context,t,e.count++)}function g(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?v(e,r,n,C.thatReturnsArgument):null!=e&&(s(e)&&(t=o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(R,"$&/")+"/")+n,e={$$typeof:k,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}),r.push(e))}function v(e,t,n,r,o){var a="";null!=n&&(a=(""+n).replace(R,"$&/")+"/"),t=f(t,a,r,o),null==e||d(e,"",g,t),p(t)}/** @license React v16.2.0 * react.production.min.js * * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var y=n(2),b=n(3),C=n(0),w="function"==typeof Symbol&&Symbol.for,k=w?Symbol.for("react.element"):60103,x=w?Symbol.for("react.call"):60104,E=w?Symbol.for("react.return"):60105,T=w?Symbol.for("react.portal"):60106,S=w?Symbol.for("react.fragment"):60107,P="function"==typeof Symbol&&Symbol.iterator,_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}};o.prototype.isReactComponent={},o.prototype.setState=function(e,t){"object"!=typeof e&&"function"!=typeof e&&null!=e&&r("85"),this.updater.enqueueSetState(this,e,t,"setState")},o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},i.prototype=o.prototype;var N=a.prototype=new i;N.constructor=a,y(N,o.prototype),N.isPureReactComponent=!0;var O=l.prototype=new i;O.constructor=l,y(O,o.prototype),O.unstable_isAsyncReactComponent=!0,O.render=function(){return this.props.children};var I={current:null},M=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0},R=/\/+/g,A=[],F={Children:{map:function(e,t,n){if(null==e)return e;var r=[];return v(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;t=f(null,null,t,n),null==e||d(e,"",m,t),p(t)},count:function(e){return null==e?0:d(e,"",C.thatReturnsNull,null)},toArray:function(e){var t=[];return v(e,t,null,C.thatReturnsArgument),t},only:function(e){return s(e)||r("143"),e}},Component:o,PureComponent:a,unstable_AsyncComponent:l,Fragment:S,createElement:u,cloneElement:function(e,t,n){var r=y({},e.props),o=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=I.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)M.call(t,u)&&!D.hasOwnProperty(u)&&(r[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)r.children=n;else if(1<u){l=Array(u);for(var s=0;s<u;s++)l[s]=arguments[s+2];r.children=l}return{$$typeof:k,type:e.type,key:o,ref:a,props:r,_owner:i}},createFactory:function(e){var t=u.bind(null,e);return t.type=e,t},isValidElement:s,version:"16.2.0",__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentOwner:I,assign:y}},L=Object.freeze({default:F}),U=L&&F||L;e.exports=U.default?U.default:U},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(7)},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;r<t;r++)n+="&args[]="+encodeURIComponent(arguments[r+1]);throw t=Error(n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."),t.name="Invariant Violation",t.framesToPop=1,t}function o(e,t){return(e&t)===t}function a(e,t){if(Nn.hasOwnProperty(e)||2<e.length&&("o"===e[0]||"O"===e[0])&&("n"===e[1]||"N"===e[1]))return!1;if(null===t)return!0;switch(typeof t){case"boolean":return Nn.hasOwnProperty(e)?e=!0:(t=i(e))?e=t.hasBooleanValue||t.hasStringBooleanValue||t.hasOverloadedBooleanValue:(e=e.toLowerCase().slice(0,5),e="data-"===e||"aria-"===e),e;case"undefined":case"number":case"string":case"object":return!0;default:return!1}}function i(e){return In.hasOwnProperty(e)?In[e]:null}function l(e){return e[1].toUpperCase()}function u(e,t,n,r,o,a,i,l,u){Wn._hasCaughtError=!1,Wn._caughtError=null;var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){Wn._caughtError=e,Wn._hasCaughtError=!0}}function s(){if(Wn._hasRethrowError){var e=Wn._rethrowError;throw Wn._rethrowError=null,Wn._hasRethrowError=!1,e}}function c(){if(Kn)for(var e in $n){var t=$n[e],n=Kn.indexOf(e);if(-1<n||r("96",e),!qn[n]){t.extractEvents||r("97",e),qn[n]=t,n=t.eventTypes;for(var o in n){var a=void 0,i=n[o],l=t,u=o;Yn.hasOwnProperty(u)&&r("99",u),Yn[u]=i;var s=i.phasedRegistrationNames;if(s){for(a in s)s.hasOwnProperty(a)&&f(s[a],l,u);a=!0}else i.registrationName?(f(i.registrationName,l,u),a=!0):a=!1;a||r("98",o,e)}}}}function f(e,t,n){Qn[e]&&r("100",e),Qn[e]=t,Xn[e]=t.eventTypes[n].dependencies}function p(e){Kn&&r("101"),Kn=Array.prototype.slice.call(e),c()}function d(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var o=e[t];$n.hasOwnProperty(t)&&$n[t]===o||($n[t]&&r("102",t),$n[t]=o,n=!0)}n&&c()}function h(e,t,n,r){t=e.type||"unknown-event",e.currentTarget=er(r),Wn.invokeGuardedCallbackAndCatchFirstError(t,n,void 0,e),e.currentTarget=null}function m(e,t){return null==t&&r("30"),null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function g(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}function v(e,t){if(e){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)h(e,t,n[o],r[o]);else n&&h(e,t,n,r);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function y(e){return v(e,!0)}function b(e){return v(e,!1)}function C(e,t){var n=e.stateNode;if(!n)return null;var o=Zn(n);if(!o)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":(o=!o.disabled)||(e=e.type,o=!("button"===e||"input"===e||"select"===e||"textarea"===e)),e=!o;break e;default:e=!1}return e?null:(n&&"function"!=typeof n&&r("231",t,typeof n),n)}function w(e,t,n,r){for(var o,a=0;a<qn.length;a++){var i=qn[a];i&&(i=i.extractEvents(e,t,n,r))&&(o=m(o,i))}return o}function k(e){e&&(tr=m(tr,e))}function x(e){var t=tr;tr=null,t&&(e?g(t,y):g(t,b),tr&&r("95"),Wn.rethrowCaughtError())}function E(e){if(e[ar])return e[ar];for(var t=[];!e[ar];){if(t.push(e),!e.parentNode)return null;e=e.parentNode}var n=void 0,r=e[ar];if(5===r.tag||6===r.tag)return r;for(;e&&(r=e[ar]);e=t.pop())n=r;return n}function T(e){if(5===e.tag||6===e.tag)return e.stateNode;r("33")}function S(e){return e[ir]||null}function P(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function _(e,t,n){for(var r=[];e;)r.push(e),e=P(e);for(e=r.length;0<e--;)t(r[e],"captured",n);for(e=0;e<r.length;e++)t(r[e],"bubbled",n)}function N(e,t,n){(t=C(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=m(n._dispatchListeners,t),n._dispatchInstances=m(n._dispatchInstances,e))}function O(e){e&&e.dispatchConfig.phasedRegistrationNames&&_(e._targetInst,N,e)}function I(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst;t=t?P(t):null,_(t,N,e)}}function M(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=C(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=m(n._dispatchListeners,t),n._dispatchInstances=m(n._dispatchInstances,e))}function D(e){e&&e.dispatchConfig.registrationName&&M(e._targetInst,null,e)}function R(e){g(e,O)}function A(e,t,n,r){if(n&&r)e:{for(var o=n,a=r,i=0,l=o;l;l=P(l))i++;l=0;for(var u=a;u;u=P(u))l++;for(;0<i-l;)o=P(o),i--;for(;0<l-i;)a=P(a),l--;for(;i--;){if(o===a||o===a.alternate)break e;o=P(o),a=P(a)}o=null}else o=null;for(a=o,o=[];n&&n!==a&&(null===(i=n.alternate)||i!==a);)o.push(n),n=P(n);for(n=[];r&&r!==a&&(null===(i=r.alternate)||i!==a);)n.push(r),r=P(r);for(r=0;r<o.length;r++)M(o[r],"bubbled",e);for(e=n.length;0<e--;)M(n[e],"captured",t)}function F(){return!sr&&Cn.canUseDOM&&(sr="textContent"in document.documentElement?"textContent":"innerText"),sr}function L(){if(cr._fallbackText)return cr._fallbackText;var e,t,n=cr._startText,r=n.length,o=U(),a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return cr._fallbackText=o.slice(e,1<t?1-t:void 0),cr._fallbackText}function U(){return"value"in cr._root?cr._root.value:cr._root[F()]}function V(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface;for(var o in e)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?kn.thatReturnsTrue:kn.thatReturnsFalse,this.isPropagationStopped=kn.thatReturnsFalse,this}function H(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function z(e){e instanceof this||r("223"),e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function j(e){e.eventPool=[],e.getPooled=H,e.release=z}function B(e,t,n,r){return V.call(this,e,t,n,r)}function W(e,t,n,r){return V.call(this,e,t,n,r)}function K(e,t){switch(e){case"topKeyUp":return-1!==dr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function $(e){return e=e.detail,"object"==typeof e&&"data"in e?e.data:null}function q(e,t){switch(e){case"topCompositionEnd":return $(t);case"topKeyPress":return 32!==t.which?null:(xr=!0,wr);case"topTextInput":return e=t.data,e===wr&&xr?null:e;default:return null}}function Y(e,t){if(Er)return"topCompositionEnd"===e||!hr&&K(e,t)?(e=L(),cr._root=null,cr._startText=null,cr._fallbackText=null,Er=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"topCompositionEnd":return Cr?null:t.data;default:return null}}function Q(e){if(e=Jn(e)){Sr&&"function"==typeof Sr.restoreControlledState||r("194");var t=Zn(e.stateNode);Sr.restoreControlledState(e.stateNode,e.type,t)}}function X(e){Pr?_r?_r.push(e):_r=[e]:Pr=e}function G(){if(Pr){var e=Pr,t=_r;if(_r=Pr=null,Q(e),t)for(e=0;e<t.length;e++)Q(t[e])}}function Z(e,t){return e(t)}function J(e,t){if(Ir)return Z(e,t);Ir=!0;try{return Z(e,t)}finally{Ir=!1,G()}}function ee(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Mr[e.type]:"textarea"===t}function te(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function ne(e,t){if(!Cn.canUseDOM||t&&!("addEventListener"in document))return!1;t="on"+e;var n=t in document;return n||(n=document.createElement("div"),n.setAttribute(t,"return;"),n="function"==typeof n[t]),!n&&yr&&"wheel"===e&&(n=document.implementation.hasFeature("Events.wheel","3.0")),n}function re(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function oe(e){var t=re(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"function"==typeof n.get&&"function"==typeof n.set)return Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:!0,get:function(){return n.get.call(this)},set:function(e){r=""+e,n.set.call(this,e)}}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}function ae(e){e._valueTracker||(e._valueTracker=oe(e))}function ie(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=re(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function le(e,t,n){return e=V.getPooled(Dr.change,e,t,n),e.type="change",X(n),R(e),e}function ue(e){k(e),x(!1)}function se(e){if(ie(T(e)))return e}function ce(e,t){if("topChange"===e)return t}function fe(){Rr&&(Rr.detachEvent("onpropertychange",pe),Ar=Rr=null)}function pe(e){"value"===e.propertyName&&se(Ar)&&(e=le(Ar,e,te(e)),J(ue,e))}function de(e,t,n){"topFocus"===e?(fe(),Rr=t,Ar=n,Rr.attachEvent("onpropertychange",pe)):"topBlur"===e&&fe()}function he(e){if("topSelectionChange"===e||"topKeyUp"===e||"topKeyDown"===e)return se(Ar)}function me(e,t){if("topClick"===e)return se(t)}function ge(e,t){if("topInput"===e||"topChange"===e)return se(t)}function ve(e,t,n,r){return V.call(this,e,t,n,r)}function ye(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ur[e])&&!!t[e]}function be(){return ye}function Ce(e,t,n,r){return V.call(this,e,t,n,r)}function we(e){return e=e.type,"string"==typeof e?e:"function"==typeof e?e.displayName||e.name:null}function ke(e){var t=e;if(e.alternate)for(;t.return;)t=t.return;else{if(0!=(2&t.effectTag))return 1;for(;t.return;)if(t=t.return,0!=(2&t.effectTag))return 1}return 3===t.tag?2:3}function xe(e){return!!(e=e._reactInternalFiber)&&2===ke(e)}function Ee(e){2!==ke(e)&&r("188")}function Te(e){var t=e.alternate;if(!t)return t=ke(e),3===t&&r("188"),1===t?null:e;for(var n=e,o=t;;){var a=n.return,i=a?a.alternate:null;if(!a||!i)break;if(a.child===i.child){for(var l=a.child;l;){if(l===n)return Ee(a),e;if(l===o)return Ee(a),t;l=l.sibling}r("188")}if(n.return!==o.return)n=a,o=i;else{l=!1;for(var u=a.child;u;){if(u===n){l=!0,n=a,o=i;break}if(u===o){l=!0,o=a,n=i;break}u=u.sibling}if(!l){for(u=i.child;u;){if(u===n){l=!0,n=i,o=a;break}if(u===o){l=!0,o=i,n=a;break}u=u.sibling}l||r("189")}}n.alternate!==o&&r("190")}return 3!==n.tag&&r("188"),n.stateNode.current===n?e:t}function Se(e){if(!(e=Te(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Pe(e){if(!(e=Te(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child&&4!==t.tag)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function _e(e){var t=e.targetInst;do{if(!t){e.ancestors.push(t);break}var n;for(n=t;n.return;)n=n.return;if(!(n=3!==n.tag?null:n.stateNode.containerInfo))break;e.ancestors.push(t),t=E(n)}while(t);for(n=0;n<e.ancestors.length;n++)t=e.ancestors[n],Wr(e.topLevelType,t,e.nativeEvent,te(e.nativeEvent))}function Ne(e){Br=!!e}function Oe(e,t,n){return n?xn.listen(n,t,Me.bind(null,e)):null}function Ie(e,t,n){return n?xn.capture(n,t,Me.bind(null,e)):null}function Me(e,t){if(Br){var n=te(t);if(n=E(n),null===n||"number"!=typeof n.tag||2===ke(n)||(n=null),jr.length){var r=jr.pop();r.topLevelType=e,r.nativeEvent=t,r.targetInst=n,e=r}else e={topLevelType:e,nativeEvent:t,targetInst:n,ancestors:[]};try{J(_e,e)}finally{e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>jr.length&&jr.push(e)}}}function De(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function Re(e){if(qr[e])return qr[e];if(!$r[e])return e;var t,n=$r[e];for(t in n)if(n.hasOwnProperty(t)&&t in Yr)return qr[e]=n[t];return""}function Ae(e){return Object.prototype.hasOwnProperty.call(e,Zr)||(e[Zr]=Gr++,Xr[e[Zr]]={}),Xr[e[Zr]]}function Fe(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Le(e,t){var n=Fe(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Fe(n)}}function Ue(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Ve(e,t){if(oo||null==to||to!==En())return null;var n=to;return"selectionStart"in n&&Ue(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ro&&Tn(ro,n)?null:(ro=n,e=V.getPooled(eo.select,no,e,t),e.type="select",e.target=to,R(e),e)}function He(e,t,n,r){return V.call(this,e,t,n,r)}function ze(e,t,n,r){return V.call(this,e,t,n,r)}function je(e,t,n,r){return V.call(this,e,t,n,r)}function Be(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function We(e,t,n,r){return V.call(this,e,t,n,r)}function Ke(e,t,n,r){return V.call(this,e,t,n,r)}function $e(e,t,n,r){return V.call(this,e,t,n,r)}function qe(e,t,n,r){return V.call(this,e,t,n,r)}function Ye(e,t,n,r){return V.call(this,e,t,n,r)}function Qe(e){0>po||(e.current=fo[po],fo[po]=null,po--)}function Xe(e,t){po++,fo[po]=e.current,e.current=t}function Ge(e){return Je(e)?go:ho.current}function Ze(e,t){var n=e.type.contextTypes;if(!n)return _n;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Je(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Je(e)&&(Qe(mo,e),Qe(ho,e))}function tt(e,t,n){null!=ho.cursor&&r("168"),Xe(ho,t,e),Xe(mo,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!=typeof n.getChildContext)return t;n=n.getChildContext();for(var a in n)a in o||r("108",we(e)||"Unknown",a);return wn({},t,n)}function rt(e){if(!Je(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||_n,go=ho.current,Xe(ho,t,e),Xe(mo,mo.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,go);n.__reactInternalMemoizedMergedChildContext=o,Qe(mo,e),Qe(ho,e),Xe(ho,o,e)}else Qe(mo,e);Xe(mo,t,e)}function at(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function it(e,t,n){var r=e.alternate;return null===r?(r=new at(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function lt(e,t,n){var o=void 0,a=e.type,i=e.key;return"function"==typeof a?(o=a.prototype&&a.prototype.isReactComponent?new at(2,i,t):new at(0,i,t),o.type=a,o.pendingProps=e.props):"string"==typeof a?(o=new at(5,i,t),o.type=a,o.pendingProps=e.props):"object"==typeof a&&null!==a&&"number"==typeof a.tag?(o=a,o.pendingProps=e.props):r("130",null==a?a:typeof a,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new at(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function st(e,t,n){return t=new at(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new at(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ft(e,t,n){return e=new at(9,null,t),e.expirationTime=n,e}function pt(e,t,n){return t=new at(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dt(e){return function(t){try{return e(t)}catch(e){}}}function ht(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);vo=dt(function(e){return t.onCommitFiberRoot(n,e)}),yo=dt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function mt(e){"function"==typeof vo&&vo(e)}function gt(e){"function"==typeof yo&&yo(e)}function vt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function yt(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function bt(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=vt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=vt(null)):e=null,e=e!==r?e:null,null===e?yt(r,t):null===r.last||null===e.last?(yt(r,t),yt(e,t)):(yt(r,t),e.last=t)}function Ct(e,t,n,r){return e=e.partialState,"function"==typeof e?e.call(t,n,r):e}function wt(e,t,n,r,o,a){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var i=!0,l=n.first,u=!1;null!==l;){var s=l.expirationTime;if(s>a){var c=n.expirationTime;(0===c||c>s)&&(n.expirationTime=s),u||(u=!0,n.baseState=e)}else u||(n.first=l.next,null===n.first&&(n.last=null)),l.isReplace?(e=Ct(l,r,e,o),i=!0):(s=Ct(l,r,e,o))&&(e=i?wn({},e,s):wn(e,s),i=!1),l.isForced&&(n.hasForceUpdate=!0),null!==l.callback&&(s=n.callbackList,null===s&&(s=n.callbackList=[]),s.push(l));l=l.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function kt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;e<n.length;e++){var o=n[e],a=o.callback;o.callback=null,"function"!=typeof a&&r("191",a),a.call(t)}}function xt(e,t,n,o){function a(e,t){t.updater=i,e.stateNode=t,t._reactInternalFiber=e}var i={isMounted:xe,enqueueSetState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var a=t(n);bt(n,{expirationTime:a,partialState:r,callback:o,isReplace:!1,isForced:!1,nextCallback:null,next:null}),e(n,a)},enqueueReplaceState:function(n,r,o){n=n._reactInternalFiber,o=void 0===o?null:o;var a=t(n);bt(n,{expirationTime:a,partialState:r,callback:o,isReplace:!0,isForced:!1,nextCallback:null,next:null}),e(n,a)},enqueueForceUpdate:function(n,r){n=n._reactInternalFiber,r=void 0===r?null:r;var o=t(n);bt(n,{expirationTime:o,partialState:null,callback:r,isReplace:!1,isForced:!0,nextCallback:null,next:null}),e(n,o)}};return{adoptClassInstance:a,constructClassInstance:function(e,t){var n=e.type,r=Ge(e),o=2===e.tag&&null!=e.type.contextTypes,i=o?Ze(e,r):_n;return t=new n(t,i),a(e,t),o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t},mountClassInstance:function(e,t){var n=e.alternate,o=e.stateNode,a=o.state||null,l=e.pendingProps;l||r("158");var u=Ge(e);o.props=l,o.state=e.memoizedState=a,o.refs=_n,o.context=Ze(e,u),null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent&&(e.internalContextTag|=1),"function"==typeof o.componentWillMount&&(a=o.state,o.componentWillMount(),a!==o.state&&i.enqueueReplaceState(o,o.state,null),null!==(a=e.updateQueue)&&(o.state=wt(n,e,a,o,l,t))),"function"==typeof o.componentDidMount&&(e.effectTag|=4)},updateClassInstance:function(e,t,a){var l=t.stateNode;l.props=t.memoizedProps,l.state=t.memoizedState;var u=t.memoizedProps,s=t.pendingProps;s||null==(s=u)&&r("159");var c=l.context,f=Ge(t);if(f=Ze(t,f),"function"!=typeof l.componentWillReceiveProps||u===s&&c===f||(c=l.state,l.componentWillReceiveProps(s,f),l.state!==c&&i.enqueueReplaceState(l,l.state,null)),c=t.memoizedState,a=null!==t.updateQueue?wt(e,t,t.updateQueue,l,s,a):c,!(u!==s||c!==a||mo.current||null!==t.updateQueue&&t.updateQueue.hasForceUpdate))return"function"!=typeof l.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),!1;var p=s;if(null===u||null!==t.updateQueue&&t.updateQueue.hasForceUpdate)p=!0;else{var d=t.stateNode,h=t.type;p="function"==typeof d.shouldComponentUpdate?d.shouldComponentUpdate(p,a,f):!h.prototype||!h.prototype.isPureReactComponent||(!Tn(u,p)||!Tn(c,a))}return p?("function"==typeof l.componentWillUpdate&&l.componentWillUpdate(s,a,f),"function"==typeof l.componentDidUpdate&&(t.effectTag|=4)):("function"!=typeof l.componentDidUpdate||u===e.memoizedProps&&c===e.memoizedState||(t.effectTag|=4),n(t,s),o(t,a)),l.props=s,l.state=a,l.context=f,p}}}function Et(e){return null===e||void 0===e?null:(e=To&&e[To]||e["@@iterator"],"function"==typeof e?e:null)}function Tt(e,t){var n=t.ref;if(null!==n&&"function"!=typeof n){if(t._owner){t=t._owner;var o=void 0;t&&(2!==t.tag&&r("110"),o=t.stateNode),o||r("147",n);var a=""+n;return null!==e&&null!==e.ref&&e.ref._stringRef===a?e.ref:(e=function(e){var t=o.refs===_n?o.refs={}:o.refs;null===e?delete t[a]:t[a]=e},e._stringRef=a,e)}"string"!=typeof n&&r("148"),t._owner||r("149",n)}return n}function St(e,t){"textarea"!==e.type&&r("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function Pt(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function o(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function a(e,t,n){return e=it(e,t,n),e.index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index,r<n?(t.effectTag=2,n):r):(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?(t=st(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function s(e,t,n,r){return null!==t&&t.type===n.type?(r=a(t,n.props,r),r.ref=Tt(t,n),r.return=e,r):(r=lt(n,e.internalContextTag,r),r.ref=Tt(t,n),r.return=e,r)}function c(e,t,n,r){return null===t||7!==t.tag?(t=ct(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function f(e,t,n,r){return null===t||9!==t.tag?(t=ft(n,e.internalContextTag,r),t.type=n.value,t.return=e,t):(t=a(t,null,r),t.type=n.value,t.return=e,t)}function p(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pt(n,e.internalContextTag,r),t.return=e,t):(t=a(t,n.children||[],r),t.return=e,t)}function d(e,t,n,r,o){return null===t||10!==t.tag?(t=ut(n,e.internalContextTag,r,o),t.return=e,t):(t=a(t,n,r),t.return=e,t)}function h(e,t,n){if("string"==typeof t||"number"==typeof t)return t=st(""+t,e.internalContextTag,n),t.return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case Co:return t.type===Eo?(t=ut(t.props.children,e.internalContextTag,n,t.key),t.return=e,t):(n=lt(t,e.internalContextTag,n),n.ref=Tt(null,t),n.return=e,n);case wo:return t=ct(t,e.internalContextTag,n),t.return=e,t;case ko:return n=ft(t,e.internalContextTag,n),n.type=t.value,n.return=e,n;case xo:return t=pt(t,e.internalContextTag,n),t.return=e,t}if(So(t)||Et(t))return t=ut(t,e.internalContextTag,n,null),t.return=e,t;St(e,t)}return null}function m(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case Co:return n.key===o?n.type===Eo?d(e,t,n.props.children,r,o):s(e,t,n,r):null;case wo:return n.key===o?c(e,t,n,r):null;case ko:return null===o?f(e,t,n,r):null;case xo:return n.key===o?p(e,t,n,r):null}if(So(n)||Et(n))return null!==o?null:d(e,t,n,r,null);St(e,n)}return null}function g(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return e=e.get(n)||null,u(t,e,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case Co:return e=e.get(null===r.key?n:r.key)||null,r.type===Eo?d(t,e,r.props.children,o,r.key):s(t,e,r,o);case wo:return e=e.get(null===r.key?n:r.key)||null,c(t,e,r,o);case ko:return e=e.get(n)||null,f(t,e,r,o);case xo:return e=e.get(null===r.key?n:r.key)||null,p(t,e,r,o)}if(So(r)||Et(r))return e=e.get(n)||null,d(t,e,r,o,null);St(t,r)}return null}function v(r,a,l,u){for(var s=null,c=null,f=a,p=a=0,d=null;null!==f&&p<l.length;p++){f.index>p?(d=f,f=null):d=f.sibling;var v=m(r,f,l[p],u);if(null===v){null===f&&(f=d);break}e&&f&&null===v.alternate&&t(r,f),a=i(v,a,p),null===c?s=v:c.sibling=v,c=v,f=d}if(p===l.length)return n(r,f),s;if(null===f){for(;p<l.length;p++)(f=h(r,l[p],u))&&(a=i(f,a,p),null===c?s=f:c.sibling=f,c=f);return s}for(f=o(r,f);p<l.length;p++)(d=g(f,r,p,l[p],u))&&(e&&null!==d.alternate&&f.delete(null===d.key?p:d.key),a=i(d,a,p),null===c?s=d:c.sibling=d,c=d);return e&&f.forEach(function(e){return t(r,e)}),s}function y(a,l,u,s){var c=Et(u);"function"!=typeof c&&r("150"),null==(u=c.call(u))&&r("151");for(var f=c=null,p=l,d=l=0,v=null,y=u.next();null!==p&&!y.done;d++,y=u.next()){p.index>d?(v=p,p=null):v=p.sibling;var b=m(a,p,y.value,s);if(null===b){p||(p=v);break}e&&p&&null===b.alternate&&t(a,p),l=i(b,l,d),null===f?c=b:f.sibling=b,f=b,p=v}if(y.done)return n(a,p),c;if(null===p){for(;!y.done;d++,y=u.next())null!==(y=h(a,y.value,s))&&(l=i(y,l,d),null===f?c=y:f.sibling=y,f=y);return c}for(p=o(a,p);!y.done;d++,y=u.next())null!==(y=g(p,a,d,y.value,s))&&(e&&null!==y.alternate&&p.delete(null===y.key?d:y.key),l=i(y,l,d),null===f?c=y:f.sibling=y,f=y);return e&&p.forEach(function(e){return t(a,e)}),c}return function(e,o,i,u){"object"==typeof i&&null!==i&&i.type===Eo&&null===i.key&&(i=i.props.children);var s="object"==typeof i&&null!==i;if(s)switch(i.$$typeof){case Co:e:{var c=i.key;for(s=o;null!==s;){if(s.key===c){if(10===s.tag?i.type===Eo:s.type===i.type){n(e,s.sibling),o=a(s,i.type===Eo?i.props.children:i.props,u),o.ref=Tt(s,i),o.return=e,e=o;break e}n(e,s);break}t(e,s),s=s.sibling}i.type===Eo?(o=ut(i.props.children,e.internalContextTag,u,i.key),o.return=e,e=o):(u=lt(i,e.internalContextTag,u),u.ref=Tt(o,i),u.return=e,e=u)}return l(e);case wo:e:{for(s=i.key;null!==o;){if(o.key===s){if(7===o.tag){n(e,o.sibling),o=a(o,i,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=ct(i,e.internalContextTag,u),o.return=e,e=o}return l(e);case ko:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=a(o,null,u),o.type=i.value,o.return=e,e=o;break e}n(e,o)}o=ft(i,e.internalContextTag,u),o.type=i.value,o.return=e,e=o}return l(e);case xo:e:{for(s=i.key;null!==o;){if(o.key===s){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){n(e,o.sibling),o=a(o,i.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=pt(i,e.internalContextTag,u),o.return=e,e=o}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==o&&6===o.tag?(n(e,o.sibling),o=a(o,i,u)):(n(e,o),o=st(i,e.internalContextTag,u)),o.return=e,e=o,l(e);if(So(i))return v(e,o,i,u);if(Et(i))return y(e,o,i,u);if(s&&St(e,i),void 0===i)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function _t(e,t,n,o,a){function i(e,t,n){var r=t.expirationTime;t.child=null===e?_o(t,null,n,r):Po(t,e.child,n,r)}function l(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(l(e,t),!n)return r&&ot(t,!1),c(e,t);n=t.stateNode,zr.current=t;var o=n.render();return t.effectTag|=1,i(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function s(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),g(e,t.containerInfo)}function c(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=it(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=it(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function f(e,t){switch(t.tag){case 3:s(t);break;case 2:rt(t);break;case 4:g(t,t.stateNode.containerInfo)}return null}var p=e.shouldSetTextContent,d=e.useSyncScheduling,h=e.shouldDeprioritizeSubtree,m=t.pushHostContext,g=t.pushHostContainer,v=n.enterHydrationState,y=n.resetHydrationState,b=n.tryToClaimNextHydratableInstance;e=xt(o,a,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var C=e.adoptClassInstance,w=e.constructClassInstance,k=e.mountClassInstance,x=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return f(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,a=t.pendingProps,E=Ge(t);return E=Ze(t,E),o=o(a,E),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render?(t.tag=2,a=rt(t),C(t,o),k(t,n),t=u(e,t,!0,a)):(t.tag=1,i(e,t,o),t.memoizedProps=a,t=t.child),t;case 1:e:{if(a=t.type,n=t.pendingProps,o=t.memoizedProps,mo.current)null===n&&(n=o);else if(null===n||o===n){t=c(e,t);break e}o=Ge(t),o=Ze(t,o),a=a(n,o),t.effectTag|=1,i(e,t,a),t.memoizedProps=n,t=t.child}return t;case 2:return a=rt(t),o=void 0,null===e?t.stateNode?r("153"):(w(t,t.pendingProps),k(t,n),o=!0):o=x(e,t,n),u(e,t,o,a);case 3:return s(t),a=t.updateQueue,null!==a?(o=t.memoizedState,a=wt(e,t,a,null,null,n),o===a?(y(),t=c(e,t)):(o=a.element,E=t.stateNode,(null===e||null===e.child)&&E.hydrate&&v(t)?(t.effectTag|=2,t.child=_o(t,null,o,n)):(y(),i(e,t,o)),t.memoizedState=a,t=t.child)):(y(),t=c(e,t)),t;case 5:m(t),null===e&&b(t),a=t.type;var T=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=T)&&r("154"),E=null!==e?e.memoizedProps:null,mo.current||null!==o&&T!==o?(T=o.children,p(a,o)?T=null:E&&p(a,E)&&(t.effectTag|=16),l(e,t),2147483647!==n&&!d&&h(a,o)?(t.expirationTime=2147483647,t=null):(i(e,t,T),t.memoizedProps=o,t=t.child)):t=c(e,t),t;case 6:return null===e&&b(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return a=t.pendingProps,mo.current?null===a&&null===(a=e&&e.memoizedProps)&&r("154"):null!==a&&t.memoizedProps!==a||(a=t.memoizedProps),o=a.children,t.stateNode=null===e?_o(t,t.stateNode,o,n):Po(t,t.stateNode,o,n),t.memoizedProps=a,t.stateNode;case 9:return null;case 4:e:{if(g(t,t.stateNode.containerInfo),a=t.pendingProps,mo.current)null===a&&null==(a=e&&e.memoizedProps)&&r("154");else if(null===a||t.memoizedProps===a){t=c(e,t);break e}null===e?t.child=Po(t,null,a,n):i(e,t,a),t.memoizedProps=a,t=t.child}return t;case 10:e:{if(n=t.pendingProps,mo.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=c(e,t);break e}i(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:s(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?_o(t,null,null,n):Po(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function Nt(e,t,n){function o(e){e.effectTag|=4}var a=e.createInstance,i=e.createTextInstance,l=e.appendInitialChild,u=e.finalizeInitialChildren,s=e.prepareUpdate,c=e.persistence,f=t.getRootHostContainer,p=t.popHostContext,d=t.getHostContext,h=t.popHostContainer,m=n.prepareToHydrateHostInstance,g=n.prepareToHydrateHostTextInstance,v=n.popHydrationState,y=void 0,b=void 0,C=void 0;return e.mutation?(y=function(){},b=function(e,t,n){(t.updateQueue=n)&&o(t)},C=function(e,t,n,r){n!==r&&o(t)}):r(c?"235":"236"),{completeWork:function(e,t,n){var c=t.pendingProps;switch(null===c?c=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return h(t),Qe(mo,t),Qe(ho,t),c=t.stateNode,c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),null!==e&&null!==e.child||(v(t),t.effectTag&=-3),y(t),null;case 5:p(t),n=f();var w=t.type;if(null!==e&&null!=t.stateNode){var k=e.memoizedProps,x=t.stateNode,E=d();x=s(x,w,k,c,n,E),b(e,t,x,w,k,c,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!c)return null===t.stateNode&&r("166"),null;if(e=d(),v(t))m(t,n,e)&&o(t);else{e=a(w,c,n,e,t);e:for(k=t.child;null!==k;){if(5===k.tag||6===k.tag)l(e,k.stateNode);else if(4!==k.tag&&null!==k.child){k.child.return=k,k=k.child;continue}if(k===t)break;for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}u(e,w,c,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)C(e,t,e.memoizedProps,c);else{if("string"!=typeof c)return null===t.stateNode&&r("166"),null;e=f(),n=d(),v(t)?g(t)&&o(t):t.stateNode=i(c,e,n,t)}return null;case 7:(c=t.memoizedProps)||r("165"),t.tag=8,w=[];e:for((k=t.stateNode)&&(k.return=t);null!==k;){if(5===k.tag||6===k.tag||4===k.tag)r("247");else if(9===k.tag)w.push(k.type);else if(null!==k.child){k.child.return=k,k=k.child;continue}for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}return k=c.handler,c=k(c.props,w),t.child=Po(t,null!==e?e.child:null,c,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return h(t),y(t),null;case 0:r("167");default:r("156")}}}}function Ot(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"==typeof gt&&gt(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"==typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:a(e.stateNode);break;case 4:s&&l(e)}}function a(e){for(var t=e;;)if(o(t),null===t.child||s&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function i(e){return 5===e.tag||3===e.tag||4===e.tag}function l(e){for(var t=e,n=!1,i=void 0,l=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:i=n.stateNode,l=!1;break e;case 3:case 4:i=n.stateNode.containerInfo,l=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)a(t),l?b(i,t.stateNode):y(i,t.stateNode);else if(4===t.tag?i=t.stateNode.containerInfo:o(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)br