Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

evolui

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

evolui - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

233

example/src/index.js

@@ -1,50 +0,199 @@

import html, { render } from 'evolui'
import { createState } from './utils'
import Select from './components/Select'
import { Observable, Subject } from 'rxjs'
import html, { render, ease } from 'evolui'
import Ticker from './components/Ticker'
import TodoList from './components/TodoList'
import MouseTracker from './components/MouseTracker'
import HttpRequest from './components/HttpRequest'
import Chat from './components/Chat'
import SimpleAnimation from './components/animations/SimpleAnimation'
import ComplexeAnimation from './components/animations/ComplexeAnimation'
import PinterestLikeGrid from './components/animations/PinterestLikeGrid'
const addPosition = e => {
e.position = e.type.match(/^touch/)
? { x: e.touches[0].clientX, y: e.touches[0].clientY }
: { x: e.clientX, y: e.clientY }
const selectedExample = createState('TodoList')
const examples = [
{ title: 'TodoList', value: 'TodoList' },
{ title: 'SimpleAnimation', value: 'SimpleAnimation' },
{ title: 'ComplexeAnimation', value: 'ComplexeAnimation' },
{ title: 'PinterestLikeGrid', value: 'PinterestLikeGrid' },
{ title: 'Chat', value: 'Chat' },
{ title: 'MouseTracker', value: 'MouseTracker' },
{ title: 'HttpRequest', value: 'HttpRequest' },
{ title: 'Ticker', value: 'Ticker' }
]
return e
}
const components = {
TodoList,
SimpleAnimation,
ComplexeAnimation,
PinterestLikeGrid,
Chat,
MouseTracker,
HttpRequest,
Ticker
const mouse$ = Observable.merge(
Observable.fromEvent(window, 'mousemove').map(addPosition),
Observable.fromEvent(window, 'touchmove').map(addPosition)
)
const end$ = Observable.merge(
Observable.fromEvent(window, 'mouseup'),
Observable.fromEvent(window, 'touchend')
)
const createHandler = names =>
names.reduce(
(acc, name) =>
Object.assign({}, acc, {
[name]: (() => {
const sub = new Subject()
const f = x => sub.next(x)
f.$ = sub
return f
})()
}),
{}
)
const createDragHandler = () => {
const { start } = createHandler(['start'])
const start$ = start.$.map(addPosition)
const drag$ = start$
.switchMap(({ target, position: initPosition }) => {
const { left, top } = target.getBoundingClientRect()
return mouse$
.map(({ position }) => ({
left: initPosition.x - left,
top: initPosition.y - top,
x: position.x - (initPosition.x - left),
y: position.y - (initPosition.y - top)
}))
.takeUntil(end$)
})
.share()
const isDragging$ = start$
.map(() => true)
.merge(end$.map(() => false))
.startWith(false)
return {
start,
drag$,
dragStart$: start.$,
dragEnd$: drag$.switchMap(() => end$),
isDragging$
}
}
render(
html`
const Circle = ({
onDragStart,
position$,
isDragging$,
color = 'purple',
radius = 25,
stiffness = 120,
damping = 20
} = {}) => {
return html`
<div
ontouchstart="${onDragStart}"
onmousedown="${onDragStart}"
style="
position: absolute;
left: 0;
right: 0;
width: ${radius * 2}px;
height: ${radius * 2}px;
background: ${color};
border-radius: 100%;
transform: translate(
${position$.map(p => p.x).switchMap(ease(stiffness, damping))}px,
${position$.map(p => p.y).switchMap(ease(stiffness, damping))}px
);
cursor: ${isDragging$.map(
isDraging => (isDraging ? '-webkit-grabbing' : '-webkit-grab')
)};
user-select: none;
">
</div>
`
}
const rand = (start, end) => start + Math.random() * (end - start)
const GrabbableCircle = ({
exploadEvery,
onDragStart,
drag$,
isDragging$,
radius = 25,
r,
g,
b
}) => {
const randomPosition = () => ({
x: rand(0.15, 0.85) * window.innerWidth,
y: rand(0.1, 0.85) * window.innerHeight
})
const center = () => ({
x: 0.5 * window.innerWidth,
y: 0.5 * window.innerHeight
})
const position$ = drag$
.map(drag => ({
x: drag.x + drag.left,
y: drag.y + drag.top
}))
.merge(
isDragging$.switchMap(
bool =>
bool
? Observable.empty()
: Observable.interval(900)
.map(x => x)
.map(x => (x % exploadEvery ? randomPosition() : center()))
.startWith(randomPosition())
)
)
.startWith(center())
return html`
${Array(7)
.fill(0)
.map((_, i, xs) =>
Circle({
onDragStart,
position$: position$.map(({ x, y }) => ({
x: x - (radius + i),
y: y - (radius + i)
})),
isDragging$,
stiffness: 120 + 15 * i,
damping: 25 - i * 2,
radius: radius + i,
color: `rgba(${r}, ${g}, ${b}, ${i / xs.length})`
})
)}
`
}
const ComplexeAnimation = () => {
const { start, drag$, isDragging$ } = createDragHandler()
return html`
<div>
${Select({
value$: selectedExample.stream,
onChange: selectedExample.set,
options: examples
${GrabbableCircle({
radius: 50,
r: 57,
g: 77,
b: 255,
onDragStart: start,
drag$,
isDragging$,
exploadEvery: 2
})}
${GrabbableCircle({
radius: 30,
r: 249,
g: 0,
b: 114,
onDragStart: start,
drag$,
isDragging$,
exploadEvery: 3
})}
${GrabbableCircle({
radius: 15,
r: 5,
g: 241,
b: 163,
onDragStart: start,
drag$,
isDragging$,
exploadEvery: 6
})}
</div>
`
}
${selectedExample.stream.map(name => components[name]())}
</div>
`,
document.querySelector('#root')
)
render(ComplexeAnimation(), document.body)

2

lib/evolui.min.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var hyperscriptAttributeToProperty=attributeToProperty,transform={class:"className",for:"htmlFor","http-equiv":"httpEquiv"};function attributeToProperty(r){return function(e,t,n){for(var o in t)o in transform&&(t[transform[o]]=t[o],delete t[o]);return r(e,t,n)}}var VAR=0,TEXT=1,OPEN=2,CLOSE=3,ATTR=4,ATTR_KEY=5,ATTR_KEY_W=6,ATTR_VALUE_W=7,ATTR_VALUE=8,ATTR_VALUE_SQ=9,ATTR_VALUE_DQ=10,ATTR_EQ=11,ATTR_BREAK=12,COMMENT=13,hyperx=function(r,e){e||(e={});var t=e.concat||function(r,e){return String(r)+String(e)};return!1!==e.attrToProp&&(r=hyperscriptAttributeToProperty(r)),function(o){for(var i=TEXT,s="",c=arguments.length,u=[],a=0;a<o.length;a++)if(a<c-1){var l=arguments[a+1],f=E(o[a]),p=i;p===ATTR_VALUE_DQ&&(p=ATTR_VALUE),p===ATTR_VALUE_SQ&&(p=ATTR_VALUE),p===ATTR_VALUE_W&&(p=ATTR_VALUE),p===ATTR&&(p=ATTR_KEY),f.push([VAR,p,l]),u.push.apply(u,f)}else u.push.apply(u,E(o[a]));var b=[null,{},[]],h=[[b,-1]];for(a=0;a<u.length;a++){var y=h[h.length-1][0],_=(f=u[a])[0];if(_===OPEN&&/^\//.test(f[1])){var T=h[h.length-1][1];h.length>1&&(h.pop(),h[h.length-1][0][2][T]=r(y[0],y[1],y[2].length?y[2]:void 0))}else if(_===OPEN){var v=[f[1],{},[]];y[2].push(v),h.push([v,y[2].length-1])}else if(_===ATTR_KEY||_===VAR&&f[1]===ATTR_KEY){for(var d,m="";a<u.length;a++)if(u[a][0]===ATTR_KEY)m=t(m,u[a][1]);else{if(u[a][0]!==VAR||u[a][1]!==ATTR_KEY)break;if("object"!=typeof u[a][2]||m)m=t(m,u[a][2]);else for(d in u[a][2])u[a][2].hasOwnProperty(d)&&!y[1][d]&&(y[1][d]=u[a][2][d])}u[a][0]===ATTR_EQ&&a++;for(var A=a;a<u.length;a++)if(u[a][0]===ATTR_VALUE||u[a][0]===ATTR_KEY)y[1][m]?""===u[a][1]||(y[1][m]=t(y[1][m],u[a][1])):y[1][m]=n(u[a][1]);else{if(u[a][0]!==VAR||u[a][1]!==ATTR_VALUE&&u[a][1]!==ATTR_KEY){!m.length||y[1][m]||a!==A||u[a][0]!==CLOSE&&u[a][0]!==ATTR_BREAK||(y[1][m]=m.toLowerCase()),u[a][0]===CLOSE&&a--;break}y[1][m]?""===u[a][2]||(y[1][m]=t(y[1][m],u[a][2])):y[1][m]=n(u[a][2])}}else if(_===ATTR_KEY)y[1][f[1]]=!0;else if(_===VAR&&f[1]===ATTR_KEY)y[1][f[2]]=!0;else if(_===CLOSE){if(selfClosing(y[0])&&h.length){T=h[h.length-1][1];h.pop(),h[h.length-1][0][2][T]=r(y[0],y[1],y[2].length?y[2]:void 0)}}else if(_===VAR&&f[1]===TEXT)void 0===f[2]||null===f[2]?f[2]="":f[2]||(f[2]=t("",f[2])),Array.isArray(f[2][0])?y[2].push.apply(y[2],f[2]):y[2].push(f[2]);else if(_===TEXT)y[2].push(f[1]);else if(_!==ATTR_EQ&&_!==ATTR_BREAK)throw new Error("unhandled: "+_)}if(b[2].length>1&&/^\s*$/.test(b[2][0])&&b[2].shift(),b[2].length>2||2===b[2].length&&/\S/.test(b[2][1]))throw new Error("multiple root elements must be wrapped in an enclosing tag");return Array.isArray(b[2][0])&&"string"==typeof b[2][0][0]&&Array.isArray(b[2][0][2])&&(b[2][0]=r(b[2][0][0],b[2][0][1],b[2][0][2])),b[2][0];function E(r){var t=[];i===ATTR_VALUE_W&&(i=ATTR);for(var n=0;n<r.length;n++){var o=r.charAt(n);i===TEXT&&"<"===o?(s.length&&t.push([TEXT,s]),s="",i=OPEN):">"!==o||quot(i)||i===COMMENT?i===COMMENT&&/-$/.test(s)&&"-"===o?(e.comments&&t.push([ATTR_VALUE,s.substr(0,s.length-1)],[CLOSE]),s="",i=TEXT):i===OPEN&&/^!--$/.test(s)?(e.comments&&t.push([OPEN,s],[ATTR_KEY,"comment"],[ATTR_EQ]),s=o,i=COMMENT):i===TEXT||i===COMMENT?s+=o:i===OPEN&&"/"===o&&s.length||(i===OPEN&&/\s/.test(o)?(t.push([OPEN,s]),s="",i=ATTR):i===OPEN?s+=o:i===ATTR&&/[^\s"'=/]/.test(o)?(i=ATTR_KEY,s=o):i===ATTR&&/\s/.test(o)?(s.length&&t.push([ATTR_KEY,s]),t.push([ATTR_BREAK])):i===ATTR_KEY&&/\s/.test(o)?(t.push([ATTR_KEY,s]),s="",i=ATTR_KEY_W):i===ATTR_KEY&&"="===o?(t.push([ATTR_KEY,s],[ATTR_EQ]),s="",i=ATTR_VALUE_W):i===ATTR_KEY?s+=o:i!==ATTR_KEY_W&&i!==ATTR||"="!==o?i!==ATTR_KEY_W&&i!==ATTR||/\s/.test(o)?i===ATTR_VALUE_W&&'"'===o?i=ATTR_VALUE_DQ:i===ATTR_VALUE_W&&"'"===o?i=ATTR_VALUE_SQ:i===ATTR_VALUE_DQ&&'"'===o?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i===ATTR_VALUE_SQ&&"'"===o?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i!==ATTR_VALUE_W||/\s/.test(o)?i===ATTR_VALUE&&/\s/.test(o)?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i!==ATTR_VALUE&&i!==ATTR_VALUE_SQ&&i!==ATTR_VALUE_DQ||(s+=o):(i=ATTR_VALUE,n--):(t.push([ATTR_BREAK]),/[\w-]/.test(o)?(s+=o,i=ATTR_KEY):i=ATTR):(t.push([ATTR_EQ]),i=ATTR_VALUE_W)):(i===OPEN?t.push([OPEN,s]):i===ATTR_KEY?t.push([ATTR_KEY,s]):i===ATTR_VALUE&&s.length&&t.push([ATTR_VALUE,s]),t.push([CLOSE]),s="",i=TEXT)}return i===TEXT&&s.length?(t.push([TEXT,s]),s=""):i===ATTR_VALUE&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_VALUE_DQ&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_VALUE_SQ&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_KEY&&(t.push([ATTR_KEY,s]),s=""),t}};function n(r){return"function"==typeof r?r:"string"==typeof r?r:r&&"object"==typeof r?r:t("",r)}};function quot(r){return r===ATTR_VALUE_SQ||r===ATTR_VALUE_DQ}var closeRE=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$");function selfClosing(r){return closeRE.test(r)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},classCallCheck=function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")},_extends=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},slicedToArray=function(){return function(r,e){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return function(r,e){var t=[],n=!0,o=!1,i=void 0;try{for(var s,c=r[Symbol.iterator]();!(n=(s=c.next()).done)&&(t.push(s.value),!e||t.length!==e);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}return t}(r,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toArray=function(r){return Array.isArray(r)?r:Array.from(r)},toConsumableArray=function(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}return Array.from(r)},Nothing="Nothing",compose=function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(r){return e.reduceRight(function(r,e){return e(r)},r)}},pipe=function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.reduce(function(r,e){return function(t){return e(r(t))}},function(r){return r})},curry=function r(e){return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.length>=e.length?e.apply(void 0,n):function(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];return r(e).apply(void 0,n.concat(o))}}},init=function(r){return r.slice(0,r.length-1)},last=function(r){return r[r.length-1]},flatMap=curry(function(r,e){return e.reduce(function(e,t){return e.concat(r(t))},[])}),isEmpty=function(r){return 0!==r&&(!r||"string"==typeof r&&!r.trim())},isPromise=function(r){return r&&"function"==typeof r.then},isObservable=function(r){return r&&"function"==typeof r.subscribe},createOperators=function(r){var e=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r(function(r){var e=!0,n=!1,o=void 0;try{for(var i,s=t[Symbol.iterator]();!(e=(i=s.next()).done);e=!0){var c=i.value;r.next(c)}}catch(r){n=!0,o=r}finally{try{!e&&s.return&&s.return()}finally{if(n)throw o}}return r.complete(),{unsubscribe:function(){}}})},t=curry(function(e,t){return new r(function(r){return r.next(e),t.subscribe(r)})}),n=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=init(t),i=last(t);return new r(function(r){var e=o.map(function(){return Nothing}),t=o.map(function(){return!0}),n=o.map(function(n,o){return n.subscribe({error:function(e){console.error(e),t[o]=!1,t.every(function(r){return!1===r})&&r.complete()},complete:function(){t[o]=!1,t.every(function(r){return!1===r})&&r.complete()},next:function(t){if(e[o]=t,e.every(function(r){return r!==Nothing})){var n=void 0;try{n=i.apply(void 0,toConsumableArray(e))}catch(r){console.error(r)}r.next(n)}}})});return{unsubscribe:function(){n.forEach(function(r){return r.unsubscribe()})}}})},o=curry(function(e,t){return new r(function(r){return t.subscribe({error:function(e){return r.error(e)},next:function(t){return r.next(e(t))},complete:function(){return r.complete()}})})}),i=curry(function(e,t){var n=void 0;return new r(function(r){return t.subscribe({next:function(t){n&&n.unsubscribe(),n=e(t).subscribe({error:function(e){return r.error(e)},next:function(e){return r.next(e)},complete:function(){}})},error:function(e){return r.error(e)},complete:function(){}})})}),s=curry(function(e,t){var n=Symbol("None");return new r(function(r){var o=n,i=t.subscribe({next:function(r){o=r},complete:function(){},error:function(e){return r.error(e)}}),s=e.subscribe({next:function(){o!==n&&(r.next(o),o=n)},complete:function(){return r.complete()},error:function(e){return r.error(e)}});return{unsubscribe:function(){i.unsubscribe(),s.unsubscribe()}}})});return{point:e,sample:s,map:o,switchMap:i,all:function(r){return r.length?n.apply(void 0,toConsumableArray(r).concat([function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return e}])):e([])},combineLatest:n,startWith:t,scan:function(e,t,n){var o=t;return new r(function(r){return n.subscribe({error:function(e){return r.error(e)},next:function(t){return r.next(function(r){return o=e(o,r)}(t))},complete:function(){return r.complete()}})})},throttle:function(e){return function(t){return new r(function(r){return t.subscribe({complete:e(function(){return r.complete()}),error:function(e){return r.error(e)},next:e(function(e){return r.next(e)})})})}},toObservable:function(r){return isObservable(r)?r:e(r)},fromPromise:function(e){return new r(function(r){e.then(function(e){return r.next(e)}).catch(function(){return r.complete()})})},share:function(e){var t=[],n=void 0;return new r(function(r){return t.push(r),1===t.length&&(n=e.subscribe({complete:function(){return t.forEach(function(r){return r.complete()})},error:function(r){return t.forEach(function(e){return e.error(r)})},next:function(r){return t.forEach(function(e){return e.next(r)})}})),{unsubscribe:function(){t=t.filter(function(e){return e!==r}),0===r.length&&n.unsubscribe()}}})}}},createRaf=function(r){return new r(function(r){var e=!0;return window.requestAnimationFrame(function t(){e&&(r.next(),window.requestAnimationFrame(t))}),{unsubscribe:function(){e=!1}}})};function _objectEntries(r){for(var e=[],t=Object.keys(r),n=0;n<t.length;++n)e.push([t[n],r[t[n]]]);return e}var VNode=function r(e){var t=e.name,n=e.attrs,o=e.lifecycle,i=e.events,s=e.children;classCallCheck(this,r),this.name=t,this.attrs=n,this.lifecycle=o,this.events=i,this.children=s},VText=function r(e){var t=e.text;classCallCheck(this,r),this.text=t},isLifecycle=function(r){return["mount","update","unmount"].includes(r)},isEvent=function(r){return!!r.match(/^on/)},toEventName=function(r){return r.replace(/^on/,"").toLowerCase()},styleToObject=function(r){return r.split(";").reduce(function(r,e){var t=e.split(/:/),n=toArray(t),o=n[0],i=n.slice(1);return o.trim()&&(r[o.trim()]=i.join(":")),r},{})},formatChildren=flatMap(function(r){return Array.isArray(r)?r:r instanceof VNode||r instanceof VText?[r]:isEmpty(r)?[]:[new VText({text:""+r})]});function h(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=_objectEntries(e).reduce(function(r,e){var t=slicedToArray(e,2),n=t[0],o=t[1];return isLifecycle(n)&&"function"==typeof o?r.lifecycle[n]=o:isEvent(n)&&"function"==typeof o?r.events[toEventName(n)]=o:r.attrs[n]="style"===n?"object"===(void 0===o?"undefined":_typeof(o))?o:styleToObject(o):o,r},{lifecycle:{},events:{},attrs:{}}),o=n.lifecycle,i=n.events,s=n.attrs;return new VNode({name:r,attrs:s,lifecycle:o,events:i,children:formatChildren(t)})}function _objectEntries$2(r){for(var e=[],t=Object.keys(r),n=0;n<t.length;++n)e.push([t[n],r[t[n]]]);return e}var vTreeKey=Symbol("vTree");function updateEvents(r,e,t){var n=!0,o=!1,i=void 0;try{for(var s,c=_objectEntries$2(t)[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var u=s.value,a=slicedToArray(u,2),l=a[0],f=a[1];e[l]?f!==e[l]&&(r.removeEventListener(l,e[l]),r.addEventListener(l,f)):r.addEventListener(l,f)}}catch(r){o=!0,i=r}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}var p=_objectEntries$2(e).filter(function(r){var e=slicedToArray(r,1)[0];return!t[e]}),b=!0,h=!1,y=void 0;try{for(var _,T=p[Symbol.iterator]();!(b=(_=T.next()).done);b=!0){var v=_.value,d=slicedToArray(v,2),m=d[0],A=d[1];r.removeEventListener(m,A)}}catch(r){h=!0,y=r}finally{try{!b&&T.return&&T.return()}finally{if(h)throw y}}}function updateStyle(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var n in _extends({},e,t)){var o=t&&t[n]?t[n]:"";t[n]===e[n]||("-"===n[0]?r.style.setProperty(n,o):r.style[n]=o)}}function updateAttrs(r,e,t){for(var n in _extends({},e,t)){var o=t[n];o===e[n]||(isEmpty(o)?"value"===n&&"INPUT"===r.tagName?r.value="":r.removeAttribute(n):"style"===n?updateStyle(r,e.style,t.style):"value"===n&&"INPUT"===r.tagName?r.value=o:r.setAttribute(n,o))}}function updateChildren(r,e){var t=!0,n=!1,o=void 0;try{for(var i,s=_objectEntries$2(e)[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){var c=i.value,u=slicedToArray(c,2),a=u[0],l=u[1],f=r.childNodes[a];f?l instanceof VNode&&l.lifecycle.render?l.lifecycle.render(f,l):updateElement(f,l):r.appendChild(createElement(l))}}catch(r){n=!0,o=r}finally{try{!t&&s.return&&s.return()}finally{if(n)throw o}}var p=_objectEntries$2(r.childNodes).filter(function(r){var t=slicedToArray(r,1)[0];return!e[t]}),b=!0,h=!1,y=void 0;try{for(var _,T=p[Symbol.iterator]();!(b=(_=T.next()).done);b=!0){var v=_.value;removeElement(slicedToArray(v,2)[1])}}catch(r){h=!0,y=r}finally{try{!b&&T.return&&T.return()}finally{if(h)throw y}}}function createElement(r){if(r instanceof VText){var e=document.createTextNode(r.text);return e[vTreeKey]=r,e}var t=document.createElement(r.name);return updateEvents(t,{},r.events),updateAttrs(t,{},r.attrs),updateChildren(t,r.children),r.lifecycle.mount&&r.lifecycle.mount(t),t[vTreeKey]=r,t}function updateElement(r,e){var t=r[vTreeKey];return e instanceof VText?(t.text!==e.text&&(r.textContent=e.text),r[vTreeKey]=e):t.name!==e.name?(t.lifecycle.unmount&&t.lifecycle.unmount(r),r.parentNode.replaceChild(createElement(e),r)):(updateEvents(r,t.events,e.events),updateAttrs(r,t.attrs,e.attrs),updateChildren(r,e.children),e.lifecycle.update&&e.lifecycle.update(r),r[vTreeKey]=e),r}function removeElement(r){r[vTreeKey]instanceof VNode&&r[vTreeKey].lifecycle.unmount&&r[vTreeKey].lifecycle.unmount(r),r.remove()}function patch(r,e){return r[vTreeKey]||(r[vTreeKey]=new VNode({name:r.tagName.toLowerCase(),lifecycle:{},events:{},attrs:{},children:[]})),updateElement(r,e)}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(r,e){return r(e={exports:{}},e.exports),e.exports}var __window="undefined"!=typeof window&&window,__self="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,__global=void 0!==commonjsGlobal&&commonjsGlobal,_root=__window||__global||__self,root_1=_root;!function(){if(!_root)throw new Error("RxJS could not find any global context (window, self, global)")}();var root={root:root_1};function isFunction(r){return"function"==typeof r}var isFunction_2=isFunction,isFunction_1={isFunction:isFunction_2},isArray_1=Array.isArray||function(r){return r&&"number"==typeof r.length},isArray={isArray:isArray_1};function isObject(r){return null!=r&&"object"==typeof r}var tryCatchTarget,isObject_2=isObject,isObject_1={isObject:isObject_2},errorObject_1={e:{}},errorObject={errorObject:errorObject_1};function tryCatcher(){try{return tryCatchTarget.apply(this,arguments)}catch(r){return errorObject.errorObject.e=r,errorObject.errorObject}}function tryCatch(r){return tryCatchTarget=r,tryCatcher}var tryCatch_2=tryCatch,tryCatch_1={tryCatch:tryCatch_2},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function n(){this.constructor=r}r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},UnsubscriptionError=function(r){function e(e){r.call(this),this.errors=e;var t=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(r,e){return e+1+") "+r.toString()}).join("\n "):"");this.name=t.name="UnsubscriptionError",this.stack=t.stack,this.message=t.message}return __extends$1(e,r),e}(Error),UnsubscriptionError_2=UnsubscriptionError,UnsubscriptionError_1={UnsubscriptionError:UnsubscriptionError_2},Subscription=function(){function r(r){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}var e;return r.prototype.unsubscribe=function(){var r,e=!1;if(!this.closed){var t=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,c=n?n.length:0;t;)t.remove(this),t=++s<c&&n[s]||null;if(isFunction_1.isFunction(o))tryCatch_1.tryCatch(o).call(this)===errorObject.errorObject&&(e=!0,r=r||(errorObject.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError?flattenUnsubscriptionErrors(errorObject.errorObject.e.errors):[errorObject.errorObject.e]));if(isArray.isArray(i))for(s=-1,c=i.length;++s<c;){var u=i[s];if(isObject_1.isObject(u))if(tryCatch_1.tryCatch(u.unsubscribe).call(u)===errorObject.errorObject){e=!0,r=r||[];var a=errorObject.errorObject.e;a instanceof UnsubscriptionError_1.UnsubscriptionError?r=r.concat(flattenUnsubscriptionErrors(a.errors)):r.push(a)}}if(e)throw new UnsubscriptionError_1.UnsubscriptionError(r)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if("function"!=typeof t._addParent){var n=t;(t=new r)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(t),t._addParent(this),t},r.prototype.remove=function(r){var e=this._subscriptions;if(e){var t=e.indexOf(r);-1!==t&&e.splice(t,1)}},r.prototype._addParent=function(r){var e=this._parent,t=this._parents;e&&e!==r?t?-1===t.indexOf(r)&&t.push(r):this._parents=[r]:this._parent=r},r.EMPTY=((e=new r).closed=!0,e),r}(),Subscription_2=Subscription;function flattenUnsubscriptionErrors(r){return r.reduce(function(r,e){return r.concat(e instanceof UnsubscriptionError_1.UnsubscriptionError?e.errors:e)},[])}var Subscription_1={Subscription:Subscription_2},empty={closed:!0,next:function(r){},error:function(r){throw r},complete:function(){}},Observer={empty:empty},rxSubscriber=createCommonjsModule(function(r,e){var t=root.root.Symbol;e.rxSubscriber="function"==typeof t&&"function"==typeof t.for?t.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber}),rxSubscriber_1=rxSubscriber.rxSubscriber,rxSubscriber_2=rxSubscriber.$$rxSubscriber,__extends=commonjsGlobal&&commonjsGlobal.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function n(){this.constructor=r}r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},Subscriber=function(r){function e(t,n,o){switch(r.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Observer.empty;break;case 1:if(!t){this.destination=Observer.empty;break}if("object"==typeof t){t instanceof e?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,t,n,o)}}return __extends(e,r),e.prototype[rxSubscriber.rxSubscriber]=function(){return this},e.create=function(r,t,n){var o=new e(r,t,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var r=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=r,this._parents=e,this},e}(Subscription_1.Subscription),Subscriber_2=Subscriber,SafeSubscriber=function(r){function e(e,t,n,o){var i;r.call(this),this._parentSubscriber=e;var s=this;isFunction_1.isFunction(t)?i=t:t&&(i=t.next,n=t.error,o=t.complete,t!==Observer.empty&&(s=Object.create(t),isFunction_1.isFunction(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=i,this._error=n,this._complete=o}return __extends(e,r),e.prototype.next=function(r){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},e.prototype.error=function(r){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),r;e.syncErrorValue=r,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var r=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var t=function(){return r._complete.call(r._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(r,e){try{r.call(this._context,e)}catch(r){throw this.unsubscribe(),r}},e.prototype.__tryOrSetError=function(r,e,t){try{e.call(this._context,t)}catch(e){return r.syncErrorValue=e,r.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},e}(Subscriber),Subscriber_1={Subscriber:Subscriber_2};function toSubscriber(r,e,t){if(r){if(r instanceof Subscriber_1.Subscriber)return r;if(r[rxSubscriber.rxSubscriber])return r[rxSubscriber.rxSubscriber]()}return r||e||t?new Subscriber_1.Subscriber(r,e,t):new Subscriber_1.Subscriber(Observer.empty)}var toSubscriber_2=toSubscriber,toSubscriber_1={toSubscriber:toSubscriber_2},observable=createCommonjsModule(function(r,e){function t(r){var e,t=r.Symbol;return"function"==typeof t?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}e.getSymbolObservable=t,e.observable=t(root.root),e.$$observable=e.observable}),observable_1=observable.getSymbolObservable,observable_2=observable.observable,observable_3=observable.$$observable;function noop(){}var noop_2=noop,noop_1={noop:noop_2};function pipe$1(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return pipeFromArray(r)}var pipe_2=pipe$1;function pipeFromArray(r){return r?1===r.length?r[0]:function(e){return r.reduce(function(r,e){return e(r)},e)}:noop_1.noop}var pipeFromArray_1=pipeFromArray,pipe_1={pipe:pipe_2,pipeFromArray:pipeFromArray_1},Observable$1=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(r,e,t){var n=this.operator,o=toSubscriber_1.toSubscriber(r,e,t);if(n?n.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(e){r.syncErrorThrown=!0,r.syncErrorValue=e,r.error(e)}},r.prototype.forEach=function(r,e){var t=this;if(e||(root.root.Rx&&root.root.Rx.config&&root.root.Rx.config.Promise?e=root.root.Rx.config.Promise:root.root.Promise&&(e=root.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var o;o=t.subscribe(function(e){if(o)try{r(e)}catch(r){n(r),o.unsubscribe()}else r(e)},n,e)})},r.prototype._subscribe=function(r){return this.source.subscribe(r)},r.prototype[observable.observable]=function(){return this},r.prototype.pipe=function(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return 0===r.length?this:pipe_1.pipeFromArray(r)(this)},r.prototype.toPromise=function(r){var e=this;if(r||(root.root.Rx&&root.root.Rx.config&&root.root.Rx.config.Promise?r=root.root.Rx.config.Promise:root.root.Promise&&(r=root.root.Promise)),!r)throw new Error("no Promise impl found");return new r(function(r,t){var n;e.subscribe(function(r){return n=r},function(r){return t(r)},function(){return r(n)})})},r.create=function(e){return new r(e)},r}(),Observable_2=Observable$1,_createOperators=createOperators(Observable_2),map=_createOperators.map,startWith=_createOperators.startWith,fromPromise=_createOperators.fromPromise,toObservable=_createOperators.toObservable,all=_createOperators.all,switchMap=_createOperators.switchMap,sample=_createOperators.sample,share=_createOperators.share,raf=share(createRaf(Observable_2)),toAStream=function r(e){return Array.isArray(e)?all(e.map(r)):isObservable(e)?switchMap(r)(e):isPromise(e)?compose(switchMap(r),fromPromise)(e):toObservable(e)},createReactiveTag=function(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return pipe(toAStream,startWith([]),sample(raf),map(function(t){return r.apply(void 0,[e].concat(toConsumableArray(t)))}))(n)}},hx=hyperx(h,{attrToProp:!1}),htmlTag=hx,render=function(r,e){var t=void 0;return r.forEach(function(r){t?patch(t,r):(t=createElement(r),e.appendChild(t))})},createRenderProcess=function(r){return new Observable_2(function(e){var t=void 0,n=void 0;return r.subscribe({complete:function(){return e.complete()},error:function(r){return e.error(r)},next:function(r){n=r;var o=r.lifecycle.mount;n.lifecycle.mount=function(r){t=r,o&&o(r)},n.lifecycle.render=function(r){patch(t=r,n)},t?patch(t,n):e.next(n)}})})},toComponent=function(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return createRenderProcess(r.apply(void 0,[e].concat(n)))}},html$1=toComponent(createReactiveTag(htmlTag)),textTag=function(r){for(var e=arguments.length,t=Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return r.reduce(function(r,e,n){return r+e+(void 0!==t[n]?t[n]:"")},"")},text=createReactiveTag(textTag),defaultSecondPerFrame=.016,reusedTuple=[0,0];function stepper(r,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:170,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:defaultSecondPerFrame,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:.1,c=e+(-n*(r-t)+-o*e)*i,u=r+c*i;return Math.abs(c)<s&&Math.abs(u-t)<s?(reusedTuple[0]=t,reusedTuple[1]=0,reusedTuple):(reusedTuple[0]=u,reusedTuple[1]=c,reusedTuple)}var rafThrottle=function(r){var e=!0,t=[];return function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,e&&(e=!1,window.requestAnimationFrame(function(){e=!0,r.apply(void 0,toConsumableArray(t))}))}},ease=function(r,e){var t=void 0,n=0,o=void 0;return function(i){return o=i,void 0===t&&(t=i),new Observable_2(function(i){var s=!0,c=rafThrottle(function(){var u=stepper(t,n,o,r,e),a=slicedToArray(u,2);t=a[0],n=a[1],i.next(t),0!==n&&s&&c()});return c(),{unsubscribe:function(){s=!1}}})}},cache=new Map,getEase=function(r,e,t){return void 0===t?ease(r,e):(cache.has(t)||cache.set(t,ease(r,e)),cache.get(t))};exports.default=html$1,exports.ease=getEase,exports.text=text,exports.render=render;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var hyperscriptAttributeToProperty=attributeToProperty,transform={class:"className",for:"htmlFor","http-equiv":"httpEquiv"};function attributeToProperty(r){return function(e,t,n){for(var o in t)o in transform&&(t[transform[o]]=t[o],delete t[o]);return r(e,t,n)}}var VAR=0,TEXT=1,OPEN=2,CLOSE=3,ATTR=4,ATTR_KEY=5,ATTR_KEY_W=6,ATTR_VALUE_W=7,ATTR_VALUE=8,ATTR_VALUE_SQ=9,ATTR_VALUE_DQ=10,ATTR_EQ=11,ATTR_BREAK=12,COMMENT=13,hyperx=function(r,e){e||(e={});var t=e.concat||function(r,e){return String(r)+String(e)};return!1!==e.attrToProp&&(r=hyperscriptAttributeToProperty(r)),function(o){for(var i=TEXT,s="",c=arguments.length,u=[],a=0;a<o.length;a++)if(a<c-1){var l=arguments[a+1],f=E(o[a]),p=i;p===ATTR_VALUE_DQ&&(p=ATTR_VALUE),p===ATTR_VALUE_SQ&&(p=ATTR_VALUE),p===ATTR_VALUE_W&&(p=ATTR_VALUE),p===ATTR&&(p=ATTR_KEY),f.push([VAR,p,l]),u.push.apply(u,f)}else u.push.apply(u,E(o[a]));var b=[null,{},[]],h=[[b,-1]];for(a=0;a<u.length;a++){var y=h[h.length-1][0],_=(f=u[a])[0];if(_===OPEN&&/^\//.test(f[1])){var T=h[h.length-1][1];h.length>1&&(h.pop(),h[h.length-1][0][2][T]=r(y[0],y[1],y[2].length?y[2]:void 0))}else if(_===OPEN){var v=[f[1],{},[]];y[2].push(v),h.push([v,y[2].length-1])}else if(_===ATTR_KEY||_===VAR&&f[1]===ATTR_KEY){for(var d,m="";a<u.length;a++)if(u[a][0]===ATTR_KEY)m=t(m,u[a][1]);else{if(u[a][0]!==VAR||u[a][1]!==ATTR_KEY)break;if("object"!=typeof u[a][2]||m)m=t(m,u[a][2]);else for(d in u[a][2])u[a][2].hasOwnProperty(d)&&!y[1][d]&&(y[1][d]=u[a][2][d])}u[a][0]===ATTR_EQ&&a++;for(var A=a;a<u.length;a++)if(u[a][0]===ATTR_VALUE||u[a][0]===ATTR_KEY)y[1][m]?""===u[a][1]||(y[1][m]=t(y[1][m],u[a][1])):y[1][m]=n(u[a][1]);else{if(u[a][0]!==VAR||u[a][1]!==ATTR_VALUE&&u[a][1]!==ATTR_KEY){!m.length||y[1][m]||a!==A||u[a][0]!==CLOSE&&u[a][0]!==ATTR_BREAK||(y[1][m]=m.toLowerCase()),u[a][0]===CLOSE&&a--;break}y[1][m]?""===u[a][2]||(y[1][m]=t(y[1][m],u[a][2])):y[1][m]=n(u[a][2])}}else if(_===ATTR_KEY)y[1][f[1]]=!0;else if(_===VAR&&f[1]===ATTR_KEY)y[1][f[2]]=!0;else if(_===CLOSE){if(selfClosing(y[0])&&h.length){T=h[h.length-1][1];h.pop(),h[h.length-1][0][2][T]=r(y[0],y[1],y[2].length?y[2]:void 0)}}else if(_===VAR&&f[1]===TEXT)void 0===f[2]||null===f[2]?f[2]="":f[2]||(f[2]=t("",f[2])),Array.isArray(f[2][0])?y[2].push.apply(y[2],f[2]):y[2].push(f[2]);else if(_===TEXT)y[2].push(f[1]);else if(_!==ATTR_EQ&&_!==ATTR_BREAK)throw new Error("unhandled: "+_)}if(b[2].length>1&&/^\s*$/.test(b[2][0])&&b[2].shift(),b[2].length>2||2===b[2].length&&/\S/.test(b[2][1]))throw new Error("multiple root elements must be wrapped in an enclosing tag");return Array.isArray(b[2][0])&&"string"==typeof b[2][0][0]&&Array.isArray(b[2][0][2])&&(b[2][0]=r(b[2][0][0],b[2][0][1],b[2][0][2])),b[2][0];function E(r){var t=[];i===ATTR_VALUE_W&&(i=ATTR);for(var n=0;n<r.length;n++){var o=r.charAt(n);i===TEXT&&"<"===o?(s.length&&t.push([TEXT,s]),s="",i=OPEN):">"!==o||quot(i)||i===COMMENT?i===COMMENT&&/-$/.test(s)&&"-"===o?(e.comments&&t.push([ATTR_VALUE,s.substr(0,s.length-1)],[CLOSE]),s="",i=TEXT):i===OPEN&&/^!--$/.test(s)?(e.comments&&t.push([OPEN,s],[ATTR_KEY,"comment"],[ATTR_EQ]),s=o,i=COMMENT):i===TEXT||i===COMMENT?s+=o:i===OPEN&&"/"===o&&s.length||(i===OPEN&&/\s/.test(o)?(t.push([OPEN,s]),s="",i=ATTR):i===OPEN?s+=o:i===ATTR&&/[^\s"'=/]/.test(o)?(i=ATTR_KEY,s=o):i===ATTR&&/\s/.test(o)?(s.length&&t.push([ATTR_KEY,s]),t.push([ATTR_BREAK])):i===ATTR_KEY&&/\s/.test(o)?(t.push([ATTR_KEY,s]),s="",i=ATTR_KEY_W):i===ATTR_KEY&&"="===o?(t.push([ATTR_KEY,s],[ATTR_EQ]),s="",i=ATTR_VALUE_W):i===ATTR_KEY?s+=o:i!==ATTR_KEY_W&&i!==ATTR||"="!==o?i!==ATTR_KEY_W&&i!==ATTR||/\s/.test(o)?i===ATTR_VALUE_W&&'"'===o?i=ATTR_VALUE_DQ:i===ATTR_VALUE_W&&"'"===o?i=ATTR_VALUE_SQ:i===ATTR_VALUE_DQ&&'"'===o?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i===ATTR_VALUE_SQ&&"'"===o?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i!==ATTR_VALUE_W||/\s/.test(o)?i===ATTR_VALUE&&/\s/.test(o)?(t.push([ATTR_VALUE,s],[ATTR_BREAK]),s="",i=ATTR):i!==ATTR_VALUE&&i!==ATTR_VALUE_SQ&&i!==ATTR_VALUE_DQ||(s+=o):(i=ATTR_VALUE,n--):(t.push([ATTR_BREAK]),/[\w-]/.test(o)?(s+=o,i=ATTR_KEY):i=ATTR):(t.push([ATTR_EQ]),i=ATTR_VALUE_W)):(i===OPEN?t.push([OPEN,s]):i===ATTR_KEY?t.push([ATTR_KEY,s]):i===ATTR_VALUE&&s.length&&t.push([ATTR_VALUE,s]),t.push([CLOSE]),s="",i=TEXT)}return i===TEXT&&s.length?(t.push([TEXT,s]),s=""):i===ATTR_VALUE&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_VALUE_DQ&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_VALUE_SQ&&s.length?(t.push([ATTR_VALUE,s]),s=""):i===ATTR_KEY&&(t.push([ATTR_KEY,s]),s=""),t}};function n(r){return"function"==typeof r?r:"string"==typeof r?r:r&&"object"==typeof r?r:t("",r)}};function quot(r){return r===ATTR_VALUE_SQ||r===ATTR_VALUE_DQ}var closeRE=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$");function selfClosing(r){return closeRE.test(r)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},classCallCheck=function(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")},_extends=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},slicedToArray=function(){return function(r,e){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return function(r,e){var t=[],n=!0,o=!1,i=void 0;try{for(var s,c=r[Symbol.iterator]();!(n=(s=c.next()).done)&&(t.push(s.value),!e||t.length!==e);n=!0);}catch(r){o=!0,i=r}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}return t}(r,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),toArray=function(r){return Array.isArray(r)?r:Array.from(r)},toConsumableArray=function(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}return Array.from(r)},Nothing="Nothing",compose=function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return function(r){return e.reduceRight(function(r,e){return e(r)},r)}},pipe=function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return e.reduce(function(r,e){return function(t){return e(r(t))}},function(r){return r})},curry=function r(e){return function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];return n.length>=e.length?e.apply(void 0,n):function(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];return r(e).apply(void 0,n.concat(o))}}},init=function(r){return r.slice(0,r.length-1)},last=function(r){return r[r.length-1]},flatMap=curry(function(r,e){return e.reduce(function(e,t){return e.concat(r(t))},[])}),isEmpty=function(r){return 0!==r&&(!r||"string"==typeof r&&!r.trim())},isPromise=function(r){return r&&"function"==typeof r.then},isObservable=function(r){return r&&"function"==typeof r.subscribe},createOperators=function(r){var e=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return new r(function(r){var e=!0,n=!1,o=void 0;try{for(var i,s=t[Symbol.iterator]();!(e=(i=s.next()).done);e=!0){var c=i.value;r.next(c)}}catch(r){n=!0,o=r}finally{try{!e&&s.return&&s.return()}finally{if(n)throw o}}return r.complete(),{unsubscribe:function(){}}})},t=curry(function(e,t){return new r(function(r){return r.next(e),t.subscribe(r)})}),n=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var o=init(t),i=last(t);return new r(function(r){var e=o.map(function(){return Nothing}),t=o.map(function(){return!0}),n=o.map(function(n,o){return n.subscribe({error:function(e){console.error(e),t[o]=!1,t.every(function(r){return!1===r})&&r.complete()},complete:function(){t[o]=!1,t.every(function(r){return!1===r})&&r.complete()},next:function(t){if(e[o]=t,e.every(function(r){return r!==Nothing})){var n=void 0;try{n=i.apply(void 0,toConsumableArray(e))}catch(r){console.error(r)}r.next(n)}}})});return{unsubscribe:function(){n.forEach(function(r){return r.unsubscribe()})}}})},o=curry(function(e,t){return new r(function(r){return t.subscribe({error:function(e){return r.error(e)},next:function(t){return r.next(e(t))},complete:function(){return r.complete()}})})}),i=curry(function(e,t){var n=void 0;return new r(function(r){return t.subscribe({next:function(t){n&&n.unsubscribe(),n=e(t).subscribe({error:function(e){return r.error(e)},next:function(e){return r.next(e)},complete:function(){}})},error:function(e){return r.error(e)},complete:function(){}})})}),s=curry(function(e,t){var n=Symbol("None");return new r(function(r){var o=n,i=t.subscribe({next:function(r){o=r},complete:function(){},error:function(e){return r.error(e)}}),s=e.subscribe({next:function(){o!==n&&(r.next(o),o=n)},complete:function(){return r.complete()},error:function(e){return r.error(e)}});return{unsubscribe:function(){i.unsubscribe(),s.unsubscribe()}}})});return{point:e,sample:s,map:o,switchMap:i,all:function(r){return r.length?n.apply(void 0,toConsumableArray(r).concat([function(){for(var r=arguments.length,e=Array(r),t=0;t<r;t++)e[t]=arguments[t];return e}])):e([])},combineLatest:n,startWith:t,scan:function(e,t,n){var o=t;return new r(function(r){return n.subscribe({error:function(e){return r.error(e)},next:function(t){return r.next(function(r){return o=e(o,r)}(t))},complete:function(){return r.complete()}})})},throttle:function(e){return function(t){return new r(function(r){return t.subscribe({complete:e(function(){return r.complete()}),error:function(e){return r.error(e)},next:e(function(e){return r.next(e)})})})}},toObservable:function(r){return isObservable(r)?r:e(r)},fromPromise:function(e){return new r(function(r){e.then(function(e){return r.next(e)}).catch(function(){return r.complete()})})},share:function(e){var t=[],n=void 0;return new r(function(r){return t.push(r),1===t.length&&(n=e.subscribe({complete:function(){return t.forEach(function(r){return r.complete()})},error:function(r){return t.forEach(function(e){return e.error(r)})},next:function(r){return t.forEach(function(e){return e.next(r)})}})),{unsubscribe:function(){t=t.filter(function(e){return e!==r}),0===r.length&&n.unsubscribe()}}})}}},createRaf=function(r){return new r(function(r){var e=!0;return window.requestAnimationFrame(function t(){e&&(r.next(),window.requestAnimationFrame(t))}),{unsubscribe:function(){e=!1}}})};function _objectEntries(r){for(var e=[],t=Object.keys(r),n=0;n<t.length;++n)e.push([t[n],r[t[n]]]);return e}var VNode=function r(e){var t=e.name,n=e.attrs,o=e.lifecycle,i=e.events,s=e.children;classCallCheck(this,r),this.name=t,this.attrs=n,this.lifecycle=o,this.events=i,this.children=s},VText=function r(e){var t=e.text;classCallCheck(this,r),this.text=t},isLifecycle=function(r){return["mount","update","unmount"].includes(r)},isEvent=function(r){return!!r.match(/^on/)},toEventName=function(r){return r.replace(/^on/,"").toLowerCase()},styleToObject=function(r){return r.split(";").reduce(function(r,e){var t=e.split(/:/),n=toArray(t),o=n[0],i=n.slice(1);return o.trim()&&(r[o.trim()]=i.join(":")),r},{})},formatChildren=flatMap(function(r){return Array.isArray(r)?r:r instanceof VNode||r instanceof VText?[r]:isEmpty(r)?[]:[new VText({text:""+r})]});function h(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=_objectEntries(e).reduce(function(r,e){var t=slicedToArray(e,2),n=t[0],o=t[1];return isLifecycle(n)&&"function"==typeof o?r.lifecycle[n]=o:isEvent(n)&&"function"==typeof o?r.events[toEventName(n)]=o:r.attrs[n]="style"===n?"object"===(void 0===o?"undefined":_typeof(o))?o:styleToObject(o):o,r},{lifecycle:{},events:{},attrs:{}}),o=n.lifecycle,i=n.events,s=n.attrs;return new VNode({name:r,attrs:s,lifecycle:o,events:i,children:formatChildren(t)})}function _objectEntries$2(r){for(var e=[],t=Object.keys(r),n=0;n<t.length;++n)e.push([t[n],r[t[n]]]);return e}var vTreeKey=Symbol("vTree");function updateEvents(r,e,t){var n=!0,o=!1,i=void 0;try{for(var s,c=_objectEntries$2(t)[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var u=s.value,a=slicedToArray(u,2),l=a[0],f=a[1];e[l]?f!==e[l]&&(r.removeEventListener(l,e[l]),r.addEventListener(l,f)):r.addEventListener(l,f)}}catch(r){o=!0,i=r}finally{try{!n&&c.return&&c.return()}finally{if(o)throw i}}var p=_objectEntries$2(e).filter(function(r){var e=slicedToArray(r,1)[0];return!t[e]}),b=!0,h=!1,y=void 0;try{for(var _,T=p[Symbol.iterator]();!(b=(_=T.next()).done);b=!0){var v=_.value,d=slicedToArray(v,2),m=d[0],A=d[1];r.removeEventListener(m,A)}}catch(r){h=!0,y=r}finally{try{!b&&T.return&&T.return()}finally{if(h)throw y}}}function updateStyle(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var n in _extends({},e,t)){var o=t&&t[n]?t[n]:"";t[n]===e[n]||("-"===n[0]?r.style.setProperty(n,o):r.style[n]=o)}}function updateAttrs(r,e,t){for(var n in _extends({},e,t)){var o=t[n];o===e[n]||(isEmpty(o)?"value"===n&&"INPUT"===r.tagName?r.value="":r.removeAttribute(n):"style"===n?updateStyle(r,e.style,t.style):"value"===n&&"INPUT"===r.tagName?r.value=o:r.setAttribute(n,o))}}function updateChildren(r,e){var t=!0,n=!1,o=void 0;try{for(var i,s=_objectEntries$2(e)[Symbol.iterator]();!(t=(i=s.next()).done);t=!0){var c=i.value,u=slicedToArray(c,2),a=u[0],l=u[1],f=r.childNodes[a];f?l instanceof VNode&&l.lifecycle.render?l.lifecycle.render(f,l):updateElement(f,l):r.appendChild(createElement(l))}}catch(r){n=!0,o=r}finally{try{!t&&s.return&&s.return()}finally{if(n)throw o}}var p=_objectEntries$2(r.childNodes).filter(function(r){var t=slicedToArray(r,1)[0];return!e[t]}),b=!0,h=!1,y=void 0;try{for(var _,T=p[Symbol.iterator]();!(b=(_=T.next()).done);b=!0){var v=_.value;removeElement(slicedToArray(v,2)[1])}}catch(r){h=!0,y=r}finally{try{!b&&T.return&&T.return()}finally{if(h)throw y}}}function createElement(r){if(r instanceof VText){var e=document.createTextNode(r.text);return e[vTreeKey]=r,e}var t=document.createElement(r.name);return updateEvents(t,{},r.events),updateAttrs(t,{},r.attrs),updateChildren(t,r.children),r.lifecycle.mount&&r.lifecycle.mount(t),t[vTreeKey]=r,t}function updateElement(r,e){var t=r[vTreeKey];return e instanceof VText?(t.text!==e.text&&(r.textContent=e.text),r[vTreeKey]=e):t.name!==e.name?(t.lifecycle.unmount&&t.lifecycle.unmount(r),r.parentNode.replaceChild(createElement(e),r)):(updateEvents(r,t.events,e.events),updateAttrs(r,t.attrs,e.attrs),updateChildren(r,e.children),e.lifecycle.update&&e.lifecycle.update(r),r[vTreeKey]=e),r}function removeElement(r){r[vTreeKey]instanceof VNode&&r[vTreeKey].lifecycle.unmount&&r[vTreeKey].lifecycle.unmount(r),r.remove()}function patch(r,e){return r[vTreeKey]||(r[vTreeKey]=new VNode({name:r.tagName.toLowerCase(),lifecycle:{},events:{},attrs:{},children:[]})),updateElement(r,e)}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(r,e){return r(e={exports:{}},e.exports),e.exports}var __window="undefined"!=typeof window&&window,__self="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,__global=void 0!==commonjsGlobal&&commonjsGlobal,_root=__window||__global||__self,root_1=_root;!function(){if(!_root)throw new Error("RxJS could not find any global context (window, self, global)")}();var root={root:root_1};function isFunction(r){return"function"==typeof r}var isFunction_2=isFunction,isFunction_1={isFunction:isFunction_2},isArray_1=Array.isArray||function(r){return r&&"number"==typeof r.length},isArray={isArray:isArray_1};function isObject(r){return null!=r&&"object"==typeof r}var tryCatchTarget,isObject_2=isObject,isObject_1={isObject:isObject_2},errorObject_1={e:{}},errorObject={errorObject:errorObject_1};function tryCatcher(){try{return tryCatchTarget.apply(this,arguments)}catch(r){return errorObject.errorObject.e=r,errorObject.errorObject}}function tryCatch(r){return tryCatchTarget=r,tryCatcher}var tryCatch_2=tryCatch,tryCatch_1={tryCatch:tryCatch_2},__extends$1=commonjsGlobal&&commonjsGlobal.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function n(){this.constructor=r}r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},UnsubscriptionError=function(r){function e(e){r.call(this),this.errors=e;var t=Error.call(this,e?e.length+" errors occurred during unsubscription:\n "+e.map(function(r,e){return e+1+") "+r.toString()}).join("\n "):"");this.name=t.name="UnsubscriptionError",this.stack=t.stack,this.message=t.message}return __extends$1(e,r),e}(Error),UnsubscriptionError_2=UnsubscriptionError,UnsubscriptionError_1={UnsubscriptionError:UnsubscriptionError_2},Subscription=function(){function r(r){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,r&&(this._unsubscribe=r)}var e;return r.prototype.unsubscribe=function(){var r,e=!1;if(!this.closed){var t=this._parent,n=this._parents,o=this._unsubscribe,i=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,c=n?n.length:0;t;)t.remove(this),t=++s<c&&n[s]||null;if(isFunction_1.isFunction(o))tryCatch_1.tryCatch(o).call(this)===errorObject.errorObject&&(e=!0,r=r||(errorObject.errorObject.e instanceof UnsubscriptionError_1.UnsubscriptionError?flattenUnsubscriptionErrors(errorObject.errorObject.e.errors):[errorObject.errorObject.e]));if(isArray.isArray(i))for(s=-1,c=i.length;++s<c;){var u=i[s];if(isObject_1.isObject(u))if(tryCatch_1.tryCatch(u.unsubscribe).call(u)===errorObject.errorObject){e=!0,r=r||[];var a=errorObject.errorObject.e;a instanceof UnsubscriptionError_1.UnsubscriptionError?r=r.concat(flattenUnsubscriptionErrors(a.errors)):r.push(a)}}if(e)throw new UnsubscriptionError_1.UnsubscriptionError(r)}},r.prototype.add=function(e){if(!e||e===r.EMPTY)return r.EMPTY;if(e===this)return this;var t=e;switch(typeof e){case"function":t=new r(e);case"object":if(t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if("function"!=typeof t._addParent){var n=t;(t=new r)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(t),t._addParent(this),t},r.prototype.remove=function(r){var e=this._subscriptions;if(e){var t=e.indexOf(r);-1!==t&&e.splice(t,1)}},r.prototype._addParent=function(r){var e=this._parent,t=this._parents;e&&e!==r?t?-1===t.indexOf(r)&&t.push(r):this._parents=[r]:this._parent=r},r.EMPTY=((e=new r).closed=!0,e),r}(),Subscription_2=Subscription;function flattenUnsubscriptionErrors(r){return r.reduce(function(r,e){return r.concat(e instanceof UnsubscriptionError_1.UnsubscriptionError?e.errors:e)},[])}var Subscription_1={Subscription:Subscription_2},empty={closed:!0,next:function(r){},error:function(r){throw r},complete:function(){}},Observer={empty:empty},rxSubscriber=createCommonjsModule(function(r,e){var t=root.root.Symbol;e.rxSubscriber="function"==typeof t&&"function"==typeof t.for?t.for("rxSubscriber"):"@@rxSubscriber",e.$$rxSubscriber=e.rxSubscriber}),rxSubscriber_1=rxSubscriber.rxSubscriber,rxSubscriber_2=rxSubscriber.$$rxSubscriber,__extends=commonjsGlobal&&commonjsGlobal.__extends||function(r,e){for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);function n(){this.constructor=r}r.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},Subscriber=function(r){function e(t,n,o){switch(r.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Observer.empty;break;case 1:if(!t){this.destination=Observer.empty;break}if("object"==typeof t){t instanceof e?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,this.destination.add(this)):(this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new SafeSubscriber(this,t,n,o)}}return __extends(e,r),e.prototype[rxSubscriber.rxSubscriber]=function(){return this},e.create=function(r,t,n){var o=new e(r,t,n);return o.syncErrorThrowable=!1,o},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this))},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){this.destination.error(r),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var r=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=r,this._parents=e,this},e}(Subscription_1.Subscription),Subscriber_2=Subscriber,SafeSubscriber=function(r){function e(e,t,n,o){var i;r.call(this),this._parentSubscriber=e;var s=this;isFunction_1.isFunction(t)?i=t:t&&(i=t.next,n=t.error,o=t.complete,t!==Observer.empty&&(s=Object.create(t),isFunction_1.isFunction(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=i,this._error=n,this._complete=o}return __extends(e,r),e.prototype.next=function(r){if(!this.isStopped&&this._next){var e=this._parentSubscriber;e.syncErrorThrowable?this.__tryOrSetError(e,this._next,r)&&this.unsubscribe():this.__tryOrUnsub(this._next,r)}},e.prototype.error=function(r){if(!this.isStopped){var e=this._parentSubscriber;if(this._error)e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,r),this.unsubscribe()):(this.__tryOrUnsub(this._error,r),this.unsubscribe());else{if(!e.syncErrorThrowable)throw this.unsubscribe(),r;e.syncErrorValue=r,e.syncErrorThrown=!0,this.unsubscribe()}}},e.prototype.complete=function(){var r=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var t=function(){return r._complete.call(r._context)};e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(r,e){try{r.call(this._context,e)}catch(r){throw this.unsubscribe(),r}},e.prototype.__tryOrSetError=function(r,e,t){try{e.call(this._context,t)}catch(e){return r.syncErrorValue=e,r.syncErrorThrown=!0,!0}return!1},e.prototype._unsubscribe=function(){var r=this._parentSubscriber;this._context=null,this._parentSubscriber=null,r.unsubscribe()},e}(Subscriber),Subscriber_1={Subscriber:Subscriber_2};function toSubscriber(r,e,t){if(r){if(r instanceof Subscriber_1.Subscriber)return r;if(r[rxSubscriber.rxSubscriber])return r[rxSubscriber.rxSubscriber]()}return r||e||t?new Subscriber_1.Subscriber(r,e,t):new Subscriber_1.Subscriber(Observer.empty)}var toSubscriber_2=toSubscriber,toSubscriber_1={toSubscriber:toSubscriber_2},observable=createCommonjsModule(function(r,e){function t(r){var e,t=r.Symbol;return"function"==typeof t?t.observable?e=t.observable:(e=t("observable"),t.observable=e):e="@@observable",e}e.getSymbolObservable=t,e.observable=t(root.root),e.$$observable=e.observable}),observable_1=observable.getSymbolObservable,observable_2=observable.observable,observable_3=observable.$$observable;function noop(){}var noop_2=noop,noop_1={noop:noop_2};function pipe$1(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return pipeFromArray(r)}var pipe_2=pipe$1;function pipeFromArray(r){return r?1===r.length?r[0]:function(e){return r.reduce(function(r,e){return e(r)},e)}:noop_1.noop}var pipeFromArray_1=pipeFromArray,pipe_1={pipe:pipe_2,pipeFromArray:pipeFromArray_1},Observable$1=function(){function r(r){this._isScalar=!1,r&&(this._subscribe=r)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(r,e,t){var n=this.operator,o=toSubscriber_1.toSubscriber(r,e,t);if(n?n.call(o,this.source):o.add(this.source||!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},r.prototype._trySubscribe=function(r){try{return this._subscribe(r)}catch(e){r.syncErrorThrown=!0,r.syncErrorValue=e,r.error(e)}},r.prototype.forEach=function(r,e){var t=this;if(e||(root.root.Rx&&root.root.Rx.config&&root.root.Rx.config.Promise?e=root.root.Rx.config.Promise:root.root.Promise&&(e=root.root.Promise)),!e)throw new Error("no Promise impl found");return new e(function(e,n){var o;o=t.subscribe(function(e){if(o)try{r(e)}catch(r){n(r),o.unsubscribe()}else r(e)},n,e)})},r.prototype._subscribe=function(r){return this.source.subscribe(r)},r.prototype[observable.observable]=function(){return this},r.prototype.pipe=function(){for(var r=[],e=0;e<arguments.length;e++)r[e-0]=arguments[e];return 0===r.length?this:pipe_1.pipeFromArray(r)(this)},r.prototype.toPromise=function(r){var e=this;if(r||(root.root.Rx&&root.root.Rx.config&&root.root.Rx.config.Promise?r=root.root.Rx.config.Promise:root.root.Promise&&(r=root.root.Promise)),!r)throw new Error("no Promise impl found");return new r(function(r,t){var n;e.subscribe(function(r){return n=r},function(r){return t(r)},function(){return r(n)})})},r.create=function(e){return new r(e)},r}(),Observable_2=Observable$1,_createOperators=createOperators(Observable_2),map=_createOperators.map,startWith=_createOperators.startWith,fromPromise=_createOperators.fromPromise,toObservable=_createOperators.toObservable,all=_createOperators.all,switchMap=_createOperators.switchMap,sample=_createOperators.sample,share=_createOperators.share,raf=share(createRaf(Observable_2)),toAStream=function r(e){return Array.isArray(e)?all(e.map(r)):isObservable(e)?switchMap(r)(e):isPromise(e)?compose(switchMap(r),fromPromise)(e):toObservable(e)},createReactiveTag=function(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return pipe(toAStream,startWith([]),sample(raf),map(function(t){return r.apply(void 0,[e].concat(toConsumableArray(t)))}))(n)}},hx=hyperx(h,{attrToProp:!1}),htmlTag=hx,render=function(r,e){var t=void 0;return r.forEach(function(r){t?patch(t,r):(t=createElement(r),e.appendChild(t))})},createRenderProcess=function(r){return new Observable_2(function(e){var t=void 0,n=void 0;return r.subscribe({complete:function(){return e.complete()},error:function(r){return e.error(r)},next:function(r){if(!(r instanceof VNode))return e.next(r);n=r;var o=r.lifecycle.mount;n.lifecycle.mount=function(r){t=r,o&&o(r)},n.lifecycle.render=function(r){patch(t=r,n)},t?patch(t,n):e.next(n)}})})},toComponent=function(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return createRenderProcess(r.apply(void 0,[e].concat(n)))}},html$1=toComponent(createReactiveTag(htmlTag)),textTag=function(r){for(var e=arguments.length,t=Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];return r.reduce(function(r,e,n){return r+e+(void 0!==t[n]?t[n]:"")},"")},text=createReactiveTag(textTag),defaultSecondPerFrame=.016,reusedTuple=[0,0];function stepper(r,e,t){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:170,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:defaultSecondPerFrame,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:.1,c=e+(-n*(r-t)+-o*e)*i,u=r+c*i;return Math.abs(c)<s&&Math.abs(u-t)<s?(reusedTuple[0]=t,reusedTuple[1]=0,reusedTuple):(reusedTuple[0]=u,reusedTuple[1]=c,reusedTuple)}var rafThrottle=function(r){var e=!0,t=[];return function(){for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];t=o,e&&(e=!1,window.requestAnimationFrame(function(){e=!0,r.apply(void 0,toConsumableArray(t))}))}},ease=function(r,e){var t=void 0,n=0,o=void 0;return function(i){return o=i,void 0===t&&(t=i),new Observable_2(function(i){var s=!0,c=rafThrottle(function(){var u=stepper(t,n,o,r,e),a=slicedToArray(u,2);t=a[0],n=a[1],i.next(t),0!==n&&s&&c()});return c(),{unsubscribe:function(){s=!1}}})}},cache=new Map,getEase=function(r,e,t){return void 0===t?ease(r,e):(cache.has(t)||cache.set(t,ease(r,e)),cache.get(t))};exports.default=html$1,exports.ease=getEase,exports.text=text,exports.render=render;
{
"name": "evolui",
"version": "1.2.0",
"version": "1.2.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/evolui.js",

import hyperx from 'hyperx'
import h from './h'
import h, { VNode } from './h'
import patch, { createElement } from './patch'

@@ -37,2 +37,4 @@ import Observable from '../Observable'

next: newTree => {
if (!(newTree instanceof VNode)) return observer.next(newTree)
tree = newTree

@@ -39,0 +41,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc