/** * * ModelView.js * @version: 5.1.0 * @built on 2022-08-17 19:39:33 * * A simple, light-weight, versatile and fast isomorphic MVVM JavaScript framework (Browser and Server) * https://github.com/foo123/modelview.js * **//** * * ModelView.js * @version: 5.1.0 * @built on 2022-08-17 19:39:33 * * A simple, light-weight, versatile and fast isomorphic MVVM JavaScript framework (Browser and Server) * https://github.com/foo123/modelview.js * **/!function(e,t,n){"use strict";"object"==typeof module&&module.exports?module.exports=n.call(e):"function"==typeof define&&define.amd&&"function"==typeof require&&"function"==typeof require.specified&&require.specified(t)?define(t,function(){return n.call(e)}):t in e||(e[t]=n.call(e)||1)&&"function"==typeof define&&define.amd&&define(function(){return e[t]})}("undefined"!=typeof self?self:this,"ModelView",function(){"use strict";function a(e,t){return e.bind(t)}var g="undefined"!=typeof window&&"undefined"!=typeof document,S="$MV",t="--mvDisplay",A=".",C="*",x=function(e,t,n,i,l){return{att:e||null,mod:t||null,id:n||null,comp:i||null,key:l||null}},o=x(),D=void 0,e="prototype",n=Array,w=n[e],p=RegExp,i=Number,l=Object,r=l[e],u=l.create,N=l.keys,F=Math,s=Function,b=(s[e],String),d=b[e],M=Int32Array||Array,c=r.toString,V=r.hasOwnProperty,P=w.slice,f="undefined"!=typeof Promise?Promise.resolve().then.bind(Promise.resolve()):function(e){setTimeout(e,0)},h=(F.random,/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g),m=4,$=8,y=16,_=32,k=34,E=35,I=64,O=128,j=129,L=256,B=512,q=1024,K=2048,H=4096,R=8192,U=8192,z=O|L,X=B|L,Z={"[object Number]":_,"[object BigInt]":33,"[object String]":O,"[object Array]":L,"[object RegExp]":K,"[object Date]":H,"[object Function]":q,"[object File]":U,"[object Blob]":R,"[object Object]":B},G=/\s+/g,W=/\r\n|\r|\n/g,J="getAttribute",Q="setAttribute",Y="hasAttribute",ee="removeAttribute",te="checked",ne="disabled",ie="selected",le="tagName",oe="type",re="value",ae="options",ue="selectedIndex",se="parentNode",de="nextSibling",ce="previousSibling",fe="style",he="className",pe="innerHTML",me="innerText",ve="textContent",ge=(JSON.parse,JSON.stringify),$e=/^\s+|\s+$/g,ye=d.trim?function(e){return b(e).trim()}:function(e){return b(e).replace($e,"")},xe=d.startsWith?function(e,t,n){return b(e).startsWith(t,n||0)}:function(e,t,n){return t===b(e).slice(n||0,t.length)},Ne=Date.now?Date.now:function(){return(new Date).getTime()},_e=!(d=g&&window.Element?window.Element[e]:null)||d.matches?"matches":d.matchesSelector?"matchesSelector":d.webkitMatchesSelector?"webkitMatchesSelector":d.mozMatchesSelector?"mozMatchesSelector":d.msMatchesSelector?"msMatchesSelector":d.oMatchesSelector?"oMatchesSelector":void 0,we=g&&window.getComputedStyle?function(e){return window.getComputedStyle(e,null)}:function(e){return e.currentStyle},be=0,ke=0;function Te(e,t){this.v=e||null,this.n=t||{}}function Ae(){}function Ce(e,t){return new s(e,t)}function De(e,t){return e instanceof t}function Ve(e){return"[object Array]"===c.call(e)}function Ee(e){return b(e)}function Ie(e){return e.toLowerCase()}function Oe(e){return e.toUpperCase()}function Se(e){return e.replace(h,"\\$&")}function Fe(e){return 0",quot:'"',apos:"'",nbsp:" "},gt={"":1,"":1,"
":1,"":1,"":1,"
":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1},$t={"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1,"":1};function yt(e){De(e,yt)&&(e=e.node),this.node=e}function xt(e,t,n,i,l){var o=this;if(!De(o,xt))return new xt(e,t,n,i,l);o.nodeType=e||"",o.cnodeType=e||"",o.nodeValue=t||"",o.nodeValue2=n||"",o.parentNode=i||null,o.index=l||0,o.attributes=[],o.childNodes=[]}function Nt(e){if(!De(this,Nt))return new Nt(e);this.code=e}function _t(e,t,n,i,l,o,r){r='"use strict";\nvar view = '+(r||"this")+";";return n=(n||"")+"_$$_",i&&i.length&&(r+="\n"+b(i)),Ce(n,r+="\nreturn "+At(wt(e,t,l,o||"",!0))+";")}function wt(e,t,n,i,l){return function(e){if(!e.dom)throw Me("No root node!");if(e.dom.parentNode)throw Me("Unclosed tag "+e.dom.parentNode.nodeType);return e.dom}(((!(l=function(e,t,n,i){var l,o,r,a,u,s,d="",c=t.length,f=0;for(;f"!==(d=t.charAt(f));){if(ct.test(d))n.att.length&&(n.dom.attributes.push({name:n.att,value:!0}),n.att="");else if(mt.test(d))n.att+=d;else{if("="===d){if(n.att.length&&(n.dom.attributes.push({name:n.att,value:!0}),n.att=""),n.dom.attributes.length&&!0===n.dom.attributes[n.dom.attributes.length-1].value){for(f++;f"!==t.charAt(f+1))throw Me('Invalid "'+d+'" in tag '+n.dom.nodeType+" around .. "+t.slice(F.max(0,f-50),f+50)+" ..")}f++}n.inatt||">"===d&&(n.intag=!1,n.inatt=!1,n.att.length&&(n.dom.attributes.push({name:n.att,value:!0}),n.att=""),"/"!==t.charAt(f-1)&&!V.call(gt,n.dom.cnodeType)||(!0===i&&Kn(e,n.dom.nodeType.slice(1,-1))?(s=n.dom,n.dom=s.parentNode,s.parentNode=null,n.dom.childNodes[n.dom.childNodes.length-1]=new Nt('view.component("'+s.nodeType.slice(1,-1)+'",'+(De(It(s,"id"),Nt)?It(s,"id").code:ge(It(s,"id")))+","+(De(It(s,"data"),Nt)?It(s,"data").code:ge(It(s,"data")))+",[])"),s=null):n.dom=n.dom.parentNode),f++)}else{for(;f"===n.dom.cnodeType){if("/script>"!==Ie(t.slice(f,f+8))){n.txt+=d,n.txt2+=d;continue}n.dom.childNodes.push(xt("t",n.txt,n.txt2,n.dom,n.dom.childNodes.length)),n.txt="",n.txt2=""}if("