/* 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(''+t+"","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;rr;)(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()+""}),!t.whitespace){var r=[];/]/.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(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/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*=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&&a2||r[0]){var a,u,c=[];for(a=u=0;a %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|>([\S\s]*?)<\/yield\s*>|>)/gi,wt=/]*)['"]\s*>([\S\s]*?)<\/yield\s*>/gi,Ot=/|>([\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(//.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=/]*|"[^"]*")*)?>([\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=/]*)?>\n?([\S\s]*?)<\/script\s*>/gi,wn=/]*)?>\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})});