@lipsjs/lips 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +185 -85
- package/dist/lips.js +6274 -0
- package/dist/lips.js.map +53 -0
- package/dist/lips.min.js +13 -2
- package/dist/lips.min.js.map +47 -43
- package/dist/mf2.min.js +4 -0
- package/dist/mf2.min.js.map +38 -0
- package/dist/precompile.min.js +23 -0
- package/dist/precompile.min.js.map +14 -0
- package/dist/runtime.min.js +5 -0
- package/dist/runtime.min.js.map +20 -0
- package/dist/stylis.min.js +3 -0
- package/dist/stylis.min.js.map +16 -0
- package/dist/types/events.d.ts +1 -1
- package/dist/types/i18n/engine.d.ts +14 -0
- package/dist/types/i18n/index.d.ts +122 -5
- package/dist/types/i18n/intl.d.ts +1 -0
- package/dist/types/i18n/lookup.d.ts +22 -0
- package/dist/types/ir/compiler.d.ts +226 -0
- package/dist/types/ir/expression.d.ts +149 -0
- package/dist/types/ir/facade.d.ts +138 -0
- package/dist/types/ir/host.d.ts +75 -0
- package/dist/types/ir/index.d.ts +18 -0
- package/dist/types/ir/parser.d.ts +124 -0
- package/dist/types/ir/policy.d.ts +95 -0
- package/dist/types/ir/router.d.ts +47 -0
- package/dist/types/ir/runtime.d.ts +130 -0
- package/dist/types/ir/signal.d.ts +28 -0
- package/dist/types/ir/style.d.ts +119 -0
- package/dist/types/ir/swap.d.ts +28 -0
- package/dist/types/ir/tree.d.ts +51 -0
- package/dist/types/lips.d.ts +33 -37
- package/dist/types/lynx/a11y.d.ts +61 -0
- package/dist/types/lynx/background.d.ts +71 -0
- package/dist/types/lynx/main.d.ts +46 -0
- package/dist/types/lynx/protocol.d.ts +52 -0
- package/dist/types/lynx/style.d.ts +49 -0
- package/dist/types/lynx/template.d.ts +37 -0
- package/dist/types/mf2.d.ts +14 -0
- package/dist/types/precompile.d.ts +85 -0
- package/dist/types/runtime.d.ts +16 -0
- package/dist/types/stylesheet.d.ts +21 -41
- package/dist/types/stylis.d.ts +2 -0
- package/dist/types/types.d.ts +176 -185
- package/dist/types/untrusted.d.ts +17 -0
- package/dist/untrusted.min.js +5 -0
- package/dist/untrusted.min.js.map +13 -0
- package/package.json +46 -10
- package/dist/test.component.min.js +0 -3
- package/dist/test.component.min.js.map +0 -50
- package/dist/test.stress.min.js +0 -476
- package/dist/test.stress.min.js.map +0 -50
- package/dist/types/component.d.ts +0 -107
- package/dist/types/constants.d.ts +0 -23
- package/dist/types/dws.d.ts +0 -14
- package/dist/types/iuc/index.d.ts +0 -25
- package/dist/types/iuc/tick.d.ts +0 -38
- package/dist/types/iuc.d.ts +0 -25
- package/dist/types/metrics.d.ts +0 -50
- package/dist/types/preprocess.d.ts +0 -2
- package/dist/types/signal.d.ts +0 -30
- package/dist/types/syntax/async.d.ts +0 -16
- package/dist/types/syntax/for.d.ts +0 -25
- package/dist/types/syntax/if.d.ts +0 -14
- package/dist/types/syntax/router.d.ts +0 -40
- package/dist/types/syntax/switch.d.ts +0 -16
- package/dist/types/tick.d.ts +0 -38
- package/dist/types/tps.d.ts +0 -11
- package/dist/types/uqs.d.ts +0 -37
- package/dist/types/utils.d.ts +0 -25
package/dist/test.stress.min.js
DELETED
|
@@ -1,476 +0,0 @@
|
|
|
1
|
-
var I8=Object.create;var{defineProperty:_1,getPrototypeOf:F8,getOwnPropertyNames:L8}=Object;var V8=Object.prototype.hasOwnProperty;var Z1=(J,Z,W)=>{W=J!=null?I8(F8(J)):{};const H=Z||!J||!J.__esModule?_1(W,"default",{value:J,enumerable:!0}):W;for(let q of L8(J))if(!V8.call(H,q))_1(H,q,{get:()=>J[q],enumerable:!0});return H};var C8=(J,Z)=>()=>(Z||J((Z={exports:{}}).exports,Z),Z.exports);var l0=(J,Z)=>{for(var W in Z)_1(J,W,{get:Z[W],enumerable:!0,configurable:!0,set:(H)=>Z[W]=()=>H})};var r0=C8((D5,I5)=>{(function(){var J=document,Z=window,W=J.documentElement,H=J.createElement.bind(J),q=H("div"),X=H("table"),B=H("tbody"),U=H("tr"),G=Array.isArray,w=Array.prototype,M=w.concat,O=w.filter,g=w.indexOf,d=w.map,J0=w.push,a=w.slice,q0=w.some,n=w.splice,v=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,i=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,o=/<.+>/,r=/^\w+$/;function Z0(Q,z){var Y=x(z);return!Q||!Y&&!F(z)&&!N(z)?[]:!Y&&i.test(Q)?z.getElementsByClassName(Q.slice(1).replace(/\\/g,"")):!Y&&r.test(Q)?z.getElementsByTagName(Q):z.querySelectorAll(Q)}var p=function(){function Q(z,Y){if(!z)return;if($(z))return z;var j=z;if(s(z)){var V=Y||J;if(j=v.test(z)&&F(V)?V.getElementById(z.slice(1).replace(/\\/g,"")):o.test(z)?n1(z):$(V)?V.find(z):s(V)?D(V).find(z):Z0(z,V),!j)return}else if(f(z))return this.ready(z);if(j.nodeType||j===Z)j=[j];this.length=j.length;for(var T=0,y=this.length;T<y;T++)this[T]=j[T]}return Q.prototype.init=function(z,Y){return new Q(z,Y)},Q}(),K=p.prototype,D=K.init;if(D.fn=D.prototype=K,K.length=0,K.splice=n,typeof Symbol==="function")K[Symbol.iterator]=w[Symbol.iterator];function $(Q){return Q instanceof p}function L(Q){return!!Q&&Q===Q.window}function F(Q){return!!Q&&Q.nodeType===9}function x(Q){return!!Q&&Q.nodeType===11}function N(Q){return!!Q&&Q.nodeType===1}function P(Q){return!!Q&&Q.nodeType===3}function m(Q){return typeof Q==="boolean"}function f(Q){return typeof Q==="function"}function s(Q){return typeof Q==="string"}function k(Q){return Q===void 0}function _(Q){return Q===null}function b(Q){return!isNaN(parseFloat(Q))&&isFinite(Q)}function C(Q){if(typeof Q!=="object"||Q===null)return!1;var z=Object.getPrototypeOf(Q);return z===null||z===Object.prototype}D.isWindow=L,D.isFunction=f,D.isArray=G,D.isNumeric=b,D.isPlainObject=C;function R(Q,z,Y){if(Y){var j=Q.length;while(j--)if(z.call(Q[j],j,Q[j])===!1)return Q}else if(C(Q)){var V=Object.keys(Q);for(var j=0,T=V.length;j<T;j++){var y=V[j];if(z.call(Q[y],y,Q[y])===!1)return Q}}else for(var j=0,T=Q.length;j<T;j++)if(z.call(Q[j],j,Q[j])===!1)return Q;return Q}D.each=R,K.each=function(Q){return R(this,Q)},K.empty=function(){return this.each(function(Q,z){while(z.firstChild)z.removeChild(z.firstChild)})};function I(){var Q=[];for(var z=0;z<arguments.length;z++)Q[z]=arguments[z];var Y=m(Q[0])?Q.shift():!1,j=Q.shift(),V=Q.length;if(!j)return{};if(!V)return I(Y,D,j);for(var T=0;T<V;T++){var y=Q[T];for(var l in y)if(Y&&(G(y[l])||C(y[l]))){if(!j[l]||j[l].constructor!==y[l].constructor)j[l]=new y[l].constructor;I(Y,j[l],y[l])}else j[l]=y[l]}return j}D.extend=I,K.extend=function(Q){return I(K,Q)};var A=/\S+/g;function S(Q){return s(Q)?Q.match(A)||[]:[]}K.toggleClass=function(Q,z){var Y=S(Q),j=!k(z);return this.each(function(V,T){if(!N(T))return;R(Y,function(y,l){if(j)z?T.classList.add(l):T.classList.remove(l);else T.classList.toggle(l)})})},K.addClass=function(Q){return this.toggleClass(Q,!0)},K.removeAttr=function(Q){var z=S(Q);return this.each(function(Y,j){if(!N(j))return;R(z,function(V,T){j.removeAttribute(T)})})};function E(Q,z){if(!Q)return;if(s(Q)){if(arguments.length<2){if(!this[0]||!N(this[0]))return;var Y=this[0].getAttribute(Q);return _(Y)?void 0:Y}if(k(z))return this;if(_(z))return this.removeAttr(Q);return this.each(function(V,T){if(!N(T))return;T.setAttribute(Q,z)})}for(var j in Q)this.attr(j,Q[j]);return this}K.attr=E,K.removeClass=function(Q){if(arguments.length)return this.toggleClass(Q,!1);return this.attr("class","")},K.hasClass=function(Q){return!!Q&&q0.call(this,function(z){return N(z)&&z.classList.contains(Q)})},K.get=function(Q){if(k(Q))return a.call(this);return Q=Number(Q),this[Q<0?Q+this.length:Q]},K.eq=function(Q){return D(this.get(Q))},K.first=function(){return this.eq(0)},K.last=function(){return this.eq(-1)};function h(Q){if(k(Q))return this.get().map(function(z){return N(z)||P(z)?z.textContent:""}).join("");return this.each(function(z,Y){if(!N(Y))return;Y.textContent=Q})}K.text=h;function u(Q,z,Y){if(!N(Q))return;var j=Z.getComputedStyle(Q,null);return Y?j.getPropertyValue(z)||void 0:j[z]||Q.style[z]}function c(Q,z){return parseInt(u(Q,z),10)||0}function Q0(Q,z){return c(Q,"border".concat(z?"Left":"Top","Width"))+c(Q,"padding".concat(z?"Left":"Top"))+c(Q,"padding".concat(z?"Right":"Bottom"))+c(Q,"border".concat(z?"Right":"Bottom","Width"))}var t={};function e(Q){if(t[Q])return t[Q];var z=H(Q);J.body.insertBefore(z,null);var Y=u(z,"display");return J.body.removeChild(z),t[Q]=Y!=="none"?Y:"block"}function w0(Q){return u(Q,"display")==="none"}function I0(Q,z){var Y=Q&&(Q.matches||Q.webkitMatchesSelector||Q.msMatchesSelector);return!!Y&&!!z&&Y.call(Q,z)}function S0(Q){return s(Q)?function(z,Y){return I0(Y,Q)}:f(Q)?Q:$(Q)?function(z,Y){return Q.is(Y)}:!Q?function(){return!1}:function(z,Y){return Y===Q}}K.filter=function(Q){var z=S0(Q);return D(O.call(this,function(Y,j){return z.call(Y,j,Y)}))};function A0(Q,z){return!z?Q:Q.filter(z)}K.detach=function(Q){return A0(this,Q).each(function(z,Y){if(Y.parentNode)Y.parentNode.removeChild(Y)}),this};var p5=/^\s*<(\w+)[^>]*>/,s5=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,r1={"*":q,tr:B,td:U,th:U,thead:X,tbody:X,tfoot:X};function n1(Q){if(!s(Q))return[];if(s5.test(Q))return[H(RegExp.$1)];var z=p5.test(Q)&&RegExp.$1,Y=r1[z]||r1["*"];return Y.innerHTML=Q,D(Y.childNodes).detach().get()}D.parseHTML=n1,K.has=function(Q){var z=s(Q)?function(Y,j){return Z0(Q,j).length}:function(Y,j){return j.contains(Q)};return this.filter(z)},K.not=function(Q){var z=S0(Q);return this.filter(function(Y,j){return(!s(Q)||N(j))&&!z.call(j,Y,j)})};function R0(Q,z,Y,j){var V=[],T=f(z),y=j&&S0(j);for(var l=0,F0=Q.length;l<F0;l++)if(T){var z0=z(Q[l]);if(z0.length)J0.apply(V,z0)}else{var K0=Q[l][z];while(K0!=null){if(j&&y(-1,K0))break;V.push(K0),K0=Y?K0[z]:null}}return V}function a1(Q){if(Q.multiple&&Q.options)return R0(O.call(Q.options,function(z){return z.selected&&!z.disabled&&!z.parentNode.disabled}),"value");return Q.value||""}function l5(Q){if(!arguments.length)return this[0]&&a1(this[0]);return this.each(function(z,Y){var j=Y.multiple&&Y.options;if(j||B5.test(Y.type)){var V=G(Q)?d.call(Q,String):_(Q)?[]:[String(Q)];if(j)R(Y.options,function(T,y){y.selected=V.indexOf(y.value)>=0},!0);else Y.checked=V.indexOf(Y.value)>=0}else Y.value=k(Q)||_(Q)?"":Q})}K.val=l5,K.is=function(Q){var z=S0(Q);return q0.call(this,function(Y,j){return z.call(Y,j,Y)})},D.guid=1;function C0(Q){return Q.length>1?O.call(Q,function(z,Y,j){return g.call(j,z)===Y}):Q}D.unique=C0,K.add=function(Q,z){return D(C0(this.get().concat(D(Q,z).get())))},K.children=function(Q){return A0(D(C0(R0(this,function(z){return z.children}))),Q)},K.parent=function(Q){return A0(D(C0(R0(this,"parentNode"))),Q)},K.index=function(Q){var z=Q?D(Q)[0]:this[0],Y=Q?this:D(z).parent().children();return g.call(Y,z)},K.closest=function(Q){var z=this.filter(Q);if(z.length)return z;var Y=this.parent();if(!Y.length)return z;return Y.closest(Q)},K.siblings=function(Q){return A0(D(C0(R0(this,function(z){return D(z).parent().children().not(z)}))),Q)},K.find=function(Q){return D(C0(R0(this,function(z){return Z0(Q,z)})))};var o5=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,r5=/^$|^module$|\/(java|ecma)script/i,n5=["type","src","nonce","noModule"];function a5(Q,z){var Y=D(Q);Y.filter("script").add(Y.find("script")).each(function(j,V){if(r5.test(V.type)&&W.contains(V)){var T=H("script");T.text=V.textContent.replace(o5,""),R(n5,function(y,l){if(V[l])T[l]=V[l]}),z.head.insertBefore(T,null),z.head.removeChild(T)}})}function t5(Q,z,Y,j,V){if(j)Q.insertBefore(z,Y?Q.firstChild:null);else if(Q.nodeName==="HTML")Q.parentNode.replaceChild(z,Q);else Q.parentNode.insertBefore(z,Y?Q:Q.nextSibling);if(V)a5(z,Q.ownerDocument)}function b0(Q,z,Y,j,V,T,y,l){return R(Q,function(F0,z0){R(D(z0),function(K0,h0){R(D(z),function(L0,J1){var g1=Y?h0:J1,k1=Y?J1:h0,O0=Y?K0:L0;t5(g1,!O0?k1:k1.cloneNode(!0),j,V,!O0)},l)},y)},T),z}K.after=function(){return b0(arguments,this,!1,!1,!1,!0,!0)},K.append=function(){return b0(arguments,this,!1,!1,!0)};function e5(Q){if(!arguments.length)return this[0]&&this[0].innerHTML;if(k(Q))return this;var z=/<script[\s>]/.test(Q);return this.each(function(Y,j){if(!N(j))return;if(z)D(j).empty().append(Q);else j.innerHTML=Q})}K.html=e5,K.appendTo=function(Q){return b0(arguments,this,!0,!1,!0)},K.wrapInner=function(Q){return this.each(function(z,Y){var j=D(Y),V=j.contents();V.length?V.wrapAll(Q):j.append(Q)})},K.before=function(){return b0(arguments,this,!1,!0)},K.wrapAll=function(Q){var z=D(Q),Y=z[0];while(Y.children.length)Y=Y.firstElementChild;return this.first().before(z),this.appendTo(Y)},K.wrap=function(Q){return this.each(function(z,Y){var j=D(Q)[0];D(Y).wrapAll(!z?j:j.cloneNode(!0))})},K.insertAfter=function(Q){return b0(arguments,this,!0,!1,!1,!1,!1,!0)},K.insertBefore=function(Q){return b0(arguments,this,!0,!0)},K.prepend=function(){return b0(arguments,this,!1,!0,!0,!0,!0)},K.prependTo=function(Q){return b0(arguments,this,!0,!0,!0,!1,!1,!0)},K.contents=function(){return D(C0(R0(this,function(Q){return Q.tagName==="IFRAME"?[Q.contentDocument]:Q.tagName==="TEMPLATE"?Q.content.childNodes:Q.childNodes})))},K.next=function(Q,z,Y){return A0(D(C0(R0(this,"nextElementSibling",z,Y))),Q)},K.nextAll=function(Q){return this.next(Q,!0)},K.nextUntil=function(Q,z){return this.next(z,!0,Q)},K.parents=function(Q,z){return A0(D(C0(R0(this,"parentElement",!0,z))),Q)},K.parentsUntil=function(Q,z){return this.parents(z,Q)},K.prev=function(Q,z,Y){return A0(D(C0(R0(this,"previousElementSibling",z,Y))),Q)},K.prevAll=function(Q){return this.prev(Q,!0)},K.prevUntil=function(Q,z){return this.prev(z,!0,Q)},K.map=function(Q){return D(M.apply([],d.call(this,function(z,Y){return Q.call(z,Y,z)})))},K.clone=function(){return this.map(function(Q,z){return z.cloneNode(!0)})},K.offsetParent=function(){return this.map(function(Q,z){var Y=z.offsetParent;while(Y&&u(Y,"position")==="static")Y=Y.offsetParent;return Y||W})},K.slice=function(Q,z){return D(a.call(this,Q,z))};var J8=/-([a-z])/g;function E1(Q){return Q.replace(J8,function(z,Y){return Y.toUpperCase()})}K.ready=function(Q){var z=function(){return setTimeout(Q,0,D)};if(J.readyState!=="loading")z();else J.addEventListener("DOMContentLoaded",z);return this},K.unwrap=function(){return this.parent().each(function(Q,z){if(z.tagName==="BODY")return;var Y=D(z);Y.replaceWith(Y.children())}),this},K.offset=function(){var Q=this[0];if(!Q)return;var z=Q.getBoundingClientRect();return{top:z.top+Z.pageYOffset,left:z.left+Z.pageXOffset}},K.position=function(){var Q=this[0];if(!Q)return;var z=u(Q,"position")==="fixed",Y=z?Q.getBoundingClientRect():this.offset();if(!z){var j=Q.ownerDocument,V=Q.offsetParent||j.documentElement;while((V===j.body||V===j.documentElement)&&u(V,"position")==="static")V=V.parentNode;if(V!==Q&&N(V)){var T=D(V).offset();Y.top-=T.top+c(V,"borderTopWidth"),Y.left-=T.left+c(V,"borderLeftWidth")}}return{top:Y.top-c(Q,"marginTop"),left:Y.left-c(Q,"marginLeft")}};var t1={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};K.prop=function(Q,z){if(!Q)return;if(s(Q)){if(Q=t1[Q]||Q,arguments.length<2)return this[0]&&this[0][Q];return this.each(function(j,V){V[Q]=z})}for(var Y in Q)this.prop(Y,Q[Y]);return this},K.removeProp=function(Q){return this.each(function(z,Y){delete Y[t1[Q]||Q]})};var Z8=/^--/;function T1(Q){return Z8.test(Q)}var $1={},Q8=q.style,W8=["webkit","moz","ms"];function X8(Q,z){if(z===void 0)z=T1(Q);if(z)return Q;if(!$1[Q]){var Y=E1(Q),j="".concat(Y[0].toUpperCase()).concat(Y.slice(1)),V="".concat(Y," ").concat(W8.join("".concat(j," "))).concat(j).split(" ");R(V,function(T,y){if(y in Q8)return $1[Q]=y,!1})}return $1[Q]}var H8={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function e1(Q,z,Y){if(Y===void 0)Y=T1(Q);return!Y&&!H8[Q]&&b(z)?"".concat(z,"px"):z}function q8(Q,z){if(s(Q)){var Y=T1(Q);if(Q=X8(Q,Y),arguments.length<2)return this[0]&&u(this[0],Q,Y);if(!Q)return this;return z=e1(Q,z,Y),this.each(function(V,T){if(!N(T))return;if(Y)T.style.setProperty(Q,z);else T.style[Q]=z})}for(var j in Q)this.css(j,Q[j]);return this}K.css=q8;function J5(Q,z){try{return Q(z)}catch(Y){return z}}var z8=/^\s+|\s+$/;function Z5(Q,z){var Y=Q.dataset[z]||Q.dataset[E1(z)];if(z8.test(Y))return Y;return J5(JSON.parse,Y)}function B8(Q,z,Y){Y=J5(JSON.stringify,Y),Q.dataset[E1(z)]=Y}function w8(Q,z){if(!Q){if(!this[0])return;var Y={};for(var j in this[0].dataset)Y[j]=Z5(this[0],j);return Y}if(s(Q)){if(arguments.length<2)return this[0]&&Z5(this[0],Q);if(k(z))return this;return this.each(function(V,T){B8(T,Q,z)})}for(var j in Q)this.data(j,Q[j]);return this}K.data=w8;function Q5(Q,z){var Y=Q.documentElement;return Math.max(Q.body["scroll".concat(z)],Y["scroll".concat(z)],Q.body["offset".concat(z)],Y["offset".concat(z)],Y["client".concat(z)])}R([!0,!1],function(Q,z){R(["Width","Height"],function(Y,j){var V="".concat(z?"outer":"inner").concat(j);K[V]=function(T){if(!this[0])return;if(L(this[0]))return z?this[0]["inner".concat(j)]:this[0].document.documentElement["client".concat(j)];if(F(this[0]))return Q5(this[0],j);return this[0]["".concat(z?"offset":"client").concat(j)]+(T&&z?c(this[0],"margin".concat(Y?"Top":"Left"))+c(this[0],"margin".concat(Y?"Bottom":"Right")):0)}})}),R(["Width","Height"],function(Q,z){var Y=z.toLowerCase();K[Y]=function(j){if(!this[0])return k(j)?void 0:this;if(!arguments.length){if(L(this[0]))return this[0].document.documentElement["client".concat(z)];if(F(this[0]))return Q5(this[0],z);return this[0].getBoundingClientRect()[Y]-Q0(this[0],!Q)}var V=parseInt(j,10);return this.each(function(T,y){if(!N(y))return;var l=u(y,"boxSizing");y.style[Y]=e1(Y,V+(l==="border-box"?Q0(y,!Q):0))})}});var W5="___cd";K.toggle=function(Q){return this.each(function(z,Y){if(!N(Y))return;var j=w0(Y),V=k(Q)?j:Q;if(V){if(Y.style.display=Y[W5]||"",w0(Y))Y.style.display=e(Y.tagName)}else if(!j)Y[W5]=u(Y,"display"),Y.style.display="none"})},K.hide=function(){return this.toggle(!1)},K.show=function(){return this.toggle(!0)};var X5="___ce",S1=".",A1={focus:"focusin",blur:"focusout"},H5={mouseenter:"mouseover",mouseleave:"mouseout"},G8=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function b1(Q){return H5[Q]||A1[Q]||Q}function x1(Q){var z=Q.split(S1);return[z[0],z.slice(1).sort()]}K.trigger=function(Q,z){if(s(Q)){var Y=x1(Q),j=Y[0],V=Y[1],T=b1(j);if(!T)return this;var y=G8.test(T)?"MouseEvents":"HTMLEvents";Q=J.createEvent(y),Q.initEvent(T,!0,!0),Q.namespace=V.join(S1),Q.___ot=j}Q.___td=z;var l=Q.___ot in A1;return this.each(function(F0,z0){if(l&&f(z0[Q.___ot]))z0["___i".concat(Q.type)]=!0,z0[Q.___ot](),z0["___i".concat(Q.type)]=!1;z0.dispatchEvent(Q)})};function q5(Q){return Q[X5]=Q[X5]||{}}function Y8(Q,z,Y,j,V){var T=q5(Q);T[z]=T[z]||[],T[z].push([Y,j,V]),Q.addEventListener(z,V)}function z5(Q,z){return!z||!q0.call(z,function(Y){return Q.indexOf(Y)<0})}function e0(Q,z,Y,j,V){var T=q5(Q);if(!z)for(z in T)e0(Q,z,Y,j,V);else if(T[z])T[z]=T[z].filter(function(y){var l=y[0],F0=y[1],z0=y[2];if(V&&z0.guid!==V.guid||!z5(l,Y)||j&&j!==F0)return!0;Q.removeEventListener(z,z0)})}K.off=function(Q,z,Y){var j=this;if(k(Q))this.each(function(T,y){if(!N(y)&&!F(y)&&!L(y))return;e0(y)});else if(!s(Q))for(var V in Q)this.off(V,Q[V]);else{if(f(z))Y=z,z="";R(S(Q),function(T,y){var l=x1(y),F0=l[0],z0=l[1],K0=b1(F0);j.each(function(h0,L0){if(!N(L0)&&!F(L0)&&!L(L0))return;e0(L0,K0,z0,z,Y)})})}return this},K.remove=function(Q){return A0(this,Q).detach().off(),this},K.replaceWith=function(Q){return this.before(Q).remove()},K.replaceAll=function(Q){return D(Q).replaceWith(this),this};function U8(Q,z,Y,j,V){var T=this;if(!s(Q)){for(var y in Q)this.on(y,z,Y,Q[y],V);return this}if(!s(z))if(k(z)||_(z))z="";else if(k(Y))Y=z,z="";else j=Y,Y=z,z="";if(!f(j))j=Y,Y=void 0;if(!j)return this;return R(S(Q),function(l,F0){var z0=x1(F0),K0=z0[0],h0=z0[1],L0=b1(K0),J1=K0 in H5,g1=K0 in A1;if(!L0)return;T.each(function(k1,O0){if(!N(O0)&&!F(O0)&&!L(O0))return;var h1=function(B0){if(B0.target["___i".concat(B0.type)])return B0.stopImmediatePropagation();if(B0.namespace&&!z5(h0,B0.namespace.split(S1)))return;if(!z&&(g1&&(B0.target!==O0||B0.___ot===L0)||J1&&B0.relatedTarget&&O0.contains(B0.relatedTarget)))return;var f1=O0;if(z){var v0=B0.target;while(!I0(v0,z)){if(v0===O0)return;if(v0=v0.parentNode,!v0)return}f1=v0}Object.defineProperty(B0,"currentTarget",{configurable:!0,get:function(){return f1}}),Object.defineProperty(B0,"delegateTarget",{configurable:!0,get:function(){return O0}}),Object.defineProperty(B0,"data",{configurable:!0,get:function(){return Y}});var D8=j.call(f1,B0,B0.___td);if(V)e0(O0,L0,h0,z,h1);if(D8===!1)B0.preventDefault(),B0.stopPropagation()};h1.guid=j.guid=j.guid||D.guid++,Y8(O0,L0,h0,z,h1)})}),this}K.on=U8;function K8(Q,z,Y,j){return this.on(Q,z,Y,j,!0)}K.one=K8;var O8=/\r?\n/g;function j8(Q,z){return"&".concat(encodeURIComponent(Q),"=").concat(encodeURIComponent(z.replace(O8,"\r\n")))}var M8=/file|reset|submit|button|image/i,B5=/radio|checkbox/i;if(K.serialize=function(){var Q="";return this.each(function(z,Y){R(Y.elements||[Y],function(j,V){if(V.disabled||!V.name||V.tagName==="FIELDSET"||M8.test(V.type)||B5.test(V.type)&&!V.checked)return;var T=a1(V);if(!k(T)){var y=G(T)?T:[T];R(y,function(l,F0){Q+=j8(V.name,F0)})}})}),Q.slice(1)},typeof D5!=="undefined")I5.exports=D;else Z.cash=Z.$=D})()});var x0="i18n",P0="syn:",V0="fn:",f0="on-",j0=/^\.\.\./,Q1=/^\[(.*?)\]$/,y1=/{\s*([^{}]+)\s*}/g,w5=["@html","@text","@format"],W1=["if","for","switch","async","router"],G5=["display","visibility","position","width","height"],Y5=":n",v1=":pr",U5="m",K5="c",O5="x",o0="*",g0=":xtag",k0=":dtag",j5=100;var u1=new Map;class X1{templateStore;constructor(J){this.templateStore=J}parse(J,Z){if(u1.has(J))return u1.get(J);let W=(J||"").trim().replace(/>\s*</g,"><").replace(/\s{2,}/g," ").replace(/[\r\n\t]/g,"").replace(/<([a-zA-Z0-9_-]+)([^>]*?)\s*\/>/g,"<$1$2></$1>").replace(/<\{([^}]+)\}\s*(.*?)(\/)>/g,(H,q,X)=>{return X.endsWith("<")?`<lips ${k0}="${q}" ${X}/lips>`:`<lips ${k0}="${q}" ${X}></lips>`}).replace(/(<>)([\s\S]*?)(<\/>)/g,'<lips fragment="true">$2</lips>').replace(/<if\(\s*(.*?)\s*\)>/g,'<if @by="$1">').replace(/<else-if\(\s*(.*?)\s*\)>/g,'<else-if @by="$1">').replace(/<switch\(\s*(.*?)\s*\)>/g,'<switch @by="$1">').replace(/<async await\(\s*(.*?)\s*\)>/g,`<async ${V0}await="\$1">`).replace(/<log\(\s*(.*?)\s*\)>/g,'<log @args="$1">').replace(/\[(.*?)\]/g,(H)=>H.replace(/\s+/g,""));return W=this.matchEventHandlers(W),W=this.markExpressionAttributes(W,Z),u1.set(J,W),W}isExpression(J){if(/\bstate\.|\binput\.|\bself\.|\bcontext\./.test(J))return!0;if(/[\+\*\/\%\(\)\{\}\[\]]|\?\s*:/.test(J))return!0;if(/\b[a-zA-Z_][a-zA-Z0-9_]*\.[a-zA-Z_]/.test(J))return!0;if(J.includes("{")&&J.includes("}"))return!0;return!1}matchEventHandlers(J){const Z=/on-([a-zA-Z-]+)\s*\(/g;let W=J,H;while((H=Z.exec(J))!==null){const q=H[1],X=H.index+H[0].length;let B=1,U=X;while(U<J.length&&B>0){if(J[U]==="(")B++;if(J[U]===")")B--;U++}if(B===0){const G=J.slice(X,U-1).trim(),w=J.slice(0,H.index),M=`${f0}${q}="${G}"`,O=J.slice(U);W=w+M+O,J=W,Z.lastIndex=w.length+M.length}}return W}markExpressionAttributes(J,Z){const W=[];let q=J.replace(/<([a-zA-Z][a-zA-Z0-9_-]*)((?:[^>'"]*|'[^']*'|"[^"]*")*?)(?:\/?>)/g,(X,B,U)=>{if(!W1.includes(B)&&(this.templateStore.has(B)||Z?.has(B)))U+=` ${g0}="${B}"`;return W.push(U),`<${B}##TAG_ATTRS_${W.length-1}##>`});for(let X=0;X<W.length;X++){const B=`##TAG_ATTRS_${X}##`,U=W[X],G=this.processAttributes(U);q=q.replace(B,G)}return q}processAttributes(J){let Z="",W=0,H=!1,q="",X=0,B=0,U=0;while(W<J.length){const G=J[W];if((G==='"'||G==="'")&&(W===0||J[W-1]!=="\\")){if(!H)H=!0,q=G;else if(G===q)H=!1}if(!H){if(G==="(")B++;else if(G===")")B--;else if(G==="{")U++;else if(G==="}")U--}if(!H&&B===0&&U===0&&(G===" "||W===J.length-1)){let w=W;if(W===J.length-1)w=W+1;const M=J.substring(X,w).trim();if(M){const O=this.processAttribute(M);Z+=" "+O}X=W+1}W++}return Z}processAttribute(J){const Z=J.indexOf("=");if(Z===-1){if(J===x0||J.startsWith("...")||J.startsWith("["))return J;return`:${J}="${!J.startsWith("!")}"`}let W=J.substring(0,Z).trim(),H=J.substring(Z+1).trim();if(W.startsWith("@"))return W=!w5.includes(W)?W.slice(1):W,`:${W}=${H}`;if(W.startsWith(":")||W.startsWith(V0)||W.startsWith(f0))return J;if(H.startsWith('"')&&H.endsWith('"')||H.startsWith("'")&&H.endsWith("'")){const q=H.substring(1,H.length-1);if(this.isExpression(q))return`:${W}="${q}"`;return J}else return`:${W}="${H}"`}}class H1{pendingComponents=new Set;isPending=!1;callbacks=new Map;register(J,Z){this.callbacks.set(J,Z)}unregister(J){this.callbacks.delete(J)}queue(J){if(!this.callbacks.has(J))return;if(this.pendingComponents.add(J),!this.isPending)this.isPending=!0,this.schedule()}schedule(){Promise.resolve().then(()=>this.process())}process(){const J=Array.from(this.pendingComponents);this.pendingComponents.clear(),this.isPending=!1,J.forEach((Z)=>{try{const W=this.callbacks.get(Z);if(W)W()}catch(W){console.error(`Error updating component ${Z}:`,W)}})}clear(){this.pendingComponents.clear(),this.isPending=!1}dispose(){this.pendingComponents.clear(),this.callbacks.clear(),this.isPending=!1}}class q1{subscriptions=new Map;tick=new H1;register(J,Z){this.subscriptions.set(J,Z),this.tick.register(J,Z)}unregister(J){this.subscriptions.delete(J),this.tick.unregister(J)}queueUpdate(J){this.tick.queue(J)}dispose(){this.subscriptions.clear(),this.tick.dispose()}prepareForPotentialUnload(){this.tick.clear(),this.subscriptions.forEach((J,Z)=>{this.subscriptions.set(Z,()=>{})})}proxyState(J,Z){const W=this,H=new WeakMap,q=(B)=>{if(typeof B.toJSON==="function")return B;if(B instanceof Map)B.forEach((G,w)=>B.set(w,X(G)));else if(Array.isArray(B))B.forEach((G,w)=>B[w]=X(G));else if(typeof B==="object")Object.entries(B).forEach(([G,w])=>B[G]=X(w));let U=new Proxy(B,{get(G,w){if(w==="toJSON")return function(){const O=(g)=>{if(!g||typeof g!=="object")return g;if(H.has(g)){const d=H.get(g);if(d instanceof Map){const a={};return d.forEach((q0,n)=>a[typeof n==="object"?JSON.stringify(n):String(n)]=O(q0)),a}if(Array.isArray(d))return d.map((a)=>O(a));const J0={};return Object.entries(d).forEach(([a,q0])=>J0[a]=O(q0)),J0}if(typeof g.toJSON==="function"&&!H.has(g))return g.toJSON();return g};return O(U)};if(w==="reset")return function(){U=null};const M=G[w];if(B instanceof Map&&typeof M==="function")return function(...O){const g=w.toString();if(g==="set"&&O.length>=2)O[1]=X(O[1]);const d=M.apply(G,O);return["set","delete","clear"].includes(g)&&W.queueUpdate(J),d};if(Array.isArray(B)&&typeof M==="function")return function(...O){const g=w.toString();if(["push","unshift"].includes(g))O=O.map((J0)=>X(J0));else if(g==="splice"&&O.length>2)O=[O[0],O[1],...O.slice(2).map((J0)=>X(J0))];const d=M.apply(G,O);return["push","pop","shift","unshift","splice","sort","reverse","fill"].includes(g)&&W.queueUpdate(J),d};return M},set(G,w,M){if(G[w]===M)return!0;if(M instanceof Map&&G[w]instanceof Map){const O=G[w];return O.clear(),M.forEach((g,d)=>O.set(d,X(g))),W.queueUpdate(J),!0}return G[w]=X(M),W.queueUpdate(J),!0}});return H.set(U,B),U},X=(B)=>{if(!B)return B;return B instanceof Map||Array.isArray(B)||typeof B==="object"?q(B):B};return q(Z)}}class z1{domObserver;observedComponents=new Map;TIMEOUT=1e4;constructor(){this.domObserver=new MutationObserver(()=>{this.observedComponents.forEach((J,Z)=>{try{const W=Z.node;if(!W){this.unwatch(Z);return}if(J.type==="attach"&&document.contains(W[0]))this.unwatch(Z),Z.emit("component:attached"),typeof Z.onAttach=="function"&&Z.onAttach.bind(Z)();else if(J.type==="detach"&&!document.contains(W[0]))this.unwatch(Z),Z.emit("component:detached"),typeof Z.onDetach=="function"&&Z.onDetach.bind(Z)()}catch(W){console.log("DWS error --",W)}}),!this.observedComponents.size&&this.domObserver.disconnect()})}watch(J,Z="attach"){const W=J.node;if(!W)return;if(Z==="attach"&&document.contains(W[0])){J.emit("component:attached"),typeof J.onAttach=="function"&&J.onAttach.bind(J)();return}if(Z==="detach"&&!document.contains(W[0])){J.emit("component:detached"),typeof J.onDetach=="function"&&J.onDetach.bind(J)();return}this.unwatch(J);const H=setTimeout(()=>{this.unwatch(J),J.emit(`component:${Z}ment-timeout`)},this.TIMEOUT);this.observedComponents.set(J,{timeout:H,type:Z}),this.observedComponents.size===1&&this.domObserver.observe(document.body,{childList:!0,subtree:!0}),Z==="attach"&&J.once("component:attached",()=>this.watch(J,"detach"))}unwatch(J){const Z=this.observedComponents.get(J);if(Z)clearTimeout(Z.timeout),this.observedComponents.delete(J);!this.observedComponents.size&&this.domObserver.disconnect()}dispose(){this.domObserver.disconnect(),this.observedComponents.forEach((J)=>clearTimeout(J.timeout)),this.observedComponents.clear()}}var B1=function(J,Z){if(!Z)return J;return J.replace(/{(\w+)}/g,(W,H)=>{return Z[H]!==void 0?Z[H].toString():`{${H}}`})},M5=(J,Z,W,H,q)=>{switch(J){case"plural":{if(typeof W==="string"){console.warn("Plural format value cannot be a string");return}if(H.count===void 0){console.warn("Plural format requires <count> parameter or use * by default.");let U=W["*"];if(typeof U==="object")U=U[q||"*"];return B1(U,H)}if(typeof H.count==="string")H.count=Number(H.count);let X="*";if(H.count.toString()in W)X=H.count.toString();let B=W[X]||W["*"];if(typeof B==="object")B=B[q||"*"];return B1(B,H)}case"condition":{if(typeof W==="string"){console.warn("Condition format value cannot be a string");return}let X;for(let B in W)try{if(new Function("params",`with( params ){ return ${B}; }`)(H||{})){X=W[B];break}}catch(U){console.warn(`Invalid <${Z}(${B})> condition expression`)}if(X===void 0)return;if(typeof X==="object")X=X[q||"*"];return B1(X,H)}case"variable":default:{const X=typeof W==="object"?W[q||"*"]:W;if(typeof X==="object"){console.warn(`Invalid <${Z}> variable variant definition`);return}return B1(X,H)}}};class w1{currentLang=window.navigator.language;DICTIONARIES={};set lang(J){if(this.currentLang===J)return;this.currentLang=J}get lang(){return this.currentLang}setDictionary(J,Z){this.DICTIONARIES[J]=Z}translate(J,Z){if(Z&&this.currentLang===Z)return{text:J,lang:this.currentLang};Z=Z||this.currentLang;const[W,H]=Z.split("-");if(this.DICTIONARIES[W]&&J in this.DICTIONARIES[W]){if(typeof this.DICTIONARIES[W][J]==="object"){const q=this.DICTIONARIES[W][J];J=q[H||"*"]||q["*"]}else if(typeof this.DICTIONARIES[W][J]==="string")J=this.DICTIONARIES[W][J]}return{text:J,lang:Z}}format(J,Z,W){W=W||this.currentLang;const[H,q]=W.split("-");if(!this.DICTIONARIES[H]){console.warn(`Undefined <${W}> format dictionary`);return}if(!this.DICTIONARIES[H][J]){console.warn(`Undefined <${W}[${J}]> format reference`);return}const X=this.DICTIONARIES[H][J];if(typeof X==="string"){console.warn(`Invalid <${W}[${J}]> format reference. Expected object`);return}if(typeof X!=="object"||X===null||Array.isArray(X)){console.warn(`Invalid <${W}[${J}]> format value`);return}return M5(X.type,J,X.value,Z,q)}}var y5=Z1(r0(),1);var G1="comm",Y1="rule",U1="decl";var F5="@import";var L5="@namespace",V5="@keyframes";var C5="@layer";function K1(J){return J.trim()}function u0(J,Z,W){return J.replace(Z,W)}function N5(J,Z,W){return J.indexOf(Z,W)}function E0(J,Z){return J.charCodeAt(Z)|0}function T0(J,Z,W){return J.slice(Z,W)}function Y0(J){return J.length}function O1(J){return J.length}function m0(J,Z){return Z.push(J),J}var m1=Math.abs,n0=String.fromCharCode;function M1(J,Z,W,H,q,X,B,U){return{value:J,root:Z,parent:W,type:H,props:q,children:X,line:j1,column:d0,length:B,return:"",siblings:U}}function P5(){return H0}function E5(){if(H0=M0>0?E0(c0,--M0):0,d0--,H0===10)d0=1,j1--;return H0}function D0(){if(H0=M0<R5?E0(c0,M0++):0,d0++,H0===10)d0=1,j1++;return H0}function $0(){return E0(c0,M0)}function a0(){return M0}function D1(J,Z){return T0(c0,J,Z)}function i0(J){switch(J){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function T5(J){return j1=d0=1,R5=Y0(c0=J),M0=0,[]}function $5(J){return c0="",J}function I1(J){return K1(D1(M0-1,d1(J===91?J+2:J===40?J+1:J)))}function S5(J){while(H0=$0())if(H0<33)D0();else break;return i0(J)>2||i0(H0)>3?"":" "}function A5(J,Z){while(--Z&&D0())if(H0<48||H0>102||H0>57&&H0<65||H0>70&&H0<97)break;return D1(J,a0()+(Z<6&&$0()==32&&D0()==32))}function d1(J){while(D0())switch(H0){case J:return M0;case 34:case 39:if(J!==34&&J!==39)d1(H0);break;case 40:if(J===41)d1(J);break;case 92:D0();break}return M0}function b5(J,Z){while(D0())if(J+H0===57)break;else if(J+H0===84&&$0()===47)break;return"/*"+D1(Z,M0-1)+"*"+n0(J===47?J:D0())}function x5(J){while(!i0($0()))D0();return D1(J,M0)}var j1=1,d0=1,R5=0,M0=0,H0=0,c0="";function h5(J){return $5(F1("",null,null,null,[""],J=T5(J),0,[0],J))}function F1(J,Z,W,H,q,X,B,U,G){var w=0,M=0,O=B,g=0,d=0,J0=0,a=1,q0=1,n=1,v=0,i="",o=q,r=X,Z0=H,p=i;while(q0)switch(J0=v,v=D0()){case 40:if(J0!=108&&E0(p,O-1)==58){if(N5(p+=u0(I1(v),"&","&\f"),"&\f",m1(w?U[w-1]:0))!=-1)n=-1;break}case 34:case 39:case 91:p+=I1(v);break;case 9:case 10:case 13:case 32:p+=S5(J0);break;case 92:p+=A5(a0()-1,7);continue;case 47:switch($0()){case 42:case 47:if(m0(R8(b5(D0(),a0()),Z,W,G),G),(i0(J0||1)==5||i0($0()||1)==5)&&Y0(p)&&T0(p,-1,void 0)!==" ")p+=" ";break;default:p+="/"}break;case 123*a:U[w++]=Y0(p)*n;case 125*a:case 59:case 0:switch(v){case 0:case 125:q0=0;case 59+M:if(n==-1)p=u0(p,/\f/g,"");if(d>0&&(Y0(p)-O||a===0&&J0===47))m0(d>32?k5(p+";",H,W,O-1,G):k5(u0(p," ","")+";",H,W,O-2,G),G);break;case 59:p+=";";default:if(m0(Z0=g5(p,Z,W,w,M,q,U,i,o=[],r=[],O,X),X),v===123)if(M===0)F1(p,Z,Z0,Z0,o,X,O,U,r);else{switch(g){case 99:if(E0(p,3)===110)break;case 108:if(E0(p,2)===97)break;default:M=0;case 100:case 109:case 115:}if(M)F1(J,Z0,Z0,H&&m0(g5(J,Z0,Z0,0,0,q,U,i,q,o=[],O,r),r),q,r,O,U,H?o:r);else F1(p,Z0,Z0,Z0,[""],r,0,U,r)}}w=M=d=0,a=n=1,i=p="",O=B;break;case 58:O=1+Y0(p),d=J0;default:if(a<1){if(v==123)--a;else if(v==125&&a++==0&&E5()==125)continue}switch(p+=n0(v),v*a){case 38:n=M>0?1:(p+="\f",-1);break;case 44:U[w++]=(Y0(p)-1)*n,n=1;break;case 64:if($0()===45)p+=I1(D0());g=$0(),M=O=Y0(i=p+=x5(a0())),v++;break;case 45:if(J0===45&&Y0(p)==2)a=0}}return X}function g5(J,Z,W,H,q,X,B,U,G,w,M,O){var g=q-1,d=q===0?X:[""],J0=O1(d);for(var a=0,q0=0,n=0;a<H;++a)for(var v=0,i=T0(J,g+1,g=m1(q0=B[a])),o=J;v<J0;++v)if(o=K1(q0>0?d[v]+" "+i:u0(i,/&\f/g,d[v])))G[n++]=o;return M1(J,Z,W,q===0?Y1:U,G,w,M,O)}function R8(J,Z,W,H){return M1(J,Z,W,G1,n0(P5()),T0(J,2,-2),0,H)}function k5(J,Z,W,H,q){return M1(J,Z,W,U1,T0(J,0,H),T0(J,H+1,-1),H,q)}function L1(J,Z){var W="";for(var H=0;H<J.length;H++)W+=Z(J[H],H,J,Z)||"";return W}function f5(J,Z,W,H){switch(J.type){case C5:if(J.children.length)break;case F5:case L5:case U1:return J.return=J.return||J.value;case G1:return"";case V5:return J.return=J.value+"{"+L1(J.children,H)+"}";case Y1:if(!Y0(J.value=J.props.join(",")))return""}return Y0(W=L1(J.children,H))?J.return=J.value+"{"+W+"}":""}function _5(J){var Z=O1(J);return function(W,H,q,X){var B="";for(var U=0;U<Z;U++)B+=J[U](W,H,q,X)||"";return B}}class p0{nsp;settings;$head;constructor(J,Z){if(typeof J!=="string")throw new Error("Undefined or invalid styles attachement element(s) namespace");this.nsp=J,this.$head=y5.default("head"),this.settings=Z||{},this.settings&&this.load(this.settings)}compile(J){try{return L1(h5(J),_5([f5]))}catch(Z){throw new Error(`Style compilation failed: ${Z.message}`)}}waitForStyles(J){return new Promise((Z)=>{const W=new MutationObserver(()=>{const H=document.querySelector(J);if(H&&getComputedStyle(H).cssText)W.disconnect(),Z()});W.observe(document.documentElement,{attributes:!0,childList:!0,subtree:!0})})}async inject(J){if(!J)throw new Error("Invalid injection arguments");const Z=`rel="${this.settings.meta?"@":""}${this.nsp}"`;J=this.settings.meta?J:`[rel="${this.nsp}"] { ${J} }`;try{const W=this.compile(J);if(!W)throw new Error(`<component:${this.nsp}> sheet compilation failed`);const H=document.createElement("style");H.setAttribute("rel",`${this.settings.meta?"@":""}${this.nsp}`),H.textContent=W;let q=0;const X=this.$head.find(`style[${Z}]`);if(X.length)q=parseInt(X.attr("dindex"))+1,X.remove();return H.setAttribute("dindex",String(q)),this.settings.meta?document.head.prepend(H):document.head.appendChild(H),H}catch(W){throw new Error(`Style injection failed: ${W.message}`)}}async load(J){if(this.settings=J,typeof this.settings!=="object")throw new Error("Undefined styles settings");if(this.settings.sheet){const Z=await this.inject(this.settings.sheet);await this.waitForStyles(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`)}}get(){}async clear(){const J=this.$head.find(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`);if(!J.length)return;const Z=parseInt(J.attr("dindex"));Z===0?J.remove():J.attr("dindex",String(Z-1))}async custom(){return{}}async style(){return{}}}class V1{pending=new Map;isPending=!1;component;metrics={batchCount:0,updatesProcessed:0,lastBatchSize:0,avgBatchSize:"0.00"};constructor(J){this.component=J}queue(J){const Z=J.priority??2;if(!this.pending.has(Z))this.pending.set(Z,new Set);if(this.pending.get(Z)?.add(J),this.component.metrics.inc("dependencyUpdateCount"),!this.isPending)this.isPending=!0,this.scheduleProcessing()}apply({dep:J,deppath:Z},W="batch-updator"){try{const H=this.component.FGUD.get(J)?.get(Z);if(!H){console.warn(`[batch update]: <${Z}> dependency not found`);return}if(H.garbage){this.component.FGUD.get(J)?.delete(Z),!this.component.FGUD.get(J)?.size&&this.component.FGUD.delete(J);return}const q=this.component.FGUDMemory.get(H.nodepath);if(!q)return;const X=H.update(q.memo||{},W);if(X){if(typeof X.memo==="object")q.memo=X.memo;typeof X.cleanup==="function"&&X.cleanup()}}catch(H){console.error("Failed to update dependency --",H)}}scheduleProcessing(){Promise.resolve().then(()=>this.processQueue())}processQueue(){const J=new Map;this.pending.forEach((H,q)=>J.set(q,new Set(H))),this.pending.clear(),this.isPending=!1;const Z=(H)=>{const q=Array.from(H);this.component.metrics.trackBatch(q.length),this.metrics.batchCount++,this.metrics.lastBatchSize=q.length,this.metrics.updatesProcessed+=q.length,this.metrics.avgBatchSize=(this.metrics.updatesProcessed/this.metrics.batchCount).toFixed(2),q.forEach((X)=>this.apply(X))},W=Array.from(J.keys()).sort((H,q)=>H-q);for(let H of W){const q=J.get(H);q&&q.size&&Z(q)}if(this.pending.size>0&&!this.isPending)this.isPending=!0,this.scheduleProcessing()}getMetrics(){return{batchCount:this.metrics.batchCount,lastBatchSize:this.metrics.lastBatchSize,avgBatchSize:this.metrics.avgBatchSize,totalUpdates:this.metrics.updatesProcessed}}}class C1{options={emit:!0};__events={};__once_events={};constructor(J){if(J)this.options=J}on(J,Z){if(!Array.isArray(this.__events[J]))this.__events[J]=[];return this.__events[J].push(Z),this}once(J,Z){if(!Array.isArray(this.__once_events[J]))this.__once_events[J]=[];return this.__once_events[J].push(Z),this}off(J){return delete this.__events[J],delete this.__once_events[J],this}emit(J,...Z){if(!this.options.emit)return;const W=(q)=>{if(typeof q.toJSON==="function")return q.toJSON();if(Array.isArray(q))return q.map(W);if(typeof q==="object")for(let X in q)q[X]=W(q[X]);return q},H=Z.map(W);this.__events[J]?.forEach((q)=>q(...H)),this.__once_events[J]?.forEach((q)=>q(...H)),delete this.__once_events[J]}}var i1=Z1(r0(),1);function G0(J,Z){if(J===Z)return!1;if(typeof J!=="object"||typeof Z!=="object")return!1;if(J===null||Z===null)return!0;if(J instanceof Set){if(!(Z instanceof Set))return!0;if(J.size!==Z.size)return!0;if(v5(J)&&v5(Z)){for(let B of J)if(!Z.has(B))return!0;return!1}const X=new WeakMap;for(let B of J){let U=!1;if(typeof B!=="object"){if(Z.has(B))U=!0}else for(let G of Z){if(typeof G!=="object")continue;if(!X.has(B))X.set(B,new WeakMap);const w=X.get(B);if(w.has(G)){if(U=w.get(G),U)break;continue}const M=!G0(B,G);if(w.set(G,M),M){U=!0;break}}if(!U)return!0}return!1}if(J instanceof Map){if(!(Z instanceof Map))return!0;if(J.size!==Z.size)return!0;if(u5(J)&&u5(Z)){for(let[B,U]of J)if(Z.get(B)!==U)return!0;return!1}const X=new WeakMap;for(let[B,U]of J){if(typeof B!=="object"){if(!Z.has(B))return!0;const M=Z.get(B);if(typeof U!=="object"){if(U!==M)return!0;continue}if(typeof M!=="object"||G0(U,M))return!0;continue}let G=!1,w=!1;for(let[M,O]of Z){if(typeof M!=="object")continue;if(!X.has(B))X.set(B,new WeakMap);const g=X.get(B);if(g.has(M)){const[d,J0]=g.get(M);if(d){G=!0,w=J0;break}continue}if(!G0(B,M)){if(G=!0,w=typeof U==="object"&&typeof O==="object"?!G0(U,O):U===O,g.set(M,[!0,w]),w)break}else g.set(M,[!1,!1])}if(!G||!w)return!0}return!1}if(Array.isArray(J)){if(!Array.isArray(Z))return!0;if(J.length!==Z.length)return!0;for(let X=0;X<J.length;X++){const B=J[X],U=Z[X];if(B!==U&&(typeof B!=="object"||G0(B,U)))return!0}return!1}const W=Object.keys(J),H=Object.keys(Z);if(W.length!==H.length)return!0;W.sort(),H.sort();const q=W.length;for(let X=0;X<q;X++)if(W[X]!==H[X])return!0;for(let X=0;X<q;X++){const B=W[X],U=J[B],G=Z[B];if(U===G)continue;if(U instanceof Date){if(!(G instanceof Date)||String(U)!==String(G))return!0;continue}if(U instanceof RegExp){if(!(G instanceof RegExp)||U.source!==G.source||U.flags!==G.flags)return!0;continue}if(U instanceof Map){if(!(G instanceof Map)||G0(U,G))return!0;continue}if(U instanceof Set){if(!(G instanceof Set)||G0(U,G))return!0;continue}if(U instanceof Function){if(!(G instanceof Function))return!0;continue}if(typeof U==="object"){if(typeof G!=="object")return!0;if(U===J){if(G!==Z)return!0}else if(G0(U,G))return!0}else return!0}return!1}function U0(J,Z){if(J===Z)return!0;if(J==null||Z==null)return J===Z;const W=typeof J;if(W!==typeof Z)return!1;if(W!=="object"){if(W==="number"&&isNaN(J)&&isNaN(Z))return!0;return!1}if(J instanceof Date)return Z instanceof Date&&J.getTime()===Z.getTime();if(J instanceof RegExp)return Z instanceof RegExp&&J.source===Z.source&&J.flags===Z.flags;if(J instanceof Error)return Z instanceof Error&&J.name===Z.name&&J.message===Z.message&&(J.stack===Z.stack||!J.stack&&!Z.stack);if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView(J)){if(!ArrayBuffer.isView(Z))return!1;if(J.byteLength!==Z.byteLength)return!1;const U=new Uint8Array(J.buffer,J.byteOffset,J.byteLength),G=new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);for(let w=0;w<U.length;w++)if(U[w]!==G[w])return!1;return!0}if(J instanceof Promise||J instanceof WeakMap||J instanceof WeakSet)return J===Z;if(typeof J==="function"){if(typeof Z!=="function")return!1;return J.toString()===Z.toString()&&J.name===Z.name}if(J.constructor!==Z.constructor)return!1;if(J instanceof Map||J instanceof Set||Array.isArray(J)||Object.getPrototypeOf(J)===Object.prototype)return!G0(J,Z);const q=Object.getPrototypeOf(J);if(q!==Object.getPrototypeOf(Z))return!1;const X=Object.getOwnPropertyNames(J),B=Object.getOwnPropertyNames(Z);if(X.length!==B.length)return!1;for(let U of X){if(!Object.prototype.hasOwnProperty.call(Z,U))return!1;if(!U0(J[U],Z[U]))return!1}if(q!==null&&q!==Object.prototype){const U=Object.getOwnPropertyNames(q),G=Object.getOwnPropertyNames(Object.getPrototypeOf(Z));if(U.length!==G.length)return!1;for(let w of U){if(w==="constructor")continue;if(!U0(q[w],Object.getPrototypeOf(Z)[w]))return!1}}return!0}function v5(J){for(let Z of J)if(typeof Z==="object"&&Z!==null)return!1;return!0}function u5(J){for(let[Z,W]of J)if(typeof Z==="object"&&Z!==null||typeof W==="object"&&W!==null)return!1;return!0}function X0(J,Z=new WeakMap){if(J===null||typeof J!=="object"||J instanceof Promise)return J;if(Z.has(J))return Z.get(J);if(J instanceof Date)return new Date(J.getTime());if(J instanceof RegExp)return new RegExp(J.source,J.flags);if(J instanceof Map){const q=new Map;return Z.set(J,q),J.forEach((X,B)=>q.set(X0(B,Z),X0(X,Z))),q}if(J instanceof Set){const q=new Set;return Z.set(J,q),J.forEach((X)=>q.add(X0(X,Z))),q}if(Array.isArray(J)){const q=[];Z.set(J,q);for(let X=0;X<J.length;X++)q[X]=X0(J[X],Z);return q}if(ArrayBuffer.isView(J))return new J.constructor(J);const W=Object.create(Object.getPrototypeOf(J));Z.set(J,W);const H=Object.getOwnPropertySymbols(J);for(let q of H)W[q]=X0(J[q],Z);for(let q in J)if(Object.prototype.hasOwnProperty.call(J,q))W[q]=X0(J[q],Z);return W}function m5(J,Z){if(!J||typeof J!=="object")throw new TypeError("Original argument must be an object");if(!Z||typeof Z!=="object")throw new TypeError("ToSet argument must be an object");if(!Object.keys(Z).length)return{...J};function W(q,X,B){const U=X.split(/\.|\[|\]/).filter(Boolean);let G=q;for(let w=0;w<U.length;w++){const M=U[w],O=!isNaN(Number(M)),g=w===U.length-1,d=!isNaN(Number(U[w+1]));if(g){G[M]=B;continue}if(!(M in G))G[M]=d?[]:{};else if(d&&!Array.isArray(G[M]))G[M]=[];else if(!d&&Array.isArray(G[M]))G[M]={};G=G[M]}}const H=X0(J);try{for(let[q,X]of Object.entries(Z)){if(typeof q!=="string")throw new TypeError(`Invalid path: ${q}`);if(!/^[a-zA-Z0-9_\-\[\].]+$/.test(q))throw new Error(`Invalid path format: ${q}`);W(H,q,X)}}catch(q){throw new Error(`Failed to assign value: ${q.message}`)}return H}function N1(J){return JSON.parse(JSON.stringify(J))}i1.default.fn.extend({attrs:function(){const J={},Z=this[0];return Z&&Z.nodeType!==Node.TEXT_NODE&&i1.default.each(Z.attributes,function(){J[this.name]=this.value}),J}});class R1{debug;initialStats={renderCount:0,elementCount:0,renderTime:0,avgRenderTime:0,maxRenderTime:0,componentCount:0,componentUpdateCount:0,partialCount:0,partialUpdateCount:0,memoryUsage:void 0,domOperations:0,domInsertsCount:0,domUpdatesCount:0,domRemovalsCount:0,i18nTrackCount:0,i18nUpdateCount:0,dependencyTrackCount:0,dependencyUpdateCount:0,batchSize:0,batchCount:0,errorCount:0};stats=this.reset();renderStartTime=0;renderTimes=[];measurementCount=0;maxMeasurements=100;loggingInterval=10;autoSaveInterval;constructor(J=!1){if(this.debug=J,this.debug)this.autoSaveInterval=window.setInterval(()=>this.storeMetrics(),5000)}storeMetrics(){try{const J=JSON.parse(localStorage.getItem("lipsPerformanceMetrics")||"[]");J.push({timestamp:Date.now(),metrics:{...this.stats}}),J.length>100&&J.shift(),localStorage.setItem("lipsPerformanceMetrics",JSON.stringify(J))}catch(J){}}startRender(){if(!this.debug)return;this.renderStartTime=performance.now()}endRender(){if(!this.debug||this.renderStartTime===0)return;const J=performance.now()-this.renderStartTime;this.stats.renderTime=J,this.stats.maxRenderTime=Math.max(this.stats.maxRenderTime,J),this.renderTimes.push(J),this.renderTimes.length>this.maxMeasurements&&this.renderTimes.shift(),this.stats.avgRenderTime=this.renderTimes.reduce((Z,W)=>Z+W,0)/this.renderTimes.length,this.renderStartTime=0,this.measurementCount++}inc(J){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]++}dec(J){if(!this.debug)return;if(typeof this.stats[J]==="number"&&this.stats[J]>0)this.stats[J]--}record(J,Z){if(!this.debug)return;if(typeof this.stats[J]!=="undefined")this.stats[J]=Z}add(J,Z){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]+=Z}reset(){return this.renderTimes=[],this.measurementCount=0,this.stats=X0(this.initialStats)}log(){if(!this.debug)return;if(this.loggingInterval>1&&this.measurementCount%this.loggingInterval!==0)return;const J={"Render Count":this.stats.renderCount,"Element Count":this.stats.elementCount,"Avg Render Time (ms)":this.stats.avgRenderTime.toFixed(2),"Max Render Time (ms)":this.stats.maxRenderTime.toFixed(2)},Z={"Component Count":this.stats.componentCount,"Component Updates":this.stats.componentUpdateCount},W={"Partial Count":this.stats.partialCount,"Partial Updates":this.stats.partialUpdateCount},H={"DOM Operations":this.stats.domOperations,"DOM Inserts":this.stats.domInsertsCount,"DOM Updates":this.stats.domUpdatesCount,"DOM Removals":this.stats.domRemovalsCount},q={"i18n Tracked":this.stats.i18nTrackCount,"i18n Updates":this.stats.i18nUpdateCount},X={"Dependencies Tracked":this.stats.dependencyTrackCount,"Dependency Updates":this.stats.dependencyUpdateCount},B={"Batch Count":this.stats.batchCount,"Avg Batch Size":this.stats.batchCount>0?(this.stats.batchSize/this.stats.batchCount).toFixed(2):"0"};console.group("Lips Framework Performance Metrics"),console.table(J),console.table(Z),console.table(W),console.table(H),console.table(q),console.table(X),console.table(B),this.stats.memoryUsage&&console.log(`Memory Usage: ${this.stats.memoryUsage.toFixed(2)} MB`),this.stats.errorCount>0&&console.warn(`Errors encountered: ${this.stats.errorCount}`),console.groupEnd(),window.localStorage&&this.measurementCount%10===0&&this.storeMetrics()}trackMemory(){if(!this.debug||!window.performance?.memory)return;this.stats.memoryUsage=window.performance.memory.usedJSHeapSize/1048576}trackBatch(J){if(!this.debug)return;this.stats.batchCount++,this.stats.batchSize+=J}trackError(J){if(!this.debug)return;this.stats.errorCount++,console.error("Lips Framework Error:",J)}setLoggingInterval(J){if(!this.debug)return;this.loggingInterval=J}getSnapshot(){return X0(this.stats)}dispose(){if(!this.debug)return;this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}}var W0=Z1(r0(),1);var P8=function(J,Z){if(J.isDisposed)return;Z.add(J),J.dependencies.add(Z)},i5=function(J){for(let Z of J.dependencies)Z.delete(J);J.dependencies.clear()};function _0(J,Z={maxSize:100}){const W=new Set,H=[{value:J,timestamp:Date.now()}];let q=0;const X=()=>{const w=P1[P1.length-1];return w&&P8(w,W),H[q].value},B=()=>{const w=[...W];if(d5)for(let M of w)d5.add(M);else for(let M of w)M.execute()};return[X,(w,M)=>{if(Object.is(H[q].value,w))return;if(q<H.length-1)H.splice(q+1);if(H.push({value:w,timestamp:Date.now(),metadata:M}),H.length>Z.maxSize)H.shift(),q=Math.max(0,q-1);else q++;B()},{undo(){if(q>0)q--,B()},redo(){if(q<H.length-1)q++,B()},jumpTo(w){if(w>=0&&w<H.length&&w!==q)q=w,B()},getHistory(){return[...H]},getCurrentIndex(){return q},canUndo(){return q>0},canRedo(){return q<H.length-1},clear(){const w=H[0];H.length=0,H.push(w),q=0,B()}}]}function t0(J){let Z=!1;const W=()=>{if(Z)throw new Error("Circular dependency detected");if(H.isDisposed)return;Z=!0,i5(H),P1.push(H);try{J()}finally{Z=!1,P1.pop()}},H={execute:W,dependencies:new Set,isDisposed:!1};return W(),{dispose:()=>{H.isDisposed=!0,i5(H)}}}var P1=[],d5=null;class y0 extends C1{declaration;$=null;input;state;static;context;__name__;__path__;__lang__;__template__;__previous;__macros=new Map;__i18nDeps=new Map;FGUD=new Map;FGUDMemory=new Map;PCC=new Map;VER=[];prepath="0";debug=!1;isRendered=!1;__setInput;__setState;__getState;UQS;ICE;lips;metrics;stylesheet;__inpath__="";__inpathCounter__=0;__renderDepth__=0;__boundaries__;constructor(J,Z,{input:W,state:H,context:q,_static:X,handler:B,stylesheet:U,macros:G,declaration:w},M){super();if(this.lips=M.lips,M?.debug)this.debug=M.debug||this.lips.debug;if(M?.prepath)this.prepath=M.prepath;if(this.__name__=J,this.__lang__=this.lips.i18n.lang,this.__path__=this.__inpath__=`${this.prepath}:${this.__name__}`,this.__boundaries__=M.boundaries,this.declaration=w||{name:J},this.input=W||{},this.static=X||{},this.context={},this.state=this.lips.IUC.proxyState(this.__path__,H||{}),G&&this.setMacros(G),B&&this.setHandler(B),U&&this.setStylesheet(U),this.__template__=this.lips.preprocessor.parse(Z,this.__macros),this.metrics=new R1(this.debug),this.metrics.inc("componentCount"),this.UQS=new V1(this),typeof this.onCreate=="function"&&this.onCreate.bind(this)(),this.emit("component:create"),this.input&&Object.keys(this.input).length&&typeof this.onInput=="function")this.onInput.bind(this)(),this.emit("component:input");this.__previous={state:X0(this.state),input:X0(this.input),context:X0(this.context)};const[O,g]=_0(this.input),[d,J0]=_0(this.state),[a,q0]=_0(this.context);this.__setInput=g,this.__setState=J0,this.__getState=d,this.lips.IUC.register(this.__path__,()=>{G0(this.__previous?.state,this.state)&&this.__setState({...this.__getState(),...this.state})}),Array.isArray(q)&&q.length&&this.lips.useContext(q,(n)=>{if(!G0(this.context,n))return;q0(n),this.context=n,typeof this.onContext=="function"&&this.onContext.bind(this)(),this.emit("component:context")}),this.lips.useTranslator("*",(n)=>{if(n===this.__lang__)return;this.__updateI18nDepNodes__(),this.__lang__=n}),this.ICE=t0(()=>{const n=d(),v=this.input=O(),i=this.context=a();if(!this.isRendered){if(this.metrics.reset(),!this.__template__.length||w?.syntax&&typeof this.onSelfRender=="function"){const o=this.onSelfRender.bind(this)(this.input);if(!this.__boundaries__?.start||!this.__boundaries__?.end)throw new Error(`Undefined <${this.__name__} syntax component boundaries`);this.$=o||W0.default()}else{const{$log:o}=this.render("",void 0,void 0,this.FGUD);this.$=o}!w?.syntax&&this.$?.each((o,r)=>{typeof r.setAttribute=="function"&&r.setAttribute("rel",this.__name__)}),this.isRendered=!0,typeof this.onMount=="function"&&this.onMount.bind(this)(),this.emit("component:mount"),this.lips.watcher.watch(this)}else this.__updateDepNodes__(),typeof this.onUpdate=="function"&&this.onUpdate.bind(this)(),this.emit("component:update"),this.__previous={input:X0(v),state:X0(n),context:X0(i)};typeof this.onRender=="function"&&this.onRender.bind(this)(),this.emit("component:render")})}setContext(J,Z){this.lips.setContext(J,Z)}setInput(J,Z){if(!G0(this.input,J))return;this.__setInput(J),typeof this.onInput=="function"&&this.onInput.bind(this)(this.declaration.syntax?Z:void 0)}subInput(J,Z){if(typeof J!=="object")throw new Error("Invalid sub input data argument");return this.setInput(m5(this.input,J),this.declaration.syntax?Z:void 0),this}setMacros(J){const Z=this.lips.preprocessor.parse(J),W=W0.default(Z);if(!W.length)return;const H=this;W.each(function(){const q=W0.default(this),{argv:X,attrs:B}=H.__getAttributes__(q);if(!Object.keys(B))throw new Error("Invalid macro component definition");if(!B.literals.name)throw new Error("Undefined macro `name` attribute.");if(H.__macros.get(B.literals.name))console.warn(`Duplicate macro <${B.literals.name}> will be override`);if(!q.contents()?.length)throw new Error("Invalid macro component definition. Template content expected.");H.__macros.set(B.literals.name,{argv:X,$node:q})})}setHandler(J){Object.entries(J).map(([Z,W])=>this[Z]=W?.bind(this))}setStylesheet(J){const Z={sheet:J,meta:this.__name__==="__ROOT__"};this.stylesheet=new p0(this.__name__,Z)}get node(){if(!this.isRendered)throw new Error("node() is expected to be call after component get rendered");return this.$}get boundaries(){return this.__boundaries__}render(J,Z,W={},H,q){if(Z&&!Z.length)return console.warn("Undefined node element to render"),{$log:Z,dependencies:H||new Map};const X=this,B=H||new Map,U=[];this.metrics.startRender();let G=W0.default();function w(){return X0(W)}function M(K,D=!1){const $=O(K,D);return X.__inpathCounter__++,X.__inpath__?`${X.__inpath__}/${$}`:`${J?J+"/":""}${$}`}function O(K,D=!1){let $="";switch(K){case"component":$=D?O5:K5;break;case"macro":$=U5;break}return $+X.__inpathCounter__}function g(K){return K===null||typeof K==="object"&&typeof K.mesh==="function"&&typeof K.fill==="function"&&typeof K.update==="function"&&typeof K.cleanup==="function"}function d(K){return K!==null&&typeof K==="object"&&typeof K.default&&typeof K.default==="string"}function J0(K){const D=K.attr(":args"),$=M("log");if(!D)return;const L=w();if(X.__evaluate__(`console.log(${D})`,L),X.__isReactive__(D,L))X.__extractExpressionDeps__(D,L).forEach((x)=>X.__trackDep__(B,x,L,{nodetype:"log",nodepath:$,target:"argument",$fragment:null,update:(N)=>X.__evaluate__(`console.log(${D})`,N),syntax:!0}))}function a(K){const D=M("var"),{attrs:$}=X.__getAttributes__(K);if(!$)return;Object.entries($.literals).forEach(([L,F])=>{if(W[L]&&W[L].type==="const")throw new Error(`Cannot override <const ${L}=[value]/> variable`);W[L]={value:F,type:"let"}}),Object.entries($.expressions).forEach(([L,F])=>{if(W[L]&&W[L].type==="const")throw new Error(`Cannot override <const ${L}=[value]/> variable`);if(W[L]={value:X.__evaluate__(F,W),type:"let"},X.__isReactive__(F,W)){const x=X.__extractExpressionDeps__(F,W),N=(P,m)=>{if(P[L]&&P[L].type==="const")throw new Error(`Cannot override <const ${L}=[value]/> variable`);if($.map.beforeSpreadAttrs.includes(L))return;const f=X.__evaluate__(F,P);if(U0(P[L].value,f))return;return P[L]={value:f,type:"let"},X.__updateVarDepNodes__(L,D,P),N1({memo:P})};x.forEach((P)=>X.__trackDep__(B,P,w(),{nodetype:"let",nodepath:D,deppath:`${D}.${L}`,target:"attr",$fragment:null,update:N,syntax:!0}))}}),X.metrics.inc("elementCount")}function q0(K){const{attrs:D}=X.__getAttributes__(K);if(!D)return;Object.entries(D.literals).forEach(([$,L])=>{if(W[$]&&W[$].type==="const")throw new Error(`<const ${$}=[value]/> variable already defined`);if(!L)return;W[$]={value:L,type:"const"}}),Object.entries(D.expressions).forEach(([$,L])=>{if(W[$]&&W[$].type==="const")throw new Error(`<const ${$}=[value]/> variable already defined`);if(!L)return;W[$]={value:X.__evaluate__(L,W),type:"const"}}),X.metrics.inc("elementCount")}function n(K,D,$){const{attrs:L}=X.__getAttributes__(K),F=M("element"),x=X.__getBoundaries__(F),N={};let P=w(),m=W0.default(x.start),f;const s=(k)=>{const _={},b={};return L.literals&&Object.entries(L.literals).forEach(([C,R])=>{b[C]=R,_[C]={type:"arg",value:R}}),L.expressions&&Object.entries(L.expressions).forEach(([C,R])=>{if(!f)return;if(j0.test(C))X.__evaluateSpreadAttr__(C,{memo:k,get keystore(){return N[C]},set keystore(I){if(!N[C])N[C]=[];N[C]=I},each:(I,A)=>{if(b[I]=A,!f?.argv.includes(I))return;_[I]={type:"arg",value:A}}});else{const I=R?X.__evaluate__(R,k):!0;if(b[C]=I,!f.argv.includes(C))return;_[C]={type:"arg",value:I}}}),L.expressions&&Object.entries(L.expressions).forEach(([C,R])=>{if(!f)return;if(j0.test(C)&&X.__isReactive__(C,k)){const I=X.__extractExpressionDeps__(C,k),A=(S,E)=>{if(!f)return;const h={};let u=[];if(X.__evaluateSpreadAttr__(C,{memo:S,get keystore(){return N[C]},set keystore(c){if(!N[C])N[C]=[];N[C]=c},each:(c,Q0)=>{if(L.map.afterSpreadAttrs.includes(c))return;if(!f?.argv.includes(c))return;if(U0(Q0,S[c]?.value))return;_[c]=h[c]={value:Q0,type:"arg"},b[c]=Q0,u.push(c)},nullify:(c)=>{c.forEach((Q0)=>{h[Q0]={value:void 0,type:"arg"},delete b[Q0]}),u=c}}),u.length)f.argv.length&&X.__updateArgumentsDepNodes__(F,b),f.update(u,h,S,x)};I.forEach((S)=>X.__trackDep__(B,S,k,{nodetype:"dynamic",nodepath:F,deppath:`${F}.${C}`,target:"spread-attr",$fragment:null,boundaries:x,update:A}))}else if(f.argv.includes(C)&&X.__isReactive__(R,k)){const I=X.__extractExpressionDeps__(R,k),A=(S,E)=>{if(!f)return;if(L.map.beforeSpreadAttrs.includes(C))return;const h=R?X.__evaluate__(R,S):!0,u={type:"arg",value:h};if(_[C]=u,f.argv.length)b[C]=h,X.__updateArgumentsDepNodes__(F,b);f.update([C],{[C]:u},S,x)};I.forEach((S)=>X.__trackDep__(B,S,k,{nodetype:"dynamic",nodepath:F,deppath:`${F}.${C}`,target:"attr",$fragment:null,boundaries:x,update:A}))}}),{argvalues:_,__arguments__:b}};if(g($)){f=$;const{argvalues:k,__arguments__:_}=s(P);P.__arguments__=_;const b=f.mesh(k);if(b&&b.length)m=m.add(b)}else if(typeof $==="string")if(X.__macros.has($))m=m.add(i(K,$));else if(X.lips.has($))m=m.add(v(K,{name:$}));else m=m.add(o(K,$));if(X.__isReactive__(D,P)){const k=(b,C)=>{const R=X.__evaluate__(D,b);let I;if(f)f.cleanup(x),f=null;else X.__emptyBoundaries__(x,F);if(g(R)){f=R;const{argvalues:A,__arguments__:S}=s(b);f.argv.length&&X.__updateArgumentsDepNodes__(F,S),I=f.mesh(A,b),I?.length&&f.fill(I,x)}else if(d(R))I=v(K,{template:R},b),X.__fillBoundaries__(I,x);else if(typeof R==="string"&&X.__macros.has(R))I=i(K,R,b),X.__fillBoundaries__(I,x);else if(typeof R==="string"&&X.lips.has(R))I=v(K,{name:R},b),X.__fillBoundaries__(I,x);else if(typeof R==="string")I=o(K,R,b),X.__fillBoundaries__(I,x)};X.__extractExpressionDeps__(D,P).forEach((b)=>X.__trackDep__(B,b,P,{nodetype:"dynamic",nodepath:F,deppath:`${F}.dtag`,target:"dtag",$fragment:null,boundaries:x,update:k}))}return m=m.add(x.end),m}function v(K,D,$){let L,F;if(D?.template)L=D.template,F=O("component",L.declaration?.syntax);else{if(F=D?.name||K.attr(g0)||K.prop("tagName")?.toLowerCase(),!F)throw new Error("Invalid component");if(F===X.__name__)throw new Error("Render component within itself is forbidden");L=X.lips.import(F)}if(!L||!F)throw new Error(`<${F}> template not found`);const x=M("component",L.declaration?.syntax),N=`${x}#${F}`,P=X.__getBoundaries__(x),{argv:m,functions:f,attrs:s,events:k}=X.__getAttributes__(K),_={},b={};let C={},R=W0.default(P.start),I=X.PCC.get(N),A=$||w();s.literals&&Object.entries(s.literals).forEach(([E,h])=>{if(E=="key")return;C[E]=h}),f&&Object.entries(f).forEach(([E,h])=>{C[E]=X.__evaluateFunction__(h,[],A),L.declaration?.syntax?_[P0+V0+E]=h:_[V0+E]=h}),s.expressions&&Object.entries(s.expressions).forEach(([E,h])=>{if(E=="key")return;if(j0.test(E))X.__evaluateSpreadAttr__(E,{memo:A,get keystore(){return b[E]},set keystore(u){if(!b[E])b[E]=[];b[E]=u},each:(u,c)=>C[u]=c});else C[E]=h?X.__evaluate__(h,A):!0;L.declaration?.syntax?_[P0+E]=h:_[E]=h});const S=K.contents();if(S.length){if(C={...C,...X.__meshwire__({$node:K,fragmentPath:x,fragmentBoundaries:P,meshPath:null,scope:A,argv:m,xmlns:q,useAttributes:!0,declaration:L.declaration},_)},L.declaration){if(L.declaration.tags){let E;Object.entries(L.declaration?.tags).forEach(([h,{type:u,many:c,alts:Q0}])=>{switch(u){case"nexted":{let t=K.next(h);if(!t.length&&Array.isArray(Q0)&&E?.length&&E.is(Q0.join(",")))t=E.next(h);if(!t.length)return;if(c){C[h]=[];let e=0,w0=!1;while(!w0){if(C[h].push(X.__meshwire__({$node:t,meshPath:`${h}[${e}]`,fragmentPath:x,fragmentBoundaries:P,scope:A,argv:m,xmlns:q,useAttributes:!0,declaration:L.declaration},_)),!t.next(h).length){w0=!0;break}t=E=t.next(h),e++}}else C[h]=X.__meshwire__({$node:t,meshPath:h,fragmentPath:x,fragmentBoundaries:P,scope:A,argv:m,xmlns:q,useAttributes:!0,declaration:L.declaration},_)}break;case"child":{const t=K.children(h);if(c)C[h]=[],t.each(function(e){const w0=W0.default(this),{argv:I0}=X.__getAttributes__(w0);C[h].push(X.__meshwire__({$node:w0,meshPath:`${h}[${e}]`,fragmentPath:x,fragmentBoundaries:P,scope:A,argv:I0,xmlns:q,useAttributes:!0,declaration:L.declaration},_))});else if(K.children(h).first().length){const e=K.children(h).first(),{argv:w0}=X.__getAttributes__(e);C[h]=X.__meshwire__({$node:e,meshPath:h,fragmentPath:x,fragmentBoundaries:P,scope:A,argv:w0,xmlns:q,useAttributes:!0,declaration:L.declaration},_)}}break}})}else if(L.declaration.contents)C.__contents__=S}}if(I)I.setInput(X0(C)),R=R.add(I.node);else{const{declaration:E,state:h,_static:u,handler:c,context:Q0,default:t,stylesheet:e}=L;I=new y0(F,t||"",{state:X0(h),input:X0(C),context:Q0,_static:X0(u),handler:c,stylesheet:e,declaration:E},{debug:X.debug,lips:X.lips,prepath:x,boundaries:P}),R=R.add(I.node),!L.declaration?.syntax&&X.PCC.set(N,I)}return R=R.add(P.end),Object.entries(k).forEach(([E,h])=>{X.__attachEvent__({nodepath:x,element:I,_event:E,instruction:h,scope:A,get __dependencies__(){return B}})}),_&&Object.entries(_).forEach(([E,h])=>{let u=!1,c=!1;if(E.startsWith(P0))u=!0,E=E.replace(P0,"");if(E.startsWith(V0))c=!0,E=E.replace(V0,"");if(j0.test(E)){if(X.__isReactive__(E,A)){const Q0=(e)=>{const w0={};X.__evaluateSpreadAttr__(E,{memo:e,get keystore(){return b[E]},set keystore(I0){if(!b[E])b[E]=[];b[E]=I0},each:(I0,S0)=>{if(s.map.afterSpreadAttrs.includes(I0))return;w0[I0]=S0},nullify:(I0)=>I0.forEach((S0)=>w0[S0]=void 0)}),I?.subInput(w0,e)};X.__extractExpressionDeps__(E,A).forEach((e)=>X.__trackDep__(B,e,A,{nodetype:"component",nodepath:x,deppath:`${x}.${E}`,target:"spread-attr",$fragment:null,boundaries:P,update:Q0,syntax:u}))}}else if(X.__isReactive__(h,A)){const Q0=(e)=>{if(s.map.beforeSpreadAttrs.includes(E))return;const w0=c?X.__evaluateFunction__(h,[],e):h?X.__evaluate__(h,e):!0;I?.subInput({[E]:w0},e)};X.__extractExpressionDeps__(h,A).forEach((e)=>X.__trackDep__(B,e,A,{nodetype:"component",nodepath:x,deppath:`${x}.${E}`,target:"attr",$fragment:null,boundaries:P,update:Q0,syntax:u}))}}),X.metrics.inc("componentCount"),R}function i(K,D,$){if(D=D||K.attr(g0),!D)throw new Error("Invalid macro rendering call");const L=X.__macros.get(D);if(!L)throw new Error("Macro component not found");const F=M("macro"),x=X.__getBoundaries__(F),{attrs:N}=X.__getAttributes__(K),P={},m=$||w(),f={},s={};N.literals&&Object.entries(N.literals).forEach(([I,A])=>{f[I]=A,s[I]={value:A,type:"arg"}});const k={};N.expressions&&Object.entries(N.expressions).forEach(([I,A])=>{if(j0.test(I))X.__evaluateSpreadAttr__(I,{memo:m,get keystore(){return k[I]},set keystore(S){if(!k[I])k[I]=[];k[I]=S},each:(S,E)=>{if(f[S]=E,L.argv.includes(S))s[S]={value:E,type:"arg"}}}),P[I]=A;else{const S=A?X.__evaluate__(A,m):!0;if(f[I]=S,L.argv.includes(I))s[I]={value:S,type:"arg"},P[I]=A}L.argv.forEach((S)=>{if(s[S]!==void 0)return;s[S]={value:!1,type:"arg"}})}),s.__arguments__=f;let _=W0.default(x.start);const b={$node:L.$node,meshPath:null,fragmentPath:F,fragmentBoundaries:x,argv:L.argv,scope:m,xmlns:q,useAttributes:!0},C=X.__meshwire__(b,P),R=C.renderer.mesh(s,m);return _=_.add(R),P&&Object.entries(P).forEach(([I,A])=>{let S=!1;if(new RegExp(`^${P0}`).test(I))S=!0,I=I.replace(P0,"");if(j0.test(I)){if(!X.__isReactive__(I,m))return;const E=X.__extractExpressionDeps__(I,m),h=(u)=>{const c={};let Q0=[];if(X.__evaluateSpreadAttr__(I,{memo:u,get keystore(){return k[I]},set keystore(t){if(!k[I])k[I]=[];k[I]=t},each:(t,e)=>{if(N.map.afterSpreadAttrs.includes(t))return;if(U0(e,u[t]?.value))return;c[t]={value:e,type:"arg"},f[t]=e,Q0.push(t)},nullify:(t)=>{t.forEach((e)=>{c[e]={value:void 0,type:"arg"},delete f[e]}),Q0=t}}),Q0.length)X.__updateArgumentsDepNodes__(F,f),C.renderer.update(Q0,c,u);return N1({memo:{...u,...c}})};E.forEach((u)=>X.__trackDep__(B,u,{...m,...s},{nodetype:"macro",nodepath:F,deppath:`${F}.${I}`,target:"spread-attr",$fragment:null,boundaries:x,update:h,syntax:S}))}else if(X.__isReactive__(A,m)){const E=X.__extractExpressionDeps__(A,m),h=(u)=>{if(N.map.beforeSpreadAttrs.includes(I))return;const c=A?X.__evaluate__(A,u):!0;return f[I]=c,X.__updateArgumentsDepNodes__(F,f),C.renderer.update([I],{[I]:{value:c,type:"arg"}},u),N1({memo:u})};E.forEach((u)=>X.__trackDep__(B,u,{...m,...s},{nodetype:"macro",nodepath:F,deppath:`${F}.${I}`,target:"attr",$fragment:null,boundaries:x,update:h,syntax:S}))}}),_=_.add(x.end),X.metrics.inc("elementCount"),_}function o(K,D,$){if(!K.length||!K.prop("tagName")&&!D)return K;D=D||K.prop("tagName").toLowerCase();const L=K.is("svg")||q,F=L?W0.default(document.createElementNS("http://www.w3.org/2000/svg",D)):W0.default(`<${D}/>`),x=K.contents(),N=M("element"),P=$||w();x.length&&F.append(X.__withPath__(N,()=>X.render(N+Y5,x,P,B,L).$log));const{attrs:m,events:f}=X.__getAttributes__(K);m.literals&&Object.entries(m.literals).forEach(([k,_])=>{if(k===x0)return;const b=K.is(`[${x0}]`)&&["title","placeholder"].includes(k);F.attr(k,b?X.lips.i18n.translate(_).text:_);const C=(R)=>{F.attr(k,b?X.lips.i18n.translate(_).text:_),b&&X.__trackTranslationDep__(R,{nodetype:"element",nodepath:N,deppath:`${N}.${k}`,target:"attr",$fragment:F,update:C})};b&&X.__trackTranslationDep__(P,{nodetype:"element",nodepath:N,deppath:`${N}.${k}`,target:"attr",$fragment:F,update:C})});const s=(k,_=!1)=>{k&&Object.entries(k).forEach(([b,C])=>{switch(b){case"@html":{const R=(I)=>{F.html(X.__evaluate__(C,I))};if(R(P),_&&X.__isReactive__(C,P))X.__extractExpressionDeps__(C,P).forEach((A)=>X.__trackDep__(B,A,P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:R}))}break;case"@text":{const R=K.is(`[${x0}]`),I=(A)=>{F.text(X.__evaluate__(C,A,{translate:R})),R&&X.__trackTranslationDep__(A,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:I})};if(I(P),_&&X.__isReactive__(C,P))X.__extractExpressionDeps__(C,P).forEach((S)=>X.__trackDep__(B,S,P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:I}));R&&X.__trackTranslationDep__(P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:I})}break;case"@format":{const[R,I]=C.split(",").map((S)=>S.trim());if(!R)throw new Error("Invalid @format reference");if(!I)throw new Error("Invalid @format parameters");const A=(S)=>{const E=X.__evaluate__(`!${I.trim()}`,S);if(typeof E!=="object")throw new Error("Invalid @format parameters");const h=X.lips.i18n.format(R,E);h!==void 0&&F.text(h),X.__trackTranslationDep__(S,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:A})};A(P),X.__extractExpressionDeps__(I,P).forEach((S)=>X.__trackDep__(B,S,P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"meta-attr",$fragment:F,update:A}))}break;case"style":if(_&&X.__isReactive__(C,P)){const R=(A)=>{const S=X.__evaluate__(C,A);if(typeof S==="object"){let E="";Object.entries(S).forEach(([h,u])=>E+=`${h}:${u};`),E.length&&F.attr("style",E)}else F.attr("style",S)};R(P),X.__extractExpressionDeps__(C,P).forEach((A)=>X.__trackDep__(B,A,P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"attr",$fragment:F,update:R}))}else F.attr("style",C);break;default:{const R=K.is(`[${x0}]`)&&["title","placeholder"].includes(b),I=(A)=>{const S=C&&X.__isReactive__(C,P)?X.__evaluate__(C,A,{translate:R}):C!==void 0?C:!0;if(S===void 0||S===!1)F.removeAttr(b);else F.attr(b,S),R&&X.__trackTranslationDep__(A,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"attr",$fragment:F,update:I})};if(I(P),_&&X.__isReactive__(C,P))X.__extractExpressionDeps__(C,P).forEach((S)=>X.__trackDep__(B,S,P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"attr",$fragment:F,update:I}));R&&X.__trackTranslationDep__(P,{nodetype:"element",nodepath:N,deppath:`${N}.${b}`,target:"attr",$fragment:F,update:I})}}})};return m.expressions&&Object.keys(m.expressions).forEach((k)=>{if(!j0.test(k))return;let _=[];const b=(C,R,I=!1)=>{const A={};X.__evaluateSpreadAttr__(k,{memo:C,get keystore(){return _},set keystore(S){_=S},each:(S,E)=>{if(!I&&m.map.afterSpreadAttrs.includes(S))return;A[S]=E},nullify:(S)=>S.forEach((E)=>F.removeAttr(E))}),Object.keys(A).length&&s(A)};if(delete m.expressions[k],b(P,"",!0),k&&X.__isReactive__(k,P))X.__extractExpressionDeps__(k,P).forEach((R)=>X.__trackDep__(B,R,P,{nodetype:"element",nodepath:N,deppath:`${N}.${k}`,target:"spread-attr",$fragment:F,update:b}))}),s(m.expressions,!0),f&&Object.entries(f).forEach(([k,_])=>{U.push({nodepath:N,element:F,_event:k,instruction:_,scope:P,get __dependencies__(){return B}})}),X.metrics.inc("elementCount"),X.metrics.inc("domInsertsCount"),F}function r(K){const D=K.text(),$=w(),L=M("element"),F=K.parent().is(`[${x0}]`),x=W0.default(document.createTextNode(X.__interpolate__(D,$,F))),N=(P)=>{const m=X.__interpolate__(D,P,F);if(!x[0])return;x[0].textContent=m,F&&X.__trackTranslationDep__(P,{nodetype:"text",nodepath:L,target:"value",$fragment:x,update:N})};if(D&&X.__isReactive__(D,$))X.__extractTextDeps__(D,$).forEach((m)=>X.__trackDep__(B,m,$,{nodetype:"text",nodepath:L,deppath:`${L}.${m}`,target:"value",$fragment:x,update:N}));return F&&X.__trackTranslationDep__($,{nodetype:"text",nodepath:L,target:"value",$fragment:x,update:N}),X.metrics.inc("elementCount"),X.metrics.inc("domInsertsCount"),x}function Z0(K){if(!K.attr(k0)||K.prop("tagName")!=="LIPS")throw new Error("Invalid dynamic tag name");const D=K.attr(k0),$=X.__evaluate__(D,W);if(d($))return v(K,{template:$});else return n(K,D,$)}function p(K){if(K.get(0)?.nodeType===Node.COMMENT_NODE)return K;if(K.get(0)?.nodeType===Node.TEXT_NODE)return r(K);if(K.is("let"))return a(K);else if(K.is("const"))return q0(K);else if(K.is("lips")&&K.attr(k0))return Z0(K);else if(K.is("log"))return J0(K);else if(X.__macros.has(K.attr(g0)))return i(K);else if(K.is(W1.join(","))||X.lips.has(K.attr(g0)))return v(K);else if(K.is("else-if, else"))return;return o(K)}try{this.__renderDepth__++,Z=!Z&&W0.default(this.__template__).length>1?W0.default("<template>").html(this.__template__).contents():Z||W0.default(this.__template__),Z.each(function(){const K=p(W0.default(this));if(K)G=G.add(K)}),U.forEach(this.__attachEvent__.bind(this)),X.metrics.inc("renderCount")}catch(K){console.error("Rendering Failed --",K),X.metrics.trackError(K)}finally{if(this.__renderDepth__--,this.metrics.endRender(),this.metrics.trackMemory(),this.__renderDepth__===0)this.__inpath__="",this.__inpathCounter__=0}return{$log:G,dependencies:B,events:U}}destroy(){this.ICE.dispose(),this.stylesheet?.clear(),this.metrics.dispose(),this.lips.IUC.unregister(this.__path__),this.lips.watcher.unwatch(this),this.VER.forEach(this.__detachEvent__.bind(this)),this.VER=[];for(let J in this.PCC){const Z=this.PCC.get(J);Z?.destroy(),Z?.delete(J)}if(this.$?.remove(),this.PCC?.clear(),this.FGUD?.clear(),this.FGUDMemory?.clear(),this.__macros.clear(),this.__i18nDeps.clear(),this.__previous=null,this.state=null,this.input=null,this.context=null,this.$)this.$.each((J,Z)=>{W0.default(Z).off()}),this.$=null;typeof this.onDestroy==="function"&&this.onDestroy.bind(this)(),this.emit("component:destroy")}__meshwire__(J,Z){const W=this,{$node:H,meshPath:q,fragmentPath:X,fragmentBoundaries:B,argv:U,xmlns:G,declaration:w,useAttributes:M}=J;let O;const g=new Map,d=X+v1,J0=(v,i,o)=>{if(O=H.contents(),!O?.length)return null;i=i||J.scope;const r=d+(o||""),{$log:Z0,dependencies:p,events:K}=W.__withPath__(r,()=>{return W.render(r,O,{...i,...v},void 0,G)}),D=o||o0;return!g.has(D)&&g.set(D,new Set),g.get(D)?.add(r),p?.forEach(($,L)=>{!W.FGUD?.has(L)&&W.FGUD.set(L,new Map),$.forEach((F,x)=>{if(F.garbage)return;F.partial?.length?F.partial.push(r):F.partial=[r],W.FGUD.get(L)?.set(x,F)})}),W.metrics.inc("partialCount"),Z0},a=(v,i,o,r,Z0)=>{if(!g.get(Z0||o0)?.size)return;o=o||J.scope,r=r||B,W.metrics.startRender();const p=Array.from(g.get(Z0||o0)||[]);v.forEach((K)=>{const D=W.FGUD.get(K);if(!D)return;D.forEach(($)=>{const L=p.find((N)=>{return $.partial?.find((P)=>N==P||W.__hasSamePathParent__(P,N))});if(!$.partial||!L)return;const F=$.deppath||$.nodepath,x=this.FGUDMemory.get($.nodepath);if($.garbage||r?.start&&!document.contains(r.start)){D.delete(F),W.__unbindMemo__($);return}if(!x){console.warn(`unexpected occurence: <${F}> has no memo`);return}if(x.memo?.[K]&&i?.[K]&&!U0(x.memo[K],i[K]))x.memo={...o,...x.memo,...i};W.UQS.queue({dep:K,deppath:F,priority:$.priority}),W.metrics.inc("dependencyUpdateCount")}),!D.size&&W.FGUD.delete(K)}),W.metrics.inc("partialUpdateCount"),W.metrics.endRender()},q0=(v,i)=>{if(g.delete(typeof i==="string"&&i||o0),v=v||B,W.__emptyBoundaries__(v,d+(i||"")),i)v.start.remove(),v.end.remove()},n={renderer:{path:q,argv:U,mesh:J0,update:a,cleanup:q0,fill(v,i){W.__fillBoundaries__(v,i||B)},demarcate(v,i){const o=W.__getBoundaries__(d+(i||""));let r=W0.default(o.start);return r=r.add(v),r=r.add(o.end),{$partial:r,boundaries:o}}}};if(M&&q){const{attrs:v}=W.__getAttributes__(H);v.literals&&Object.entries(v.literals).forEach(([i,o])=>n[i]=o),v.expressions&&Object.entries(v.expressions).forEach(([i,o])=>{if(j0.test(i)){let r=[];W.__evaluateSpreadAttr__(i,{memo:J.scope,get keystore(){return r},set keystore(Z0){r=Z0},each:(Z0,p)=>n[Z0]=p}),Z[`${w?.syntax?P0:""}${q}.${i}`]=o}else n[i]=o?W.__evaluate__(o,J.scope):!0,Z[`${w?.syntax?P0:""}${q}.${i}`]=o})}return n}__getBoundaries__(J){return this.metrics.inc("domOperations"),this.metrics.inc("domInsertsCount"),{start:document.createComment(`s:${J}`),end:document.createComment(`e:${J}`)}}__emptyBoundaries__(J,Z){this.FGUD.forEach((q,X)=>{q.forEach((B,U)=>{if(!this.__hasSamePathParent__(U,Z))return;this.__unbindMemo__(B),B.garbage=!0}),!q.size&&this.FGUD.delete(X)});const W=[];let H=J.start.nextSibling;while(H&&H!==J.end)W.push(H),H=H.nextSibling;W0.default(W).remove()}__fillBoundaries__(J,Z){if(!document.contains(Z.start)||!document.contains(Z.end)){console.warn("Dynamic element boundaries not found");return}J.length&&W0.default(Z.start).after(J)}__getAttributes__(J){const Z=J.attrs(),W={},H={},q={literals:{},expressions:{},map:{explicitAttrs:[],spreadAttrs:[],beforeSpreadAttrs:[],afterSpreadAttrs:[],metaAttrs:[]}},X=Object.keys(Z).find((G)=>j0.test(G));let B=[],U=!1;return Z&&Object.entries(Z).forEach(([G,w])=>{if([g0,k0].includes(G))return;if(G.startsWith(":")||G.startsWith(V0)||G.startsWith(f0)||j0.test(G)||Q1.test(G))if(Q1.test(G)){const[M,O]=G.match(Q1)||[];B=O.split(",")}else if(G.startsWith(f0))W[G.replace(f0,"")]=w;else if(G.startsWith(V0))H[G.replace(V0,"")]=w;else{if(G.startsWith(":"))G=G.slice(1,G.length);if(X)if(j0.test(G))q.map.spreadAttrs.push(G),U=!0;else q.map.explicitAttrs.push(G),!U?q.map.beforeSpreadAttrs.push(G):q.map.afterSpreadAttrs.push(G);q.expressions[G]=w||""}else if(q.literals[G]=w,X)q.map.explicitAttrs.push(G),!U?q.map.beforeSpreadAttrs.push(G):q.map.afterSpreadAttrs.push(G)}),{argv:B,events:W,functions:H,attrs:q}}__withPath__(J,Z){const W=this.__inpath__;this.__inpath__=J;const H=Z();return this.__inpath__=W,H}__getPathParent__(J){const Z=J.split("/");if(Z.length>1)Z.pop();return Z.join("/")}__hasSamePathParent__(J,Z){return J.startsWith(Z)&&!J.replace(Z,"").startsWith(".")||J.startsWith(`${Z+v1}`)}__evaluate__(J,Z,W){J=typeof J==="string"?J.trim():J;try{const H=(q)=>{const X=this.state.toJSON(),B=(G,...w)=>{try{return G(...w)}catch(M){!W?.mute&&console.error("Eval error --",M);return}};let U=`return ${q};`;if(Z){let G={},w;for(let O in Z){if(O==="__arguments__")continue;G[O]=Z[O].value}if(typeof Z.__arguments__==="object")w=Z.__arguments__;U=`with( scope ){ ${U} }`;const M=new Function("self","input","state","static","context","scope","arguments",U);return B(M,this,this.input,X,this.static,this.context,G||{},w)}else{const G=new Function("self","input","state","static","context",U);return B(G,this,this.input,X,this.static,this.context)}};if(/{\s*([^{}]+)\s*}/.test(J)){if(J.startsWith("!{")&&J.endsWith("}"))return H(J.slice(1));return J.replace(y1,(q,X)=>H(X))}return H(J)}catch(H){!W?.mute&&console.error("Expression evaluation error --",H);return}}__evaluateFunction__(J,Z,W){if(/(\s*\w+|\s*\([^)]*\)|\s*)\s*=>\s*(\s*\{[^}]*\}|\s*[^\n;"]+)/g.test(J))return this.__evaluate__(J,W)(...Z);else{let[H,...q]=J.split(/\s*,\s*/),X;const B=this.__evaluate__(H,W,{mute:!0});if(typeof B==="function")X=B;else{if(typeof this[H]!=="function")throw new Error(`Undefined <${H}> handler method`);X=this[H].bind(this)}if(typeof X!=="function")throw new Error(`Expected <${H}> to be a function or handler method`);let U=q.map((G)=>this.__evaluate__(G,W));if(Z.length)U=[...U,...Z];return X(...U)}}__evaluateSpreadAttr__(J,Z){const W=this.__evaluate__(J.replace(j0,""),Z.memo);if(!W){if(!Z.keystore.length)throw new Error(`Undefined spread operator ${J}`);typeof Z.nullify==="function"&&Z.nullify(Z.keystore);return}if(typeof W!=="object"||Array.isArray(W))throw new Error(`Invalid spread operator ${J}`);if(Z.keystore=Object.keys(W)||[],typeof Z.each==="function")for(let H in W)Z.each(H,W[H])}__interpolate__(J,Z,W){if(J=J.replace(y1,(H,q)=>this.__evaluate__(q,Z)),W)J=this.lips.i18n.translate(J).text;return J}__attachEvent__(J){const{element:Z,nodepath:W,_event:H,instruction:q,scope:X,__dependencies__:B}=J;let U=X;if(Z.on(H,(...G)=>this.__evaluateFunction__(q,G,U)),this.VER.push(J),this.metrics.inc("domUpdatesCount"),this.metrics.inc("domRemovalsCount"),this.__isReactive__(q,X))this.__extractExpressionDeps__(q,X).forEach((w)=>this.__trackDep__(B,w,X||{},{nodetype:"event",nodepath:W,deppath:`${W}.${H}`,target:"event-handler",$fragment:!(Z instanceof y0)?Z:null,boundaries:Z instanceof y0?Z.__boundaries__:void 0,update:(M)=>{U=M}}))}__detachEvent__({element:J,nodepath:Z,_event:W,instruction:H,scope:q,__dependencies__:X}){if(J.off(W),this.__isReactive__(H,q)){const B=this.__extractExpressionDeps__(H,q),U=`${Z}.${W}`;B.forEach((G)=>{X.get(G)?.delete(U),this.FGUD.get(G)?.delete(U)})}this.metrics.inc("domOperations"),this.metrics.inc("domRemovalsCount")}__extractTextDeps__(J,Z){const W=new Set;return(J.match(/{\s*([^{}]+)\s*}/g)||[]).forEach((q)=>{const X=q.replace(/[{}]/g,"").trim();this.__extractExpressionDeps__(X,Z).forEach((U)=>W.add(U))}),Array.from(W)}__extractExpressionDeps__(J,Z){const W=/\b(state|input|context|arguments)(?:\.[a-zA-Z_]\w*)+(?=\[|\.|$|\s|;|,|\))/g,H=/\b(self)(?:\.[a-zA-Z_]\w*)+(?=\()/g,q=/\b(arguments)((?:\.[a-zA-Z_]\w*)+)?(?=\[|\.|$|\s|;|,|\))/g;let X=[...Array.from(J.matchAll(W)),...Array.from(J.matchAll(H)),...Array.from(J.matchAll(q))];if(Z&&Object.keys(Z).length){const B=new RegExp(`\\b(?<!\\.)(${Object.keys(Z).join("|")})`,"g"),U=new RegExp(`(?:(?<=\\.\\.\\.))(${Object.keys(Z).join("|")})\\b`,"g");X=[...X,...Array.from(J.matchAll(B)),...Array.from(J.matchAll(U))]}return[...new Set(X.map((B)=>B[0]))]}__isReactive__(J,Z){if(/(self|state|input|context|arguments)(\.[\w.]+)?/.test(J))return!0;if(Z&&Object.keys(Z).length&&new RegExp(Object.keys(Z).join("|")).test(J))return!0;return!1}__bindMemo__(J,Z){const W=Z.deppath||Z.nodepath,H=this.FGUDMemory.get(Z.nodepath);if(H)H.tracks.set(W,Z.priority||2),H.memo=J,this.FGUDMemory.set(Z.nodepath,H);else{const q=new Map;q.set(W,Z.priority),this.FGUDMemory.set(Z.nodepath,{tracks:q,memo:J})}}__unbindMemo__(J){const Z=J.deppath||J.nodepath,W=this.FGUDMemory.get(J.nodepath);if(!W||!W.tracks.get(Z))return;W.tracks.delete(Z),!W.tracks.size&&this.FGUDMemory.delete(J.nodepath)}__trackDep__(J,Z,W,H){if(W&&W[Z]&&W[Z].type==="let")H.haslet=!0;if(H.priority===void 0)if(H.target==="attr"&&Z.split(".").find((X)=>G5.includes(X)))H.priority=0;else if(H.syntax)H.priority=1;else if(["event"].includes(H.nodetype))H.priority=3;else H.priority=2;const q=H.deppath||H.nodepath;H.level=q.split(/\//g).length,H.priority=H.level*j5+H.priority,!J.has(Z)&&J.set(Z,new Map),J.get(Z)?.set(q,H),this.__bindMemo__(W,H),this.metrics.inc("dependencyTrackCount")}__trackTranslationDep__(J,Z){this.__i18nDeps.set(Z.deppath||Z.nodepath,Z),this.__bindMemo__(J,Z),this.metrics.inc("i18nTrackCount")}__valueDep__(J,Z){return Z.reduce((W,H)=>W?.[H],J)}__shouldUpdate__(J,Z){if(J==="self")return!0;const W={state:this.state,input:this.input,context:this.context},H=this.__valueDep__(this.__previous[J],Z),q=this.__valueDep__(W[J],Z);return!U0(H,q)}__updateDepNodes__(){if(!this.FGUD?.size)return;this.metrics.inc("componentUpdateCount"),this.metrics.startRender(),this.FGUD.forEach((J,Z)=>{const[W,...H]=Z.split(".");if(!this.__shouldUpdate__(W,H))return;J.forEach((q)=>{try{const X=q.deppath||q.nodepath;if(q.garbage||q.boundaries?.start&&!document.contains(q.boundaries.start)||q.$fragment!==null&&!q.$fragment.closest("body").length){J.delete(X),this.__unbindMemo__(q);return}this.UQS.queue({dep:Z,deppath:X,priority:q.priority}),this.metrics.inc("dependencyUpdateCount")}catch(X){console.error("failed to update dependency nodes --",X);return}}),!J.size&&this.FGUD?.delete(Z)}),this.metrics.endRender()}__updateVarDepNodes__(J,Z,W){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender(),this.FGUD.get(J)?.forEach((H,q)=>{if(!H.haslet||!this.__hasSamePathParent__(q,this.__getPathParent__(Z)))return;const X=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${X}> has no memo`);return}B.memo={...B.memo,...W},this.UQS.queue({dep:J,deppath:X,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateArgumentsDepNodes__(J,Z){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender();const W="arguments";this.FGUD.get(W)?.forEach((H,q)=>{if(!this.__hasSamePathParent__(q,J))return;const X=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${X}> has no memo`);return}B.memo.__arguments__=Z,this.UQS.queue({dep:W,deppath:X,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateI18nDepNodes__(){if(!this.__i18nDeps?.size)return;this.metrics.inc("i18nUpdateCount"),this.metrics.startRender(),this.__i18nDeps?.forEach((J,Z)=>{if(!J.$fragment.closest("body").length){this.__i18nDeps.delete(Z);return}const W=this.FGUDMemory.get(J.nodepath);if(!W){console.warn(`unexpected occurence: <${J.deppath||J.nodepath}> has no memo`);return}J.update(W.memo,"i18n-partial-updator"),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}appendTo(J){return(typeof J=="string"?W0.default(J):J).append(this.node),this.metrics.inc("domOperations"),this}prependTo(J){return typeof J=="string"?W0.default(J):J.prepend(this.node),this.metrics.inc("domOperations"),this}replaceWith(J){return(typeof J=="string"?W0.default(J):J).replaceWith(this.node),this.metrics.inc("domOperations"),this}}var c1={};l0(c1,{handler:()=>{{return $8}},declaration:()=>{{return E8}},_static:()=>{{return T8}}});var E8={name:"if",syntax:!0,tags:{"else-if":{type:"nexted",many:!0,optional:!0},else:{type:"nexted",alts:["else-if"],optional:!0}}},T8={initialized:!1,prevRenderer:null},$8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,W=!1){if(!J.renderer)return;if(J.by){this.static.prevRenderer?.cleanup();const H=J.renderer.mesh({},Z);if(this.static.prevRenderer=J.renderer,!H?.length)return;if(W)return H;J.renderer.fill(H)}else{this.static.prevRenderer?.cleanup();let H=!1,q;if(Array.isArray(J["else-if"])&&J["else-if"].length)for(let X of J["else-if"]){if(!X.by)continue;if(q=X.renderer.mesh({},Z),this.static.prevRenderer=X.renderer,!q?.length)return;if(W)return q;q?.length&&X.renderer.fill(q),H=!0;break}if(!H&&J.else){const X=J.else.renderer.mesh({},Z);if(this.static.prevRenderer=J.else.renderer,!X?.length)return;if(W)return X;J.else.renderer.fill(X)}}}};var p1={};l0(p1,{handler:()=>{{return b8}},declaration:()=>{{return S8}},_static:()=>{{return A8}}});var N0=Z1(r0(),1);var S8={name:"for",syntax:!0},A8={lastIn:null,argvlist:null,initialized:!1,prevRenderer:null,processingBatch:!1},b8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,W=!1){if(this.static.processingBatch)return;if(!J.renderer)throw new Error("Undefined mesh renderer");let{in:H,from:q,to:X}=J;if(H===void 0&&q===void 0)throw new Error("Invalid <for> arguments");this.static.processingBatch=!0;try{if(q!==void 0)return this.asFromTo(J.renderer,q,X,Z,W);else if(Array.isArray(H))return this.asArray(J.renderer,H,Z,W);else if(H instanceof Map)return this.asMap(J.renderer,H,Z,W);else if(typeof H=="object")return this.asObject(J.renderer,H,Z,W)}finally{this.static.processingBatch=!1}},addItem(J,Z,W,H){if(!this.static.argvlist)this.static.argvlist=[];const q=`[${H}]`,X=J.mesh(W,Z,q);if(!X)return;const{boundaries:B,$partial:U}=J.demarcate(X,q);return this.static.prevRenderer=J,this.static.argvlist.push({argvalues:W,boundaries:B}),U},updateItem(J,Z,W,H){if(!this.static.argvlist?.[H])return;this.static.argvlist[H].argvalues=W,J.update(Object.keys(W),W,Z,this.static.argvlist[H].boundaries,`[${H}]`)},removeItem(J,Z){if(!this.static.argvlist?.[Z])return;J.cleanup(this.static.argvlist[Z].boundaries,`[${Z}]`),this.static.argvlist.splice(Z,1)},asFromTo(J,Z,W,H,q){if(Z=parseFloat(String(Z)),W==null)throw new Error("Expected <from> <to> attributes of the for loop to be defined");W=parseFloat(String(W));const X=Z<W,B=Math.abs(W-Z)+1;if(Array.isArray(this.static.argvlist)){const[G]=J.argv;if(G){let w=Z;if(this.static.argvlist.length===B){for(let O=0;O<this.static.argvlist.length;O++)this.static.argvlist[O].argvalues[G].value!==w&&this.updateItem(J,H,{[G]:{value:w,type:"arg"}},O),w=X?w+1:w-1;return}const M=Math.min(this.static.argvlist.length,B);for(let O=0;O<M;O++)this.updateItem(J,H,{[G]:{value:O,type:"arg"}},O);if(B>this.static.argvlist.length)for(let O=this.static.argvlist.length;O<B;O++){const g={[G]:{value:O,type:"arg"}};this.boundaries&&N0.default(this.boundaries.end).before(this.addItem(J,H,g,O))}else if(B<this.static.argvlist.length)for(let O=this.static.argvlist.length-1;O>=B;O--)this.removeItem(J,O)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let U=N0.default();for(let G=Z;X?G<=W:G>=W;X?G++:G--){const w={},[M]=J.argv;if(M)w[M]={value:G,type:"arg"};U=U.add(this.addItem(J,H,w,G))}if(!U?.length)return;if(q)return U;J.fill(U)},asArray(J,Z,W,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute array value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,U]=J.argv;if(B){if(this.static.argvlist.length===Z.length){for(let w=0;w<this.static.argvlist.length;w++)!U0(this.static.argvlist[w].argvalues[B].value,Z[w])&&this.updateItem(J,W,{[B]:{value:Z[w],type:"arg"},[U]:{value:w,type:"arg"}},w);return}const G=Math.min(this.static.argvlist.length,Z.length);for(let w=0;w<G;w++)this.updateItem(J,W,{[B]:{value:Z[w],type:"arg"},[U]:{value:w,type:"arg"}},w);if(Z.length>this.static.argvlist.length)for(let w=this.static.argvlist.length;w<Z.length;w++){const M={[B]:{value:Z[w],type:"arg"},[U]:{value:w,type:"arg"}};this.boundaries&&N0.default(this.boundaries.end).before(this.addItem(J,W,M,w))}else if(Z.length<this.static.argvlist.length)for(let w=this.static.argvlist.length-1;w>=Z.length;w--)this.removeItem(J,w)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let q=N0.default(),X=0;for(let B of Z){const U={},[G,w]=J.argv;if(G)U[G]={value:B,type:"arg"};if(w)U[w]={value:X,type:"arg"};q=q.add(this.addItem(J,W,U,X)),X++}if(!q?.length)return;if(H)return q;J.fill(q)},asMap(J,Z,W,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.size){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute map value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,U,G]=J.argv,w=Array.from(Z.entries());if(B){if(this.static.argvlist.length===w.length){for(let O=0;O<this.static.argvlist.length;O++)!U0(this.static.argvlist[O].argvalues[B].value,w[O][0])||!U0(this.static.argvlist[O].argvalues[U].value,w[O][1])&&this.updateItem(J,W,{[B]:{value:w[O][0],type:"arg"},[U]:{value:w[O][1],type:"arg"},[G]:{value:O,type:"arg"}},O);return}const M=Math.min(this.static.argvlist.length,w.length);for(let O=0;O<M;O++)this.updateItem(J,W,{[B]:{value:w[O][0],type:"arg"},[U]:{value:w[O][1],type:"arg"},[G]:{value:O,type:"arg"}},O);if(w.length>this.static.argvlist.length)for(let O=this.static.argvlist.length;O<w.length;O++){const g={[B]:{value:w[O][0],type:"arg"},[U]:{value:w[O][1],type:"arg"},[G]:{value:O,type:"arg"}};this.boundaries&&N0.default(this.boundaries.end).before(this.addItem(J,W,g,O))}else if(w.length<this.static.argvlist.length)for(let O=this.static.argvlist.length-1;O>=w.length;O--)this.removeItem(J,O)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let q=N0.default(),X=0;for(let[B,U]of Z){const G={},[w,M,O]=J.argv;if(w)G[w]={value:B,type:"arg"};if(M)G[M]={value:U,type:"arg"};if(O)G[O]={value:X,type:"arg"};q=q.add(this.addItem(J,W,G,X)),X++}if(!q?.length)return;if(H)return q;J.fill(q)},asObject(J,Z,W,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Object.keys(Z).length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute object value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,U,G]=J.argv,w=Object.entries(Z);if(B){if(this.static.argvlist.length===w.length){for(let O=0;O<this.static.argvlist.length;O++)!U0(this.static.argvlist[O].argvalues[B].value,w[O][0])||!U0(this.static.argvlist[O].argvalues[U].value,w[O][1])&&this.updateItem(J,W,{[B]:{value:w[O][0],type:"arg"},[U]:{value:w[O][1],type:"arg"},[G]:{value:O,type:"arg"}},O);return}const M=Math.min(this.static.argvlist.length,w.length);for(let O=0;O<M;O++)this.updateItem(J,W,{[B]:{value:w[O][0],type:"arg"},[U]:{value:w[O][1],type:"arg"},[G]:{value:O,type:"arg"}},O);if(w.length>this.static.argvlist.length){let O=N0.default();for(let g=this.static.argvlist.length;g<w.length;g++){const d={[B]:{value:w[g][0],type:"arg"},[U]:{value:w[g][1],type:"arg"},[G]:{value:g,type:"arg"}},J0=this.addItem(J,W,d,g);O=O.add(J0)}this.boundaries&&N0.default(this.boundaries.end).before(O)}else if(w.length<this.static.argvlist.length)for(let O=this.static.argvlist.length-1;O>=w.length;O--)this.removeItem(J,O)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let q=N0.default(),X=0;for(let B in Z){const U={},[G,w,M]=J.argv;if(G)U[G]={value:B,type:"arg"};if(w)U[w]={value:Z[B],type:"arg"};if(M)U[M]={value:X,type:"arg"};q=q.add(this.addItem(J,W,U,X)),X++}if(!q?.length)return;if(H)return q;J.fill(q)},onDestroy(){this.static.prevRenderer?.cleanup(void 0,!0),this.static.prevRenderer=null,this.static.argvlist=null,this.static.lastIn=null}};var s1={};l0(s1,{handler:()=>{{return k8}},declaration:()=>{{return x8}},_static:()=>{{return g8}}});var x8={name:"async",syntax:!0,tags:{then:{type:"child"},catch:{type:"child",optional:!0},loading:{type:"child",optional:!0}}},g8={initialized:!1,finalized:!1,prevRenderer:null},k8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,W=!1){if(!J.await)throw new Error("Undefined async <await> attribute");if(!(J.await instanceof Promise))throw new Error("Expected async <await> attribute value to be a function");if(this.static.finalized=!1,J.loading){this.static.prevRenderer?.cleanup();const H=J.loading.renderer.mesh({},Z);if(this.static.prevRenderer=J.loading.renderer,this.execute(J,Z,!0),this.static.finalized)return;if(!H?.length)return;if(W)return H;J.loading.renderer.fill(H)}else this.execute(J,Z)},execute(J,Z,W=!1){J.await.then((H)=>{if(this.static.prevRenderer?.cleanup(),!J.then)return;const[q]=J.then.renderer.argv,X={[q]:{value:H,type:"arg"}},B=J.then.renderer.mesh(X,Z);if(this.static.prevRenderer=J.then.renderer,!B?.length)return;if(!W)return B;J.then.renderer.fill(B)}).catch((H)=>{if(this.static.prevRenderer?.cleanup(),!J.catch)return;const[q]=J.catch.renderer.argv,X={[q]:{value:H,type:"arg"}},B=J.catch.renderer.mesh(X,Z);if(this.static.prevRenderer=J.catch.renderer,!B?.length)return;if(!W)return B;J.catch.renderer.fill(B)}).finally(()=>this.static.finalized=!0)}};var l1={};l0(l1,{handler:()=>{{return _8}},declaration:()=>{{return h8}},_static:()=>{{return f8}}});var h8={name:"switch",syntax:!0,tags:{case:{type:"child",many:!0},default:{type:"child"}}},f8={initialized:!1,prevRenderer:null},_8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,W=!1){let H=[];this.static.prevRenderer?.cleanup();for(let q of J.case)if(q.is==J.by||Array.isArray(q.is)&&q.is.includes(J.by)){Array.isArray(q.is)?H=[...new Set([...H,...q.is])]:H.push(q.is);const X=q.renderer.mesh({},Z);if(this.static.prevRenderer=q.renderer,!X?.length)return;if(W)return X;q.renderer.fill(X)}if(H.includes(J.by))return;if(J.default){const q=J.default.renderer.mesh({},Z);if(this.static.prevRenderer=J.default.renderer,!q?.length)return;if(W)return q;J.default.renderer.fill(q)}else this.static.prevRenderer=null}};var o1={};l0(o1,{state:()=>{{return y8}},handler:()=>{{return d8}},default:()=>{{return i8}},context:()=>{{return u8}},_static:()=>{{return v8}}});var m8=function(J){const Z={};return J.split("&").map((H)=>{const[q,X]=H.split("=");Z[q]=X}),Z},y8={page:null,params:{},query:{}},v8={global:!1,routes:[],defaultPath:null,currentPath:null,currentRoute:null},u8=["navigate"],d8={onInput(){this.processor(this.input)},processor(J){if(!J.routes)return;if(J.global)this.static.global=J.global;if(this.static.routes=J.routes.map(({path:Z,template:W,default:H})=>{if(H)this.static.defaultPath=Z;const q=Z.match(/:[^\/]*(\/|$)/gi)||[],X=Z.replaceAll("/","\\/").replaceAll(/:[^\/]*(\/|$)/gi,"([^\\/]+)(?:\\/|$)");return{path:Z,template:W,default:H,pathVars:q,pathRegex:new RegExp(`${X}\$`,"i")}}),J.global){const Z=window.location.pathname;this.static.defaultPath=this.static.defaultPath&&Z=="/"&&Z!==this.static.defaultPath?this.static.defaultPath:Z?Z+window.location.search:this.static.routes[0].path}},onAttach(){if(this.input.global)window.navigate=this.navigate.bind(this),window.addEventListener("popstate",(J)=>J.state&&this.navigate(J.state.path,!0));this.setContext("navigate",this.navigate.bind(this)),this.static.defaultPath&&this.navigate(this.static.defaultPath)},navigate(J,Z){!Z&&this.static.global&&history.pushState({path:J},"",J);const W=J.split("?");J=W[0];const H=W[1]?m8(W[1]):{};let q=null;if(this.static.currentRoute)q={path:this.static.currentRoute.path,params:this.state.params},this.emit("before",{fromState:q,toState:{path:J,query:H}});const X=this.match(J);if(!X){this.static.currentRoute=null,this.state.params={},this.state.query={},this.emit("not-found",J);return}const{route:B,params:U}=X;this.emit("after",{fromState:q,toState:{path:B.path,params:U,query:H}}),this.static.currentPath=J,this.static.currentRoute=B,this.state.params=U,this.state.query=H,this.state.page=B.template},match(J){const Z={};let W=!1;for(let H of this.static.routes){const{pathVars:q,pathRegex:X}=H,B=J.match(X);if(B!==null&&B.index===0){for(let U=0;U+1<B.length&&U<q.length;U++)Z[q[U].replaceAll(/[\/:]/g,"")]=B[U+1];W=H;break}}return W?{route:W,params:Z}:!1}},i8="<{state.page} params=state.params query=state.query/>";class s0{debug=!1;stylesheets=[];config={};store=new Map;__root;preprocessor;i18n=new w1;watcher;IUC;__setLang;__getLang;__setContext;__getContext;constructor(J){if(this.config=J,this.config?.debug)this.debug=this.config.debug;this.preprocessor=new X1(this.store),this.watcher=new z1,this.IUC=new q1;const[Z,W]=_0(this.i18n.lang),[H,q]=_0(J?.context||{});this.__setLang=W,this.__getLang=Z,this.__setContext=q,this.__getContext=H,this.register("if",c1),this.register("for",p1),this.register("async",s1),this.register("switch",l1),this.register("router",o1)}register(J,Z){return this.store.set(J,Z),this}unregister(J){return this.store.delete(J),this}has(J){return this.store.has(J)}import(J){if(!this.has(J))throw new Error(`<${J}> component not found`);const Z=this.store.get(J);if(!Z?.declaration?.syntax&&!Z?.default)throw new Error(`Invalid <${J}> component`);return Z}render(J,Z,W){const{default:H,...q}=Z,X={debug:this.debug,prepath:"0",lips:this},B=new y0(J,H||"",{...q,input:W},X);return window.addEventListener("beforeunload",()=>{return this.dispose(),B.destroy(),null}),window.addEventListener("pagehide",(U)=>{!U.persisted&&this.dispose()}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState!=="hidden")return;this.IUC.prepareForPotentialUnload()}),B}root(J,Z){if(this.__root=this.render("__ROOT__",J),this.__root.appendTo(Z),this.config?.stylesheets)this.stylesheets=this.config.stylesheets.map((W)=>new p0("root",{sheet:W,meta:!0}));return this.__root}setLanguage(J){this.i18n.lang=J,this.__setLang(J)}getLanguage(){return this.__getLang()}setContext(J,Z){const W=this.__getContext();if(typeof J==="string"){const H={...W,[J]:Z};G0(W,H)&&this.__setContext(H)}else if(!Array.isArray(J)){const H={...W,...J};G0(W,H)&&this.__setContext(H)}else throw new Error("Invalid context data")}getContext(){return this.__getContext()}useContext(J,Z){if(!J.length)return;t0(()=>{const W=this.__getContext();if(!W)return;const H=Object.fromEntries(J.map((q)=>[q,W[q]]));H&&typeof Z==="function"&&Object.keys(H).length&&Z(H)})}useTranslator(J,Z){t0(()=>{const W=this.__getLang();if(!W)return;(J==="*"||Array.isArray(J)&&J.includes(W))&&typeof Z==="function"&&Z(W)})}dispose(){this.watcher?.dispose(),this.__root?.destroy(),this.stylesheets.forEach((J)=>J.clear())}}function c8(J="body"){const Z={counter:0,counterHistory:[],updateFrequency:16,isRunning:!1,metrics:{fps:0,avgRenderTime:0,totalUpdates:0,memoryUsageMB:0,domOperations:0}},W={updateInterval:null,frameCountInterval:null,frameCount:0,lastFrameTimestamp:0,updateTimes:[]},H={onCreate(){console.log("Stress test component created")},onMount(){console.log("Stress test component mounted"),this.startPerformanceTracking()},onRender(){const G=performance.now();if(this.static.lastFrameTimestamp){const w=G-this.static.lastFrameTimestamp;if(w<1000){if(this.static.updateTimes.push(w),this.static.updateTimes.length>100)this.static.updateTimes.shift()}}this.static.lastFrameTimestamp=G,this.static.frameCount++},startPerformanceTracking(){this.static.frameCountInterval=setInterval(()=>{if(this.state.metrics.fps=this.static.frameCount,this.static.frameCount=0,this.static.updateTimes.length){const G=this.static.updateTimes.reduce((w,M)=>w+M,0)/this.static.updateTimes.length;this.state.metrics.avgRenderTime=G}if(window.performance&&window.performance.memory)this.state.metrics.memoryUsageMB=window.performance.memory.usedJSHeapSize/1048576},1000)},startStressTest(){if(this.state.isRunning)return;this.state.isRunning=!0,this.state.counterHistory=[],this.static.updateInterval=setInterval(()=>{if(this.state.counter++,this.state.metrics.totalUpdates++,this.state.counterHistory.length>100)this.state.counterHistory.shift();this.state.counterHistory.push(this.state.counter)},this.state.updateFrequency)},stopStressTest(){if(!this.state.isRunning)return;clearInterval(this.static.updateInterval),this.state.isRunning=!1},setUpdateFrequency(G){const w=parseFloat(G.target.value);if(this.state.updateFrequency=w,this.state.isRunning)this.stopStressTest(),this.startStressTest()},resetCounter(){this.state.counter=0,this.state.counterHistory=[],this.state.metrics.totalUpdates=0},runHeavyComputation(){const G=performance.now();let w=0;for(let M=0;M<1e7;M++)w+=Math.sqrt(M);console.log(`Heavy computation completed in ${performance.now()-G}ms, result: ${w}`)},destroy(){clearInterval(this.static.updateInterval),clearInterval(this.static.frameCountInterval)}},U=new s0({debug:!0}).render("StressTestApp",{default:`
|
|
2
|
-
<div class="stress-test-container">
|
|
3
|
-
<h2>Lips Framework Stress Test</h2>
|
|
4
|
-
|
|
5
|
-
<div class="controls">
|
|
6
|
-
<div class="form-group">
|
|
7
|
-
<label for="update-frequency">Update Frequency (ms):</label>
|
|
8
|
-
<input
|
|
9
|
-
type="range"
|
|
10
|
-
id="update-frequency"
|
|
11
|
-
min="1"
|
|
12
|
-
max="100"
|
|
13
|
-
value=state.updateFrequency
|
|
14
|
-
on-input(setUpdateFrequency)
|
|
15
|
-
/>
|
|
16
|
-
<span>{state.updateFrequency}ms</span>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="actions">
|
|
20
|
-
<if( !state.isRunning )>
|
|
21
|
-
<button class="start-btn" on-click(startStressTest)>Start Stress Test</button>
|
|
22
|
-
</if>
|
|
23
|
-
<else>
|
|
24
|
-
<button class="stop-btn" on-click(stopStressTest)>Stop Stress Test</button>
|
|
25
|
-
</else>
|
|
26
|
-
|
|
27
|
-
<button class="reset-btn" on-click(resetCounter)>Reset Counter</button>
|
|
28
|
-
<button class="heavy-btn" on-click(runHeavyComputation)>Run Heavy Computation</button>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="counter-display">
|
|
33
|
-
<h3>Counter Value: <span class="counter-value">{state.counter}</span></h3>
|
|
34
|
-
|
|
35
|
-
<div class="counter-visualization">
|
|
36
|
-
<for [value, index] in=state.counterHistory>
|
|
37
|
-
<div
|
|
38
|
-
class="history-bar"
|
|
39
|
-
style="height: {Math.min(value % 100, 100)}px; background-color: hsl({value % 360}, 80%, 60%);"
|
|
40
|
-
title="Update #{index}: {value}"
|
|
41
|
-
></div>
|
|
42
|
-
</for>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="metrics-panel">
|
|
47
|
-
<h3>Performance Metrics</h3>
|
|
48
|
-
<table class="metrics-table">
|
|
49
|
-
<tr>
|
|
50
|
-
<td>FPS:</td>
|
|
51
|
-
<td class="metric-value">{state.metrics.fps}</td>
|
|
52
|
-
</tr>
|
|
53
|
-
<tr>
|
|
54
|
-
<td>Avg Render Time:</td>
|
|
55
|
-
<td class="metric-value">{state.metrics.avgRenderTime.toFixed(2)} ms</td>
|
|
56
|
-
</tr>
|
|
57
|
-
<tr>
|
|
58
|
-
<td>Total Updates:</td>
|
|
59
|
-
<td class="metric-value">{state.metrics.totalUpdates}</td>
|
|
60
|
-
</tr>
|
|
61
|
-
<tr>
|
|
62
|
-
<td>Memory Usage:</td>
|
|
63
|
-
<td class="metric-value">{state.metrics.memoryUsageMB.toFixed(2)} MB</td>
|
|
64
|
-
</tr>
|
|
65
|
-
</table>
|
|
66
|
-
</div>
|
|
67
|
-
</div>
|
|
68
|
-
`,state:Z,_static:W,handler:H,stylesheet:`
|
|
69
|
-
.stress-test-container {
|
|
70
|
-
font-family: 'Arial', sans-serif;
|
|
71
|
-
max-width: 800px;
|
|
72
|
-
margin: 0 auto;
|
|
73
|
-
padding: 20px;
|
|
74
|
-
background-color: #f7f7f7;
|
|
75
|
-
border-radius: 8px;
|
|
76
|
-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
h2, h3 {
|
|
80
|
-
color: #333;
|
|
81
|
-
margin-bottom: 20px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.controls {
|
|
85
|
-
display: flex;
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
gap: 15px;
|
|
88
|
-
margin-bottom: 20px;
|
|
89
|
-
padding: 15px;
|
|
90
|
-
background-color: #fff;
|
|
91
|
-
border-radius: 6px;
|
|
92
|
-
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.form-group {
|
|
96
|
-
display: flex;
|
|
97
|
-
align-items: center;
|
|
98
|
-
gap: 10px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
label {
|
|
102
|
-
min-width: 180px;
|
|
103
|
-
font-weight: bold;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
input[type="range"] {
|
|
107
|
-
flex: 1;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.actions {
|
|
111
|
-
display: flex;
|
|
112
|
-
gap: 10px;
|
|
113
|
-
margin-top: 10px;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
button {
|
|
117
|
-
padding: 10px 20px;
|
|
118
|
-
border: none;
|
|
119
|
-
border-radius: 4px;
|
|
120
|
-
cursor: pointer;
|
|
121
|
-
font-weight: bold;
|
|
122
|
-
transition: all 0.2s;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.start-btn {
|
|
126
|
-
background-color: #4caf50;
|
|
127
|
-
color: white;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.stop-btn {
|
|
131
|
-
background-color: #f44336;
|
|
132
|
-
color: white;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.reset-btn {
|
|
136
|
-
background-color: #2196f3;
|
|
137
|
-
color: white;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.heavy-btn {
|
|
141
|
-
background-color: #ff9800;
|
|
142
|
-
color: white;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
button:hover {
|
|
146
|
-
opacity: 0.9;
|
|
147
|
-
transform: translateY(-2px);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.counter-display {
|
|
151
|
-
margin-top: 30px;
|
|
152
|
-
text-align: center;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.counter-value {
|
|
156
|
-
font-size: 1.5em;
|
|
157
|
-
font-weight: bold;
|
|
158
|
-
color: #1976d2;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.counter-visualization {
|
|
162
|
-
height: 100px;
|
|
163
|
-
display: flex;
|
|
164
|
-
align-items: flex-end;
|
|
165
|
-
gap: 2px;
|
|
166
|
-
overflow-x: auto;
|
|
167
|
-
padding: 10px;
|
|
168
|
-
background-color: #fff;
|
|
169
|
-
border-radius: 6px;
|
|
170
|
-
margin-top: 20px;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.history-bar {
|
|
174
|
-
width: 8px;
|
|
175
|
-
min-width: 8px;
|
|
176
|
-
background-color: #2196f3;
|
|
177
|
-
transition: height 0.2s ease;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.metrics-panel {
|
|
181
|
-
margin-top: 30px;
|
|
182
|
-
padding: 15px;
|
|
183
|
-
background-color: #fff;
|
|
184
|
-
border-radius: 6px;
|
|
185
|
-
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.metrics-table {
|
|
189
|
-
width: 100%;
|
|
190
|
-
border-collapse: collapse;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.metrics-table td {
|
|
194
|
-
padding: 10px;
|
|
195
|
-
border-bottom: 1px solid #eee;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.metrics-table td:first-child {
|
|
199
|
-
font-weight: bold;
|
|
200
|
-
width: 50%;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.metric-value {
|
|
204
|
-
font-family: monospace;
|
|
205
|
-
font-size: 1.1em;
|
|
206
|
-
color: #1976d2;
|
|
207
|
-
}
|
|
208
|
-
`},{});return U.appendTo(J),U}function p8(J="body",Z=5000){console.log(`Running high frequency update test for ${Z}ms...`);const W={counter:0,elapsedTime:0,updatesPerSecond:0,totalUpdates:0,isRunning:!1,testComplete:!1,testResults:{totalUpdates:0,duration:0,updatesPerSecond:0,avgUpdateTime:0}},H={updateIntervalId:null,startTime:0,updateTimes:[]},q={startTest(){if(this.state.isRunning)return;this.state.isRunning=!0,this.state.testComplete=!1,this.state.counter=0,this.state.totalUpdates=0,this.state.elapsedTime=0,this.static.startTime=performance.now(),this.static.updateTimes=[];const w=()=>{if(!this.state.isRunning)return;const M=performance.now();if(this.state.counter++,this.state.totalUpdates++,this.state.elapsedTime=M-this.static.startTime,this.state.elapsedTime>0)this.state.updatesPerSecond=Math.round(this.state.totalUpdates/this.state.elapsedTime*1000);const O=performance.now();if(this.static.updateTimes.push(O-M),this.state.elapsedTime>=Z){this.finishTest();return}requestAnimationFrame(w)};requestAnimationFrame(w)},finishTest(){this.state.isRunning=!1,this.state.testComplete=!0;const w=this.static.updateTimes.reduce((M,O)=>M+O,0)/this.static.updateTimes.length;this.state.testResults={totalUpdates:this.state.totalUpdates,duration:this.state.elapsedTime,updatesPerSecond:this.state.updatesPerSecond,avgUpdateTime:w},console.log("High Frequency Test Results:",this.state.testResults)}},X=`
|
|
209
|
-
<div class="high-freq-test">
|
|
210
|
-
<h2>High Frequency Update Test</h2>
|
|
211
|
-
<p>This test measures how many state updates Lips can handle per second.</p>
|
|
212
|
-
|
|
213
|
-
<div class="test-controls">
|
|
214
|
-
<if( !state.isRunning && !state.testComplete )>
|
|
215
|
-
<button on-click(startTest)>Start Test (${Z/1000}s)</button>
|
|
216
|
-
</if>
|
|
217
|
-
<else-if( state.isRunning )>
|
|
218
|
-
<div class="progress">
|
|
219
|
-
<div class="progress-bar" style="width: {(state.elapsedTime / ${Z}) * 100}%"></div>
|
|
220
|
-
</div>
|
|
221
|
-
<div class="stats">
|
|
222
|
-
<div>Counter: {state.counter}</div>
|
|
223
|
-
<div>Elapsed: {(state.elapsedTime / 1000).toFixed(1)}s</div>
|
|
224
|
-
<div>Updates/sec: {state.updatesPerSecond}</div>
|
|
225
|
-
</div>
|
|
226
|
-
</else-if>
|
|
227
|
-
<else>
|
|
228
|
-
<div class="results">
|
|
229
|
-
<h3>Test Complete!</h3>
|
|
230
|
-
<table>
|
|
231
|
-
<tr>
|
|
232
|
-
<td>Total Updates:</td>
|
|
233
|
-
<td>{state.testResults.totalUpdates}</td>
|
|
234
|
-
</tr>
|
|
235
|
-
<tr>
|
|
236
|
-
<td>Duration:</td>
|
|
237
|
-
<td>{(state.testResults.duration / 1000).toFixed(2)}s</td>
|
|
238
|
-
</tr>
|
|
239
|
-
<tr>
|
|
240
|
-
<td>Updates Per Second:</td>
|
|
241
|
-
<td>{state.testResults.updatesPerSecond}</td>
|
|
242
|
-
</tr>
|
|
243
|
-
<tr>
|
|
244
|
-
<td>Avg Update Time:</td>
|
|
245
|
-
<td>{state.testResults.avgUpdateTime.toFixed(3)}ms</td>
|
|
246
|
-
</tr>
|
|
247
|
-
</table>
|
|
248
|
-
<button on-click(startTest)>Run Again</button>
|
|
249
|
-
</div>
|
|
250
|
-
</else>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
`,B=`
|
|
254
|
-
.high-freq-test {
|
|
255
|
-
max-width: 600px;
|
|
256
|
-
margin: 20px auto;
|
|
257
|
-
padding: 20px;
|
|
258
|
-
background-color: #f5f5f5;
|
|
259
|
-
border-radius: 8px;
|
|
260
|
-
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
|
|
261
|
-
font-family: 'Arial', sans-serif;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.test-controls {
|
|
265
|
-
margin-top: 20px;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
button {
|
|
269
|
-
padding: 10px 20px;
|
|
270
|
-
background-color: #4285f4;
|
|
271
|
-
color: white;
|
|
272
|
-
border: none;
|
|
273
|
-
border-radius: 4px;
|
|
274
|
-
cursor: pointer;
|
|
275
|
-
font-weight: bold;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.progress {
|
|
279
|
-
height: 20px;
|
|
280
|
-
background-color: #e0e0e0;
|
|
281
|
-
border-radius: 10px;
|
|
282
|
-
margin: 20px 0;
|
|
283
|
-
overflow: hidden;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.progress-bar {
|
|
287
|
-
height: 100%;
|
|
288
|
-
background-color: #4285f4;
|
|
289
|
-
transition: width 0.2s;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.stats {
|
|
293
|
-
display: flex;
|
|
294
|
-
justify-content: space-between;
|
|
295
|
-
margin-bottom: 20px;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.results {
|
|
299
|
-
background-color: white;
|
|
300
|
-
padding: 20px;
|
|
301
|
-
border-radius: 8px;
|
|
302
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
table {
|
|
306
|
-
width: 100%;
|
|
307
|
-
margin: 20px 0;
|
|
308
|
-
border-collapse: collapse;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
td {
|
|
312
|
-
padding: 8px;
|
|
313
|
-
border-bottom: 1px solid #eee;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
td:first-child {
|
|
317
|
-
font-weight: bold;
|
|
318
|
-
}
|
|
319
|
-
`,G=new s0({debug:!0}).render("HighFrequencyTest",{default:X,state:W,handler:q,stylesheet:B},{});return G.appendTo(J),G}function c5(J="body"){const Z={nodeCount:1000,renderTime:0,isRendering:!1,nodes:[]},W={createNodes(U){this.state.isRendering=!0;const G=performance.now(),w=[];for(let M=0;M<U;M++)w.push({id:M,value:`Node ${M}: ${Math.random().toString(36).substring(2,15)}`});this.state.nodes=w,this.state.renderTime=performance.now()-G,setTimeout(()=>{this.state.renderTime=performance.now()-G,this.state.isRendering=!1},10)},shuffleNodes(){this.state.isRendering=!0;const U=performance.now(),G=[...this.state.nodes];for(let w=G.length-1;w>0;w--){const M=Math.floor(Math.random()*(w+1));[G[w],G[M]]=[G[M],G[w]]}this.state.nodes=G,setTimeout(()=>{this.state.renderTime=performance.now()-U,this.state.isRendering=!1},10)},updateValues(){this.state.isRendering=!0;const U=performance.now(),G=this.state.nodes.map((w)=>({...w,value:`Node ${w.id}: ${Math.random().toString(36).substring(2,15)}`}));this.state.nodes=G,setTimeout(()=>{this.state.renderTime=performance.now()-U,this.state.isRendering=!1},10)},setNodeCount(U){this.state.nodeCount=parseInt(U.target.value,10)}},B=new s0({debug:!0}).render("DOMStressTest",{default:`
|
|
320
|
-
<div class="dom-stress-test">
|
|
321
|
-
<h2>DOM Stress Test</h2>
|
|
322
|
-
|
|
323
|
-
<div class="controls">
|
|
324
|
-
<div class="input-group">
|
|
325
|
-
<label for="node-count">Number of Nodes:</label>
|
|
326
|
-
<input
|
|
327
|
-
type="number"
|
|
328
|
-
id="node-count"
|
|
329
|
-
min="100"
|
|
330
|
-
max="10000"
|
|
331
|
-
step="100"
|
|
332
|
-
value=state.nodeCount
|
|
333
|
-
on-input(setNodeCount)/>
|
|
334
|
-
</div>
|
|
335
|
-
|
|
336
|
-
<div class="buttons">
|
|
337
|
-
<button on-click(createNodes, state.nodeCount) disabled=state.isRendering>
|
|
338
|
-
Render Nodes
|
|
339
|
-
</button>
|
|
340
|
-
<button on-click(shuffleNodes) disabled="state.isRendering || !state.nodes.length">
|
|
341
|
-
Shuffle Nodes
|
|
342
|
-
</button>
|
|
343
|
-
<button on-click(updateValues) disabled="state.isRendering || !state.nodes.length">
|
|
344
|
-
Update Values
|
|
345
|
-
</button>
|
|
346
|
-
</div>
|
|
347
|
-
|
|
348
|
-
<div class="render-info">
|
|
349
|
-
<if( state.isRendering )>
|
|
350
|
-
<div class="loading">Rendering...</div>
|
|
351
|
-
</if>
|
|
352
|
-
<else-if( state.renderTime > 0 )>
|
|
353
|
-
<div class="render-time">Render Time: {state.renderTime.toFixed(2)}ms</div>
|
|
354
|
-
</else-if>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
357
|
-
|
|
358
|
-
<div class="nodes-container">
|
|
359
|
-
<if( state.nodes.length )>
|
|
360
|
-
<for [node] in=state.nodes>
|
|
361
|
-
<div class="node" key=node.id>{node.value}</div>
|
|
362
|
-
</for>
|
|
363
|
-
</if>
|
|
364
|
-
</div>
|
|
365
|
-
</div>
|
|
366
|
-
`,state:Z,handler:W,stylesheet:`
|
|
367
|
-
.dom-stress-test {
|
|
368
|
-
max-width: 800px;
|
|
369
|
-
margin: 20px auto;
|
|
370
|
-
padding: 20px;
|
|
371
|
-
font-family: 'Arial', sans-serif;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.controls {
|
|
375
|
-
margin-bottom: 20px;
|
|
376
|
-
padding: 15px;
|
|
377
|
-
background-color: #f5f5f5;
|
|
378
|
-
border-radius: 8px;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.input-group {
|
|
382
|
-
display: flex;
|
|
383
|
-
align-items: center;
|
|
384
|
-
margin-bottom: 15px;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
label {
|
|
388
|
-
margin-right: 10px;
|
|
389
|
-
min-width: 150px;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
input {
|
|
393
|
-
padding: 8px;
|
|
394
|
-
width: 150px;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.buttons {
|
|
398
|
-
display: flex;
|
|
399
|
-
gap: 10px;
|
|
400
|
-
margin-bottom: 15px;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
button {
|
|
404
|
-
padding: 8px 15px;
|
|
405
|
-
background-color: #4285f4;
|
|
406
|
-
color: white;
|
|
407
|
-
border: none;
|
|
408
|
-
border-radius: 4px;
|
|
409
|
-
cursor: pointer;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
button:disabled {
|
|
413
|
-
background-color: #cccccc;
|
|
414
|
-
cursor: not-allowed;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
.render-info {
|
|
418
|
-
font-weight: bold;
|
|
419
|
-
height: 24px;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
.loading {
|
|
423
|
-
color: #ff9800;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
|
-
.render-time {
|
|
427
|
-
color: #4285f4;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
.nodes-container {
|
|
431
|
-
border: 1px solid #e0e0e0;
|
|
432
|
-
padding: 10px;
|
|
433
|
-
border-radius: 4px;
|
|
434
|
-
max-height: 400px;
|
|
435
|
-
overflow-y: auto;
|
|
436
|
-
background-color: #fafafa;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
.node {
|
|
440
|
-
padding: 8px;
|
|
441
|
-
border-bottom: 1px solid #eee;
|
|
442
|
-
font-size: 14px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.node:last-child {
|
|
446
|
-
border-bottom: none;
|
|
447
|
-
}
|
|
448
|
-
`},{});return B.appendTo(J),B}function t6(J="body"){const Z=document.createElement("div");Z.className="stress-tests-suite",Z.innerHTML=`
|
|
449
|
-
<h1>Lips Framework Stress Test Suite</h1>
|
|
450
|
-
|
|
451
|
-
<div class="test-section" id="stress-test"></div>
|
|
452
|
-
<div class="test-section" id="high-frequency-test"></div>
|
|
453
|
-
<div class="test-section" id="dom-stress-test"></div>
|
|
454
|
-
`;const W=document.createElement("style");return W.textContent=`
|
|
455
|
-
.stress-tests-suite {
|
|
456
|
-
font-family: 'Arial', sans-serif;
|
|
457
|
-
padding: 20px;
|
|
458
|
-
max-width: 1200px;
|
|
459
|
-
margin: 0 auto;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
h1 {
|
|
463
|
-
text-align: center;
|
|
464
|
-
margin-bottom: 30px;
|
|
465
|
-
color: #333;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.test-section {
|
|
469
|
-
margin-bottom: 40px;
|
|
470
|
-
border: 1px solid #e0e0e0;
|
|
471
|
-
padding: 10px;
|
|
472
|
-
border-radius: 8px;
|
|
473
|
-
}
|
|
474
|
-
`,document.head.appendChild(W),document.querySelector(J)?.appendChild(Z),c8("#stress-test"),p8("#high-frequency-test",3000),c5("#dom-stress-test"),{container:Z}}c5();export{p8 as runHighFrequencyTest,c5 as runDOMStressTest,t6 as runAllStressTests,c8 as createLipsStressTest};
|
|
475
|
-
|
|
476
|
-
//# debugId=72178D2C24D0C0D864756e2164756e21
|