UNPKG

@es-react/react

Version:

Hippy react framework

9 lines 334 kB
import e from"react";global.__GLOBAL__||(global.__GLOBAL__={}),global.__GLOBAL__.nodeId=0,global.__GLOBAL__.animationId=0;var t,n,r=global.Hippy,a=r.asyncStorage,i=r.bridge,o=r.device,l=r.document,u=r.register,s=r.on,c=r.off,f=r.emit;function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,l=[],u=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,a=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=new Map;function v(e,r){n=e,t=r}function y(){if(!n)throw new Error("getRootViewId must execute after setRootContainer");return n}function g(e){if(!t)return null;for(var n=[t.current];n.length;){var r=n.shift();if(!r)break;if(e(r))return r;r.child&&n.push(r.child),r.sibling&&n.push(r.sibling)}return null}function b(e,t){m.set(t,e)}function w(e){m.delete(e)}function k(e){return(null==e?void 0:e.stateNode)||null}function S(e){return m.get(e)||null}function E(e){!function(e,t){if(!global.requestIdleCallback)return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return 1/0}})}),1);global.requestIdleCallback(e,t)}((function(t){(t.timeRemaining()>0||t.didTimeout)&&x(e)}),{timeout:50})}function x(e){"number"==typeof e?w(e):e&&(w(e.nodeId),Array.isArray(e.childNodes)&&e.childNodes.forEach((function(e){return x(e)})))}var _={ADD:0,REMOVE:1},C=-1,N=1,P={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},R={NONE:0,CAPTURING_PHASE:1,AT_TARGET:2,BUBBLING_PHASE:3},T={onClick:"click",onLongClick:"longclick",onPressIn:"pressin",onPressOut:"pressout",onTouchDown:"touchstart",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchCancel:"touchcancel"};function I(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(e){return z="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},z(e)}var L=new RegExp(/^\d+$/),O=!1,A=!1;function D(){var e;Q()&&(e=console).log.apply(e,arguments)}function j(){var e;V()&&(e=console).warn.apply(e,arguments)}function U(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var M=new RegExp("^on.+Capture$");function F(e){return M.test(e)}var W=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function H(e){return"[object Function]"===Object.prototype.toString.call(e)}function B(e){O=e}function V(){return"production"!==process.env.NODE_ENV}function Q(){return V()&&!O}function $(){return A}function q(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new WeakMap;if("object"!==z(e)||null===e)throw new TypeError("deepCopy data is object");if(t.has(e))return t.get(e);var n={};return Object.keys(e).forEach((function(r){var a=e[r];"object"!==z(a)||null===a?n[r]=a:Array.isArray(a)?n[r]=I(a):a instanceof Set?n[r]=new Set(I(a)):a instanceof Map?n[r]=new Map(I(a)):(t.set(e,e),n[r]=q(a,t))})),n}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==z(t)?t:t+""}function K(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,G(r.key),r)}}function X(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var J=function(){return X((function e(t){Y(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}),[{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}},{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},a="eventHandler_".concat(n);return this.handlerContainer[a]=r,n}},{key:"notifyEvent",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];Object.keys(this.handlerContainer).forEach((function(t){var r,a=e.handlerContainer[t];a&&a.eventHandler&&(a.context?(r=a.eventHandler).call.apply(r,[a.context].concat(n)):a.eventHandler.apply(a,n))}))}},{key:"removeEventHandler",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");var t="eventHandler_".concat(e);this.handlerContainer[t]&&delete this.handlerContainer[t]}}])}(),Z=function(){return X((function e(t,n,r){Y(this,e),this.type=t,this.bubbles=!0,this.currentTarget=n,this.target=r}),[{key:"stopPropagation",value:function(){this.bubbles=!1}},{key:"preventDefault",value:function(){}}])}(),ee=new Map,te=["%c[event]%c","color: green","color: auto"];function ne(e,t){return!(!t.memoizedProps||"function"!=typeof t.memoizedProps[e])}function re(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for getHippyEventHub: ".concat(e));return ee.get(e)||null}var ae={registerNativeEventHub:function(e){if(D.apply(void 0,te.concat(["registerNativeEventHub",e])),"string"!=typeof e)throw new TypeError("Invalid eventName for registerNativeEventHub: ".concat(e));var t=ee.get(e);return t||(t=new J(e),ee.set(e,t)),t},getHippyEventHub:re,unregisterNativeEventHub:function(e){if("string"!=typeof e)throw new TypeError("Invalid eventName for unregisterNativeEventHub: ".concat(e));ee.has(e)&&ee.delete(e)},receiveNativeEvent:function(e){if(D.apply(void 0,te.concat(["receiveNativeEvent",e])),!e||!Array.isArray(e)||e.length<2)throw new TypeError("Invalid params for receiveNativeEvent: ".concat(JSON.stringify(e)));var t=h(e,2),n=t[0],r=t[1];if("string"!=typeof n)throw new TypeError("Invalid arguments for nativeEvent eventName");var a=re(n);a&&a.notifyEvent(r)},receiveComponentEvent:function(e,t){if(D.apply(void 0,te.concat(["receiveComponentEvent",e])),e&&t){var n=e.id,r=e.currentId,a=e.nativeName,i=e.originalName,o=e.params,l=void 0===o?{}:o,u=S(r),s=S(n);if(u&&s)T[a]?function(e,t,n,r,a,i){try{var o=!1,l=k(r),u=k(n),s=i.eventPhase;if(ne(e,n)&&F(e)&&[R.AT_TARGET,R.CAPTURING_PHASE].indexOf(s)>-1){var c=new Z(e,u,l);Object.assign(c,{eventPhase:s},a),n.memoizedProps[e](c),!c.bubbles&&i&&i.stopPropagation()}if(ne(e,n)&&!F(e)&&[R.AT_TARGET,R.BUBBLING_PHASE].indexOf(s)>-1){var f=new Z(e,u,l);Object.assign(f,{eventPhase:s},a),"boolean"!=typeof(o=n.memoizedProps[e](f))&&(o=!$()),f.bubbles||(o=!0),o&&i&&i.stopPropagation()}}catch(e){console.error(e)}}(i,0,u,s,l,t):function(e,t,n,r,a,i){var o=!1,l=k(r),u=k(n);try{var s=i.eventPhase;if(ne(e,n)&&!F(e)&&[R.AT_TARGET,R.BUBBLING_PHASE].indexOf(s)>-1){var c=new Z(e,u,l);Object.assign(c,{eventPhase:s},a),n.memoizedProps[e](c),o=!$(),c.bubbles||(o=!0),o&&i&&i.stopPropagation()}}catch(e){console.error(e)}}(i,0,u,s,l,t);else j.apply(void 0,te.concat(["receiveComponentEvent","currentTargetNode or targetNode not exist"]))}else j.apply(void 0,te.concat(["receiveComponentEvent","nativeEvent or domEvent not exist"]))}};function ie(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}global.__GLOBAL__&&(global.__GLOBAL__.jsModuleList.EventDispatcher=ae);var oe=function(){return X((function e(t,n){Y(this,e),this.callback=t,this.bindListener=n}),[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}])}(),le=function(){return X((function e(t){Y(this,e),ie(this,"eventName",void 0),ie(this,"listenerIdList",void 0),this.eventName=t,this.listenerIdList=[]}),[{key:"unregister",value:function(){var e=ae.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for ".concat(this.eventName));for(var t=this.listenerIdList.length,n=0;n<t;n+=1)e.removeEventHandler(this.listenerIdList[n]);this.listenerIdList=[],0===e.getHandlerSize()&&ae.unregisterNativeEventHub(this.eventName)}},{key:"getSize",value:function(){return this.listenerIdList.length}},{key:"addCallback",value:function(e,t){if("function"!=typeof e)throw new TypeError("Invalid addCallback function arguments");var n=ae.registerNativeEventHub(this.eventName);if(!n)throw new ReferenceError("No listeners for ".concat(this.eventName));var r=n.addEventHandler(e,t);if("number"!=typeof r)throw new Error("Fail to addEventHandler in addCallback function");return this.listenerIdList.push(r),r}},{key:"removeCallback",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeCallback");var t=ae.getHippyEventHub(this.eventName);if(!t)throw new ReferenceError("No listeners for ".concat(this.eventName));t.removeEventHandler(e);for(var n=this.listenerIdList.length,r=0;r<n;r+=1)if(e===this.listenerIdList[r]){this.listenerIdList.splice(r,1);break}}}])}();function ue(e){if("string"!=typeof e)throw new TypeError("Invalid arguments for getNameForEvent");return"eventEmitter_".concat(e)}var se=function(){return X((function e(t){Y(this,e),ie(this,"hippyEventListeners",void 0),t&&"object"===z(t)?this.hippyEventListeners=t:this.hippyEventListeners={}}),[{key:"sharedListeners",value:function(){return this.hippyEventListeners}},{key:"addListener",value:function(e,t,n){if("string"!=typeof e||"function"!=typeof t)throw new TypeError("Invalid arguments for addListener");var r=this.hippyEventListeners[ue(e)];r||(r=new le(e),this.hippyEventListeners[ue(e)]=r);var a=r.addCallback(t,n);if("number"!=typeof a)throw new Error("Fail to addCallback in addListener");return new oe(a,r)}},{key:"removeAllListeners",value:function(e){if("string"!=typeof e)throw new TypeError("Invalid arguments for removeAllListeners");var t=this.hippyEventListeners[ue(e)];t&&(t.unregister(),delete this.hippyEventListeners[ue(e)])}},{key:"emit",value:function(e,t){if("string"!=typeof e)return!1;var n=ae.getHippyEventHub(e);return!!n&&(n.notifyEvent(t),!0)}},{key:"listenerSize",value:function(e){if("string"!=typeof e)throw new TypeError("Invalid arguments for listenerSize");var t=this.hippyEventListeners[ue(e)];return t?t.getSize():0}}])}();se.emit=se.prototype.emit;var ce={};function fe(e,t,n){ce[e]||(ce[e]={eventListener:new le(e),eventMap:new Map});var r=ce[e],a=r.eventListener,i=r.eventMap,o=a.addCallback(t,n);if("number"!=typeof o)throw new Error("Fail to addCallback in addListener");i.set(t,o)}function de(e,t){var n=ce[e];if(!n)return j("Event [".concat(e,"] has not been registered yet in EventBus"));var r=n.eventListener,a=n.eventMap;if(t){var i=a.get(t);if("number"!=typeof i)return j("The listener for event [".concat(e,"] cannot be found to remove"));r.removeCallback(i),a.delete(t),0===a.size&&delete ce[e]}else r.unregister(),a.clear(),delete ce[e]}var pe={on:function(e,t,n){if("string"!=typeof e&&!Array.isArray(e)||"function"!=typeof t)throw new TypeError("Invalid arguments for EventBus.on()");return Array.isArray(e)?e.forEach((function(e){fe(e,t,n)})):fe(e,t,n),pe},off:function(e,t){if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("The event argument is not string or array for EventBus.off()");return Array.isArray(e)?e.forEach((function(e){de(e,t)})):de(e,t),pe},sizeOf:function(e){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.sizeOf()");var t=ce[e];return null!=t&&t.eventMap?t.eventMap.size:0},emit:function(e){if("string"!=typeof e)throw new TypeError("The event argument is not string for EventBus.emit()");var t=ae.getHippyEventHub(e);if(!t)return j("Event [".concat(e,"] has not been registered yet in EventBus")),pe;for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return t.notifyEvent.apply(t,r),pe}};function he(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*(".concat(t.join(")\\s*,\\s*("),")\\s*\\)")}var me={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ve="[-+]?\\d*\\.?\\d+",ye="".concat(ve,"%"),ge={rgb:new RegExp("rgb".concat(he(ve,ve,ve))),rgba:new RegExp("rgba".concat(he(ve,ve,ve,ve))),hsl:new RegExp("hsl".concat(he(ve,ye,ye))),hsla:new RegExp("hsla".concat(he(ve,ye,ye,ve))),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function be(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function we(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ke(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,a=2*n-r,i=ke(a,r,e+1/3),o=ke(a,r,e),l=ke(a,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*o)<<16|Math.round(255*l)<<8}function Ee(e){return(parseFloat(e)%360+360)%360/360}function xe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function _e(e){if(Number.isInteger(e))return e;var t=function(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ge.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(me,e)?me[e]:(t=ge.rgb.exec(e),Array.isArray(t)?(be(t[1])<<24|be(t[2])<<16|be(t[3])<<8|255)>>>0:(t=ge.rgba.exec(e))?(be(t[1])<<24|be(t[2])<<16|be(t[3])<<8|we(t[4]))>>>0:(t=ge.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=ge.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=ge.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ge.hsl.exec(e))?(255|Se(Ee(t[1]),xe(t[2]),xe(t[3])))>>>0:(t=ge.hsla.exec(e))?(Se(Ee(t[1]),xe(t[2]),xe(t[3]))|we(t[4]))>>>0:null))}(e);return null===t?0:t=(t<<24|t>>>8)>>>0}function Ce(e){return Array.isArray(e)?e.map((function(e){return _e(e)})):(j("Input color value is not a array",e),[0])}function Ne(e,t){if(t&&("object"==z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pe(e){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pe(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function Te(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}function Ie(e){return"loop"===e?-1:e}function ze(e,t){return"color"===e&&["number","string"].indexOf(z(t))>=0?_e(t):t}var Le="animationstart",Oe="animationend",Ae="animationcancel",De="animationrepeat",je=function(){function e(t){var n,r;if(Y(this,e),ie(this,"mode",void 0),ie(this,"startValue",void 0),ie(this,"toValue",void 0),ie(this,"duration",void 0),ie(this,"delay",void 0),ie(this,"valueType",void 0),ie(this,"direction",void 0),ie(this,"timingFunction",void 0),ie(this,"repeatCount",void 0),ie(this,"animation",void 0),ie(this,"inputRange",void 0),ie(this,"outputRange",void 0),ie(this,"animationId",void 0),ie(this,"onAnimationStartCallback",void 0),ie(this,"onAnimationEndCallback",void 0),ie(this,"onAnimationCancelCallback",void 0),ie(this,"onAnimationRepeatCallback",void 0),ie(this,"onHippyAnimationStart",void 0),ie(this,"onHippyAnimationEnd",void 0),ie(this,"onHippyAnimationCancel",void 0),ie(this,"onHippyAnimationRepeat",void 0),null!==(n=t.startValue)&&void 0!==n&&n.constructor&&"Animation"===t.startValue.constructor.name)r={animationId:t.startValue.animationId};else{var a=t.startValue;r=ze(t.valueType,a)}var i=ze(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=r||0,this.toValue=i||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Ie(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animation=new global.Hippy.Animation(Object.assign({mode:this.mode,delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.animationId=this.animation.getId(),this.destroy=this.destroy.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return X(e,[{key:"removeEventListener",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");"function"==typeof this.onAnimationStartCallback&&this.animation.removeEventListener(Le),"function"==typeof this.onAnimationEndCallback&&this.animation.removeEventListener(Oe),"function"==typeof this.onAnimationCancelCallback&&this.animation.removeEventListener(Ae),"function"==typeof this.onAnimationRepeatCallback&&this.animation.removeEventListener(De)}},{key:"start",value:function(){var e=this;if(!this.animation)throw new Error("animation has not been initialized yet");this.removeEventListener(),"function"==typeof this.onAnimationStartCallback&&this.animation.addEventListener(Le,(function(){"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback()})),"function"==typeof this.onAnimationEndCallback&&this.animation.addEventListener(Oe,(function(){"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback()})),"function"==typeof this.onAnimationCancelCallback&&this.animation.addEventListener(Ae,(function(){"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback()})),"function"==typeof this.onAnimationRepeatCallback&&this.animation.addEventListener(De,(function(){"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()})),this.animation.start()}},{key:"destroy",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.destroy()}},{key:"pause",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.pause()}},{key:"resume",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.resume()}},{key:"updateAnimation",value:function(t){var n=this;if(!this.animation)throw new Error("animation has not been initialized yet");if("object"!==z(t))throw new TypeError("Invalid arguments");if("string"==typeof t.mode&&t.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(t).forEach((function(r){var a=t[r];if("startValue"===r){var i;if(t.startValue instanceof e)i={animationId:t.startValue.animationId};else{var o=t.startValue;i=ze(n.valueType,o)}n.startValue=i||0}else"repeatCount"===r?n.repeatCount=Ie(t.repeatCount||0):Object.defineProperty(n,r,{value:a})})),this.animation.updateAnimation(Object.assign({mode:this.mode,delay:this.delay,startValue:this.startValue,toValue:ze(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}])}(),Ue="animationstart",Me="animationend",Fe="animationcancel",We="animationrepeat",He=function(){return X((function e(t){var n=this;Y(this,e),ie(this,"animationId",void 0),ie(this,"animation",void 0),ie(this,"animationList",void 0),ie(this,"onHippyAnimationStart",void 0),ie(this,"onHippyAnimationEnd",void 0),ie(this,"onHippyAnimationCancel",void 0),ie(this,"onHippyAnimationRepeat",void 0),ie(this,"onAnimationStartCallback",void 0),ie(this,"onAnimationEndCallback",void 0),ie(this,"onAnimationCancelCallback",void 0),ie(this,"onAnimationRepeatCallback",void 0),this.animationList=[],null==t||t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animation=new global.Hippy.AnimationSet({repeatCount:Ie(t.repeatCount||0),children:this.animationList}),this.animationId=this.animation.getId(),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}),[{key:"removeEventListener",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");"function"==typeof this.onAnimationStartCallback&&this.animation.removeEventListener(Ue),"function"==typeof this.onAnimationEndCallback&&this.animation.removeEventListener(Me),"function"==typeof this.onAnimationCancelCallback&&this.animation.removeEventListener(Fe),"function"==typeof this.onAnimationCancelCallback&&this.animation.removeEventListener(We)}},{key:"start",value:function(){var e=this;if(!this.animation)throw new Error("animation has not been initialized yet");this.removeEventListener(),"function"==typeof this.onAnimationStartCallback&&this.animation.addEventListener(Ue,(function(){"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback()})),"function"==typeof this.onAnimationEndCallback&&this.animation.addEventListener(Me,(function(){"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback()})),"function"==typeof this.onAnimationCancelCallback&&this.animation.addEventListener(Fe,(function(){"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback()})),"function"==typeof this.onAnimationRepeatCallback&&this.animation.addEventListener(Fe,(function(){"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()})),this.animation.start()}},{key:"destory",value:function(){j("AnimationSet.destory() method will be deprecated soon, please use Animation.destroy() as soon as possible"),this.destroy()}},{key:"destroy",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.destroy()}},{key:"pause",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.pause()}},{key:"resume",value:function(){if(!this.animation)throw new Error("animation has not been initialized yet");this.animation.resume()}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}])}();var Be=["children"];function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e=["%c[native]%c","color: red","color: auto"],qe={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode"),moveNode:Symbol("moveNode")},Ye=!0,Ge=[];function Ke(){var e=arguments.length>1?arguments[1]:void 0;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(t){if(t){var n=t.id;t.eventList.forEach((function(t){var r,a=t.name,i=t.type,o=t.listener,l=t.isCapture;r=function(e){return!!T[e]}(a)?T[a]:function(e){return e.replace(/^(on)?/g,"").toLocaleLowerCase()}(a),i===_.REMOVE&&e.removeEventListener(n,r,o),i===_.ADD&&e.addEventListener(n,r,o,l)}))}}))}function Xe(e,t){Q()&&D.apply(void 0,$e.concat([t,e]))}function Je(e){var t=function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e[n],a=r.type,i=r.nodes,o=r.eventNodes,l=r.printedNodes,u=t[t.length-1];u&&u.type===a?(u.nodes=u.nodes.concat(i),u.eventNodes=u.eventNodes.concat(o),u.printedNodes=u.printedNodes.concat(l)):t.push({type:a,nodes:i,eventNodes:o,printedNodes:l})}return t}(Ge),n=new global.Hippy.SceneBuilder(e);t.forEach((function(e){switch(e.type){case qe.createNode:Xe(e.printedNodes,"createNode"),n.create(e.nodes),Ke(e.eventNodes,n);break;case qe.updateNode:Xe(e.printedNodes,"updateNode"),n.update(e.nodes),Ke(e.eventNodes,n);break;case qe.deleteNode:Xe(e.printedNodes,"deleteNode"),n.delete(e.nodes);break;case qe.moveNode:Xe(e.printedNodes,"moveNode"),n.move(e.nodes)}})),n.build()}function Ze(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(Ye)if(Ye=!1,0!==Ge.length){var t=y();e?(Je(t),Ge=[],Ye=!0):Promise.resolve().then((function(){Je(t),Ge=[],Ye=!0}))}else Ye=!0}function et(e){var t=e.attributes;return t.children,function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,Be)}function tt(e){try{var t=q(e.attributes),n=e.id,r=e.nodeId,a=Qe({id:n,hippyNodeId:"".concat(r)},t);return delete a.text,delete a.value,a}catch(e){return j("getTargetNodeAttributes error:",e),{}}}function nt(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.nativeName)return j("Component need to define the native name",t),[];if(t.meta.skipAddToDom)return[];if(!t.meta.component)throw new Error("Specific tag is not supported yet: ".concat(t.tagName));var a={id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,name:t.nativeName,props:Qe(Qe({},et(t)),{},{style:t.style}),tagName:t.tagName},i=function(e){var t=void 0,n=e.events;if(n){var r=[];Object.keys(n).forEach((function(t){var a=n[t],i=a.name,o=a.type,l=a.isCapture,u=a.listener;e.isListenerHandled(t,o)||(e.setListenerHandledType(t,o),r.push({name:i,type:o,isCapture:l,listener:u}))})),t={id:e.nodeId,eventList:r}}return t}(t),o=void 0;if(V()){var l={};i&&Array.isArray(i.eventList)&&i.eventList.forEach((function(e){var t=e.name,n=e.listener;e.type===_.ADD&&Object.assign(l,ie({},t,n))})),a.props.attributes=tt(t),Object.assign(o={},a,r),o.listeners=l}return[[a,r],i,o]}function rt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=[],i=[],o=[];return t.traverseChildren((function(t,r){var l=h(nt(e,t,r),3),u=l[0],s=l[1],c=l[2];u&&a.push(u),s&&i.push(s),c&&o.push(c),"function"==typeof n&&n(t)}),r),[a,i,o]}function at(e){return!!t&&e instanceof t.containerInfo.constructor}function it(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&!t.meta.skipAddToDom){var r=y(),a=at(e)&&!e.isMounted,i=e.isMounted&&!t.isMounted;if(a||i){var o=h(rt(r,t,(function(e){e.isMounted||(e.isMounted=!0)}),n),3),l=o[0],u=o[1],s=o[2];Ge.push({type:qe.createNode,nodes:l,eventNodes:u,printedNodes:s})}}}function ot(e){if(e.isMounted){var t=h(nt(y(),e),3),n=t[0],r=t[1],a=t[2];n&&Ge.push({type:qe.updateNode,nodes:[n],eventNodes:[r],printedNodes:V()?[a]:[]})}}var lt=0;var ut=function(){return X((function e(){Y(this,e),ie(this,"nodeId",void 0),ie(this,"meta",{component:{}}),ie(this,"index",0),ie(this,"childNodes",[]),ie(this,"parentNode",null),ie(this,"mounted",!1),this.nodeId=((lt+=1)%10==0&&(lt+=1),lt)}),[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),it(this,e,{refId:t.nodeId,relativeToRef:C})}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e&&t&&!t.meta.skipAddToDom){var r=y(),a={id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r},i=[[a,n]],o=V()?[Qe(Qe({},a),n)]:[];Ge.push({printedNodes:o,type:qe.moveNode,nodes:i,eventNodes:[]})}}(this,e,{refId:t.nodeId,relativeToRef:C})}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this;var t=this.childNodes.length-1,n=this.childNodes[t];this.childNodes.push(e),it(this,e,n&&{refId:n.nodeId,relativeToRef:N})}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),function(e,t){if(t&&!t.meta.skipAddToDom){t.isMounted=!1;var n=y(),r={id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:n},a=[[r,{}]],i=V()?[r]:[];Ge.push({printedNodes:i,type:qe.deleteNode,nodes:a,eventNodes:[]})}}(0,e)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t<this.childNodes.length;t+=1){var n=this.childNodes[t],r=this.findChild.call(n,e);if(r)return r}return null}},{key:"traverseChildren",value:function(e,t){var n=this;e(this,t),this.childNodes.length&&this.childNodes.forEach((function(t){n.traverseChildren.call(t,e,{})}))}}])}();function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ft(e,t,n){return t=Pe(t),Ne(e,dt()?Reflect.construct(t,n||[],Pe(e).constructor):t.apply(e,n))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dt=function(){return!!e})()}function pt(){pt=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,a){var i=RegExp(e,r);return t.set(i,a||t.get(e)),Re(i,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var a=r[n];if("number"==typeof a)t[n]=e[a];else{for(var i=0;void 0===e[a[i]]&&i+1<a.length;)i++;t[n]=e[a[i]]}return t}),Object.create(null))}return Te(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var a=n.indices;a&&(a.groups=r(a,this))}return n},n.prototype[Symbol.replace]=function(n,a){if("string"==typeof a){var i=t.get(this);return e[Symbol.replace].call(this,n,a.replace(/\$<([^>]+)>/g,(function(e,t){var n=i[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof a){var o=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=z(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,o)),a.apply(this,e)}))}return e[Symbol.replace].call(this,n,a)},pt.apply(this,arguments)}var ht={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},mt={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},vt={TURN:"turn",RAD:"rad",DEG:"deg"};function yt(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=pt(/^([+-]?(?=(\d+))\2\.?\d*)+(deg|turn|rad)|(to\w+)$/g,{digit:2}).exec(t);if(Array.isArray(n)){var r="180",a=h(n,3),i=a[0],o=a[1],l=a[2];return o&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt.DEG,n=parseFloat(e),r=e||"",a=h(e.split("."),2)[1];switch(a&&a.length>2&&(r=n.toFixed(2)),t){case vt.TURN:r="".concat((360*n).toFixed(2));break;case vt.RAD:r="".concat((180/Math.PI*n).toFixed(2))}return r}(o,l):i&&void 0!==mt[i]?r=mt[i]:j("linear-gradient direction or angle is invalid, default value [to bottom] would be used"),r}}function gt(e){var t=h((e||"").replace(/\s+/g," ").trim().split(/\s+(?![^(]*?\))/),2),n=t[0],r=t[1],a=/^([+-]?\d+\.?\d*)%$/g;return!n||a.exec(n)||r?n&&a.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:_e(n)}:void j("linear-gradient color stop is invalid"):{color:_e(n)}}function bt(e,t,n){if(0===t.indexOf("linear-gradient")){var r=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),a=[];n.linearGradient=n.linearGradient||{},r.forEach((function(e,t){if(0===t){var r=yt(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var i=gt(e);i&&a.push(i)}}else{var o=gt(e);o&&a.push(o)}})),n.linearGradient.colorStopList=a}else n[e]=function(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1)return V()?"".concat("http://","127.0.0.1:").concat(process.env.PORT,"/").concat(e):"".concat("hpfile://","./").concat(e);return e}(t);return n}var wt=function(){function e(t){var n;return Y(this,e),ie(n=ft(this,e),"tagName",void 0),ie(n,"id",""),ie(n,"style",{}),ie(n,"attributes",{}),ie(n,"events",{}),n.tagName=t,n}return Te(e,ut),X(e,[{key:"nativeName",get:function(){return this.meta.component.name}},{key:"toString",value:function(){return"".concat(this.tagName,":(").concat(this.nativeName,")")}},{key:"setListenerHandledType",value:function(e,t){this.events[e]&&(this.events[e].handledType=t)}},{key:"isListenerHandled",value:function(e,t){return!this.events[e]||t===this.events[e].handledType}},{key:"hasAttribute",value:function(e){return!!this.attributes[e]}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setStyleAttribute",value:function(e){var t=this;this.style={};var n=e;if(!Array.isArray(n)&&Object.hasOwnProperty.call(n,0)){var r=[],a={};Object.keys(n).forEach((function(e){var t;t=e,L.test(t)?r.push(n[e]):a[e]=n[e]})),n=[].concat(r,[a])}Array.isArray(n)||(n=[n]);var i={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){i=ct(ct({},i),e)})):"object"===z(e)&&e&&(i=ct(ct({},i),e))})),Object.keys(i).forEach((function(e){var n=i[e];if(Object.prototype.hasOwnProperty.call(ht,e)&&(e=ht[e]),"transform"===e){var r={};if(!Array.isArray(n))throw new TypeError("transform only support array args");n.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n instanceof je||n instanceof He?r[t]={animationId:n.animationId}:null===n?r[t]&&delete r[t]:void 0!==n&&(r[t]=n)}))}));var a=Object.keys(r);a.length&&(Array.isArray(t.style.transform)||(t.style.transform=[]),a.forEach((function(e){return t.style.transform.push(ie({},e,r[e]))})))}else if(null===n&&void 0!==t.style[e])t.style[e]=void 0;else if(n instanceof je||n instanceof He)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=Ce(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=_e(n);else if("fontWeight"===e&&n)t.style[e]="string"!=typeof n?n.toString():n;else if("backgroundImage"===e&&n)t.style=bt(e,n,t.style);else if("textShadowOffset"===e){var o=n||{},l=o.x,u=void 0===l?0:l,s=o.width,c=void 0===s?0:s,f=o.y,d=void 0===f?0:f,p=o.height,h=void 0===p?0:p;t.style[e]={width:u||c,height:d||h}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?t.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,ie({},{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e],t||0)),n}(e,n,t.style):t.style[e]=n}))}},{key:"setAttributes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(t)&&t.length>0&&(t.forEach((function(t){if(Array.isArray(t)){var n=h(t,2),r=n[0],a=n[1];e.setAttribute(r,a,{notToNative:!0})}})),ot(this))}},{key:"parseAnimationStyleProp",value:function(e){var t=!1;Object.keys(e).some((function(n){var r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(var a=0;a<r.length;a+=1){var i=r[a];for(var o in i){var l=i[o];if("object"===z(l)&&null!==l&&Number.isInteger(l.animationId))return t=!0,!0}}return!("object"!==z(r)||null===r||!Number.isInteger(r.animationId))&&(t=!0,!0)})),t?this.attributes.useAnimation=!0:"boolean"==typeof this.attributes.useAnimation&&(this.attributes.useAnimation=void 0)}},{key:"parseAttributeProp",value:function(e,t){var n=this,r=[{match:function(){return["id"].indexOf(e)>=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=h(rt(y(),e)||{},3),n=t[0],r=t[1],a=t[2];n&&Ge.push({type:qe.updateNode,nodes:n,eventNodes:r,printedNodes:a})}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=U(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==z(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){if("function"==typeof t){var r=function(e){return F(e)&&(e=e.replace("Capture","")),P[e]?P[e][1]:e}(e);n.events[e]?n.events[e]&&n.events[e].type!==_.ADD&&(n.events[e].type=_.ADD):n.events[e]={name:r,type:_.ADD,isCapture:F(e),listener:(a=r,i=e,function(e){var t=e.id,n=e.currentId,r=e.params,o=e.eventPhase,l={id:t,nativeName:a,originalName:i,params:r,currentId:n,eventPhase:o};ae.receiveComponentEvent(l,e)})}}else{if(function(e,t){return void 0!==t&&"object"===z(t[e])&&!!t[e]}(e,n.events)&&"function"!=typeof t)return n.events[e].type=_.REMOVE,!1;n.attributes[e]=t}var a,i;return!1}}],a=!1;return r.some((function(e){return!!e.match()&&(a=e.action(),!0)})),a}},{key:"setAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&ot(this));if(this.parseAttributeProp(e,t))return;this.parseAnimationStyleProp(this.style),!n.notToNative&&ot(this)}catch(e){}}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,a=e;Object.prototype.hasOwnProperty.call(ht,e)&&(a=ht[e]),"string"==typeof r&&(r=t.trim(),r=a.toLowerCase().indexOf("colors")>-1?Ce(r):a.toLowerCase().indexOf("color")>-1?_e(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&W.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[a]!==r&&(this.style[a]=r,n||ot(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),ot(this),Ze(!0)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=U(e)).replace(/&nbsp;/g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}])}();function kt(e,t,n){return t=Pe(t),Ne(e,St()?Reflect.construct(t,n||[],Pe(e).constructor):t.apply(e,n))}function St(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(St=function(){return!!e})()}var Et=function(){function e(){var t;return Y(this,e),ie(t=kt(this,e),"documentElement",void 0),t.documentElement=new wt("document"),t}return Te(e,ut),X(e,[{key:"createElement",value:function(e){return new wt(e)}},{key:"createElementNS",value:function(e,t){return new wt("".concat(e,":").concat(t))}}])}();function xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}ie(Et,"createElement",void 0),ie(Et,"createElementNS",void 0),Et.createElement=Et.prototype.createElement,Et.createElementNS=Et.prototype.createElementNS;var _t,Ct,Nt={exports:{}},Pt={exports:{}};function Rt(){if(Ct)return _t;Ct=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return _t=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(r,a){for(var i,o,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),u=1;u<arguments.length;u++){for(var s in i=Object(arguments[u]))t.call(i,s)&&(l[s]=i[s]);if(e){o=e(i);for(var c=0;c<o.length;c++)n.call(i,o[c])&&(l[o[c]]=i[o[c]])}}return l},_t}var Tt,It={exports:{}},zt={};var Lt,Ot,At,Dt={}; /** @license React v0.20.2 * scheduler.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function jt(){return Lt||(Lt=1,e=Dt,"production"!==process.env.NODE_ENV&&function(){var t,n,r,a,i=!1,o=!1;if("object"==typeof performance&&"function"==typeof performance.now){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,s=u.now();e.unstable_now=function(){return u.now()-s}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var c=null,f=null,d=function(){if(null!==c)try{var t=e.unstable_now();c(!0,t),c=null}catch(e){throw setTimeout(d,0),e}};t=function(e){null!==c?setTimeout(t,0,e):(c=e,setTimeout(d,0))},n=function(e,t){f=setTimeout(e,t)},r=function(){clearTimeout(f)},e.unstable_shouldYield=function(){return!1},a=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var m=window.requestAnimationFrame,v=window.cancelAnimationFrame;"function"!=typeof m&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof v&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,g=null,b=-1,w=5,k=0;e.unstable_shouldYield=function(){return e.unstable_now()>=k},a=function(){},e.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):w=e>0?Math.floor(1e3/e):5};var S=new MessageChannel,E=S.port2;S.port1.onmessage=function(){if(null!==g){var t=e.unstable_now();k=t+w;try{g(!0,t)?E.postMessage(null):(y=!1,g=null)}catch(e){throw E.postMessage(null),e}}else y=!1},t=function(e){g=e,y||(y=!0,E.postMessage(null))},n=function(t,n){b=p((function(){t(e.unstable_now())}),n)},r=function(){h(b),b=-1}}function x(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;;){var a=r-1>>>1,i=e[a];if(!(void 0!==i&&N(i,t)>0))return;e[a]=t,e[r]=i,r=a}}(e,t,n)}function _(e){var t=e[0];return void 0===t?null:t}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,a=e.length;r<a;){var i=2*(r+1)-1,o=e[i],l=i+1,u=e[l];if(void 0!==o&&N(o,t)<0)void 0!==u&&N(u,o)<0?(e[r]=u,e[l]=t,r=l):(e[r]=o,e[i]=t,r=i);else{if(!(void 0!==u&&N(u,t)<0))return;e[r]=u,e[l]=t,r=l}}}(e,n,0)),t}return null}function N(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],R=[],T=1,I=null,z=3,L=!1,O=!1,A=!1;function D(e){for(var t=_(R);null!==t;){if(null===t.callback)C(R);else{if(!(t.startTime<=e))return;C(R),t.sortIndex=t.expirationTime,x(P,t)}t=_(R)}}function j(e){if(A=!1,D(e),!O)if