plait
Version:
A minimal JavaScript framework for building isomorphic reactive web components
1 lines • 33.8 kB
JavaScript
var Plait=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,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return 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=24)}([function(e){e.exports=function(e){return e&&"Widget"===e.type}},function(e){e.exports="2"},function(e,t,n){var r=n(1);e.exports=function(e){return e&&"VirtualNode"===e.type&&e.version===r}},function(e,t,n){var r=n(8);e.exports=function(e){return function t(n){return 0===arguments.length||r(n)?t:e.apply(this,arguments)}}},function(e){e.exports=function(e){return e&&"Thunk"===e.type}},function(e){e.exports=function(e){return e&&("function"==typeof e.hook&&!e.hasOwnProperty("hook")||"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}},function(e,t,n){var r=n(1);e.exports=function(e){return e&&"VirtualText"===e.type&&e.version===r}},function(e,t,n){"use strict";n(33)("ev-store","7");var r="__EV_STORE_KEY@7";e.exports=function(e){var t=e[r];return t||(t=e[r]={}),t}},function(e){e.exports=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}},function(e,t,n){var r=n(3),o=n(8);e.exports=function(e){return function t(n,i){switch(arguments.length){case 0:return t;case 1:return o(n)?t:r(function(t){return e(n,t)});default:return o(n)&&o(i)?t:o(n)?r(function(t){return e(t,i)}):o(i)?r(function(t){return e(n,t)}):e(n,i)}}}},function(e){var t=Array.isArray,n=Object.prototype.toString;e.exports=t||function(e){return"[object Array]"===n.call(e)}},function(e){var t=function(){return this}();try{t=t||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(t=window)}e.exports=t},function(e,t,n){(function(t){var r,o=void 0===t?"undefined"==typeof window?{}:window:t,i=n(44);"undefined"==typeof document?!(r=o["__GLOBAL_DOCUMENT_CACHE@4"])&&(r=o["__GLOBAL_DOCUMENT_CACHE@4"]=i):r=document,e.exports=r}).call(this,n(11))},function(e,t,n){"use strict";(function(e,r){var o,i=n(23);o="undefined"==typeof self?"undefined"==typeof window?void 0===e?r:e:window:self;var u=Object(i.a)(o);t.a=u}).call(this,n(11),n(40)(e))},function(e){e.exports=function(e,t){switch(e){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return function(){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(e,t,n){var r=n(12),o=n(16),i=n(2),u=n(6),a=n(0),c=n(18);e.exports=function e(t,n){var f=n&&n.document||r,s=n?n.warn:null;if(t=c(t).a,a(t))return t.init();if(u(t))return f.createTextNode(t.text);if(!i(t))return s&&s("Item is not a valid virtual dom node",t),null;var l=null===t.namespace?f.createElement(t.tagName):f.createElementNS(t.namespace,t.tagName),p=t.properties;o(l,p);for(var d,h=t.children,v=0;v<h.length;v++)(d=e(h[v],n))&&l.appendChild(d);return l}},function(e,t,n){function r(e,t,n,r){if(r){var o=r[t];if(a(o))o.unhook&&o.unhook(e,t,n);else if("attributes"===t)for(var i in o)e.removeAttribute(i);else if("style"===t)for(var u in o)e.style[u]="";else e[t]="string"==typeof o?"":null}}function o(e,t,n,r,o){var a=n?n[r]:void 0;if("attributes"!==r)if(a&&u(a)&&i(a)!==i(o))e[r]=o;else{u(e[r])||(e[r]={});var c="style"===r?"":void 0;for(var f in o){var s=o[f];e[r][f]=void 0===s?c:s}}else for(var l in o){var p=o[l];void 0===p?e.removeAttribute(l):e.setAttribute(l,p)}}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var u=n(17),a=n(5);e.exports=function(e,t,n){for(var i in t){var c=t[i];void 0===c?r(e,i,c,n):a(c)?(r(e,i,c,n),c.hook&&c.hook(e,i,n?n[i]:void 0)):u(c)?o(e,0,n,i,c):e[i]=c}}},function(e){"use strict";e.exports=function(e){return"object"==typeof e&&null!==e}},function(e,t,n){function r(e,t){var n=e.vnode;if(n||(n=e.vnode=e.render(t)),!(o(n)||i(n)||u(n)))throw new Error("thunk did not return a valid node");return n}var o=n(2),i=n(6),u=n(0),a=n(4);e.exports=function(e,t){var n=e,o=t;return a(t)&&(o=r(t,e)),a(e)&&(n=r(e,null)),{a:n,b:o}}},function(e,t,n){function r(e,t,n){this.type=+e,this.vNode=t,this.patch=n}var o=n(1);r.NONE=0,r.VTEXT=1,r.VNODE=2,r.WIDGET=3,r.PROPS=4,r.ORDER=5,r.INSERT=6,r.REMOVE=7,r.THUNK=8,e.exports=r,r.prototype.version=o,r.prototype.type="VirtualPatch"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o="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},i=function(){function e(e,t){for(var n,r=0;r<t.length;r++)(n=t[r]).enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=r(n(53)),a=r(n(22)),c=r(n(59)),f=r(n(60)),s=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==(void 0===t?"undefined":o(t)))throw new TypeError(t,"is not an object");this.obj=(0,f.default)(t),this["@@Plait/State"]=1}return i(e,[{key:"clone",value:function(){return new e(this.obj)}},{key:"toObject",value:function(){return(0,f.default)(this.obj)}},{key:"set",value:function(t,n){var r={};return r[t]=n,new e(Object.assign({},this.obj,r))}},{key:"get",value:function(e){var t=this.obj[e];return(0,a.default)(Object,t)&&!t.hasOwnProperty("@@Plait/State")?(0,f.default)(t):t}},{key:"update",value:function(e,t){return this.set(e,t(this.get(e)))}},{key:"setIn",value:function(t,n){return new e((0,u.default)(t,n,this.obj))}},{key:"getIn",value:function(e){return(0,c.default)(e,this.obj)}}]),e}();t.default=s,e.exports=t.default},function(e,t,n){var r=n(3),o=n(9),i=n(8);e.exports=function(e){return function t(n,u,a){switch(arguments.length){case 0:return t;case 1:return i(n)?t:o(function(t,r){return e(n,t,r)});case 2:return i(n)&&i(u)?t:i(n)?o(function(t,n){return e(t,u,n)}):i(u)?o(function(t,r){return e(n,t,r)}):r(function(t){return e(n,u,t)});default:return i(n)&&i(u)&&i(a)?t:i(n)&&i(u)?o(function(t,n){return e(t,n,a)}):i(n)&&i(a)?o(function(t,n){return e(t,u,n)}):i(u)&&i(a)?o(function(t,r){return e(n,t,r)}):i(n)?r(function(t){return e(t,u,a)}):i(u)?r(function(t){return e(n,t,a)}):i(a)?r(function(t){return e(n,u,t)}):e(n,u,a)}}}},function(e,t,n){var r=n(9)(function(e,t){return null!=t&&t.constructor===e||t instanceof e});e.exports=r},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){for(var n=arguments.length,r=Array(2<n?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(0,i.default)(e,t,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.State=t.start=t.render=t.initializeComponent=t.forwardDispatch=t.h=void 0;var i=r(n(25)),u=n(35),a=r(n(20));t.default={h:o,forwardDispatch:u.forwardDispatch,initializeComponent:u.initializeComponent,render:u.render,start:u.start,State:a.default},t.h=o,t.forwardDispatch=u.forwardDispatch,t.initializeComponent=u.initializeComponent,t.render=u.render,t.start=u.start,t.State=a.default},function(e,t,n){var r=n(26);e.exports=r},function(e,t,n){"use strict";function r(e,t,n,i){if("string"==typeof e)t.push(new s(e));else if("number"==typeof e)t.push(new s(e+""));else if(o(e))t.push(e);else{if(!c(e)){if(null===e||void 0===e)return;throw u({foreignObject:e,parentVnode:{tagName:n,properties:i}})}for(var a=0;a<e.length;a++)r(e[a],t,n,i)}}function o(e){return l(e)||p(e)||d(e)||v(e)}function i(e){return"string"==typeof e||c(e)||o(e)}function u(e){var t=new Error;return t.type="virtual-hyperscript.unexpected.virtual-element",t.message="Unexpected virtual child passed to h().\nExpected a VNode / Vthunk / VWidget / string but:\ngot:\n"+a(e.foreignObject)+".\nThe parent vnode is:\n"+a(e.parentVnode),t.foreignObject=e.foreignObject,t.parentVnode=e.parentVnode,t}function a(e){try{return JSON.stringify(e,null," ")}catch(t){return e+""}}var c=n(10),f=n(27),s=n(28),l=n(2),p=n(6),d=n(0),h=n(5),v=n(4),y=n(29),b=n(31),g=n(32);e.exports=function(e,t,n){var o,u,a,c,s=[];return!n&&i(t)&&(n=t,u={}),o=y(e,u=u||t||{}),u.hasOwnProperty("key")&&(a=u.key,u.key=void 0),u.hasOwnProperty("namespace")&&(c=u.namespace,u.namespace=void 0),"INPUT"!==o||c||!u.hasOwnProperty("value")||void 0===u.value||h(u.value)||(u.value=b(u.value)),function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];if(h(n))continue;"ev-"===t.substr(0,3)&&(e[t]=g(n))}}(u),void 0!==n&&null!==n&&r(n,s,o,u),new f(o,u,s,a,c)}},function(e,t,n){function r(e,t,n,r,o){this.tagName=e,this.properties=t||f,this.children=n||s,this.key=null==r?void 0:r+"",this.namespace="string"==typeof o?o:null;var l,p=n&&n.length||0,d=0,h=!1,v=!1,y=!1;for(var b in t)if(t.hasOwnProperty(b)){var g=t[b];c(g)&&g.unhook&&(!l&&(l={}),l[b]=g)}for(var w,m=0;m<p;m++)w=n[m],i(w)?(d+=w.count||0,!h&&w.hasWidgets&&(h=!0),!v&&w.hasThunks&&(v=!0),!y&&(w.hooks||w.descendantHooks)&&(y=!0)):!h&&u(w)?"function"==typeof w.destroy&&(h=!0):!v&&a(w)&&(v=!0);this.count=p+d,this.hasWidgets=h,this.hasThunks=v,this.hooks=l,this.descendantHooks=y}var o=n(1),i=n(2),u=n(0),a=n(4),c=n(5);e.exports=r;var f={},s=[];r.prototype.version=o,r.prototype.type="VirtualNode"},function(e,t,n){function r(e){this.text=e+""}var o=n(1);e.exports=r,r.prototype.version=o,r.prototype.type="VirtualText"},function(e,t,n){"use strict";var r=n(30),o=/([\.#]?[a-zA-Z0-9\u007F-\uFFFF_:-]+)/,i=/^\.|#/;e.exports=function(e,t){if(!e)return"DIV";var n,u,a,c,f=!t.hasOwnProperty("id"),s=r(e,o),l=null;for(i.test(s[1])&&(l="DIV"),c=0;c<s.length;c++)(u=s[c])&&(a=u.charAt(0),l?"."===a?(n=n||[]).push(u.substring(1,u.length)):"#"===a&&f&&(t.id=u.substring(1,u.length)):l=u);return n&&(t.className&&n.push(t.className),t.className=n.join(" ")),t.namespace?l:l.toUpperCase()}},function(e){e.exports=function(e){var t=String.prototype.split,n=/()??/.exec("")[1]===e;return function(r,o,i){if("[object RegExp]"!==Object.prototype.toString.call(o))return t.call(r,o,i);var u,a,c,f,s=[],l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.extended?"x":"")+(o.sticky?"y":""),p=0;o=new RegExp(o.source,l+"g");for(r+="",n||(u=new RegExp("^"+o.source+"$(?!\\s)",l)),i=i===e?4294967295:i>>>0;(a=o.exec(r))&&!((c=a.index+a[0].length)>p&&(s.push(r.slice(p,a.index)),!n&&1<a.length&&a[0].replace(u,function(){for(var t=1;t<arguments.length-2;t++)arguments[t]===e&&(a[t]=e)}),1<a.length&&a.index<r.length&&Array.prototype.push.apply(s,a.slice(1)),f=a[0].length,p=c,s.length>=i));)o.lastIndex===a.index&&o.lastIndex++;return p===r.length?(f||!o.test(""))&&s.push(""):s.push(r.slice(p)),s.length>i?s.slice(0,i):s}}()},function(e){"use strict";function t(e){return this instanceof t?void(this.value=e):new t(e)}e.exports=t,t.prototype.hook=function(e,t){e[t]!==this.value&&(e[t]=this.value)}},function(e,t,n){"use strict";function r(e){return this instanceof r?void(this.value=e):new r(e)}var o=n(7);e.exports=r,r.prototype.hook=function(e,t){o(e)[t.substr(3)]=this.value},r.prototype.unhook=function(e,t){o(e)[t.substr(3)]=void 0}},function(e,t,n){"use strict";var r=n(34);e.exports=function(e,t,n){var o="__INDIVIDUAL_ONE_VERSION_"+e,i=r(o+"_ENFORCE_SINGLETON",t);if(i!==t)throw new Error("Can only have one copy of "+e+".\nYou already have version "+i+" installed.\nThis means you cannot install version "+t);return r(o,n)}},function(e,t,n){"use strict";(function(t){var n="undefined"==typeof window?void 0===t?{}:t:window;e.exports=function(e,t){return e in n?n[e]:(n[e]=t,t)}}).call(this,n(11))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e(),n=Array.isArray(t)?t:[t];return[new s.default(n[0]),n[1]]}Object.defineProperty(t,"__esModule",{value:!0}),t.forwardDispatch=void 0;var i=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.start=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:window.requestAnimationFrame,n=e.init,r=e.update,u=e.view,a=o(n),c=i(a,2),s=c[0],d=c[1],h=function(e){return e},v=p(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:s,t=arguments[1],n=r(e,t,h);return void 0===n?e:n});h=function(e){return function(t){return function(n){n&&(t.$event=n,t.$fwdAction&&(t.$fwdAction.$event=n)),e.dispatch(t)}}}(v),d&&v.dispatch(d);var y=(0,f.default)(s,function(e){return u(e,h)},t),b=y.rootNode,g=y.update;return b.setAttribute(l,""),v.subscribe(function(){g(v.getState())}),b},t.render=function(e,t){var n=t.querySelector("["+l+"]");return n?t.replaceChild(e,n):t.appendChild(e),t},t.initializeComponent=function(e,t){var n=o(e.init),r=i(n,2),u=r[0],a=r[1];return t&&a&&t(u)(a)(),u};var u=r(n(36)),a=n(39),c=r(n(41)),f=r(n(42)),s=r(n(20));(function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t})(n(61)).listen();var l="data-plaitroot",p=(0,a.applyMiddleware)(c.default)(a.createStore),d=t.forwardDispatch=(0,u.default)(function(e,t,n){return function(r){return t("function"==typeof r?function(t){var o=d(e,t,n);r(o,function(){return n})}:Object.assign({},e,{$fwdAction:r}))}})},function(e,t,n){var r=n(3),o=n(37),i=r(function(e){return o(e.length,e)});e.exports=i},function(e,t,n){var r=n(14),o=n(3),i=n(9),u=n(38),a=i(function(e,t){return 1===e?o(t):r(e,u(e,[],t))});e.exports=a},function(e,t,n){var r=n(14),o=n(8);e.exports=function e(t,n,i){return function(){for(var u=[],a=0,c=t,f=0;f<n.length||a<arguments.length;){var s;f<n.length&&(!o(n[f])||a>=arguments.length)?s=n[f]:(s=arguments[a],a+=1),u[f]=s,o(s)||(c-=1),f+=1}return 0>=c?i.apply(this,u):r(c,e(t,u,i))}}},function(e,t,n){"use strict";function r(e,t,n){function o(){v===h&&(v=h.slice())}function i(){if(y)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return d}function u(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(y)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");var t=!0;return o(),v.push(e),function(){if(t){if(y)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribe(listener) for more details.");t=!1,o();var n=v.indexOf(e);v.splice(n,1)}}}function a(e){if(!function(e){if("object"!==(void 0===e?"undefined":p(e))||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(y)throw new Error("Reducers may not dispatch actions.");try{y=!0,d=f(d,e)}finally{y=!1}for(var t=h=v,n=0;n<t.length;n++)(0,t[n])();return e}var c;if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(r)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var f=e,d=t,h=[],v=h,y=!1;return a({type:l.INIT}),(c={dispatch:a,subscribe:u,getState:i,replaceReducer:function(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");f=e,a({type:l.REPLACE})}})[s.a]=function(){var e,t=u;return(e={subscribe:function(e){function n(){e.next&&e.next(i())}if("object"!==(void 0===e?"undefined":p(e))||null===e)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:t(n)}}})[s.a]=function(){return this},e},c}function o(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+n+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function i(e){for(var t,n=Object.keys(e),r={},i=0;i<n.length;i++)"function"==typeof e[t=n[i]]&&(r[t]=e[t]);var u,a=Object.keys(r);try{!function(e){Object.keys(e).forEach(function(t){var n=e[t];if(void 0===n(void 0,{type:l.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+l.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}(r)}catch(t){u=t}return function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];if(u)throw u;for(var n=!1,i={},c=0;c<a.length;c++){var f=a[c],s=r[f],l=e[f],p=s(l,t);if(void 0===p){var d=o(f,t);throw new Error(d)}i[f]=p,n=n||p!==l}return n?i:e}}function u(e,t){return function(){return t(e.apply(this,arguments))}}function a(e,t){if("function"==typeof e)return u(e,t);if("object"!==(void 0===e?"undefined":p(e))||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":void 0===e?"undefined":p(e))+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],a=e[i];"function"==typeof a&&(r[i]=u(a,t))}return r}function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce(function(e,t){return function(){return e(t.apply(void 0,arguments))}})}function f(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=e.apply(void 0,r),u=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},a={getState:i.getState,dispatch:function(){return u.apply(void 0,arguments)}},f=t.map(function(e){return e(a)});return u=c.apply(void 0,f)(i.dispatch),d({},i,{dispatch:u})}}}n.r(t),n.d(t,"createStore",function(){return r}),n.d(t,"combineReducers",function(){return i}),n.d(t,"bindActionCreators",function(){return a}),n.d(t,"applyMiddleware",function(){return f}),n.d(t,"compose",function(){return c}),n.d(t,"__DO_NOT_USE__ActionTypes",function(){return l});var s=n(13),l={INIT:"@@redux/INIT"+Math.random().toString(36).substring(7).split("").join("."),REPLACE:"@@redux/REPLACE"+Math.random().toString(36).substring(7).split("").join(".")},p="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},d=Object.assign||function(e){for(var t,n=1;n<arguments.length;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}},function(e){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}n.r(t);var o=r();o.withExtraArgument=r,t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=!1,a=null,c=t(e),f=(0,o.default)(c);return{rootNode:f,update:function(e){null==a&&0==r&&(r=!0,n(function(){if(r=!1,null!=a){var e=t(a),n=(0,i.default)(c,e);(0,u.default)(f,n),c=e,a=null}})),a=e}}};var o=r(n(43)),i=r(n(45)),u=r(n(48));e.exports=t.default},function(e,t,n){var r=n(15);e.exports=r},function(){},function(e,t,n){var r=n(46);e.exports=r},function(e,t,n){function r(e,t){var n={a:e};return o(e,t,n,0),n}function o(e,t,n,r){if(e!==t){var o=n[r],c=!1;if(b(e)||b(t))a(e,t,n,r);else if(null==t)y(e)||(u(e,n,r),o=n[r]),o=l(o,new d(d.REMOVE,e,t));else if(h(t))if(h(e))if(e.tagName===t.tagName&&e.namespace===t.namespace&&e.key===t.key){var f=w(e.properties,t.properties);f&&(o=l(o,new d(d.PROPS,e,f))),o=i(e,t,n,o,r)}else o=l(o,new d(d.VNODE,e,t)),c=!0;else o=l(o,new d(d.VNODE,e,t)),c=!0;else v(t)?v(e)?e.text!==t.text&&(o=l(o,new d(d.VTEXT,e,t))):(o=l(o,new d(d.VTEXT,e,t)),c=!0):y(t)&&(y(e)||(c=!0),o=l(o,new d(d.WIDGET,e,t)));o&&(n[r]=o),c&&u(e,n,r)}}function i(e,t,n,r,i){for(var u=e.children,a=c(u,t.children),f=a.children,s=u.length,p=f.length,v=s>p?s:p,y=0;y<v;y++){var b=u[y],g=f[y];i+=1,b?o(b,g,n,i):g&&(r=l(r,new d(d.INSERT,null,g))),h(b)&&b.count&&(i+=b.count)}return a.moves&&(r=l(r,new d(d.ORDER,e,a.moves))),r}function u(e,t,n){(function e(t,n,r){if(h(t)){if(t.hooks&&(n[r]=l(n[r],new d(d.PROPS,t,function(e){var t={};for(var n in e)t[n]=void 0;return t}(t.hooks)))),t.descendantHooks||t.hasThunks)for(var o,i=t.children,u=i.length,c=0;c<u;c++)o=i[c],r+=1,e(o,n,r),h(o)&&o.count&&(r+=o.count)}else b(t)&&a(t,null,n,r)})(e,t,n),function e(t,n,r){if(y(t))"function"==typeof t.destroy&&(n[r]=l(n[r],new d(d.REMOVE,t,null)));else if(h(t)&&(t.hasWidgets||t.hasThunks))for(var o,i=t.children,u=i.length,c=0;c<u;c++)o=i[c],r+=1,e(o,n,r),h(o)&&o.count&&(r+=o.count);else b(t)&&a(t,null,n,r)}(e,t,n)}function a(e,t,n,o){var i=g(e,t),u=r(i.a,i.b);(function(e){for(var t in e)if("a"!=t)return!0;return!1})(u)&&(n[o]=new d(d.THUNK,null,u))}function c(e,t){var n=s(t),r=n.keys,o=n.free;if(o.length===t.length)return{children:t,moves:null};var i=s(e),u=i.keys;if(i.free.length===e.length)return{children:t,moves:null};for(var a=[],c=0,l=o.length,p=0,d=0;d<e.length;d++){var h,v=e[d];v.key?r.hasOwnProperty(v.key)?(h=r[v.key],a.push(t[h])):(h=d-p++,a.push(null)):c<l?(h=o[c++],a.push(t[h])):(h=d-p++,a.push(null))}for(var y,b=c>=o.length?t.length:o[c],g=0;g<t.length;g++)(y=t[g]).key?!u.hasOwnProperty(y.key)&&a.push(y):g>=b&&a.push(y);for(var w,m,x=a.slice(),O=0,E=[],k=[],_=0;_<t.length;){for(m=t[_],w=x[O];null===w&&x.length;)E.push(f(x,O,null)),w=x[O];w&&w.key===m.key?(O++,_++):m.key?(w&&w.key?r[w.key]===_+1?k.push({key:m.key,to:_}):(E.push(f(x,O,w.key)),(w=x[O])&&w.key===m.key?O++:k.push({key:m.key,to:_})):k.push({key:m.key,to:_}),_++):w&&w.key&&E.push(f(x,O,w.key))}for(;O<x.length;)w=x[O],E.push(f(x,O,w&&w.key));return E.length!==p||k.length?{children:a,moves:{removes:E,inserts:k}}:{children:a,moves:null}}function f(e,t,n){return e.splice(t,1),{from:t,key:n}}function s(e){for(var t,n={},r=[],o=e.length,i=0;i<o;i++)(t=e[i]).key?n[t.key]=i:r.push(i);return{keys:n,free:r}}function l(e,t){return e?(p(e)?e.push(t):e=[e,t],e):t}var p=n(10),d=n(19),h=n(2),v=n(6),y=n(0),b=n(4),g=n(18),w=n(47);e.exports=r},function(e,t,n){function r(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor?e.constructor.prototype:void 0}var o=n(17),i=n(5);e.exports=function e(t,n){var u;for(var a in t){a in n||((u=u||{})[a]=void 0);var c=t[a],f=n[a];if(c!==f)if(o(c)&&o(f))if(r(f)!==r(c))(u=u||{})[a]=f;else if(i(f))(u=u||{})[a]=f;else{var s=e(c,f);s&&((u=u||{})[a]=s)}else(u=u||{})[a]=f}for(var l in n)l in t||((u=u||{})[l]=n[l]);return u}},function(e,t,n){var r=n(49);e.exports=r},function(e,t,n){function r(e,t,n){var r=function(e){var t=[];for(var n in e)"a"!=n&&t.push(+n);return t}(t);if(0===r.length)return e;var u=c(e,t.a,r),a=e.ownerDocument;n.document||a===i||(n.document=a);for(var f,s=0;s<r.length;s++)e=o(e,u[f=r[s]],t[f],n);return e}function o(e,t,n,r){if(!t)return e;var o;if(u(n))for(var i=0;i<n.length;i++)o=f(n[i],t,r),t===e&&(e=o);else o=f(n,t,r),t===e&&(e=o);return e}var i=n(12),u=n(10),a=n(15),c=n(50),f=n(51);e.exports=function e(t,n,o){return(o=o||{}).patch=o.patch&&o.patch!==e?o.patch:r,o.render=o.render||a,o.patch(t,n,o)}},function(e){function t(e,r,i,u,a){if(u=u||{},e){n(i,a,a)&&(u[a]=e);var c=r.children;if(c)for(var f=e.childNodes,s=0;s<r.children.length;s++){a+=1;var l=c[s]||o,p=a+(l.count||0);n(i,a,p)&&t(f[s],l,i,u,a),a=p}}return u}function n(e,t,n){if(0===e.length)return!1;for(var r,o,i=0,u=e.length-1;i<=u;){if(o=e[r=(u+i)/2>>0],i==u)return o>=t&&o<=n;if(o<t)i=r+1;else{if(!(o>n))return!0;u=r-1}}return!1}function r(e,t){return e>t?1:-1}var o={};e.exports=function(e,n,o,i){return o&&0!==o.length?(o.sort(r),t(e,n,o,i,0)):{}}},function(e,t,n){function r(e,t){var n=e.parentNode;return n&&n.removeChild(e),i(e,t),null}function o(e,t,n,r){var o,u=f(t,n);o=u?n.update(t,e)||e:r.render(n,r);var a=e.parentNode;return a&&o!==e&&a.replaceChild(o,e),u||i(e,t),o}function i(e,t){"function"==typeof t.destroy&&a(t)&&t.destroy(e)}var u=n(16),a=n(0),c=n(19),f=n(52);e.exports=function(e,t,n){var i=e.type,a=e.vNode,f=e.patch;return i===c.REMOVE?r(t,a):i===c.INSERT?function(e,t,n){var r=n.render(t,n);return e&&e.appendChild(r),e}(t,f,n):i===c.VTEXT?function(e,t,n,r){var o;if(3===e.nodeType)e.replaceData(0,e.length,n.text),o=e;else{var i=e.parentNode;o=r.render(n,r),i&&o!==e&&i.replaceChild(o,e)}return o}(t,0,f,n):i===c.WIDGET?o(t,a,f,n):i===c.VNODE?function(e,t,n,r){var o=e.parentNode,i=r.render(n,r);return o&&i!==e&&o.replaceChild(i,e),i}(t,0,f,n):i===c.ORDER?(function(e,t){for(var n,r,o,i=e.childNodes,u={},a=0;a<t.removes.length;a++)n=i[(r=t.removes[a]).from],r.key&&(u[r.key]=n),e.removeChild(n);for(var c=i.length,f=0;f<t.inserts.length;f++)n=u[(o=t.inserts[f]).key],e.insertBefore(n,o.to>=c++?null:i[o.to])}(t,f),t):i===c.PROPS?(u(t,f,a.properties),t):i===c.THUNK?function(e,t){return e&&t&&e!==t&&e.parentNode&&e.parentNode.replaceChild(t,e),t}(t,n.patch(t,f,n)):t}},function(e,t,n){var r=n(0);e.exports=function(e,t){return r(e)&&r(t)&&("name"in e&&"name"in t?e.id===t.id:e.init===t.init)}},function(e,t,n){var r=n(21),o=n(54),i=n(55),u=n(56),a=n(57),c=n(58),f=r(function e(t,n,r){if(0===t.length)return n;var f=t[0];if(1<t.length){var s=!c(r)&&o(f,r)?r[f]:u(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,s)}if(u(f)&&i(r)){var l=[].concat(r);return l[f]=n,l}return a(f,n,r)});e.exports=f},function(e){e.exports=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)}},function(e){e.exports=Array.isArray||function(e){return null!=e&&0<=e.length&&"[object Array]"===Object.prototype.toString.call(e)}},function(e){e.exports=Number.isInteger||function(e){return e<<0===e}},function(e,t,n){var r=n(21)(function(e,t,n){var r={};for(var o in n)r[o]=n[o];return r[e]=t,r});e.exports=r},function(e,t,n){var r=n(3)(function(e){return null==e});e.exports=r},function(e,t,n){var r=n(9)(function(e,t){for(var n=t,r=0;r<e.length;){if(null==n)return;n=n[e[r]],r+=1}return n});e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=Array.isArray(t)?[]:{};for(var o in t){var i=t[o];n[o]=(0,r.default)(Object,i)?i.hasOwnProperty("@@Plait/State")?i.clone():e(i):i}return n};var r=function(e){return e&&e.__esModule?e:{default:e}}(n(22));e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.listen=function(){var e=new o.default;i.default.forEach(function(t){return e.listenTo(t)})};var o=r(n(62)),i=r(n(69))},function(e,t,n){function r(e){return this instanceof r?(e=e||a,this.target=e.documentElement,this.events={},this.rawEventListeners={},void(this.globalListeners={})):new r(e)}function o(e,t,n){var r=i(e,n);if(r&&0<r.handlers.length){var a=new p(t);if(a.currentTarget=r.currentTarget,u(r.handlers,a),a._bubbles)o(r.currentTarget.parentNode,t,n)}}function i(e,t){if(null===e||void 0===e)return null;var n=c(e),r=n[t],o=n.event;return r||o?new function(e,t){this.currentTarget=e,this.handlers=t}(e,[].concat(r||[],o||[])):i(e.parentNode,t)}function u(e,t){e.forEach(function(n){if("function"==typeof n)n(t);else if("function"==typeof n.handleEvent)n.handleEvent(t);else{if("dom-delegator-handle"!==n.type)throw new Error("dom-delegator: unknown handler found: "+JSON.stringify(e));d(n).func(t)}})}var a=n(12),c=n(7),f=n(63),s=n(65),l=n(66),p=n(67),d=f();e.exports=r,r.prototype.addEventListener=s,r.prototype.removeEventListener=l,r.allocateHandle=function(e){var t=new function(){this.type="dom-delegator-handle"};return d(t).func=e,t},r.transformHandle=function(e,t){var n=d(e).func;return this.allocateHandle(function(e){t(e,n)})},r.prototype.addGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[];-1===n.indexOf(t)&&n.push(t),this.globalListeners[e]=n},r.prototype.removeGlobalEventListener=function(e,t){var n=this.globalListeners[e]||[],r=n.indexOf(t);-1!==r&&n.splice(r,1)},r.prototype.listenTo=function(e){if(e in this.events||(this.events[e]=0),this.events[e]++,1===this.events[e]){var t=this.rawEventListeners[e];t||(t=this.rawEventListeners[e]=function(e,t){var n=t.globalListeners,r=t.target;return function(t){var i=n[e]||[];if(0<i.length){var a=new p(t);a.currentTarget=r,u(i,a)}o(t.target,t,e)}}(e,this)),this.target.addEventListener(e,t,!0)}},r.prototype.unlistenTo=function(e){if(e in this.events||(this.events[e]=0),0===this.events[e])throw new Error("already unlistened to event.");if(this.events[e]--,0===this.events[e]){var t=this.rawEventListeners[e];if(!t)throw new Error("dom-delegator#unlistenTo: cannot unlisten to "+e);this.target.removeEventListener(e,t,!0)}}},function(e,t,n){var r=n(64);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw new Error("Weakmap-shim: Key must be object");var n=t.valueOf(e);return n&&n.identity===e?n:r(t,e)}}},function(e){e.exports=function(e,t){var n={identity:t},r=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e===t?n:r.apply(this,arguments)},writable:!0}),n}},function(e,t,n){var r=n(7);e.exports=function(e,t,n){var o=r(e),i=o[t];i?Array.isArray(i)?-1===i.indexOf(n)&&i.push(n):i!==n&&(o[t]=[i,n]):o[t]=n}},function(e,t,n){var r=n(7);e.exports=function(e,t,n){var o=r(e),i=o[t];if(i)if(Array.isArray(i)){var u=i.indexOf(n);-1!==u&&i.splice(u,1)}else i===n&&(o[t]=null)}},function(e,t,n){function r(e){if(!(this instanceof r))return new r(e);if(s.test(e.type))return new i(e);if(l.test(e.type))return new o(e);for(var t,n=0;n<a.length;n++)this[t=a[n]]=e[t];this._rawEvent=e,this._bubbles=!1}function o(e){for(var t,n=0;n<a.length;n++)this[t=a[n]]=e[t];for(var r,o=0;o<f.length;o++)this[r=f[o]]=e[r];this._rawEvent=e}function i(e){for(var t,n=0;n<a.length;n++)this[t=a[n]]=e[t];for(var r,o=0;o<c.length;o++)this[r=c[o]]=e[r];this._rawEvent=e}var u=n(68),a=["altKey","bubbles","cancelable","ctrlKey","eventPhase","metaKey","relatedTarget","shiftKey","target","timeStamp","type","view","which"],c=["char","charCode","key","keyCode"],f=["button","buttons","clientX","clientY","layerX","layerY","offsetX","offsetY","pageX","pageY","screenX","screenY","toElement"],s=/^key|input/,l=/^(?:mouse|pointer|contextmenu)|click/;e.exports=r,r.prototype.preventDefault=function(){this._rawEvent.preventDefault()},r.prototype.startPropagation=function(){this._bubbles=!0},u(o,r),u(i,r)},function(e){e.exports="function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["blur","change","click","contextmenu","dblclick","error","focus","focusin","focusout","input","keydown","keypress","keyup","load","mousedown","mouseup","resize","select","submit","touchcancel","touchend","touchstart","unload"],e.exports=t.default}]);