-var hyperAppJSBytes = []byte(`!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.hyperapp={})}(this,function(e){"use strict";function n(e,n){var t,i=[];for(r=arguments.length;r-- >2;)o.push(arguments[r]);for(;o.length;)if(Array.isArray(t=o.pop()))for(r=t.length;r--;)o.push(t[r]);else null!=t&&!0!==t&&!1!==t&&i.push("number"==typeof t?t+="":t);return"string"==typeof e?{type:e,props:n||{},children:i}:e(n||{},i)}function t(e,t){function r(){e.view&&!m&&requestAnimationFrame(o,m=!m)}function o(){i(b=v(t,b,k,k=e.view(g,w),m=!m))}function i(e){for(;e=A.pop();)e()}function u(e,t){return e&&n(e.tagName.toLowerCase(),{},t.call(e.childNodes,function(e){return 3===e.nodeType?e.nodeValue:u(e,t)}))}function p(e,n,t){e.init&&A.push(function(){e.init(n,t)}),c(n,e.state),f(n,t,e.actions);for(var r in e.modules)p(e.modules[r],n[r]={},t[r]={})}function f(e,n,t){function o(n){return"function"==typeof n?o(n(e)):n&&r(c(e,n)),e}Object.keys(t||{}).map(function(r){"function"==typeof t[r]?n[r]=function(i){return"function"==typeof(i=t[r](e,n,i))?i(o):o(i)}:f(e[r]||(e[r]={}),n[r]={},t[r])})}function c(e,n){for(var t in n)e[t]=n[t];return e}function l(e,n){return c(c({},e),n)}function s(e,n){if("string"==typeof e)var t=document.createTextNode(e);else{var t=(n=n||"svg"===e.type)?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type);e.props&&e.props.oncreate&&A.push(function(){e.props.oncreate(t)});for(var r=0;r<e.children.length;r++)t.appendChild(s(e.children[r],n));for(var r in e.props)a(t,r,e.props[r])}return t}function a(e,n,t,r){if("key"===n);else if("style"===n)for(var n in l(r,t=t||{}))e.style[n]=t[n]||"";else{try{e[n]=t}catch(e){}"function"!=typeof t&&(t?e.setAttribute(n,t):e.removeAttribute(n))}}function d(e,n,t){for(var r in l(n,t)){var o=t[r],i="value"===r||"checked"===r?e[r]:n[r];o!==i&&o!==i&&a(e,r,o,i)}t&&t.onupdate&&A.push(function(){t.onupdate(e,n)})}function y(e,n,t){function r(){e.removeChild(n)}t&&t.onremove&&"function"==typeof(t=t.onremove(n))?t(r):r()}function h(e){if(e&&e.props)return e.props.key}function v(e,n,t,r,o,i){if(null==t)n=e.insertBefore(s(r,o),n);else if(null!=r.type&&r.type===t.type){d(n,t.props,r.props),o=o||"svg"===r.type;for(var u=r.children.length,p=t.children.length,f={},c=[],l={},a=0;a<p;a++){var m=c[a]=n.childNodes[a],g=t.children[a],w=h(g);null!=w&&(f[w]=[m,g])}for(var a=0,b=0;b<u;){var m=c[a],g=t.children[a],k=r.children[b],w=h(g);if(l[w])a++;else{var A=h(k),N=f[A]||[];null==A?(null==w&&(v(n,m,g,k,o),b++),a++):(w===A?(v(n,N[0],N[1],k,o),a++):N[0]?(n.insertBefore(N[0],m),v(n,N[0],N[1],k,o)):v(n,m,null,k,o),b++,l[A]=k)}}for(;a<p;){var g=t.children[a],w=h(g);null==w&&y(n,c[a],g.props),a++}for(var a in f){var N=f[a],x=N[1];l[x.props.key]||y(n,N[0],x.props)}}else n&&r!==n.nodeValue&&("string"==typeof r&&"string"==typeof t?n.nodeValue=r:(n=e.insertBefore(s(r,o),i=n),y(e,i,t.props)));return n}var m,g,w,b=(t=t||document.body).children[0],k=u(b,[].map),A=[];return r(i(p(e,g={},w={}))),w}var r,o=[];e.h=n,e.app=t});`)
0 commit comments