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

package.dist.module-min.factory.js Maven / Gradle / Ivy

import{TemplateDOM,Template,MikadoOptions,NodeCache,ProxyCache}from"./type.js";import Mikado,{includes}from"./mikado.js";import{dispatch,listen}from"./event.js";export function create_path(a,b,c){let d;c&&(d=a._mkc)&&(a._mkc=null);const e=b.length,f=[],g={};for(let h,i,j,k,l=0,m=null;l"===e)a=a.firstChild;else{if("|"===e)return[a.firstChild,a];if("@"===e)return[a.style,a];a=a.nextSibling}c[f]=a}}return[a]}export function construct(a,b,c,d,e,f){!1,f||(a.fullproxy=1);const g=e||(b.tag?b.svg?document.createElementNS("http://www.w3.org/2000/svg",b.tag):document.createElement(b.tag):document.createTextNode(b.text));let h,j;if(j=b.class)if("object"!=typeof j)e||(g.className=j);else if(!1,c.push(new Cache(h={_c:""},g,d)),j=j[0]){const b={fn:"_c",index:c.length-1};init_proxy(a,j,b)}else a.fullproxy=0;if(j=b.attr)for(const b in j){let f=j[b];if("object"!=typeof f)e||g.setAttribute(b,f);else if(!1,h||c.push(new Cache(h={},g,d)),h["_a"+b]=!1,f=f[0]){const d={fn:"_a",index:c.length-1,key:b};init_proxy(a,f,d)}else a.fullproxy=0}if(j=b.event)for(let a in j){let b;e||(("load"==a||"error"==a)&&(window.dispatch=dispatch,j["on"+a]="dispatch('"+j[a]+"', this)",a="on"+a,b=1),g.setAttribute(a,j[a])),b||listen(a)}if(j=b.style)if("object"!=typeof j)e||(g.style.cssText=j);else if(!1,c.push(new Cache(h||(h={}),g.style,d+"@")),h._s="",j=j[0]){const b={fn:"_s",index:c.length-1};init_proxy(a,j,b)}else a.fullproxy=0;if(j=b.text){if("object"==typeof j){let f=g;if(j=j[0],b.tag?(d+="|",f=!e&&g.firstChild,!f&&(f=document.createTextNode(j),g.appendChild(f))):h={},(h||(h={}))._t=j,!1,c.push(new Cache(h,f,d)),j){const b={fn:"_t",index:c.length-1};init_proxy(a,j,b)}else a.fullproxy=0}else e||(b.tag?g.textContent=j:g.nodeValue=j);}else if(j=b.child){if(e&&(e=e.firstChild,!e))return!1,null;j.constructor!==Array&&(j=[j]);for(let b,f=0,h=j.length;f";const i=construct(a,b,c,d,e,1);if(!e)g.appendChild(i);else if(f




© 2015 - 2025 Weber Informatics LLC | Privacy Policy