All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.mikado.es5.min.js Maven / Gradle / Ivy

The newest version!
/**!
 * Mikado.js v0.8.329 (ES5)
 * Copyright 2019-2024 Nextapps GmbH
 * Author: Thomas Wilkerling
 * Licence: Apache-2.0
 * https://github.com/nextapps-de/mikado
 */
(function(){'use strict';var p;function aa(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b>>0)+"_",g=0;return b});
y("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;cc&&(c=Math.max(c+g,0));cMath.abs(K-b)&&15>Math.abs(L-c)&&ja(a,"tap")},oa=function(a){var b=a;(a=a.touches)&&(b=a[0]);K=b.clientX;L=b.clientY},pa={passive:!1,capture:!0};ma=function(a){J(a,H?"pointerdown":"touchstart",oa,pa);J(a,H?"pointerup":"touchend",na,pa)}}function J(a,b,c,d){if("tap"===b){if(ea||H){ma(a);return}ia=!0;b="click"}window[(a?"add":"remove")+"EventListener"](b,c,d||!1===d?d:!0)};function M(a,b,c){var d;c&&(d=a._mkc)&&(a._mkc=null);for(var g=b.length,l=[],h={},e=0,f,k,m,n=null;e"===u)f=f.firstChild;else{if("|"===u){f=[f.firstChild,f];break a}if("@"===u){f=[f.style,f];break a}f=f.nextSibling}h[t]=f}}f=[f]}m=f[0];f=f[1]||m}}else m=f=a;c&&(n=d?d[e]:{},f._mkc=n);l[e]=new N(n,m,"")}return a._mkp=l}
function O(a,b,c,d,g,l){l||(a.l=1);var h=g||(b.tag?b.svg?document.createElementNS("http://www.w3.org/2000/svg",b.tag):document.createElement(b.tag):document.createTextNode(b.text)),e,f;if(f=b.class)"object"===typeof f?(c.push(new N(e={_c:""},h,d)),(f=f[0])?P(a,f,{fn:"_c",index:c.length-1}):a.l=0):g||(h.className=f);if(f=b.attr)for(var k in f){var m=f[k];"object"===typeof m?(e||c.push(new N(e={},h,d)),e["_a"+k]=!1,(m=m[0])?P(a,m,{fn:"_a",index:c.length-1,key:k}):a.l=0):g||h.setAttribute(k,m)}if(f=
b.event)for(var n in f){k=void 0;if(!g){if("load"===n||"error"===n)window.dispatch=ka,f["on"+n]="dispatch('"+f[n]+"', this)",n="on"+n,k=1;h.setAttribute(n,f[n])}k||la(n)}if(f=b.style)"object"===typeof f?(c.push(new N(e||(e={}),h.style,d+"@")),e._s="",(f=f[0])?P(a,f,{fn:"_s",index:c.length-1}):a.l=0):g||(h.style.cssText=f);if(f=b.text)if("object"===typeof f){var r=h;f=f[0];b.tag?(d+="|",r=!g&&h.firstChild,r||(r=document.createTextNode(f),h.appendChild(r))):e={};(e||(e={}))._t=f;c.push(new N(e,r,d));
f?P(a,f,{fn:"_t",index:c.length-1}):a.l=0}else g||(b.tag?h.textContent=f:h.nodeValue=f);else if(f=b.child){if(g&&(g=g.firstChild,!g))return null;f.constructor!==Array&&(f=[f]);b=0;for(r=f.length;b",n=O(a,n,c,d,g,1),g){if(ba?this.length+a:a,a=this.g[d]):d=this.index(a));var g;if(this.key){var l=b[this.key];if(g=this.A[l]){if(g!==a){l=this.index(g);var h=la?this.length+a-1:a,a=this.g[d]):d=this.index(a));this.apply(b,c||this.state,d,a._mkp||M(a,this.o._mkp,this.cache));(b=this.on&&this.on.update)&&b(a,this);return this};
p.cancel=function(){cancelAnimationFrame(this.B);this.B=0;return this};
p.create=function(a,b,c,d){var g=this.key,l=g&&a[g],h,e,f;if(this.pool)if(g){if((e=this.m)&&(h=e.get(l))){e.delete(l);var k=1}}else(e=this.G)&&e.length&&(h=e.pop());h||(h=f=this.o,f||(this.o=h=f=O(this,this.tpl.tpl,[],""),ua(this)));if(this.apply){e=h._mkp||M(h,this.o._mkp,!!f||this.cache);var m=f&&this.cache&&Array(e.length);this.apply(a,b||this.state,c,e,!!f,m)}f&&(h=f.cloneNode(!0),m&&!0!==m&&(h._mkc=m),h._mkr=1);g&&(k||(h._mkk=l),d&&(this.A[l]=h));(a=this.on&&this.on[f?"create":"recycle"])&&a(h,
this);return h};p.add=function(a,b,c){if("number"===typeof b){c=0>b?this.length+b:b;b=null;var d=cc&&(c+=this.length),d=ce?f:e,m=0;for(d||(d=0);d=f,u=void 0,w=void 0,fa=void 0,ha=void 0;a.proxy&&(r._mkx?ha=a.l:b[d]=T(a,g[d],r));if(!t&&(u=g[d],w=r[h],fa=u._mkk,fa===w)){ha||a.update(u,r,c,d);continue}if(t||!l[w]){t||!a.pool?(f++,k=f>e?f:e,a.add(r,c,d)):a.replace(u,r,c,d);continue}for(var F=t=void 0,x=d+1;x=F+m?(n=g[t-1],a.root.insertBefore(n,
u),ha||a.update(n,r,c,d),t===F?(1f?f:r)-1),m--,d--);n=1;break}}n||(a.remove(d),f--,k=f>e?f:e,d--)}return a}function ya(a,b,c,d){var g=d||a[b];d&&b++;if(bc;b--)a[b]=a[b-1];a[c]=g}
p.append=function(a,b,c){if("number"===typeof b){c=0>b?this.length+b:b;b=null;var d=1}else"number"===typeof c&&(0>c&&(c+=this.length),d=1);for(var g=a.length,l=0;la&&(a=c+a));if(!c||a>=c)return this;b?0>b&&(a-=b+1,0>a&&(a=0),b*=-1):b=1;if(!a&&b>=c){var d=this.g;b=d.length;this.root.textContent="";this.root._mkd=this.g=[];c=0}else d=this.g.splice(a,b),c-=b;var g=this.pool&&!this.key,l=this.key||this.pool,h=this.on&&this.on.remove;(a=this.key&&this.pool)&&b>=a&&(this.m=new Map,a=0);for(var e=0,f;ea.pool&&a.m.delete(a.m.keys().next().value)):a.G[a.G.length]=b)}p.flush=function(){this.G=[];this.m=new Map;return this};
p.destroy=function(){for(var a=0,b;a=h?(g.add(c),a.length++):ba.length&&this.splice(a.length)):(this.splice(),this.concat(a));return this};p.splice=function(a,b,c){V=!0;a||(a=0);"undefined"===typeof b&&(b=this.length-a,0>b&&(b=0));b&&this.h.remove(a,b);b=c?this.i.splice(a,b,c):this.i.splice(a,b);c&&this.h.add(c,a);V=!1;return b};p.push=function(a){V=!0;this.h.add(a);this[this.length]=a;za&&this.length++;V=!1};p.unshift=function(a){V=!0;this.h.add(a,0);this.i.unshift(a);V=!1};
p.pop=function(){V=!0;this.h.remove(this.length-1);var a=this.i.pop();V=!1;return a};p.shift=function(){V=!0;this.h.remove(0);var a=this.i.shift();V=!1;return a};p.concat=function(a){for(var b=a.length,c=0;cb&&(b=this.length+b-1);c!==b&&this.shift(a,b-c);return this};
p.shift=function(a,b){if(!b)return this;if("number"===typeof a){var c=a;a=this.g[a]}else c=this.index(a);var d=0>b;if(d&&c||!d&&cb;c--)this.g[c]=this.g[c-1];else for(;cb&&(b=this.length+b,0>a&&b--),0>a&&(a=this.length+a-1),this.shift(a,b-a-1));return this};
p.after=function(a,b){"number"!==typeof a&&(a=this.index(a));"number"!==typeof b&&(b=this.index(b));b!==a-1&&(0>b&&(b=this.length+b-2,0>a&&b++),0>a&&(a=this.length+a-1),this.shift(a,b-a+1));return this};
p.swap=function(a,b){if(a!==b){if("number"===typeof a){var c=0>a?this.length+a:a;a=this.g[c]}else c=this.index(a);if("number"===typeof b){var d=0>b?this.length+b:b;b=this.g[d]}else d=this.index(b);var g=c+1!==d;this.root.insertBefore(g?a:b,g?b:a);g&&d+1!==c&&this.root.insertBefore(b,this.g[c+1]||null);this.g[c]=b;this.g[d]=a}return this};var Da={tap:1,change:1,click:1,dblclick:1,input:1,keydown:1,keypress:1,keyup:1,mousedown:1,mouseover:1,mouseout:1,mousemove:1,mouseup:1,mousewheel:1,touchstart:1,touchmove:1,touchend:1,touchcancel:1,reset:1,select:1,submit:1,toggle:1,focusin:1,focusout:1,resize:1,scroll:1,error:1,load:1},Ea={blur:"focusout",focus:"focusin",mouseleave:"mouseout",mouseenter:"mouseover"},Fa=0;
function Ga(a,b,c,d,g,l){if(b)return new Promise(function(u){var w=Ga(a);"function"===typeof b&&b(w);u(w)});g||(d=[],c=[d],d.index=g={current:-1,count:0,last:-1,inc:0,C:!1});var h=l?{}:{tpl:{}},e=l?h:h.tpl;if(!l){if("string"===typeof a)if(/<.*>/.test(a)){var f=document.createElement("div");f.innerHTML=a;a=f.firstElementChild}else h.name=a,a=document.getElementById(a);a.content&&(h.name||(h.name=a.id||a.getAttribute("name")),a=a.content.firstElementChild)}f=a.tagName;if(!f||"SCRIPT"===f){var k;if((k=
(f?a.firstChild:a).nodeValue)&&k&&k.trim()){if(k.includes("{{@")){var m=k.replace(/{{@([\s\S]+)}}/g,"$1").trim();k=/{{[\s\S]+}}/.test(m)?m.replace(/{{([\s\S]+)}}/g,"{{$1}}"):"";m&&(m=m.replace(/{{([\s\S]+)}}/g,""));m&&d.push(m);if("SCRIPT"===f)return k.trim()&&(e.text=k,e.tag=f),e}k&&k.trim()&&(k.includes("{{#")?Ha(e,"html",k,!1,null,g,d):(g.count++,Ha(e,"text",k,!1,null,g,d)))}if(!f)return k&&k.trim()?e:null}f&&(e.tag=f);if((k=a.attributes)&&k.length){f={};for(m=0;m




© 2015 - 2025 Weber Informatics LLC | Privacy Policy