HEX
Server: Apache
System: Linux webd004.cluster130.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User: frenchy (106757)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/frenchy/www/french-american.org/releases/20210303111656Z/node_modules/twig/twig.min.js
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Twig=t():e.Twig=t()}(window,function(){return n={},o.m=r=[function(e,t,r){"use strict";e.exports=function(){function g(e,t,r,n){r||(r=" ");var o=e.length>=t?"":new Array(1+t-e.length>>>0).join(r);return n?e+o:o+e}function m(e,t,r,n,o){var i=n-e.length;return 0<i&&(e=r||"0"!==o?g(e,n,o,r):[e.slice(0,t.length),g("",i,"0",!0),e.slice(t.length)].join("")),e}function x(e,t,r,n,o,i){return e=g((e>>>0).toString(t),o||0,"0",!1),m(e,"",r,n,i)}function b(e,t,r,n,o){return null!=n&&(e=e.slice(0,n)),m(e,"",t,r,o)}var v=arguments,w=0,e=v[w++];try{return e.replace(/%%|%(?:(\d+)\$)?((?:[-+#0 ]|'[\s\S])*)(\d+)?(?:\.(\d*))?([\s\S])/g,function(e,t,r,n,o,i){var s,a,p,c,l;if("%%"===e)return"%";var u,f,h=" ",y=!1,d="";for(u=0,f=r.length;u<f;u++)switch(r.charAt(u)){case" ":case"0":h=r.charAt(u);break;case"+":d="+";break;case"-":y=!0;break;case"'":u+1<f&&(h=r.charAt(u+1),u++)}if(n=n?+n:0,!isFinite(n))throw new Error("Width must be finite");if(o=o?+o:"d"===i?0:-1<"fFeE".indexOf(i)?6:void 0,t&&0==+t)throw new Error("Argument number must be greater than zero");if(t&&+t>=v.length)throw new Error("Too few arguments");switch(l=t?v[+t]:v[w++],i){case"%":return"%";case"s":return b(l+"",y,n,o,h);case"c":return b(String.fromCharCode(+l),y,n,o,h);case"b":return x(l,2,y,n,o,h);case"o":return x(l,8,y,n,o,h);case"x":return x(l,16,y,n,o,h);case"X":return x(l,16,y,n,o,h).toUpperCase();case"u":return x(l,10,y,n,o,h);case"i":case"d":return s=+l||0,l=(a=(s=Math.round(s-s%1))<0?"-":d)+g(String(Math.abs(s)),o,"0",!1),y&&"0"===h&&(h=" "),m(l,a,y,n,h);case"e":case"E":case"f":case"F":case"g":case"G":return a=(s=+l)<0?"-":d,p=["toExponential","toFixed","toPrecision"]["efg".indexOf(i.toLowerCase())],c=["toString","toUpperCase"]["eEfFgG".indexOf(i)%2],l=a+Math.abs(s)[p](o),m(l,a,y,n,h)[c]();default:return""}})}catch(e){return!1}}},function(e,c,t){(function(o){function i(e,t){for(var r=0,n=e.length-1;0<=n;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function s(e){return t.exec(e).slice(1)}var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;function a(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}c.resolve=function(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){var n=0<=r?arguments[r]:o.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return(t?"/":"")+(e=i(a(e.split("/"),function(e){return!!e}),!t).join("/"))||"."},c.normalize=function(e){var t=c.isAbsolute(e),r="/"===n(e,-1);return(e=i(a(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},c.isAbsolute=function(e){return"/"===e.charAt(0)},c.join=function(){var e=Array.prototype.slice.call(arguments,0);return c.normalize(a(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},c.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;0<=r&&""===e[r];r--);return r<t?[]:e.slice(t,r-t+1)}e=c.resolve(e).substr(1),t=c.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),s=i,a=0;a<i;a++)if(n[a]!==o[a]){s=a;break}var p=[];for(a=s;a<n.length;a++)p.push("..");return(p=p.concat(o.slice(s))).join("/")},c.sep="/",c.delimiter=":",c.dirname=function(e){var t=s(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},c.basename=function(e,t){var r=s(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},c.extname=function(e){return s(e)[3]};var n="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,t(23))},function(e,t,r){
/**
 * Twig.js
 *
 * @copyright 2011-2016 John Roepke and the Twig.js Contributors
 * @license   Available under the BSD 2-Clause License
 * @link      https://github.com/twigjs/twig.js
 */
e.exports=r(3)()},function(e,t,r){e.exports=function e(){var t={VERSION:"1.13.3"};return r(4)(t),r(5)(t),r(6)(t),r(8)(t),r(9)(t),r(10)(t),r(20)(t),r(21)(t),r(24)(t),r(25)(t),r(26)(t),r(27)(t),r(28)(t),r(29)(t),r(30)(t),t.exports.factory=e,t.exports}},function(e,t){e.exports=function(b){"use strict";function u(e,t){if(e.options.rethrow)throw"string"==typeof t&&(t=new b.Error(t)),"TwigException"!=t.type||t.file||(t.file=e.id),t;if(b.log.error("Error parsing twig template "+e.id+": "),t.stack?b.log.error(t.stack):b.log.error(t.toString()),b.debug)return t.toString()}return b.trace=!1,b.debug=!1,b.cache=!0,b.noop=function(){},b.placeholders={parent:"{{|PARENT|}}"},b.hasIndexOf=Array.prototype.hasOwnProperty("indexOf"),b.indexOf=function(e,t){if(b.hasIndexOf)return e.indexOf(t);if(null==e)throw new TypeError;var r=Object(e),n=r.length>>>0;if(0==n)return-1;var o=0;if(0<arguments.length&&((o=Number(t))!=o?o=0:0!==o&&o!==1/0&&o!==-1/0&&(o=(0<o||-1)*Math.floor(Math.abs(o)))),n<=o)return-1;for(var i=0<=o?o:Math.max(n-Math.abs(o),0);i<n;i++)if(i in r&&r[i]===t)return i;return e==t?0:-1},b.forEach=function(e,t,r){if(Array.prototype.forEach)return e.forEach(t,r);var n,o;if(null==e)throw new TypeError(" this is null or not defined");var i=Object(e),s=i.length>>>0;if("[object Function]"!={}.toString.call(t))throw new TypeError(t+" is not a function");for(r&&(n=r),o=0;o<s;){var a;o in i&&(a=i[o],t.call(n,a,o,i)),o++}},b.merge=function(t,r,n){return b.forEach(Object.keys(r),function(e){(!n||e in t)&&(t[e]=r[e])}),t},b.attempt=function(e,t){try{return e()}catch(e){return t(e)}},b.Error=function(e,t){this.message=e,this.name="TwigException",this.type="TwigException",this.file=t},b.Error.prototype.toString=function(){return this.name+": "+this.message},b.log={trace:function(){b.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){b.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},"undefined"!=typeof console?void 0!==console.error?b.log.error=function(){console.error.apply(console,arguments)}:void 0!==console.log&&(b.log.error=function(){console.log.apply(console,arguments)}):b.log.error=function(){},b.ChildContext=function(e){return b.lib.copy(e)},b.token={},b.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw",output_whitespace_pre:"output_whitespace_pre",output_whitespace_post:"output_whitespace_post",output_whitespace_both:"output_whitespace_both",logic_whitespace_pre:"logic_whitespace_pre",logic_whitespace_post:"logic_whitespace_post",logic_whitespace_both:"logic_whitespace_both"},b.token.definitions=[{type:b.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:b.token.type.raw,open:"{% verbatim %}",close:"{% endverbatim %}"},{type:b.token.type.output_whitespace_pre,open:"{{-",close:"}}"},{type:b.token.type.output_whitespace_post,open:"{{",close:"-}}"},{type:b.token.type.output_whitespace_both,open:"{{-",close:"-}}"},{type:b.token.type.logic_whitespace_pre,open:"{%-",close:"%}"},{type:b.token.type.logic_whitespace_post,open:"{%",close:"-%}"},{type:b.token.type.logic_whitespace_both,open:"{%-",close:"-%}"},{type:b.token.type.output,open:"{{",close:"}}"},{type:b.token.type.logic,open:"{%",close:"%}"},{type:b.token.type.comment,open:"{#",close:"#}"}],b.token.strings=['"',"'"],b.token.findStart=function(e){var t,r,n,o,i={position:null,def:null},s=null,a=b.token.definitions.length;for(t=0;t<a;t++)r=b.token.definitions[t],n=e.indexOf(r.open),o=e.indexOf(r.close),b.log.trace("Twig.token.findStart: ","Searching for ",r.open," found at ",n),0<=n&&r.open.length!==r.close.length&&o<0||(0<=n&&(null===i.position||n<i.position)?(i.position=n,i.def=r,s=o):0<=n&&null!==i.position&&n===i.position&&(r.open.length>i.def.open.length?(i.position=n,i.def=r,s=o):r.open.length===i.def.open.length&&(r.close.length,i.def.close.length,0<=o&&o<s&&(i.position=n,i.def=r,s=o))));return i},b.token.findEnd=function(e,t,r){for(var n,o,i=null,s=!1,a=0,p=null,c=null,l=null,u=null,f=null,h=null;!s;){if(c=p=null,!(0<=(l=e.indexOf(t.close,a))))throw new b.Error("Unable to find closing bracket '"+t.close+"' opened near template position "+r);if(i=l,s=!0,t.type===b.token.type.comment)break;if(t.type===b.token.type.raw)break;for(o=b.token.strings.length,n=0;n<o;n+=1)0<(f=e.indexOf(b.token.strings[n],a))&&f<l&&(null===p||f<p)&&(p=f,c=b.token.strings[n]);if(null!==p)for(u=p+1,i=null,s=!1;;){if((h=e.indexOf(c,u))<0)throw"Unclosed string in template";if("\\"!==e.substr(h-1,1)){a=h+1;break}u=h+1}}return i},b.tokenize=function(e){for(var t=[],r=0,n=null,o=null;0<e.length;)if(n=b.token.findStart(e),b.log.trace("Twig.tokenize: ","Found token: ",n),null!==n.position){if(0<n.position&&t.push({type:b.token.type.raw,value:e.substring(0,n.position)}),e=e.substr(n.position+n.def.open.length),r+=n.position+n.def.open.length,o=b.token.findEnd(e,n.def,r),b.log.trace("Twig.tokenize: ","Token ends at ",o),t.push({type:n.def.type,value:e.substring(0,o).trim()}),"\n"===e.substr(o+n.def.close.length,1))switch(n.def.type){case"logic_whitespace_pre":case"logic_whitespace_post":case"logic_whitespace_both":case"logic":o+=1}e=e.substr(o+n.def.close.length),r+=o+n.def.close.length}else t.push({type:b.token.type.raw,value:e}),e="";return t},b.compile=function(m){var x=this;return b.attempt(function(){for(var t=[],r=[],n=[],e=null,o=null,i=null,s=null,a=null,p=null,c=null,l=null,u=null,f=null,h=null,y=null,d=function(e){b.expression.compile.call(x,e),0<r.length?n.push(e):t.push(e)},g=function(e){if(o=b.logic.compile.call(x,e),f=o.type,h=b.logic.handler[f].open,y=b.logic.handler[f].next,b.log.trace("Twig.compile: ","Compiled logic token to ",o," next is: ",y," open is : ",h),void 0!==h&&!h){if(s=r.pop(),c=b.logic.handler[s.type],b.indexOf(c.next,f)<0)throw new Error(f+" not expected after a "+s.type);s.output=s.output||[],s.output=s.output.concat(n),n=[],u={type:b.token.type.logic,token:s},0<r.length?n.push(u):t.push(u)}void 0!==y&&0<y.length?(b.log.trace("Twig.compile: ","Pushing ",o," to logic stack."),0<r.length&&((s=r.pop()).output=s.output||[],s.output=s.output.concat(n),r.push(s),n=[]),r.push(o)):void 0!==h&&h&&(u={type:b.token.type.logic,token:o},0<r.length?n.push(u):t.push(u))};0<m.length;){switch(e=m.shift(),a=t[t.length-1],p=n[n.length-1],l=m[0],b.log.trace("Compiling token ",e),e.type){case b.token.type.raw:0<r.length?n.push(e):t.push(e);break;case b.token.type.logic:g.call(x,e);break;case b.token.type.comment:break;case b.token.type.output:d.call(x,e);break;case b.token.type.logic_whitespace_pre:case b.token.type.logic_whitespace_post:case b.token.type.logic_whitespace_both:case b.token.type.output_whitespace_pre:case b.token.type.output_whitespace_post:case b.token.type.output_whitespace_both:switch(e.type!==b.token.type.output_whitespace_post&&e.type!==b.token.type.logic_whitespace_post&&(a&&a.type===b.token.type.raw&&(t.pop(),null===a.value.match(/^\s*$/)&&(a.value=a.value.trim(),t.push(a))),p&&p.type===b.token.type.raw&&(n.pop(),null===p.value.match(/^\s*$/)&&(p.value=p.value.trim(),n.push(p)))),e.type){case b.token.type.output_whitespace_pre:case b.token.type.output_whitespace_post:case b.token.type.output_whitespace_both:d.call(x,e);break;case b.token.type.logic_whitespace_pre:case b.token.type.logic_whitespace_post:case b.token.type.logic_whitespace_both:g.call(x,e)}e.type!==b.token.type.output_whitespace_pre&&e.type!==b.token.type.logic_whitespace_pre&&l&&l.type===b.token.type.raw&&(m.shift(),null===l.value.match(/^\s*$/)&&(l.value=l.value.trim(),m.unshift(l)))}b.log.trace("Twig.compile: "," Output: ",t," Logic Stack: ",r," Pending Output: ",n)}if(0<r.length)throw i=r.pop(),new Error("Unable to find an end tag for "+i.type+", expecting one of "+i.next);return t},function(e){if(x.options.rethrow)throw"TwigException"!=e.type||e.file||(e.file=x.id),e;b.log.error("Error compiling twig template "+x.id+": "),e.stack?b.log.error(e.stack):b.log.error(e.toString())})},b.parse=function(e,t,r){var n,o=this,i=[],s=null,a=!0,p=!0;function c(e){i.push(e)}function l(e){void 0!==e.chain&&(p=e.chain),void 0!==e.context&&(t=e.context),void 0!==e.output&&i.push(e.output)}if(n=b.async.forEach(e,function(e){switch(b.log.debug("Twig.parse: ","Parsing token: ",e),e.type){case b.token.type.raw:i.push(b.filters.raw(e.value));break;case b.token.type.logic:return b.logic.parseAsync.call(o,e.token,t,p).then(l);case b.token.type.comment:break;case b.token.type.output_whitespace_pre:case b.token.type.output_whitespace_post:case b.token.type.output_whitespace_both:case b.token.type.output:return b.log.debug("Twig.parse: ","Output token: ",e.stack),b.expression.parseAsync.call(o,e.stack,t).then(c)}}).then(function(){return i=b.output.call(o,i),a=!1,i}).catch(function(e){r&&u(o,e),s=e}),r)return n;if(null!==s)return u(this,s);if(a)throw new b.Error("You are using Twig.js in sync mode in combination with async extensions.");return i},b.prepare=function(e){var t,r;return b.log.debug("Twig.prepare: ","Tokenizing ",e),r=b.tokenize.call(this,e),b.log.debug("Twig.prepare: ","Compiling ",r),t=b.compile.call(this,r),b.log.debug("Twig.prepare: ","Compiled ",t),t},b.output=function(e){var t=this.options.autoescape;if(!t)return e.join("");var r="string"==typeof t?t:"html",n=0,o=e.length,i="",s=new Array(o);for(n=0;n<o;n++)!(i=e[n])||!0===i.twig_markup||i.twig_markup===r||"html"===r&&"html_attr"===i.twig_markup||(i=b.filters.escape(i,[r])),s[n]=i;return s.length<1?"":b.Markup(s.join(""),!0)},b.Templates={loaders:{},parsers:{},registry:{}},b.validateId=function(e){if("prototype"===e)throw new b.Error(e+" is not a valid twig identifier");if(b.cache&&b.Templates.registry.hasOwnProperty(e))throw new b.Error("There is already a template with the ID "+e);return!0},b.Templates.registerLoader=function(e,t,r){if("function"!=typeof t)throw new b.Error("Unable to add loader for "+e+": Invalid function reference given.");r&&(t=t.bind(r)),this.loaders[e]=t},b.Templates.unRegisterLoader=function(e){this.isRegisteredLoader(e)&&delete this.loaders[e]},b.Templates.isRegisteredLoader=function(e){return this.loaders.hasOwnProperty(e)},b.Templates.registerParser=function(e,t,r){if("function"!=typeof t)throw new b.Error("Unable to add parser for "+e+": Invalid function regerence given.");r&&(t=t.bind(r)),this.parsers[e]=t},b.Templates.unRegisterParser=function(e){this.isRegisteredParser(e)&&delete this.parsers[e]},b.Templates.isRegisteredParser=function(e){return this.parsers.hasOwnProperty(e)},b.Templates.save=function(e){if(void 0===e.id)throw new b.Error("Unable to save template with no id");b.Templates.registry[e.id]=e},b.Templates.load=function(e){return b.Templates.registry.hasOwnProperty(e)?b.Templates.registry[e]:null},b.Templates.loadRemote=function(e,t,r,n){var o=void 0===t.id?e:t.id,i=b.Templates.registry[o];return b.cache&&void 0!==i?("function"==typeof r&&r(i),i):(t.parser=t.parser||"twig",t.id=o,void 0===t.async&&(t.async=!0),(this.loaders[t.method]||this.loaders.fs).call(this,e,t,r,n))},b.Template=function(e){var t=e.data,r=e.id,n=e.blocks,o=e.macros||{},i=e.base,s=e.path,a=e.url,p=e.name,c=e.method,l=e.options;this.id=r,this.method=c,this.base=i,this.path=s,this.url=a,this.name=p,this.macros=o,this.options=l,this.reset(n),!function(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&r===e}("String",t)?this.tokens=t:this.tokens=b.prepare.call(this,t),void 0!==r&&b.Templates.save(this)},b.Template.prototype.reset=function(e){b.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.importedBlocks=[],this.originalBlockTokens={},this.child={blocks:e||{}},this.extend=null,this.parseStack=[]},b.Template.prototype.render=function(e,n,t){var o=this;return this.context=e||{},this.reset(),n&&n.blocks&&(this.blocks=n.blocks),n&&n.macros&&(this.macros=n.macros),b.async.potentiallyAsync(this,t,function(){return b.parseAsync.call(this,this.tokens,this.context).then(function(e){var t,r;return o.extend?(o.options.allowInlineIncludes&&(t=b.Templates.load(o.extend))&&(t.options=o.options),t||(r=b.path.parsePath(o,o.extend),t=b.Templates.loadRemote(r,{method:o.getLoaderMethod(),base:o.base,async:!1,id:r,options:o.options})),o.parent=t,o.parent.renderAsync(o.context,{blocks:o.blocks,isInclude:!0})):n?"blocks"==n.output?o.blocks:"macros"==n.output?o.macros:!0===n.isInclude?e:e.valueOf():e.valueOf()})})},b.Template.prototype.importFile=function(e){var t,r;if(this.url||!this.options.allowInlineIncludes)return t=b.path.parsePath(this,e),r=b.Templates.loadRemote(t,{method:this.getLoaderMethod(),base:this.base,async:!1,options:this.options,id:t});if(e=this.path?b.path.parsePath(this,e):e,!(r=b.Templates.load(e))&&!(r=b.Templates.loadRemote(t,{id:e,method:this.getLoaderMethod(),async:!1,path:e,options:this.options})))throw new b.Error("Unable to find the template "+e);return r.options=this.options,r},b.Template.prototype.importBlocks=function(e,t){var r=this.importFile(e),n=this.context,o=this;t=t||!1,r.render(n),b.forEach(Object.keys(r.blocks),function(e){!t&&void 0!==o.blocks[e]||(o.blocks[e]=r.blocks[e],o.importedBlocks.push(e))})},b.Template.prototype.importMacros=function(e){var t=b.path.parsePath(this,e);return b.Templates.loadRemote(t,{method:this.getLoaderMethod(),async:!1,id:t})},b.Template.prototype.getLoaderMethod=function(){return this.path?"fs":this.url?"ajax":this.method||"fs"},b.Template.prototype.compile=function(e){return b.compiler.compile(this,e)},b.Markup=function(e,t){if("string"!=typeof e||e.length<1)return e;var r=new String(e);return r.twig_markup=void 0===t||t,r},b}},function(e,t){e.exports=function(i){return i.compiler={module:{}},i.compiler.compile=function(e,t){var r,n=JSON.stringify(e.tokens),o=e.id;if(t.module){if(void 0===i.compiler.module[t.module])throw new i.Error("Unable to find module type "+t.module);r=i.compiler.module[t.module](o,n,t.twig)}else r=i.compiler.wrap(o,n);return r},i.compiler.module={amd:function(e,t,r){return'define(["'+r+'"], function (Twig) {\n\tvar twig, templates;\ntwig = Twig.twig;\ntemplates = '+i.compiler.wrap(e,t)+"\n\treturn templates;\n});"},node:function(e,t){return'var twig = require("twig").twig;\nexports.template = '+i.compiler.wrap(e,t)},cjs2:function(e,t,r){return'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n\tvar twig = require("twig").twig;\n\texports.template = '+i.compiler.wrap(e,t)+"\n});"}},i.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},i}},function(e,t,r){e.exports=function(u){"use strict";function c(e,t,r){return t?u.expression.parseAsync.call(e,t,r):u.Promise.resolve(!1)}for(u.expression={},r(7)(u),u.expression.reservedWords=["true","false","null","TRUE","FALSE","NULL","_context","and","b-and","or","b-or","b-xor","in","not in","if","matches","starts","ends","with"],u.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",slice:"Twig.expression.type.slice",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},subexpression:{start:"Twig.expression.type.subexpression.start",end:"Twig.expression.type.subexpression.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},u.expression.set={operations:[u.expression.type.filter,u.expression.type.operator.unary,u.expression.type.operator.binary,u.expression.type.array.end,u.expression.type.object.end,u.expression.type.parameter.end,u.expression.type.subexpression.end,u.expression.type.comma,u.expression.type.test],expressions:[u.expression.type._function,u.expression.type.bool,u.expression.type.string,u.expression.type.variable,u.expression.type.number,u.expression.type._null,u.expression.type.context,u.expression.type.parameter.start,u.expression.type.array.start,u.expression.type.object.start,u.expression.type.subexpression.start,u.expression.type.operator.unary]},u.expression.set.operations_extended=u.expression.set.operations.concat([u.expression.type.key.period,u.expression.type.key.brackets,u.expression.type.slice]),u.expression.fn={compile:{push:function(e,t,r){r.push(e)},push_both:function(e,t,r){r.push(e),t.push(e)}},parse:{push:function(e,t,r){t.push(e)},push_value:function(e,t,r){t.push(e.value)}}},u.expression.definitions=[{type:u.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*(\s?as)?)/,next:u.expression.set.operations.concat([u.expression.type.parameter.start]),compile:function(e,t,r){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,r.push(e)},parse:function(r,n,e){var o=n.pop();return c(this,r.params,e).then(function(e){var t=u.test(r.filter,o,e);"not"==r.modifier?n.push(!t):n.push(t)})}},{type:u.expression.type.comma,regex:/^,/,next:u.expression.set.expressions.concat([u.expression.type.array.end,u.expression.type.object.end]),compile:function(e,t,r){var n,o=t.length-1;for(delete e.match,delete e.value;0<=o;o--){if((n=t.pop()).type===u.expression.type.object.start||n.type===u.expression.type.parameter.start||n.type===u.expression.type.array.start){t.push(n);break}r.push(n)}r.push(e)}},{type:u.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:u.expression.set.operations,compile:function(e,t,r){e.value=Number(e.value),r.push(e)},parse:u.expression.fn.parse.push_value},{type:u.expression.type.operator.binary,regex:/(^\?\?|^\?\:|^(b\-and)|^(b\-or)|^(b\-xor)|^[\+\-~%\?]|^[\:](?!\d\])|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^(and)[\(|\s+]|^(or)[\(|\s+]|^(in)[\(|\s+]|^(not in)[\(|\s+]|^(matches)|^(starts with)|^(ends with)|^\.\.)/,next:u.expression.set.expressions,transform:function(e,t){switch(e[0]){case"and(":case"or(":case"in(":case"not in(":return t[t.length-1].value=e[2],e[0];default:return""}},compile:function(e,t,r){delete e.match,e.value=e.value.trim();var n=e.value,o=u.expression.operator.lookup(n,e);for(u.log.trace("Twig.expression.compile: ","Operator: ",o," from ",n);0<t.length&&(t[t.length-1].type==u.expression.type.operator.unary||t[t.length-1].type==u.expression.type.operator.binary)&&(o.associativity===u.expression.operator.leftToRight&&o.precidence>=t[t.length-1].precidence||o.associativity===u.expression.operator.rightToLeft&&o.precidence>t[t.length-1].precidence);){var i=t.pop();r.push(i)}if(":"===n){if(!t[t.length-1]||"?"!==t[t.length-1].value){var s=r.pop();if(s.type===u.expression.type.string||s.type===u.expression.type.variable)e.key=s.value;else if(s.type===u.expression.type.number)e.key=s.value.toString();else{if(!s.expression||s.type!==u.expression.type.parameter.end&&s.type!=u.expression.type.subexpression.end)throw new u.Error("Unexpected value before ':' of "+s.type+" = "+s.value);e.params=s.params}return void r.push(e)}}else t.push(o)},parse:function(t,r,n){if(t.key)r.push(t);else{if(t.params)return u.expression.parseAsync.call(this,t.params,n).then(function(e){t.key=e,r.push(t),n.loop||delete t.params});u.expression.operator.parse(t.value,r)}}},{type:u.expression.type.operator.unary,regex:/(^not\s+)/,next:u.expression.set.expressions,compile:function(e,t,r){delete e.match,e.value=e.value.trim();var n=e.value,o=u.expression.operator.lookup(n,e);for(u.log.trace("Twig.expression.compile: ","Operator: ",o," from ",n);0<t.length&&(t[t.length-1].type==u.expression.type.operator.unary||t[t.length-1].type==u.expression.type.operator.binary)&&(o.associativity===u.expression.operator.leftToRight&&o.precidence>=t[t.length-1].precidence||o.associativity===u.expression.operator.rightToLeft&&o.precidence>t[t.length-1].precidence);){var i=t.pop();r.push(i)}t.push(o)},parse:function(e,t,r){u.expression.operator.parse(e.value,t)}},{type:u.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2[\s\S])*?\1/,next:u.expression.set.operations_extended,compile:function(e,t,r){var n=e.value;delete e.match,n='"'===n.substring(0,1)?n.replace('\\"','"'):n.replace("\\'","'"),e.value=n.substring(1,n.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),u.log.trace("Twig.expression.compile: ","String value: ",e.value),r.push(e)},parse:u.expression.fn.parse.push_value},{type:u.expression.type.subexpression.start,regex:/^\(/,next:u.expression.set.expressions.concat([u.expression.type.subexpression.end]),compile:function(e,t,r){e.value="(",r.push(e),t.push(e)},parse:u.expression.fn.parse.push},{type:u.expression.type.subexpression.end,regex:/^\)/,next:u.expression.set.operations_extended,validate:function(e,t){for(var r=t.length-1,n=!1,o=!1,i=0;!n&&0<=r;){var s=t[r];(n=s.type===u.expression.type.subexpression.start)&&o&&(n=o=!1),s.type===u.expression.type.parameter.start?i++:s.type===u.expression.type.parameter.end?i--:s.type===u.expression.type.subexpression.end&&(o=!0),r--}return n&&0===i},compile:function(e,t,r){var n,o=e;for(n=t.pop();0<t.length&&n.type!=u.expression.type.subexpression.start;)r.push(n),n=t.pop();for(var i=[];e.type!==u.expression.type.subexpression.start;)i.unshift(e),e=r.pop();i.unshift(e);void 0===(n=t[t.length-1])||n.type!==u.expression.type._function&&n.type!==u.expression.type.filter&&n.type!==u.expression.type.test&&n.type!==u.expression.type.key.brackets?(o.expression=!0,i.pop(),i.shift(),o.params=i,r.push(o)):(o.expression=!1,n.params=i)},parse:function(e,t,r){if(e.expression)return u.expression.parseAsync.call(this,e.params,r).then(function(e){t.push(e)});throw new u.Error("Unexpected subexpression end when token is not marked as an expression")}},{type:u.expression.type.parameter.start,regex:/^\(/,next:u.expression.set.expressions.concat([u.expression.type.parameter.end]),validate:function(e,t){var r=t[t.length-1];return r&&u.indexOf(u.expression.reservedWords,r.value.trim())<0},compile:u.expression.fn.compile.push_both,parse:u.expression.fn.parse.push},{type:u.expression.type.parameter.end,regex:/^\)/,next:u.expression.set.operations_extended,compile:function(e,t,r){var n,o=e;for(n=t.pop();0<t.length&&n.type!=u.expression.type.parameter.start;)r.push(n),n=t.pop();for(var i=[];e.type!==u.expression.type.parameter.start;)i.unshift(e),e=r.pop();i.unshift(e);void 0===(e=r[r.length-1])||e.type!==u.expression.type._function&&e.type!==u.expression.type.filter&&e.type!==u.expression.type.test&&e.type!==u.expression.type.key.brackets?(o.expression=!0,i.pop(),i.shift(),o.params=i,r.push(o)):(o.expression=!1,e.params=i)},parse:function(e,t,r){var n=[],o=!1,i=null;if(e.expression)return u.expression.parseAsync.call(this,e.params,r).then(function(e){t.push(e)});for(;0<t.length;){if((i=t.pop())&&i.type&&i.type==u.expression.type.parameter.start){o=!0;break}n.unshift(i)}if(!o)throw new u.Error("Expected end of parameter set.");t.push(n)}},{type:u.expression.type.slice,regex:/^\[(\d*\:\d*)\]/,next:u.expression.set.operations_extended,compile:function(e,t,r){var n=e.match[1].split(":"),o=n[0]?parseInt(n[0]):void 0,i=n[1]?parseInt(n[1]):void 0;e.value="slice",e.params=[o,i],i||(e.params=[o]),r.push(e)},parse:function(e,t,r){var n=t.pop(),o=e.params;t.push(u.filter.call(this,e.value,n,o))}},{type:u.expression.type.array.start,regex:/^\[/,next:u.expression.set.expressions.concat([u.expression.type.array.end]),compile:u.expression.fn.compile.push_both,parse:u.expression.fn.parse.push},{type:u.expression.type.array.end,regex:/^\]/,next:u.expression.set.operations_extended,compile:function(e,t,r){for(var n,o=t.length-1;0<=o&&(n=t.pop()).type!==u.expression.type.array.start;o--)r.push(n);r.push(e)},parse:function(e,t,r){for(var n=[],o=!1,i=null;0<t.length;){if((i=t.pop()).type&&i.type==u.expression.type.array.start){o=!0;break}n.unshift(i)}if(!o)throw new u.Error("Expected end of array.");t.push(n)}},{type:u.expression.type.object.start,regex:/^\{/,next:u.expression.set.expressions.concat([u.expression.type.object.end]),compile:u.expression.fn.compile.push_both,parse:u.expression.fn.parse.push},{type:u.expression.type.object.end,regex:/^\}/,next:u.expression.set.operations_extended,compile:function(e,t,r){for(var n,o=t.length-1;0<=o&&(!(n=t.pop())||n.type!==u.expression.type.object.start);o--)r.push(n);r.push(e)},parse:function(e,t,r){for(var n={},o=!1,i=null,s=!1,a=null;0<t.length;){if((i=t.pop())&&i.type&&i.type===u.expression.type.object.start){o=!0;break}if(i&&i.type&&(i.type===u.expression.type.operator.binary||i.type===u.expression.type.operator.unary)&&i.key){if(!s)throw new u.Error("Missing value for key '"+i.key+"' in object definition.");n[i.key]=a,void 0===n._keys&&(n._keys=[]),n._keys.unshift(i.key),a=null,s=!1}else s=!0,a=i}if(!o)throw new u.Error("Unexpected end of object.");t.push(n)}},{type:u.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:u.expression.set.operations_extended.concat([u.expression.type.parameter.start]),compile:function(e,t,r){e.value=e.match[1],r.push(e)},parse:function(t,r,e){var n=this,o=r.pop();return c(this,t.params,e).then(function(e){return u.filter.call(n,t.value,o,e)}).then(function(e){r.push(e)})}},{type:u.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:u.expression.type.parameter.start,validate:function(e,t){return e[1]&&u.indexOf(u.expression.reservedWords,e[1])<0},transform:function(e,t){return"("},compile:function(e,t,r){var n=e.match[1];e.fn=n,delete e.match,delete e.value,r.push(e)},parse:function(e,t,r){var n,o=this,i=e.fn;return c(this,e.params,r).then(function(e){if(u.functions[i])n=u.functions[i].apply(o,e);else{if("function"!=typeof r[i])throw new u.Error(i+" function does not exist and is not defined in the context");n=r[i].apply(r,e)}return n}).then(function(e){t.push(e)})}},{type:u.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:u.expression.set.operations_extended.concat([u.expression.type.parameter.start]),compile:u.expression.fn.compile.push,validate:function(e,t){return u.indexOf(u.expression.reservedWords,e[0])<0},parse:function(e,t,r){return u.expression.resolveAsync.call(this,r[e.value],r).then(function(e){t.push(e)})}},{type:u.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:u.expression.set.operations_extended.concat([u.expression.type.parameter.start]),compile:function(e,t,r){e.key=e.match[1],delete e.match,delete e.value,r.push(e)},parse:function(e,t,r,n){var o,i=this,s=e.key,a=t.pop();return c(this,e.params,r).then(function(e){if(null==a){if(i.options.strict_variables)throw new u.Error("Can't access a key "+s+" on an null or undefined object.");o=void 0}else{var t=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};o="object"==typeof a&&s in a?a[s]:void 0!==a["get"+t(s)]?a["get"+t(s)]:void 0!==a["is"+t(s)]?a["is"+t(s)]:void 0}return u.expression.resolveAsync.call(i,o,r,e,n,a)}).then(function(e){t.push(e)})}},{type:u.expression.type.key.brackets,regex:/^\[([^\]\:]*)\]/,next:u.expression.set.operations_extended.concat([u.expression.type.parameter.start]),compile:function(e,t,r){var n=e.match[1];delete e.value,delete e.match,e.stack=u.expression.compile({value:n}).stack,r.push(e)},parse:function(t,r,n,o){var i,s,a=this,p=null;return c(this,t.params,n).then(function(e){return p=e,u.expression.parseAsync.call(a,t.stack,n)}).then(function(e){if(null!=(i=r.pop()))return s="object"==typeof i&&e in i?i[e]:null,u.expression.resolveAsync.call(a,s,i,p,o);if(a.options.strict_variables)throw new u.Error("Can't access a key "+e+" on an null or undefined object.");return null}).then(function(e){r.push(e)})}},{type:u.expression.type._null,regex:/^(null|NULL|none|NONE)/,next:u.expression.set.operations,compile:function(e,t,r){delete e.match,e.value=null,r.push(e)},parse:u.expression.fn.parse.push_value},{type:u.expression.type.context,regex:/^_context/,next:u.expression.set.operations_extended.concat([u.expression.type.parameter.start]),compile:u.expression.fn.compile.push,parse:function(e,t,r){t.push(r)}},{type:u.expression.type.bool,regex:/^(true|TRUE|false|FALSE)/,next:u.expression.set.operations,compile:function(e,t,r){e.value="true"===e.match[0].toLowerCase(),delete e.match,r.push(e)},parse:u.expression.fn.parse.push_value}],u.expression.resolveAsync=function(t,r,e,n,o){if("function"!=typeof t)return u.Promise.resolve(t);var i=u.Promise.resolve(e);if(n&&n.type===u.expression.type.parameter.end){i=i.then(function(){return n.params&&u.expression.parseAsync.call(this,n.params,r,!0)}).then(function(e){return n.cleanup=!0,e})}return i.then(function(e){return t.apply(o||r,e||[])})},u.expression.resolve=function(e,t,r,n,o){return u.async.potentiallyAsync(this,!1,function(){return u.expression.resolveAsync.call(this,e,t,r,n,o)})},u.expression.handler={},u.expression.extendType=function(e){u.expression.type[e]="Twig.expression.type."+e},u.expression.extend=function(e){if(!e.type)throw new u.Error("Unable to extend logic definition. No type provided for "+e);u.expression.handler[e.type]=e};0<u.expression.definitions.length;)u.expression.extend(u.expression.definitions.shift());return u.expression.tokenize=function(e){var n,t,r,o,i,s,a=[],p=0,c=null,l=[];for(s=function(){for(var e=arguments.length-2,t=new Array(e);0<e--;)t[e]=arguments[e];if(u.log.trace("Twig.expression.tokenize","Matched a ",n," regular expression of ",t),c&&u.indexOf(c,n)<0)return l.push(n+" cannot follow a "+a[a.length-1].type+" at template:"+p+" near '"+t[0].substring(0,20)+"...'"),t[0];var r=u.expression.handler[n];return r.validate&&!r.validate(t,a)?t[0]:(l=[],a.push({type:n,value:t[0],match:t}),i=!0,c=o,p+=t[0].length,r.transform?r.transform(t,a):"")},u.log.debug("Twig.expression.tokenize","Tokenizing expression ",e);0<e.length;){for(n in e=e.trim(),u.expression.handler){if(o=u.expression.handler[n].next,t=u.expression.handler[n].regex,u.log.trace("Checking type ",n," on ",e),i=!1,u.lib.isArray(t))for(r=t.length;0<r--;)e=e.replace(t[r],s);else e=e.replace(t,s);if(i)break}if(!i)throw 0<l.length?new u.Error(l.join(" OR ")):new u.Error("Unable to parse '"+e+"' at template position"+p)}return u.log.trace("Twig.expression.tokenize","Tokenized to ",a),a},u.expression.compile=function(e){var t=e.value,r=u.expression.tokenize(t),n=null,o=[],i=[],s=null;for(u.log.trace("Twig.expression.compile: ","Compiling ",t);0<r.length;)n=r.shift(),s=u.expression.handler[n.type],u.log.trace("Twig.expression.compile: ","Compiling ",n),s.compile&&s.compile(n,i,o),u.log.trace("Twig.expression.compile: ","Stack is",i),u.log.trace("Twig.expression.compile: ","Output is",o);for(;0<i.length;)o.push(i.pop());return u.log.trace("Twig.expression.compile: ","Final output is",o),e.stack=o,delete e.value,e},u.expression.parse=function(i,s,n,e){var a=this;u.lib.isArray(i)||(i=[i]);var p=[],c=[],l=u.expression.type.operator.binary;return u.async.potentiallyAsync(this,e,function(){return u.async.forEach(i,function(e,t){var r,n=null,o=null;if(!e.cleanup)return i.length>t+1&&(o=i[t+1]),(n=u.expression.handler[e.type]).parse&&(r=n.parse.call(a,e,p,s,o)),e.type===l&&s.loop&&c.push(e),r}).then(function(){for(var e=c.length,t=null;0<e--;)(t=c[e]).params&&t.key&&delete t.key;if(n){var r=p.splice(0);p.push(r)}return p.pop()})})},u}},function(e,t){e.exports=function(p){"use strict";p.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};function c(e,t){if(null==t)return null;if(void 0!==t.indexOf)return e===t||""!==e&&-1<t.indexOf(e);var r;for(r in t)if(t.hasOwnProperty(r)&&t[r]===e)return!0;return!1}return p.expression.operator.lookup=function(e,t){switch(e){case"..":t.precidence=20,t.associativity=p.expression.operator.leftToRight;break;case",":t.precidence=18,t.associativity=p.expression.operator.leftToRight;break;case"?:":case"?":case":":t.precidence=16,t.associativity=p.expression.operator.rightToLeft;break;case"??":t.precidence=15,t.associativity=p.expression.operator.rightToLeft;break;case"or":t.precidence=14,t.associativity=p.expression.operator.leftToRight;break;case"and":t.precidence=13,t.associativity=p.expression.operator.leftToRight;break;case"b-or":t.precidence=12,t.associativity=p.expression.operator.leftToRight;break;case"b-xor":t.precidence=11,t.associativity=p.expression.operator.leftToRight;break;case"b-and":t.precidence=10,t.associativity=p.expression.operator.leftToRight;break;case"==":case"!=":t.precidence=9,t.associativity=p.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":case"not in":case"in":t.precidence=8,t.associativity=p.expression.operator.leftToRight;break;case"~":case"+":case"-":t.precidence=6,t.associativity=p.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":t.precidence=5,t.associativity=p.expression.operator.leftToRight;break;case"not":t.precidence=3,t.associativity=p.expression.operator.rightToLeft;break;case"matches":case"starts with":case"ends with":t.precidence=8,t.associativity=p.expression.operator.leftToRight;break;default:throw new p.Error("Failed to lookup operator: "+e+" is an unknown operator.")}return t.operator=e,t},p.expression.operator.parse=function(e,t){var r,n,o;if(p.log.trace("Twig.expression.operator.parse: ","Handling ",e),"?"===e&&(o=t.pop()),n=t.pop(),"not"!==e&&(r=t.pop()),"in"!==e&&"not in"!==e&&(r&&Array.isArray(r)&&(r=r.length),n&&Array.isArray(n)&&(n=n.length)),"matches"===e&&n&&"string"==typeof n){var i=n.match(/^\/(.*)\/([gims]?)$/),s=i[1],a=i[2];n=new RegExp(s,a)}switch(e){case":":break;case"??":void 0===r&&(r=n,n=o,o=void 0),null!=r?t.push(r):t.push(n);break;case"?:":p.lib.boolval(r)?t.push(r):t.push(n);break;case"?":void 0===r&&(r=n,n=o,o=void 0),p.lib.boolval(r)?t.push(n):t.push(o);break;case"+":n=parseFloat(n),r=parseFloat(r),t.push(r+n);break;case"-":n=parseFloat(n),r=parseFloat(r),t.push(r-n);break;case"*":n=parseFloat(n),r=parseFloat(r),t.push(r*n);break;case"/":n=parseFloat(n),r=parseFloat(r),t.push(r/n);break;case"//":n=parseFloat(n),r=parseFloat(r),t.push(Math.floor(r/n));break;case"%":n=parseFloat(n),r=parseFloat(r),t.push(r%n);break;case"~":t.push((null!=r?r.toString():"")+(null!=n?n.toString():""));break;case"not":case"!":t.push(!p.lib.boolval(n));break;case"<":t.push(r<n);break;case"<=":t.push(r<=n);break;case">":t.push(n<r);break;case">=":t.push(n<=r);break;case"===":t.push(r===n);break;case"==":t.push(r==n);break;case"!==":t.push(r!==n);break;case"!=":t.push(r!=n);break;case"or":t.push(p.lib.boolval(r)||p.lib.boolval(n));break;case"b-or":t.push(r|n);break;case"b-xor":t.push(r^n);break;case"and":t.push(p.lib.boolval(r)&&p.lib.boolval(n));break;case"b-and":t.push(r&n);break;case"**":t.push(Math.pow(r,n));break;case"not in":t.push(!c(r,n));break;case"in":t.push(c(r,n));break;case"matches":t.push(n.test(r));break;case"starts with":t.push(0===r.indexOf(n));break;case"ends with":t.push(-1!==r.indexOf(n,r.length-n.length));break;case"..":t.push(p.functions.range(r,n));break;default:throw new p.Error("Failed to parse operator: "+e+" is an unknown operator.")}},p}},function(e,t){e.exports=function(p){function i(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&r===e}return p.filters={upper:function(e){return"string"!=typeof e?e:e.toUpperCase()},lower:function(e){return"string"!=typeof e?e:e.toLowerCase()},capitalize:function(e){return"string"!=typeof e?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return"string"!=typeof e?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,r){return t+r.toUpperCase()})},length:function(e){return p.lib.is("Array",e)||"string"==typeof e?e.length:p.lib.is("Object",e)?void 0===e._keys?Object.keys(e).length:e._keys.length:0},reverse:function(e){if(i("Array",e))return e.reverse();if(i("String",e))return e.split("").reverse().join("");if(i("Object",e)){var t=e._keys||Object.keys(e).reverse();return e._keys=t,e}},sort:function(n){if(i("Array",n))return n.sort();if(i("Object",n)){delete n._keys;var e=Object.keys(n).sort(function(e,t){var r;return n[e]>n[t]==!(n[e]<=n[t])?n[e]>n[t]?1:n[e]<n[t]?-1:0:isNaN(r=parseFloat(n[e]))||isNaN(b1=parseFloat(n[t]))?"string"==typeof n[e]?n[e]>n[t].toString()?1:n[e]<n[t].toString()?-1:0:"string"==typeof n[t]?n[e].toString()>n[t]?1:n[e].toString()<n[t]?-1:0:null:r>b1?1:r<b1?-1:0});return n._keys=e,n}},keys:function(t){if(null!=t){var e=t._keys||Object.keys(t),r=[];return p.forEach(e,function(e){"_keys"!==e&&t.hasOwnProperty(e)&&r.push(e)}),r}},url_encode:function(e){if(null!=e){if(p.lib.is("Object",e)){var s=function(n,o){var i=[],e=n._keys||Object.keys(n);return p.forEach(e,function(e){if(Object.prototype.hasOwnProperty.call(n,e)){var t=o?o+"["+e+"]":e,r=n[e];i.push(p.lib.is("Object",r)||p.lib.isArray(r)?s(r,t):encodeURIComponent(t)+"="+encodeURIComponent(r))}}),i.join("&amp;")};return s(e)}var t=encodeURIComponent(e);return t=t.replace("'","%27")}},join:function(t,e){if(null!=t){var r="",n=[],o=null;return e&&e[0]&&(r=e[0]),i("Array",t)?n=t:(o=t._keys||Object.keys(t),p.forEach(o,function(e){"_keys"!==e&&t.hasOwnProperty(e)&&n.push(t[e])})),n.join(r)}},default:function(e,t){if(void 0!==t&&1<t.length)throw new p.Error("default filter expects one argument");return null==e||""===e?void 0===t?"":t[0]:e},json_encode:function(t){if(null==t)return"null";if("object"==typeof t&&i("Array",t))return r=[],p.forEach(t,function(e){r.push(p.filters.json_encode(e))}),"["+r.join(",")+"]";if("object"==typeof t&&i("Date",t))return'"'+t.toISOString()+'"';if("object"!=typeof t)return JSON.stringify(t);var e=t._keys||Object.keys(t),r=[];return p.forEach(e,function(e){r.push(JSON.stringify(e)+":"+p.filters.json_encode(t[e]))}),"{"+r.join(",")+"}"},merge:function(r,e){var n=[],o=0,t=[];if(i("Array",r)?p.forEach(e,function(e){i("Array",e)||(n={})}):n={},i("Array",n)||(n._keys=[]),i("Array",r)?p.forEach(r,function(e){n._keys&&n._keys.push(o),n[o]=e,o++}):(t=r._keys||Object.keys(r),p.forEach(t,function(e){n[e]=r[e],n._keys.push(e);var t=parseInt(e,10);!isNaN(t)&&o<=t&&(o=t+1)})),p.forEach(e,function(r){i("Array",r)?p.forEach(r,function(e){n._keys&&n._keys.push(o),n[o]=e,o++}):(t=r._keys||Object.keys(r),p.forEach(t,function(e){n[e]||n._keys.push(e),n[e]=r[e];var t=parseInt(e,10);!isNaN(t)&&o<=t&&(o=t+1)}))}),0===e.length)throw new p.Error("Filter merge expects at least one parameter");return n},date:function(e,t){var r=p.functions.date(e),n=t&&t.length?t[0]:"F j, Y H:i";return p.lib.date(n.replace(/\\\\/g,"\\"),r)},date_modify:function(e,t){if(null!=e){if(void 0===t||1!==t.length)throw new p.Error("date_modify filter expects 1 argument");var r,n=t[0];return p.lib.is("Date",e)&&(r=p.lib.strtotime(n,e.getTime()/1e3)),p.lib.is("String",e)&&(r=p.lib.strtotime(n,p.lib.strtotime(e))),p.lib.is("Number",e)&&(r=p.lib.strtotime(n,e)),new Date(1e3*r)}},replace:function(e,t){if(null!=e){var r,n=t[0];for(r in n)n.hasOwnProperty(r)&&"_keys"!==r&&(e=p.lib.replaceAll(e,r,n[r]));return e}},format:function(e,t){if(null!=e)return p.lib.vsprintf(e,t)},striptags:function(e,t){if(null!=e)return p.lib.strip_tags(e,t)},escape:function(e,t){if(null!=e){var r="html";if(t&&t.length&&!0!==t[0]&&(r=t[0]),"html"==r){var n=e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");return p.Markup(n,"html")}if("js"==r){n=e.toString();for(var o="",i=0;i<n.length;i++){if(n[i].match(/^[a-zA-Z0-9,\._]$/))o+=n[i];else o+=(s=n.charCodeAt(i))<128?"\\x"+s.toString(16).toUpperCase():p.lib.sprintf("\\u%04s",s.toString(16).toUpperCase())}return p.Markup(o,"js")}if("css"==r){for(n=e.toString(),o="",i=0;i<n.length;i++){if(n[i].match(/^[a-zA-Z0-9]$/))o+=n[i];else o+="\\"+(s=n.charCodeAt(i)).toString(16).toUpperCase()+" "}return p.Markup(o,"css")}if("url"==r){o=p.filters.url_encode(e);return p.Markup(o,"url")}if("html_attr"!=r)throw new p.Error("escape strategy unsupported");for(n=e.toString(),o="",i=0;i<n.length;i++)if(n[i].match(/^[a-zA-Z0-9,\.\-_]$/))o+=n[i];else if(n[i].match(/^[&<>"]$/))o+=n[i].replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");else{var s;o+=(s=n.charCodeAt(i))<=31&&9!=s&&10!=s&&13!=s?"&#xFFFD;":s<128?p.lib.sprintf("&#x%02s;",s.toString(16).toUpperCase()):p.lib.sprintf("&#x%04s;",s.toString(16).toUpperCase())}return p.Markup(o,"html_attr")}},e:function(e,t){return p.filters.escape(e,t)},nl2br:function(e){if(null!=e){var t="BACKSLASH_n_replace",r="<br />"+t;return e=p.filters.escape(e).replace(/\r\n/g,r).replace(/\r/g,r).replace(/\n/g,r),e=p.lib.replaceAll(e,t,"\n"),p.Markup(e)}},number_format:function(e,t){var r=e,n=t&&t[0]?t[0]:void 0,o=t&&void 0!==t[1]?t[1]:".",i=t&&void 0!==t[2]?t[2]:",";r=(r+"").replace(/[^0-9+\-Ee.]/g,"");var s,a,p,c=isFinite(+r)?+r:0,l=isFinite(+n)?Math.abs(n):0,u="";return 3<(u=(l?(s=c,a=l,p=Math.pow(10,a),""+Math.round(s*p)/p):""+Math.round(c)).split("."))[0].length&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,i)),(u[1]||"").length<l&&(u[1]=u[1]||"",u[1]+=new Array(l-u[1].length+1).join("0")),u.join(o)},trim:function(e,t){if(null!=e){var r,n=""+e;r=t&&t[0]?""+t[0]:" \n\r\t\f\v            ​\u2028\u2029 ";for(var o=0;o<n.length;o++)if(-1===r.indexOf(n.charAt(o))){n=n.substring(o);break}for(o=n.length-1;0<=o;o--)if(-1===r.indexOf(n.charAt(o))){n=n.substring(0,o+1);break}return-1===r.indexOf(n.charAt(0))?n:""}},truncate:function(e,t){var r=30,n=!1,o="...";if(e+="",t&&(t[0]&&(r=t[0]),t[1]&&(n=t[1]),t[2]&&(o=t[2])),e.length>r){if(n&&-1===(r=e.indexOf(" ",r)))return e;e=e.substr(0,r)+o}return e},slice:function(e,t){if(null!=e){if(void 0===t||t.length<1)throw new p.Error("slice filter expects at least 1 argument");var r=t[0]||0,n=1<t.length?t[1]:e.length,o=0<=r?r:Math.max(e.length+r,0);if(p.lib.is("Array",e)){for(var i=[],s=o;s<o+n&&s<e.length;s++)i.push(e[s]);return i}if(p.lib.is("String",e))return e.substr(o,n);throw new p.Error("slice filter expects value to be an array or string")}},abs:function(e){if(null!=e)return Math.abs(e)},first:function(e){if(i("Array",e))return e[0];if(i("Object",e)){if("_keys"in e)return e[e._keys[0]]}else if("string"==typeof e)return e.substr(0,1)},split:function(e,t){if(null!=e){if(void 0===t||t.length<1||2<t.length)throw new p.Error("split filter expects 1 or 2 argument");if(p.lib.is("String",e)){var r=t[0],n=t[1],o=e.split(r);if(void 0===n)return o;if(n<0)return e.split(r,o.length+n);var i=[];if(""==r)for(;0<o.length;){for(var s="",a=0;a<n&&0<o.length;a++)s+=o.shift();i.push(s)}else{for(a=0;a<n-1&&0<o.length;a++)i.push(o.shift());0<o.length&&i.push(o.join(r))}return i}throw new p.Error("split filter expects value to be a string")}},last:function(e){var t;return p.lib.is("Object",e)?e[(t=void 0===e._keys?Object.keys(e):e._keys)[t.length-1]]:e[e.length-1]},raw:function(e){return p.Markup(e)},batch:function(e,t){var r,n,o,i=t.shift(),s=t.shift();if(!p.lib.is("Array",e))throw new p.Error("batch filter expects items to be an array");if(!p.lib.is("Number",i))throw new p.Error("batch filter expects size to be a number");if(i=Math.ceil(i),r=p.lib.chunkArray(e,i),s&&e.length%i!=0){for(o=i-(n=r.pop()).length;o--;)n.push(s);r.push(n)}return r},round:function(e,t){var r=0<(t=t||[]).length?t[0]:0,n=1<t.length?t[1]:"common";if(e=parseFloat(e),r&&!p.lib.is("Number",r))throw new p.Error("round filter expects precision to be a number");if("common"===n)return p.lib.round(e,r);if(!p.lib.is("Function",Math[n]))throw new p.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[n](e*Math.pow(10,r))/Math.pow(10,r)}},p.filter=function(e,t,r){if(!p.filters[e])throw"Unable to find filter "+e;return p.filters[e].call(this,t,r)},p.filter.extend=function(e,t){p.filters[e]=t},p}},function(i,e,t){i.exports=function(a){return a.functions={range:function(e,t,r){var n,o,i=[],s=r||1,a=!1;if(!((o=isNaN(e)||isNaN(t)?isNaN(e)&&isNaN(t)?(a=!0,n=e.charCodeAt(0),t.charCodeAt(0)):(n=isNaN(e)?0:e,isNaN(t)?0:t):(n=parseInt(e,10),parseInt(t,10)))<n))for(;n<=o;)i.push(a?String.fromCharCode(n):n),n+=s;else for(;o<=n;)i.push(a?String.fromCharCode(n):n),n-=s;return i},cycle:function(e,t){return e[t%e.length]},dump:function(){var e=arguments.length;for(args=new Array(e);0<e--;)args[e]=arguments[e];function r(e){for(var t="";0<e;)e--,t+="  ";return t}function n(e){s+=r(i),"object"==typeof e?t(e):"function"==typeof e?s+="function()\n":"string"==typeof e?s+="string("+e.length+') "'+e+'"'+o:"number"==typeof e?s+="number("+e+")"+o:"boolean"==typeof e&&(s+="bool("+e+")"+o)}var o="\n",i=0,s="",t=function(e){var t;if(null===e)s+="NULL\n";else if(void 0===e)s+="undefined\n";else if("object"==typeof e){for(t in s+=r(i)+typeof e,i++,s+="("+function(e){var t,r=0;for(t in e)e.hasOwnProperty(t)&&r++;return r}(e)+") {"+o,e)s+=r(i)+"["+t+"]=> "+o,n(e[t]);s+=r(--i)+"}"+o}else n(e)};return 0==args.length&&args.push(this.context),a.forEach(args,function(e){t(e)}),s},date:function(e,t){var r;if(null==e||""===e)r=new Date;else if(a.lib.is("Date",e))r=e;else if(a.lib.is("String",e))r=e.match(/^[0-9]+$/)?new Date(1e3*e):new Date(1e3*a.lib.strtotime(e));else{if(!a.lib.is("Number",e))throw new a.Error("Unable to parse date "+e);r=new Date(1e3*e)}return r},block:function(e){return this.originalBlockTokens[e]?a.logic.parse.call(this,this.originalBlockTokens[e],this.context).output:this.blocks[e]},parent:function(){return a.placeholders.parent},attribute:function(e,t,r){return a.lib.is("Object",e)&&e.hasOwnProperty(t)?"function"==typeof e[t]?e[t].apply(void 0,r):e[t]:e[t]||void 0},max:function(e){return a.lib.is("Object",e)?(delete e._keys,a.lib.max(e)):a.lib.max.apply(null,arguments)},min:function(e){return a.lib.is("Object",e)?(delete e._keys,a.lib.min(e)):a.lib.min.apply(null,arguments)},template_from_string:function(e){return void 0===e&&(e=""),a.Templates.parsers.twig({options:this.options,data:e})},random:function(e){var o=2147483648;function t(e){var t=Math.floor(Math.random()*o),r=Math.min.call(null,0,e),n=Math.max.call(null,0,e);return r+Math.floor((n-r+1)*t/o)}if(a.lib.is("Number",e))return t(e);if(a.lib.is("String",e))return e.charAt(t(e.length-1));if(a.lib.is("Array",e))return e[t(e.length-1)];if(a.lib.is("Object",e)){var r=Object.keys(e);return e[r[t(r.length-1)]]}return t(o-1)},source:function(e,t){var r,n=!1,o={id:e,path:e,method:void 0!==i.exports&&"undefined"==typeof window?"fs":"ajax",parser:"source",async:!1,fetchTemplateSource:!0};void 0===t&&(t=!1);try{null==(r=a.Templates.loadRemote(e,o))?r="":n=!0}catch(e){a.log.debug("Twig.functions.source: ","Problem loading template  ",e)}return n||t?r:'Template "{name}" is not defined.'.replace("{name}",e)}},a._function=function(e,t,r){if(!a.functions[e])throw"Unable to find function "+e;return a.functions[e](t,r)},a._function.extend=function(e,t){a.functions[e]=t},a}},function(e,t,n){e.exports=function(i){i.lib={},i.lib.sprintf=n(0),i.lib.vsprintf=n(11),i.lib.round=n(12),i.lib.max=n(13),i.lib.min=n(14),i.lib.strip_tags=n(15),i.lib.strtotime=n(17),i.lib.date=n(18),i.lib.boolval=n(19);var r=Object.prototype.toString;return i.lib.is=function(e,t){return null!=t&&("Array"===e&&Array.isArray?Array.isArray(t):r.call(t).slice(8,-1)===e)},i.lib.isArray=Array.isArray||function(e){return"Array"===r.call(e).slice(8,-1)},i.lib.copy=function(e){var t,r={};for(t in e)r[t]=e[t];return r},i.lib.extend=function(e,t){var r,n=Object.keys(t||{});for(r=n.length;r--;)e[n[r]]=t[n[r]];return e},i.lib.replaceAll=function(e,t,r){return e.split(t).join(r)},i.lib.chunkArray=function(e,t){var r=[],n=0,o=e.length;if(t<1||!i.lib.is("Array",e))return[];for(;n<o;)r.push(e.slice(n,n+=t));return r},i}},function(e,t,r){"use strict";e.exports=function(e,t){return r(0).apply(this,[e].concat(t))}},function(e,t,r){"use strict";e.exports=function(e,t,r){var n,o,i,s;if(t|=0,i=(e*=n=Math.pow(10,t))%1==.5*(s=0<e|-(e<0)),o=Math.floor(e),i)switch(r){case"PHP_ROUND_HALF_DOWN":e=o+(s<0);break;case"PHP_ROUND_HALF_EVEN":e=o+o%2*s;break;case"PHP_ROUND_HALF_ODD":e=o+!(o%2);break;default:e=o+(0<s)}return(i?e:Math.round(e))/n}},function(e,t,r){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(){function a(e){if("[object Array]"===Object.prototype.toString.call(e))return e;var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function p(e,t){var r=0,n=0,o=0,i=0,s=0;if(e===t)return 0;if("object"!==(void 0===e?"undefined":c(e)))return"object"===(void 0===t?"undefined":c(t))?1:isNaN(t)&&!isNaN(e)?0===e?0:e<0?1:-1:isNaN(e)&&!isNaN(t)?0===t?0:0<t?1:-1:t===e?0:e<t?1:-1;if("object"!==(void 0===t?"undefined":c(t)))return-1;if(e=a(e),t=a(t),(s=e.length)<(i=t.length))return 1;if(i<s)return-1;for(r=0,n=s;r<n;++r){if(1===(o=p(e[r],t[r])))return 1;if(-1===o)return-1}return 0}var e,t,r,n=0,o=arguments,i=o.length;if(0===i)throw new Error("At least one value should be passed to max()");if(1===i){if("object"!==c(o[0]))throw new Error("Wrong parameter count for max()");if(0===(e=a(o[0])).length)throw new Error("Array must contain at least one element for max()")}else e=o;for(t=e[0],n=1,r=e.length;n<r;++n)1===p(t,e[n])&&(t=e[n]);return t}},function(e,t,r){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(){function a(e){if("[object Array]"===Object.prototype.toString.call(e))return e;var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}function p(e,t){var r=0,n=0,o=0,i=0,s=0;if(e===t)return 0;if("object"!==(void 0===e?"undefined":c(e)))return"object"===(void 0===t?"undefined":c(t))?1:isNaN(t)&&!isNaN(e)?0===e?0:e<0?1:-1:isNaN(e)&&!isNaN(t)?0===t?0:0<t?1:-1:t===e?0:e<t?1:-1;if("object"!==(void 0===t?"undefined":c(t)))return-1;if(e=a(e),t=a(t),(s=e.length)<(i=t.length))return 1;if(i<s)return-1;for(r=0,n=s;r<n;++r){if(1===(o=p(e[r],t[r])))return 1;if(-1===o)return-1}return 0}var e,t,r,n=0,o=arguments,i=o.length;if(0===i)throw new Error("At least one value should be passed to min()");if(1===i){if("object"!==c(o[0]))throw new Error("Wrong parameter count for min()");if(0===(e=a(o[0])).length)throw new Error("Array must contain at least one element for min()")}else e=o;for(t=e[0],n=1,r=e.length;n<r;++n)-1===p(t,e[n])&&(t=e[n]);return t}},function(e,t,a){"use strict";e.exports=function(e,r){var t=a(16);r=(((r||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");for(var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,o=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,i=t(e);;){var s=i;if(i=s.replace(o,"").replace(n,function(e,t){return-1<r.indexOf("<"+t.toLowerCase()+">")?e:""}),s===i)return i}}},function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){switch(void 0===e?"undefined":n(e)){case"boolean":return e?"1":"";case"string":return e;case"number":return isNaN(e)?"NAN":isFinite(e)?e+"":(e<0?"-":"")+"INF";case"undefined":return"";case"object":return Array.isArray(e)?"Array":null!==e?"Object":"";case"function":default:throw new Error("Unsupported value type")}}},function(e,t,r){"use strict";e.exports=function(e,t){var r,n,o,i,s,a,p,c,l,u;if(!e)return!1;e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase();var f=new RegExp(["^(\\d{1,4})","([\\-\\.\\/:])","(\\d{1,2})","([\\-\\.\\/:])","(\\d{1,4})","(?:\\s(\\d{1,2}):(\\d{2})?:?(\\d{2})?)?","(?:\\s([A-Z]+)?)?$"].join(""));if((n=e.match(f))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return!(12<n[1]||31<n[3])&&new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return!(12<n[3]||31<n[5]||n[1]<70&&38<n[1])&&(i=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(i,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(o=new Date,new Date(o.getFullYear(),o.getMonth(),o.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return!(12<n[1]||31<n[3]||n[5]<70&&38<n[5])&&(i=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(i,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return!(23<n[1]||59<n[3]||59<n[5])&&(o=new Date,new Date(o.getFullYear(),o.getMonth(),o.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3|0:0|t;if(!isNaN(r=Date.parse(e)))return r/1e3|0;if(f=new RegExp(["^([0-9]{4}-[0-9]{2}-[0-9]{2})","[ t]","([0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?)","([\\+-][0-9]{2}(:[0-9]{2})?|z)"].join("")),(n=e.match(f))&&("z"===n[4]?n[4]="Z":n[4].match(/^([+-][0-9]{2})$/)&&(n[4]=n[4]+":00"),!isNaN(r=Date.parse(n[1]+"T"+n[2]+n[4]))))return r/1e3|0;function h(e){var t=e.split(" "),r=t[0],n=t[1].substring(0,3),o=/\d+/.test(r),i=("last"===r?-1:1)*("ago"===t[2]?-1:1);if(o&&(i*=parseInt(r,10)),p.hasOwnProperty(n)&&!t[1].match(/^mon(day|\.)?$/i))return s["set"+p[n]](s["get"+p[n]]()+i);if("wee"===n)return s.setDate(s.getDate()+7*i);if("next"===r||"last"===r)!function(e,t,r){var n,o=a[t];void 0!==o&&(0==(n=o-s.getDay())?n=7*r:0<n&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),s.setDate(s.getDate()+n))}(r,n,i);else if(!o)return!1;return!0}if(s=t?new Date(1e3*t):new Date,a={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},p={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},"([+-]?\\d+\\s"+(l="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+l+")(\\sago)?",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(u=0,c=n.length;u<c;u++)if(!h(n[u]))return!1;return s.getTime()/1e3}},function(e,t,r){"use strict";e.exports=function(e,t){function r(e,t){return i[e]?i[e]():t}function n(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}var o,i,s=["Sun","Mon","Tues","Wednes","Thurs","Fri","Satur","January","February","March","April","May","June","July","August","September","October","November","December"],a=/\\?(.?)/gi;i={d:function(){return n(i.j(),2)},D:function(){return i.l().slice(0,3)},j:function(){return o.getDate()},l:function(){return s[i.w()]+"day"},N:function(){return i.w()||7},S:function(){var e=i.j(),t=e%10;return t<=3&&1===parseInt(e%100/10,10)&&(t=0),["st","nd","rd"][t-1]||"th"},w:function(){return o.getDay()},z:function(){var e=new Date(i.Y(),i.n()-1,i.j()),t=new Date(i.Y(),0,1);return Math.round((e-t)/864e5)},W:function(){var e=new Date(i.Y(),i.n()-1,i.j()-i.N()+3),t=new Date(e.getFullYear(),0,4);return n(1+Math.round((e-t)/864e5/7),2)},F:function(){return s[6+i.n()]},m:function(){return n(i.n(),2)},M:function(){return i.F().slice(0,3)},n:function(){return o.getMonth()+1},t:function(){return new Date(i.Y(),i.n(),0).getDate()},L:function(){var e=i.Y();return e%4==0&e%100!=0|e%400==0},o:function(){var e=i.n(),t=i.W();return i.Y()+(12===e&&t<9?1:1===e&&9<t?-1:0)},Y:function(){return o.getFullYear()},y:function(){return i.Y().toString().slice(-2)},a:function(){return 11<o.getHours()?"pm":"am"},A:function(){return i.a().toUpperCase()},B:function(){var e=3600*o.getUTCHours(),t=60*o.getUTCMinutes(),r=o.getUTCSeconds();return n(Math.floor((e+t+r+3600)/86.4)%1e3,3)},g:function(){return i.G()%12||12},G:function(){return o.getHours()},h:function(){return n(i.g(),2)},H:function(){return n(i.G(),2)},i:function(){return n(o.getMinutes(),2)},s:function(){return n(o.getSeconds(),2)},u:function(){return n(1e3*o.getMilliseconds(),6)},e:function(){throw new Error("Not supported (see source code of date() for timezone on how to add support)")},I:function(){return new Date(i.Y(),0)-Date.UTC(i.Y(),0)!=new Date(i.Y(),6)-Date.UTC(i.Y(),6)?1:0},O:function(){var e=o.getTimezoneOffset(),t=Math.abs(e);return(0<e?"-":"+")+n(100*Math.floor(t/60)+t%60,4)},P:function(){var e=i.O();return e.substr(0,3)+":"+e.substr(3,2)},T:function(){return"UTC"},Z:function(){return 60*-o.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(a,r)},r:function(){return"D, d M Y H:i:s O".replace(a,r)},U:function(){return o/1e3|0}};var p,c;return p=e,o=void 0===(c=t)?new Date:c instanceof Date?new Date(c):new Date(1e3*c),p.replace(a,r)}},function(e,t,r){"use strict";e.exports=function(e){return!1!==e&&(0!==e&&0!==e&&(""!==e&&"0"!==e&&((!Array.isArray(e)||0!==e.length)&&null!=e)))}},function(e,t){e.exports=function(c){"use strict";c.Templates.registerLoader("ajax",function(t,r,n,o){var i,s,a=r.precompiled,p=this.parsers[r.parser]||this.parser.twig;if("undefined"==typeof XMLHttpRequest)throw new c.Error('Unsupported platform: Unable to do ajax requests because there is no "XMLHTTPRequest" implementation');return(s=new XMLHttpRequest).onreadystatechange=function(){var e=null;4===s.readyState&&(200===s.status||window.cordova&&0==s.status?(c.log.debug("Got template ",s.responseText),e=!0===a?JSON.parse(s.responseText):s.responseText,r.url=t,r.data=e,i=p.call(this,r),"function"==typeof n&&n(i)):"function"==typeof o&&o(s))},s.open("GET",t,!!r.async),s.send(),!!r.async||i})}},function(e,t,r){e.exports=function(l){"use strict";var u,t;try{u=r(22),t=r(1)}catch(e){}l.Templates.registerLoader("fs",function(r,n,o,i){var s,e=null,a=n.precompiled,p=this.parsers[n.parser]||this.parser.twig;if(!u||!t)throw new l.Error('Unsupported platform: Unable to load from file because there is no "fs" or "path" implementation');function c(e,t){e?"function"==typeof i&&i(e):(!0===a&&(t=JSON.parse(t)),n.data=t,n.path=n.path||r,s=p.call(this,n),"function"==typeof o&&o(s))}if(n.path=n.path||r,n.async)return u.stat(n.path,function(e,t){!e&&t.isFile()?u.readFile(n.path,"utf8",c):"function"==typeof i&&i(new l.Error("Unable to find template file "+n.path))}),!0;try{if(!u.statSync(n.path).isFile())throw new l.Error("Unable to find template file "+n.path)}catch(e){throw new l.Error("Unable to find template file "+n.path)}return e=u.readFileSync(n.path,"utf8"),c(void 0,e),s})}},function(e,t){},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var p,c=[],l=!1,u=-1;function f(){l&&p&&(l=!1,p.length?c=p.concat(c):u=-1,c.length&&h())}function h(){if(!l){var e=a(f);l=!0;for(var t=c.length;t;){for(p=c,c=[];++u<t;)p&&p[u].run();u=-1,t=c.length}p=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new y(e,t)),1!==c.length||l||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(u){"use strict";for(u.logic={},u.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",shortblock:"Twig.logic.type.shortblock",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from",embed:"Twig.logic.type.embed",endembed:"Twig.logic.type.endembed",with:"Twig.logic.type.with",endwith:"Twig.logic.type.endwith"},u.logic.definitions=[{type:u.logic.type.if_,regex:/^if\s?([\s\S]+)$/,next:[u.logic.type.else_,u.logic.type.elseif,u.logic.type.endif],open:!0,compile:function(e){var t=e.match[1];return e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,delete e.match,e},parse:function(t,r,n){var o=this;return u.expression.parseAsync.call(this,t.stack,r).then(function(e){return n=!0,u.lib.boolval(e)?(n=!1,u.parseAsync.call(o,t.output,r)):""}).then(function(e){return{chain:n,output:e}})}},{type:u.logic.type.elseif,regex:/^elseif\s?([^\s].*)$/,next:[u.logic.type.else_,u.logic.type.elseif,u.logic.type.endif],open:!1,compile:function(e){var t=e.match[1];return e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,delete e.match,e},parse:function(t,r,n){var o=this;return u.expression.parseAsync.call(this,t.stack,r).then(function(e){return n&&u.lib.boolval(e)?(n=!1,u.parseAsync.call(o,t.output,r)):""}).then(function(e){return{chain:n,output:e}})}},{type:u.logic.type.else_,regex:/^else$/,next:[u.logic.type.endif,u.logic.type.endfor],open:!1,parse:function(e,t,r){var n=u.Promise.resolve("");return r&&(n=u.parseAsync.call(this,e.output,t)),n.then(function(e){return{chain:r,output:e}})}},{type:u.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:u.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([\S\s]+?)(?:\s+if\s+([^\s].*))?$/,next:[u.logic.type.else_,u.logic.type.endfor],open:!0,compile:function(e){var t=e.match[1],r=e.match[2],n=e.match[3],o=null;if(e.key_var=null,e.value_var=null,0<=t.indexOf(",")){if(2!==(o=t.split(",")).length)throw new u.Error("Invalid expression in for loop: "+t);e.key_var=o[0].trim(),e.value_var=o[1].trim()}else e.value_var=t.trim();return e.expression=u.expression.compile.call(this,{type:u.expression.type.expression,value:r}).stack,n&&(e.conditional=u.expression.compile.call(this,{type:u.expression.type.expression,value:n}).stack),delete e.match,e},parse:function(n,o,e){function r(e,t){var r=u.ChildContext(o);return r[n.value_var]=t,n.key_var&&(r[n.key_var]=e),r.loop=function(e,t){var r=void 0!==l;return{index:e+1,index0:e,revindex:r?void 0:t-e,revindex0:r?void 0:t-e-1,first:0===e,last:r?void 0:e===t-1,length:r?void 0:t,parent:o}}(p,i),(void 0===l?u.Promise.resolve(!0):u.expression.parseAsync.call(c,l,r)).then(function(e){if(e)return u.parseAsync.call(c,n.output,r).then(function(e){a.push(e),p+=1})}).then(function(){delete r.loop,delete r[n.value_var],delete r[n.key_var],u.merge(o,r,!0)})}var i,s,a=[],p=0,c=this,l=n.conditional;return u.expression.parseAsync.call(this,n.expression,o).then(function(t){return u.lib.isArray(t)?(i=t.length,u.async.forEach(t,function(e){return r(p,e)})):u.lib.is("Object",t)?(s=void 0!==t._keys?t._keys:Object.keys(t),i=s.length,u.async.forEach(s,function(e){if("_keys"!==e)return r(e,t[e])})):void 0}).then(function(){return{chain:0===a.length,output:u.output.call(c,a)}})}},{type:u.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:u.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*([\s\S]+)$/,next:[],open:!0,compile:function(e){var t=e.match[1].trim(),r=e.match[2],n=u.expression.compile.call(this,{type:u.expression.type.expression,value:r}).stack;return e.key=t,e.expression=n,delete e.match,e},parse:function(e,t,r){var n=e.key;return u.expression.parseAsync.call(this,e.expression,t).then(function(e){return e===t&&(e=u.lib.copy(e)),t[n]=e,{chain:r,context:t}})}},{type:u.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[u.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(e,t,r){var n=this,o=e.key;return u.parseAsync.call(this,e.output,t).then(function(e){return n.context[o]=e,t[o]=e,{chain:r,context:t}})}},{type:u.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:u.logic.type.filter,regex:/^filter\s+(.+)$/,next:[u.logic.type.endfilter],open:!0,compile:function(e){var t="|"+e.match[1].trim();return e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,delete e.match,e},parse:function(r,n,t){var o=this;return u.parseAsync.call(this,r.output,n).then(function(e){var t=[{type:u.expression.type.string,value:e}].concat(r.stack);return u.expression.parseAsync.call(o,t,n)}).then(function(e){return{chain:t,output:e}})}},{type:u.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:u.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[u.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,r,e){var n,o=this,i=u.Promise.resolve(),s=-1<u.indexOf(this.importedBlocks,t.block),a=this.blocks[t.block]&&-1<u.indexOf(this.blocks[t.block],u.placeholders.parent);return u.forEach(this.parseStack,function(e){e.type==u.logic.type.for_&&(t.overwrite=!0)}),(void 0===this.blocks[t.block]||s||a||t.overwrite)&&(i=(i=t.expression?u.expression.parseAsync.call(this,t.output,r).then(function(e){return u.expression.parseAsync.call(o,{type:u.expression.type.string,value:e},r)}):u.parseAsync.call(this,t.output,r).then(function(e){return u.expression.parseAsync.call(o,{type:u.expression.type.string,value:e},r)})).then(function(e){s&&o.importedBlocks.splice(o.importedBlocks.indexOf(t.block),1),o.blocks[t.block]=a?u.Markup(o.blocks[t.block].replace(u.placeholders.parent,e)):e,o.originalBlockTokens[t.block]={type:t.type,block:t.block,output:t.output,overwrite:!0}})),i.then(function(){return n=o.child.blocks[t.block]?o.child.blocks[t.block]:o.blocks[t.block],{chain:e,output:n}})}},{type:u.logic.type.shortblock,regex:/^block\s+([a-zA-Z0-9_]+)\s+(.+)$/,next:[],open:!0,compile:function(e){return e.expression=e.match[2].trim(),e.output=u.expression.compile({type:u.expression.type.expression,value:e.expression}).stack,e.block=e.match[1].trim(),delete e.match,e},parse:function(e,t,r){for(var n=new Array(arguments.length),o=arguments.length;0<o--;)n[o]=arguments[o];return u.logic.handler[u.logic.type.block].parse.apply(this,n)}},{type:u.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:u.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(e){var t=e.match[1].trim();return delete e.match,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,e},parse:function(e,t,r){var n=this,o=u.ChildContext(t);return u.expression.parseAsync.call(this,e.stack,t).then(function(e){return n.extend=e,(e instanceof u.Template?e:n.importFile(e)).renderAsync(o)}).then(function(){return u.lib.extend(t,o),{chain:r,output:""}})}},{type:u.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(e){var t=e.match[1].trim();return delete e.match,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,e},parse:function(e,t,r){var n=this;return u.expression.parseAsync.call(this,e.stack,t).then(function(e){return n.importBlocks(e),{chain:r,output:""}})}},{type:u.logic.type.include,regex:/^include\s+(.+?)(?:\s|$)(ignore missing(?:\s|$))?(?:with\s+([\S\s]+?))?(?:\s|$)(only)?$/,next:[],open:!0,compile:function(e){var t=e.match,r=t[1].trim(),n=void 0!==t[2],o=t[3],i=void 0!==t[4]&&t[4].length;return delete e.match,e.only=i,e.ignoreMissing=n,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:r}).stack,void 0!==o&&(e.withStack=u.expression.compile.call(this,{type:u.expression.type.expression,value:o.trim()}).stack),e},parse:function(e,t,r){var n=e.only?{}:u.ChildContext(t),o=e.ignoreMissing,i=this,s={chain:r,output:""};return(void 0!==e.withStack?u.expression.parseAsync.call(this,e.withStack,t).then(function(e){u.lib.extend(n,e)}):u.Promise.resolve()).then(function(){return u.expression.parseAsync.call(i,e.stack,t)}).then(function(e){if(e instanceof u.Template)return e.renderAsync(n,{isInclude:!0});try{return i.importFile(e).renderAsync(n,{isInclude:!0})}catch(e){if(o)return"";throw e}}).then(function(e){return""!==e&&(s.output=e),s})}},{type:u.logic.type.spaceless,regex:/^spaceless$/,next:[u.logic.type.endspaceless],open:!0,parse:function(e,t,r){return u.parseAsync.call(this,e.output,t).then(function(e){var t=e.replace(/>\s+</g,"><").trim();return t=u.Markup(t),{chain:r,output:t}})}},{type:u.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:u.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s*\(\s*((?:[a-zA-Z0-9_]+(?:\s*=\s*([\s\S]+))?(?:,\s*)?)*)\s*\)$/,next:[u.logic.type.endmacro],open:!0,compile:function(e){var t=e.match[1],r=e.match[2].split(/\s*,\s*/),n=r.map(function(e){return e.split(/\s*=\s*/)[0]}),o=n.length;if(1<o)for(var i={},s=0;s<o;s++){var a=n[s];if(i[a])throw new u.Error("Duplicate arguments for parameter: "+a);i[a]=1}return e.macroName=t,e.parameters=n,e.defaults=r.reduce(function(e,t){var r=t.split(/\s*=\s*/),n=r[0],o=r[1];return e[n]=o?u.expression.compile.call(this,{type:u.expression.type.expression,value:o}).stack:void 0,e},{}),delete e.match,e},parse:function(o,i,e){var t=this;return this.macros[o.macroName]=function(){var r={_self:t.macros},n=Array.prototype.slice.call(arguments);return u.async.forEach(o.parameters,function(t,e){return void 0!==n[e]?(r[t]=n[e],!0):void 0!==o.defaults[t]?u.expression.parseAsync.call(this,o.defaults[t],i).then(function(e){return r[t]=e,u.Promise.resolve()}):!(r[t]=void 0)}).then(function(){return u.parseAsync.call(t,o.output,r)})},{chain:e,output:""}}},{type:u.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:u.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(e){var t=e.match[1].trim(),r=e.match[2].trim();return delete e.match,e.expression=t,e.contextName=r,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,e},parse:function(t,r,e){var n=this,o={chain:e,output:""};return"_self"===t.expression?(r[t.contextName]=this.macros,u.Promise.resolve(o)):u.expression.parseAsync.call(this,t.stack,r).then(function(e){return n.importFile(e||t.expression)}).then(function(e){return r[t.contextName]=e.renderAsync({},{output:"macros"}),o})}},{type:u.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(e){for(var t=e.match[1].trim(),r=e.match[2].trim().split(/\s*,\s*/),n={},o=0;o<r.length;o++){var i=r[o],s=i.match(/^([a-zA-Z0-9_]+)\s+as\s+([a-zA-Z0-9_]+)$/);s?n[s[1].trim()]=s[2].trim():i.match(/^([a-zA-Z0-9_]+)$/)&&(n[i]=i)}return delete e.match,e.expression=t,e.macroNames=n,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:t}).stack,e},parse:function(r,n,o){var t=this,e=u.Promise.resolve(this.macros);return"_self"!==r.expression&&(e=u.expression.parseAsync.call(this,r.stack,n).then(function(e){return t.importFile(e||r.expression)}).then(function(e){return e.renderAsync({},{output:"macros"})})),e.then(function(e){for(var t in r.macroNames)e.hasOwnProperty(t)&&(n[r.macroNames[t]]=e[t]);return{chain:o,output:""}})}},{type:u.logic.type.embed,regex:/^embed\s+(.+?)(?:\s+(ignore missing))?(?:\s+with\s+([\S\s]+?))?(?:\s+(only))?$/,next:[u.logic.type.endembed],open:!0,compile:function(e){var t=e.match,r=t[1].trim(),n=void 0!==t[2],o=t[3],i=void 0!==t[4]&&t[4].length;return delete e.match,e.only=i,e.ignoreMissing=n,e.stack=u.expression.compile.call(this,{type:u.expression.type.expression,value:r}).stack,void 0!==o&&(e.withStack=u.expression.compile.call(this,{type:u.expression.type.expression,value:o.trim()}).stack),e},parse:function(t,e,r){var n,o,i={},s=this,a=u.Promise.resolve();if(!t.only)for(n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);return void 0!==t.withStack&&(a=u.expression.parseAsync.call(this,t.withStack,e).then(function(e){for(n in e)e.hasOwnProperty(n)&&(i[n]=e[n])})),a.then(function(){return a=null,u.expression.parseAsync.call(s,t.stack,i)}).then(function(e){if(e instanceof u.Template)o=e;else try{o=s.importFile(e)}catch(e){if(t.ignoreMissing)return"";throw s=null,e}return s._blocks=u.lib.copy(s.blocks),s.blocks={},u.parseAsync.call(s,t.output,i).then(function(){return o.renderAsync(i,{blocks:s.blocks})})}).then(function(e){return s.blocks=u.lib.copy(s._blocks),{chain:r,output:e}})}},{type:u.logic.type.endembed,regex:/^endembed$/,next:[],open:!1},{type:u.logic.type.with,regex:/^(?:with\s+([\S\s]+?))(?:\s|$)(only)?$/,next:[u.logic.type.endwith],open:!0,compile:function(e){var t=e.match,r=t[1],n=void 0!==t[2]&&t[2].length;return delete e.match,e.only=n,void 0!==r&&(e.withStack=u.expression.compile.call(this,{type:u.expression.type.expression,value:r.trim()}).stack),e},parse:function(e,t,r){var n,o={},i=this,s=u.Promise.resolve();return e.only||(o=u.ChildContext(t)),void 0!==e.withStack&&(s=u.expression.parseAsync.call(this,e.withStack,t).then(function(e){for(n in e)e.hasOwnProperty(n)&&(o[n]=e[n])})),s.then(function(){return u.parseAsync.call(i,e.output,o)}).then(function(e){return{chain:r,output:e}})}},{type:u.logic.type.endwith,regex:/^endwith$/,next:[],open:!1}],u.logic.handler={},u.logic.extendType=function(e,t){t=t||"Twig.logic.type"+e,u.logic.type[e]=t},u.logic.extend=function(e){if(!e.type)throw new u.Error("Unable to extend logic definition. No type provided for "+e);u.logic.extendType(e.type),u.logic.handler[e.type]=e};0<u.logic.definitions.length;)u.logic.extend(u.logic.definitions.shift());return u.logic.compile=function(e){var t=e.value.trim(),r=u.logic.tokenize.call(this,t),n=u.logic.handler[r.type];return n.compile&&(r=n.compile.call(this,r),u.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},u.logic.tokenize=function(e){var t=null,r=null,n=null,o=null,i=null,s=null,a=null;for(t in e=e.trim(),u.logic.handler)for(r=u.logic.handler[t].type,o=n=u.logic.handler[t].regex,u.lib.isArray(n)||(o=[n]),i=o.length,s=0;s<i;s++)if(null!==(a=o[s].exec(e)))return u.log.trace("Twig.logic.tokenize: ","Matched a ",r," regular expression of ",a),{type:r,match:a};throw new u.Error("Unable to parse '"+e.trim()+"'")},u.logic.parse=function(n,o,i,e){return u.async.potentiallyAsync(this,e,function(){u.log.debug("Twig.logic.parse: ","Parsing logic token ",n);var e,t=u.logic.handler[n.type],r=this;return t.parse?(r.parseStack.unshift(n),e=t.parse.call(r,n,o||{},i),u.isPromise(e)?e=e.then(function(e){return r.parseStack.shift(),e}):r.parseStack.shift(),e):""})},u}},function(e,t){e.exports=function(e){"use strict";e.Templates.registerParser("source",function(e){return e.data||""})}},function(e,t){e.exports=function(t){"use strict";t.Templates.registerParser("twig",function(e){return new t.Template(e)})}},function(e,t,f){e.exports=function(u){"use strict";return u.path={},u.path.parsePath=function(e,t){var r=null,n=e.options.namespaces,o=t||"";if(n&&"object"==typeof n)for(r in n)if(-1!==o.indexOf(r)){var i=new RegExp("^"+r+"::"),s=new RegExp("^@"+r+"/"),a=n[r].replace(/([^\/])$/,"$1/");if(i.test(o))return o=o.replace(i,a);if(s.test(o))return o=o.replace(s,a)}return u.path.relativePath(e,o)},u.path.relativePath=function(e,t){var r,n,o,i="/",s=[],a=t||"";if(e.url)r=void 0!==e.base?e.base.replace(/([^\/])$/,"$1/"):e.url;else if(e.path){var p=f(1),c=p.sep||i,l=new RegExp("^\\.{1,2}"+c.replace("\\","\\\\"));a=a.replace(/\//g,c),r=(r=void 0!==e.base&&null==a.match(l)?(a=a.replace(e.base,""),e.base+c):p.normalize(e.path)).replace(c+c,c),i=c}else{if(!e.name&&!e.id||!e.method||"fs"===e.method||"ajax"===e.method)throw new u.Error("Cannot extend an inline template.");r=e.base||e.name||e.id}for((n=r.split(i)).pop(),n=n.concat(a.split(i));0<n.length;)"."===(o=n.shift())||(".."===o&&0<s.length&&".."!==s[s.length-1]?s.pop():s.push(o));return s.join(i)},u}},function(e,t){e.exports=function(n){"use strict";return n.tests={empty:function(e){if(null==e)return!0;if("number"==typeof e)return!1;if(e.length&&0<e.length)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2==1},even:function(e){return e%2==0},divisibleby:function(e,t){return e%t[0]==0},defined:function(e){return void 0!==e},none:function(e){return null===e},null:function(e){return this.none(e)},"same as":function(e,t){return e===t[0]},sameas:function(e,t){return console.warn("`sameas` is deprecated use `same as`"),n.tests["same as"](e,t)},iterable:function(e){return e&&(n.lib.is("Array",e)||n.lib.is("Object",e))}},n.test=function(e,t,r){if(!n.tests[e])throw"Test "+e+" is not defined.";return n.tests[e](t,r)},n.test.extend=function(e,t){n.tests[e]=t},n}},function(e,t){e.exports=function(p){"use strict";return p.parseAsync=function(e,t){return p.parse.call(this,e,t,!0)},p.expression.parseAsync=function(e,t,r){return p.expression.parse.call(this,e,t,r,!0)},p.logic.parseAsync=function(e,t,r){return p.logic.parse.call(this,e,t,r,!0)},p.Template.prototype.renderAsync=function(e,t){return this.render(e,t,!0)},p.async={},p.isPromise=function(e){return e&&e.then&&"function"==typeof e.then},p.async.potentiallyAsync=function(e,t,r){return t?p.Promise.resolve(r.call(e)):function(e,t,r){var n=r.call(e),o=null,i=!0;if(!p.isPromise(n))return n;if(n.then(function(e){n=e,i=!1}).catch(function(e){o=e}),null!==o)throw o;if(i)throw new p.Error("You are using Twig.js in sync mode in combination with async extensions.");return n}(e,0,r)},p.Thenable=function(e,t,r){this.then=e,this._value=r?t:null,this._state=r||0},p.Thenable.prototype.catch=function(e){return 1==this._state?this:this.then(null,e)},p.Thenable.resolvedThen=function(e){try{return p.Promise.resolve(e(this._value))}catch(e){return p.Promise.reject(e)}},p.Thenable.rejectedThen=function(e,t){if(!t||"function"!=typeof t)return this;var r=this._value,n=p.attempt(function(){return t(r)},p.Promise.reject);return p.Promise.resolve(n)},p.Promise=function(e){var r=0,n=null,t=function(e,t){r=e,n=t};return function(e,t,r){try{e(t,r)}catch(e){r(e)}}(e,function(e){t(1,e)},function(e){t(2,e)}),1===r?p.Promise.resolve(n):2===r?p.Promise.reject(n):(t=p.FullPromise()).promise},p.FullPromise=function(){var r=null;function n(e){e(a._value)}function o(e,t){t(a._value)}var s=function(e,t){r=function(e,t,r){var n=[t,r,-2];return e?-2==e[2]?e=[e,n]:e.push(n):e=n,e}(r,e,t)};function e(e,t){a._state||(a._value=t,a._state=e,s=1==e?n:o,r&&(-2===r[2]&&(s(r[0],r[1]),r=null),p.forEach(r,function(e){s(e[0],e[1])}),r=null))}var a=new p.Thenable(function(n,o){var e="function"==typeof n;if(1==a._state&&!e)return p.Promise.resolve(a._value);if(1===a._state)return p.attempt(function(){return p.Promise.resolve(n(a._value))},p.Promise.reject);var i="function"==typeof o;return p.Promise(function(t,r){s(e?function(e){p.attempt(function(){t(n(e))},r)}:t,i?function(e){p.attempt(function(){t(o(e))},r)}:r)})});return e.promise=a,e},p.Promise.defaultResolved=new p.Thenable(p.Thenable.resolvedThen,void 0,1),p.Promise.emptyStringResolved=new p.Thenable(p.Thenable.resolvedThen,"",1),p.Promise.resolve=function(e){return arguments.length<1||void 0===e?p.Promise.defaultResolved:p.isPromise(e)?e:""===e?p.Promise.emptyStringResolved:new p.Thenable(p.Thenable.resolvedThen,e,1)},p.Promise.reject=function(e){return new p.Thenable(p.Thenable.rejectedThen,e,2)},p.Promise.all=function(e){var r=new Array(e.length);return p.async.forEach(e,function(e,t){if(p.isPromise(e)){if(1!=e._state)return e.then(function(e){r[t]=e});r[t]=e._value}else r[t]=e}).then(function(){return r})},p.async.forEach=function(r,n){var o=r.length,i=0;return function e(){var t=null;do{if(i==o)return p.Promise.resolve();t=n(r[i],i),i++}while(!t||!p.isPromise(t)||1==t._state);return t.then(e)}()},p}},function(e,t){e.exports=function(a){"use strict";return a.exports={VERSION:a.VERSION},a.exports.twig=function(e){var t=e.id,r={strict_variables:e.strict_variables||!1,autoescape:null!=e.autoescape&&e.autoescape||!1,allowInlineIncludes:e.allowInlineIncludes||!1,rethrow:e.rethrow||!1,namespaces:e.namespaces};if(a.cache&&t&&a.validateId(t),void 0!==e.debug&&(a.debug=e.debug),void 0!==e.trace&&(a.trace=e.trace),void 0!==e.data)return a.Templates.parsers.twig({data:e.data,path:e.hasOwnProperty("path")?e.path:void 0,module:e.module,id:t,options:r});if(void 0!==e.ref){if(void 0!==e.id)throw new a.Error("Both ref and id cannot be set on a twig.js template.");return a.Templates.load(e.ref)}if(void 0===e.method)return void 0!==e.href?a.Templates.loadRemote(e.href,{id:t,method:"ajax",parser:e.parser||"twig",base:e.base,module:e.module,precompiled:e.precompiled,async:e.async,options:r},e.load,e.error):void 0!==e.path?a.Templates.loadRemote(e.path,{id:t,method:"fs",parser:e.parser||"twig",base:e.base,module:e.module,precompiled:e.precompiled,async:e.async,options:r},e.load,e.error):void 0;if(!a.Templates.isRegisteredLoader(e.method))throw new a.Error('Loader for "'+e.method+'" is not defined.');return a.Templates.loadRemote(e.name||e.href||e.path||t||void 0,{id:t,method:e.method,parser:e.parser||"twig",base:e.base,module:e.module,precompiled:e.precompiled,async:e.async,options:r},e.load,e.error)},a.exports.extendFilter=function(e,t){a.filter.extend(e,t)},a.exports.extendFunction=function(e,t){a._function.extend(e,t)},a.exports.extendTest=function(e,t){a.test.extend(e,t)},a.exports.extendTag=function(e){a.logic.extend(e)},a.exports.extend=function(e){e(a)},a.exports.compile=function(e,t){var r,n=t.filename,o=t.filename;return r=new a.Template({data:e,path:o,id:n,options:t.settings["twig options"]}),function(e){return r.render(e)}},a.exports.renderFile=function(e,t,r){"function"==typeof t&&(r=t,t={});var n=(t=t||{}).settings||{},o=n["twig options"],i={path:e,base:n.views,load:function(e){o&&o.allow_async?e.renderAsync(t).then(function(e){r(null,e)},r):r(null,""+e.render(t))}};if(o)for(var s in o)o.hasOwnProperty(s)&&(i[s]=o[s]);a.exports.twig(i)},a.exports.__express=a.exports.renderFile,a.exports.cache=function(e){a.cache=e},a.exports.path=a.path,a.exports.filters=a.filters,a.exports.Promise=a.Promise,a}}],o.c=n,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2);function o(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,n});