/*!
 * MaskJS v0.51.25
 * Part of the Atma.js Project
 * http://atmajs.com/
 *
 * MIT license
 * http://opensource.org/licenses/MIT
 *
 * (c) 2012, 2015 Atma.js and other contributors
 */
!function(n,t){"use strict";function e(){var n=t(i,l,u);return o&&(module.exports=n),n}var r="undefined"==typeof window||null==window.navigator?"node":"dom",i="dom"===r?window:global,o="undefined"!=typeof exports&&(null==n||n===exports||n===i);o&&(n=exports);var l=n||i,u=i.document;return"function"==typeof define&&define.amd?define(e):e()}(this,function(n,t,e){"use strict";function r(n,t,e,r,i,o,l){for(var u,s,a,c,f,d=n.length,h=-1,p=null,v="",g=!0;++h<d;){if(g===!0)null==p?v+=n[h]:p.push(n[h]);else{if(c=n[h],s=null,a=c.indexOf(":"),-1===a)s=ln(c,e,r,o);else{if(u=a>0?c.substring(0,a).trim():"",""===u&&(u="expression"),c=c.substring(a+1),f=Fn[u],null==f){kn("Undefined custom util `%s`",u);continue}s=f(c,e,r,i,o,l,t)}null!=s&&("object"==typeof s&&null==p&&(p=[v]),null==p?v+=s:p.push(s))}g=!g}return null==p?v:p}function i(){var n=arguments,t=n.length;if(0===t)return rn;if(1===t){var e=n[0];if(w(e))return S(rn,e),void cn("config",e);if(x(e))return E(rn,e)}if(2===t){var r=n[0];O(rn,r)===!1&&wn("Unknown configuration property",r);var e={};return A(e,r,n[1]),A(rn,r,n[1]),void cn("config",e)}}var o=Array.prototype.slice,l=Array.prototype.splice,u=Array.prototype.indexOf,s=null,a=Object.hasOwnProperty,c=Object.getOwnPropertyDescriptor,f=Object.defineProperty,d,h,p,v,g;if(function(){d=function(n,t,e){if(null==e&&(e=n),null==n)return n;for(var r=n.length,i=0;r>i;i++)t.call(e,n[i],i);return e},v=function(n,t){if(null==n)return-1;for(var e=n.length,r=0;e>r;r++)if(n[r]===t)return r;return-1},h=function(n,t){var e=v(n,t);return-1===e?!1:(n.splice(e,1),!0)},p=function(n,t,e){var r=new Array(n.length);return d(n,function(n,e){r[e]=t.call(this,n,e)},e),r},g=function(n,t,e){for(var r=n.length,i=0;r>i;i++)if(t.call(e||n,n[i],i))return!0;return!1}}(),void 0===Array.prototype.forEach&&(Array.prototype.forEach=function(n,t){d(this,n,t)}),void 0===Array.prototype.indexOf&&(Array.prototype.indexOf=function(n){return v(this,n)}),null==String.prototype.trim&&(String.prototype.trim=function(){var n,t=-1,e=this.length;if(0===e)return this;for(;++t<e&&(n=this.charCodeAt(t),!(n>32)););for(;0!==--e&&(n=this.charCodeAt(e),!(n>32)););return 0!==t&&e!==length-1?this.substring(t,e+1):this}),null==Function.prototype.bind){var o;Function.prototype.bind=function(){if(arguments.length<2&&"undefined"==typeof arguments[0])return this;var n=this,t=o.call(arguments),e=t.shift();return function(){return n.apply(e,t.concat(o.call(arguments)))}}}var m,y,b,x,w,k,N,C,_;!function(){m=function(n){return"function"==typeof n},w=function(n){return null!=n&&"object"==typeof n},y=b=function(n){return null!=n&&"object"==typeof n&&"number"==typeof n.length&&"function"==typeof n.slice},x=function(n){return"string"==typeof n},k=function(n){return"string"==typeof n&&""!==n},N=function(n){return null==n||"object"!=typeof n?!1:n.constructor===Object},_="undefined"!=typeof window&&null!=window.navigator,C=!_}();var E,A,O,S,T,j,M,D,I,R,L;!function(){E=function(n,t){if("."===t)return n;for(var e=n,r=t.split("."),i=r.length,o=-1;null!=e&&++o<i;)e=e[r[o]];return e},A=function(n,t,e){for(var r,i=n,o=t.split("."),l=o.length-1,u=-1;++u<l;)r=o[u],null==i[r]&&(i[r]={}),i=i[r];i[o[u]]=e},O=function(n,t){var e=E(n,t);return void 0!==e},L=function(n,t,e){for(var r,i=n,o=t.split("."),l=o.length-1,u=-1;++u<l;)r=o[u],null==i[r]&&(i[r]={}),i=i[r];return r=o[l],f?(void 0===e.writable&&(e.writable=!0),void 0===e.configurable&&(e.configurable=!0),void 0===e.enumerable&&(e.enumerable=!0),void f(i,r,e)):void(i[r]=void 0===e.value?e.value:e.get&&e.get())},S=function(n,t){if(null==t)return n||{};if(null==n)return I(t);for(var e in t)n[e]=t[e];return n},T=function(n,t){if(null==t)return n||{};if(null==n)return I(t);for(var e in t)null==n[e]&&(n[e]=t[e]);return n};var n=function(n){return null==c?n?S:T:function(t,e){if(null==e)return t||{};if(null==t)return I(e);var r,i,o;for(r in e)i=c(e,r),null!=i&&(n===!0||(o=c(t,r),null==o))&&(i.hasOwnProperty("value")?t[r]=i.value:f(t,r,i));return t}};M=n(!0),D=n(!1),j=function(n){for(var t=arguments.length,e=1;t>e;e++)n=S(n,arguments[e]);return n},R=function(n){function t(){}t.prototype=n,new t},s=I=Object.create||function(n){var t=function(){};return t.prototype=n,new t}}();var U,F,H,P,B;!function(){U=function(n,t){var e=n.indexOf(t);return-1===e?!1:(n.splice(e,1),!0)},F=function(n,t,e){n.forEach(t,e)},H=function(n,t){return n.indexOf(t)},P=function(n,t){return-1!==n.indexOf(t)},B=function(n,t){if(null!=t&&null!=n&&n!==t)for(var e=n.length,r=t.length,i=-1;++i<r;)n[e+i]=t[i]}}();var W,G,z,V;!function(){W=function(n,t){return function(){return G(n,t,arguments)}},G=function(n,t,e){var r=e.length;return 0===r?n.call(t):1===r?n.call(t,e[0]):2===r?n.call(t,e[0],e[1]):3===r?n.call(t,e[0],e[1],e[2]):4===r?n.call(t,e[0],e[1],e[2],e[3]):n.apply(t,e)},z=function(){return!1},V=function(n,t){var e=n.length;return function(){var r,i=arguments.length,o=-1;n:for(;++o<e;)if(r=n[o],r.pattern.length===i){for(var l=-1;++l<i;){var u=r.pattern[l],s=arguments[l];if(u(s)===!1)continue n}return r.handler.apply(t,arguments)}return console.error("InvalidArgumentException for a function",n,arguments),null}}}();var K;!function(){K=function(t){for(var e,r=arguments.length,i=0;++i<r;)e=arguments[i],w(e)&&e.toJSON&&(e=e.toJSON()),t=t.replace(n(i-1),String(e));return t};var n;!function(){n=function(n){return t[n]||(t[n]=new RegExp("\\{"+n+"\\}","g"))};var t={}}()}();var X,Y;!function(){function n(n){return function(){var r=o.call(arguments),i=r.pop();null==i&&(i={});for(var l,u,s=i.hasOwnProperty("constructor")?i.constructor:function(){},a=r.length;--a>-1;)u=r[a],"function"==typeof u&&(l=e(u,l),u=u.prototype),n(i,u);return t(e(l,s),i)}}function t(n,t){return t.constructor=n,n.prototype=t,n}function e(n,t){return null==n?t:null==t?n:function(){var e=o.call(arguments),r=n.apply(this,e);return void 0!==r?r:t.apply(this,e)}}X=n(T),Y=n(D)}();var q,J,Q,Z;!function(){function n(n,e){var r=n.hasOwnProperty("constructor")?n.constructor:null;return function(){L(this,"stack",{value:t(e||3)}),L(this,"message",{value:K.apply(this,arguments)}),null!=r&&r.apply(this,arguments)}}function t(n){var t=(new Error).stack;return null==t?null:t.split("\n").slice(n).join("\n")}q=function(t,e,r){var i=n(e,r);return i.prototype=new Error,e.constructor=Error,e.name=t,S(i.prototype,e),i},J=function(n,t,e){var r=Z(n,t),i=r[0],o=r[1],l=r[2],u="";return null!=e&&(u+=K(" at {0}({1}:{2})\n",e,o,l)),u+Q(i,o,l)},Z=function(n,t){var e=n.substring(0,t).split("\n"),r=e.length,i=t+1-e.slice(0,r-1).join("\n").length;return r>1&&(i-=1),[n.split("\n"),r,i]},function(){function n(n,t){for(var e=String(n);e.length<t;)e+=" ";return e}function t(n,t){for(var e="";--t>-1;)e+=n;return e}Q=function(e,r,i){var o=3,l=2,u=r-o,s=u+o+l,a="";0>u&&(u=0),s>e.length&&(s=e.length);for(var c,f=String(s).length;s>u;u++)a&&(a+="\n"),c=n(u+1,f),a+=c+"|"+e[u],u+1===r&&(a+="\n"+t(" ",f+1),a+=e[u].substring(0,i-1).replace(/[^\s]/g," "),a+="^");return a}}()}();var nn;!function(){function n(n,t,e,r){return null==r?n:(null!=t?G(r,n,t):e.push(r),n)}function t(n){n._done=null,n._fail=null,n._always=null}function e(n,t,e){if(null!=n){for(var r,i=n.length,o=-1;++o<i;)r=n[o],r&&G(r,t,e);n.length=0}}function r(n){return null==n||"object"!=typeof n?!1:n instanceof nn?!0:"function"==typeof n.done&&"function"==typeof n.fail}nn=function(){},nn.prototype={_isAsync:!0,_done:null,_fail:null,_always:null,_resolved:null,_rejected:null,defer:function(){return this._rejected=null,this._resolved=null,this},isResolved:function(){return null!=this._resolved},isRejected:function(){return null!=this._rejected},isBusy:function(){return null==this._resolved&&null==this._rejected},resolve:function(){var n=this._done,r=this._always;return this._resolved=arguments,t(this),e(n,this,arguments),e(r,this,[this]),this},reject:function(){var n=this._fail,r=this._always;return this._rejected=arguments,t(this),e(n,this,arguments),e(r,this,[this]),this},then:function(n,t){return this.pipe(n,t)},done:function(t){return null!=this._rejected?this:n(this,this._resolved,this._done||(this._done=[]),t)},fail:function(t){return null!=this._resolved?this:n(this,this._rejected,this._fail||(this._fail=[]),t)},always:function(t){return n(this,this._rejected||this._resolved,this._always||(this._always=[]),t)},pipe:function(n){function t(n,t,e){return function(){if(null!=e){var i=e.apply(this,arguments);if(null!=i)return r(i)===!0?void i.pipe(n):void n[t](i)}n[t].apply(n,arguments)}}var e;if("function"==typeof n){e=new nn;var i=n,o=arguments.length>1?arguments[1]:null;return this.done(t(e,"resolve",i)).fail(t(e,"reject",o)),e}e=n;for(var l,u=arguments.length,s=1===u,a=1===u,c=0;++c<u;)switch(l=arguments[c]){case"done":s=!0;break;case"fail":a=!0;break;default:console.error("Unsupported pipe channel",arguments[c])}return s&&this.done(t(e,"resolve")),a&&this.fail(t(e,"reject")),this},pipeCallback:function(){var n=this;return function(t){if(null!=t)return void n.reject(t);var e=o.call(arguments,1);G(n.resolve,n,e)}}},nn.run=function(n,t){var e=new nn;return null==t&&(t=e),n.call(t,W(e.resolve,t),W(e.reject,e),e),e}}();var tn;!function(){function n(){var n,t,e=o.call(arguments),r=e.shift(),i=this._listeners[r],l=0;if(null==i)return this;for(t=i.length;t>l;l++)n=i[l],G(n,this,e),n._once===!0&&(i.splice(l,1),l--,t--);return this}tn=function(){this._listeners={}},tn.prototype={on:function(n,t){return null!=t&&(this._listeners[n]||(this._listeners[n]=[])).push(t),this},once:function(n,t){return null!=t&&(t._once=!0,(this._listeners[n]||(this._listeners[n]=[])).push(t)),this},pipe:function(n){var t,e=this;return function(){t=o.call(arguments),t.unshift(n),G(e.trigger,e,t)}},emit:n,trigger:n,off:function(n,t){var e=this._listeners[n];if(null==e)return this;if(1===arguments.length)return e.length=0,this;for(var r=e.length,i=-1;++i<r;)e[i]===t&&(e.splice(i,1),i--,r--);return this}}}();var en={"'":/\\'/g,'"':/\\"/g,"{":/\\\{/g,">":/\\>/g,";":/\\>/g},rn={allowCache:!0,preprocessor:{style:null,script:null},base:null,modules:"default",getFile:null,getScript:null,buildStyle:null,buildScript:null},on;!function(){on=function(n,t){if(null==n)return null==t?{}:I(t);if(null==t)return n;var e;for(e in t)"class"!==e||"string"!=typeof n[e]?n[e]=t[e]:n[e]+=" "+t[e];return n}}();var B;!function(){B=function(n,t){if(null!=t&&null!=n)for(var e=n.length,r=t.length,i=-1;++i<r;)n[e+i]=t[i]}}();var ln,un;!function(){function n(n,t,e,r){for(var i=e,o=n;r>i&&null!=o;)o=o[t[i]],i++;return o}function t(t,e,r,i){for(;null!=t;){var o=t.scope;if(null!=o){var l=n(o,e,r,i);if(null!=l)return l}t=t.parent}return null}ln=function(e,r,i,o){if("."===e)return r;var l=e.split("."),u=l.length,s=l[0];if("$c"===s&&(Cn("accessor.compo","Use `$` instead of `$c`"),s="$"),"$u"===s&&(Cn("accessor.util","Use `_` instead of `$u`"),s="_"),"$"===s)return n(o,l,1,u);if("$a"===s)return n(o&&o.attr,l,1,u);if("_"===s)return n(Yn,l,1,u);if("$ctx"===s)return n(i,l,1,u);if("$scope"===s)return t(o,l,1,u);var a=n(r,l,0,u);return null!=a?a:t(o,l,0,u)},un=function(n){var t,e=[],r=0;for(t in n)e[r++]={key:t,value:n[t]};return e}}();var sn,an,cn;!function(){sn=function(t,e){(n[t]||(n[t]=[])).push(e)},an=function(t,e){return null==e?void(n[t]=[]):void U(n[t],e)},cn=function(t){var e=n[t];if(null==e)return!1;var r=e.length,i=-1,l=o.call(arguments,1);if(0===r)return!1;for(;++i<r;)e[i].apply(null,l);return!0};var n={compoCreated:null,error:null}}();var fn,dn,hn,pn,vn,gn,mn,yn,bn,xn,wn,kn,Nn,Cn;!function(){function n(n,t){return function(t,e,r,u,s,a){var c=new n(t),f=o(u);f&&(c.message+=f);var d=l(s);d&&(c.message+=d);var h=J(e,r,a);h&&(c.message+="\n"+h),i(c,"error")}}function t(n,t){return function(e,r,o,l){var u=new n(e);u.message="\n"+J(r,o,l),i(u,t)}}function e(n,t){return function(e,o){var l=new n(e);l.message=l.message+"\n"+r(o),i(l,t)}}function r(n){for(var t=[n],e=n.parent;null!=e;)t.unshift(e),e=e.parent;var r="",i=t[0];return i!==n&&x(i.source)&&n.sourceIndex>-1&&(r+=J(i.source,n.sourceIndex,i.filename)+"\n"),r+="  at "+t.map(function(n){return n.tagName}).join(" > ")}function i(n,t){if(!cn(t,n)){var e="error"===t?kn:wn;e(n.message),e("\n"+n.stack)}}function o(n){return null==n?"":("number"==typeof n&&(n=String.fromCharCode(n))," Invalid token: `"+n+"`")}function l(n){var t={2:"tag",3:"tag",5:"attribute key",6:"attribute value",8:"literal","var":"VarStatement",expr:"Expression"};return null==n||null==t[n]?"":" in `"+t[n]+"`"}!function(){if("undefined"==typeof console)return void(xn=wn=kn=function(){});var n=Function.prototype.bind;xn=n.call(console.warn,console),wn=n.call(console.warn,console,"MaskJS [Warn] :"),kn=n.call(console.error,console,"MaskJS [Error] :")}();var u=4,s=q("MaskError",{},u),a=q("MaskWarn",{},u);fn=function(n){kn(n),cn("error",n)},vn=t(s,"error"),gn=e(s,"error"),yn=t(a,"warn"),bn=e(a,"warn"),dn=n(s,"error"),hn=n(a,"warn"),Nn=function(n){return xt('div style="background:red;color:white;">tt>"""'+n+'"""')},function(){Cn=function(t,e){void 0===n[t]&&(n[t]=1,wn("[deprecated]",e))};var n={}}()}();var _n,En,An,On,Sn,Tn,jn,Mn,$n,Dn;!function(){function t(n){for(var t=n;o.test(t);)t=t.replace(o,"");return t}function e(n){return 47===n.charCodeAt(n.length-1)?n:n+"/"}function r(n){return e(n.replace(l,""))}_n=function(n){return n.substring(0,n.lastIndexOf("/")+1)},En=function(n){return n=n.replace("file://","").replace(/\\/g,"/").replace(/\?[^\n]+$/,""),/^\/\w+:\/[^\/]/i.test(n)?n.substring(1):n},An=function(n){var t=n.indexOf("?");-1!==t&&(n=n.substring(0,t));var e=u.exec(n);return null==e?"":e[1]},Dn=function(n,t,e){var r=-1===n.indexOf("?")?"?":"&";return n+r+t+"="+e},function(){function t(){var t=n.document.baseURI;return"file:"===t.substring(0,5)?t:t.replace(n.location.origin,"")}function e(){return n.location.pathname}var i;On=function(){if(null!=i)return i;var o="baseURI"in n.document?t:e;return i=r(o())}}(),Sn=function(n){var e=n.replace(/\\/g,"/").replace(/([^:\/])\/{2,}/g,"$1/").replace(/^\.\//,"").replace(/\/\.\//g,"/");return t(e)},Tn=function(n,t){var e=Sn(n);return Mn(e)?Sn(jn(t||On(),e)):i.test(e)?e:47===e.charCodeAt(0)&&rn.base?jn(rn.base,e):e},Mn=function(n){var t=n.charCodeAt(0);switch(t){case 47:return!1;case 102:case 104:return i.test(n)===!1}return!0},$n=function(n,t,e){var r=Tn(Sn(n),e),i=Tn(Sn(t),e);return""!==An(i)&&(i=_n(i)),i=jn(i,"/"),0===r.toUpperCase().indexOf(i.toUpperCase())?r.substring(i.length):n},jn=function(){for(var n,e="",r=arguments.length,i=-1;++i<r;)n=arguments[i],n&&(n=Sn(n),""!==e?("/"!==e[e.length-1]&&(e+="/"),"/"===n[0]&&(n=n.substring(1)),e+=n):e=n);return t(e)};var i=/^(file|https?):/i,o=/[^\/\.]+\/\.\.\//,l=/\/[^\/]+\.\w+(\?.*)?(#.*)?$/,u=/\.(\w+)$/}();var In,Rn,Ln,Un;!function(){function t(n,t,e){t=Tn(t,e);var r=i[t];return void 0!==r?r:(r=new nn,n(t,r.pipeCallback()),r)}In=function(n,e){return t(u,n,e)},Rn=function(n,e){return t(o,n,e)},Ln=function(n,e){return t(l,n,e)},Un=function(n,e){return t(r,n,e)};var r,i={};!function(){r=function(n,t){u(n,function(n,e){if(n)return t(n);try{var r=JSON.parse(e);t(null,r)}catch(n){t("JSON error: "+String(n))}})}}();var o;!function(){o=function(n,e){var i=new r(n).done(function(n){e(null,n)}).fail(function(n){e(n)});t.load(i)};var t,r=X(nn,{exports:null,url:null,state:0,constructor:function(n){this.url=n},load:function(){if(0!==this.state)return this;this.state=1,n.module={};var t=this;return i(this.url,function(e){return t.state=4,e&&"error"===e.type?void t.reject(e):void t.resolve(t.exports=n.module.exports)}),this}});!function(){function n(){if(0!==e.length){var t=e[0];0===t.state&&t.load().always(n)}}t={load:function(t){e.push(t),n()}};var e=[]}();var i;!function(){i=function(t,r){var i=e.createElement("script");i.type="text/javascript",i.src=t,"onreadystatechange"in i?i.onreadystatechange=function(){("complete"===this.readyState||"loaded"===this.readyState)&&r()}:i.onload=i.onerror=r,void 0===n&&(n=e.getElementsByTagName("head")[0]),n.appendChild(i)};var n}()}();var l;!function(){l=function(t,e){n(t),e()};var n;!function(){n=function(n,r){var i=e.createElement("style");i.rel="stylesheet",i.href=n,"onreadystatechange"in i?i.onreadystatechange=function(){("complete"===this.readyState||"loaded"===this.readyState)&&r()}:i.onload=i.onerror=r,void 0===t&&(t=e.getElementsByTagName("head")[0]),t.appendChild(i)};var t}()}();var u;!function(){u=function(n,t){var e=new XMLHttpRequest;e.onreadystatechange=function(){if(4===e.readyState){var r,i,o=e.responseText,l=e.status;0!==l&&200!==l&&(i=o||e.statusText),0===l&&""===o&&(i=o||e.statusText||"File is not accessable"),null!=i&&(r={status:l,content:i},wn("File error",n,l)),t(r,o)}},e.open("GET",n,!0),e.send()}}()}();var Fn,Hn,Pn,Bn,Wn,Gn,zn,Vn,Kn,Xn,Yn,qn,Jn,Qn,Zn,nt,tt,et,rt,it,ot,lt,ut;!function(){var n={a:null,abbr:null,article:null,aside:null,audio:null,b:null,big:null,blockquote:null,br:null,button:null,canvas:null,datalist:null,details:null,div:null,em:null,fieldset:null,footer:null,form:null,h1:null,h2:null,h3:null,h4:null,h5:null,h6:null,header:null,i:null,img:null,input:null,label:null,legend:null,li:null,menu:null,nav:null,ol:null,option:null,p:null,pre:null,section:null,select:null,small:null,span:null,strong:null,svg:null,table:null,tbody:null,td:null,textarea:null,tfoot:null,th:null,thead:null,tr:null,tt:null,ul:null,video:null},t={"class":null,id:null,style:null,name:null,type:null,value:null,required:null,disabled:null};Fn={expression:function(n,t,e,r,i){return st(n,t,e,i)}},Kn={},Hn={},Pn=S({},t),Bn=S({},n),Wn=S({},n),zn=S({},n),Vn=S({},n),Gn={},function(){function n(n){return w(n)||m(n)}function t(n){function t(n,t){this.ID=null,this.tagName=n.tagName,this.attr=I(n.attr),this.expression=n.expression,this.nodes=n.nodes,this.nextSibling=n.nextSibling,this.parent=t,this.components=null}return t.prototype=n,t}function e(n){return w(n)&&(n.__Ctor=t(n)),n}Jn=function(n,t){if(0===arguments.length)return Cn("getHandler.all","Use `mask.getHandlers` to get all components (also scoped)"),Qn();var e=Bn[n];if(null==e)return null;if(e!==r)return e;for(var i=m(t)?t.prototype:t;null!=i;){if(m(i.getHandler)&&(e=i.getHandler(n),null!=e))return e;i=i.parent}return Wn[n]},Qn=function(n){if(null==n)return Bn;for(var t,e={},i=n;null!=i;)t=null,t=m(i.getHandlers)?i.getHandlers():i.__handlers__,null!=t&&(e=T(e,t)),i=i.parent;for(var o in Bn)t=Bn[o],null!=t&&t!==r&&null==e[o]&&(e[o]=t);return e},Zn=function(n,t){if("string"!=typeof n&&3===arguments.length)return void nt.apply(this,arguments);var i=(Bn[n],e(t)),o=Bn[n]===r?Wn:Bn;o[n]=i,R(Bn)},tt=function(n,t,e){var r=new nn;return new mt.ModuleMask(e||"").preprocess_(n,function(n,e){if(n)return r.reject(n);var i=e.__handlers__;for(var o in i)null==e[o]?nt(t,o,i[o]):Zn(o,i[o]);r.resolve(e.__handlers__)}),r},nt=function(n,t,r){if(null==n)return void Zn(t,r);et(t);var i=m(n)?n.prototype:n,o=i.__handlers__;null==o&&(o=i.__handlers__={}),o[t]=e(r),null==i.getHandler&&(i.getHandler=it)},ot=V([{pattern:[x],handler:function(n){return tt(n)}},{pattern:[x,x],handler:function(n,t){var e=Jn(n);return tt(t,e)}},{pattern:[n,x],handler:function(n,t){return tt(t,n)}},{pattern:[x,n],handler:function(n,t){return Zn(n,t)}},{pattern:[n,x,n],handler:function(n,t,e){nt(n,t,e)}},{pattern:[x,x,n],handler:function(n,t,e){var r=Jn(n);return nt(r,t,e)}}]),et=function(n){var t=Bn[n];t!==r&&(null!=t&&(Wn[n]=t),Bn[n]=r,R(Bn))},it=function(n){var t=this.__handlers__;return null==t?null:t[n]},lt={async:!1,attr:null,await:null,compoName:null,components:null,expression:null,ID:null,meta:null,model:null,nodes:null,parent:null,render:null,renderEnd:null,renderStart:null,tagName:null,type:null};var r;!function(){rt=r=function(n,t,e,r,i){var o=Jn(n.tagName,i);return null!=o?m(o)===!1?I(o):new o(n,t,e,r,i):(gn("Component not found: "+n.tagName,n),null)}}()}(),function(){function n(n){if("parsed"===n.arguments)return e(n.process);var r=W(n.process||t,n);return r.util=n,r}function t(n,t,e,r,i,o,l){return"node"===l?(this.nodeRenderStart(n,t,e,r,i),this.node(n,t,e,r,i)):(this.attrRenderStart(n,t,e,r,i,o),this.attr(n,t,e,r,i,o))}function e(n){return function(t,e,r,i,o){var l=at(t,e,r,o);return n.apply(null,l)}}Yn={},qn=function(t,e){return m(e)?void(Fn[t]=e):(Fn[t]=n(e),void("parsed"===e.arguments&&(Yn[t]=e.process)))},Xn=function(n){return null!=n?Fn[n]:Fn}}(),function(){function n(n){for(var t in n)r[t]=null}function t(n){for(var t in r)void 0===n[t]&&(n[t]=null)}ut=function(){for(var r=e.length;--r>-1;)n(e[r]);for(r=e.length;--r>-1;)t(e[r]),R(e[r]);R(Pn)};var e=[Hn,Bn,zn,Vn],r={}}()}();var st,at,ct;!function(){function n(n,t){null==t&&(t=!1),r=n,o=0,l=n.length,i=new rn;var e,u,m=i,_=Z;n:for(;;)if(l>o&&(e=r.charCodeAt(o))<33)o++;else{if(o>=l)break;if(u=An(e),null==u&&l>o)break;if(u===R){if(t===!0)return[i,o];break}if(t===!0){var X=m.parent;if(null!=X&&X.type===B&&null==X.parent&&u===L)return[i,o]}if(u===R)break;switch(u){case E:m=mn(m,new on(m)),m=mn(m,new rn(m)),o++;continue;case A:var J=B;_===nn&&(_=Z,J=z);do m=m.parent;while(null!=m&&m.type!==J);if(J===B&&(m=m.parent),null==m){bn("OutOfAst Exception",e);break n}o++;continue;case T:m=mn(m,new sn(m)),u=P,o++;break;case j:for(;null!=m&&m.type!==Y;)m=m.parent;o++;continue;case M:if(_!==nn){_=Z;do m=m.parent;while(null!=m&&m.type!==B&&m.type!==Y);if(o++,null==m){bn("Unexpected comma",e);break n}if(m.type===Y){u=P;break}continue}do m=m.parent;while(null!=m&&m.type!==z);if(null==m){bn("OutOfAst Exception",e);break n}m=m.newArgument(),o++;continue;case D:i=new vn(i),m=i.case1,o++;continue;case I:m=i.case2,o++;continue;case $:e=r.charCodeAt(o+1),e>=48&&57>=e?u=H:(u=m.type===B?L:U,o++);break;case O:if(m.type===G||m.type===K||m.type===V){m=mn(m,new hn(m)),m=m.getBody(),o++;continue}m=mn(m,new un(m)),m=m.body,o++;continue;case S:do m=m.parent;while(null!=m&&m.type!==K&&m.type!==q);o++;continue}if(m.type===B&&(m=mn(m,new on(m))),s!==u&&v!==u||null!=m.body)switch(u){case s:case a:case f:case c:case d:case p:case h:case g:case y:case b:case x:case w:case k:case N:case C:for(;m&&m.type!==W;)m=m.parent;if(null==m.body)return bn("Unexpected operator",e);m.join=u;do m=m.parent;while(null!=m&&m.type!==B);if(null==m)return bn("Unexpected operator",e);o++;continue;case F:case H:if(null!=m.body&&null==m.join)return bn("Directive expected",e);F===u&&(o++,mn(m,new ln(Nn(e))),o++),H===u&&mn(m,new ln(_n(e)));continue;case L:case U:var Q=En();if(u===L&&("null"===Q&&(Q=null),"false"===Q&&(Q=!1),"true"===Q&&(Q=!0),"string"!=typeof Q)){mn(m,new ln(Q));continue}for(;l>o;){e=r.charCodeAt(o);{if(!(33>e))break;o++}}if(40===e){_=nn,o++;var tn=mn(m,new an(m,Q));m=tn.newArgument();continue}var en=u===L?cn:fn;m=mn(m,new en(m,Q));break;case P:if(125===xn())continue;var dn=En();if(58!==xn())return bn("Object parser. Semicolon expeted",e);o++,m=m.nextProp(dn),u=L;continue}else m=mn(m,new pn(m,u)),o++}return null==m.body&&m.type===W?bn("Unexpected end of expression",e):(gn(i),i)}function t(e,r,i,o){var l,m;if(null==e)return null;if("."===e)return r;if(m="string"==typeof e?u.hasOwnProperty(e)===!0?u[e]:u[e]=n(e):e,null==m)return null;var _,E,A,O=m.type;if(B===O){var S,T;n:for(_=0,A=m.body.length;A>_;_++)if(E=m.body[_],S=t(E,r,i,o),null!=T&&null!=T.join){if(T.join===p)if(l)l=S;else for(;A>_&&m.body[_].join!==h;_++);if(T.join===h){if(l)break n;if(S){l=S;break n}}switch(T.join){case s:l-=S;break;case a:l+=S;break;case c:l/=S;break;case f:l*=S;break;case d:l%=S;break;case b:l=l!=S;break;case x:l=l!==S;break;case g:l=l==S;break;case y:l=l===S;break;case w:l=l>S;break;case k:l=l>=S;break;case N:l=S>l;break;case C:l=S>=l}T=E}else T=E,l=S}if(W===O)return l=t(m.body,r,i,o),null==m.next?l:yn(m.next,l);if(X===O)return m.body;if(q===O){var j=m.body.body,M=j.length,_=-1;for(l=new Array(M);++_<M;)l[_]=t(j[_],r,i,o);return l}if(Y===O){l={};var $=m.props;for(var D in $)l[D]=t($[D],r,i,o);return l}if(G===O||z===O||K===O||V===O)return yn(m,r,i,o);if(J===O)switch(l=t(m.body,r,i,o),m.prefix){case s:l=-l;break;case v:l=!l}return Q===O&&(l=t(m.body,r,i,o),l=t(l?m.case1:m.case2,r,i,o)),l}function e(e,r,i,o){for(var l=n(e).body,u=[],s=l.length,a=-1,c=new rn;++a<s;)c.body.push(l[a]),null==l[a].join&&(u.push(t(c,r,i,o)),c.body.length=0);return u}var r,i,o=0,l=0,u={},s="-",a="+",c="/",f="*",d="%",h="||",p="&&",v="!",g="==",y="===",b="!=",x="!==",w=">",k=">=",N="<",C="<=",_=".",E=20,A=21,O=22,S=23,T=24,j=25,M=26,$=27,D=28,I=29,R=30,L=31,U=32,F=33,H=34,P=35,B=1,W=2,G=3,z=4,V=5,K=6,X=7,Y=10,q=11,J=12,Q=13,Z=1,nn=2,tn={};tn[_]=1,tn[c]=2,tn[f]=2,tn[s]=3,tn[a]=3,tn[w]=4,tn[k]=4,tn[N]=4,tn[C]=4,tn[g]=5,tn[y]=5,tn[b]=5,tn[x]=5,tn[p]=6,tn[h]=6;var rn,on,ln,un,sn,an,cn,fn,hn,pn,vn;!function(){rn=function(n){this.parent=n,this.type=B,this.body=[],this.join=null},on=function(n){this.parent=n},on.prototype={constructor:on,type:W,join:null,body:null},ln=function(n){this.type=X,this.body=n,this.join=null},un=function(n){this.type=q,this.parent=n,this.body=new rn(this)},sn=function(n){this.type=Y,this.parent=n,this.props={}},sn.prototype={nextProp:function(n){var t=new on(this);return this.props[n]=t,t}},an=function(n,t){this.parent=n,this.type=z,this.body=t,this.arguments=[],this.next=null},an.prototype={constructor:an,newArgument:function(){var n=new rn(this);return this.arguments.push(n),n}},cn=function(n,t){this.type=G,this.parent=n,this.body=t,this.next=null},fn=function(n,t){this.type=V,this.parent=n,this.body=t,this.next=null},hn=function(n){this.parent=n,this.body=new on(this),this.body.body=new rn(this.body),this.next=null},hn.prototype={type:K,getBody:function(){return this.body.body}},pn=function(n,t){this.parent=n,this.prefix=t},pn.prototype={constructor:pn,type:J,body:null},vn=function(n){this.body=n,this.case1=new rn(this),this.case2=new rn(this)},vn.prototype={constructor:vn,type:Q,case1:null,case2:null}}();var gn,mn;!function(){function n(n){if(0===n.length)return null;var t=new rn(n[0].parent);return t.join=n[n.length-1].join,t.body=n,t}mn=function(n,t){switch(n.type){case B:return n.body.push(t),t;case W:if(t.type===V||t.type===K)return n.next=t;case J:return n.body=t;case G:case z:case V:case K:return n.next=t}return bn("Invalid expression")},gn=function(t){if(t.type!==B)return void(null!=t.body&&"object"==typeof t.body&&gn(t.body));for(var e,r,i,o=t.body,l=0,u=o.length;u>l;l++)gn(o[l]);for(l=1;u>l&&(e=o[l],r=o[l-1],!(tn[r.join]>tn[e.join]));l++);if(l!==u){for(i=[o[0]],l=1;u>l;l++){e=o[l],r=o[l-1];var s=tn[r.join];if(s>tn[e.join]&&u-1>l){for(var a,c,f=l;++l<u&&(a=o[l].join,null!=a)&&!(s<=tn[a]););c=o.slice(f,l+1),e=n(c),gn(e)}i.push(e)}t.body=i}}}();var yn,bn;!function(){bn=function(n,t){return dn(n,r,o,t,"expr")},yn=function(n,e,r,i){var o,l,u,s,a,c=i,f=n,d=n.body;if("$c"===d&&(Cn("accessor.compo","Use `$` instead of `$c`."),d="$"),"$u"===d&&(Cn("accessor.util","Use `_` instead of `$u`"),d="_"),"$a"===d&&Cn("accessor.attr","Use `$.attr` instead of `$a`"),"$"===d){l=c;var h=f.next,p=null!=h&&h.body;if(null!=p&&null==l[p]){if(h.type===z&&m($t.prototype[p]))o=c,l=$t.prototype[p],f=h;else for(;;){if(l=l.parent,null==l)break;if(null!=l[p]){o=l,l=l[p],f=h;break}}null==l&&(d="$."+p,f=h)}}else if("$a"===d)l=c&&c.attr;else if("_"===d)l=Yn;else if("$ctx"===d)l=r;else if("$scope"===d){var h=f.next,p=null!=h&&h.body;if(null!=p){for(;null!=c&&(o=c.scope,null!=o&&(l=o[p]),null==l);)c=c.parent;f=h}}else if(null!=e&&(o=e,l=e[d]),null==l)for(;null!=c&&(o=c.scope,null!=o&&(l=o[d]),null==l);)c=c.parent;if(null==l)return(null==f||null!=f.next)&&wn("<mask:expression> Accessor error:",d),null;for(;;){if(f.type===z){for(u=[],s=-1,a=f.arguments.length;++s<a;)u[s]=t(f.arguments[s],e,r,c);l=l.apply(o,u)}if(null==l||null==f.next)break;if(f=f.next,d=f.type===K?t(f.body,e,r,c):f.body,o=l,l=l[d],null==l)break}return l}}();var xn,Nn,_n,En,An;!function(){xn=function(){for(var n;l>o;){if(n=r.charCodeAt(o),n>32)return n;o++}return null},Nn=function(n){for(var t,e,i=!1,l=39===n?"'":'"',u=o;(t=r.indexOf(l,o))>-1&&(o=t,92===r.charCodeAt(t-1));)i=!0,o++;return e=r.substring(u,o),i===!0&&(e=e.replace(en[l],l)),e},_n=function(){for(var n,t,e=o;;){if(n=r.charCodeAt(o),46===n){if(t===!0)return bn("Invalid number",n),null;t=!0}if(!((n>=48&&57>=n||46===n)&&l>o))break;o++}return+r.substring(e,o)},En=function(){var n,t=o,e=r.charCodeAt(o);if(34===e||39===e)return o++,n=Nn(e),o++,n;for(;;){if(o===l)break;if(e=r.charCodeAt(o),36!==e&&95!==e){if(!(e>=48&&57>=e||e>=65&&90>=e||e>=97&&122>=e))break;o++}else o++}return r.substring(t,o)},An=function(n){if(null==n&&o===l)return null;switch(n){case 40:return E;case 41:return A;case 123:return T;case 125:return j;case 91:return O;case 93:return S;case 44:return M;case 46:return $;case 59:return R;case 43:return a;case 45:return s;case 42:return f;case 47:return c;case 37:return d;case 61:return r.charCodeAt(++o)!==n?(bn("Assignment violation: View can only access model/controllers","="),null):r.charCodeAt(o+1)===n?(o++,y):g;case 33:return 61===r.charCodeAt(o+1)?(o++,61===r.charCodeAt(o+1)?(o++,x):b):v;case 62:return 61===r.charCodeAt(o+1)?(o++,k):w;case 60:return 61===r.charCodeAt(o+1)?(o++,C):N;case 38:return r.charCodeAt(++o)!==n?(bn("Not supported: Bitwise AND",n),null):p;case 124:return r.charCodeAt(++o)!==n?(bn("Not supported: Bitwise OR",n),null):h;case 63:return D;case 58:return I}return n>=65&&90>=n||n>=97&&122>=n||95===n||36===n?L:n>=48&&57>=n?H:34===n||39===n?F:(bn("Unexpected or unsupported directive",n),null)}}();var On;!function(){function e(n,l,u,s){if(null==n)return null;var a,c,f=n.type;if(B===f)for(var d=n.body,h=d.length,p=-1;++p<h;)c=e(d[p],l,u,s),a=r(a,c);if(G===f||V===f||K===f){for(var v,g=n.body,m=n.next;null!=m;){if(v=m.type,z===v)return e(m,l,u,s);if(G!==v&&V!==v&&K!==v)return kn("Ast Exception: next should be a symbol/function ref"),null;var y=v===K?t(m.body,l,u,s):m.body;if("string"!=typeof y)return wn("Can`t extract accessor name",g),null;g+="."+y,m=m.next}return g}switch(f){case W:case J:case Q:c=e(n.body,l,u,s),a=r(a,c)}if(Q===f&&(c=e(i.case1,l,u,s),a=r(a,c),c=e(i.case2,l,u,s),a=r(a,c)),z===f){for(var b=n.arguments,h=b.length,p=-1;++p<h;)c=e(b[p],l,u,s),a=r(a,c);c=null;var x=n;n:for(;x=x.parent;)switch(x.type){case G:case V:case K:c=x.body+(null==c?"":"."+c);break;case B:case W:break n;default:c=null;break n}null!=c&&(a=r(a,c)),n.next&&(c=e(n.next,l,u,s),a=r(a,{accessor:o(n),ref:c}))}return a}function r(n,t){if(null==n)return t;if(null==t)return n;if(("object"!=typeof n||null==n.length)&&(n=[n]),"object"!=typeof t||null==t.length)return-1===n.indexOf(t)&&n.push(t),n;for(var e=0,r=t.length;r>e;e++)-1===n.indexOf(t[e])&&n.push(t[e]);return n}function o(n){var t=n;n:for(;t.parent;){switch(t.parent.type){case B:case W:break n}t=t.parent}return l(t,n.next)}function l(n,t){if(n===t||null==n)return null;if("object"!=typeof n)return n;if(null!=n.length&&"function"==typeof n.splice){for(var e=[],r=0,i=n.length;i>r;r++)e[r]=l(n[r],t);return e}var o={};for(var u in n)null!=n[u]&&"parent"!==u&&(o[u]=l(n[u],t));return o}On=function(t,r,i,o){return"string"==typeof t&&(t=n(t)),e(t,r,i,o)}}(),st=t,at=e,ct={parse:n,eval:t,varRefs:On,evalStatements:e}}();var ft;!function(){function n(n){var t=this.nodes;if(null==t)return void(this.nodes=[n]);var e=t.length;if(0!==e){var r=t[e-1];null!=r&&(r.nextSibling=n)}t.push(n)}function t(n,t){this.content=n,this.parent=t}function e(n,t,e){this.tagName=n,this.parent=t,this.controller=e,this.attr={}}var r=1,i=2,o=3,l=4,u=9,s=10,a=15,c=X({constructor:function(n,t){this.type=ft.NODE,this.tagName=n,this.parent=t,this.attr={}},__single:null,appendChild:n,attr:null,expression:null,nodes:null,parent:null,sourceIndex:-1,stringify:null,tagName:null,type:r});t.prototype={type:i,content:null,parent:null},e.prototype={constructor:e,type:l,parent:null,attr:null,controller:null,nodes:null,components:null,model:null,modelRef:null};var f=X({type:o,nodes:null,appendChild:n,source:""});ft={NODE:r,TEXTNODE:i,FRAGMENT:o,COMPONENT:l,CONTROLLER:u,SET:s,STATEMENT:a,Node:c,TextNode:t,Fragment:f,Component:e}}(),function(){function n(n,t,e,r){function i(n){return st(n,t,e,r)}if(i(n.expression))return n.nodes;for(;;){if(n=n.nextSibling,null==n||"else"!==n.tagName)break;var o=n.expression;if(null==o||""===o||i(o))return n.nodes;

}return null}Hn["if"]={getNodes:n,render:function(t,e,r,i,o,l){var u=n(t,e,r,o);null!=u&&Tt(u,e,r,i,o,l)}}}(),function(){function n(n,e,r,i,o,l,u,s){Tt(t(r,n,e[0],e[1],e[2],e[3]),i,o,l,u,s)}function t(n,t,i,o,l,u){return"of"===l?y(t)===!1?(kn("<ForStatement> Value is not enumerable",t),null):e(n,t,i,o,u):"in"===l?"object"!=typeof t?(wn("<ForStatement> Value is not an object",t),null):(y(t)&&wn("<ForStatement> Consider to use `for..of` for Arrays"),r(n,t,i,o,u)):void 0}function e(n,t,e,r,o){for(var l,u=-1,s=t.length,a=new Array(s);++u<s;)l={},l[e]=t[u],r&&(l[r]=u),a[u]=i(h,n,l,u,e,o);return a}function r(n,t,e,r,o){var l,u,s,a=[],c=0;for(u in t)s=t[u],l={},l[e]=u,r&&(l[r]=s),a[c++]=i(p,n,l,u,r,o);return a}function i(n,t,e,r,i,l){return{type:ft.COMPONENT,tagName:n,nodes:t,controller:o(n,e,r,i,l)}}function o(n,t,e,r,i){return{meta:{serializeScope:!0},compoName:n,scope:t,elements:null,propVal:r,key:e,expression:i,renderEnd:l,dispose:u,serializeScope:s}}function l(n){this.elements=n}function u(){this.elements&&(this.elements.length=0)}function s(n,t){var e=this,r=e.expression,i=e.key,o=e.propVal,l=n[o];return null!=l&&"object"==typeof l&&(n[o]="$ref:("+r+')."'+i+'"'),n}function a(n){v=n,m=n.length,g=0;var t,e,r,i,o;if(o=c(),40===o&&(i=!0,g++,c()),t=f(),o=c(),44===o){if(i!==!0)return d("Parenthese must be used in multiple var declarion");g++,c(),e=f()}if(i){if(o=c(),41!==o)return d("Closing parenthese expected");g++}o=c();var r;return 105===o&&110===v.charCodeAt(++g)&&(r="in"),111===o&&102===v.charCodeAt(++g)&&(r="of"),null==r?d("Invalid FOR statement. (in|of) expected"):(b[0]=t,b[1]=e,b[2]=r,b[3]=v.substring(++g),b)}function c(){for(var n;m>g;g++)if(n=v.charCodeAt(g),!(33>n))return n;return-1}function f(){for(var n,t=g;m>g;g++)if(n=v.charCodeAt(g),n>48&&57>n){if(t===g)return d("Variable name begins with a digit")}else if(!(36===n||95===n||n>=97&&122>=n||n>=65&&90>=n))break;return t===g?d("Variable declaration expected"):v.substring(t,g)}function d(n){throw new Error("<ForStatement parser> "+n+" `"+v.substring(g,20)+"`")}var h="for..of::item",p="for..in::item";Hn["for"]={render:function(t,e,r,i,o,l){a(t.expression);var u=st(b[3],e,r,o);null!=u&&n(u,b,t.nodes,e,r,i,o,l)},build:n,parseFor:a,createForNode:i,getNodes:t,getHandler:function(n,t){return o(n,t)}},function(){function n(n){function t(){}return t.prototype={meta:{serializeScope:!0},serializeScope:s,type:ft.COMPONENT,compoName:n,renderEnd:l,dispose:u},t}Bn[h]=n(h),Bn[p]=n(p)}();var v,g,m,b=["prop1","prop2","in|of","expression"]}(),function(){function n(n,e){for(var r=e.length,i=new Array(r),o=n.nodes,l=n.expression,u="."===l?'."':"("+n.expression+')."',s=0;r>s;s++)i[s]=t(o,e[s],u,s);return i}function t(n,t,r,i){return{type:ft.COMPONENT,tagName:"each::item",nodes:n,controller:e(t,i,r)}}function e(n,t,e){return{compoName:"each::item",model:n,scope:{index:t},modelRef:e+t+'"',attr:null,meta:null}}Hn.each={render:function(t,e,r,i,o,l){var u=st(t.expression,e,r,o);null!=u&&Tt(n(t,u),u,r,i,o,l)}}}(),Hn["with"]={render:function(n,t,e,r,i,o){var l=st(n.expression,t,e,i);Tt(n.nodes,l,e,r,i,o)}},function(){function n(n,t,e,r,i){if(null==t)return null;for(var o,l,u,s,a=t.length,c=-1;++c<a;)if(o=t[c],"default"!==o.tagName)if("case"===o.tagName)if(l=o.expression){if(st(l,e,r,i)==n){u=o;break}}else wn("<mask:switch:case> Expression expected");else wn("<mask:switch> Case expected",o.tagName);else s=o;return null==u&&(u=s),null!=u?u.nodes:null}Hn["switch"]={render:function(t,e,r,i,o,l){var u=st(t.expression,e,r,o),s=n(u,t.nodes,e,r,o);null!=s&&Tt(s,e,r,i,o,l)},getNodes:n}}(),function(){function n(n,t){for(var e=0;e<n.length;e++)n[e].style.display=t?"":"none"}Hn.visible={toggle:n,render:function(t,e,r,i,o,l){var u=[];Tt(t.nodes,e,r,i,o,u),B(l,u);var s=st(t.expression,e,r,o);n(u,s)}}}(),function(){function n(n,t,e,r,i,o){return{type:ft.COMPONENT,compoName:n,attr:{},nodes:t,model:e,container:i,parent:o,index:r,scope:{index:r}}}Hn.repeat={render:function(t,e,r,i,o,l){var u=st,s=t.expression,a=s.split(".."),c=+u(a[0]||"",e,r,o),f=+u(a[1]||"",e,r,o);if(c!==c||f!==f)return void kn("Repeat attribute(from..to) invalid",s);for(var d=t.nodes,h=[],p=-1;++p<f;)h[p]=n("repeat::item",d,e,p,i,o);var v=[];Tt(h,e,r,i,o,v),B(l,v)}}}();var dt,ht;!function(){function n(n,t){for(var e="";n--;)e+=t;return e}function t(n){return null==n.nodes||b(n.nodes)&&0===n.nodes.length}function e(n){var t=n.nodes;if(null==t)return!0;var e="number"==typeof t.length;if(e&&t.length>1)return!1;var r=e?t[0]:t;return null==r.stringify}function r(n,t,e){if(null==t&&null==e)return!1;var r=n.tagName;return"div"===r?!0:!1}function i(n){return b(n.nodes)?n.nodes[0]:n.nodes}function o(n){return-1===n.indexOf("'")?"'"+n+"'":-1===n.indexOf('"')?'"'+n+'"':'"'+n.replace(/"/g,'\\"')+'"'}function l(n){return m(n)?n():n}var u={minify:!0,indent:4,indentChar:" "};dt=function(n,t){if(null==n)return"";if("string"==typeof n&&(n=xt(n)),null==t)t=I(u);else if("number"==typeof t){var e=t;t=I(u),t.indent=e,t.minify=0===e}else t=T(t,u),t.indent>0&&(t.minify=!1),t.minify===!0&&(t.indent=0);return new s(n,t).toString()},ht=function(n){var t,e,r="";for(t in n)e=l(n[t]),0!==r.length&&(r+=" "),r+=t,e!==t&&(r+="="+o(e));return r};var s=X({string:"",indent:0,indentStr:"",minify:!1,opts:null,ast:null,constructor:function(t,e){this.opts=e,this.ast=t,this.minify=e.minify,this.indentStr=n(e.indent,e.indentChar)},toString:function(){return this.process(this.ast,this),this.string},process:function(n){if(n.type===ft.FRAGMENT&&(n=n.nodes),b(n))for(var t=n.length,e=-1;++e<t;)0!==e&&this.newline(),this.processNode(n[e]);else this.processNode(n)},processNode:function(n){var r=this;if(m(n.stringify)){var l=n.stringify(r);return void(null!=l&&r.write(l))}return x(n.content)?void r.write(o(n.content)):m(n.content)?void r.write(o(n.content())):(this.processHead(n),t(n)?void r.print(";"):e(n)?(r.openBlock(">"),r.processNode(i(n)),void r.closeBlock(null)):(r.openBlock("{"),r.process(n.nodes),void r.closeBlock("}")))},processHead:function(t){var e,i,l,u=this,s="",a=t.attr;if(null!=a){e=a.id,i=a["class"],"function"==typeof e&&(e=e()),null!=e&&-1!==e.indexOf(" ")&&(e=null),null!=e&&(s+="#"+e),"function"==typeof i&&(i=i()),null!=i&&(s+="."+i.trim().replace(/\s+/g,"."));for(var c in a)if(!("id"===c&&null!=e||"class"===c&&null!=i)){var f=a[c];null!=f&&(s+=" "+c,f!==c&&(m(f)&&(f=f()),x(f)&&(u.minify===!1||/[^\w_$\-\.]/.test(f))&&(f=o(f)),s+="="+f))}}r(t,e,i)===!1&&(s=t.tagName+s);var l=t.expression;null!=l&&("function"==typeof l&&(l=l()),u.minify===!1&&(s+=" "),s+="("+l+")"),this.minify===!1&&(s=n(this.indent,this.indentStr)+s),u.print(s)},newline:function(){this.minify===!1&&(this.string+="\n")},openBlock:function(n){return this.indent++,this.minify===!1?void(this.string+=" "+n+"\n"):void(this.string+=n)},closeBlock:function(n){this.indent--,null!=n&&(this.newline(),this.write(n))},write:function(t){if(this.minify===!0)return void(this.string+=t);var e=n(this.indent,this.indentStr);this.string+=t.replace(/^/gm,e)},print:function(n){this.string+=n}})}();var pt;!function(){function n(n,t,e){return function(){t.parentNode.insertBefore(n,t),e()}}pt=function(){function t(){0===--y&&g&&r()}function r(){m(d.renderEnd)&&d.renderEnd(i,l),$t.signal.emitIn(d,"domInsert")}var i,l,u,s,a,c,f=o.call(arguments);for(s=f.length,a=-1;++a<s;)c=f[a],c instanceof Node?i=c:m(c)?u=c:w(c)&&(l=c);null==i&&(i=e.body);var d=m(u)?new u:new $t;d.ID=++St,null==l&&(l=d.model||{});var h,p=o.call(e.getElementsByTagName("script")),v=!1,g=!1,y=0;for(s=p.length,a=-1;++a<s;)if(h=p[a],"text/mask"===h.getAttribute("type")&&"true"===h.getAttribute("data-run")){v=!0;var b=new jt,x=Tt(xt(h.textContent),l,b,null,d);b.async!==!0?h.parentNode.insertBefore(x,h):(y++,b.done(n(x,h,t)))}return g=!0,v===!1&&wn("No blocks found: <script type='text/mask' data-run='true'>...</script>"),0===y&&r(),d}}();var vt;!function(){function n(n,o,l,s){if(null==n)return null;var a;if(y(n))a=t;else switch(n.type){case O:a=u;break;case A:case j:a=i;break;case T:a=e;break;case M:a=r}return void 0!==a?a(n,o,l,s):(wn("Uknown type",n.type),null)}function t(t,e,r,i){if(null==t)return null;for(var o,l,u=[],s=t.length,a=-1;++a<s;){if(l=t[a],l.tagName===k){if(null!=o)continue;if(l.expression&&!m(l.expression,e,r))continue;o=n(t[a].nodes,e,r,i)}else o=n(l,e,r,i);h(u,o)}return u}function e(n,e,r,i){var o=new ft.Fragment;return o.parent=i,o.nodes=t(n.nodes,e,r,o),o}function r(t,e,r,i){if(null==t.nodes)return t;var o=new ft.Component;return S(o,t),o.nodes=n(o.nodes,e,r,i),o}function i(t,e,r,i){var u=t.tagName;if(64!==u.charCodeAt(0))return l(t,e,r,i);var s=t.attr.id;if(u===_&&null==s){if(null!=r){var a=r.tagName;if(null!=a&&64===r.tagName.charCodeAt(0))return r.nodes}s="$root",e.$extra=null}if(C===u){var c,f=e.$getNode(t.expression);if(null==f)return null==t.attr.optional&&gn("No template node: @"+t.expression,t),null;if(y(f)===!1)return c=f,n(t.nodes,p(c.nodes,c.nodes,new x(e)),c,i);for(var d=new ft.Fragment,v=f.length,b=-1;++b<v;)c=f[b],h(d,n(t.nodes,p(c.nodes,c.nodes,new x(e)),c,i));return d}if(N===u){var w=m(t.expression,e,r);return w?n(t.nodes,e,r,i):null}null==s&&(s=u.substring(1));var k=e.$getNode(s,t.expression);if(null==k)return e.opts.extending===!0?t:null;k.parent&&g(i,k.parent);var E,O=k.nodes;if(void 0!==t.attr.as){var a=t.attr.as;E={type:A,tagName:a,attr:o(t.attr,k.attr,e,r),parent:i,nodes:O},E.attr.as=null}if(null==t.nodes)return n(E||O,e,r,i);var S=n(t.nodes,p(O,O,new x(e)),k,E||i);return null!=E?(E.nodes=S,E):S}function o(n,t,e,r){if(null==n||null==t)return n||t;var i=a(n,e,r);for(var o in t)i[o]=c(t[o],e,r);return i}function l(t,e,r,i){var o=t.tagName||t.compoName;switch(o){case":template":var l=c(t.attr.id,e,r);return Mt.templates.register(l,t.nodes),null;case":import":var l=c(t.attr.id,e,r),u=Mt.templates.resolve(t,l);return n(u,e,r,i);case"define":case"function":case"var":case"import":case"script":case"style":case"slot":case"event":return t;case"include":var o=t.attr.id;if(null==o)for(var s in t.attr){o=s;break}o=c(o,e,r);var f=Jn(o,r);if(null!=f){var d=f.prototype,h=d.template||d.nodes;return e=p(t.nodes,t.nodes,new x(e,t.nodes)),n(h,e,r,i)}break;default:var f=Jn(o,r);if(null!=f){var d=f.prototype;if(d&&null!=d.meta&&"merge"===d.meta.template)return t}}var v={type:t.type,tagName:o,attr:a(t.attr,e,r),expression:c(t.expression,e,r),controller:t.controller,parent:i,nodes:null};return t.nodes&&(v.nodes=n(t.nodes,e,r,v)),v}function u(n,t,e,r){return{type:n.type,content:c(n.content,t,e),parent:r}}function a(n,t,e){var r,i=s(n);for(var o in i)r=i[o],null!=r&&(i[o]=c(r,t,e));return i}function c(n,t,e){var r=-1,i=!1,o=n;if("function"==typeof n&&(i=!0,o=n()),"string"!=typeof o||-1===(r=o.indexOf("@")))return n;for(var l,u=o.substring(0,r),s=o.length,a=91===o.charCodeAt(r+1),c=-1;s>r;){if(c=r,a===!0)r=o.indexOf("]",c),-1===r&&(r=s),c+=2;else for(;s>r&&(l=o.charCodeAt(++r),36===l||95===l||46===l||l>=48&&57>=l||l>=65&&90>=l||l>=97&&122>=l););var d=o.substring(c,r),h=a?m:f,p=h(d,t,e);null!=p?u+=p:t.opts.extending===!0&&(u+=a?"@["+d+"]":d),c=a?r+1:r,r=o.indexOf("@",r),-1===r&&(r=s),u+=o.substring(c,r)}return i?_t(u):u}function f(n,t,e){var r=n.indexOf(".");if(-1===r)return wn("Merge templates. Accessing node",n),null;var i=n.substring(0,r),o=i.substring(1),l=n.substring(r+1),u=null;if(null!=e){if("@attr"===i)return d(e,t,l);if("@counter"===i)return w(l);i===e.tagName&&(u=e)}return null==u&&(u=t.$getNode(o)),null==u?null:E(u,l)}function d(n,t,e){for(var r=n.attr&&n.attr[e],i=t;null==r&&null!=i;)r=i.attr&&i.attr[e],i=i.parent;return r}function h(n,t){if(null!=t)if("function"!=typeof t.concat){if(t.type===T)return void h(n,t.nodes);if("function"==typeof n.appendChild)return void n.appendChild(t);var e=n.length;if(e>0){var r=n[e-1];r.nextSibling=t}n.push(t)}else for(var i=t.length,o=0;i>o;o++)h(n,t[o])}function p(n,t,e){if(null==t)return e;if(y(t)){for(var r=t.length,i=-1;++i<r;)p(t===n?t[i]:n,t[i],e);return e}var o=t.type;if(o===O)return e;if(o===A){var l=t.tagName;if(null!=l&&64===l.charCodeAt(0)){e.$count++;var u=l.substring(1),s={tagName:t.tagName,parent:v(n,t),nodes:t.nodes,attr:t.attr,expression:t.expression};if(null==e[u])e[u]=s;else{var a=e[u];y(a)?a.push(s):e[u]=[a,s]}return e}}var c=e.$count,f=p(n,t.nodes,e);return n===t&&c===e.$count&&e.$extra.push(n),f}function v(n,t){if(t===n)return null;for(var e,r,i=t.parent;;){if(null==i)break;if(i===n&&n.type!==A)break;var o={type:i.type,tagName:i.tagName,attr:i.attr,controller:i.controller,expression:i.expression,nodes:null,parent:null};null==r?e=r=o:(e.parent=o,e=o),i=i.parent}return r}function g(n,t){for(var e=n,r=t;null!=e&&null!=r;){r.tagName&&(e.tagName=r.tagName),r.expression&&(e.expression=r.expression);for(var i in r.attr)e.attr[i]=r.attr[i];e=e.parent,r=r.parent}}function m(n,t,e){return null!=e&&(t.attr=e.attr),st(n,t,null,t)}function x(n,t,e){var r=null;null!=t&&(r=new ft.Node(_),r.nodes=t),this.scope=this,this.parent=n,this.$root=r||n&&n.$root,this.$extra=[],null!=e?this.opts=e:null!=n&&(this.opts=n.opts)}vt=function(t,e,r,i){if("string"==typeof t&&(t=xt(t)),"string"==typeof e&&(e=xt(e)),null==t||b(t)&&0===t.length)return e;var o=p(e,e,new x(null,e,i)),l=n(t,o,r),u=o.$extra;return null!=u&&0!==u.length?y(l)?l.concat(u):[l].concat(u):l};var w,k="@else",N="@if",C="@each",_="@placeholder",A=ft.NODE,O=ft.TEXTNODE,T=ft.FRAGMENT,j=ft.STATEMENT,M=ft.COMPONENT;!function(){var n={};w=function(t){var e=n[t]||0;return n[t]=++e}}();x.prototype={opts:{extending:!1},parent:null,attr:null,scope:null,$root:null,$extra:null,$count:0,$getNode:function(n,t){for(var e,r=this;null!=r&&(e=r[n],null==e);)r=r.parent;return null!=t&&null!=e&&(e={nodes:Dt(e.nodes).filter(t)}),e}}}();var gt;!function(){function n(n){return n.type!==ft.NODE?null:Kn[n.tagName]}gt=function(t,e){bt.walkAsync(t,function(t,e){var r=n(t);return null!=r?void r(t,e):void e()},e)}}();var mt;!function(){mt={};var n,t,e,r={},o=" css sass scss less ",l=" json ",u={base:null,version:null};!function(){n=function(n,t,e){if(null!=e)return e.location;for(;null!=t;){if(null!=t.location)return t.location;if(null!=t.resource&&t.resource.location)return t.resource.location;t=t.parent}var r=null;return null!=n&&(null!=n.filename&&(r=_n(Sn(n.filename))),null!=n.dirname&&(r=Sn(n.dirname+"/"))),null==u.base&&(u.base=On()),null!=r?Mn(r)===!1?r:jn(u.base,r):u.base},t=function(t,e,r,i){return""===An(t)&&(t+=".mask"),Mn(t)===!1?t:Sn(jn(n(e,r,i),t))},e=function(n,t,e){return function(r){return r===n?t:null!=e?e(r):null}}}();var s,a,c,f;!function(){function n(n){return function(t){var e=n(),r=t,i=u.version;return null!=i&&(r=Dn(r,"v",i)),e(r)}}s=n(function(){return rn.getFile||In}),a=n(function(){return rn.getScript||Rn}),c=n(function(){return rn.getStyle||Ln}),f=n(function(){return rn.getData||Un}),sn("config",function(n){var e=n.modules;if(null!=e){var r=t[e];return m(r)===!1?void wn("Module system is not supported: "+e):void r()}});var t={"default":function(){rn.getScript=rn.getFile=null},include:function(){rn.getScript=function(n){var t=new nn;return include.instance().js(n+"::Module").done(function(n){var e=n.Module;return null!=e?void t.resolve(e):void t.reject("Export is undefined")}),t}}};"undefined"!=typeof include&&m(include&&include.js)&&i("modules","include")}();var d=X({type:null,constructor:function(n,t,e,r){this.path=n,this.alias=t,this.exports=e,this.module=mt.createModule(n,r),this.parent=r},eachExport:function(n){var t=this.alias;if(null!=t)return void n.call(this,t,"*",t);var e=this.exports;if(null!=e)for(var r=e.length,i=-1;++i<r;){var o=e[i];n.call(this,null==o.alias?o.name:o.alias,o.name,o.alias)}},hasExport:function(n){if(this.alias===n)return!0;var t=this.exports;if(null!=t)for(var e=t.length,r=-1;++r<e;){var i=t[r],o=null==i.alias?i.name:i.alias;if(o===n)return!0}return!1},getOriginal:function(n){if(this.alias===n)return"*";var t=this.exports;if(null!=t)for(var e,r=t.length,i=-1;++i<r;)if(e=t[i],(e.alias||e.name)===n)return e.name;return null},loadImport:function(n){var t=this;this.module.loadModule().fail(n).done(function(e){n(null,t)})},registerScope:null,logError_:function(n){var t="\n(Module) "+(this.parent||{path:"root"}).path;t+="\n  (Import) "+this.path,t+="\n    "+n,kn(t)}});!function(){function n(n){var t=An(n);if("mask"===t)return h;if("html"===t)return y;var e=" "+t+" ";return-1!==o.indexOf(e)?v:-1!==l.indexOf(e)?g:p}d.create=function(t,e,r,i){return new(n(t))(t,e,r,i)}}();var h=X(d,{type:"mask",constructor:function(){this.eachExport(function(n){"*"!==n&&et(n)})},getHandler:function(n){var t=this.module;if(null!=t){if(null!=t.error)return this.hasExport(n)?(this.logError_("Resource for the import `"+n+"` not loaded"),this.empty):null;var e=this.getOriginal(n);return null==e?null:t.exports[e]||t.queryHandler(e)}},empty:function(){}}),p=X(d,{type:"script",registerScope:function(n){this.eachExport(function(t,e,r){var i=this.module.register(n,e,r);null==i&&this.logError_("Exported property is undefined: "+e)})}}),v=X(d,{type:"style"}),g=X(p,{type:"data"}),y=X(h,{type:"mask"}),b=X(nn,{type:null,path:null,location:null,exports:null,state:0,constructor:function(n,t){this.path=n,this.parent=t,this.exports={},this.location=_n(n)},loadModule:function(){if(0!==this.state)return this;this.state=1;var n=this;return this.load_(this.path).fail(function(t){n.onLoadError_(t)}).done(function(t){n.onLoadSuccess_(t)}),this},complete_:function(n,t){return this.exports=t,this.error=n,this.state=4,n?void this.reject(n):void this.resolve(this)},onLoadSuccess_:function(n){return null==this.preprocess_?void this.complete_(null,n):void this.preprocess_(n,this.complete_)},onLoadError_:function(n){return null==this.preprocessError_?void this.complete_(n):void this.preprocessError_(n,this.complete_)},load_:null,preprocess_:null,preprocessError_:null,register:z});!function(){function n(n){var t=An(n);if("mask"===t)return x;var e=" "+t+" ";return-1!==o.indexOf(e)?N:-1!==l.indexOf(e)?C:"html"===t?w:k}b.create=function(t,e){return new(n(t))(t,e)}}();var x;!function(){function n(n){var t=n.type;if(t===ft.NODE&&"imports"===n.tagName)return n.nodes;if(t!==ft.FRAGMENT&&null!=t)return[n];var e=n;t===ft.FRAGMENT&&(e=n.nodes);for(var r,i=e.length,o=-1;++o<i;)r=e[o],"imports"===r.tagName&&(e.splice.apply(e,[o,1].concat(r.nodes)),o--);return e}function e(n,t){for(var e,r=[],i=n.length,o=-1;++o<i;)e=n[o],e.tagName===t&&r.push(e);return r}function r(n,t,e){for(var r=e.exports,i=e.imports,o=e.scope,u=l(e),s=-1,c=i.length;++s<c;){var f=i[s];f.registerScope&&f.registerScope(e)}for(var s=-1,c=n.length;++s<c;){var d=n[s],h=d.tagName;if("define"===h||"let"===h){var p={getHandler:a(it,u),location:e.location},v=yt.create(d,t,e,p),g=v.prototype;g.scope=S(g.scope,o);var m=d.name;"define"===h&&(r[m]=v,Zn(m,v)),"let"===h&&et(m),r.__handlers__[m]=v}}return r["*"]=X(lt,{getHandler:u,location:e.location,nodes:r.__nodes__,scope:o}),r}function i(n,t){return X({scope:t.scope,location:t.location,nodes:n,getHandler:l(t)})}function o(n,t,e){function r(){--i>0||t.call(e)}var i=n.length;if(0===i)return t.call(e);for(var o=i,l=-1;++l<o;)n[l].loadImport(r)}function l(n){return function(t){return u.call(this,n,t)}}function u(n,t){var e,r=n.exports;if(null!=r&&null!=(e=r[t]))return e;var i=r.__handlers__;if(null!=i&&null!=(e=i[t]))return e;for(var o,l,u=n.imports,s=u.length;--s>-1;)if(o=u[s],l=o.type,"mask"===l&&null!=(e=o.getHandler(t)))return e;return null}function a(n,t){return null==n?t:function(){var e=n.apply(this,arguments);return null!=e?e:t.apply(this,arguments)}}x=X(b,{type:"mask",scope:null,source:null,modules:null,exports:null,imports:null,load_:s,preprocessError_:function(n,t){var e="Load error: "+this.path;n&&n.status&&(e+="; Status: "+n.status),this.source=Nn(e),t.call(this,n)},preprocess_:function(e,i){var l="string"==typeof e?xt(e):e;this.scope={},this.source=l,this.imports=[],this.exports={__nodes__:[],__handlers__:{}};for(var u,s=n(l),a=s.length,c=-1;++c<a;)switch(u=s[c],u.tagName){case"import":this.imports.push(mt.createImport(u,null,null,this));break;case"module":mt.registerModule(u.nodes,t(u.attr.path,null,null,this));break;case"define":case"let":continue;default:this.exports.__nodes__.push(u)}o(this.imports,function(){i.call(this,null,r(s,null,this))},this)},getHandler:function(n){return u.call(this,this,n)},queryHandler:function(n){if(this.error)return i(this.source,this);var t=this.exports.__nodes__;return"*"!==n&&(t=e(t,n)),null!=t&&0!==t.length?i(t,this):null}})}();var w,k=X(b,{type:"script",load_:a,getExport_:function(n){var t=this.exports;return"*"!==n?E(t,n):t},register:function(n,t,e){var r=e||t,i=this.getExport_(t);return null==i?null:(null==n.scope&&(n.scope={}),A(n.scope,r,i),i)}}),N=X(b,{type:"style",load_:c}),C=X(k,{type:"data",load_:f});!function(){w=X(x,{type:"mask",preprocess_:function(n,t){var e="string"==typeof n?wt(n):n;return x.prototype.preprocess_.call(this,e,t)}})}(),function(){var t="import",e="imports";Bn.module=X({constructor:function(t,e,r,i,o){var l=Tn(t.attr.path,n(r,o));mt.registerModule(t.nodes,l,r,o)},render:z}),Bn["import:base"]=function(n,t,e,r,i){var o=Sn(st(n.expression,t,e,i));null!=o&&"/"!==o[o.length-1]&&(o+="/"),mt.cfg("base",o)},Bn[t]=X({meta:{serializeNodes:!0},constructor:function(n,t,e,r,i){null==n.alias&&null==n.exports&&mt.isMask(n.path)&&(this.module=mt.createModule(n.path,e,i))},renderStart:function(n,t){if(null!=this.module){var e=$t.pause(this,t),r=this;this.module.loadModule().always(function(){r.scope=r.module.scope,r.nodes=r.module.source,r.getHandler=r.module.getHandler.bind(r.module),e()})}}}),Bn[e]=X({imports_:null,load_:function(n,t){function e(e,r){null==e&&(r.registerScope&&r.registerScope(o),null!=n._modules&&n._modules.add(r.module)),0===--u&&t()}for(var r,i=this.imports_,o=this,l=i.length,u=l,s=-1;++s<l;)r=i[s],r.loadImport(e)},start_:function(n,e){for(var r,i=$t.pause(this,e),o=this.nodes,l=o.length,u=-1,s=this.imports_=[];++u<l;)if(r=o[u],r.tagName===t){if(-1!==r.path.indexOf("~")){var a=_t(r.path);m(a)&&(r.path=a("attr",n,e,null,this))}s.push(mt.createImport(r,e,this))}this.load_(e,i)},meta:{serializeNodes:!0},renderStart:function(n,t){this.start_(n,t)},renderStartClient:function(n,t){this.start_(n,t)},serializeNodes:function(){for(var n,e=[],r=this.nodes.length;--r>-1;)n=this.nodes[r],n.tagName===t&&e.push(n);return dt(e)},getHandler:function(n){for(var t,e,r=this.imports_,i=r.length,o=-1;++o<i;)if(t=r[o],"mask"===t.type&&(e=t.getHandler(n),null!=e))return e;return null},getHandlers:function(){for(var n,t,e={},r=this.imports_,i=r.length,o=-1;++o<i;)n=r[o],"mask"===n&&(t=n.getHandlers(),S(e,t));return e}})}();var _;!function(){function n(n,e,r,o){return t(n,e,r,function(n,t){return n?o.reject(n):(r.flattern===!0&&r.deep===!0&&(t=i(t)),void o.resolve(t))}),o}function t(n,t,i,o){function l(n,t){if("import"!==n.tagName)return t();var l=r(n.path,s),u=mt.getType(l);return i.deep===!1?(a[u].push(l),t()):"mask"===u?void e(l,i,function(n,e){return n?o(n):(a.mask.push(e),void t())}):(a[u].push(l),void t())}function u(){o(null,a)}var s=_n(t),a={mask:[],data:[],style:[],script:[]};bt.walkAsync(n,l,u)}function e(n,e,r){var i={path:n,dependencies:null};s(n).done(function(o){t(xt(o),n,e,function(n,t){return n?void r(n):(i.dependencies=t,void r(null,i))})}).fail(r)}function r(n,t){var e=n;return""===An(e)&&(e+=".mask"),Mn(e)&&(e=jn(t,e)),Sn(e)}_=function(t,e,r){var i=T(r,o),l=new nn,u="string"==typeof t?xt(t):t;return n(u,e,i,l)};var i,o={deep:!0,flattern:!1};!function(){function n(n,r){return e(t(n,r,[]))}function t(n,e,r){if(null==n)return r;for(var i,o=n[e],l=o.length,u=-1;++u<l;)i=o[u],"string"!=typeof i?(r.unshift(i.path),t(i.dependencies,e,r)):r.unshift(i);return"mask"!==e&&n.mask.forEach(function(n){t(n.dependencies,e,r)}),r}function e(n){for(var t=0;t<n.length;t++)for(var e=t+1;e<n.length;e++)n[t]===n[e]&&(n.splice(e,1),e--);return n}i=function(t){return{mask:n(t,"mask"),data:n(t,"data"),style:n(t,"style"),script:n(t,"script")}}}()}();var O;!function(){function n(n,e,r,i){function o(){if(0===l.length)return u.data&&(u.script=u.data+"\n"+u.script),r(u);var s=l.shift();t(n,s,e,function(n,t){return n?i(n):(u[s]=t,void o())})}var l=["mask","script","style","data"],u={mask:"",data:"",style:"",script:""};o()}function t(n,t,e,r){function i(){return++s===u?void r(null,a.join("\n")):void l[t](o[s],e).fail(r).done(function(n){a.push("/* source "+o[s]+" */"),a.push(n),i()})}var o=n[t],u=o.length,s=-1,a=[];i()}function e(n,t,e){return nn.run(function(t,e){s(n).fail(e).done(function(e){var r="module = { exports: null }\n";r+=e+";\n",r+='mask.Module.registerModule(module.exports, "'+n+'")',t(r)})})}function r(n,t,e){return s(n,e)}function i(n,t,e){return nn.run(function(e,r){s(n).fail(r).done(function(i){var o;try{o="string"==typeof i?JSON.parse(i):i}catch(l){return void r(l)}var u=JSON.stringify(o,null,t.minify?4:void 0),s="module = { exports: "+u+' }\nmask.Module.registerModule(module.exports, "'+n+'")';e(s)})})}O=function(t,e,r){var i=T(r,o);return nn.run(function(r,o){function l(n){n.mask+="\n"+t,r(n)}_(t,e,{flattern:!0}).fail(o).done(function(t){n(t,i,l,o)})})};var o={minify:!1},l={mask:function(n,t,e){return nn.run(function(e,r){s(n).fail(r).done(function(r){var i=bt.walk(r,function(n){return"link"===n.tagName&&n.attr.href?{remove:!0}:void 0});i=Dt("module").attr("path",n).append(i);var r=dt(i[0],{indent:t.minify?0:4});e(r)})})},script:function(n,t){return(rn.buildScript||e)(n,t)},style:function(n,t){return(rn.buildStyle||r)(n,t)},data:function(n,t){return(rn.buildData||i)(n,t)}}}(),S(mt,{ModuleMask:x,createModule:function(n,e,i,o){var l=t(n,e,i,o),u=r[l];return null==u&&(u=r[l]=b.create(l,o)),u},registerModule:function(n,e,r,i,o){var l=t(e,r,i,o),u=mt.createModule(l,r,i,o);return u.state=1,mt.isMask(l)?(u.preprocess_(n,function(){u.state=4,u.resolve(u)}),u):(u.state=4,u.exports=n,u.resolve(u),u)},createImport:function(n,e,r,i){var o=t(n.path,e,r,i),l=n.alias,u=n.exports;return d.create(o,l,u,i)},isMask:function(n){var t=An(n);return""===t||"mask"===t||"html"===t},getType:function(n){var t=An(n);if(""===t||"mask"===t)return"mask";var e=" "+t+" ";return-1!==o.indexOf(e)?"style":-1!==l.indexOf(e)?"data":"script"},cfg:function(n,t){return n in u==!1?void kn("Invalid module option: ",n):void(u[n]=t)},resolveLocation:n,getDependencies:_,build:O})}();var yt;!function(){function n(n,t,e,r,o,l,u){for(var s,a,c=[],f=S({tagName:t,compoName:n,template:c,attr:e,location:i(o),meta:{template:"merge"},renderStart:function(){$t.prototype.renderStart.apply(this,arguments),this.nodes===this.template&&(this.nodes=vt(this.nodes,[],this))},getHandler:null},u),d=null==r?0:r.length,h=0;d>h;h++)if(s=r[h],null!=s)if(a=s.tagName,"function"!==a)if("slot"!==a&&"event"!==a)if("define"!==a&&"let"!==a)if("var"!==a)c.push(s);else{var p,v,g=s.getObject(l,null,o);for(p in g){v=g[p],("meta"===p||"model"===p||"attr"===p)&&(f[p]=S(f[p],v));var m=f.scope;null==m&&(f.scope=m={}),m[p]=v}}else{var y="define"===a?yt.registerGlobal:yt.registerScoped;y(s,l,f)}else{if("event"===a&&null!=f.tagName){c.push(s);continue}var b=a+"s",x=f[b];null==x&&(x=f[b]={}),x[s.name]=s.fn}else f[s.name]=s.fn;return f}function t(n,t,r){var i=[];if(null==n)return i;for(var o,l=n.length,u=-1;++u<l;)if(o=n[u],o.compo){var s=e(o.compo,r);if(null!=s){i.unshift(s);continue}var a=st(o.compo,t,null,r);if(null!=a){i.unshift(a);continue}kn("Nor component, nor scoped data is resolved:",o.compo)}else;return i}function e(n,t){for(;null!=t;){if(t.getHandler){var e=t.getHandler(n);if(null!=e)return e}t=t.parent}return Bn[n]}function r(e,r,i,o){var l,u,s=e["extends"],a=e.as;if(null!=a){var c=xt(a);l=c.tagName,u=S(e.attr,c.attr)}var f=e.name,d=n(f,l,u,e.nodes,i,r,o),h=t(s,r,i);return h.push(d),$t.apply(null,h)}function i(n){for(;null!=n;){if(n.location)return n.location;if(n.resource&&n.resource.location)return n.resource.location;n=n.parent}return null}yt={create:function(n,t,e,i){return r(n,t,e,i)},registerGlobal:function(n,t,e,r){var i=yt.create(n,t,e,r);Zn(n.name,i)},registerScoped:function(n,t,e,r){var i=yt.create(n,t,e,r);nt(e,n.name,i)}}}();var bt;!function(){function n(n){return ft.FRAGMENT===e(n)}function t(n){var t=n.nodes;return null==t?null:y(t)?t:n.nodes=[t]}function e(n){var t=n.type;return null!=t?t:y(n)?ft.FRAGMENT:null!=n.tagName?ft.NODE:null!=n.content?ft.TEXTNODE:ft.NODE}function r(t){if("string"==typeof t&&(t=xt(t)),n(t)===!1){var e=new ft.Fragment;e.appendChild(t),t=e}return t}bt={walk:function(n,t){return"object"==typeof n&&n.type===ft.CONTROLLER?(new o(n,t),n):(n=r(n),new i(n,t),n)},walkAsync:function(n,t,e){n=r(n),new u(n,t,e)}};var i,o;!function(){function e(r,i,o,l){if(null==r)return null;var u,c=!0,f=!1;n(r)!==!0&&(u=i(r)),void 0!==u&&(u=new s(u),u.process(new a(r,o,l)),c=u.deep,f=u["break"]);var d=t(r);if(null==d||c===!1||f===!0)return u;for(var h,p=d.length,v=0;p>v;v++)if(h=d[v],u=e(h,i,r,v),null!=u&&u["break"]===!0)return u}function r(n,t,e,i){if(null!=n){var o=t(n,i);if(void 0!==o&&(o.deep===!1||o["break"]===!0))return o;var l=n.components;if(null==l)return null;for(var u,s=l.length,a=0;s>a;a++)if(u=l[a],o=r(u,t,n,a),null!=o&&o["break"]===!0)return o}}i=function(n,t){e(n,t)},o=function(n,t){r(n,t,n)}}();var u;!function(){u=function(n,t,e){this.stack=[],this.done=e,this.root=n,this.fn=t,this.process=this.process.bind(this),this.visit(this.push(n))},u.prototype={current:function(){return this.stack[this.stack.length-1]},push:function(n,t,e){var r=new a(n,t,e);return this.stack.push(r),r},pop:function(){return this.stack.pop()},getNext:function(n){var e=this.current(),r=e.node,i=t(r);if(null==r)throw Error("Node is null");if(null!=i&&n!==!1&&0!==i.length){if(null==i[0])throw Error("Node is null");return this.push(i[0],r,0)}for(var o,l;0!==this.stack.length;)if(e=this.pop(),o=e.parent,l=e.index,null!=o){if(++l<o.nodes.length)return this.push(o.nodes[l],o,l)}else this.pop();return null},process:function(n){var t=!0,e=!1;void 0!==n&&(n=new s(n),n.process(this.current()),t=n.deep,e=n["break"]);var r=e===!0?null:this.getNext(t);return null==r?void this.done(this.root):void this.visit(r)},visit:function(t){var e=t.node;return n(e)===!1?void this.fn(e,this.process):void this.process()},fn:null,done:null,stack:null}}();var s;!function(){s=function(n,t){for(var e in n)this[e]=n[e]},s.prototype={"break":!1,deep:!0,remove:!1,replace:null,process:function(n){if(null!=this.replace)return this.deep=!1,void(n.parent.nodes[n.index]=this.replace);if(this.remove===!0){this.deep=!1;var t=n.parent.nodes,e=n.index;return void l.call(t,e,1)}}}}();var a=function(n,t,e){this.node=n,this.index=e,this.parent=t}}();var xt,wt,kt,Nt,Ct,_t,Et,At,Ot;!function(n,t,i,l){function u(n){for(var t=-1;-1!==(t=n.indexOf(v,t))&&n.charCodeAt(t+1)!==w;)t++;if(-1===t)return n;for(var e,i=n.length,o=[],l=0,u=0;;){if(e=s(n,t+2,i,w,k),-1===e)break;for(o[u++]=l===t?"":n.substring(l,t),o[u++]=n.substring(t+2,e),l=t=e+1;-1!==(t=n.indexOf(v,t))&&n.charCodeAt(t+1)!==w;)t++;if(-1===t)break}return i>l&&(o[u]=n.substring(l)),n=null,function(n,t,e,i,l,u){if(null==n){for(var s,a="",c=o.length,f=-1;++f<c;)s=o[f],a+=f%2===1?v+g+s+b:s;return a}return r(o,n,t,e,i,l,u)}}var s,a,c,f,d,h,p,v="~",g="[",b="]",x=126,w=91,k=93;!function(){s=function(n,t,e,r,i){for(var o,l=0,u=t;e>t;t++)if(o=n.charCodeAt(t),34!==o&&39!==o)if(o!==r){if(o===i&&-1===--l)return t}else l++;else t=a(n,t+1,e,34===o?'"':"'");return hn("Group was not closed",n,u),e},c=function(n,t,e){for(var r;e>t;)if(r=n.charCodeAt(t),36!==r&&95!==r){if(!(r>=48&&57>=r||r>=65&&90>=r||r>=97&&122>=r))break;t++}else t++;return t},f=function(n,t,e){for(var r;e>t;)if(r=n.charCodeAt(t),36!==r&&95!==r&&58!==r){if(!(r>=48&&57>=r||r>=65&&90>=r||r>=97&&122>=r))break;t++}else t++;return t},a=function(n,t,e,r){for(var i=t;-1!==(t=n.indexOf(r,t));){if(92!==n.charCodeAt(t-1))return t;t++}return hn("Quote was not closed",n,i-1),e},d=function(n,t,e){for(;e>t;t++)if(n.charCodeAt(t)>32)return t;return t},h=function(n,t){for(;t>0;t--)if(n.charCodeAt(t)>32)return t;return t},p=function(n,t,e){for(;e>t;t++)if(n.charCodeAt(t)<33)return t;return t}}();var N;!function(){function n(n){
var r=t(n);return function(n,t,i,o,l){return e(r,n,t,i,o,l)}}var t;!function(){function n(n,e,r,i,o,l){var a=++i;i=s(r,i,o,91,93);var f=t(r,a,i);i++,40!==r.charCodeAt(i)&&m("Punctuation group expected"),a=++i,i=s(r,i,o,40,41);var d=r.substring(a,i);return e.push(new u(n,f,new c(d),l)),i}function e(n,t,e,r,i){var o=++r;return r=s(e,r,i,40,41),t.push(new h(n,e.substring(o,r))),r}function d(n,t,e,r,i){var o=++r;return r=f(e,r,i),t.push(new p(n,e.substring(o,r))),r}function g(n,e,r,i,o){var l=++i;return i=s(r,l,o,40,41),e.push(new v(t(r,l,i),n)),i}function m(n){throw Error("Lexer pattern: "+n)}t=function(u,s,h){void 0===s&&(s=0,h=u.length);var p,y,b,x=[];n:for(;h>s;s++){switch(b=s,p=u.charCodeAt(s),y=!1,63===p&&(y=!0,b=++s,p=u.charCodeAt(s)),p){case 32:x.push(new l(y,s));continue;case 34:case 39:s=a(u,s+1,h,34===p?'"':"'"),x.push(new o(t(u,b+1,s)));continue;case 36:b=++s;var w=!1;p===u.charCodeAt(s)&&(w=!0,b=++s),s=f(u,s,h);var k=u.substring(b,s);if(y===!1&&w===!1){x.push(new i(k)),s--;continue}if(p=u.charCodeAt(s),91===p){s=n(k,x,u,s,h,y);continue}if(40===p){s=e(k,x,u,s,h);continue}if(60===p){s=d(k,x,u,s,h);continue}m("Unexpected extended type");continue;case 40:if(y===!0){s=g(y,x,u,s,h);continue}case 44:case 41:case 91:case 93:case 123:case 125:x.push(new c(String.fromCharCode(p)));continue}for(;h>s;)if(p=u.charCodeAt(++s),!(p>32&&34!==p&&39!==p&&36!==p&&44!==p)){x.push(new r(u.substring(b,s))),--s;continue n}}for(var N,C=x.length,_=-1,E=C>1;E===!0&&++_<C;)N=x[_],(N instanceof v==!1||N.optional!==!0)&&(E=!1);return x}}();var e;!function(){e=function(n,t,e,r,i,o){for(var l,u,s=e,a=n.length,c=0;a>c;c++)if(l=n[c],u=e,e=l.consume(t,e,r,i),e===u){if(l.optional===!0)continue;if(o===!0)return s;var f="Token of type `"+l.name+"`";return l.token&&(f+=" Did you mean: `"+l.token+"`?"),dn(f,t,e),s}return e}}();var r,i,o,l,u,c,h,p,v,g;!function(){function n(n){return new Function("obj","val","obj."+n+"= val;")}function t(n,t){var e=t.constructor;return t.name=n,t.optional=!1,t.token=null,e.prototype=t,e}l=t("Whitespace",{constructor:function(n){this.optional=n},consume:d}),r=t("Const",{constructor:function(n){this.token=n},consume:function(n,t,e){var r=t+this.token.length;return n=n.substring(t,r),n===this.token?r:t}}),i=t("Var",{constructor:function(t){this.token=t,this.setter=n(t)},consume:function(n,t,e,r){var i=f(n,t,e);return i===t?t:(this.setter(r,n.substring(t,i)),i)}}),h=t("ExtendedVar",{constructor:function(t,e){if(this.token=e,this.setter=n(t),42===e.charCodeAt(0)){if("*"===e)return void(this.consume=this.consumeAll);if(3===e.length)return void(this.consume=this.consumeGroup);throw Error("`*` consumer expected group chars to parse")}this.rgx=new RegExp(e,"g")},consumeAll:function(n,t,e,r){return this.setter(r,n.substring(t)),e},consumeGroup:function(n,t,e,r){var o=this.token.charCodeAt(1),l=this.token.charCodeAt(2);if(n.charCodeAt(t)!==o)return i.prototype.consume.call(this,n,t,e,r);var l=s(n,++t,e,o,l);return l===t?t:(this.setter(r,n.substring(t,l)),l+1)},consume:function(n,t,e,r){this.rgx.lastIndex=t;var i=this.rgx.exec(n);if(null==i)return t;var o=i[0];return this.setter(r,o),t+o.length}}),function(){p=t("CustomVar",{constructor:function(t,r){this.fn=e[r],this.token=t,this.setter=n(t)},consume:function(n,t,e,r){for(var i,o=t;e>t&&(i=n.charCodeAt(t),36===i||95===i||58===i||(i>=48&&57>=i||i>=65&&90>=i||i>=97&&122>=i)||this.fn(i)===!0);t++);return t===o?t:(this.setter(r,n.substring(o,t)),t)}});var e={accessor:function(n){return 46===n?!0:!1}}}(),o=t("String",{constructor:function(n){this.tokens=n},consume:function(n,t,e,r){var i=n.charCodeAt(t);if(34!==i&&39!==i)return t;var o=a(n,t+1,e,34===i?'"':"'");if(1!==this.tokens.length)throw Error("Not implemented");var l=this.tokens[0];return r[l.token]=n.substring(t+1,o),++o}}),u=t("Array",{constructor:function(n,t,e,r){this.token=n,this.delim=e,this.tokens=t,this.optional=r},consume:function(n,t,r,i){for(var o,l,u;;){if(o={},l=e(this.tokens,n,t,r,o,this.optional),t===l){if(null==u)return t;throw Error("Next item expected")}if(null==u&&(u=[]),u.push(o),t=l,l=this.delim.consume(n,t,r),t===l)break;t=l}return i[this.token]=u,t}}),c=t("Punc",{constructor:function(n){this.before=new l(!0),this.delim=new r(n),this.after=new l(!0),this.token=n},consume:function(n,t,e){var r=this.before.consume(n,t,e),i=this.delim.consume(n,r,e);return r===i?t:this.after.consume(n,i,e)}}),v=t("Group",{constructor:function(n,t){this.optional=t,this.tokens=n},consume:function(n,t,r,i){return e(this.tokens,n,t,r,i,this.optional)}}),g=t("OrGroup",{constructor:function(n){this.groups=n,this.length=n.length},consume:function(n,t,e,r){for(var i=t,o=0;o<this.length;o++)if(t=this.groups[o].consume(n,t,e,r),t!==i)return t;return t}})}(),N=function(t){return 1===arguments.length&&"string"==typeof t?n(t):m(Array.prototype.slice.call(arguments))};var m;!function(){function t(n,t,r,i,o,l){return"function"==typeof n?n(t,r,i,o,l):e(n,t,r,i,o,l)}function e(n,t,e,r,i,o){for(var l=e,u=n.length,s=-1;++s<u;)if(e=n[s](t,e,r,i,!0),l!==e)return e;return o!==!0&&n[0](t,l,r,i,o),l}function r(t){if("string"==typeof t)return n(t);for(var e=t.length;--e>-1;)t[e]=n(t[e]);return t}m=function(n){for(var e=n.length,i=-1;++i<e;)n[i]=r(n[i]);return function(r,o,l,u,s){var a;for(i=-1;++i<e;)if(a=o,o=t(n[i],r,o,l,u,s),o===a)return a;return o}}}()}(),function(){zn["var"]=function(t,e,r,i){for(var o,l,u,f=new n("var",i),d=1,h=2,p=3,v=4,g=d;;)if(r>e&&(l=t.charCodeAt(e))<33)e++;else if(g!==d)if(g!==h)if(g!==p){if(g===v){if(44===l){g=d,e++;continue}break}}else{switch(o=e,e++,l){case 123:case 91:e=s(t,e,r,l,l+2);break;case 39:case 34:e=a(t,e,r,39===l?"'":'"');break;default:for(;r>e&&(l=t.charCodeAt(e),44!==l&&59!==l);)e++;e--}e++,f.attr[u]=t.substring(o,e),g=v}else{if(61!==l)return dn("Assignment expected",t,e,l,"var"),[f,e];g=p,e++}else o=e,e=c(t,e,r),u=t.substring(o,e),g=h;return[f,e,0]};var n=X(ft.Node,{stringify:function(){var n=this.attr,t="var ";for(var e in n)"var "!==t&&(t+=","),t+=e+"="+n[e];return t+";"},getObject:function(n,t,e){var r,i={},o=this.attr;for(r in o)i[r]=st(o[r],n,t,e);return i}})}(),function(){function n(n,t){return function(e,i,l,a){for(var c,f,h,p,v,g=i;l>i&&(v=e.charCodeAt(i),123!==v&&59!==v&&62!==v);)i++;f=kt(e,g,i);for(var m in f)f[m]=u(f[m]);if(62===v){var y=d(e,i+1,l),b=e.charCodeAt(y);if(34!==b&&39!==b){var x=new ft.Node(n,a);return x.attr=f,[x,i,C]}}if(c=i,h=123===v||62===v){if(i++,123===v&&(c=s(e,i,l,123,125),p=e.substring(i,c)),62===v){var w=Ct(e,i,l);if(null==w)return null;c=w[1],p=w[0],c-=1}if(null!=t&&(p=t(p,f,a),null==p))return[null,c+1];p=r(n,p),"script"!==n&&(p=u(p))}var x=new o(n,a);return x.content=p,x.attr=f,[x,c+1,0]}}function t(n){return X(lt,{meta:{mode:"server"},body:null,constructor:function(n,t,e,r,i){var o=n.content;if(null==o&&n.nodes){var l=n.nodes[0];o=l.type===ft.TEXTNODE?l.content:Dt(l.nodes).text()}this.body=m(o)?o("node",t,e,r,i):o},render:function(t,r,i){var o=e.createElement(n),l=this.body,u=this.attr;o.textContent=l;for(var s in u){var a=u[s];null!=a&&o.setAttribute(s,a)}i.appendChild(o)}})}function r(n,t){var e=rn.preprocessor[n];if(null==e)return t;var r=e(t);return null==r?(kn("Preprocessor must return a string"),t):r}var i;!function(){i={transform:function(e,r,i){if(null!=r.self){var o=i.attr.style;return i.attr.style=_t((o||"")+e),null}var l=e;return r.scoped&&(r.scoped=null,l=n(l,i)),l=t(l,i)}};var n,t;!function(){function e(n){if(null==n)return wn('"style" should be inside elements node'),"";var t=n.attr.id;return null==t&&(t=n.attr.id="scoped__css__"+ ++r),"#"+t}var r=0,i=/^([\s]*)([^\{\}]+)\{/gm,o=/^([\s]*):host\s*(\(([^)]+)\))?\s*\{/gm;n=function(n,t){var r;return n.replace(i,function(n,i,o){if(-1!==o.indexOf(":host"))return n;null==r&&(r=e(t));for(var l=o.split(","),u=l.length,s=0;u>s;s++)l[s]=r+" "+l[s];return o=l.join(","),i+o+"{"})},t=function(n,t){var r;return n.replace(o,function(n,i,o,l){return i+(r||(r=e(t)))+(l||"")+"{"})}}()}(),zn.style=n("style",i.transform),zn.script=n("script"),Bn.style=t("style"),Bn.script=t("script");var o=X(ft.Node,{content:null,stringify:function(n){n.processHead(this);var t=this.content;return null==t?void n.print(";"):(m(t)&&(t=t()),n.openBlock("{"),n.print(t),void n.closeBlock("}"))}})}(),function(){var n="import",t="imports";zn[n]=function(n,t,r,o){var l={exports:null,alias:null,path:null},u=e(n,t,r,l);return[new i(o,l),u,0]},Vn[n]=function(n){if(n.tagName===t)return null;var e=new r("imports",n);return n.appendChild(e),e};var e=N(['from "$path"','* as $alias from "$path"','$$exports[$name?( as $alias)](,) from "$path"']),r=X(ft.Node,{stringify:function(n){n.process(this.nodes)}}),i=X({type:ft.COMPONENT,tagName:n,path:null,exports:null,alias:null,constructor:function(n,t){this.path=t.path,this.alias=t.alias,this.exports=t.exports,this.parent=n},stringify:function(){var t=" from '"+this.path+"';";if(null!=this.alias)return n+" * as "+this.alias+t;if(null!=this.exports){for(var e,r=this.exports,i="",o=r.length,l=-1;++l<o;)e=r[l],i+=e.name,e.alias&&(i+=" as "+e.alias),l!==o-1&&(i+=", ");return n+" "+i+t}return n+t}})}(),function(){function n(n){zn[n]=function(r,i,o,l){var u=new e(n,l),s=t(r,i,o,u);return[u,s,C]}}n("define"),n("let");var t=N("$name","?( as $$as(*()))?( extends $$extends[$$compo<accessor>](,))","{"),e=X(ft.Node,{name:null,"extends":null,as:null,stringify:function(n){var t=this["extends"],e=this.as,r="";if(null!=e&&0!==e.length&&(r+=" as ("+e+")"),null!=t&&0!==t.length){r+=" extends ";for(var i=t.length,o=-1;++o<i;)r+=t[o].compo,i-1>o&&(r+=", ")}var l=this.tagName+" "+this.name+r;n.write(l),n.openBlock("{"),n.process(this.nodes),n.closeBlock("}")}})}(),function(){function n(n){return function(e,r,i,o){var u=e.indexOf("{",r)+1,a=t(n,e.substring(r,u-1));null==a&&dn("Method head syntax error",e,r);var c=s(e,u,i,123,125),f=e.substring(u,c),d=null==a?null:new l(n,a.name,a.args,f,o);return[d,c+1,0]}}function t(n,t){var r=/([^\(\)\n]+)\s*(\(([^\)]*)\))?/.exec(t);if(null==r)return null;var i=r[1].trim(),o=r[3].replace(/\s/g,"").split(",");return new e(i,o)}function e(n,t){this.name=n,this.args=t}function r(n,t,e){var r=o.call(n),i=rn.preprocessor.script;return null!=i&&(t=i(t)),null!=e&&(t+="\n//# sourceURL="+e),r.push(t),new(Function.bind.apply(Function,[null].concat(r)))}var i,l=X(ft.Component.prototype,{name:null,body:null,args:null,fn:null,constructor:function(n,t,e,i,o){this.tagName=n,this.name=t,this.args=e,this.body=i,this.parent=o;var l=null;this.fn=r(e,i,l)},stringify:function(n){var t=this.tagName+" "+this.name+"("+this.args.join(",")+")";n.write(t),n.openBlock("{"),n.print(this.body),n.closeBlock("}")}});!function(){i=function(t,e,r){for(var i,o=r.tagName,l=r,u="";null!=l;)i=l.tagName,("let"===i||"define"===i)&&(""!==u&&(u="."+u),u=l.name+u),l=l.parent;"let"!==o&&"define"!==o&&(""!==u&&(u+="_"),u+=o);var s=u+"_"+t+"_"+e,a=null;return void 0!==n[s]&&(a=++n[s]),null!=a&&(s+="_"+a),n[s]=1,"dynamic://MaskJS/"+s};var n={}}(),zn.slot=n("slot"),zn.event=n("event"),zn["function"]=n("function")}(),function(){function r(n,t){return n.charCodeAt(t)}function o(n,t,e,i){for(;e>t;t++)if(i===r(n,t))return t;return t}function l(n,t,e){var i=7,o=r(n,t);if(35!==o)return null;for(var l=t+1;++t<e;){if(0===--i)return null;if(o=r(n,t),!(o>=48&&57>=o||o>=65&&70>=o||120===o)){if(59===o)return n.substring(l,t);break}}return null}function s(n){var t=Number("0"+n);return t!==t?(hn("Invalid Unicode Char",n),""):String.fromCharCode(t)}function a(n,t,e){for(var i=10,o=t;e>t;t++,i--){if(0===i)return null;var l=r(n,t);if(59===l)break;{if(!(l>=48&&57>=l||l>=65&&90>=l||l>=97&&122>=l))return null;t++}}return n.substring(o,t)}function c(n,t){if(1===b[t])return n;for(var e=n;null!=e&&(null==e.tagName||e.tagName.toLowerCase()!==t);)e=e.parent;return null==e?(hn("Unmatched closing tag",t),n):e.parent||e}function h(t,e){var r=e,i=y[t];if(null!=i)for(;null!=r.parent&&r.parent.tagName&&1===i[r.parent.tagName.toLowerCase()];)r=r.parent;var o=new n(t,r);return r.appendChild(o),o}function p(n){var t,e,r=n.attr;for(t in r)e=r[t],null!=e&&e!==t&&(r[t]=u(e));null!=r.expression&&(n.expression=r.expression,n.type=ft.STATEMENT)}function v(n,t){F(t,function(t){n.appendChild(t)})}var g=21;wt=function(n){for(var e,y,x,w=new i,k=w,N=C,_=0,A=n.length;A>=_;)if(_=d(n,_,A),N!==E)if(y=r(n,_),60!==y){for(x=_,e="";A>=_;){if(y=r(n,++_),60===y){y=r(n,_+1);break}if(38===y){var O=null,T=null;T=l(n,_+1),null!=T?O=s(T):(T=a(n,_+1),null!=T&&(O=m(T))),null!=O&&(e+=n.substring(x,_)+O,x=_+T.length+1)}}e+=n.substring(x,_),""!==e&&(e=u(e),w.appendChild(new t(e,w)))}else{if(y=r(n,++_),33===y&&45===r(n,_+1)&&45===r(n,_+2)){
//!--
_=n.indexOf("-->",_+3)+3,2===_&&(_=A);continue}if(33>y&&(_=d(n,_,A)),y=r(n,_,A),47===y&&(N=g,_++,_=d(n,_,A)),x=_,_=f(n,_+1,A),e=n.substring(x,_),N===g){w=c(w,e.toLowerCase()),N=S,_=o(n,_,A,62),_++;continue}w=h(e,w),N=E}else{if(_=Nt(n,_,A,w.attr),_===A)break;switch(p(w),r(n,_)){case 47:w=w.parent,_=o(n,_,A,62),_++;break;case 62:1===b[w.tagName.toLowerCase()]&&(w=w.parent)}if(_++,"mask"===w.tagName){x=_,_=n.indexOf("</mask>",x);var j=xt(n.substring(x,_)),M=w.parent.nodes;M.splice(M.length-1,1),w=w.parent,j.type===ft.FRAGMENT?v(w,j.nodes):w.appendChild(j),_+=7}N=S}var M=k.nodes;return null!=M&&1===M.length?M[0]:k};var m;!function(n){if(null!=n){var t=n.createElement("i");m=function(n){return t.innerHTML="&"+n+";",t.textContent}}}(e);var y,b={area:1,base:1,br:1,col:1,embed:1,hr:1,img:1,input:1,keygen:1,link:1,menuitem:1,meta:1,param:1,source:1,track:1,wbr:1};!function(){var n={input:1,option:1,optgroup:1,select:1,button:1,datalist:1,textarea:1};y={tr:{tr:1,th:1,td:1},th:{th:1},td:{thead:1,td:1},body:{head:1,link:1,script:1},li:{li:1},p:{p:1},h1:{p:1},h2:{p:1},h3:{p:1},h4:{p:1},h5:{p:1},h6:{p:1},select:n,input:n,output:n,button:n,datalist:n,textarea:n,option:{option:1},optgroup:{optgroup:1}}}()}();var C=2,_=3,E=5,A=6,O=7,S=8,T=9;_t=u,Ot=N,xt=function(e){var r,o,l,a,c,f,d,p,v,g=new i,m=g,y=C,b=_,N=0,j=e.length;for(m.source=e;;){for(;j>N&&(d=e.charCodeAt(N))<33;)N++;if(47===d){if(v=e.charCodeAt(N+1),47===v){for(N++;10!==d&&13!==d&&j>N;)d=e.charCodeAt(++N);continue}if(42===v){N=e.indexOf("*/",N+2)+2,1===N&&(N=j);continue}}if(b===E&&(null!=r&&(g.attr["class"]=u(r),r=null),null!=a&&(g.attr[a]=a,a=null,o=null)),null!=o){if(y===E)null==a?a=o:c=o,null!=a&&null!=c&&("class"!==a?g.attr[a]=c:r=null==r?c:r+" "+c,a=null,c=null);else if(b===_){var M=zn[o];if(null!=M){var $=M(e,N,j,g),D=$[0],I=$[2];if(N=$[1],y=0===I?C:I,null!=D){D.sourceIndex=l;var R=Vn[o];if(null!=R){var L=R(g,D);null!=L&&(g.__single=!0,g=L)}if(g.appendChild(D),0!==I)g=D;else if(g.__single===!0)do g=g.parent;while(null!=g&&null!=g.__single)}o=null;continue}f=new n(o,g),f.sourceIndex=l,g.appendChild(f),g=f,y=E}else if(b===S){if(f=new t(o,g),g.appendChild(f),g.__single===!0)do g=g.parent;while(null!=g&&null!=g.__single);y=C}o=null}if(N>=j){y===E&&(null!=r&&(g.attr["class"]=u(r)),null!=a&&(g.attr[a]=a)),d=null;break}if(y===T){for(g=g.parent;null!=g&&null!=g.__single;)g=g.parent;null==g&&(g=m,hn("Unexpected tag closing",e,h(e,N-1))),y=C}switch(d){case 123:b=y,y=C,N++;continue;case 62:b=y,y=C,N++,g.__single=!0;continue;case 59:if(null!=g.nodes){N++;continue}case 125:125!==d||y!==_&&y!==E||N--,N++,b=y,y=T;continue;case 39:case 34:y===A?y=E:b=y=S,N++;var U=!1,F=!1,H=39===d?"'":'"';for(p=N;(N=e.indexOf(H,N))>-1&&92===e.charCodeAt(N-1);)U=!0,N++;-1===N&&(hn("Literal has no ending",e,p-1),N=j),N===p&&(v=e.charCodeAt(N+1),(124===v||v===d)&&(F=!0,p=N+2,N=e.indexOf((124===v?"|":H)+H+H,p),-1===N&&(N=j))),l=p,o=e.substring(p,N),U===!0&&(o=o.replace(en[H],H)),(y!==E||"class"!==a)&&(o=u(o)),N+=F?3:1;continue}if(y===C){if(b=_,y=_,46===d||35===d){l=N,o="div";continue}}else if(y===E)if(46===d)N++,a="class",y=O;else if(35===d)N++,a="id",y=O;else{if(61===d){N++,y=A,b===_&&null==a&&hn("Unexpected tag assignment",e,N,d,y);continue}if(40===d){p=1+N,N=1+s(e,p,j,d,41),g.expression=e.substring(p,N-1),g.type=ft.STATEMENT;continue}if(null!=a){l=N,o=a;continue}}(y===A||y===O)&&(b=y,y=E);var P=null;for(p=N;j>N;){if(d=e.charCodeAt(N),d===x&&e.charCodeAt(N+1)===w){P=!0,++N;do d=e.charCodeAt(++N);while(d!==k&&j>N)}if(64===d&&91===e.charCodeAt(N+1)&&(N=s(e,N+2,j,91,93)+1,d=e.charCodeAt(N)),b!==A&&(46===d||35===d))break;if(33>d||61===d||62===d||59===d||40===d||123===d||125===d)break;N++}if(o=e.substring(p,N),l=p,""===o){hn("String expected",e,N,d,y);break}if(P===!0){if(y===_){hn("Invalid interpolation (in tag name)",e,N,o,y);break}if(y===E)if("id"===a||b===A)o=u(o);else if("class"!==a){hn("Invalid interpolation (in attr name)",e,N,o,y);break}}}d!==d&&hn("IndexOverflow",e,N,d,y);var B=m.nodes;return null!=B&&1===B.length?B[0]:m},At=function(n){if(y(n)){for(var t=0;t<n.length;t++)At(n[t]);return n}return delete n.parent,delete n.__single,null!=n.nodes&&At(n.nodes),n},Et=function(n,t){return n&&2===n.length?t&&1===t.length?(x=n.charCodeAt(0),w=n.charCodeAt(1),k=t.charCodeAt(0),v=n[0],g=n[1],void(b=t)):void kn("Interpolation End must be of 1 Character"):void kn("Interpolation Start must contain 2 Characters")},kt=function(n,t,e){for(var r,i,o={},l=t;e>l&&(l=d(n,l,e),l!==e);){for(t=l;e>l&&(i=n.charCodeAt(l),!(61===i||33>i));l++);if(r=n.substring(t,l),l=d(n,l,e),l===e){o[r]=r;break}61===n.charCodeAt(l)?(l=t=d(n,l+1,e),i=n.charCodeAt(l),34!==i&&39!==i?(l=p(n,l,e),o[r]=n.substring(t,l)):(l=a(n,l+1,e,39===i?"'":'"'),o[r]=n.substring(t+1,l),l++)):o[r]=r}return o},Nt=function(n,t,e,r){var i,o,l,u,c=1,f=2,h=3,p=c;n:for(;e>t&&(t=d(n,t,e),t!==e);){switch(o=t,u=n.charCodeAt(t)){case 61:t++,p=f;continue n;case 123:case 59:case 62:case 47:p=h;break;case 40:t=s(n,++o,e,40,41),null!=l&&(r[l]=l),l="expression",i=n.substring(o,t),t++,p=f;break;case 39:case 34:t=a(n,++o,e,39===u?"'":'"'),i=n.substring(o,t),t++;break;default:for(t++;e>t&&(u=n.charCodeAt(t),!(33>u||61===u||123===u||59===u||62===u||47===u));t++);i=n.substring(o,t)}if(""!==i)if(p!==f){if(null!=l&&(r[l]=l,l=null),p===h)break;l=i}else r[l]=i,p=c,l=null;else hn("Token not readable",n,t),t++}return t},Ct=function(n,t,e){var r=d(n,t,e),i=n.charCodeAt(r);if(34!==i&&39!==i)return dn("A quote is expected",n,r),null;var o=!1,l=!1,u=39===i?"'":'"';for(t=++r;(r=n.indexOf(u,r))>-1&&92===n.charCodeAt(r-1);)o=!0,r++;if(-1===r&&(hn("Literal has no ending",n,t-1),r=e),r===t){var s=n.charCodeAt(r+1);s===i&&(l=!0,t=r+2,r=n.indexOf(u+u+u,t),-1===r&&(r=e))}var a=n.substring(t,r);return o===!0&&(a=a.replace(en[u],u)),r+=l?3:1,[a,r]}}(ft.Node,ft.TextNode,ft.Fragment,ft.Component);var St=0,Tt,jt;!function(){!function(){jt=X(nn,{constructor:function(n){S(this,n)},async:!1,defers:null,_id:null,_models:null,_modules:null,_redirect:null,_rewrite:null})}();var n,t;!function(){function r(n,t,r,i,o,l){null!=n.tagName&&n.tagName!==n.compoName&&(n.nodes={tagName:n.tagName,attr:n.attr,nodes:n.nodes,type:1}),null!=n.model&&(t=n.model);var u=n.nodes,s=[];if(null!=u){for(var a=u instanceof Array,c=a===!0?u.length:1,f=0,d=null,h=e.createDocumentFragment();c>f;f++)d=a===!0?u[f]:u,Tt(d,t,r,h,n,s);i.parentNode.insertBefore(h,i)}if(null==n.tagName){var p,v,g=n.handlers&&n.handlers.attr;for(v in n.attr)p=null,g&&m(g[v])&&(p=g[v]),null==p&&m(Pn[v])&&(p=Pn[v]),null!=p&&p(i,n.attr[v],t,r,s[0],n)}if(m(l)&&l.call(n,s,t,r,i.parentNode),null!=o&&o!==s)for(var y=o.length,b=s.length,x=-1;++x<b;)o[y+x]=s[x]}n=function(n,t,i,o,l,u){var s=e.createComment("");return o.appendChild(s),function(){return r(n,t,i,s,l,u)}},t=function(n,t){var e=n.components;return null==e?void(n.components=[t]):void e.push(t)}}();var r;!function(){r=function(t,e,r,i,o){var l=t.content;if(m(l)){var u=l("node",e,r,i,o);if("string"==typeof u)return void n(i,u);for(var s,a="",c=u.length,f=0;c>f;f++)if(s=u[f],"object"!=typeof s)a+=s;else{if(""!==a&&(n(i,a),a=""),null==s.nodeType){a+=s.toString();continue}i.appendChild(s)}return void(""!==a&&n(i,a))}n(i,l)};var n;!function(t){n=function(n,e){n.appendChild(t.createTextNode(e))}}(e)}();var i;!function(){i=function(t,e,r,i,o,l){var u=t.tagName,s=t.attr,a=n(u);if(null!=a){null!=l&&(l.push(a),s["x-compo-id"]=o.ID),null!=i&&i.appendChild(a);var c,f,d,h;for(c in s){if(f=s[c],m(f)){var p=f("attr",e,r,a,o,c);if(null==p)continue;if("string"==typeof p)d=p;else if(b(p)){if(0===p.length)continue;d=p.join("")}else d=p}else d=f;null!=d&&""!==d&&(h=Pn[c],null!=h?h(t,d,e,r,a,o,i):a.setAttribute(c,d))}return a}};var n;!function(t){n=function(n){return t.createElement(n)}}(e)}();var o;!function(){function e(e,r,i,o,l,u,s){var a,c;e.ID=++St,e.attr=a=on(e.attr,r.attr),e.parent=u,e.expression=r.expression,null==e.compoName&&(e.compoName=r.tagName),null==e.model&&(e.model=i),null==e.nodes&&(e.nodes=r.nodes);for(c in a)"function"==typeof a[c]&&(a[c]=a[c]("attr",i,o,l,u,c));if(cn("compoCreated",e,i,o,l),m(e.renderStart)&&e.renderStart(i,o,l),t(u,e),e.async===!0){var f=n(e,i,o,l,s,e.renderEnd);return e.await(f),null}return null!=e.tagName&&(e.nodes={tagName:e.tagName,attr:e.attr,nodes:e.nodes,type:1}),"function"==typeof e.render?(e.render(e.model,o,l),null):e}function r(n,e,r,i,o,l,u){var s,a,c,f=n.__Ctor,d=!1;if(null!=f)c=new f(e,l);else{c=n;for(var h in e)c[h]=e[h];c.parent=l}var p=c.attr;if(null!=p)for(var h in p)"function"==typeof p[h]&&(p[h]=p[h]("attr",r,i,o,l,h));m(c.renderStart)&&c.renderStart(r,i,o,l,u),c.ID=++St,t(l,c);var v=l.components.length-1;return m(c.render)&&(d=!0,s=c.render(r,i,o,l,u),B(u,s),m(c.renderEnd)&&(a=c.renderEnd(s,r,i,o,l),null!=a&&(l.components[v]=a,a.components=null==c.components?l.components.splice(v+1):c.components))),d===!0?null:c}function i(n,e,r,i,o,l){n.ID=++St,t(o,n),null==n.model&&(n.model=e);var u=n.elements=[];return n.render?n.render(n.model,r,i,o,u):Tt(n.nodes,n.model,r,i,n,u),null!=l&&0!==u.length&&B(l,u),null}o=function(n,t,o,l,u,s){var a,c=n.tagName;if(null!=n.controller&&(a=n.controller),null==a&&(a=Bn[c]),null==a)return i(n,t,o,l,u,s);var f,d=!1;"function"==typeof a?f=new a(n,t,o,l,u):(f=a,d=!0);var h=d?r:e;return h(f,n,t,o,l,u,s)}}(),Tt=function(n,t,l,u,s,a){if(null==n)return u;var c,f,d,h,p=n.type;if(null==s&&(s=new ft.Component),null==p&&(b(n)?p=10:null!=n.tagName?p=1:null!=n.content&&(p=2)),1===p&&null!=Bn[n.tagName]&&(p=4),null==u&&1!==p&&(u=e.createDocumentFragment()),2===p)return r(n,t,l,u,s),u;if(10===p){for(d=0,h=n.length;h>d;d++)Tt(n[d],t,l,u,s,a);return u}var v=n.tagName;if("else"===v)return u;if(15===p){var g=Hn[v];if(null==g){if(null==Bn[v])return kn("<mask: statement is undefined>",v),u;p=4}if(15===p)return g.render(n,t,l,u,s,a),u}if(1===p&&(u=i(n,t,l,u,s,a),a=null),4===p){if(s=o(n,t,l,u,s,a),null==s)return u;c=[],n=s,s.model!==t&&null!=s.model&&(t=s.model)}var y=n.nodes;if(null!=y)if(null!=a&&null==c&&(c=a),b(y))for(var x=y.length,w=0;x>w;w++)Tt(y[w],t,l,u,s,c);else Tt(y,t,l,u,s,c);if(4===p){if(null==n.tagName){var k,N,f,C=n.handlers&&n.handlers.attr;for(f in n.attr)N=n.attr[f],null!=N&&(k=null,null!=C&&m(C[f])&&(k=C[f]),null==k&&null!=Pn[f]&&(k=Pn[f]),null!=k&&k(n,N,t,l,c[0],s))}m(n.renderEnd)&&n.renderEnd(c,t,l,u)}return null!=a&&null!=c&&a!==c&&B(a,c),u}}();var Mt;!function(){Mt={render:function(n,e,r,i,o){var l=n;return"string"==typeof n&&(l=a.call(t,n)?t[n]:t[n]=xt(n)),(null==r||r.constructor!==jt)&&(r=new jt(r)),Tt(l,e,r,i,o)},renderAsync:function(n,t,e,r,i){(null==e||e.constructor!==jt)&&(e=new jt(e));var o=this.render(n,t,e,r,i),l=new nn;return e.async===!0?e.done(function(){l.resolve(o)}):l.resolve(o),l},compile:xt,parse:xt,parseHtml:wt,stringify:dt,build:Tt,run:pt,merge:vt,optimize:gt,registerOptimizer:function(n,t){Kn[n]=t},registerHandler:Zn,registerFromTemplate:tt,define:ot,getHandler:Jn,getHandlers:Qn,registerStatement:function(n,t){Hn[n]=m(t)?{render:t}:t},getStatement:function(n){return null!=n?Hn[n]:Hn},registerAttrHandler:function(n,t,e){m(t)&&(e=t),Pn[n]=e},getAttrHandler:function(n){return null!=n?Pn[n]:Pn},registerUtil:qn,getUtil:Xn,$utils:Yn,_:Yn,registerUtility:function(n,t){this.registerUtility=this.registerUtil,this.registerUtility(n,t)},getUtility:function(n){return this.getUtility=this.getUtil,this.getUtility()},clearCache:function(n){return 0===arguments.length?void(t={}):void delete t[n]},Utils:{Expression:ct,getProperty:function(n,t){return wn("mask.getProperty is deprecated. Use `mask.obj.get`"),E(n,t)},ensureTmplFn:_t},Dom:ft,TreeWalker:bt,Module:mt,plugin:function(n){},obj:{get:E,set:A,extend:S},is:{Function:m,String:x,ArrayLike:b,Array:b,Object:w,NODE:C,DOM:_},"class":{create:X,createError:q,Deferred:nn,EventEmitter:tn},parser:{ObjectLexer:Ot},on:sn,off:an,delegateReload:function(){},setInterpolationQuotes:Et,setCompoIndex:function(n){St=n},cfg:i,config:i,toHtml:function(n){return $(n).outerHtml()},factory:function(t){var e=o.call(arguments,1),r=e.pop(),i="both";if(0!==e.length){var l=e[0];("client"===l||"server"===l)&&(i=l)}return"client"===i&&C||"server"===i&&_?void Zn(t,{meta:{mode:i}}):void r(n,$t.config.getDOMLibrary(),function(n){Zn(t,n)})}};var t={}}();var $t=t.Compo=Mt.Compo=function(r){function i(){null!=f&&null!=f.fn&&(f.fn.compo=function(n){if(0===this.length)return null;var t=tn.resolveCompo(this[0],!0);return null==n?t:b(t,v(n,h.CONTROLLER,"up"))},f.fn.model=function(n){var t=this.compo(n);if(null==t)return null;for(var e=t.model;null==e&&t.parent;)t=t.parent,e=t.model;return e},function(){var n=["append","prepend","before","after"];["appendMask","prependMask","beforeMask","afterMask"].forEach(function(t,e){f.fn[t]=function(t,i,o,l){if(0===this.length)return this;this.length>1,null==o&&(o=2>e?this.compo():this.parent().compo());var u=!1;null==o&&(o={},u=!0),null==o.components&&(o.components=[]);for(var s=o.components,a=s.length,c=r.render(t,i,l,null,o),f=this[n[e]](c),d=s.length;d>a;a++)en.signal.emitIn(s[a],"domInsert");return f}})}(),function(){function n(n,t){C(t)}function t(n,t){_(t)}var e=f.fn.remove,r=f.fn.empty;f.fn.removeAndDispose=function(){return this.each(n),e.call(this)},f.fn.emptyAndDispose=function(){return this.each(t),r.call(this)}}())}function s(){}var a,c,f,d,h=r.Dom,p=r.Utils.ensureTmplFn;!function(){function e(){for(var n,t=arguments.length;--t>-1;)if(n=c(arguments[t]),null!=n)return n;return null}a=function(n){return"string"!=typeof n?n:p(n)},c=function(n){return r[n]||o[n]||i[n]};var r=n,i=n.atma||{},o=t||{};f=e("jQuery","Zepto","$"),d=e("Class")}();var v,g;!function(){function n(n){return function(e){return t(e,n)}}function t(n,e,r){if("string"!=typeof n)return!1;if(null==r&&(r=0),r=n.indexOf(e,r),-1===r)return!1;if(r>0&&n.charCodeAt(r-1)>32)return t(n,e,r+1);var i=n.length,o=e.length;return i-o>r&&n.charCodeAt(r+o)>32?t(n,e,r+1):!0}v=function(t,e,r){if(null==t&&kn("<compo>selector is undefined",e),"object"==typeof t)return t;var i,o,l;if(null==i)switch(t[0]){case"#":i="id",t=t.substring(1),o="attr";break;case".":i="class",t=n(t.substring(1)),o="attr";break;default:i=e===h.SET?"tagName":"compoName"}return l="up"===r?"parent":e===h.SET?"nodes":"components",{key:i,prop:o,selector:t,nextKey:l}},g=function(n,t,e){if(null==n)return!1;x(t)&&(null==e&&(e=h[n.compoName?"CONTROLLER":"SET"]),t=v(t,e));var r=t.prop?n[t.prop]:n;return null==r?!1:m(t.selector)?t.selector(r[t.key]):null!=t.selector.test?t.selector.test(r[t.key]):r[t.key]==t.selector}}();var b,w;!function(){b=function(n,t){if(null==n)return null;if(y(n)){for(var e,r=n.length,i=0;r>i;i++)if(e=b(n[i],t),null!=e)return e;return null}return g(n,t)?n:(n=n[t.nextKey],null==n?null:b(n,t))},w=function(n,t,e){if(null==e&&(e=[]),y(n)){for(var r=n.length,i=0;r>i;i++)w(n[i],t,e);return e}return g(n,t)&&e.push(n),n=n[t.nextKey],null==n?e:w(n,t,e)}}();var k,C,_;!function(){k=function(n,t,e,r,i){return Z.supports(t)?void Z.on(n,t,e):V.supports(t,r)?void V.attach(n,t,r,e,i):null!=f?f(n).on(t,e):null!=n.addEventListener?n.addEventListener(t,e,!1):void(n.attachEvent&&n.attachEvent("on"+t,e))},C=function(n){if(n.hasAttribute("x-compo-id")){var t=n.getAttribute("x-compo-id"),e=tn.getByID(t);if(null!=e){if(null==e.$||1===e.$.length)return O(e),void T(e);var r=u.call(e.$,n);-1!==r&&l.call(e.$,r,1)}}_(n)},_=function(n){for(var t=n.firstChild;null!=t;)1===t.nodeType&&C(t),t=t.nextSibling}}();var E,A;!function(){E=function(n,t){return n.filter(t).add(n.find(t))},A=function(n,t,e,r){return null==e?n.on(t,r):(n.on(t,e,r).filter(e).on(t,r),n)}}();var O,T,j,M,$,D,R,L,U;!function(){function n(n){var t=n.template;if(null==t){if(t=n.attr.template,null==t)return null;delete n.attr.template}if("object"==typeof t)return t;if(x(t)){if(35===t.charCodeAt(0)&&/^#[\w\d_-]+$/.test(t)){var i=e.getElementById(t.substring(1));if(null==i)return wn("Template not found by id:",t),null;t=i.innerHTML}return r.parse(t)}return wn("Invalid template",typeof t),null}O=function(n){null!=n.dispose&&n.dispose(),tn.removeCompo(n);var t=n.components;if(null!=t)for(var e=t.length;--e>-1;)O(t[e])},T=function(n){var t=n.parent;if(null!=t){var e,r=n.$,i=t.$||t.elements;if(i&&r){var o,l,u=r.length;for(e=i.length;--e>-1;)for(o=i[e],l=u;--l>-1;)if(o===r[l]){i.splice(e,1);break}}var s=t.components;if(null!=s){for(e=s.length;--e>-1;)if(s[e]===n){s.splice(e,1);break}-1===e&&wn("<compo:remove> - i`m not in parents collection",n)}}},j=function(t){if(null==t.nodes)return void(t.nodes=n(t));var e=t.meta.template;if(null!=e&&"replace"!==e){var r=n(t);if(null!=r)return"merge"===e?void(t.nodes=vt(r,t.nodes,t)):"join"===e?void(t.nodes=[r,t.nodes]):void kn("Invalid meta.nodes behaviour",e)}},M=function(n,t){if(null==n.dispose)return void(n.dispose=t);var e=n.dispose;n.dispose=function(){t.call(this),e.call(this)}},$=function(n){if(n.$)return void n.$.remove();var t=n.elements;if(t)for(var e=-1,r=t.length;++e<r;)t[e].parentNode&&t[e].parentNode.removeChild(t[e]);else{var i=n.components;if(i)for(var e=-1,r=i.length;++e<r;)$(i[e])}},D=function(n,t,e){var r=en.pause(t,e);n.then(r,function(n){R(t,n),r()})},R=function(n,t){var e="[%] Asynchronous action failed.".replace("%",n.compoName||n.tagName);if(t){var r=t.message||t.statusText||String(t);r&&(e+=" "+r)}n.nodes=Nn(e),n.renderEnd=z},function(){function n(n){return function(t,e){var r,o,l,u,s=t.attr;for(r in n)if(o=n[r],l=s[r],u=o(t,l,e),null!=u)return i(t,u,r,l),!1;return!0}}function t(n,t,e,i){var u=63===t.charCodeAt(0),s=null,a=u?t.substring(1):t,c=r(a),f=null,d=typeof e;return"string"===d?"string"===e||"number"===e||"boolean"===e?f=o[e]:(u=!0,s=e,f=l.any()):"boolean"===d||"number"===d?(u=!0,f=o[d],s=e):"function"===d?f=e:null==e?f=l.any():e instanceof RegExp?f=l.regexp(e):"object"==typeof e&&(f=l.options(e),s=e["default"],void 0!==s&&(u=!0)),null==f?void kn("Function expected for the attr. handler",t):(n[c]=null,n=null,void(i[a]=function(n,t,e){if(null==t)return u===!1?Error("Expected"):(null!=s&&(n[c]=s),null);var r=f.call(n,t,n,e,a);return r instanceof Error?r:(n[c]=r,null)}))}function e(n,t){return t.toUpperCase()}function r(n){var t=n;return 120!==t.charCodeAt(0)&&(t="x-"+t),t.replace(/-(\w)/g,e)}function i(n,t,e,r){t.message=n.compoName+" - attribute `"+e+"`: "+t.message,R(n,t),kn(t.message,". Current: ",r)}L=function(e){null==e.meta&&(e.meta={attributes:null,cache:null,mode:null});var r=e.meta.attributes,i=null;if(r){var o={};for(var l in r)t(e,l,r[l],o);i=n(o)}e.meta.handleAttributes=i},U=function(n,t){var e=n.meta&&n.meta.handleAttributes;return null==e?!0:e(n,t)};var o={string:function(n){return"string"==typeof n?n:Error("String")},number:function(n){var t=Number(n);return t===t?t:Error("Number")},"boolean":function(n,t,e,r){return"boolean"==typeof n?n:n===r?!0:"true"===n||"1"===n?!0:"false"===n||"0"===n?!1:Error("Boolean")}},l={regexp:function(n){return function(t){return n.test(t)?t:Error("RegExp")}},any:function(){return function(n){return n}},options:function(n){var t=n.type,e=n["default"]||u[t],r=n.validate,i=n.transform;return function(n){if(!n)return e;if(null!=t){var l=o[t];if(null!=l&&(n=l.apply(this,arguments),n instanceof Error))return n}if(r){var u=r.call(this,n);if(u)return Error(u)}return i&&(n=i.call(this,n)),n}}},u={string:"","boolean":!1,number:0}}()}();var F,H;!function(){F=function(n){var t,e,r=n.length,i=n[r-1];r>1&&P(i,o.call(n,0,r-1)),null==i&&(i={});var l=c("include");null!=l&&(i.__resource=l.url);i.attr;for(e in i.attr)i.attr[e]=a(i.attr[e]);var u=i.slots;for(e in u)"string"==typeof u[e]&&(u[e]=i[u[e]]);L(i),t=i.hasOwnProperty("constructor")?i.constructor:function(){},t=H(t,i);for(e in rn)null==i[e]&&(i[e]=rn[e]);return t.prototype=i,i=null,t},H=function(n,t){var e=t.compos,r=t.pipes,i=t.scope,o=t.attr;return null==e&&null==r&&null==o&&null==i?n:function(t,l,u,s,a){if(null!=n){var c=n.call(this,t,l,u,s,a);if(null!=c)return c}null!=e&&(this.compos=I(this.compos)),null!=r&&Q.addController(this),null!=o&&(this.attr=I(this.attr)),null!=i&&(this.scope=I(this.scope))}}}();var P;!function(){function n(r,i,o){if(null!=r&&null!=i){if("node"===o){var l=r.template||r.nodes,u=i.template||i.nodes;r.template=null==l||null==u?l||u:vt(u,l,r,{extending:!0}),null!=r.nodes&&(r.nodes=r.template)}var s,a,c,f=!1;for(var d in i)if(s=i[d],null!=s&&"constructor"!==d&&("node"!==o||"template"!==d&&"nodes"!==d))if(a=typeof s,null!=r[d]){if("node"===o){var h="renderStart"===d||"renderEnd"===d||"emitIn"===d||"emitOut"===d||"components"===d||"nodes"===d||"template"===d||"find"===d||"closest"===d||"on"===d||"remove"===d||"slotState"===d||"signalState"===d||"append"===d||"appendTo"===d;if(h===!0)continue}if("pipes"!==o)if("function"!==a){if("object"===a){switch(d){case"slots":case"pipes":case"events":case"attr":n(r[d],s,d);continue}t(r[d],s)}}else c=!1,"slots"===o||"events"===o||"pipe"===o?c=!0:"node"!==o||"onRenderStart"!==d&&"onRenderEnd"!==d||(c=!0),r[d]=e(r[d],s,c),f=!0;else n(r[d],s,"pipe")}else r[d]=s;f===!0&&(null!=r["super"]&&kn("`super` property is reserved. Dismissed. Current prototype",r),r["super"]=null)}}function t(n,e){var r,i,o;for(var o in e)r=n[o],i=e[o],null!=r?N(r)&&N(i)&&t(r,i):n[o]=i}function e(n,t,e){function r(){var n=u._fn||(u._fn=l(u._fn_chain));return n.apply(this,arguments)}if("compoInheritanceWrapper"===n.name)return n._fn_chain.push(t),n;var l=e===!0?o:i,u=r;return u._fn_chain=[n,t],u._fn=null,u}function i(n){for(var t=n.length,e=n[--t];--t>-1;)e=l(n[t],e);return e}function o(n){var t=n.length;return function(){for(var e,r,i,o=t;--o>-1;)r=n[o],null!=r&&(i=G(r,this,arguments),void 0!==i&&(e=i));return e}}function l(n,t){return function(){this["super"]=t;var e=G(n,this,arguments);return this["super"]=null,e}}function u(n){var t=n.length;return function(){for(var e,r=t;--r>-1;){var i=n[r].apply(this,arguments);null!=i&&(e=i)}return e}}P=function(t,e){for(var i,o=e.length,l=o,s=[];--l>-1;)i=e[l],"string"==typeof i&&(i=r.getHandler(i),null!=i&&"Resolver"===i.name&&(kn("Inheritance error: private component"),i=null)),null!=i?("function"==typeof i&&(s.push(i),i=i.prototype),n(t,i,"node")):kn("Base component not defined",e[l]);l=-1,o=s.length,o>0&&(t.hasOwnProperty("constructor")&&s.unshift(t.constructor),t.constructor=u(s));var a=t.meta;null==a&&(a=t.meta={}),null==a.template&&(a.template="merge")}}();var B;!function(){B=function(n){return null==n||"function"!=typeof n.then?!1:m(n.isBusy)?n.isBusy():m(n.state)?"pending"===n.state():(wn("Class or jQuery deferred interface expected"),!1)}}();var V,K={select:function(n,t){for(var e in t){var r=t[e],i=null,o=null;if(r instanceof Array&&(o=r[0],i=r.splice(1)),"string"==typeof r&&(o=r),null==r||null==o)return kn("Unknown component child",e,t[e]),void wn("Is this object shared within multiple compo classes? Define it in constructor!");var l=o.indexOf(":"),u=o.substring(0,l);u=en.config.selectors[u],null==u?n.compos[e]=n.$[0].querySelector(o):(o=o.substring(++l).trim(),n.compos[e]=u(n,o));var s=n.compos[e];null!=i&&(null!=s.$&&(s=s.$),Y.on(n,i,s))}}},Y={on:function(n,t,e){null==e&&(e=n.$);for(var r,i=t instanceof Array,o=i?t.length:1,l=0;i?o>l:1>l;l++)if(r=i?t[l]:t,r instanceof Array)null!=q&&(r[0]=q(r[0])),e.on.apply(e,r);else for(var u in r){var s,a,c="string"==typeof r[u]?n[r[u]]:r[u],f=u.indexOf(":");-1!==f?(s=u.substring(0,f),a=u.substring(f+1).trim()):s=u,null!=q&&(s=q(s)),A(e,s,a,W(c,n))}}},q=null,J=function(){var n=function(){if(null==e)return!1;if("createTouch"in e)return!0;try{return!!e.createEvent("TouchEvent").initTouchEvent}catch(n){return!1}}();return{touch:function(t){return n===!1?t:"click"===t?"touchend":"mousedown"===t?"touchstart":"mouseup"===t?"touchend":"mousemove"===t?"touchmove":t}}}(),Q=function(){function n(n,t){return function(e){new u(n).emit(t,e)}}function t(n,t){return null==t.pipes[n]?void kn("Controller has no pipes to be added to collection",n,t):(null==s[n]&&(s[n]=[]),void s[n].push(t))}function e(n,t){for(var e=s[n],r=e.length;--r>-1;)e[r]===t&&e.splice(r,1)}function i(){var n=this,t=n.pipes;for(var r in t)e(r,n)}function l(n){var e=n.pipes;for(var r in e)t(r,n);en.attachDisposer(n,i.bind(n))}function u(n){return this instanceof u==!1?new u(n):(this.pipeName=n,this)}var s={};return r.registerAttrHandler("x-pipe-signal","client",function(t,e,r,i,o,l){for(var u,s=e.split(";"),a=s.length,c=-1;++c<a;)if(u=s[c].trim(),""!==u){var f,d,h=u.indexOf(":"),p=u.substring(0,h),v=u.substring(h+1).trim(),g=v.indexOf(".");if(-1===g)return void kn('define pipeName "click: pipeName.pipeSignal"');f=v.substring(0,g),d=v.substring(++g);var m=n(f,d);k(o,p,m)}}),u.prototype={constructor:u,emit:function(n){var t,e=s[this.pipeName],r=this.pipeName;if(null!=e){2===arguments.length&&y(arguments[1])?t=arguments[1]:arguments.length>1&&(t=o.call(arguments,1));for(var i,l,u,a,c=e.length;-1!==--c;)i=e[c],l=i.pipes[r],null!=l&&(u=l[n],m(u)&&(u.apply(i,t),a=!0))}}},u.addController=l,u.removeController=i,{addController:l,removeController:i,pipe:u}}();!function(){var n,t,r;!function(){n=function(n,t,e){n.addEventListener(t,e,!1)},t=function(n,t,e){n.removeEventListener(t,e,!1)},r=function(n){var t=n.keyCode||n.which;return t>=96&&105>=t?t-48:t}}();var i,o,l;i={backspace:8,tab:9,"return":13,enter:13,shift:16,ctrl:17,control:17,alt:18,option:18,fn:255,pause:19,capslock:20,esc:27,escape:27,space:32,pageup:33,pagedown:34,end:35,home:36,start:36,left:37,up:38,right:39,down:40,insert:45,ins:45,del:46,numlock:144,scroll:145,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,";":186,"=":187,"*":106,"+":107,"-":189,".":190,"/":191,",":188,"`":192,"[":219,"\\":220,"]":221,"'":222},o={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},l={16:"shiftKey",17:"ctrlKey",18:"altKey"};var u,s,a,c;!function(){s=function(n,t){return n.ctrlKey||n.altKey?!1:u(n.target)},a=function(n){return null==n.$||0===n.$.length?!1:c(n.$.get(0))},c=function(n){if(e.contains(n)===!1)return!1;if("none"===n.style.display)return!1;var t=n.disabled;return t===!0?!1:!0},u=function(t){var e=t.tagName;return"TEXTAREA"===e?!0:"INPUT"!==e?!1:-1===n.indexOf(" "+t.type+" ")};var n=" button submit checkbox file hidden image radio range reset "}();var f;!function(){function t(){e=new b,n(window,"keydown",f),n(window,"keyup",f),n(window,"focus",f.reset)}f={on:function(n,r,i){null==e&&t();var o=d.create(n,"keydown",r,i);e.attach(o)},off:function(n){e.off(n)},handleEvent:function(n){e.handle(n.type,r(n),n)},reset:function(){e.reset()}};var e}();var d;!function(){function n(n){for(var t,e,r=n.split("+"),o=r.length,l=0,u=[];o>l;l++){if(t=r[l].trim(),e=i[t],void 0===e){if(1!==t.length)throw Error("Unexpected sequence. Neither a predefined key, nor a char: "+t);e=t.toUpperCase().charCodeAt(0)}u[l]=e}return{last:u[o-1],keys:u.sort()}}d=function(n){this.set=n},d.parse=function(t){for(var e=t.split(","),r=[],i=e.length,o=0;i>o;o++)r[o]=n(e[o]);return r},d.create=function(n,t,e,r){var i=d.parse(n),o=h.create(i);return null==o&&(o=new p(i)),o.init(t,e,r),o},d.prototype={type:null,ctx:null,set:null,fn:null,init:function(n,t,e){this.type=n,this.ctx=e,this.fn=t},tryCall:null}}();var h;!function(){h=X(d,{constructor:function(n,t,e){this.key=t,this.mods=e},tryCall:function(n,t,e){if(n.type!==this.type||e!==this.key)return g;for(var r in this.mods)if(n[r]!==this.mods[r])return g;return this.fn.call(this.ctx,n),v}}),h.create=function(n){if(1!==n.length)return null;for(var t,e,r=n[0].keys,i=r.length,o={shiftKey:!1,ctrlKey:!1,altKey:!1};--i>-1;)if(l.hasOwnProperty(r[i])!==!1)o[l[r[i]]]=!0,e=!0;else{if(null!=t)return null;t=r[i]}return new h(n,t,o)}}();var p,v=1,g=2,m=3,y=4;!function(){p=X(d,{index:0,tryCall:function(n,t,e){var r=this.check_(t,e);return r===v&&(this.index=0,this.fn.call(this.ctx,n)),r},fail_:function(){return this.index=0,g},check_:function(n,t){var e=this.set[this.index],r=e.keys,i=e.last,o=n.length;if(o<r.length)return m;if(o>r.length)return this.fail_();if(i!==t)return this.fail_();for(;--o>-1;)if(r[o]!==n[o])return this.fail_();return this.index<this.set.length-1?(this.index++,y):(this.index=0,v)}})}();var b;!function(){b=function(){this.keys=[],this.combs=[]},b.prototype={keys:null,combs:null,attach:function(n){this.combs.push(n)},off:function(n){for(var t=this.combs.length,e=0;t>e;e++)if(this.combs[e].fn===n)return this.combs.splice(e,1),!0;return!1},handle:function(n,t,e){return 0===this.combs.length||this.filter_(e,t)?void 0:"keydown"===n?void(this.add_(t)&&this.emit_(n,e,t)):void("keyup"===n&&(this.emit_(n,e,t),this.remove_(t)))},handleEvent:function(n){var t=r(n),e=n.type;this.handle(e,t,n)},reset:function(){this.keys.length=0},add_:function(n){for(var t,e=this.keys.length,r=0;e>r;r++){if(t=this.keys[r],t===n)return!1;if(t>n)return this.keys.splice(r,0,n),!0}return this.keys.push(n),!0},remove_:function(n){for(var t=this.keys.length;--t>-1;)if(this.keys[t]===n)return void this.keys.splice(t,1)},emit_:function(n,t,e){for(var r,i,o=!1,l=this.combs,u=l.length,s=0;u>s;s++)r=l[s],r.type===n&&(i=r.tryCall(t,this.keys,e),(v===i||i===y)&&t.preventDefault(),(i===m||i===y)&&(o=!0))},filter_:function(n,t){return s(n,t)}}}(),V={supports:function(n,t){if(null==t)return!1;switch(n){case"press":case"keypress":case"keydown":case"keyup":case"hotkey":case"shortcut":return!0}return!1},on:function(t,e,i,o){("keypress"===e||"press"===e)&&(e="keydown");var l=d.create(i,e,o);if(l instanceof h)return void n(t,e,function(n){var t=r(n),e=l.tryCall(n,null,t);e===v&&n.preventDefault()});var u=new b;n(t,"keydown",u),n(t,"keyup",u),u.attach(l)},hotkeys:function(n,t){var e,r;for(r in t)e=t[r],f.on(r,e,n);M(n,function(){var n;for(n in t)f.off(t[n])})},attach:function(n,t,e,r,i){if(u(n))return void this.on(n,t,e,r);for(var o=i;o&&null==o.slots;)o=o.parent;if(null==o)return void kn("Slot-component not found:",e);var l=o.hotkeys;null==l&&(l=o.hotkeys={}),l[e]=r}}}();var Z;!function(){var t,r,i,o;!function(){o="ontouchstart"in n,t=function(n,t,e){n.addEventListener(t,e,!1)},r=function(n,t,e){n.removeEventListener(t,e,!1)},i=function(n,t){var e=new CustomEvent(t,{cancelable:!0,bubbles:!0});n.dispatchEvent(e)}}();var l;!function(){function n(n){var t=null,r=n.changedTouches;return r&&r.length&&(t=r[0]),null==t&&n.touches&&(t=n.touches[0]),null==t?n:e(n,t)}function e(n,t){var e=Object.create(MouseEvent.prototype);for(var r in n)e[r]=n[r];for(var r in o)e[r]=t[r];return new MouseEvent(i[n.type],e)}l=function(n,e,i){this.el=n,this.fn=i,this.dismiss=0,t(n,e,this),t(n,r[e],this)};var r={mousemove:"touchmove",mousedown:"touchstart",mouseup:"touchend"},i={touchmove:"mousemove",touchstart:"mousedown",touchup:"mouseup"};l.prototype={handleEvent:function(t){switch(t.type){case"touchstart":case"touchmove":case"touchend":this.dismiss++,t=n(t),this.fn(t);break;case"mousedown":case"mousemove":case"mouseup":--this.dismiss<0&&(this.dismiss=0,this.fn(t))}}};var o={clientX:1,clientY:1,pageX:1,pageY:1,screenX:1,screenY:1}}();var u;!function(){u=function(n,e){this.state=0,this.el=n,this.fn=e,this.startX=0,this.startY=0,this.tStart=0,this.tEnd=0,this.dismiss=0,t(n,"touchstart",this),t(n,"touchend",this),t(n,"click",this)};var n=300,o=10,l=null;u.prototype={handleEvent:function(n){var t=n.type;switch(t){case"touchmove":case"touchstart":case"touchend":l=n.timeStamp,this[t](n);break;case"touchcancel":this.reset();break;case"click":this.click(n)}},touchstart:function(n){t(e.body,"touchmove",this);var r=n.touches[0];this.state=1,this.tStart=n.timeStamp,this.startX=r.clientX,this.startY=r.clientY},touchend:function(t){return this.tEnd=t.timeStamp,1===this.state?(this.dismiss++,this.tEnd-this.tStart<=n?void this.call(t):void i(this.el,"taphold")):void this.reset()},click:function(n){if(null!=l){var t=l-n.timeStamp;if(500>t)return}if(!(--this.dismiss>-1)){var t=n.timeStamp-this.tEnd;400>t||(this.dismiss=0,this.call(n))}},touchmove:function(n){var t=n.touches[0],e=t.clientX-this.startX;if(0>e&&(e*=-1),e>o)return void this.reset();var r=t.clientY-this.startY;return 0>r&&(r*=-1),r>o?void this.reset():void 0},reset:function(){this.state=0,r(e.body,"touchmove",this);

},call:function(n){this.reset(),this.fn(n)}}}(),Z={supports:function(n){if(o===!1)return!1;switch(n){case"click":case"mousedown":case"mouseup":case"mousemove":return!0}return!1},on:function(n,t,e){return"click"===t?new u(n,e):new l(n,t,e)}}}();var tn;!function(){tn={create:function(t){var e=t.ID;return null==e?void wn("Component should have an ID"):void(n[e]=t)},resolveCompo:function(t,e){if(null==t)return null;var r,i,o;do{if(i=t.getAttribute("x-compo-id"),null!=i&&(null==r&&(r=i),o=n[i],null!=o&&(o=en.find(o,{key:"ID",selector:r,nextKey:"components"}),null!=o)))return o;t=t.parentNode}while(null!=t&&1===t.nodeType);return null},removeCompo:function(t){var e=t.ID;null!=e&&(n[e]=void 0)},getByID:function(t){return n[t]}};var n={}}();var en,rn;!function(){en=function(){return this instanceof en?void 0:F(arguments)},S(en,{create:function(){return F(arguments)},createClass:function(){var n=F(arguments),t=n.prototype;return t.Construct=n,d(t)},initialize:function(n,t,e,i,o){function l(n){u={controller:n,type:h.COMPONENT}}if(null==n)throw Error("Undefined is not a component");null==i&&(e&&null!=e.nodeType?(i=e,e=null):t&&null!=t.nodeType&&(i=t,t=null));var u;if("string"==typeof n)if(/^[^\s]+$/.test(n)){var s=r.getHandler(n);if(null==s)throw Error("Component not found: "+n);l(s)}else l(en({template:n}));else"function"==typeof n&&l(n);null==o&&null!=i&&(o=tn.resolveCompo(i)),null==o&&(o=new en);var a=r.render(u,t,e,null,o),c=o.components[o.components.length-1];return null!=i&&(i.appendChild(a),en.signal.emitIn(c,"domInsert")),c},find:function(n,t){return b(n,v(t,h.CONTROLLER,"down"))},closest:function(n,t){return b(n,v(t,h.CONTROLLER,"up"))},dispose:O,ensureTemplate:j,attachDisposer:M,config:{selectors:{$:function(n,t){var e=E(n.$,t);return e},compo:function(n,t){var e=en.find(n,t);return e}},setDOMLibrary:function(n){f!==n&&(f=n,i())},getDOMLibrary:function(){return f},eventDecorator:function(n){return"function"==typeof n?void(q=n):"string"==typeof n?(console.error("EventDecorators are not used. Touch&Mouse support is already integrated"),void(q=J[n])):"boolean"==typeof n&&n===!1?void(q=null):void 0}},pipe:Q.pipe,resource:function(n){for(var t=n;null!=t;){if(t.resource)return t.resource;t=t.parent}return include.instance()},plugin:function(n){},Dom:{addEventListener:k}}),function(){en.pause=function(t,e){return null!=e&&(null==e.defers&&(e.defers=[]),null==e.resolve&&S(e,nn.prototype),e.async=!0,e.defers.push(t)),S(t,n),function(){en.resume(t,e)}},en.resume=function(n,t){if(n.async=!1,n.resume&&n.resume(),null!=t){for(var e,r=!1,i=t.defers,o=i.length,l=-1;++l<o;)e=i[l],e!==n?r=r||null!=e:i[l]=null;r===!1&&t.resolve()}};var n={async:!0,await:function(n){this.resume=n}}}(),rn={type:h.CONTROLLER,__resource:null,ID:null,tagName:null,compoName:null,nodes:null,components:null,expression:null,attr:null,model:null,slots:null,pipes:null,compos:null,events:null,hotkeys:null,async:!1,await:null,meta:{mode:null,modelMode:null,attributes:null,serializeNodes:null,handleAttributes:null},onRenderStart:null,onRenderEnd:null,render:null,renderStart:function(n,t,e){if(1===arguments.length&&null!=n&&n instanceof Array==!1&&null!=n[0]){var r=arguments[0];n=r[0],t=r[1],e=r[2]}if(U(this,n)!==!1&&(j(this),m(this.onRenderStart))){var i=this.onRenderStart(n,t,e);void 0!==i&&B(i)&&D(i,this,t)}},renderEnd:function(n,t,e,r){if(1===arguments.length&&n instanceof Array==!1){var i=arguments[0];n=i[0],t=i[1],e=i[2],r=i[3]}tn.create(this,n),this.$=f(n),null!=this.events&&Y.on(this,this.events),null!=this.compos&&K.select(this,this.compos),null!=this.hotkeys&&V.hotkeys(this,this.hotkeys),m(this.onRenderEnd)&&this.onRenderEnd(n,t,e,r)},appendTo:function(n){var t="string"==typeof n?e.querySelector(n):n;if(null==t)return wn("Compo.appendTo: parent is undefined. Args:",arguments),this;for(var r=this.$,i=0,o=r.length;o>i;i++)t.appendChild(r[i]);return this.emitIn("domInsert"),this},append:function(n,t,e){var i;if(null==this.$){var o="string"==typeof n?r.compile(n):n;return i=e?b(this,v(e,h.CONTROLLER,"down")):this,null==i.nodes?(this.nodes=o,this):(i.nodes=[this.nodes,o],this)}var l=r.render(n,t,null,null,this);return i=e?this.$.find(e):this.$,i.append(l),this.emitIn("domInsert"),this},find:function(n){return b(this,v(n,h.CONTROLLER,"down"))},findAll:function(n){return w(this,v(n,h.CONTROLLER,"down"))},closest:function(n){return b(this,v(n,h.CONTROLLER,"up"))},on:function(){var n=o.call(arguments);return arguments.length<3?(kn("Invalid Arguments Exception @use .on(type,selector,fn)"),this):(null!=this.$&&Y.on(this,[n]),null==this.events?this.events=[n]:y(this.events)?this.events.push(n):this.events=[n,this.events],this)},remove:function(){return $(this),T(this),O(this),this.$=null,this},slotState:function(n,t){return en.slot.toggle(this,n,t),this},signalState:function(n,t){return en.signal.toggle(this,n,t),this},emitOut:function(n){return en.signal.emitOut(this,n,this,arguments.length>1?o.call(arguments,1):null),this},emitIn:function(n){return en.signal.emitIn(this,n,this,arguments.length>1?o.call(arguments,1):null),this}},en.prototype=rn}(),function(){var n,t;!function(){t=function(n,e,r,i,o){if(null==n)return!1;var l=!1,u=null!=n.slots&&n.slots[e];if("string"==typeof u&&(u=n[u]),"function"==typeof u){l=!0;var s=null!=n.slots.__disabled&&n.slots.__disabled[e];if(s!==!0){var a=null==i?u.call(n,r):u.apply(n,[r].concat(i));if(a===!1)return!0;null!=a&&"object"==typeof a&&null!=a.length&&(i=a)}}if(-1===o&&null!=n.parent)return t(n.parent,e,r,i,o)||l;if(1===o&&null!=n.components)for(var c,f=n.components,d=f.length,h=0;d>h;h++)c=t(f[h],e,r,i,o),!l&&(l=c);return l},n=function(t,e,r,i){if(null==t)return!1;var o=t.slots;if(null!=o&&null!=o[e]&&("string"==typeof o[e]&&(o[e]=t[o[e]]),"function"==typeof o[e])){if(i!==!0)return!0;if(null==o.__disabled||o.__disabled[e]!==!0)return!0}if(-1===r&&null!=t.parent)return n(t.parent,e,r);if(1===r&&null!=t.components)for(var l=0,u=t.components.length;u>l;l++)if(n(t.components[l],e,r))return!0;return!1}}();var e,i;!function(){function t(n,t,e){var r=n.slots;if(null!=r&&r.hasOwnProperty(t)!==!1){var i=r.__disabled;null==i&&(i=r.__disabled={}),i[t]=e===!1}}function r(n,e,i){t(n,e,i);var o=n.components;if(null!=o)for(var l=o.length,u=0;l>u;u++)r(o[u],e,i)}function o(n,t,e){return null==n.$?void wn("Controller has no elements to toggle state"):void f().add(n.$.filter("[data-signals]")).add(n.$.find("[data-signals]")).each(function(n,r){var i=r.getAttribute("data-signals");null!=i&&-1!==i.indexOf(t)&&r[e===!0?"removeAttribute":"setAttribute"]("disabled","disabled")})}e=function(n,e,i){for(var l=n,u=n;null!=(l=l.parent);)t(l,e,i),null!=l.$&&0!==l.$.length&&(u=l);r(n,e,i),o(u,e,i)},i=function(e,r,i){t(e,r,i),(i||!n(e,r,-1,!0)&&!n(e,r,1,!0))&&o(e,r,i)}}(),function(){function e(n,t){i(n,t||n)}function i(n,t){r.registerAttrHandler("x-"+n,"client",function(n,e,r,i,o,u){l(o,u,e,t)})}function l(n,t,e,r){for(var i,o,l,s,a,c,f,d,h=e.split(";"),p="",v=h.length,g=-1;++g<v;)i=h[g].trim(),""!==i&&(a=c=f=null,o=i.indexOf(":"),-1!==o&&(a=i.substring(0,o),l=a.indexOf("("),-1!==l&&(c=a.substring(l+1,a.lastIndexOf(")")),a=a.substring(0,l)),i=i.substring(o+1).trim()),f=i,d=u(t,f),null==r?s=a:(s=r,c=a),s||kn("Signal: Eventname is not set",h[g]),d?(p+=","+f+",",k(n,s,d,c,t)):wn("Slot not found:",f));if(""!==p){var m=n.getAttribute("data-signals");null!=m&&(p=m+p),n.setAttribute("data-signals",p)}}function u(e,r){return n(e,r,-1)===!1?null:function(n){var i=arguments.length>1?o.call(arguments,1):null;t(e,r,n,i,-1)}}i("signal"),e("change"),e("click"),e("tap","click"),e("keypress"),e("keydown"),e("keyup"),e("mousedown"),e("mouseup"),e("press","keydown"),e("shortcut","keydown")}(),S(en,{signal:{toggle:e,emitOut:function(n,e,r,i){t(n,e,r,i,-1)},emitIn:function(n,e,r,i){t(n,e,r,i,1)},enable:function(n,t){e(n,t,!0)},disable:function(n,t){e(n,t,!1)}},slot:{toggle:i,enable:function(n,t){i(n,t,!0)},disable:function(n,t){i(n,t,!1)},invoke:function(n,t,e,r){var i=n.slots;return null==i||"function"!=typeof i[t]?(kn("Slot not found",t,n),null):null==r?i[t].call(n,e):i[t].apply(n,[e].concat(r))}}})}();var on;return function(n){function t(n,t,e){if(null==n)return e||n;for(var r=n.length,i=-1;++i<r;)t.call(e||n,n[i],i);return e||n}function e(n,e,r,i){return t(e,function(t,o){n=r.call(i||e,n,e[o],o)}),n}function r(n,t,e){if(null==n)return-1;for(var r=n.length,i=-1;++i<r;)if(t.call(e||n,n[i],i)===!0)return i;return-1}if(null!=n){en.DomLite=on=function(n){return this instanceof on==!1?new on(n):this.add(n)},null==f&&(f=on);var o=on.fn={constructor:on,length:0,add:function(n){if(null==n)return this;if(y(n)===!0)return t(n,this.add,this);var e=n.nodeType;return 11===e?t(n.childNodes,this.add,this):null==e?"number"==typeof n.length?t(n,this.add,this):(wn("Uknown domlite object"),this):(this[this.length++]=n,this)},on:function(){return l.call(this,u,a,arguments)},off:function(){return l.call(this,s,c,arguments)},find:function(n){return t(this,function(t){this.add(h.call(t,n))},new on)},filter:function(n){return t(this,function(t,e){p(t,n)===!0&&this.add(t)},new on)},parent:function(){var n=this[0];return new on(n&&n.parentNode)},children:function(n){var e=t(this,function(n){this.add(n.childNodes)},new on);return null==n?e:e.filter(n)},closest:function(n){for(var t=this[0],e=new on;null!=t&&null!=t.parentNode;)if(t=t.parentNode,p(t,n))return e.add(t);return e},remove:function(){return t(this,function(n){n.parentNode.removeChild(n)})},text:function(n){return 0===arguments.length?e("",this,function(n,t){return n+t.textContent}):t(this,function(t){t.textContent=n})},html:function(n){return 0===arguments.length?e("",this,function(n,t){return n+t.innerHTML}):t(this,function(t){t.innerHTML=n})},val:function(n){return 0===arguments.length?0===this.length?null:this[0].value:(0!==this.length&&(this[0].value=n),this)}};!function(){function n(n,t,e){null!=n&&null!=e&&n.insertBefore(e,t)}function e(t,e,r){var i=null!=e?e.nextSibling:null;n(t,i,r)}var r={append:function(n,t){e(n,n.lastChild,t)},prepend:function(t,e){n(t,t.firstChild,e)},after:function(n,t){e(n.parentNode,n,t)},before:function(t,e){n(t.parentNode,t,e)}};t(["append","prepend","before","after"],function(n){var e=r[n];o[n]=function(n){var r=y(n);return t(this,function(i){return r?void t(n,function(n){e(i,n)}):void e(i,n)})}})}();var l,u,s,a,c,d=n.documentElement,h=d.querySelectorAll,p=function(){var n=d.webkitMatchesSelector||d.mozMatchesSelector||d.msMatchesSelector||d.oMatchesSelector||d.matchesSelector;return function(t,e){return null==t||1!==t.nodeType?!1:n.call(t,e)}}();!function(){function n(n,e,r,i){return t(n,function(n){e.call(n,r,i,!1)})}l=function(n,e,r){var i,o=r.length;return 2===o&&(i=n),3===o&&(i=e),null!=i?t(this,function(n){i.apply(on(n),r)}):(kn("`DomLite.on|off` - invalid arguments count"),this)},u=function(t,r){return n(this,e,t,r)},s=function(t,e){return n(this,r,t,e)},a=function(n,t,e){function r(n){var r=n.target,i=n.currentTarget;if(i!==r)for(;null!=r&&r!==i;){if(p(r,t))return void e(n);r=r.parentNode}}return(e._guards||(e._guards=[])).push(r),u.call(this,n,r)},c=function(n,e,r){return t(r._quards,function(t){s.call(this,n,t)},this)};var e=d.addEventListener,r=d.removeEventListener}(),function(){var n=null!=d.classList,e=n===!0?function(n,t){return n.classList.contains(t)}:function(n,t){return-1!==(" "+n.className+" ").indexOf(" "+t+" ")};o.hasClass=function(n){return-1!==r(this,function(t){return e(t,n)})};var i;!function(){function n(n,t){n.className+=" "+t}function t(n,t){n.className=(" "+n.className+" ").replace(" "+t+" "," ")}i={add:function(t,r){e(t,r)===!1&&n(t,r)},remove:function(n,r){e(n,r)===!0&&t(n,r)},toggle:function(r,i){var o=e(r,i)===!0?t:n;o(r,i)}}}(),t(["add","remove","toggle"],function(e){var r=n===!1?i[e]:function(n,t){var r=n.classList;r[e].call(r,t)};o[e+"Class"]=function(n){return t(this,function(t){r(t,n)})}})}(),function(){var e=function(t){var e=n.createEvent("Event");return e.initEvent(t,!0,!0),e},r=function(t,r){if(null==r)return e(t);var i=n.createEvent("CustomEvent");return i.initCustomEvent(t,!0,!0,r),i},i=function(n,t){n.dispatchEvent(t)};o.trigger=function(n,e){var o=r(n,e);return t(this,function(n){i(n,o)})}}(),function(){o.attr=function(n,e){return void 0===e?this[0]&&this[0].getAttribute(n):t(this,function(t){t.setAttribute(n,e)})},o.removeAttr=function(n){return t(this,function(t){t.removeAttribute(n)})}}(),Object.setPrototypeOf?Object.setPrototypeOf(o,Array.prototype):o.__proto__&&(o.__proto__=Array.prototype),on.prototype=o,i()}}(n.document),i(),r.registerHandler(":slot",s),s.prototype={constructor:s,renderEnd:function(n,t,e,r){this.slots={},this.expression=this.attr.on,this.slots[this.attr.signal]=this.handle},handle:function(){var t=this.expression;r.Utils.Expression.eval(t,this.model,n,this)}},en}(Mt),Dt=t.jmask=Mt.jmask=function(n){function t(n){return"string"!=typeof n?n:c(n)}function r(n){return this instanceof r==!1?new r(n):null==n?this:n.type===u.SET?n:this.add(n)}var i,l,u=n.Dom,s=n.render,a=n.parse,c=n.Utils.ensureTmplFn,f=(n.Compo||$t).signal.emitIn;!function(){i=function(n,t){if(b(n)===!1)return void t(n);for(var e=n.length,r=-1;++r<e;)t(n[r],r)},function(){function n(n,e){return n===e?(t=!0,0):1}l=function(e){if(t=!1,e.sort(n),t===!1)return e;for(var r=[],i=0,o=0,l=e.length-1;l>i;)e[i++]===e[i]&&(r[o++]=i);for(;o--;)e.splice(r[o],1);return e};var t=!1}()}();var y,w;!function(){function n(n){return function(e){return t(e,n)}}function t(n,e,r){if("string"!=typeof n)return!1;if(null==r&&(r=0),r=n.indexOf(e,r),-1===r)return!1;if(r>0&&n.charCodeAt(r-1)>32)return t(n,e,r+1);var i=n.length,o=e.length;return i-o>r&&n.charCodeAt(r+o)>32?t(n,e,r+1):!0}function e(n,t,e){for(var r,i=!1,o=!1;e>t&&(r=n.charCodeAt(t),(34===r||39===r)&&(i=!i),92===r&&(o=!o),!(46===r||35===r||91===r||93===r||62===r||33>r)||i===!0||o===!0);)t++;return t}y=function(t,a,c){if(null==t&&kn("selector is null for the type",a),"object"==typeof t)return t;var f,d,h,p,v,g,m,y,b,x,w,k=0,N=t.length;for(f="up"===c?i:a===u.SET?o:l;N>k;)if(v=t.charCodeAt(k),33>v)k++;else if(62!==v){if(g=e(t,k+1,N),46===v)d="class",h=s,p=n(t.substring(k+1,g));else if(35===v)d="id",h=s,p=t.substring(k+1,g);else if(91===v)x=t.indexOf("=",k),h=s,d=t.substring(k+1,x),v=t.charCodeAt(x+1),w=34===v||39===v?2:1,p=t.substring(x+w,g-w+1),g++;else{if(58===v&&58===t.charCodeAt(k+1)){k+=2;var C,_,E=k;do v=t.charCodeAt(k);while(v>=97&&122>=v&&++k<N);if(C=t.substring(E,k),40===v){E=++k;do v=t.charCodeAt(k);while(41!==v&&++k<N);_=t.substring(E,k),k++}var A=r(C,_);null==m&&(m={selector:"*",nextKey:f}),null==y&&(y=m),null==m.filters&&(m.filters=[]),m.filters.push(A);continue}null!=m&&(m.next={type:"any",matcher:null},b=m,m=null),h=null,d=a===u.SET?"tagName":"compoName",p=t.substring(k,g)}k=g,null!=m?(null==m.filters&&(m.filters=[]),m.filters.push({key:d,selector:p,prop:h})):(m={key:d,prop:h,selector:p,nextKey:f,filters:null},null==y&&(y=m),null!=b&&(b.next.matcher=m))}else null==m?y=m={selector:"__scope__",nextKey:f,filters:null,next:{type:"children",matcher:null}}:m.next={type:"children",matcher:null},b=m,m=null,k++;return b&&b.next&&(b.next.matcher=m),y},w=function(n,t,e){"string"==typeof t&&(null==e&&(e=u[n.compoName?"CONTROLLER":"SET"]),t=y(t,e));var r=t.prop?n[t.prop]:n,i=!1;if(null==r)return!1;if("*"===t.selector?i=!0:"function"==typeof t.selector?i=t.selector(r[t.key]):null!=t.selector.test?t.selector.test(r[t.key])&&(i=!0):r[t.key]===t.selector&&(i=!0),i===!0&&null!=t.filters)for(var o,l=0,s=t.filters.length;s>l;l++)if(o=t.filters[l],"function"!=typeof o){if(w(n,o,e)===!1)return!1}else if(i=o(n,e),i===!1)return!1;return i};var r,i="parent",o="nodes",l="components",s="attr";!function(){r=function(e,r){var i=n[e];if(void 0!==i)return i;var o=t[e];if(void 0!==o)return o(r);throw new Error("Uknown pseudo selector:"+e)};var n={text:function(n){return n.type===u.TEXTNODE},node:function(n){return n.type===u.NODE}},t={not:function(n){return function(t,e){return!w(t,n,e)}}}}()}();var k,N,C,_,E;!function(){k=function(n,t){if(null==t)return n;var e=[];return i(n,function(n,r){w(n,t)&&e.push(n)}),e},N=function(n,t,e,r){return null==n?e:(null==e&&(e=[]),null==r&&("__scope__"===t.selector?(r=!1,t=t.next.matcher):r=!0),i(n,function(n){if(w(n,t)===!1)return void(null==t.next&&r!==!1&&N(n[t.nextKey],t,e,r));if(null==t.next)return e.push(n),void(r===!0&&N(n[t.nextKey],t,e,r));var i=t.next;r="children"!==i.type,N(n[t.nextKey],i.matcher,e,r)}),e)},C=function(n,t){var e=I(n),r=n.attr;null!=r&&(e.attr=I(r));var i=n.nodes;if(null!=i)if(b(i)===!1)e.nodes=[C(i,e)];else{e.nodes=[];for(var o=i.length,l=0;o>l;l++)e.nodes[l]=C(i[l],e)}return e},_=function(n){for(var t,e=n;null!=e;)t=e,e=e.nodes&&e.nodes[0];return t},E=function(n,t,e,r){if(u.TEXTNODE===n.type)return m(n.content)?n.content("node",t,e,null,r):n.content;var i="";if(null!=n.nodes)for(var o,l=0,s=n.nodes.length;s>l;l++)o=n.nodes[l],i+=E(o,t,e,r);return i}}();var A=r.prototype={constructor:r,type:u.SET,length:0,components:null,add:function(n){var t,e;if("string"==typeof n&&(n=a(n)),b(n)){for(t=0,e=n.length;e>t;t++)this.add(n[t]);return this}"function"==typeof n&&null!=n.prototype.type&&(n={controller:n,type:u.COMPONENT});var r=n.type;if(!r)return console.error("Only Mask Node/Component/NodeText/Fragment can be added to jmask set",n),this;if(r===u.FRAGMENT){var i=n.nodes;for(t=0,e=i.length;e>t;)this[this.length++]=i[t++];return this}if(r===u.CONTROLLER){if(null!=n.nodes&&n.nodes.length)for(t=n.nodes.length;0!==t;)n.nodes[--t].parent=n;null!=n.$&&(this.type=u.CONTROLLER)}return this[this.length++]=n,this},toArray:function(){return o.call(this)},render:function(n,t,r,i){if(this.components=[],1===this.length)return s(this[0],n,t,r,i||this);null==r&&(r=e.createDocumentFragment());for(var o=0,l=this.length;l>o;o++)s(this[o],n,t,r,i||this);return r},prevObject:null,end:function(){return this.prevObject||this},pushStack:function(n){var t;return t=r(n),t.prevObject=this,t},controllers:function(){return null==this.components&&console.warn("Set was not rendered"),this.pushStack(this.components||[])},mask:function(t){return 0!==arguments.length?this.empty().append(t):n.stringify(this)},text:function(n,t,e){if("string"==typeof n&&1===arguments.length){for(var r=[new u.TextNode(n)],i=0,o=this.length;o>i;i++)this[i].nodes=r;return this}for(var l="",i=0,o=this.length;o>i;i++)l+=E(this[i],n,t,e);return l}};return F(["append","prepend"],function(n){A[n]=function(t){for(var e,i,o=r(t),l=0,u=this.length;u>l;l++){i=this[l],e=o.toArray();for(var s=0,a=e.length;a>s;s++)e[s].parent=i;i.nodes=null!=i.nodes?"append"===n?i.nodes.concat(e):e.concat(i.nodes):e}return this}}),F(["appendTo"],function(n){A[n]=function(n,t,e,i){return null==i&&(i=this),null!=n.nodeType&&"function"==typeof n.appendChild?(n.appendChild(this.render(t,e,null,i)),f(i,"domInsert"),this):(r(n).append(this),this)}}),function(){function n(n,t,e){n[t]=e}function e(n){var t={};return n.split(";").forEach(function(n){if(""!==n){var e=n.indexOf(":"),r=n.substring(0,e).trim(),i=n.substring(e+1).trim();t[r]=i}}),t}function r(n){var t,e="";for(t in n)e+=t+":"+n[t]+";";return e}function i(n,t){return n+":"+t+";"}A.removeAttr=A.removeProp=function(n){return d(this,function(t){t.attr[n]=null})},A.attr=A.prop=function(n,e){function r(n,e,r){n.attr[e]=t(r)}function i(n,t){for(var e in t)r(n,e,t[e])}if(1===arguments.length&&x(n))return 0!==this.length?this[0].attr[n]:null;var o=x(n)?r:i;return d(this,function(t){o(t,n,e)})},A.tag=function(n){return 0===arguments.length?this[0]&&this[0].tagName:d(this,function(t){t.tagName=n})},A.css=function(t,o){if(arguments.length<=1&&"string"==typeof t){if(null==this.length)return null;var l=this[0].attr.style;if(null==l)return null;var u=e(l);return null==t?u:u[t]}if(null==t)return this;var s="object"==typeof t?r:i,a="object"==typeof t?S:n;return d(this,function(n){var i=n.attr.style;if(null==i)return void(n.attr.style=s(t,o));var l=e(i);a(l,t,o),n.attr.style=r(l)})}}(),function(){function n(n){var t=n.attr["class"];return"string"==typeof t?t:""}function t(t,e){return-1!==(" "+n(t)+" ").indexOf(" "+e+" ")}function e(t,e){t.attr["class"]=(n(t)+" "+e).trim()}function r(t,e){t.attr["class"]=(" "+n(t)+" ").replace(" "+e+" ","").trim()}A.hasClass=function(n){return g(this,function(e){return t(e,n)})};var i={add:function(n,r){t(n,r)===!1&&e(n,r)},remove:function(n,e){t(n,e)===!0&&r(n,e)},toggle:function(n,i){var o=t(n,i)===!0?r:e;o(n,i)}};F(["add","remove","toggle"],function(n){var t=i[n];A[n+"Class"]=function(n){return d(this,function(e){t(e,n)})}})}(),S(A,{clone:function(){return r(p(this,C))},wrap:function(n){var t=r(n);if(0===t.length)return wn("Not valid wrapper",n),this;var e=p(this,function(n){var e=t.clone()[0];if(_(e).nodes=[n],null!=n.parent){var r=v(n.parent.nodes,n);-1!==r&&n.parent.nodes.splice(r,1,e)}return e});return r(e)},wrapAll:function(n){var t=r(n);return 0===t.length?(kn("Not valid wrapper",n),this):(this.parent().mask(t),_(t[0]).nodes=this.toArray(),this.pushStack(t))}}),F(["empty","remove"],function(n){A[n]=function(){return d(this,t[n])};var t={remove:function(n){null!=n.parent&&h(n.parent.nodes,n)},empty:function(n){n.nodes=null}}}),S(A,{each:function(n,t){for(var e=0;e<this.length;e++)n.call(t||this,this[e],e);return this},eq:function(n){return-1===n?this.slice(n):this.slice(n,n+1)},get:function(n){return 0>n?this[this.length-n]:this[n]},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments))}}),F(["filter","children","closest","parent","find","first","last"],function(n){A[n]=function(t){var e,i,o=[],s=null==t?null:y(t,this.type,"closest"===n?"up":"down");switch(n){case"filter":return r(k(this,s));case"children":for(e=0;e<this.length;e++)i=this[e],null!=i.nodes&&(o=o.concat(null==s?i.nodes:k(i.nodes,s)));break;case"parent":for(e=0;e<this.length;e++)i=this[e].parent,!i||i.type===u.FRAGMENT||s&&w(i,s)||o.push(i);l(o);break;case"closest":case"find":if(null==s)break;for(e=0;e<this.length;e++)N(this[e][s.nextKey],s,o);break;case"first":case"last":var a;for(e=0;e<this.length;e++)if(a="first"===n?e:this.length-e-1,i=this[a],null==s||w(i,s)){o[0]=i;break}}return this.pushStack(o)}}),r.prototype.fn=r.prototype,r}(Mt);return function(t,r){function i(n){return n.parentNode.removeChild(n)}function l(n){if(null!=n)for(var t=n.length,e=-1;++e<t;)i(n[e])}function u(n,t){return t.parentNode.insertBefore(n,t.nextSibling)}function s(n,t){return t.parentNode.insertBefore(n,t)}function a(){}function c(){}function f(n,t){if(null==t&&(t=[]),null==n.components)return t;for(var e,r=n.components,i=0,o=r.length;o>i;i++)e=r[i],"validate"!==e.compoName?f(e):t.push(e);return t}var d,h,p,v,g,b,k,N,C="undefined"!=typeof r?r:t.Compo||n.Compo,_=C.Dom.addEventListener,O=t.registerHandler,T=t.registerAttrHandler,j=t.registerUtil,M=C.config.getDOMLibrary();!function(){function n(n,t){for(var e,r=-1,i=t.length-1;++r<i;)e=t[r],null==n[e]&&(n[e]={}),n=n[e];return n}function t(n){return null==n||"object"!=typeof n?null:"number"==typeof n.length&&"function"==typeof n.slice?_.Array:"function"==typeof n.toUTCString?_.Date:null}function e(e,i,o,u){var s=u.length,a=s>1?n(e,u):e,f=u[s-1],d=a[f];if(s>1&&r(e,u),"length"===f){var h=t(a);if(null!=h)return c(a,h,function(){for(var n=o.length,t=-1;++t<n;)o[t].apply(null,arguments)}),d}return C(a,f,{get:function(){return d},set:function(n){if(n!==d){var r=d;d=n;var u=0,s=o.length,a=t(n);if(null!=a)for(;s>u;u++)c(n,a,o[u]);if(null!=e[m][w])return void(e[m][w][i]=1);for(u=0;s>u;u++)o[u](n);l(e,i,r)}},configurable:!0,enumerable:!0}),d}function r(n,t){for(var e,r=u(n),o="",l=t.length-1,s=0;l>s;s++)e=t[s],o+=e+".",i(o,n,e,r),n=n[e]}function i(n,t,e,r){var i,o=t[e];C(t,e,{get:function(){return o},set:function(t){t!==o&&(i=o,o=t,r(n,i))},configurable:!0,enumerable:!0})}function l(n,t,e){var r=n[m];if(null!=r)for(var i in r)if(0===i.indexOf(t+".")){var o,l,u=r[i].slice(0),s=u.length,a=0;if(0!==s){var c=E(n,i);for(a=0;s>a;a++)l=u[a],p(n,i,l),null!=e&&"object"==typeof e&&(o=i.substring(t.length+1),p(e,o,l));for(a=0;s>a;a++)u[a](c);for(a=0;s>a;a++)d(n,i,u[a])}}}function u(n){return function(t,e){s(n,t,e)}}function s(n,t,e){var r=n[m];if(null!=r)for(var i in r)if(0===i.indexOf(t)){var o=r[i].slice(0),l=o.length,u=0;if(0!==l){var s,a,c=E(n,i);for(u=0;l>u;u++)s=o[u],p(n,i,s),null!=e&&"object"==typeof e&&(a=i.substring(t.length),p(e,a,s));for(u=0;l>u;u++)o[u](c);for(u=0;l>u;u++)d(n,i,o[u])}}}function a(n,t,e){var r=b(n,t);return P(r,e)===!1&&r.push(e),r}d=function(n,r,i){for(var o=r.split("."),l=o.length,u=-1,s=n;++u<l&&(s=s[o[u]],null!=s);)if(null!=s[m]){var f=o.slice(u+1).join(".");if(null!=s[m][f]){a(s,f,i);var d=a(n,r,i);if(1===d.length){var h=o.splice(0,u);0!==h.length&&e(n,r,d,h,!0)}return}}var d=a(n,r,i);1===d.length&&e(n,r,d,o,!0);var p=E(n,r),v=t(p);null!=v&&c(p,v,i)},h=function(n,t,e){for(var r=t.split("."),i=r.length,o=-1,l=n;++o<i&&(l=l[r[o]],null!=l);)if(null!=l[m]){if(h(l,r.slice(o).join("."),e))return!0;break}var u=n[m];return null==u||null==u[t]?!1:P(u[t],e)},p=function(n,e,r){for(var i=e.split("."),o=i.length,l=-1,u=n;++l<o&&(u=u[i[l]],null!=u);)if(null!=u[m]){p(u,i.slice(l).join("."),r);break}var s=b(n,e),a=E(n,e);void 0===r?s.length=0:U(s,r);var c=t(a);null!=c&&f(a,c,r)},v=function(n){var t=n[m];null!=t&&(t[w]={})},g=function(n){var t=n[m],e=null==t?null:t[w];if(null!=e){t[w]=null;var r,i,o,l,u;for(r in e)if(i=n[m][r],l=null==i?0:i.length,0!==l)for(u=-1,o=r===y?n:E(n,r);++u<l;)i[u](o)}},b=function(n,t){var e=n[m];if(null==e&&(e={__dirty:null,__dfrTimeout:null,__mutators:null},C(n,"__observers",{value:e,enumerable:!1})),null==t)return e;var r=e[t];return null==r?e[t]=[]:r},k=function(n,e){var r=t(n);null!=r&&c(n,r,e)},N=function(n,t){f(n,null,t)};var c,f,m="__observers",y="__mutators",x="__dfrTimeout",w="__dirty",C=Object.defineProperty,_={Array:{throttle:!1,methods:["push","unshift","splice","pop","shift","reverse","sort","remove"]},Date:{throttle:!0,methods:["setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds"]}};!function(){function n(n,r,i,l){var u=l===!0?e:t;return function(){return u(n,r,i,o.call(arguments))}}function t(n,t,e,i){var o=b(n,y),l=t.apply(n,i);return r(n,o,e,i,l),l}function e(n,t,e,i){var o=b(n,y),l=t.apply(n,i),u=n[m];return null!=u[x]?l:(u[x]=setTimeout(function(){u[x]=null,r(n,o,e,i,l)}),l)}function r(n,t,e,r,i){if(0!==t.length){var o=n[m];if(null!=o[w])return void(o[w][y]=1);for(var l,u=t.length,s=-1;++s<u;)l=t[s],"function"==typeof l&&l(n,e,r,i)}}c=function(t,e,r){var i=e.methods,o=e.throttle,l=b(t,y);if(0===l.length)for(var u,s,a=i.length,c=-1;++c<a;)u=i[c],s=t[u],null!=s&&(t[u]=n(t,s,u,o));l[l.length++]=r},f=function(n,t,e){var r=b(n,y);return void 0===e?void(r.length=0):void U(r,e)}}()}();var $;!function(){$=function(t){if(null==t||""===t)return null;var e=t,r=typeof t;return"string"===r&&(e=new Date(t),n.test(e)&&-1===t.indexOf("Z")&&t.setMinutes(t.getTimezoneOffset())),"number"===r&&(e=new Date(t)),isNaN(e)===!1&&"function"==typeof e.getFullYear?e:null};var n=/^\d{4}\-\d{2}/}();var D,I,R,L,H,B,G;!function(){D=function(n,t,e,r){if(null==n.components)return u(e,r||n.placeholder);var i,o=n.components,l=null,a=!0,c=o.length,f=t-1;if(null==l)for(;++f<c;)if(i=o[f].elements,i&&i.length){l=i[0];break}if(null==l)for(a=!1,f=c>t?t:c;--f>-1;)if(i=o[f].elements,i&&i.length){l=i[i.length-1];break}return null==l&&(l=r||n.placeholder),a?s(e,l):u(e,l)},I=function(n,e,r,i,o){return t.render(e,r,i,o,n)},R=function(n,t){if(null==n)return!1;null!=n.elements&&(l(n.elements),n.elements=null),C.dispose(n);var e=t&&t.components||n.parent&&n.parent.components;return null==e?(kn("Parent Components Collection is undefined"),!1):U(e,n)},L=function(n){C.signal.emitIn(n,"domInsert")},H=function(n,t){if("function"==typeof n.dispose){var e=n.dispose;return void(n.dispose=function(){t.call(this),e.call(this)})}n.dispose=t},B=function(n,t){for(var e=[],r=n.components||[],i=r.length,o=-1;++o<i;)r[o].compoName===t&&e.push(r[o]);return e},G=function(n,t){var e=t,r=t.indexOf(".");for(-1!==r&&(e=t.substring(0,r));null!=n;){if(null!=n.scope&&n.scope.hasOwnProperty(e))return n.scope;n=n.parent}return null}}();var z,V,K,Y,q,J,Q,Z;!function(){function n(n,t,o,l,u){if(null!=l){if("object"==typeof l){var s=V(l.accessor,t,null,o);return null==s||"object"!=typeof s?void console.error("Binding failed to an object over accessor",l.ref):void n(s,l.ref,u)}var a=l,c=a.split("."),f=c.length;if(f>1){var d=c[0];if("$c"===d||"$"===d){if("attr"===c[1])return;var h=e(o,c.slice(1),f-1),p=d.length+1;return void n(h,a.substring(p),u)}if("$scope"===d){var v=r(o,c[1]),p=7;return void n(v,a.substring(p),u)}if("$a"===d||"$ctx"===d||"_"===d||"$u"===d)return}var s=null;i(t,c,f)&&(s=t),null==s&&(s=r(o,c[0],f)),null==s&&(s=t),n(s,a,u)}}function e(n,t,e){for(var r=n;null!=r;){if(i(r,t,e))return r;r=r.parent}return r}function r(n,t,e){for(var r,i=n;null!=i;){if(r=i.scope,null!=r&&null!=r[t])return r;i=i.parent}return null}function i(n,t,e){if(null==n)return!1;for(var r=0;e>r;r++)if(n=n[t[r]],null==n)return!1;return!0}var l=t.Utils.Expression;V=l.eval,Q=l.parse,Z=l.varRefs,z=function(n,t,e,r){if("."===n)return t;var i=V(n,t,e,r);return null==i?"":i},K=function(t,e,r,i,o){if("."===t)return void k(e,o);var l=Q(t),u=Z(l,e,r,i);if(null!=u){if("string"==typeof u)return void n(d,e,i,u,o);for(var s,a=null!=u.length&&"function"==typeof u.splice,c=a===!0?u.length:1,f=0;c>f;f++)s=a===!0?u[f]:u,n(d,e,i,s,o)}},Y=function(t,e,r,i){if("function"==typeof r&&wn("[mask.binding] - expression unbind(expr, model, controller, callback)"),"."===t)return void N(e,i);var o,l=Z(t,e,null,r);if(null!=l){if("string"==typeof l)return void n(p,e,r,l,i);for(var o,u=null!=l.length&&"function"==typeof l.splice,s=u===!0?l.length:1,a=0;s>a;a++)o=u===!0?l[a]:l,n(p,e,r,o,i)}},q=function(n,t,e,r,i){var l=0;return function(){if(++l>1)return l=0,void wn("<mask:bind:expression> Concurent binder detected",n);var u=z(n,t,e,r);if(arguments.length>1){var s=o.call(arguments);s[0]=u,i.apply(this,s)}else i(u);l--}},J=function(n){var t=0;return function(){return++t>1?(t=0,void wn("<listener:expression> concurent binder")):(n(),void t--)}}}();var nn,tn;!function(){nn=function(n,t,e){for(var r,i,o,l,u=n.split(";"),s=[],a=0,c=u.length;c>a;a++)r=u[a].split(":"),1===r.length||2===r.length?(o=2===r.length?r[0]:e,i=r[2===r.length?1:0],l=tn(i.trim(),o,t),null!=l&&s.push(l)):kn('Too much ":" in a signal def.',u[a]);return s},tn=function(n,t,e){if(e!==!0)return{signal:n,type:t};var r=n.indexOf(".");return-1===r?(kn("No pipe name in a signal",n),null):{signal:n.substring(r+1),pipe:n.substring(0,r),type:t}}}();var en;!function(){function n(n,t,e){return null==n||"function"!=typeof n[t]?(kn("BindingProvider. Controllers accessor.",e,"should be a function. Property:",t),!1):!0}function t(n,t){var e=n.ctr.parent;if(null!=e[t])return e;var r=n.model;return null!=r[t]?r:(kn("BindingProvider. Accessor `",t,"`should be a function"),null)}function e(n){var t=n.getFullYear(),e=n.getMonth()+1,r=n.getDate();return t+"-"+(10>e?"0":"")+e+"-"+(10>r?"0":"")+r}function r(n){var t=n.getHours(),e=n.getMinutes();return t+":"+(10>e?"0":"")+e}var i={get:function(n,e){var r=n.objGetter;if(null==r)return z(e,n.model,n.ctx,n.ctr);var i=t(n,r);return null==i?null:i[r](e,n.model,n.ctr.parent)},set:function(n,e,r,i){var o=i.objSetter;if(null==o)return void A(n,e,r);var l=t(i,o);null!=l&&l[o](e,r,i.model,i.ctr.parent)}},o={get:function(t){var e=t.domGetter;if(null==e)return E(t,t.property);var r=t.ctr.parent;return n(r,e,"Getter")===!1?null:r[e](t.element)},set:function(t,e){var r=t.domSetter;if(null==r)return void A(t,t.property,e);var i=t.ctr.parent;n(i,r,"Setter")!==!1&&i[r](e,t.element)}},l={domSet:function(n){return function(t,e){var r=$(e);t.element.value=null==r?"":n(r)}},objSet:function(n){return function(t,e,r){var i=$(r);if(null!=i){var o=$(E(t,e));return null==o?void A(t,e,i):void n(o,i)}}}};en={objectWay:i,domWay:o,
SELECT:{get:function(n){var t=n.element,e=t.selectedIndex;if(-1===e)return"";var r=t.options[e],i=r.getAttribute("value");return null==i?r.getAttribute("name"):i},set:function(n,t){var e,r,i,o=n.element,l=o.options,u=l.length;for(i=0;u>i;i++)if(e=l[i],r=e.getAttribute("value"),null==r&&(r=e.getAttribute("name")),r==t)return void(o.selectedIndex=i);wn("Value is not an option",t)}},DATE:{domWay:{get:o.get,set:function(n,t){var r=$(t);n.element.value=null==r?"":e(r)}},objectWay:{get:i.get,set:l.objSet(function(n,t){n.setFullYear(t.getFullYear()),n.setMonth(t.getMonth()),n.setDate(t.getDate())})}},TIME:{domWay:{get:o.get,set:l.domSet(r)},objectWay:{get:i.get,set:l.objSet(function(n,t){n.setHours(t.getHours()),n.setMinutes(t.getMinutes()),n.setSeconds(t.getSeconds())})}},RADIO:{domWay:{get:function(n){var t=n.element;return t.checked?t.value:null},set:function(n,t){var e=n.element;e.checked=e.value===t}}}}}();var rn,on;!function(){function n(n,t,e){if(null==n)return null;for(var r,i,o=n.length,l=-1;++l<o;)if(i=n[l],null!=i&&(r=i(t,e),null!=r))return x(r)?{message:r,actual:t}:(null==r.actual&&(r.actual=t),r)}function t(n,e){if(w(n)===!1)return null;var r=n.Validate;if(null!=r){var i=null;if(m(i=r))return i;if(m(i=r[e]))return i}var o=e.indexOf(".");return-1!==o?t(n[e.substring(0,o)],e.substring(o+1)):null}function e(n,e){var r=t(n,e);return null==r?null:function(){var t=r.apply(n,arguments);return null==t?null:x(t)?{message:t,property:e,ctx:n}:(t.property=e,t.ctx=n,t)}}function r(n,t,e){var r=on[n];if(null==r)return kn("Invalid validator",n,"Supports:",Object.keys(on)),null;var i=r(t);return function(t,r){var o=i(t,r);return null==o||o===!0?null:o===!1?e||"Check failed: `"+n+"`":x(o)&&0!==o.length?o:null}}function i(n,t,e){var r=t.message||t,i=M(n).next("."+l);return 0===i.length&&(i=M("<div>").addClass(l).html("<span></span><button>&otimes;</button>").insertAfter(n)),i.children("button").off().on("click",function(){i.hide(),e&&e()}).end().children("span").text(r).end().show()}function o(n){return M(n).next("."+l).hide()}var l="-validate__invalid";rn={getFnFromModel:e,getFnByName:r,validate:n,validateUi:function(t,e,r,l,u){var s=n(t,e,r);return null!=s?(i(l,s,u),s):(o(l),null)}},on={match:function(n){return function(t){return new RegExp(n).test(t)}},unmatch:function(n){return function(t){return!new RegExp(n).test(t)}},minLength:function(n){return function(t){return t.length>=parseInt(n,10)}},maxLength:function(n){return function(t){return t.length<=parseInt(n,10)}},check:function(n,t){return function(e){return z("x"+n,t.model,{x:e},t)}}}}();var ln,un;!function(){function n(n){var t=n.expression,e=n.model,r=n.objectChanged=n.objectChanged.bind(n);if(n.binder=q(t,e,n.ctx,n.ctr,r),K(t,e,n.ctx,n.ctr,n.binder),"dual"===n.bindingType){var i=n.ctr.attr;if(!i["change-slot"]&&!i["change-pipe-event"]){var o=n.element,l=i["change-event"]||i.changeEvent||"change",u=n.domChanged.bind(n);_(o,l,u)}if(!n.objectWay.get(n,n.expression))return setTimeout(function(){n.domWay.get(n)&&n.domChanged()}),n}return n.objectChanged(),n}function t(n,e,r){if(null!=n){var i=n.slots;(null==i||"function"!=typeof i[e]||i[e].apply(n,r)!==!1)&&t(n.parent,e,r)}}ln={},un=X({validations:null,constructor:function(n,t,e,r){if(null==r){r="dual";var i=e.compoName;(":bind"===i||"bind"===i)&&(r="single")}var o,l=e.attr;if(this.node=e,this.ctr=e,this.ctx=null,this.model=n,this.element=t,this.value=l.value,this.property=l.property,this.domSetter=l.setter||l["dom-setter"],this.domGetter=l.getter||l["dom-getter"],this.objSetter=l["obj-setter"],this.objGetter=l["obj-getter"],this["typeof"]=l["typeof"]||null,this.dismiss=0,this.bindingType=r,this.log=!1,this.signal_domChanged=null,this.signal_objectChanged=null,this.locked=!1,null==this.property&&null==this.domGetter)switch(t.tagName){case"INPUT":if(o=t.getAttribute("type"),"checkbox"===o){this.property="element.checked";break}if("date"===o){var u=en.DATE;this.domWay=u.domWay,this.objectWay=u.objectWay}else if("number"===o)this["typeof"]="Number";else if("radio"===o){var u=en.RADIO;this.domWay=u.domWay;break}this.property="element.value";break;case"TEXTAREA":this.property="element.value";break;case"SELECT":this.domWay=en.SELECT;break;default:this.property="element.innerHTML"}if(l.log&&(this.log=!0,"log"!==l.log&&(this.logExpression=l.log)),l["x-signal"]){var s=nn(l["x-signal"],null,"dom")[0],a=s&&s.type;switch(a){case"dom":case"object":this["signal_"+a+"Changed"]=s.signal;break;default:kn("Signal typs is not supported",s)}}if(l["x-pipe-signal"]){var s=nn(l["x-pipe-signal"],!0,"dom")[0],a=s&&s.type;switch(a){case"dom":case"object":this["pipe_"+a+"Changed"]=s;break;default:kn("Pipe type is not supported")}}if(l["dom-slot"]){this.slots={};var c=e.parent,f=c.parent;c.parent=this,this.parent=f,this.slots[l["dom-slot"]]=function(n,t){this.domChanged(n,t)}}var d=l["object-pipe-slot"]||l["x-pipe-slot"];if(d){var h=d,p=h.indexOf("."),v=h.substring(0,p),s=h.substring(p+1);this.pipes={},this.pipes[v]={},this.pipes[v][s]=function(){this.objectChanged()},C.pipe.addController(this)}if(l.expression){if(this.expression=l.expression,null==this.value&&"single"!==r){var g=Z(this.expression);"string"==typeof g?this.value=g:wn("Please set value attribute in DualBind Control.")}}else this.expression=this.value},dispose:function(){Y(this.expression,this.model,this.ctr,this.binder)},objectChanged:function(n){if(!(this.dismiss-->0)){if(this.locked===!0)return void wn("Concurance change detected",this);if(this.locked=!0,null==n&&(n=this.objectWay.get(this,this.expression)),this.domWay.set(this,n),this.log&&console.log("[BindingProvider] objectChanged -",n),this.signal_objectChanged&&t(this.ctr,this.signal_objectChanged,[n]),this.pipe_objectChanged){var e=this.pipe_objectChanged;C.pipe(e.pipe).emit(e.signal)}this.locked=!1}},domChanged:function(n,e){if(this.locked===!0)return void wn("Concurance change detected",this);this.locked=!0,null==e&&(e=this.domWay.get(this));var r=this["typeof"];if(null!=r){var i=window[r];e=i(e)}var o=this.validate(e);if(null==o){this.dismiss=1;var l=this.model,u=this.value;if(36===u.charCodeAt(0)){var s=u.indexOf(".");if(-1!==s){var a=u.substring(0,s);"$scope"===a&&(u=u.substring(s+1),l=G(this.ctr.parent,u))}}if(this.objectWay.set(l,u,e,this),this.dismiss=0,this.log&&console.log("[BindingProvider] domChanged -",e),null!=this.signal_domChanged&&t(this.ctr,this.signal_domChanged,[e]),null!=this.pipe_domChanged){var c=this.pipe_domChanged;C.pipe(c.pipe).emit(c.signal)}}this.locked=!1},addValidation:function(n){return null==this.validations&&(this.validations=[]),y(n)?void(this.validations=this.validations.concat(n)):void this.validations.push(n)},validate:function(n){var t=this.validations,e=this.ctr,r=this.element,i=0!==arguments.length?n:this.objectWay.get(this,this.expression);return rn.validateUi(t,i,e,r,this.objectChanged.bind(this))},objectWay:en.objectWay,domWay:en.domWay}),S(un,{create:function(n,t,e,r){var i,o=e.attr.bindingProvider,l=null==o?null:ln[o];return"function"==typeof l?new l(n,t,e,r):(i=new un(n,t,e,r),null!=l&&S(i,l),i)},bind:function(t){return n(t)}}),S(un,{addObserver:d,removeObserver:p})}(),O(":visible",a),a.prototype={constructor:a,refresh:function(n,t){t.style.display=z(this.attr.check,n)?"":"none"},renderStart:function(n,t,e){this.refresh(n,e),this.attr.bind&&d(n,this.attr.bind,this.refresh.bind(this,n,e))}};var sn;!function(){var n="-validate-invalid";sn=X({attr:null,element:null,validators:null,constructor:function(){this.validators=[]},renderStart:function(n,t,e){this.element=e;var r=this.attr.value;if(r){var i=rn.getFnFromModel(n,r);null!=i&&this.validators.push(i)}},validate:function(n,t,e){var r=null==t?this.element:t,i=n;0===arguments.length&&(i=E(this.model,this.attr.value)),0===this.validators.length&&this.initValidators();var o=this.validators,l=this.attr.silent?"validate":"validateUi";return rn[l](o,i,this,r,e)},initValidators:function(){var n=this.attr,t=this.attr.message,e=null==t;e&&(t="Invalid value of `"+this.attr.value+"`");for(var r in n){switch(r){case"message":case"value":case"getter":case"silent":continue}if(r in on!=!1){var i=e?t+" Validation: `"+r+"`":t,o=rn.getFnByName(r,n[r],i);null!=o&&this.validators.push(o)}else kn("Unknown Validator:",r,this)}}}),O(":validate",sn),O(":validate:message",r({template:"div."+n+' { span > "~[bind:message]" button > "~[cancel]" }',onRenderStart:function(n){"string"==typeof n&&(n={message:n}),n.cancel||(n.cancel="cancel"),this.model=n},compos:{button:"$: button"},show:function(n,t){var e=this;this.model.message=n,this.compos.button.off().on(function(){e.hide(),t&&t()}),this.$.show()},hide:function(){this.$.hide()}}))}(),O(":validate:group",c),c.prototype={constructor:c,validate:function(){for(var n,t=f(this),e=0,r=t.length;r>e;e++)if(n=t[e],!n.validate())return!1;return!0}},function(){function n(){}O(":bind",n),O("bind",n),n.prototype={constructor:n,renderEnd:function(n,t,e,r){this.provider=un.create(t,r,this,"single"),un.bind(this.provider)},dispose:function(){this.provider&&"function"==typeof this.provider.dispose&&this.provider.dispose()}}}();var an=X({renderEnd:function(n,t,e,r){this.provider=un.create(t,r,this);var i=this.components;if(null!=i)for(var o,l=i.length,u=-1;++u<l;)o=i[u],":validate"===o.compoName&&this.provider.addValidation(o.validations);if(null==this.attr["no-validation"]){var s=rn.getFnFromModel(t,this.provider.value);null!=s&&this.provider.addValidation(s)}un.bind(this.provider)},dispose:function(){var n=this.provider&&this.provider.dispose;null!=n&&n.call(this.provider)},validate:function(){return this.provider&&this.provider.validate()},handlers:{attr:{"x-signal":function(){}}}});O(":dualbind",an),O("dualbind",an),function(){function n(n,t,e){return n?null==t||""===t?n+" "+e:n.replace(t,e):e}function t(n){return function(t){n.textContent=t}}function r(t,e,r){return function(i){var o=t.getAttribute(e),l=n(o,r,i);t.setAttribute(e,l),r=i}}function i(t,e,r){return function(i){switch(typeof t[e]){case"boolean":return void(r=t[e]=!!i);case"number":return void(r=t[e]=Number(i));case"string":return void(r=t[e]=n(t[e],r,i));default:return void wn("Unsupported elements property type",e)}}}function o(n,e,o,l,u){if("node"===n)return t(o);if("attr"===n){switch(u){case"value":case"disabled":case"checked":case"selected":case"selectedIndex":return i(o,u,l)}return r(o,u,l)}throw Error("Unexpected binder type: "+n)}function l(n,t,e,r,i,l,u,s){var a=o(s,t,i,n,u),c=q(t,e,r,l,a);K(t,e,r,l,c),H(l,function(){Y(t,e,l,c)})}j("bind",{mode:"partial",current:null,element:null,nodeRenderStart:function(n,t,r,i,o){var l=z(n,t,r,o);return this.element=e.createTextNode(l),this.current=l},node:function(n,t,e,r,i){return l(this.current,n,t,e,this.element,i,null,"node"),this.element},attrRenderStart:function(n,t,e,r,i){return this.current=z(n,t,e,i)},attr:function(n,t,e,r,i,o){return l(this.current,n,t,e,r,i,o,"attr"),this.current}})}(),T("xx-visible",function(n,t,e,r,i,o){var l=q(t,e,r,o,function(n){i.style.display=n?"":"none"});K(t,e,r,o,l),H(o,function(){Y(t,e,o,l)}),z(t,e,r,o)||(i.style.display="none")}),T("x-toggle","client",function(n,t,e,r,i,o){var l=t.substring(0,t.indexOf(":")),u=t.substring(l.length+1),s=Z(u);"string"!=typeof s&&(s=s[0]),_(i,l,function(){var n=z(u,e,r,o);A(e,s,n)})}),T("x-class-toggle","client",function(n,t,e,r,i){var o=t.substring(0,t.indexOf(":")),l=t.substring(o.length+1).trim();_(i,o,function(){M(i).toggleClass(l)})}),function(){var n,i,u,a,c,f=t.getStatement();!function(){n=function(n,t,e,r,i){return f[n].getNodes(t,e,r,i)},i=function(n,t,e,r,i){if(null==n)return null;var o=[];return Tt(n,t,e,r,i,o),o},u=function(n,t,r){var i=n.placeholder;null==i&&(i=e.createComment(""),r.appendChild(i)),t.placeholder=i},a=function(n,t,e,r,i,o){n.parent=o,n.model=e,n.refresh=W(n.refresh,n),n.binder=q(n.expr||n.expression,e,r,o,n.refresh),K(n.expr||n.expression,e,r,o,n.binder)},c=function(n,t){if(null!=n)for(var e,r="function"==typeof n.splice,i=r?n.length:1,o=-1;++o<i;)e=r?n[o]:n,e.style.display=t?"":"none"}}(),function(){function e(){}function r(n,t,e,r,i,o,l,u){for(n.model=i,n.ctx=o,n.controller=u,n.refresh=W(n.refresh,n),n.binder=J(n.refresh),n.index=e,n.Switch=[{node:t,elements:null}],K(t.expression,i,o,u,n.binder);;){if(t=t.nextSibling,null==t||"else"!==t.tagName)break;n.Switch.push({node:t,elements:null}),t.expression&&K(t.expression,i,o,u,n.binder)}return null!=e&&(n.Switch[e].elements=r),n}O("+if",{placeholder:null,meta:{serializeNodes:!0},render:function(t,e,r,o,l){for(var u=this,s=n("if",u,t,e,o),a=0,c=u;;){if(c.nodes===s)break;if(a++,c=u.nextSibling,null==c||"else"!==c.tagName){a=null;break}}return this.attr["switch-index"]=a,i(s,t,e,r,o,l)},renderEnd:function(n,t,i,o,l){var s=new e,a=this.attr["switch-index"];return u(this,s,o),r(s,this,a,n,t,i,o,l)},serializeNodes:function(n){for(var e=[n];;){if(n=n.nextSibling,null==n||"else"!==n.tagName)break;e.push(n)}return t.stringify(e)}}),e.prototype={compoName:"+if",ctx:null,model:null,controller:null,index:null,Switch:null,binder:null,refresh:function(){for(var n,e=this,r=e.Switch,i=r.length,l=-1,u=e.index,a=e.model,f=e.ctx,d=e.controller;++l<i&&(n=r[l].node.expression,null!=n)&&!z(n,a,f,d););if(u!==l){if(null!=u&&c(r[u].elements,!1),l===i)return void(e.index=null);this.index=l;var h=r[l];if(null!=h.elements)return void c(h.elements,!0);var p=t.render(h.node.nodes,a,f,null,d),v=p.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.call(p.childNodes):p;s(p,e.placeholder),h.elements=v}},dispose:function(){for(var n,t,e=this.Switch,r=e.length,i=-1;++i<r;)n=e[i],t=n.node.expression,t&&Y(t,this.model,this.controller,this.binder),n.node=null,n.elements=null;this.controller=null,this.model=null,this.ctx=null}}}(),function(){function n(){}function e(n,t,e,r,i){if(l=d.getNodes(n,t,e,r,i),a=null,null!=l){for(var o=t.length,u=-1;++u<o&&t[u].nodes!==l;);a=u===o?null:u}}function r(n,t,e,r,i,o,l,u){return n.ctx=o,n.expr=t.expression,n.model=i,n.controller=u,n.index=e,n.nodes=t.nodes,n.refresh=W(n.refresh,n),n.binder=q(n.expr,i,o,u,n.refresh),n.Switch=new Array(t.nodes.length),null!=e&&(n.Switch[e]=r),K(t.expression,i,o,u,n.binder),n}var l,a,d=f["switch"],h="switch-index";O("+switch",{meta:{serializeNodes:!0},serializeNodes:function(n){return t.stringify(n)},render:function(n,t,r,o,u){var s=z(this.expression,n,t,o);return e(s,this.nodes,n,t,o),null==l?null:(this.attr[h]=a,i(l,n,t,r,o,u))},renderEnd:function(t,e,i,o,l){var s=new n,a=this.attr[h];return u(this,s,o),r(s,this,a,t,e,i,o,l)}}),n.prototype={compoName:"+switch",ctx:null,model:null,controller:null,index:null,nodes:null,Switch:null,binder:null,refresh:function(n){var r=this,i=r.Switch,u=(i.length,r.index),f=r.model,d=r.ctx,h=r.controller;if(e(n,r.nodes,f,d,h),a!==u){if(null!=u&&c(i[u],!1),null==a)return void(r.index=null);this.index=a;var p=i[a];if(null!=p)return void c(p,!0);var v=t.render(l,f,d,null,h),g=v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.call(v.childNodes):v;s(v,r.placeholder),i[a]=g}},dispose:function(){Y(this.expr,this.model,this.controller,this.binder),this.controller=null,this.model=null,this.ctx=null;var n,t,e,r,i=this.Switch;for(n in i)if(t=i[n],null!=t)for(r=t.length,e=-1;++e<r;)null!=t[e].parentNode&&t[e].parentNode.removeChild(t[e])}}}(),function(){function n(n){this.expr=n.expression,this.nodes=n.nodes}function t(n,t,e,r,i){var o=[];return Tt(n,t,e,r,i,o),o}f["with"];O("+with",{meta:{serializeNodes:!0},rootModel:null,render:function(n,e,r,i){var o=this.expression,l=this.nodes,u=V(o,n,e,i);return this.rootModel=n,t(l,u,e,r,i)},onRenderStartClient:function(n,t){this.rootModel=n,this.model=V(this.expression,n,t,this)},renderEnd:function(t,e,r,i,o){e=this.rootModel||e;var l=new n(this);return l.elements=t,l.model=e,l.parent=o,l.refresh=W(l.refresh,l),l.binder=q(l.expr,e,r,o,l.refresh),K(l.expr,e,r,o,l.binder),u(this,l,i),l}}),n.prototype={compoName:"+with",elements:null,binder:null,model:null,parent:null,refresh:function(n){if(l(this.elements),this.components){for(var i=this.components.length,o=-1;++o<i;)r.dispose(this.components[o]);this.components.length=0}var u=e.createDocumentFragment();this.elements=t(this.nodes,n,null,u,this),s(u,this.placeholder),L(this)},dispose:function(){Y(this.expr,this.model,this.parent,this.binder),this.parent=null,this.model=null,this.ctx=null}}}(),function(){function n(n){this.expr=n.expression,this.nodes=n.nodes}function t(n,t,e,r,i){var o=[];return Tt(n,t,e,r,i,o),o}var e=f.visible;O("+visible",{meta:{serializeNodes:!0},render:function(n,e,r,i,o){return t(this.nodes,n,e,r,i)},renderEnd:function(t,e,r,i,o){var l=new n(this);return l.elements=t,l.model=e,l.parent=o,l.refresh=W(l.refresh,l),l.binder=q(l.expr,e,r,o,l.refresh),K(l.expr,e,r,o,l.binder),l.refresh(),l}}),n.prototype={compoName:"+visible",elements:null,binder:null,model:null,parent:null,refresh:function(){var n=z(this.expr,this.model,this.ctx,this);e.toggle(this.elements,n)},dispose:function(){Y(this.expr,this.model,this.parent,this.binder),this.parent=null,this.model=null,this.ctx=null}}}(),function(){function n(n){for(var t,e=n.length,r=-1;++r<e;)switch(t=n[r],typeof t){case"string":case"number":case"boolean":n[r]=Object(t)}}function r(n,t){for(var r=n.node.components,i=0,o=r.length,l=0,u=null,a=null,c=null,f=e.createDocumentFragment(),d=[];o>i;i++)if(c=r[i],null!=c.elements&&0!==c.elements.length)for(l=0,u=c.elements.length;u>l;l++)a=c.elements[l],a.parentNode.removeChild(a);n:for(l=0,u=t.length;u>l;l++){for(i=0;o>i;i++)if(t[l]===n._getModel(r[i])){d[l]=r[i];continue n}console.warn("No Model Found for",t[l])}for(i=0,o=d.length;o>i;i++)if(c=d[i],null!=c.elements&&0!==c.elements.length)for(l=0,u=c.elements.length;u>l;l++)a=c.elements[l],f.appendChild(a);n.components=n.node.components=d,s(f,n.placeholder)}function i(n,t,e,r,i){var o=n.node,l=o.components;null==l&&(l=o.components=[]);var u=(n.prop1,n.prop2,n.type,n.ctx),s=n.node;if(null!=t&&null!=e){var a=t,c=t+e;for(c>l.length&&(c=l.length);c>a;a++)R(l[a],o)&&(a--,c--)}if(null!=r&&i&&i.length){var f,a=l.length,d=n._build(o,i,u,s),h=l.splice(a);for(D(o,r,d,n.placeholder),l.splice.apply(l,[r,0].concat(h)),a=0,f=h.length;f>a;a++)C.signal.emitIn(h[a],"domInsert")}}function o(n,t){for(var e,r=n.components,i=r.length;--i>-1;)e=r[i],-1!==t.indexOf(e.model)&&R(e,n.node)}var l={model:null,parent:null,refresh:function(t,e,l,u){var a,c=0,f=this.node,d=(this.model,this.ctx),h=this.node;if(null==e){var p=f.components;if(null!=p){for(var a=p.length,c=-1;++c<a;)R(p[c],f)&&(c--,a--);p.length=0}var v=this._build(f,t,d,h);return s(v,this.placeholder),void F(f.components,L)}var g=t;switch(n(t),e){case"push":i(this,null,null,g.length-1,g.slice(g.length-1));break;case"pop":i(this,g.length,1);break;case"unshift":i(this,null,null,0,g.slice(0,1));break;case"shift":i(this,0,1);break;case"splice":var m=l[0],y=1===l.length?this.components.length:l[1],b=l.length>2?g.slice(l[0],l.length-2+l[0]):null;i(this,m,y,m,b);break;case"sort":case"reverse":r(this,g);break;case"remove":null!=u&&u.length&&o(this,u)}},dispose:function(){Y(this.expr||this.expression,this.model,this.parent,this.binder)}};!function(){function e(n,t){this.prop1=t[i],this.prop2=t[o],this.type=t[s],this.expr=t[c],null==n.components&&(n.components=[]),this.node=n,this.components=n.components}var r=f["for"],i="for-prop-1",o="for-prop-2",s="for-type",c="for-expr";O("+for",{meta:{serializeNodes:!0},serializeNodes:function(n){return t.stringify(n)},render:function(t,e,l,u,a){var f=r.parseFor(this.expression),d=this.attr;d[i]=f[0],d[o]=f[1],d[s]=f[2],d[c]=f[3];var h=V(f[3],t,e,u);null!=h&&(y(h)&&n(h),r.build(h,f,this.nodes,t,e,l,this,a))},renderEnd:function(n,t,r,i,o){var l=new e(this,this.attr);return u(this,l,i),a(l,this,t,r,i,o),l},getHandler:function(n,t){return r.getHandler(n,t)}}),e.prototype={compoName:"+for",model:null,parent:null,refresh:l.refresh,dispose:l.dispose,_getModel:function(n){return n.scope[this.prop1]},_build:function(n,t,e,i){var o=r.getNodes(n.nodes,t,this.prop1,this.prop2,this.type);return Tt(o,this.model,e,null,i)}}}(),function(){function r(n,t,e,r,o,l){for(var u,s=t.length,a=(new Array(s),0);s>a;a++)u=i(n,a),Tt(u,t[a],e,r,o,l)}function i(n,t){var e=new s;return e.scope={index:t},{type:ft.COMPONENT,tagName:"each::item",nodes:n,controller:function(){return e}}}var o=(f.each,{meta:{serializeNodes:!0},serializeNodes:function(n){return t.stringify(n)},render:function(t,e,i,o,l){var u=z(this.expression,t,e,o);null!=u&&(n(u),r(this.nodes,u,e,i,this,l))},renderEnd:function(n,t,e,r,i){var o=new c(this,this.attr);return u(this,o,r),a(o,this,t,e,r,i),o}}),s=X({compoName:"each::item",scope:null,model:null,modelRef:null,parent:null,renderStart:null,renderEnd:function(n){this.elements=n},dispose:function(){null!=this.elements&&(this.elements.length=0,this.elements=null)}}),c=X({constructor:function(n,t){this.expression=n.expression,this.nodes=n.nodes,null==n.components&&(n.components=[]),this.node=n,this.components=n.components},compoName:"+each",refresh:l.refresh,dispose:l.dispose,_getModel:function(n){return n.model},_build:function(n,t,i,o){var l=e.createDocumentFragment();return r(n.nodes,t,i,l,o),l}});O("each::item",s),O("+each",o)}()}()}(),S(t,{Validators:on,registerValidator:function(n,t){on[n]=t},BindingProviders:ln,registerBinding:function(n,t){ln[n]=t}})}(Mt,$t),function(){Hn.log={render:function(n,t,e,r,i){var o=at(n.expression,t,e,i);o.unshift("Mask::Log"),console.log.apply(console,o)}},Zn("debugger",{render:function(n,t,e,r){}}),Zn(":utest",$t({render:function(n,t,e){e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.childNodes),this.$=$(e)}}))}(),Bn.define=X({meta:{serializeNodes:!0},constructor:function(n,t,e,r,i){yt.registerGlobal(n,t,i)},render:z}),Bn.let=X({meta:{serializeNodes:!0},constructor:function(n,t,e,r,i){yt.registerScoped(n,t,i)},render:z}),function(){Mt.registerHandler(":html",{meta:{mode:"server:all"},render:function(n,t,r){if(this.html=Dt(this.nodes).text(n,t,this),r.insertAdjacentHTML)return void r.insertAdjacentHTML("beforeend",this.html);if(r.ownerDocument){var i,o=e.createElement("div");for(o.innerHTML=this.html,i=o.firstChild;null!=i;)r.appendChild(i),i=i.nextSibling}},toHtml:function(){return this.html||""},html:null})}(),function(){var n=X({meta:{serializeNodes:!0},constructor:function(n){this.fn=n.fn,this.name=n.name}});Bn.slot=X(n,{renderEnd:function(){var n=this.parent,t=n.slots;null==t&&(t=n.slots={}),t[this.name]=this.fn}}),Bn.event=X(n,{renderEnd:function(n,t,e,r){this.fn=this.fn.bind(this.parent);var i=this.name,o=null,l=i.indexOf(":");-1!==l&&(o=i.substring(l+1).trim(),i=i.substring(0,l).trim()),$t.Dom.addEventListener(r,i,this.fn,o)}}),Bn["function"]=X(n,{renderEnd:function(){this.parent[this.name]=this.fn}})}(),function(){var n={},t={get:function(t){return n[t]},resolve:function(t,e){var r=n[e];if(null!=r)return r;for(var i=":template[id="+e+"]",o=t.parent,l=null;null!=o;){if(l=Dt(o.nodes).filter(i).get(0),null!=l)return l.nodes;o=o.parent}return wn("Template was not found",e),null},register:function(t,e){return null==t?void wn("`:template` must be define via id attr."):void(n[t]=e)}};Mt.templates=t,Zn(":template",{render:function(){t.register(this.attr.id,this.nodes)}}),Zn(":import",{renderStart:function(){var n=this.attr.id;return null==n?void kn("`:import` shoud reference the template via id attr"):void(this.nodes=t.resolve(this,n))}})}(),function(){function n(n,t,e,r,i,o){n.model={};var l=n.parent,u=l.scope;null==u&&(u=l.scope={});for(var s in t)n.model[s]=u[s]=e===!1?t[s]:st(t[s],i,o,l)}Bn["var"]=X(lt,{renderStart:function(t,e){n(this,this.attr,!0,t,e)},onRenderStartClient:function(){n(this,this.model,!1)}})}(),Mt.Compo=$t,Mt.jmask=Dt,Mt.version="0.51.25",ut(),t.mask=Mt});
//# sourceMappingURL=mask.min.js.map