-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathvan-0.11.2.nomodule.min.js
1 lines (1 loc) · 1.21 KB
/
van-0.11.2.nomodule.min.js
1
{let e,t,n,l,d,r,s,i,o,u,a,w,_,c,v;n=Object,l=null,d=Object.getPrototypeOf,r=d({}),s=(e,t,n,l)=>(e??(setTimeout(n,l),new Set)).add(t),i={get val(){return this.t},set val(t){let n=this,l=n.t;t!==l&&(n.l===l?e=s(e,n,_):t===n.l&&e.delete(n),n.t=t,n.i.forEach((e=>e(t,l))))},onnew(e){this.i.push(e)}},o=e=>e.nodeType?e:new Text(e),u=(e,...t)=>t.flat(1/0).forEach((t=>e.appendChild(d(t)===i?c(t,(e=>e)):o(t)))),a=new Proxy(((e,...t)=>{let[l,...s]=d(t[0]??0)===r?t:[{},...t],o=document.createElement(e);return n.entries(l).forEach((([e,t])=>{let n=void 0!==o[e]?t=>o[e]=t:t=>o.setAttribute(e,t);d(t)===i?c(t,(e=>(n(e),o))):d(t)===r?c(...t.deps,((...e)=>(n(t.f(...e)),o))):n(t)})),u(o,...s),o}),{get:(e,t)=>e.bind(l,t)}),w=e=>e.o=e.o.filter((e=>e.u?.isConnected)),_=()=>{let t=[...e];e=l,new Set(t.flatMap(w)).forEach((e=>{let{_:t,u:n,v:d}=e,r=d(...t.map((e=>e.t)),n,...t.map((e=>e.l)));r!==n&&(r!==l?n.replaceWith(e.u=o(r)):(n.remove(),e.u=l))})),t.forEach((e=>e.l=e.t))},v={add:u,tags:a,state:e=>({__proto__:i,t:e,l:e,o:[],i:[]}),bind:c=(...e)=>{let n=e.slice(0,-1),d=e[e.length-1],r=d(...n.map((e=>e.t)));if(r===l)return[];let i={_:n,u:o(r),v:d};return n.forEach((e=>{t=s(t,e,(()=>(t.forEach(w),t=l)),1e3),e.o.push(i)})),i.u}},window.van=v;}