Comparing version 9.0.0-rc.3 to 9.0.0
@@ -1,4 +0,4 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
const require$$3 = undefined; | ||
export { require$$3 as default }; |
@@ -1,4 +0,4 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
const require$$4 = undefined; | ||
export { require$$4 as default }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import bindingTypes from '../dependencies/@riotjs/util/binding-types.js'; | ||
@@ -3,0 +3,0 @@ import { DOM_COMPONENT_INSTANCE_PROPERTY, PARENT_KEY_SYMBOL } from '../dependencies/@riotjs/util/constants.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import compose from '../dependencies/cumpa/index.js'; | ||
@@ -3,0 +3,0 @@ import { createComponentFromWrapper } from '../core/create-component-from-wrapper.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { isFunction } from '../dependencies/@riotjs/util/checks.js'; | ||
@@ -3,0 +3,0 @@ import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ import { mountComponent } from '../core/mount-component.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { isFunction } from '../dependencies/@riotjs/util/checks.js'; | ||
@@ -3,0 +3,0 @@ import { IS_PURE_SYMBOL } from '../dependencies/@riotjs/util/constants.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../dependencies/@riotjs/util/constants.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js'; |
@@ -1,5 +0,5 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
/** @type {string} current riot version */ | ||
const version = 'v9.0.0-rc.3'; | ||
const version = 'v9.0.0'; | ||
export { version }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
/** | ||
@@ -3,0 +3,0 @@ * no-op function needed to add the proper types to your component via typescript |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { compile } from '../dependencies/@riotjs/compiler/dist/compiler.essential.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ import { compileFromUrl } from './compile-from-url.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import createRuntimeSlots from '../utils/create-runtime-slots.js'; | ||
@@ -3,0 +3,0 @@ import { component as component$1 } from '../api/component.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { GLOBAL_REGISTRY } from './global-registry.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
// evaluates a compiled tag within the global context | ||
@@ -3,0 +3,0 @@ function evaluate(js, url) { |
@@ -1,4 +0,4 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
const GLOBAL_REGISTRY = '__riot_registry__'; | ||
export { GLOBAL_REGISTRY }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { GLOBAL_REGISTRY } from './global-registry.js'; | ||
@@ -3,0 +3,0 @@ import { defineWindowRiotGlobalRegistry } from './define-window-riot-global-registry.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ import createRuntimeSlots from '../utils/create-runtime-slots.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
// cheap module transpilation | ||
@@ -3,0 +3,0 @@ function transpile(code) { |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { IS_DIRECTIVE } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { getName } from '../utils/dom.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { DOM_COMPONENT_INSTANCE_PROPERTY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { SHOULD_UPDATE_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, ON_BEFORE_UPDATE_KEY, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { noop } from '../dependencies/@riotjs/util/functions.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { template as create } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js'; | ||
@@ -3,0 +3,0 @@ import expressionTypes from '../dependencies/@riotjs/util/expression-types.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { callOrAssign } from '../dependencies/@riotjs/util/functions.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { DOMattributesToObject } from '../dependencies/@riotjs/util/dom.js'; | ||
@@ -3,0 +3,0 @@ import { callOrAssign } from '../dependencies/@riotjs/util/functions.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { createCoreAPIMethods } from './create-core-api-methods.js'; | ||
@@ -3,0 +3,0 @@ import { createExpression as create$4 } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { IS_PURE_SYMBOL, COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { camelToDashCase } from '../dependencies/@riotjs/util/strings.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { MOUNT_METHOD_KEY, IS_PURE_SYMBOL } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import $ from '../dependencies/bianco.query/index.next.js'; | ||
@@ -3,0 +3,0 @@ import { set } from '../dependencies/bianco.attr/index.next.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { SLOTS_KEY, ROOT_KEY, PROPS_KEY, STATE_KEY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { defineProperties, defineDefaults } from '../dependencies/@riotjs/util/objects.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { isFunction, isObject } from '../dependencies/@riotjs/util/checks.js'; | ||
@@ -3,0 +3,0 @@ import { IS_PURE_SYMBOL, PARENT_KEY_SYMBOL, ATTRIBUTES_KEY_SYMBOL, PROPS_KEY, STATE_KEY, TEMPLATE_KEY_SYMBOL, ROOT_KEY, SLOTS_KEY, ON_BEFORE_MOUNT_KEY, ON_MOUNTED_KEY, SHOULD_UPDATE_KEY, ON_BEFORE_UPDATE_KEY, IS_COMPONENT_UPDATING, ON_UPDATED_KEY, ON_BEFORE_UNMOUNT_KEY, ON_UNMOUNTED_KEY } from '../dependencies/@riotjs/util/constants.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { PURE_COMPONENT_API } from './pure-component-api.js'; | ||
@@ -3,0 +3,0 @@ import { noop } from '../dependencies/@riotjs/util/functions.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { COMPONENTS_IMPLEMENTATION_MAP } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { panic } from '../dependencies/@riotjs/util/misc.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { MOUNT_METHOD_KEY, UPDATE_METHOD_KEY, UNMOUNT_METHOD_KEY } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { noop } from '../dependencies/@riotjs/util/functions.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { PLUGINS_SET } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import * as compiler_essential from './dependencies/@riotjs/compiler/dist/compiler.essential.js'; | ||
@@ -3,0 +3,0 @@ export { compiler_essential as compiler }; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
export { register } from './api/register.js'; | ||
@@ -3,0 +3,0 @@ export { unregister } from './api/unregister.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { template as create } from '../dependencies/@riotjs/dom-bindings/dist/dom-bindings.js'; | ||
@@ -3,0 +3,0 @@ import bindingTypes from '../dependencies/@riotjs/util/binding-types.js'; |
@@ -1,2 +0,2 @@ | ||
/* Riot v9.0.0-rc.3, @license MIT */ | ||
/* Riot v9.0.0, @license MIT */ | ||
import { IS_DIRECTIVE } from '../dependencies/@riotjs/util/constants.js'; | ||
@@ -3,0 +3,0 @@ import { get } from '../dependencies/bianco.attr/index.next.js'; |
{ | ||
"name": "riot", | ||
"version": "9.0.0-rc.3", | ||
"version": "9.0.0", | ||
"description": "Simple and elegant component-based UI library", | ||
@@ -74,5 +74,5 @@ "license": "MIT", | ||
"curri": "^2.0.3", | ||
"eslint": "^8.45.0", | ||
"eslint": "^8.46.0", | ||
"eslint-config-riot": "^4.1.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-import": "^2.28.0", | ||
"jsdom": "22.1.0", | ||
@@ -88,3 +88,3 @@ "jsdom-global": "3.0.2", | ||
"prettier": "^3.0.0", | ||
"rollup": "^3.26.3", | ||
"rollup": "^3.27.0", | ||
"rollup-plugin-istanbul": "^4.0.0", | ||
@@ -91,0 +91,0 @@ "rollup-plugin-riot": "^7.0.0", |
@@ -1,1 +0,1 @@ | ||
var t,e;t=this,e=function(t){"use strict";const e={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function n(t,e){return typeof t===e}function r(t){const e=t.ownerSVGElement;return!!e||null===e}function o(t){return"template"===t.tagName.toLowerCase()}function s(t){return n(t,"function")}function i(t){return!u(t)&&t.constructor===Object}function u(t){return null==t}const a=new Map,c=Symbol(),l=new Set,h="is",d="mount",p="update",m="unmount",f="shouldUpdate",b="onBeforeMount",g="onMounted",y="onBeforeUpdate",v="onUpdated",N="onBeforeUnmount",O="onUnmounted",x="props",E="state",M="slots",T="root",j=Symbol(),A=Symbol(),w=Symbol(),S=Symbol(),C=Symbol();function D(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function k(t){return Array.from(t.attributes).reduce(((t,e)=>(t[D(e.name)]=e.value,t)),{})}function L(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const I=t=>t.remove(),P=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),B=0,_=2,U=3,$={ATTRIBUTE:B,EVENT:1,TEXT:_,VALUE:U};function z(){return this}function H(t){return s(t)?t.prototype&&t.prototype.constructor?new t:t():t}function K(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function R(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===B:return{...t,...n};case r===U:t.value=e.value;break;default:t[D(e.name)]=e.value}return t}),{})}function Y(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function F(t,e,n){return Object.entries(e).forEach((([e,r])=>{Y(t,e,r,n)})),t}function V(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}const q=Object.freeze({[d]:z,[p]:z,[m]:z}),G={...q,clone:z,createDOM:z},W=Symbol(),X=Symbol(),Z=Symbol(),J={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===Z?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return Y(t,e,o),n&&Y(t,n,r),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),y=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const v=!g,N=g?g.template:s.clone(),O=N.el||l.cloneNode(),x=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[W]=!0,e[X]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(N):N.meta;v?p.push((()=>N.mount(O,f,n,x))):p.push((()=>N.update(f,n))),h?y.push(...x.children):y.push(O),i.delete(b),m.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)P(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||I(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;P(n(e[a++],1),n(t[u++],-1).nextSibling),P(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)P(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else I(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(Z,e),this}},Q={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();P(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},tt="undefined"==typeof Element?{}:Element.prototype,et=K((t=>tt.hasOwnProperty(t))),nt=/^on/,rt={handleEvent(t){this[t.type](t)}},ot=new WeakMap;function st(t){return u(t)?"":t}const it=(t,e)=>{const n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){const e=document.createTextNode("");return t.replaceChild(e,n),e}return n},ut={[B]:function t(e,{name:r,isBoolean:o},u,a){if(!r)return a&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,u,a),void(u&&function(e,n){Object.entries(n).forEach((([n,r])=>t(e,{name:n},r)))}(e,u));!et(r)&&(function(t){return n(t,"boolean")}(u)||i(u)||s(u))&&(e[r]=u),function(t){return null==t}(u)?e.removeAttribute(r):function(t){return["string","number","boolean"].includes(typeof t)}(u)&&e.setAttribute(r,function(t,e,n){return!0===e&&n?t:e}(r,u,o))},1:function(t,{name:e},n){const r=e.replace(nt,""),o=ot.get(t)||(t=>{const e=Object.create(rt);return ot.set(t,e),e})(t),[s,i]=(t=>Array.isArray(t)?t:[t,!1])(n),u=o[r],a=s&&!u;u&&!s&&t.removeEventListener(r,o),a&&t.addEventListener(r,o,i),o[r]=s},[_]:function(t,e,n){t.data=st(n)},[U]:function(t,e,n){t.value=st(n)}},at={mount(t){return this.value=this.evaluate(t),ct(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(ct(this,e),this.value=e),this},unmount(){return 1===this.type&&ct(this,null),this}};function ct(t,e){return ut[t.type](t.node,t,e,t.value)}function lt(t,e){return{...at,...e,node:e.type===_?it(t,e.childNodeIndex):t}}const ht=(t,e)=>t[w]||e,dt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>({...t,value:t.evaluate(e)})));return Object.assign(Object.create(n||null),R(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((({id:t})=>t===this.name)),{parentNode:r}=this.node,o=ht(t,e);return this.template=n&&Nt(n.html,n.bindings).createDOM(r),this.template&&(L(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),pt(this.node),I(this.node),this},update(t,e){if(this.template){const n=ht(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function pt(t){const e=t&&t.firstChild;e&&(P(e,t),pt(t))}function mt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const ft={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e=[],n=[]){return t?t({slots:e,attributes:n}):Nt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...mt(e),{expressions:n.map((t=>({type:B,...t})))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},bt={1:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return P(r,t),I(t),{...Q,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},2:function(t,{expressions:e}){return{...(n=e.map((e=>lt(t,e))),r=["mount","update","unmount"],r.reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{}))};var n,r},0:function(t,{evaluate:e,condition:n,itemName:r,indexName:s,getKey:i,template:u}){const a=document.createTextNode(""),c=t.cloneNode();return P(a,t),I(t),{...J,childrenMap:new Map,node:t,root:c,condition:n,evaluate:e,isTemplateTag:o(c),template:u.createDOM(t),getKey:i,indexName:s,itemName:r,placeholder:a}},3:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...ft,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},4:function(t,{name:e,attributes:n}){return{...dt,attributes:n,node:t,name:e}}};function gt(t,e){return t.map((t=>t.type===_?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function yt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(bt[o]||bt[2])(u,{...e,expressions:n&&!r?gt(a,n):a})}const vt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return r(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=o(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,s={}){this.el&&this.unmount(e);const{fragment:i,children:u,avoidDOMInjection:a}=s,{parentNode:c}=u?u[0]:t,l=o(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(c,t,s):null;this.createDOM(t);const d=i||this.dom.cloneNode(!0);return this.el=l?c:t,this.children=l?u||Array.from(d.childNodes):null,!a&&d&&function(t,e){switch(!0){case r(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case o(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>yt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=s,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n=!1){const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[j]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)I(t[e])}(this.children);break;case!n:L(r);break;case!!n:I(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function Nt(t,e=[]){return{...vt,html:t,bindingsData:e}}const Ot=(t,e)=>t[c]=e;function xt(t){return[d,p,m].reduce(((e,n)=>(e[n]=t(n),e)),{})}function Et(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function Mt(t,e){return Et("string"==typeof t?(e||document).querySelectorAll(t):t)}const Tt=Object.freeze({$(t){return Mt(t,this.root)[0]},$$(t){return Mt(t,this.root)}}),jt=Object.freeze({[f]:z,[b]:z,[g]:z,[y]:z,[v]:z,[N]:z,[O]:z}),At=t=>1===t.length?t[0]:t;function wt(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return Et(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const St=new Map;var Ct;const Dt={CSS_BY_NAME:St,add(t,e){return St.has(t)||(St.set(t,e),this.inject()),this},inject(){return(Ct||(wt(Ct=Mt("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ct.parentNode||document.head.appendChild(Ct),Ct)).innerHTML=[...St.values()].join("\n"),this},remove(t){return St.has(t)&&(St.delete(t),this.inject()),this}};function kt(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?kt(t,...n):t(...n)}function Lt(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return At(Et(t).map((t=>At(r.map((e=>t.getAttribute(e)))))))}(t,h)||t.tagName.toLowerCase()}function It(t,e){return{...t,...H(e)}}function Pt(t,e={}){return{...k(t),...H(e)}}function Bt(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...l].reduce(((t,e)=>e(t)||t),t)}(F(i(t)?Object.create(t):t,{mount(o,s={},i){return Y(o,j,!1),this[w]=i,this[S]=function(t,e=[]){const n=e.map((e=>lt(t,e))),r={};return Object.assign(r,{expressions:n,...xt((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),Y(this,x,Object.freeze({...Pt(o,r),...R(this[S].expressions)})),this[E]=It(this[E],s),this[C]=this.template.createDOM(o).clone(),Ot(o,this),t.name&&function(t,e){Lt(t)!==e&&wt(t,h,e)}(o,t.name),Y(this,T,o),Y(this,M,e),this[b](this[x],this[E]),this[C].mount(o,this,i),this[g](this[x],this[E]),this},update(t={},e){e&&(this[w]=e,this[S].update(e));const n=R(this[S].expressions);if(!1!==this[f](n,this[x]))return Y(this,x,Object.freeze({...e?null:this[x],...n})),this[E]=It(this[E],t),this[y](this[x],this[E]),this[A]||(this[A]=!0,this[C].update(this,this[w])),this[v](this[x],this[E]),this[A]=!1,this},unmount(t){return this[N](this[x],this[E]),this[S].unmount(),this[C].unmount(this,this[w],null===t?null:!t),this[O](this[x],this[E]),this}})),Object.keys(t).filter((e=>s(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function _t({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Dt.add(r,t),kt(Bt)(F(V(n,{...jt,[x]:{},[E]:{}}),{[M]:null,[T]:null,...Tt,name:r,css:t,template:e}))}const Ut=K($t);function $t(t){const{css:n,template:r,exports:o,name:s}=t,i=r?function(t,n,r){return t(Nt,$,e,r)}(r,0,(t=>{const e=function(t={}){return Object.entries(H(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=$t(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?Ut(t):e[n]||a.get(n)})(t)):G;return({slots:t,attributes:e,props:u})=>{if(o&&o[j])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=V(t({slots:e,attributes:n,props:r}),q);return xt((t=>(...e)=>{if(t===d){const[t]=e;Y(t,j,!0),Ot(t,i)}return i[t](...e),i}))}(o,{slots:t,attributes:e,props:u,css:n,template:r});const a=H(o)||{},c=_t({css:n,template:i,componentAPI:a,name:s})({slots:t,attributes:e,props:u});return{mount:(t,e,n)=>c.mount(t,n,e),update:(t,e)=>c.update(e,t),unmount:t=>c.unmount(t)}}}const zt={cssManager:Dt,DOMBindings:{template:Nt,createBinding:yt,createExpression:lt,bindingTypes:e,expressionTypes:$},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:c,PARENT_KEY_SYMBOL:w}};t.__=zt,t.component=function(t){return(e,n,{slots:r,attributes:o,parentScope:s}={})=>function(...t){return t.reduce(((t,e)=>(...n)=>t(e(...n))))}((t=>t.mount(e,s)),(t=>t({props:n,slots:r,attributes:o})),$t)(t)},t.install=function(t){return s(t),l.has(t),l.add(t),l},t.mount=function(t,e,n){return Mt(t).map((t=>function(t,e,n,r){const o=n||Lt(t);return a.has(o),a.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return s(t),t[j]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return a.has(t),a.set(t,$t({name:t,css:e,template:n,exports:r})),a},t.uninstall=function(t){return l.has(t),l.delete(t),l},t.unmount=function(t,e){return Mt(t).map((t=>(t[c]&&t[c].unmount(e),t)))},t.unregister=function(t){return a.has(t),a.delete(t),Dt.remove(t),a},t.version="v9.0.0-rc.3",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={}); | ||
var t,e;t=this,e=function(t){"use strict";const e={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function n(t,e){return typeof t===e}function r(t){const e=t.ownerSVGElement;return!!e||null===e}function o(t){return"template"===t.tagName.toLowerCase()}function s(t){return n(t,"function")}function i(t){return!u(t)&&t.constructor===Object}function u(t){return null==t}const a=new Map,c=Symbol(),l=new Set,h="is",d="mount",p="update",m="unmount",f="shouldUpdate",b="onBeforeMount",g="onMounted",y="onBeforeUpdate",v="onUpdated",N="onBeforeUnmount",O="onUnmounted",x="props",E="state",M="slots",T="root",j=Symbol(),A=Symbol(),w=Symbol(),S=Symbol(),C=Symbol();function D(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function k(t){return Array.from(t.attributes).reduce(((t,e)=>(t[D(e.name)]=e.value,t)),{})}function L(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const I=t=>t.remove(),P=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),B=0,_=2,U=3,$={ATTRIBUTE:B,EVENT:1,TEXT:_,VALUE:U};function z(){return this}function H(t){return s(t)?t.prototype&&t.prototype.constructor?new t:t():t}function K(t){const e=new Map,n=n=>(e.has(n)||e.set(n,t.call(this,n)))&&e.get(n);return n.cache=e,n}function R(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&r===B:return{...t,...n};case r===U:t.value=e.value;break;default:t[D(e.name)]=e.value}return t}),{})}function Y(t,e,n,r={}){return Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!1,configurable:!0,...r}),t}function F(t,e,n){return Object.entries(e).forEach((([e,r])=>{Y(t,e,r,n)})),t}function V(t,e){return Object.entries(e).forEach((([e,n])=>{t[e]||(t[e]=n)})),t}const q=Object.freeze({[d]:z,[p]:z,[m]:z}),G={...q,clone:z,createDOM:z},W=Symbol(),X=Symbol(),Z=Symbol(),J={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===Z?null:this.evaluate(t),i=s?Array.from(s):[],{newChildrenMap:u,batches:a,futureNodes:c}=function(t,e,n,r){const{condition:o,template:s,childrenMap:i,itemName:u,getKey:a,indexName:c,root:l,isTemplateTag:h}=r,d=new Map,p=[],m=[];return t.forEach(((t,r)=>{const f=function(t,{itemName:e,indexName:n,index:r,item:o}){return Y(t,e,o),n&&Y(t,n,r),t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),y=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const v=!g,N=g?g.template:s.clone(),O=N.el||l.cloneNode(),x=h&&v?function(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[W]=!0,e[X]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}(N):N.meta;v?p.push((()=>N.mount(O,f,n,x))):p.push((()=>N.update(f,n))),h?y.push(...x.children):y.push(O),i.delete(b),m.push(...y),d.set(b,{nodes:y,template:N,context:f,index:r})})),{newChildrenMap:d,batches:p,futureNodes:m}}(i,t,e,this);return((t,e,n,r)=>{const o=e.length;let s=t.length,i=o,u=0,a=0,c=null;for(;u<s||a<i;)if(s===u){const t=i<o?a?n(e[a-1],-0).nextSibling:n(e[i-a],0):r;for(;a<i;)P(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||I(n(t[u],-1)),u++;else if(t[u]===e[a])u++,a++;else if(t[s-1]===e[i-1])s--,i--;else if(t[u]===e[i-1]&&e[a]===t[s-1]){const r=n(t[--s],-1).nextSibling;P(n(e[a++],1),n(t[u++],-1).nextSibling),P(n(e[--i],1),r),t[s]=e[i]}else{if(!c){c=new Map;let t=a;for(;t<i;)c.set(e[t],t++)}if(c.has(t[u])){const r=c.get(t[u]);if(a<r&&r<i){let o=u,d=1;for(;++o<s&&o<i&&c.get(t[o])===r+d;)d++;if(d>r-a){const o=n(t[u],0);for(;a<r;)P(n(e[a++],1),o)}else l=n(e[a++],1),(h=n(t[u++],-1))&&h.parentNode&&h.parentNode.replaceChild(l,h)}else u++}else I(n(t[u++],-1))}var l,h})(r,c,function(t,e){return(n,r)=>{if(r<0){const n=t[t.length-1];if(n){const{template:r,nodes:o,context:s}=n;o.pop(),o.length||(t.pop(),r.unmount(s,e,null))}}return n}}(Array.from(o.values()),e),n),a.forEach((t=>t())),this.childrenMap=u,this.nodes=c,this},unmount(t,e){return this.update(Z,e),this}},Q={mount(t,e){return this.update(t,e)},update(t,e){const n=!!this.evaluate(t),r=!this.value&&n,o=this.value&&!n,s=()=>{const n=this.node.cloneNode();P(n,this.placeholder),this.template=this.template.clone(),this.template.mount(n,t,e)};switch(!0){case r:s();break;case o:this.unmount(t);break;default:n&&this.template.update(t,e)}return this.value=n,this},unmount(t,e){return this.template.unmount(t,e,!0),this}},tt="undefined"==typeof Element?{}:Element.prototype,et=K((t=>tt.hasOwnProperty(t))),nt=/^on/,rt={handleEvent(t){this[t.type](t)}},ot=new WeakMap;function st(t){return u(t)?"":t}const it=(t,e)=>{const n=t.childNodes[e];if(n.nodeType===Node.COMMENT_NODE){const e=document.createTextNode("");return t.replaceChild(e,n),e}return n},ut={[B]:function t(e,{name:r,isBoolean:o},u,a){if(!r)return a&&function(t,e,n){const r=e?Object.keys(e):[];Object.keys(n).filter((t=>!r.includes(t))).forEach((e=>t.removeAttribute(e)))}(e,u,a),void(u&&function(e,n){Object.entries(n).forEach((([n,r])=>t(e,{name:n},r)))}(e,u));!et(r)&&(function(t){return n(t,"boolean")}(u)||i(u)||s(u))&&(e[r]=u),function(t){return null==t}(u)?e.removeAttribute(r):function(t){return["string","number","boolean"].includes(typeof t)}(u)&&e.setAttribute(r,function(t,e,n){return!0===e&&n?t:e}(r,u,o))},1:function(t,{name:e},n){const r=e.replace(nt,""),o=ot.get(t)||(t=>{const e=Object.create(rt);return ot.set(t,e),e})(t),[s,i]=(t=>Array.isArray(t)?t:[t,!1])(n),u=o[r],a=s&&!u;u&&!s&&t.removeEventListener(r,o),a&&t.addEventListener(r,o,i),o[r]=s},[_]:function(t,e,n){t.data=st(n)},[U]:function(t,e,n){t.value=st(n)}},at={mount(t){return this.value=this.evaluate(t),ct(this,this.value),this},update(t){const e=this.evaluate(t);return this.value!==e&&(ct(this,e),this.value=e),this},unmount(){return 1===this.type&&ct(this,null),this}};function ct(t,e){return ut[t.type](t.node,t,e,t.value)}function lt(t,e){return{...at,...e,node:e.type===_?it(t,e.childNodeIndex):t}}const ht=(t,e)=>t[w]||e,dt={attributes:[],getTemplateScope(t,e){return function(t,e,n){if(!t||!t.length)return n;const r=t.map((t=>({...t,value:t.evaluate(e)})));return Object.assign(Object.create(n||null),R(r))}(this.attributes,t,e)},mount(t,e){const n=!!t.slots&&t.slots.find((({id:t})=>t===this.name)),{parentNode:r}=this.node,o=ht(t,e);return this.template=n&&Nt(n.html,n.bindings).createDOM(r),this.template&&(L(this.node),this.template.mount(this.node,this.getTemplateScope(t,o),o),this.template.children=Array.from(this.node.childNodes)),pt(this.node),I(this.node),this},update(t,e){if(this.template){const n=ht(t,e);this.template.update(this.getTemplateScope(t,n),n)}return this},unmount(t,e,n){return this.template&&this.template.unmount(this.getTemplateScope(t,e),null,n),this}};function pt(t){const e=t&&t.firstChild;e&&(P(e,t),pt(t))}function mt(t){return t.reduce(((t,{bindings:e})=>t.concat(e)),[])}const ft={mount(t){return this.update(t)},update(t,e){const n=this.evaluate(t);return n&&n===this.name?this.tag.update(t):(this.unmount(t,e,!0),this.name=n,this.tag=function(t,e=[],n=[]){return t?t({slots:e,attributes:n}):Nt(function(t){return t.reduce(((t,e)=>t+e.html),"")}(e),[...mt(e),{expressions:n.map((t=>({type:B,...t})))}])}(this.getComponent(n),this.slots,this.attributes),this.tag.mount(this.node,t)),this},unmount(t,e,n){return this.tag&&this.tag.unmount(n),this}},bt={1:function(t,{evaluate:e,template:n}){const r=document.createTextNode("");return P(r,t),I(t),{...Q,node:t,evaluate:e,placeholder:r,template:n.createDOM(t)}},2:function(t,{expressions:e}){return{...(n=e.map((e=>lt(t,e))),r=["mount","update","unmount"],r.reduce(((t,e)=>({...t,[e]:t=>n.map((n=>n[e](t)))&&void 0})),{}))};var n,r},0:function(t,{evaluate:e,condition:n,itemName:r,indexName:s,getKey:i,template:u}){const a=document.createTextNode(""),c=t.cloneNode();return P(a,t),I(t),{...J,childrenMap:new Map,node:t,root:c,condition:n,evaluate:e,isTemplateTag:o(c),template:u.createDOM(t),getKey:i,indexName:s,itemName:r,placeholder:a}},3:function(t,{evaluate:e,getComponent:n,slots:r,attributes:o}){return{...ft,node:t,evaluate:e,slots:r,attributes:o,getComponent:n}},4:function(t,{name:e,attributes:n}){return{...dt,attributes:n,node:t,name:e}}};function gt(t,e){return t.map((t=>t.type===_?{...t,childNodeIndex:t.childNodeIndex+e}:t))}function yt(t,e,n){const{selector:r,type:o,redundantAttribute:s,expressions:i}=e,u=r?t.querySelector(r):t;s&&u.removeAttribute(s);const a=i||[];return(bt[o]||bt[2])(u,{...e,expressions:n&&!r?gt(a,n):a})}const vt={createDOM(t){return this.dom=this.dom||function(t,e){return e&&("string"==typeof e?function(t,e){return r(t)?function(t,e){return e.ownerDocument.importNode((new window.DOMParser).parseFromString(`<svg xmlns="http://www.w3.org/2000/svg">${t}</svg>`,"application/xml").documentElement,!0)}(e,t):function(t,e){const n=o(e)?e:document.createElement("template");return n.innerHTML=t,n.content}(e,t)}(t,e):e)}(t,this.html)||document.createDocumentFragment(),this},mount(t,e,n,s={}){this.el&&this.unmount(e);const{fragment:i,children:u,avoidDOMInjection:a}=s,{parentNode:c}=u?u[0]:t,l=o(t),h=l?function(t,e,n){const r=Array.from(t.childNodes);return Math.max(r.indexOf(e),r.indexOf(n.head)+1,0)}(c,t,s):null;this.createDOM(t);const d=i||this.dom.cloneNode(!0);return this.el=l?c:t,this.children=l?u||Array.from(d.childNodes):null,!a&&d&&function(t,e){switch(!0){case r(t):!function(t,e){for(;t.firstChild;)e.appendChild(t.firstChild)}(e,t);break;case o(t):t.parentNode.replaceChild(e,t);break;default:t.appendChild(e)}}(t,d),this.bindings=this.bindingsData.map((t=>yt(this.el,t,h))),this.bindings.forEach((t=>t.mount(e,n))),this.meta=s,this},update(t,e){return this.bindings.forEach((n=>n.update(t,e))),this},unmount(t,e,n=!1){const r=this.el;if(!r)return this;switch(this.bindings.forEach((r=>r.unmount(t,e,n))),!0){case r[j]||null===n:break;case Array.isArray(this.children):!function(t){for(let e=0;e<t.length;e++)I(t[e])}(this.children);break;case!n:L(r);break;case!!n:I(r)}return this.el=null,this},clone(){return{...this,meta:{},el:null}}};function Nt(t,e=[]){return{...vt,html:t,bindingsData:e}}const Ot=(t,e)=>t[c]=e;function xt(t){return[d,p,m].reduce(((e,n)=>(e[n]=t(n),e)),{})}function Et(t){return Array.isArray(t)?t:/^\[object (HTMLCollection|NodeList|Object)\]$/.test(Object.prototype.toString.call(t))&&"number"==typeof t.length?Array.from(t):[t]}function Mt(t,e){return Et("string"==typeof t?(e||document).querySelectorAll(t):t)}const Tt=Object.freeze({$(t){return Mt(t,this.root)[0]},$$(t){return Mt(t,this.root)}}),jt=Object.freeze({[f]:z,[b]:z,[g]:z,[y]:z,[v]:z,[N]:z,[O]:z}),At=t=>1===t.length?t[0]:t;function wt(t,e,n){const r="object"==typeof e?e:{[e]:n},o=Object.keys(r);return Et(t).forEach((t=>{o.forEach((e=>t.setAttribute(e,r[e])))})),t}const St=new Map;var Ct;const Dt={CSS_BY_NAME:St,add(t,e){return St.has(t)||(St.set(t,e),this.inject()),this},inject(){return(Ct||(wt(Ct=Mt("style[riot]")[0]||document.createElement("style"),"type","text/css"),Ct.parentNode||document.head.appendChild(Ct),Ct)).innerHTML=[...St.values()].join("\n"),this},remove(t){return St.has(t)&&(St.delete(t),this.inject()),this}};function kt(t,...e){return(...n)=>(n=[...e,...n]).length<t.length?kt(t,...n):t(...n)}function Lt(t){return function(t,e,n){const r="string"==typeof e?[e]:e;return At(Et(t).map((t=>At(r.map((e=>t.getAttribute(e)))))))}(t,h)||t.tagName.toLowerCase()}function It(t,e){return{...t,...H(e)}}function Pt(t,e={}){return{...k(t),...H(e)}}function Bt(t,{slots:e,attributes:n,props:r}){return o=function(t){return[...l].reduce(((t,e)=>e(t)||t),t)}(F(i(t)?Object.create(t):t,{mount(o,s={},i){return Y(o,j,!1),this[w]=i,this[S]=function(t,e=[]){const n=e.map((e=>lt(t,e))),r={};return Object.assign(r,{expressions:n,...xt((t=>e=>(n.forEach((n=>n[t](e))),r)))})}(o,n).mount(i),Y(this,x,Object.freeze({...Pt(o,r),...R(this[S].expressions)})),this[E]=It(this[E],s),this[C]=this.template.createDOM(o).clone(),Ot(o,this),t.name&&function(t,e){Lt(t)!==e&&wt(t,h,e)}(o,t.name),Y(this,T,o),Y(this,M,e),this[b](this[x],this[E]),this[C].mount(o,this,i),this[g](this[x],this[E]),this},update(t={},e){e&&(this[w]=e,this[S].update(e));const n=R(this[S].expressions);if(!1!==this[f](n,this[x]))return Y(this,x,Object.freeze({...e?null:this[x],...n})),this[E]=It(this[E],t),this[y](this[x],this[E]),this[A]||(this[A]=!0,this[C].update(this,this[w])),this[v](this[x],this[E]),this[A]=!1,this},unmount(t){return this[N](this[x],this[E]),this[S].unmount(),this[C].unmount(this,this[w],null===t?null:!t),this[O](this[x],this[E]),this}})),Object.keys(t).filter((e=>s(t[e]))).forEach((t=>{o[t]=o[t].bind(o)})),o;var o}function _t({css:t,template:e,componentAPI:n,name:r}){return t&&r&&Dt.add(r,t),kt(Bt)(F(V(n,{...jt,[x]:{},[E]:{}}),{[M]:null,[T]:null,...Tt,name:r,css:t,template:e}))}const Ut=K($t);function $t(t){const{css:n,template:r,exports:o,name:s}=t,i=r?function(t,n,r){return t(Nt,$,e,r)}(r,0,(t=>{const e=function(t={}){return Object.entries(H(t)).reduce(((t,[e,n])=>{var r;return t[(r=e,r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())]=$t(n),t}),{})}(t.exports?t.exports.components:{});return n=>n===t.name?Ut(t):e[n]||a.get(n)})(t)):G;return({slots:t,attributes:e,props:u})=>{if(o&&o[j])return function(t,{slots:e,attributes:n,props:r,css:o,template:s}){const i=V(t({slots:e,attributes:n,props:r}),q);return xt((t=>(...e)=>{if(t===d){const[t]=e;Y(t,j,!0),Ot(t,i)}return i[t](...e),i}))}(o,{slots:t,attributes:e,props:u,css:n,template:r});const a=H(o)||{},c=_t({css:n,template:i,componentAPI:a,name:s})({slots:t,attributes:e,props:u});return{mount:(t,e,n)=>c.mount(t,n,e),update:(t,e)=>c.update(e,t),unmount:t=>c.unmount(t)}}}const zt={cssManager:Dt,DOMBindings:{template:Nt,createBinding:yt,createExpression:lt,bindingTypes:e,expressionTypes:$},globals:{DOM_COMPONENT_INSTANCE_PROPERTY:c,PARENT_KEY_SYMBOL:w}};t.__=zt,t.component=function(t){return(e,n,{slots:r,attributes:o,parentScope:s}={})=>function(...t){return t.reduce(((t,e)=>(...n)=>t(e(...n))))}((t=>t.mount(e,s)),(t=>t({props:n,slots:r,attributes:o})),$t)(t)},t.install=function(t){return s(t),l.has(t),l.add(t),l},t.mount=function(t,e,n){return Mt(t).map((t=>function(t,e,n,r){const o=n||Lt(t);return a.has(o),a.get(o)({props:e,slots:void 0}).mount(t)}(t,e,n)))},t.pure=function(t){return s(t),t[j]=!0,t},t.register=function(t,{css:e,template:n,exports:r}){return a.has(t),a.set(t,$t({name:t,css:e,template:n,exports:r})),a},t.uninstall=function(t){return l.has(t),l.delete(t),l},t.unmount=function(t,e){return Mt(t).map((t=>(t[c]&&t[c].unmount(e),t)))},t.unregister=function(t){return a.has(t),a.delete(t),Dt.remove(t),a},t.version="v9.0.0",t.withTypes=t=>t},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).riot={}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
2333564