You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
17 KiB

1 year ago
/*! For license information please see critical.js.LICENSE.txt */
(()=>{var t,e={846:(t,e,n)=>{window.riot=n(137)},323:()=>{},137:(t,e,n)=>{"use strict";n.r(e),n.d(e,{__:()=>te,component:()=>Xt,install:()=>Gt,mount:()=>Vt,pure:()=>Zt,register:()=>Yt,uninstall:()=>Wt,unmount:()=>qt,unregister:()=>Ft,version:()=>Qt,withTypes:()=>Jt});const r=new Map,o=Symbol("riot-component"),s=new Set,i="mount",u="update",a="unmount",c="shouldUpdate",l="onBeforeMount",h="onMounted",d="onBeforeUpdate",p="onUpdated",m="onBeforeUnmount",f="onUnmounted",b="props",g="state",v="slots",y="root",O=Symbol("pure"),j=Symbol("is_updating"),N=Symbol("parent"),w=Symbol("attributes"),x=Symbol("template"),M={ATTRIBUTE:0,EVENT:1,TEXT:2,VALUE:3};function E(t){return t.replace(/-(\w)/g,((t,e)=>e.toUpperCase()))}function T(t,e){throw new Error(t,{cause:e})}function A(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 S(t){return t.reduce(((t,e)=>{const{value:n,type:r}=e;switch(!0){case!e.name&&0===r:return Object.assign({},t,n);case 3===r:t.value=e.value;break;default:t[E(e.name)]=e.value}return t}),{})}function C(t,e){return typeof t===e}function k(t){const e=t.ownerSVGElement;return!!e||null===e}function D(t){return"template"===t.tagName.toLowerCase()}function P(t){return C(t,"function")}function L(t){return!_(t)&&t.constructor===Object}function _(t){return null==t}function I(){return this}function $(t){return P(t)?t.prototype&&t.prototype.constructor?new t:t():t}const B=Object.freeze({[i]:I,[u]:I,[a]:I}),U=Object.assign({},B,{clone:I,createDOM:I});function z(t){for(;t.firstChild;)t.removeChild(t.firstChild)}const H=t=>t.remove(),K=(t,e)=>e&&e.parentNode&&e.parentNode.insertBefore(t,e),R={EACH:0,IF:1,SIMPLE:2,TAG:3,SLOT:4};function Y(t,e,n,r){return void 0===r&&(r={}),Object.defineProperty(t,e,Object.assign({value:n,enumerable:!1,writable:!1,configurable:!0},r)),t}function F(t,e,n){return Object.entries(e).forEach((e=>{let[r,o]=e;Y(t,r,o,n)})),t}function V(t,e){return Object.entries(e).forEach((e=>{let[n,r]=e;t[n]||(t[n]=r)})),t}const q=Symbol(),G=Symbol();function W(t){const e=t.dom.cloneNode(!0),{head:n,tail:r}=function(){const t=document.createTextNode(""),e=document.createTextNode("");return t[q]=!0,e[G]=!0,{head:t,tail:e}}();return{avoidDOMInjection:!0,fragment:e,head:n,tail:r,children:[n,...Array.from(e.childNodes),r]}}const X=Symbol("unmount"),Z={nodes:[],mount(t,e){return this.update(t,e)},update(t,e){const{placeholder:n,nodes:r,childrenMap:o}=this,s=t===X?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,e){let{itemName:n,indexName:r,index:o,item:s}=e;Y(t,n,s),r&&Y(t,r,o);return t}(Object.create(e),{itemName:u,indexName:c,index:r,item:t}),b=a?a(f):r,g=i.get(b),v=[];if(function(t,e){return!!t&&!t(e)}(o,f))return;const y=!g,O=g?g.template:s.clone(),j=O.el||l.cloneNode(),N=h&&y?W(O):O.meta;y?p.push((()=>O.mount(j,f,n,N))):p.push((()=>O.update(f,n))),h?v.push(...N.children):v.push(j),i.delete(b),m.push(...v),d.set(b,{nodes:v,template:O,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;)K(n(e[a++],1),t)}else if(i===a)for(;u<s;)c&&c.has(t[u])||H(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;K(n(e[a++],1),n(t[u++],-1).nextSibling),K(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;)K(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 H(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: