-
-
Notifications
You must be signed in to change notification settings - Fork 193
Expand file tree
/
Copy pathpreact-test-utils.js
More file actions
1 lines (1 loc) · 27.6 KB
/
preact-test-utils.js
File metadata and controls
1 lines (1 loc) · 27.6 KB
1
define(function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},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=6)}([function(e,t,n){"use strict";(function(e){function o(){return null}function r(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&_(e.attributes,t.defaultProps),n&&_(e.attributes,n)}function i(e,t){var n,o,r;if(t){for(r in t)if(n=z.test(r))break;if(n){o=e.attributes={};for(r in t)t.hasOwnProperty(r)&&(o[z.test(r)?r.replace(/([A-Z0-9])/,"-$1").toLowerCase():r]=t[r])}}}function a(e,t,o){var r=t&&t._preactCompatRendered&&t._preactCompatRendered.base;r&&r.parentNode!==t&&(r=null),!r&&t&&(r=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==r&&t.removeChild(t.childNodes[i]);var a=n.i(A.c)(e,t,r);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof o&&o(),a&&a._component||a}function u(e,t,o,r){var i=n.i(A.a)(Y,{context:e.context},t),u=a(i,o),c=u._component||u.base;return r&&r.call(c,u),c}function c(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(A.c)(n.i(A.a)(o),e,t),!0)}function l(e){return v.bind(null,e)}function s(e,t){for(var n=t||0;n<e.length;n++){var o=e[n];Array.isArray(o)?s(o):o&&"object"==typeof o&&!y(o)&&(o.props&&o.type||o.attributes&&o.nodeName||o.children)&&(e[n]=v(o.type||o.nodeName,o.props||o.attributes,o.children))}}function p(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function d(e){return N({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function f(e){var t=e[V];return t?!0===t?e:t:(t=d(e),Object.defineProperty(t,V,{configurable:!0,value:!0}),t.displayName=e.displayName,t.defaultProps=e.defaultProps,Object.defineProperty(e,V,{configurable:!0,value:t}),t)}function v(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return s(e,2),h(A.a.apply(void 0,e))}function h(e){e.preactCompatNormalized=!0,g(e),p(e.nodeName)&&(e.nodeName=f(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!q||"string"!==n&&"number"!==n||(e.attributes.ref=E(t,q)),b(e),e}function m(e,t){for(var o=[],r=arguments.length-2;r-- >0;)o[r]=arguments[r+2];if(!y(e))return e;var i=e.attributes||e.props,a=n.i(A.a)(e.nodeName||e.type,i,e.children||i&&i.children),u=[a,t];return o&&o.length?u.push(o):t&&t.children&&u.push(t.children),h(A.d.apply(void 0,u))}function y(e){return e&&(e instanceof $||e.$$typeof===R)}function E(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var o={};for(var r in n)o[r.toLowerCase()]=r;if(o.ondoubleclick&&(n.ondblclick=n[o.ondoubleclick],delete n[o.ondoubleclick]),o.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=o.oninput||"oninput";n[i]||(n[i]=S([n[i],n[o.onchange]]),delete n[o.onchange])}}}function g(e){var t=e.attributes||(e.attributes={});te.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",te)}function _(e,t){for(var n=arguments,o=1,r=void 0;o<arguments.length;o++)if(r=n[o])for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i]);return e}function C(e,t){for(var n in e)if(!(n in t))return!0;for(var o in t)if(e[o]!==t[o])return!0;return!1}function w(e){return e&&e.base||e}function M(){}function N(e){function t(e,t){P(this),D.call(this,e,t,H),T.call(this,e,t)}return e=_({constructor:t},e),e.mixins&&k(e,x(e.mixins)),e.statics&&_(t,e.statics),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),M.prototype=D.prototype,t.prototype=_(new M,e),t.displayName=e.displayName||"Component",t}function x(e){for(var t={},n=0;n<e.length;n++){var o=e[n];for(var r in o)o.hasOwnProperty(r)&&"function"==typeof o[r]&&(t[r]||(t[r]=[])).push(o[r])}return t}function k(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=S(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||B.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function U(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function S(e,t){return function(){for(var n,o=arguments,r=this,i=0;i<e.length;i++){var a=U(r,e[i],o);if(t&&null!=a){n||(n={});for(var u in a)a.hasOwnProperty(u)&&(n[u]=a[u])}else void 0!==a&&(n=a)}return n}}function T(e,t){O.call(this,e,t),this.componentWillReceiveProps=S([O,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=S([O,I,this.render||"render",K])}function O(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof $)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),F){var o="function"==typeof this?this:this.constructor;this.displayName||o.name}}}function I(e){q=this}function K(){q===this&&(q=null)}function D(e,t,n){A.e.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==H&&T.call(this,e,t)}function L(e,t){D.call(this,e,t)}Object.defineProperty(t,"__esModule",{value:!0});var A=n(4);n.d(t,"version",function(){return W}),n.d(t,"DOM",function(){return Q}),n.d(t,"Children",function(){return J}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return N}),n.d(t,"createFactory",function(){return l}),n.d(t,"createElement",function(){return v}),n.d(t,"cloneElement",function(){return m}),n.d(t,"isValidElement",function(){return y}),n.d(t,"findDOMNode",function(){return w}),n.d(t,"unmountComponentAtNode",function(){return c}),n.d(t,"Component",function(){return D}),n.d(t,"PureComponent",function(){return L}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return u}),n.d(t,"__spread",function(){return _});var W="15.1.0",j="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),R="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,V="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",B={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},z=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,H={},F=void 0===e||!e.env||!1,$=n.i(A.a)("a",null).constructor;$.prototype.$$typeof=R,$.prototype.preactCompatUpgraded=!1,$.prototype.preactCompatNormalized=!1,Object.defineProperty($.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty($.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var G=A.b.event;A.b.event=function(e){return G&&(e=G(e)),e.persist=Object,e.nativeEvent=e,e};var X=A.b.vnode;A.b.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=_({},e.attributes);"function"==typeof t?(!0===t[V]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||h(e),r(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}X&&X(e)};var Y=function(){};Y.prototype.getChildContext=function(){return this.props.context},Y.prototype.render=function(e){return e.children[0]};for(var q,Z=[],J={map:function(e,t,n){return null==e?null:(e=J.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=J.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=J.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},Q={},ee=j.length;ee--;)Q[j[ee]]=l(j[ee]);var te={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};_(D.prototype=new A.e,{constructor:D,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var o in n.state)o in e||delete n.state[o]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),M.prototype=D.prototype,L.prototype=new M,L.prototype.isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return C(this.props,e)||C(this.state,t)};var ne={version:W,DOM:Q,Children:J,render:a,createClass:N,createFactory:l,createElement:v,cloneElement:m,isValidElement:y,findDOMNode:w,unmountComponentAtNode:c,Component:D,PureComponent:L,unstable_renderSubtreeIntoContainer:u,__spread:_};t.default=ne}).call(t,n(3))},function(e,t,n){"use strict";e.exports="onKeyDown onKeyPress onKeyUp onFocus onBlur onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onChange onInput onSubmit onTouchCancel onTouchEnd onTouchMove onTouchStart onLoad onError onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd".split(" ").map(function(e){var t=e.replace("on","");return t.charAt(0).toLowerCase()+t.substr(1)})},function(e,t,n){function o(e,t){if("KeyboardEvent"===e&&t)return{keyCode:t.keyCode||0,key:t.key||0,which:t.which||t.keyCode||0}}var r=n(5),i={UIEvent:function(){return{view:document.defaultView}},FocusEvent:function(){return i.UIEvent.apply(this,arguments)},MouseEvent:function(e){return{button:0,bubbles:"mouseenter"!==e&&"mouseleave"!==e,cancelable:"mouseenter"!==e&&"mouseleave"!==e,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,clientX:1,clientY:1,screenX:0,screenY:0,view:document.defaultView,relatedTarget:document.documentElement}},WheelEvent:function(e){return i.MouseEvent.apply(this,arguments)},KeyboardEvent:function(){return{view:document.defaultView,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:0}}},a={beforeprint:"Event",afterprint:"Event",beforeunload:"Event",abort:"Event",error:"Event",change:"Event",submit:"Event",reset:"Event",cached:"Event",canplay:"Event",canplaythrough:"Event",chargingchange:"Event",chargingtimechange:"Event",checking:"Event",close:"Event",downloading:"Event",durationchange:"Event",emptied:"Event",ended:"Event",fullscreenchange:"Event",fullscreenerror:"Event",invalid:"Event",levelchange:"Event",loadeddata:"Event",loadedmetadata:"Event",noupdate:"Event",obsolete:"Event",offline:"Event",online:"Event",open:"Event",orientationchange:"Event",pause:"Event",pointerlockchange:"Event",pointerlockerror:"Event",copy:"Event",cut:"Event",paste:"Event",play:"Event",playing:"Event",ratechange:"Event",readystatechange:"Event",seeked:"Event",seeking:"Event",stalled:"Event",success:"Event",suspend:"Event",timeupdate:"Event",updateready:"Event",visibilitychange:"Event",volumechange:"Event",waiting:"Event",load:"UIEvent",unload:"UIEvent",resize:"UIEvent",scroll:"UIEvent",select:"UIEvent",drag:"MouseEvent",dragenter:"MouseEvent",dragleave:"MouseEvent",dragover:"MouseEvent",dragstart:"MouseEvent",dragend:"MouseEvent",drop:"MouseEvent",touchcancel:"UIEvent",touchend:"UIEvent",touchenter:"UIEvent",touchleave:"UIEvent",touchmove:"UIEvent",touchstart:"UIEvent",blur:"UIEvent",focus:"UIEvent",focusin:"UIEvent",focusout:"UIEvent",input:"UIEvent",show:"MouseEvent",click:"MouseEvent",dblclick:"MouseEvent",mouseenter:"MouseEvent",mouseleave:"MouseEvent",mousedown:"MouseEvent",mouseup:"MouseEvent",mouseover:"MouseEvent",mousemove:"MouseEvent",mouseout:"MouseEvent",contextmenu:"MouseEvent",wheel:"WheelEvent",message:"MessageEvent",storage:"StorageEvent",timeout:"StorageEvent",keydown:"KeyboardEvent",keypress:"KeyboardEvent",keyup:"KeyboardEvent",progress:"ProgressEvent",loadend:"ProgressEvent",loadstart:"ProgressEvent",popstate:"PopStateEvent",hashchange:"HashChangeEvent",transitionend:"TransitionEvent",compositionend:"CompositionEvent",compositionstart:"CompositionEvent",compositionupdate:"CompositionEvent",pagehide:"PageTransitionEvent",pageshow:"PageTransitionEvent"},u={Event:"initEvent",UIEvent:"initUIEvent",FocusEvent:"initUIEvent",MouseEvent:"initMouseEvent",WheelEvent:"initMouseEvent",MessageEvent:"initMessageEvent",StorageEvent:"initStorageEvent",KeyboardEvent:"initKeyboardEvent",ProgressEvent:"initEvent",PopStateEvent:"initEvent",TransitionEvent:"initEvent",HashChangeEvent:"initHashChangeEvent",CompositionEvent:"initCompositionEvent",DeviceMotionEvent:"initDeviceMotionEvent",PageTransitionEvent:"initEvent",DeviceOrientationEvent:"initDeviceOrientationEvent"},c={initEvent:[],initUIEvent:["view","detail"],initKeyboardEvent:["view","char","key","location","modifiersList","repeat","locale"],initKeyEvent:["view","ctrlKey","altKey","shiftKey","metaKey","keyCode","charCode"],initMouseEvent:["view","detail","screenX","screenY","clientX","clientY","ctrlKey","altKey","shiftKey","metaKey","button","relatedTarget"],initHashChangeEvent:["oldURL","newURL"],initCompositionEvent:["view","data","locale"],initDeviceMotionEvent:["acceleration","accelerationIncludingGravity","rotationRate","interval"],initDeviceOrientationEvent:["alpha","beta","gamma","absolute"],initMessageEvent:["data","origin","lastEventId","source"],initStorageEvent:["key","oldValue","newValue","url","storageArea"]},l={UIEvent:window.UIEvent,FocusEvent:window.FocusEvent,MouseEvent:window.MouseEvent,WheelEvent:window.MouseEvent,KeyboardEvent:window.KeyboardEvent};t.generate=function(e,t){if(!a.hasOwnProperty(e))throw new SyntaxError("Unsupported event type");var n,s,p=a[e],d=o(p,t);t instanceof window.Event||(t=p in i?r({bubbles:!0,cancelable:!0},i[p](e,t),t):r({bubbles:!0,cancelable:!0},t));var f=l[p]||window.Event;try{n=new f(e,t);for(s in d)Object.defineProperty(n,s,{value:d[s]});return n}catch(e){}var v=window.navigator.userAgent.toLowerCase();Math.max(v.indexOf("msie"),v.indexOf("trident"))>=0&&"KeyboardEvent"===p&&(p="UIEvent");var h=u[p];if(!document.createEvent){n=r(document.createEventObject(),t);for(s in d)Object.defineProperty(n,s,{value:d[s]});return n}if(n=r(document.createEvent(p),t),"initKeyboardEvent"===h)if(void 0===n[h])h="initKeyEvent";else if(!("modifiersList"in t)){var m=[];t.metaKey&&m.push("Meta"),t.altKey&&m.push("Alt"),t.shiftKey&&m.push("Shift"),t.ctrlKey&&m.push("Control"),t.modifiersList=m.join(" ")}var y=c[h].map(function(e){return t[e]});n[h].apply(n,[e,t.bubbles,t.cancelable].concat(y));for(s in d)Object.defineProperty(n,s,{value:d[s]});return n},t.simulate=function(e,n,o){var r=t.generate(n,o);return document.createEvent?e.dispatchEvent(r):e.fireEvent("on"+n,r)}},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function r(e){if(s===setTimeout)return setTimeout(e,0);if((s===n||!s)&&setTimeout)return s=setTimeout,setTimeout(e,0);try{return s(e,0)}catch(t){try{return s.call(null,e,0)}catch(t){return s.call(this,e,0)}}}function i(e){if(p===clearTimeout)return clearTimeout(e);if((p===o||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){h&&f&&(h=!1,f.length?v=f.concat(v):m=-1,v.length&&u())}function u(){if(!h){var e=r(a);h=!0;for(var t=v.length;t;){for(f=v,v=[];++m<t;)f&&f[m].run();m=-1,t=v.length}f=null,h=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function l(){}var s,p,d=e.exports={};!function(){try{s="function"==typeof setTimeout?setTimeout:n}catch(e){s=n}try{p="function"==typeof clearTimeout?clearTimeout:o}catch(e){p=o}}();var f,v=[],h=!1,m=-1;d.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];v.push(new c(e,t)),1!==v.length||h||r(u)},c.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=l,d.addListener=l,d.once=l,d.off=l,d.removeListener=l,d.removeAllListeners=l,d.emit=l,d.prependListener=l,d.prependOnceListener=l,d.listeners=function(e){return[]},d.binding=function(e){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(e){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(e,t,n){"use strict";function o(){}function r(e,t){var n,r,i,a,u=D;for(a=arguments.length;a-- >2;)K.push(arguments[a]);for(t&&null!=t.children&&(K.length||K.push(t.children),delete t.children);K.length;)if((r=K.pop())&&void 0!==r.pop)for(a=r.length;a--;)K.push(r[a]);else"boolean"==typeof r&&(r=null),(i="function"!=typeof e)&&(null==r?r="":"number"==typeof r?r=String(r):"string"!=typeof r&&(i=!1)),i&&n?u[u.length-1]+=r:u===D?u=[r]:u.push(r),n=i;var c=new o;return c.nodeName=e,c.children=u,c.attributes=null==t?void 0:t,c.key=null==t?void 0:t.key,void 0!==I.vnode&&I.vnode(c),c}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return r(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function u(e){!e._dirty&&(e._dirty=!0)&&1==W.push(e)&&(I.debounceRendering||L)(c)}function c(){var e,t=W;for(W=[];e=t.pop();)e._dirty&&P(e)}function l(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&s(e,t.nodeName):n||e._componentConstructor===t.nodeName}function s(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function p(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var o in n)void 0===t[o]&&(t[o]=n[o]);return t}function d(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n,o,r){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),o&&o(e);else if("class"!==t||r)if("style"===t){if(o&&"string"!=typeof o&&"string"!=typeof n||(e.style.cssText=o||""),o&&"object"==typeof o){if("string"!=typeof n)for(var i in n)i in o||(e.style[i]="");for(var i in o)e.style[i]="number"==typeof o[i]&&!1===A.test(i)?o[i]+"px":o[i]}}else if("dangerouslySetInnerHTML"===t)o&&(e.innerHTML=o.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),o?n||e.addEventListener(t,m,a):e.removeEventListener(t,m,a),(e._listeners||(e._listeners={}))[t]=o}else if("list"!==t&&"type"!==t&&!r&&t in e)h(e,t,null==o?"":o),null!=o&&!1!==o||e.removeAttribute(t);else{var u=r&&t!==(t=t.replace(/^xlink\:?/,""));null==o||!1===o?u?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof o&&(u?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),o):e.setAttribute(t,o))}else e.className=o||""}function h(e,t,n){try{e[t]=n}catch(e){}}function m(e){return this._listeners[e.type](I.event&&I.event(e)||e)}function y(){for(var e;e=j.pop();)I.afterMount&&I.afterMount(e),e.componentDidMount&&e.componentDidMount()}function E(e,t,n,o,r,i){R++||(V=null!=r&&void 0!==r.ownerSVGElement,B=null!=e&&!("__preactattr_"in e));var a=b(e,t,n,o,i);return r&&a.parentNode!==r&&r.appendChild(a),--R||(B=!1,i||y()),a}function b(e,t,n,o,r){var i=e,a=V;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||r)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),_(e,!0))),i.__preactattr_=!0,i;var u=t.nodeName;if("function"==typeof u)return U(e,t,n,o);if(V="svg"===u||"foreignObject"!==u&&V,u=String(u),(!e||!s(e,u))&&(i=d(u,V),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),_(e,!0)}var c=i.firstChild,l=i.__preactattr_,p=t.children;if(null==l){l=i.__preactattr_={};for(var f=i.attributes,v=f.length;v--;)l[f[v].name]=f[v].value}return!B&&p&&1===p.length&&"string"==typeof p[0]&&null!=c&&void 0!==c.splitText&&null==c.nextSibling?c.nodeValue!=p[0]&&(c.nodeValue=p[0]):(p&&p.length||null!=c)&&g(i,p,n,o,B||null!=l.dangerouslySetInnerHTML),w(i,t.attributes,l),V=a,i}function g(e,t,n,o,r){var i,a,u,c,s,p=e.childNodes,d=[],v={},h=0,m=0,y=p.length,E=0,g=t?t.length:0;if(0!==y)for(var C=0;C<y;C++){var w=p[C],M=w.__preactattr_,N=g&&M?w._component?w._component.__key:M.key:null;null!=N?(h++,v[N]=w):(M||(void 0!==w.splitText?!r||w.nodeValue.trim():r))&&(d[E++]=w)}if(0!==g)for(var C=0;C<g;C++){c=t[C],s=null;var N=c.key;if(null!=N)h&&void 0!==v[N]&&(s=v[N],v[N]=void 0,h--);else if(!s&&m<E)for(i=m;i<E;i++)if(void 0!==d[i]&&l(a=d[i],c,r)){s=a,d[i]=void 0,i===E-1&&E--,i===m&&m++;break}s=b(s,c,n,o),u=p[C],s&&s!==e&&s!==u&&(null==u?e.appendChild(s):s===u.nextSibling?f(u):e.insertBefore(s,u))}if(h)for(var C in v)void 0!==v[C]&&_(v[C],!1);for(;m<=E;)void 0!==(s=d[E--])&&_(s,!1)}function _(e,t){var n=e._component;n?S(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||f(e),C(e))}function C(e){for(e=e.lastChild;e;){var t=e.previousSibling;_(e,!0),e=t}}function w(e,t,n){var o;for(o in n)t&&null!=t[o]||null==n[o]||v(e,o,n[o],n[o]=void 0,V);for(o in t)"children"===o||"innerHTML"===o||o in n&&t[o]===("value"===o||"checked"===o?e[o]:n[o])||v(e,o,n[o],n[o]=t[o],V)}function M(e){var t=e.constructor.name;(z[t]||(z[t]=[])).push(e)}function N(e,t,n){var o,r=z[e.name];if(e.prototype&&e.prototype.render?(o=new e(t,n),T.call(o,t,n)):(o=new T(t,n),o.constructor=e,o.render=x),r)for(var i=r.length;i--;)if(r[i].constructor===e){o.nextBase=r[i].nextBase,r.splice(i,1);break}return o}function x(e,t,n){return this.constructor(e,n)}function k(e,t,n,o,r){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||r?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,o),o&&o!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=o),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===I.syncComponentUpdates&&e.base?u(e):P(e,1,r)),e.__ref&&e.__ref(e))}function P(e,t,n,o){if(!e._disable){var r,a,u,c=e.props,l=e.state,s=e.context,d=e.prevProps||c,f=e.prevState||l,v=e.prevContext||s,h=e.base,m=e.nextBase,b=h||m,g=e._component,C=!1;if(h&&(e.props=d,e.state=f,e.context=v,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,l,s)?C=!0:e.componentWillUpdate&&e.componentWillUpdate(c,l,s),e.props=c,e.state=l,e.context=s),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!C){r=e.render(c,l,s),e.getChildContext&&(s=i(i({},s),e.getChildContext()));var w,M,x=r&&r.nodeName;if("function"==typeof x){var U=p(r);a=g,a&&a.constructor===x&&U.key==a.__key?k(a,U,1,s,!1):(w=a,e._component=a=N(x,U,s),a.nextBase=a.nextBase||m,a._parentComponent=e,k(a,U,0,s,!1),P(a,1,n,!0)),M=a.base}else u=b,w=g,w&&(u=e._component=null),(b||1===t)&&(u&&(u._component=null),M=E(u,r,s,n||!h,b&&b.parentNode,!0));if(b&&M!==b&&a!==g){var T=b.parentNode;T&&M!==T&&(T.replaceChild(M,b),w||(b._component=null,_(b,!1)))}if(w&&S(w),e.base=M,M&&!o){for(var O=e,K=e;K=K._parentComponent;)(O=K).base=M;M._component=O,M._componentConstructor=O.constructor}}if(!h||n?j.unshift(e):C||(e.componentDidUpdate&&e.componentDidUpdate(d,f,v),I.afterUpdate&&I.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);R||o||y()}}function U(e,t,n,o){for(var r=e&&e._component,i=r,a=e,u=r&&e._componentConstructor===t.nodeName,c=u,l=p(t);r&&!c&&(r=r._parentComponent);)c=r.constructor===t.nodeName;return r&&c&&(!o||r._component)?(k(r,l,3,n,o),e=r.base):(i&&!u&&(S(i),e=a=null),r=N(t.nodeName,l,n),e&&!r.nextBase&&(r.nextBase=e,a=null),k(r,l,1,n,o),e=r.base,a&&e!==a&&(a._component=null,_(a,!1))),e}function S(e){I.beforeUnmount&&I.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?S(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,f(t),M(e),C(t)),e.__ref&&e.__ref(null)}function T(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function O(e,t,n){return E(n,e,{},!1,t,!1)}n.d(t,"a",function(){return r}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return T}),n.d(t,"c",function(){return O}),n.d(t,"b",function(){return I});var I={},K=[],D=[],L="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,A=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,W=[],j=[],R=0,V=!1,B=!1,z={};i(T.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),u(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),P(this,2)},render:function(){}})},function(e,t){function n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)o.call(n,r)&&(e[r]=n[r])}return e}e.exports=n;var o=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){p.default.forEach(function(e){f.Simulate[e]=function(t,n){l.default.simulate(t,e.toLowerCase(),n)}})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),u=o(a),c=n(2),l=o(c),s=n(1),p=o(s),d=function(){function e(){r(this,e)}return e.prototype.render=function(e,t){},e.prototype.getRenderOutput=function(){},e}(),f={renderIntoDocument:function(e){var t=document.createElement("div");return u.default.render(e,t)},isElement:function(e){return u.default.isValidElement(e)},isElementOfType:function(e,t){return u.default.isValidElement(e)&&e.type===t},isDOMComponent:function(e){return!(!e||1!==e.nodeType||!e.tagName)},isCompositeComponent:function(e){return!f.isDOMComponent(e)&&(null!=e&&"function"==typeof e.render&&"function"==typeof e.setState)},isCompositeComponentWithType:function(e,t){if(!f.isCompositeComponent(e))return!1;var n=e.type;return n===t},isCompositeComponentElement:function(e){if(!u.default.isValidElement(e))return!1;var t=e.type.prototype;return"function"==typeof t.render&&"function"==typeof t.setState},findAllInRenderedTree:function(e,t){return e?function e(t,n){var o=[],r=t._component;if(r&&n(r)){o.push(r,t);for(var i=0;i<t.childNodes.length;i++){var a=t.childNodes[i];o=o.concat(e(a,n))}}else u.default.isDOMComponent(t)&&o.push(t);return o}(e.base,t):[]},mockComponent:function(e,t){return t=t||e.mockTagName||"div",e.prototype.render.mockImplementation(function(){return u.default.createElement(t,null,this.props.children)}),this},batchedUpdates:function(e){e()},createRenderer:function(){return new d},Simulate:{}};i(),t.default=f,e.exports=t.default}])});