antos-frontend/src/libs/riot.compiler.min.js
2018-01-31 15:41:32 +01:00

3 lines
35 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* Riot v3.8.1, @license MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.riot=t()}(this,function(){"use strict";function e(e,t){return[].slice.call((t||document).querySelectorAll(e))}function t(e,t){return(t||document).querySelector(e)}function n(){return document.createDocumentFragment()}function r(){return document.createTextNode("")}function i(e){var t=e.ownerSVGElement;return!!t||null===t}function o(e){return"svg"===e?document.createElementNS(Ke,e):document.createElement(e)}function s(e,t,n){if(n){var r=e.ownerDocument.importNode((new DOMParser).parseFromString('<svg xmlns="'+Ke+'">'+t+"</svg>","application/xml").documentElement,!0);e.appendChild(r)}else e.innerHTML=t}function a(e,t){e.style.display=t?"":"none",e.hidden=!t}function u(e,t){e.removeAttribute(t)}function c(e){return Object.keys(e).reduce(function(t,n){return t+" "+n+": "+e[n]+";"},"")}function l(e,t){return e.getAttribute(t)}function f(e,t,n){var r=We.exec(t);r&&r[1]?e.setAttributeNS(Ge,r[1],n):e.setAttribute(t,n)}function p(e,t,n){e.insertBefore(t,n.parentNode&&n)}function d(e,t){if(e)for(var n;n=Xe.exec(e);)t(n[1].toLowerCase(),n[2]||n[3]||n[4])}function h(e,t,n){if(e){var r,i=t(e,n);if(!1===i)return;for(e=e.firstChild;e;)r=e.nextSibling,h(e,t,i),e=r}}function g(e){return et.test(e)}function m(e){return typeof e===Ze}function v(e){return e&&typeof e===qe}function x(e){return typeof e===De}function y(e){return typeof e===Be}function b(e){return _(e)||""===e}function _(e){return x(e)||null===e}function w(e){return Array.isArray(e)||e instanceof Array}function O(e,t){var n=gt(e,t);return x(e[t])||n&&n.writable}function j(e,t){for(var n=e?e.length:0,r=0;r<n;r++)t(e[r],r);return e}function E(e,t){return-1!==e.indexOf(t)}function N(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})}function C(e,t){return e.slice(0,t.length)===t}function S(e,t,n,r){return Object.defineProperty(e,t,T({value:n,enumerable:!1,writable:!1,configurable:!0},r)),e}function A(e){console&&console.warn&&console.warn(e)}function T(e){for(var t,n=1,r=arguments,i=r.length;n<i;n++)if(t=r[n])for(var o in t)O(e,o)&&(e[o]=t[o]);return e}function k(e,t,n,r){var i,o=function(e,t,n){var r=this.__.parent,i=this.__.item;if(!i)for(;r&&!i;)i=r.__.item,r=r.__.parent;if(O(n,"currentTarget")&&(n.currentTarget=e),O(n,"target")&&(n.target=n.srcElement),O(n,"which")&&(n.which=n.charCode||n.keyCode),n.item=i,t.call(this,n),vt.autoUpdate&&!n.preventUpdate){var o=Y(this);o.isMounted&&o.update()}}.bind(r,n,t);n[e]=null,i=e.replace(Qe,""),E(r.__.listeners,n)||r.__.listeners.push(n),n[Ve]||(n[Ve]={}),n[Ve][e]&&n.removeEventListener(i,n[Ve][e]),n[Ve][e]=o,n.addEventListener(i,o,!1)}function L(e){if(!this.root||!l(this.root,"virtualized")){var t,n=e.dom,i=function(e){return e?(e=e.replace(Ie,""),Ye[e]&&(e=Ye[e]),e):null}(e.attr),o=E([ze,He],i),s=e.root&&"VIRTUAL"===e.root.tagName,p=this.__.isAnonymous,d=n&&(e.parent||n.parentNode),h="style"===i,g="class"===i;if(e._riot_id)e.__.wasCreated?e.update():(e.mount(),s&&oe(e,e.root));else{if(e.update)return e.update();var x=o&&!p?ae.call(this):this,_=!b(t=ft(e.expr,x)),w=v(t);if(w&&(g?t=ft(JSON.stringify(t),this):h&&(t=c(t))),!e.attr||e.wasParsedOnce&&_&&!1!==t||u(n,l(n,e.attr)?e.attr:i),e.bool&&(t=!!t&&i),e.isRtag)return function(e,t,n){var i,o=e.tag||e.dom._tag,s=(o?o.__:{}).head,a="VIRTUAL"===e.dom.tagName;o&&e.tagName===n?o.update():(o&&(a&&(i=r(),s.parentNode.insertBefore(i,s)),o.unmount(!0)),y(n)&&(e.impl=Te[n],e.impl&&(e.tag=o=X(e.impl,{root:e.dom,parent:t,tagName:n},e.dom.innerHTML,t),j(e.attrs,function(e){return f(o.root,e.name,e.value)}),e.tagName=n,o.mount(),a&&oe(o,i||o.root),t.__.onUnmount=function(){var e=o.opts.dataIs;re(o.parent.tags,e,o),re(o.__.parent.tags,e,o),o.unmount()})))}(e,this,t);if((!e.wasParsedOnce||e.value!==t)&&(e.value=t,e.wasParsedOnce=!0,!w||g||h||o)){if(_||(t=""),!i)return t+="",void(d&&(e.parent=d,"TEXTAREA"===d.tagName?(d.value=t,tt||(n.nodeValue=t)):n.nodeValue=t));m(t)?k(i,t,n,this):o?a(n,i===He?!t:t):(e.bool&&(n[i]=t),"value"===i&&n.value!==t?n.value=t:_&&!1!==t&&f(n,i,t),h&&n.hidden&&a(n,!1))}}}}function I(e){j(e,L.bind(this))}function R(e,t,n,r){var i=r?Object.create(r):{};return i[e.key]=t,e.pos&&(i[e.pos]=n),i}function M(e,t){for(var n=t.length,r=e.length;n>r;)(function(e,t){e.splice(t,1),this.unmount(),re(this.parent,this,this.__.tagName,!0)}).apply(t[--n],[t,n])}function P(e,t,i){var o,s=typeof l(e,Fe)!==Be||u(e,Fe),a=l(e,Ue),c=!!a&&ft.hasExpr(a),f=te(e),d=Te[f],h=e.parentNode,g=r(),m=J(e),v=l(e,Pe),x=[],b=e.innerHTML,_=!Te[f],O="VIRTUAL"===e.tagName,N=[];return u(e,$e),u(e,Ue),i=ft.loopKeys(i),i.isLoop=!0,v&&u(e,Pe),h.insertBefore(g,e),h.removeChild(e),i.update=function(){i.value=ft(i.val,t);var r=i.value,u=n(),l=!w(r)&&!y(r),h=g.parentNode,C=[];h&&(l?r=(o=r||!1)?Object.keys(r).map(function(e){return R(i,r[e],e)}):[]:o=!1,v&&(r=r.filter(function(e,n){return i.key&&!l?!!ft(v,R(i,e,n,t)):!!ft(v,T(Object.create(t),e))})),j(r,function(n,l){var g=!o&&i.key?R(i,n,l):n,v=function(e,t,n,r){return e?r?ft(e,n):t[e]:t}(a,n,g,c),y=s&&typeof n===qe&&!o,w=N.indexOf(v),S=-1===w,A=!S&&y?w:l,T=x[A],k=l>=N.length,L=y&&S||!y&&!T;L?((T=W(d,{parent:t,isLoop:!0,isAnonymous:_,tagName:f,root:e.cloneNode(_),item:g,index:l},b)).mount(),k?function(e,t){t?se.call(this,e):e.appendChild(this.root)}.apply(T,[u||h,O]):function(e,t,n){n?se.apply(this,[e,t]):p(e,this.root,t.root)}.apply(T,[h,x[l],O]),k||N.splice(l,0,g),x.splice(l,0,T),m&&ne(t.tags,f,T,!0)):A!==l&&y&&((a||E(r,N[A]))&&(function(e,t,n){n?ue.apply(this,[e,t]):p(e,this.root,t.root)}.apply(T,[h,x[l],O]),x.splice(l,0,x.splice(A,1)[0]),N.splice(l,0,N.splice(A,1)[0])),i.pos&&(T[i.pos]=l),!m&&T.tags&&function(e){var t=this;j(Object.keys(this.tags),function(n){Q.apply(t.tags[n],[n,e])})}.call(T,l)),T.__.item=g,T.__.index=l,T.__.parent=t,C[l]=v,L||T.update(g)}),M(r,x),N=C.slice(),h.insertBefore(u,g))},i.unmount=function(){j(x,function(e){e.unmount()})},i}function $(e,t){var n=this,r=[];return h(e,function(i){var o,s,a=i.nodeType;if((t||i!==e)&&(3===a&&"STYLE"!==i.parentNode.tagName&&ft.hasExpr(i.nodeValue)&&r.push({dom:i,expr:i.nodeValue}),1===a)){var u="VIRTUAL"===i.tagName;if(o=l(i,$e))return u&&f(i,"loopVirtual",!0),r.push(P(i,n,o)),!1;if(o=l(i,Pe))return r.push(Object.create(xt).init(i,n,o)),!1;if((o=l(i,Me))&&ft.hasExpr(o))return r.push({isRtag:!0,expr:o,dom:i,attrs:[].slice.call(i.attributes)}),!1;if(s=J(i),u&&(l(i,"virtualized")&&i.parentElement.removeChild(i),s||l(i,"virtualized")||l(i,"loopVirtual")||(s={tmpl:i.outerHTML})),s&&(i!==e||t)){if(!u)return r.push(X(s,{root:i,parent:n},i.innerHTML,n)),!1;l(i,Me)&&A("Virtual tags shouldn't be used together with the \""+Me+'" attribute - https://github.com/riot/riot/issues/2511'),f(i,"virtualized",!0);var c=W({tmpl:i.outerHTML},{root:i,parent:n},i.innerHTML);r.push(c)}F.apply(n,[i,i.attributes,function(e,t){t&&r.push(t)}])}}),r}function F(e,t,n){var r=this;j(t,function(t){if(!t)return!1;var i,o=t.name,s=g(o);E(Re,o)&&e.tagName.toLowerCase()!==ke?i=Object.create(yt).init(e,r,o,t.value):ft.hasExpr(t.value)&&(i={dom:e,expr:t.value,attr:o,bool:s}),n(t,i)})}function z(e,n,r){var i=e&&e.match(/^\s*<([-\w]+)/),a=i&&i[1].toLowerCase(),u=o(r?Ct:Nt);return e=function(e,t){if(!bt.test(e))return e;var n={};return t=t&&t.replace(wt,function(e,t,r){return n[t]=n[t]||r,""}).trim(),e.replace(Ot,function(e,t,r){return n[t]||r||""}).replace(_t,function(e,n){return t||n||""})}(e,n),Et.test(a)?u=function(e,n,r){var i="o"===r[0],o=i?"select>":"table>";if(e.innerHTML="<"+o+n.trim()+"</"+o,o=e.firstChild,i)o.selectedIndex=-1;else{var s=jt[r];s&&1===o.childElementCount&&(o=t(s,o))}return o}(u,e,a):s(u,e,r),u}function H(e,t){var n=this.name,r=this.tmpl,i=this.css,o=this.attrs,s=this.onCreate;return Te[n]||(U(n,r,i,o,s),Te[n].class=this.constructor),ie(e,n,t,this),i&&ut.inject(),this}function U(e,t,n,r,i){return m(r)&&(i=r,/^[\w-]+\s?=/.test(n)?(r=n,n=""):r=""),n&&(m(n)?i=n:ut.add(n)),e=e.toLowerCase(),Te[e]={name:e,tmpl:t,attrs:r,fn:i},e}function V(e,t,n,r,i){return n&&ut.add(n,e),Te[e]={name:e,tmpl:t,attrs:r,fn:i},e}function B(t,n,r){function i(e){if(e.tagName){var t,o=l(e,Me);n&&o!==n&&(o=n,f(e,Me,n)),(t=ie(e,o||e.tagName.toLowerCase(),r))&&a.push(t)}else e.length&&j(e,i)}var o,s,a=[];if(ut.inject(),v(n)&&(r=n,n=0),o=y(t)?(t="*"===t?s=ce():t+ce(t.split(/, */)))?e(t):[]:t,"*"===n){if(n=s||ce(),o.tagName)o=e(n,o);else{var u=[];j(o,function(t){return u.push(e(n,t))}),o=u}n=0}return i(o),a}function q(e,t,n){if(v(e))q("__"+Tt+++"__",e,!0);else{var r=n?At:St;if(!t){if(x(r[e]))throw new Error("Unregistered mixin: "+e);return r[e]}r[e]=m(t)?T(t.prototype,r[e]||{})&&t:T(r[e]||{},t)}}function D(){return j(Ae,function(e){return e.update()})}function Z(e){Te[e]=null}function G(e,t,n,r,i){if(!e||!n){var o=e?ae.call(this):t||this;j(i,function(e){e.expr&&L.call(o,e.expr),r[N(e.name).replace(Ie,"")]=e.expr?e.expr.value:e.value})}}function K(e){var t=this.__.isAnonymous;S(this,"isMounted",e),t||(e?this.trigger("mount"):(this.trigger("unmount"),this.off("*"),this.__.wasCreated=!1))}function W(e,t,n){void 0===e&&(e={}),void 0===t&&(t={});var r,o=t.context||{},a=T({},t.opts),c=t.parent,l=t.isLoop,p=!!t.isAnonymous,h=vt.skipAnonymousTags&&p,g=t.item,v=t.index,x=[],b=[],_=[],w=t.root,O=t.tagName||te(w),N="virtual"===O,A=!N&&!e.tmpl;return h||pt(o),e.name&&w._tag&&w._tag.unmount(!0),S(o,"isMounted",!1),S(o,"__",{isAnonymous:p,instAttrs:x,innerHTML:n,tagName:O,index:v,isLoop:l,isInline:A,listeners:[],virts:[],wasCreated:!1,tail:null,head:null,parent:null,item:null}),S(o,"_riot_id",ht()),S(o,"root",w),T(o,{opts:a},g),S(o,"parent",c||null),S(o,"tags",{}),S(o,"refs",{}),A||l&&p?r=w:(N||(w.innerHTML=""),r=z(e.tmpl,n,i(w))),S(o,"update",function(e){var t={},n=o.isMounted&&!h;return p&&c&&T(o,c),T(o,e),G.apply(o,[l,c,p,t,x]),n&&o.isMounted&&m(o.shouldUpdate)&&!o.shouldUpdate(e,t)?o:(T(a,t),n&&o.trigger("update",e),I.call(o,_),n&&o.trigger("updated"),o)}),S(o,"mixin",function(){return j(arguments,function(e){var t,n,r=[],i=["init","__proto__"];e=y(e)?q(e):e,t=m(e)?new e:e;var s=Object.getPrototypeOf(t);do{r=r.concat(Object.getOwnPropertyNames(n||t))}while(n=Object.getPrototypeOf(n||t));j(r,function(e){if(!E(i,e)){var n=gt(t,e)||gt(s,e),r=n&&(n.get||n.set);!o.hasOwnProperty(e)&&r?Object.defineProperty(o,e,n):o[e]=m(t[e])?t[e].bind(o):t[e]}}),t.init&&t.init.bind(o)(a)}),o}),S(o,"mount",function(){w._tag=o,F.apply(c,[w,w.attributes,function(e,t){!p&&yt.isPrototypeOf(t)&&(t.tag=o),e.expr=t,x.push(e)}]),d(e.attrs,function(e,t){b.push({name:e,value:t})}),F.apply(o,[w,b,function(e,t){t?_.push(t):f(w,e.name,e.value)}]),G.apply(o,[l,c,p,a,x]);var t=q(Le);if(t&&!h)for(var n in t)t.hasOwnProperty(n)&&o.mixin(t[n]);if(e.fn&&e.fn.call(o,a),h||o.trigger("before-mount"),j($.apply(o,[r,p]),function(e){return _.push(e)}),o.update(g),!p&&!A)for(;r.firstChild;)w.appendChild(r.firstChild);if(S(o,"root",w),!h&&o.parent){var i=Y(o.parent);i.one(i.isMounted?"updated":"mount",function(){K.call(o,!0)})}else K.call(o,!0);return o.__.wasCreated=!0,o}),S(o,"unmount",function(t){var n=o.root,r=n.parentNode,i=Ae.indexOf(o);if(h||o.trigger("before-unmount"),d(e.attrs,function(e){C(e,Ie)&&(e=e.slice(Ie.length)),u(w,e)}),o.__.listeners.forEach(function(e){Object.keys(e[Ve]).forEach(function(t){e.removeEventListener(t,e[Ve][t])})}),-1!==i&&Ae.splice(i,1),c&&!p){var a=Y(c);N?Object.keys(o.tags).forEach(function(e){return re(a.tags,e,o.tags[e])}):re(a.tags,O,o)}return o.__.virts&&j(o.__.virts,function(e){e.parentNode&&e.parentNode.removeChild(e)}),ee(_),j(x,function(e){return e.expr&&e.expr.unmount&&e.expr.unmount()}),t?s(n,""):r&&r.removeChild(n),o.__.onUnmount&&o.__.onUnmount(),o.isMounted||K.call(o,!0),K.call(o,!1),delete o.root._tag,o}),o}function J(e){return e.tagName&&Te[l(e,Me)||l(e,Me)||e.tagName.toLowerCase()]}function Q(e,t){var n,r=this.parent;r&&(w(n=r.tags[e])?n.splice(t,0,n.splice(n.indexOf(this),1)[0]):ne(r.tags,e,this))}function X(e,t,n,r){var i=W(e,t,n),o=t.tagName||te(t.root,!0),s=Y(r);return S(i,"parent",s),i.__.parent=r,ne(s.tags,o,i),s!==r&&ne(r.tags,o,i),i}function Y(e){for(var t=e;t.__.isAnonymous&&t.parent;)t=t.parent;return t}function ee(e){j(e,function(e){e.unmount?e.unmount(!0):e.tagName?e.tag.unmount(!0):e.unmount&&e.unmount()})}function te(e,t){var n=J(e),r=!t&&l(e,Me);return r&&!ft.hasExpr(r)?r:n?n.name:e.tagName.toLowerCase()}function ne(e,t,n,r,i){var o=e[t],s=w(o),a=!x(i);if(!o||o!==n)if(!o&&r)e[t]=[n];else if(o)if(s){var u=o.indexOf(n);if(u===i)return;-1!==u&&o.splice(u,1),a?o.splice(i,0,n):o.push(n)}else e[t]=[o,n];else e[t]=n}function re(e,t,n,r){if(w(e[t])){var i=e[t].indexOf(n);-1!==i&&e[t].splice(i,1),e[t].length?1!==e[t].length||r||(e[t]=e[t][0]):delete e[t]}else e[t]===n&&delete e[t]}function ie(e,t,n,r){var i,o=Te[t],s=Te[t].class,a=r||(s?Object.create(s.prototype):{}),u=e._innerHTML=e._innerHTML||e.innerHTML,c=T({root:e,opts:n,context:a},{parent:n?n.parent:null});return o&&e&&(i=W(o,c,u)),i&&i.mount&&(i.mount(!0),E(Ae,i)||Ae.push(i)),i}function oe(e,t){var r=n();se.call(e,r),t.parentNode.replaceChild(r,t)}function se(e,t){var i,o,s=r(),a=r(),u=n();for(this.root.insertBefore(s,this.root.firstChild),this.root.appendChild(a),this.__.head=o=s,this.__.tail=a;o;)i=o.nextSibling,u.appendChild(o),this.__.virts.push(o),o=i;t?e.insertBefore(u,t.__.head):e.appendChild(u)}function ae(){return this.parent?T(Object.create(this),this.parent):this}function ue(e,t){for(var r,i=this.__.head,o=n();i;)if(r=i.nextSibling,o.appendChild(i),(i=r)===this.__.tail){o.appendChild(i),e.insertBefore(o,t.__.head);break}}function ce(e){if(!e){var t=Object.keys(Te);return t+ce(t)}return e.filter(function(e){return!/[^-\w]/.test(e)}).reduce(function(e,t){var n=t.trim().toLowerCase();return e+",["+Me+'="'+n+'"]'},"")}function le(e){var t=arguments,n=e.source,r=e.global?"g":"";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m");for(var i=1;i<arguments.length;i++)n=n.replace("@","\\"+t[i]);return new RegExp(n,r)}function fe(e,t,n){var r=/[`$\\]/g;for(r.lastIndex=t;r.exec(e);){var i=r.lastIndex,o=e[i-1];if("`"===o)return i;if("$"===o&&"{"===e[i])return n.push("`","}"),i+1;r.lastIndex++}throw new Error("Unclosed ES6 template")}function pe(e){var t,n=Yt;for(1!==e.indexOf("\r")&&(e=e.replace(/\r\n?/g,"\n")),n.lastIndex=0;t=n.exec(e);)"<"===t[0][0]&&(e=RegExp.leftContext+RegExp.rightContext,n.lastIndex=t[3]+1);return e}function de(e,t){var n,r,i,o=[];for(Xt.lastIndex=0,e=e.replace(/\s+/g," ");n=Xt.exec(e);){var s=n[1].toLowerCase(),a=n[2];a?(a[0]!==dn&&(a=dn+(a[0]===hn?a.slice(1,-1):a)+dn),"type"===s&&sn.test(a)?r=a:(cn.test(a)&&("value"===s&&(i=1),-1!==nn.indexOf(s)&&(s="riot-"+s)),o.push(s+"="+a))):o.push(s)}return r&&(i&&(r=dn+t._bp[0]+hn+r.slice(1,-1)+hn+t._bp[1]+dn),o.push("type="+r)),o.join(" ")}function he(e,t,n){var r=n._bp;if(e&&r[4].test(e)){for(var i,o=t.expr&&(t.parser||t.type)?xe:0,s=lt.split(e,0,r),a=1;a<s.length;a+=2)"^"===(i=s[a])[0]?i=i.slice(1):o&&";"===(i=o(i,t).trim()).slice(-1)&&(i=i.slice(0,-1)),s[a]=fn+(n.push(i)-1)+r[1];e=s.join("")}return e}function ge(e,t){return t.length&&(e=e.replace(ln,function(e,n){return t._bp[0]+t[n].trim().replace(/[\r\n]+/g," ").replace(/"/g,pn)})),e}function me(e,t,n){if(!/\S/.test(e))return"";if(e=he(e,t,n).replace(en,function(e,t,r,i){return t=t.toLowerCase(),i=i&&!rn.test(t)?"></"+t:"",r&&(t+=" "+de(r,n)),"<"+t+i+">"}),!t.whitespace){var r=[];/<pre[\s>]/.test(e)&&(e=e.replace(on,function(e){return r.push(e),""})),e=e.trim().replace(/\s+/g," "),r.length&&(e=e.replace(/\u0002/g,function(){return r.shift()}))}return t.compact&&(e=e.replace(tn,"><$1")),ge(e,n).replace(un,"")}function ve(e){var t,n,r,i,o,s,a=[],u=RegExp,c=function(e,t){for(var n,r,i,o,s,a,u=new RegExp(Gt,"g"),c=lt.skipRegex,l=0|t,f=[[]],p=[],d=u,h=d.lastIndex=l;a=d.exec(e);){if(o=a.index,s=d.lastIndex,r="",i=a[1]){if("{"===i)p.push("}");else if("}"===i){if(p.pop()!==i)throw new Error("Unexpected '}'");"`"===p[p.length-1]&&(i=p.pop())}else"/"===i&&(s=c(e,o))>o+1&&(r=e.slice(o,s));"`"===i&&(s=fe(e,s,p),r=e.slice(o,s),d=p.length?n||(n=new RegExp(Kt,"g")):u)}else"/"===(r=a[0])[0]?(r="*"===r[1]?" ":"",e=e.slice(l,o)+r+e.slice(s),s=o+r.length,r=""):2===r.length&&(r="");r&&(f[0].push(e.slice(h,o)),f.push(r),h=s),d.lastIndex=s}return f[0].push(e.slice(h)),f}(e);for(e=c.shift().join("<%>");t=e.match(gn);)a.push(u.leftContext),r=function(e){for(var t=/[{}]/g,n=1;n&&t.exec(e);)"{"===e[t.lastIndex-1]?++n:--n;return n?e.length:t.lastIndex}(e=u.rightContext),i=t[1],o=t[2]||"",s=t[3],s=(n=!/^(?:if|while|for|switch|catch|function)$/.test(s))?t[0].replace(i,"this."+s+" ="+o+" function"):t[0],a.push(s,e.slice(0,r)),e=e.slice(r),n&&!/^\s*.\s*bind\b/.test(e)&&a.push(".bind(this)");return a.length&&(e=a.join("")+e),c.length&&(e=e.replace(/<%>/g,function(){return c.shift()})),e}function xe(e,t,n,r,i){if(!/\S/.test(e))return"";n||(n=t.type);return(t.parser||n&&Dt._req("js."+n,!0)||ve)(e,r,i).replace(/\r\n?/g,"\n").replace(un,"")}function ye(e,t,n,r){if(r=r||{},n&&"css"!==n){e=Dt._req("css."+n,!0)(t,e,r.parserOpts||{},r.url)}return e=e.replace(lt.R_MLCOMMS,"").replace(/\s+/g," ").trim(),t&&(e=function(e,t){return t.replace(mn,function(t,n,r){return r?(r=r.replace(/[^,]+/g,function(t){var n=t.trim();return 0===n.indexOf(e)?t:n&&"from"!==n&&"to"!==n&&"%"!==n.slice(-1)?n=n.indexOf(":scope")<0?e+" "+n+',[data-is="'+e+'"] '+n:n.replace(":scope",e)+","+n.replace(":scope",'[data-is="'+e+'"]'):t}),n?n+" "+r:r):t})}(t,e)),e}function be(e,t){return e?(e=hn+e.replace(/\\/g,"\\\\").replace(/'/g,"\\'")+hn,t&&-1!==e.indexOf("\n")?e.replace(/\n/g,"\\n"):e):"''"}function _e(e){if(e){var t=e.match(vn);if(t=t&&(t[2]||t[3]))return t.replace("text/","")}return""}function we(e,t){if(e){var n=e.match(RegExp("\\s"+t+xn,"i"));if(n=n&&n[1])return/^['"]/.test(n)?n.slice(1,-1):n}return""}function Oe(e){var t=function(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}(we(e,"options"));return t?JSON.parse(t):null}function je(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){4===r.readyState&&(200===r.status||!r.status&&r.responseText.length?t(r.responseText,n,e):Ne.error('"'+e+'" not found'))},r.onerror=function(e){return Ne.error(e)},r.open("GET",e,!0),r.send("")}function Ee(e,t){if(typeof e===Be){var n=o("script"),r=document.documentElement;t&&(e+="\n//# sourceURL="+t+".js"),n.text=e,r.appendChild(n),r.removeChild(n)}}function Ne(t,n,r){if(typeof t===Be){if(v(n)&&(r=n,n=!1),/^\s*</m.test(t)){var i=On.compile(t,r);return!0!==n&&Ee(i),m(n)&&n(i,t,r),i}je(t,function(e,t,r){var i=On.compile(e,t,r);Ee(i,r),n&&n(i,e,t)},r)}else if(w(t)){var o=t.length;t.forEach(function(e){je(e,function(e,t,r){var i=On.compile(e,t,r);Ee(i,r),!--o&&n&&n(i,e,t)},r)})}else{if(m(t)?(r=n,n=t):(r=t,n=void 0),at)return n&&n();st?n&&st.on("ready",n):(st=pt(),function(t,n){function r(){st.trigger("ready"),at=!0,t&&t()}function i(e,t,n){Ee(On.compile(e,t,n),n),--s||r()}var o=e('script[type="riot/tag"]'),s=o.length;if(s)for(var a=0;a<o.length;++a){var u=o[a],c=T({template:l(u,"template")},n),f=l(u,"src")||l(u,"data-src");f?je(f,i,c):i(u.innerHTML,c)}else r()}(n,r))}}var Ce,Se,Ae=[],Te={},ke="yield",Le="__global_mixin",Ie="riot-",Re=["ref","data-ref"],Me="data-is",Pe="if",$e="each",Fe="no-reorder",ze="show",He="hide",Ue="key",Ve="__riot-events__",Be="string",qe="object",De="undefined",Ze="function",Ge="http://www.w3.org/1999/xlink",Ke="http://www.w3.org/2000/svg",We=/^xlink:(\w+)/,Je=typeof window===De?void 0:window,Qe=/^on/,Xe=/([-\w]+) ?= ?(?:"([^"]*)|'([^']*)|({[^}]*}))/g,Ye={viewbox:"viewBox",preserveaspectratio:"preserveAspectRatio"},et=/^(?:disabled|checked|readonly|required|allowfullscreen|auto(?:focus|play)|compact|controls|default|formnovalidate|hidden|ismap|itemscope|loop|multiple|muted|no(?:resize|shade|validate|wrap)?|open|reversed|seamless|selected|sortable|truespeed|typemustmatch)$/,tt=0|(Je&&Je.document||{}).documentMode,nt=Object.freeze({$$:e,$:t,createFrag:n,createDOMPlaceholder:r,isSvg:i,mkEl:o,setInnerHTML:s,toggleVisibility:a,remAttr:u,styleObjectToString:c,getAttr:l,setAttr:f,safeInsert:p,walkAttrs:d,walkNodes:h}),rt={},it=[],ot=!1;Je&&(Ce=function(){var e=o("style"),n=t("style[type=riot]");return f(e,"type","text/css"),n?(n.id&&(e.id=n.id),n.parentNode.replaceChild(e,n)):document.head.appendChild(e),e}(),Se=Ce.styleSheet);var st,at,ut={styleNode:Ce,add:function(e,t){t?rt[t]=e:it.push(e),ot=!0},inject:function(){if(Je&&ot){ot=!1;var e=Object.keys(rt).map(function(e){return rt[e]}).concat(it).join("\n");Se?Se.cssText=e:Ce.innerHTML=e}}},ct=function(){function e(e,t){for(;--t>=0&&/\s/.test(e[t]););return t}var t="[{(,;:?=|&!^~>%*/",n=["case","default","do","else","in","instanceof","prefix","return","typeof","void","yield"],r=n.reduce(function(e,t){return e+t.slice(-1)},""),i=/^\/(?=[^*>/])[^[/\\]*(?:(?:\\.|\[(?:\\.|[^\]\\]*)*\])[^[\\/]*)*?\/[gimuy]*/,o=/[$\w]/;return function(s,a){var u=/.*/g,c=u.lastIndex=a++,l=u.exec(s)[0].match(i);if(l){var f=c+l[0].length,p=s[c=e(s,c)];if(c<0||~t.indexOf(p))return f;if("."===p)"."===s[c-1]&&(a=f);else if("+"===p||"-"===p)(s[--c]!==p||(c=e(s,c))<0||!o.test(s[c]))&&(a=f);else if(~r.indexOf(p)){for(var d=c+1;--c>=0&&o.test(s[c]););~n.indexOf(s.slice(c+1,d))&&(a=f)}}return a}}(),lt=function(e){function t(e){return e}function n(e,t){return t||(t=x),new RegExp(e.source.replace(/{/g,t[2]).replace(/}/g,t[3]),e.global?u:"")}function r(e){if(e===g)return m;var t=e.split(" ");if(2!==t.length||f.test(e))throw new Error('Unsupported brackets "'+e+'"');return t=t.concat(e.replace(p,"\\").split(" ")),t[4]=n(t[1].length>1?/{[\S\s]*?}/:m[4],t),t[5]=n(e.length>3?/\\({|})/g:m[5],t),t[6]=n(m[6],t),t[7]=RegExp("\\\\("+t[3]+")|([[({])|("+t[3]+")|"+d,u),t[8]=e,t}function i(e){return e instanceof RegExp?s(e):x[e]}function o(e){(e||(e=g))!==x[8]&&(x=r(e),s=e===g?t:n,x[9]=s(m[9])),v=e}var s,a,u="g",c=/"[^"\\]*(?:\\[\S\s][^"\\]*)*"|'[^'\\]*(?:\\[\S\s][^'\\]*)*'|`[^`\\]*(?:\\[\S\s][^`\\]*)*`/g,l=c.source+"|"+/(?:\breturn\s+|(?:[$\w\)\]]|\+\+|--)\s*(\/)(?![*\/]))/.source+"|"+/\/(?=[^*\/])[^[\/\\]*(?:(?:\[(?:\\.|[^\]\\]*)*\]|\\.)[^[\/\\]*)*?([^<]\/)[gim]*/.source,f=RegExp("[\\x00-\\x1F<>a-zA-Z0-9'\",;\\\\]"),p=/(?=[[\]()*+?.^$|])/g,d=c.source+"|"+/(\/)(?![*\/])/.source,h={"(":RegExp("([()])|"+d,u),"[":RegExp("([[\\]])|"+d,u),"{":RegExp("([{}])|"+d,u)},g="{ }",m=["{","}","{","}",/{[^}]*}/,/\\([{}])/g,/\\({)|{/g,RegExp("\\\\(})|([[({])|(})|"+d,u),g,/^\s*{\^?\s*([$\w]+)(?:\s*,\s*(\S+))?\s+in\s+(\S.*)\s*}/,/(^|[^\\]){=[\S\s]*?}/],v=void 0,x=[];return i.split=function(e,t,n){function r(e){g&&(e=g+e,g=""),t||s?f.push(e&&e.replace(n[5],"$1")):f.push(e)}function i(n,r,i){return i&&(r=ct(e,n)),t&&r>n+2&&(c="⁗"+d.length+"~",d.push(e.slice(n,r)),g+=e.slice(a,n)+c,a=r),r}n||(n=x);var o,s,a,u,c,l,f=[],p=n[6],d=[],g="";for(s=a=p.lastIndex=0;o=p.exec(e);){if(l=p.lastIndex,u=o.index,s){if(o[2]){var m=o[2],v=h[m],y=1;for(v.lastIndex=l;o=v.exec(e);)if(o[1]){if(o[1]===m)++y;else if(!--y)break}else v.lastIndex=i(o.index,v.lastIndex,o[2]);p.lastIndex=y?e.length:v.lastIndex;continue}if(!o[3]){p.lastIndex=i(u,l,o[4]);continue}}o[1]||(r(e.slice(a,u)),a=p.lastIndex,(p=n[6+(s^=1)]).lastIndex=a)}return e&&a<e.length&&r(e.slice(a)),f.qblocks=d,f},i.hasExpr=function(e){return x[4].test(e)},i.loopKeys=function(e){var t=e.match(x[9]);return t?{key:t[1],pos:t[2],val:x[0]+t[3].trim()+x[1]}:{val:e.trim()}},i.array=function(e){return e?r(e):x},Object.defineProperty(i,"settings",{set:function(e){var t;t=(e=e||{}).brackets,Object.defineProperty(e,"brackets",{set:o,get:function(){return v},enumerable:!0}),a=e,o(t)},get:function(){return a}}),i.settings="undefined"!=typeof riot&&riot.settings||{},i.set=o,i.skipRegex=ct,i.R_STRINGS=c,i.R_MLCOMMS=/\/\*[^*]*\*+(?:[^*\/][^*]*\*+)*\//g,i.S_QBLOCKS=l,i.S_QBLOCK2=d,i}(),ft=function(){function e(n,s){return n?(r[n]||(r[n]=function(e){var n=function(e){var n,r=lt.split(e.replace(i,'"'),1),s=r.qblocks;if(r.length>2||r[0]){var a,u,c=[];for(a=u=0;a<r.length;++a)(n=r[a])&&(n=1&a?t(n,1,s):'"'+n.replace(/\\/g,"\\\\").replace(/\r\n?|\n/g,"\\n").replace(/"/g,'\\"')+'"')&&(c[u++]=n);n=u<2?c[0]:"["+c.join(",")+'].join("")'}else n=t(r[1],0,s);s.length&&(n=n.replace(o,function(e,t){return s[t].replace(/\r/g,"\\r").replace(/\n/g,"\\n")}));return n}(e);"try{return "!==n.slice(0,11)&&(n="return "+n);return new Function("E",n+";")}(n))).call(s,function(t,n){t.riotData={tagName:n&&n.__&&n.__.tagName,_riot_id:n&&n._riot_id},e.errorHandler?e.errorHandler(t):"undefined"!=typeof console&&"function"==typeof console.error&&(console.error(t.message),console.log("<%s> %s",t.riotData.tagName||"Unknown tag",this.tmpl),console.log(this.data))}.bind({data:s,tmpl:n})):n}function t(e,t,r){if(e=e.replace(/\s+/g," ").trim().replace(/\ ?([[\({},?\.:])\ ?/g,"$1")){for(var i,o=[],u=0;e&&(i=e.match(s))&&!i.index;){var c,l,f=/,|([[{(])|$/g;for(e=RegExp.rightContext,c=i[2]?r[i[2]].slice(1,-1).trim().replace(/\s+/g," "):i[1];l=(i=f.exec(e))[1];)!function(t,n){var r,i=1,o=a[t];for(o.lastIndex=n.lastIndex;r=o.exec(e);)if(r[0]===t)++i;else if(!--i)break;n.lastIndex=i?e.length:o.lastIndex}(l,f);l=e.slice(0,i.index),e=RegExp.rightContext,o[u++]=n(l,1,c)}e=u?u>1?"["+o.join(",")+'].join(" ").trim()':o[0]:n(e,t)}return e}function n(e,t,n){var r;return e=e.replace(c,function(e,t,n,i,o){return n&&(i=r?0:i+e.length,"this"!==n&&"global"!==n&&"window"!==n?(e=t+'("'+n+u+n,i&&(r="."===(o=o[i])||"("===o||"["===o)):i&&(r=!l.test(o.slice(i)))),e}),r&&(e="try{return "+e+"}catch(e){E(e,this)}"),n?e=(r?"function(){"+e+"}.call(this)":"("+e+")")+'?"'+n+'":""':t&&(e="function(v){"+(r?e.replace("return ","v="):"v=("+e+")")+';return v||v===0?v:""}.call(this)'),e}var r={};e.hasExpr=lt.hasExpr,e.loopKeys=lt.loopKeys,e.clearCache=function(){r={}},e.errorHandler=null;var i=/\u2057/g,o=/\u2057(\d+)~/g,s=/^(?:(-?[_A-Za-z\xA0-\xFF][-\w\xA0-\xFF]*)|\u2057(\d+)~):/,a={"(":/[()]/g,"[":/[[\]]/g,"{":/[{}]/g},u='"in this?this:'+("object"!=typeof window?"global":"window")+").",c=/[,{][\$\w]+(?=:)|(^ *|[^$\w\.{])(?!(?:typeof|true|false|null|undefined|in|instanceof|is(?:Finite|NaN)|void|NaN|new|Date|RegExp|Math)(?![$\w]))([$_A-Za-z][$\w]*)/g,l=/^(?=(\.[$\w]+))\1(?:[^.[(]|$)/;return e.version=lt.version="v3.0.8",e}(),pt=function(e){e=e||{};var t={},n=Array.prototype.slice;return Object.defineProperties(e,{on:{value:function(n,r){return"function"==typeof r&&(t[n]=t[n]||[]).push(r),e},enumerable:!1,writable:!1,configurable:!1},off:{value:function(n,r){if("*"!=n||r)if(r)for(var i,o=t[n],s=0;i=o&&o[s];++s)i==r&&o.splice(s--,1);else delete t[n];else t={};return e},enumerable:!1,writable:!1,configurable:!1},one:{value:function(t,n){function r(){e.off(t,r),n.apply(e,arguments)}return e.on(t,r)},enumerable:!1,writable:!1,configurable:!1},trigger:{value:function(r){var i,o,s,a=arguments,u=arguments.length-1,c=new Array(u);for(s=0;s<u;s++)c[s]=a[s+1];for(i=n.call(t[r]||[],0),s=0;o=i[s];++s)o.apply(e,c);return t["*"]&&"*"!=r&&e.trigger.apply(e,["*",r].concat(c)),e},enumerable:!1,writable:!1,configurable:!1}}),e},dt=Object.freeze({isBoolAttr:g,isFunction:m,isObject:v,isUndefined:x,isString:y,isBlank:b,isNil:_,isArray:w,isWritable:O}),ht=function(){var e=-1;return function(){return++e}}(),gt=function(e,t){return Object.getOwnPropertyDescriptor(e,t)},mt=Object.freeze({each:j,contains:E,toCamel:N,startsWith:C,defineProperty:S,uid:ht,warn:A,getPropDescriptor:gt,extend:T}),vt=T(Object.create(lt.settings),{skipAnonymousTags:!0,autoUpdate:!0}),xt={init:function(e,t,n){u(e,Pe),this.tag=t,this.expr=n,this.stub=r(),this.pristine=e;var i=e.parentNode;return i.insertBefore(this.stub,e),i.removeChild(e),this},update:function(){this.value=ft(this.expr,this.tag),this.value&&!this.current?(this.current=this.pristine.cloneNode(!0),this.stub.parentNode.insertBefore(this.current,this.stub),this.expressions=$.apply(this.tag,[this.current,!0])):!this.value&&this.current&&(ee(this.expressions),this.current._tag?this.current._tag.unmount():this.current.parentNode&&this.current.parentNode.removeChild(this.current),this.current=null,this.expressions=[]),this.value&&I.call(this.tag,this.expressions)},unmount:function(){ee(this.expressions||[])}},yt={init:function(e,t,n,r){return this.dom=e,this.attr=n,this.rawValue=r,this.parent=t,this.hasExp=ft.hasExpr(r),this},update:function(){var e=this.value,t=this.parent&&Y(this.parent),n=this.dom.__ref||this.tag||this.dom;this.value=this.hasExp?ft(this.rawValue,this.parent):this.rawValue,!b(e)&&t&&re(t.refs,e,n),!b(this.value)&&y(this.value)?(t&&ne(t.refs,this.value,n,null,this.parent.__.index),this.value!==e&&f(this.dom,this.attr,this.value)):u(this.dom,this.attr),this.dom.__ref||(this.dom.__ref=n)},unmount:function(){var e=this.tag||this.dom,t=this.parent&&Y(this.parent);!b(this.value)&&t&&re(t.refs,this.value,e)}},bt=/<yield\b/i,_t=/<yield\s*(?:\/>|>([\S\s]*?)<\/yield\s*>|>)/gi,wt=/<yield\s+to=['"]([^'">]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Ot=/<yield\s+from=['"]?([-\w]+)['"]?\s*(?:\/>|>([\S\s]*?)<\/yield\s*>)/gi,jt={tr:"tbody",th:"tr",td:"tr",col:"colgroup"},Et=tt&&tt<10?/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?|opt(?:ion|group))$/:/^(?:t(?:body|head|foot|[rhd])|caption|col(?:group)?)$/,Nt="div",Ct="svg",St={},At=St[Le]={},Tt=0,kt=Object.freeze({Tag:H,tag:U,tag2:V,mount:B,mixin:q,update:D,unregister:Z,version:"v3.8.1"}),Lt=Object.freeze({getTag:J,moveChildTag:Q,initChildTag:X,getImmediateCustomParentTag:Y,unmountAll:ee,getTagName:te,arrayishAdd:ne,arrayishRemove:re,mountTo:ie,makeReplaceVirtual:oe,makeVirtual:se,inheritParentProps:ae,moveVirtual:ue,selectTags:ce}),It=vt,Rt={tmpl:ft,brackets:lt,styleManager:ut,vdom:Ae,styleNode:ut.styleNode,dom:nt,check:dt,misc:mt,tags:Lt},Mt=H,Pt=U,$t=V,Ft=B,zt=q,Ht=D,Ut=Z,Vt=pt,Bt=T({},kt,{observable:pt,settings:It,util:Rt}),qt=Object.freeze({settings:It,util:Rt,Tag:Mt,tag:Pt,tag2:$t,mount:Ft,mixin:zt,update:Ht,unregister:Ut,version:"v3.8.1",observable:Vt,default:Bt}),Dt=function(e){function t(t){var n=e[t];if(n)return n;throw new Error('Parser "'+t+'" not loaded.')}function n(e,t){if(t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function r(e,r,i,o){return i=n({pretty:!0,filename:o,doctype:"html"},i),t(e).render(r,i)}var i={};return i.html={jade:function(e,t,n){return console.log('DEPRECATION WARNING: jade was renamed "pug" - The jade parser will be removed in riot@3.0.0!'),r("jade",e,t,n)},pug:function(e,t,n){return r("pug",e,t,n)}},i.css={less:function(e,r,i,o){var s;return i=n({sync:!0,syncImport:!0,filename:o},i),t("less").render(r,i,function(e,t){if(e)throw e;s=t.css}),s}},i.js={es6:function(e,r,i){return t("Babel").transform(e,n({plugins:[["transform-es2015-template-literals",{loose:!0}],"transform-es2015-literals","transform-es2015-function-name","transform-es2015-arrow-functions","transform-es2015-block-scoped-functions",["transform-es2015-classes",{loose:!0}],"transform-es2015-object-super","transform-es2015-shorthand-properties","transform-es2015-duplicate-keys",["transform-es2015-computed-properties",{loose:!0}],["transform-es2015-for-of",{loose:!0}],"transform-es2015-sticky-regex","transform-es2015-unicode-regex","check-es2015-constants",["transform-es2015-spread",{loose:!0}],"transform-es2015-parameters",["transform-es2015-destructuring",{loose:!0}],"transform-es2015-block-scoping","transform-es2015-typeof-symbol",["transform-es2015-modules-commonjs",{allowTopLevelThis:!0}],["transform-regenerator",{async:!1,asyncGenerators:!1}]]},r)).code},buble:function(e,r,i){return r=n({source:i,modules:!1},r),t("buble").transform(e,r).code},coffee:function(e,r){return t("CoffeeScript").compile(e,n({bare:!0},r))},livescript:function(e,r){return t("livescript").compile(e,n({bare:!0,header:!1},r))},typescript:function(e,n){return t("typescript")(e,n)},none:function(e){return e}},i.js.javascript=i.js.none,i.js.coffeescript=i.js.coffee,i._req=function(e){var t=e.split(".");if(2!==t.length)throw new Error("Bad format for parsers._req");var n=i[t[0]][t[1]];if(n)return n;throw new Error('Parser "'+e+'" not found.')},i.utils={extend:n},i}(window||global),Zt=/'[^'\n\r\\]*(?:\\(?:\r\n?|[\S\s])[^'\n\r\\]*)*'/.source,Gt=[/\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//.source,"//.*",Zt,Zt.replace(/'/g,'"'),"([/`])"].join("|"),Kt=Gt.slice(0,-2)+"{}])",Wt=Dt.utils.extend,Jt=/"[^"\n\\]*(?:\\[\S\s][^"\n\\]*)*"|'[^'\n\\]*(?:\\[\S\s][^'\n\\]*)*'/.source,Qt=lt.R_STRINGS.source,Xt=/ *([-\w:\xA0-\xFF]+) ?(?:= ?('[^']*'|"[^"]*"|\S+))?/g,Yt=RegExp(/<!--(?!>)[\S\s]*?-->/.source+"|"+Jt,"g"),en=/<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^"'/>]*(?:(?:"[^"]*"|'[^']*'|\/[^>])[^'"/>]*)*)|\s*)(\/?)>/g,tn=/>[ \t]+<(-?[A-Za-z]|\/[-A-Za-z])/g,nn=["style","src","d","value"],rn=/^(?:input|img|br|wbr|hr|area|base|col|embed|keygen|link|meta|param|source|track)$/,on=/<pre(?:\s+(?:[^">]*|"[^"]*")*)?>([\S\s]+?)<\/pre\s*>/gi,sn=/^"(?:number|date(?:time)?|time|month|email|color)\b/i,an=/^\s*import(?!\w)(?:(?:\s|[^\s'"])*)['|"].*\n?/gm,un=/[ \t]+$/gm,cn=le(/@#\d/,"x01"),ln=le(/@#(\d+)/g,"x01"),fn="#",pn="⁗",dn='"',hn="'",gn=/^[ \t]*(((?:async|\*)\s*)?([$_A-Za-z][$\w]*))\s*\([^()]*\)\s*{/m,mn=RegExp("([{}]|^)[; ]*((?:[^@ ;{}][^{}]*)?[^@ ;{}:] ?)(?={)|"+Jt,"g"),vn=/\stype\s*=\s*(?:(['"])(.+?)\1|(\S+))/i,xn="\\s*=\\s*("+Qt+"|{[^}]+}|\\S+)",yn=/\/>\n|^<(?:\/?-?[A-Za-z][-\w\xA0-\xFF]*\s*|-?[A-Za-z][-\w\xA0-\xFF]*\s+[-\w:\xA0-\xFF][\S\s]*?)>\n/,bn=RegExp(/^([ \t]*)<(-?[A-Za-z][-\w\xA0-\xFF]*)(?:\s+([^'"/>]+(?:(?:@|\/[^>])[^'"/>]*)*)|\s*)?(?:\/>|>[ \t]*\n?([\S\s]*)^\1<\/\2\s*>|>(.*)<\/\2\s*>)/.source.replace("@",Qt),"gim"),_n=/<script(\s+[^>]*)?>\n?([\S\s]*?)<\/script\s*>/gi,wn=/<style(\s+[^>]*)?>\n?([\S\s]*?)<\/style\s*>/gi,On={compile:function(e,t,n){var r,i=[],o=e;t||(t={}),t.parserOptions=Wt({template:{},js:{},style:{}},t.parserOptions||{}),r=t.exclude?function(e){return t.exclude.indexOf(e)<0}:function(){return 1},n||(n="");var s=lt.array(t.brackets);return t.template&&(o=function(e,t,n,r){return Dt._req("html."+n,!0)(e,r,t)}(o,n,t.template,t.parserOptions.template)),o=pe(o).replace(bn,function(e,o,a,u,c,l){var f="",p="",d="",h="",g=[];if(g._bp=s,a=a.toLowerCase(),u=u&&r("attribs")?ge(de(he(u,t,g),g),g):"",(c||(c=l))&&/\S/.test(c))if(l)r("html")&&(d=me(l,t,g));else{var m=function(e){if(/<[-\w]/.test(e))for(var t,n=e.lastIndexOf("<"),r=e.length;-1!==n;){if(t=e.slice(n,r).match(yn))return n+=t.index+t[0].length,"<-/>\n"===(t=e.slice(0,n)).slice(-5)&&(t=t.slice(0,-5)),[t,e.slice(n)];r=n,n=e.lastIndexOf("<",n-1)}return["",e]}((c=(c=(c=c.replace(RegExp("^"+o,"gm"),"")).replace(_n,function(e,i,o){if(r("js")){var s=function(e,t,n,r){var i=_e(n),o=we(n,"src"),s=Wt({},t.parserOptions.js);return!o&&xe(e,t,i,Wt(s,Oe(n)),r)}(o,t,i,n);s&&(f+=(f?"\n":"")+s)}return""})).replace(wn,function(e,i,o){return r("css")&&(p+=(p?" ":"")+function(e,t,n,r,i){var o=Wt({},t.parserOptions.style),s={parserOpts:Wt(o,Oe(n)),url:r};return ye(e,i,_e(n)||t.style,s)}(o,t,i,n,a)),""})).replace(un,""));r("html")&&(d=me(m[0],t,g)),r("js")&&((c=xe(m[1],t,null,null,n))&&(f+=(f?"\n":"")+c),f=f.replace(an,function(e){return h+=e.trim()+"\n",""}))}return f=/\S/.test(f)?f.replace(/\n{3,}/g,"\n\n"):"",t.entities?(i.push({tagName:a,html:d,css:p,attribs:u,js:f,imports:h}),""):function(e,t,n,r,i,o,s){var a=s.debug?",\n ":", ",u="});";return i&&"\n"!==i.slice(-1)&&(u="\n"+u),o+"riot.tag2('"+e+hn+a+be(t,1)+a+be(n)+a+be(r)+", function(opts) {\n"+i+u}(a,d,p,u,f,h,t)}),t.entities?i:o},compileHTML:function(e,t,n){return Array.isArray(t)?(n=t,t={}):(n||(n=[]),t||(t={})),n._bp=lt.array(t.brackets),me(pe(e),t,n)},compileCSS:function(e,t,n){return t&&"object"==typeof t?(n=t,t=""):n||(n={}),ye(e,n.tagName,t,n)},compileJS:function(e,t,n,r){return"string"==typeof t&&(r=n,n=t,t={}),n&&"object"==typeof n&&(r=n,n=""),r||(r={}),xe(e,t||{},n,r.parserOptions,r.url)},parsers:Dt,version:"v3.4.0"},jn=On.parsers;Ne.error=function(e){throw new Error(e)};return T({},qt,{mount:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var n;return Ne(function(){n=Ft.apply(qt,e)}),n},compile:Ne,parsers:jn})});