diff --git a/docs/.vuepress/public/benchmark-bundle.min.js b/docs/.vuepress/public/benchmark-bundle.min.js index 6443948..6b292cf 100644 --- a/docs/.vuepress/public/benchmark-bundle.min.js +++ b/docs/.vuepress/public/benchmark-bundle.min.js @@ -1 +1 @@ -!function(u,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("benchmark",[],e):"object"==typeof exports?exports.benchmark=e():(u.peg=u.peg||{},u.peg.benchmark=e())}("undefined"!=typeof self?self:window,function(){return function(u){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return u[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=u,t.c=e,t.d=function(u,e,n){t.o(u,e)||Object.defineProperty(u,e,{enumerable:!0,get:n})},t.r=function(u){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},t.t=function(u,e){if(1&e&&(u=t(u)),8&e)return u;if(4&e&&"object"==typeof u&&u&&u.__esModule)return u;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:u}),2&e&&"string"!=typeof u)for(var r in u)t.d(n,r,function(e){return u[e]}.bind(null,r));return n},t.n=function(u){var e=u&&u.__esModule?function(){return u.default}:function(){return u};return t.d(e,"a",e),e},t.o=function(u,e){return Object.prototype.hasOwnProperty.call(u,e)},t.p="",t(t.s=48)}([function(u,e,t){"use strict";var n=t(9),r=t(5),o=t(23),i=t(14),a=t(1),s={VERSION:t(13).version,GrammarError:n,ast:r,parser:i,compiler:o,util:a,generate:function(u){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=new o.Session({passes:a.convertPasses(o.passes)});return Array.isArray(e.plugins)&&e.plugins.forEach(function(u){"function"==typeof u.use&&u.use(t,e)}),o.compile(t.parse(u,e.parser||{}),t,e)}};u.exports=s},function(u,e,t){"use strict";var n=t(19),r=t(20),o=t(21),i=t(11),a=function(){function u(u){return Array.isArray(u)?u:o.values(u)}return function(e){return o.map(e,u)}}();u.exports={find:n.find,findIndex:n.findIndex,stringEscape:r.stringEscape,regexpEscape:r.regexpEscape,reservedWords:r.reservedWords,clone:o.clone,each:o.each,extend:o.extend,map:o.map,values:o.values,enforceFastProperties:o.enforceFastProperties,evalModule:i.evalModule,convertPasses:a,processOptions:function(u,e){var t={};return o.extend(t,u),o.extend(t,e),t},noop:function(){}}},,,,function(u,e,t){"use strict";e.visitor=t(10),e.Node=t(12),e.Grammar=t(22)},,,,function(u,e,t){"use strict";u.exports=function u(e,t){!function(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),this.name="GrammarError",this.message=e,this.location=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,u)}},function(u,e,t){"use strict";function n(u,e){for(var t=0;t1?n-1:0),o=1;o1?t-1:0),r=1;r1?t-1:0),r=1;r (https://majda.cz/)","Futago-za Ryuu "],types:"typings/pegjs.d.ts",main:"lib/peg.js",bin:"bin/peg.js",engines:{node:">= 6"}}},function(u,e,t){"use strict";var n=t(5),r=t(1);function o(u,e,t,n){this.message=u,this.expected=e,this.found=t,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}!function(u,e){function t(){this.constructor=u}t.prototype=e.prototype,u.prototype=new t}(o,Error),o.buildMessage=function(u,e){var t={literal:function(u){return'"'+r(u.text)+'"'},class:function(u){var e=u.parts.map(function(u){return Array.isArray(u)?o(u[0])+"-"+o(u[1]):o(u)});return"["+(u.inverted?"^":"")+e+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(u){return u.description},not:function(u){return"not "+i(u.expected)}};function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function r(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function o(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function i(u){return t[u.type](u)}return"Expected "+function(u){var e,t,n=u.map(i);if(n.sort(),n.length>0){for(e=1,t=1;et.charCodeAt(0)&&Le("Invalid character range: "+u.substring(je,Oe)+"."),[e,t]},Be=function(){return""},me=function(){return"\0"},xe=function(){return"\b"},be=function(){return"\f"},Pe=function(){return"\n"},ye=function(){return"\r"},_e=function(){return"\t"},$e=function(){return"\v"},Se=function(u){return String.fromCharCode(parseInt(u,16))},ke=function(){return St("any")},Re=function(){Le("Unbalanced brace.")},Oe=0,je=0,Te=[{line:1,column:1}],Ie=[],Ne=0;if("startRule"in e){if(!(e.startRule in a))throw new Error("Can't start parsing from rule \""+e.startRule+'".');s=a[e.startRule]}function we(){return Ve(je,Oe)}function Le(u,e){throw function(u,e){return new o(u,null,null,e)}(u,e=void 0!==e?e:Ve(je,Oe))}function Ue(u,e){return{type:"literal",text:u,ignoreCase:e}}function He(u){return{type:"other",description:u}}function ze(e){var t,n=Te[e];if(n)return n;for(t=e-1;!Te[t];)t--;for(n={line:(n=Te[t]).line,column:n.column};t0;function Ve(u,t){var n={};Me&&(n.filename=e.filename);var r=ze(u);n.start={offset:u,line:r.line,column:r.column};var o=ze(t);return n.end={offset:t,line:o.line,column:o.column},n}function Ge(){Ie.push({pos:Oe,variants:[]})}function Xe(u){var e=Ie[Ie.length-1];Oee.pos&&(e.pos=Oe,e.variants=[]),e.variants.push(u))}function Ye(u){var e=Ie.pop(),t=Ie[Ie.length-1],n=e.variants;t.pos===e.pos&&(u&&(n=n.map(function(u){return"not"===u.type?u.expected:{type:"not",expected:u}})),Array.prototype.push.apply(t.variants,n))}function We(){var u,e,t,n,r;if(u=Oe,bt(),e=Oe,(t=function(){var u,e;return u=Oe,(e=xt())!==i&&Pt()!==i?(je=u,u=Wu(e)):(Oe=u,u=i),u}())!==i?(n=bt(),e=t):(Oe=e,e=i),e===i&&(e=null),t=[],n=Oe,(r=qe())!==i?(bt(),n=r):(Oe=n,n=i),n!==i)for(;n!==i;)t.push(n),n=Oe,(r=qe())!==i?(bt(),n=r):(Oe=n,n=i);else t=i;return t!==i?(je=u,u=Yu(e,t)):(Oe=u,u=i),u}function qe(){var e,t,n,r,o,a;return e=Oe,(t=pt())!==i?(bt(),n=Oe,(r=ft())!==i?(bt(),n=r):(Oe=n,n=i),n===i&&(n=null),a=vu,0===Ne&&Xe(a),61===u.charCodeAt(Oe)?(r=c,Oe++):r=i,r!==i?(bt(),(o=Je())!==i&&Pt()!==i?(je=e,e=qu(t,n,o)):(Oe=e,e=i)):(Oe=e,e=i)):(Oe=e,e=i),e}function Je(){var e,t,n,r,o,a,s=function(u){0===Ne&&Xe(u)};if(e=Oe,(t=Ke())!==i){for(n=[],r=Oe,bt(),s(Du),47===u.charCodeAt(Oe)?(o=p,Oe++):o=i,o!==i?(bt(),(a=Ke())!==i?r=a:(Oe=r,r=i)):(Oe=r,r=i);r!==i;)n.push(r),r=Oe,bt(),s(Du),47===u.charCodeAt(Oe)?(o=p,Oe++):o=i,o!==i?(bt(),(a=Ke())!==i?r=a:(Oe=r,r=i)):(Oe=r,r=i);je=e,e=Ju(t,n)}else Oe=e,e=i;return e}function Ke(){var u,e,t,n;return u=Oe,(e=function(){var u,e,t,n,r;if(u=Oe,(e=Ze())!==i){for(t=[],n=Oe,bt(),(r=Ze())!==i?n=r:(Oe=n,n=i);n!==i;)t.push(n),n=Oe,bt(),(r=Ze())!==i?n=r:(Oe=n,n=i);je=u,u=Zu(e,t)}else Oe=u,u=i;return u}())!==i?(t=Oe,bt(),(n=xt())!==i?t=n:(Oe=t,t=i),t===i&&(t=null),je=u,u=Ku(e,t)):(Oe=u,u=i),u}function Ze(){var e,t,n,r,o,a;return e=Oe,a=Bu,0===Ne&&Xe(a),64===u.charCodeAt(Oe)?(t=l,Oe++):t=i,t!==i?((n=Qe())===i&&(n=null),r=bt(),(o=ut())!==i?(je=e,e=Qu(n,o)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=Oe,(t=Qe())!==i?(n=bt(),(r=ut())!==i?(je=e,e=ue(t,r)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=ut())),e}function Qe(){var e,t,n,r;return e=Oe,(t=pt())!==i?(bt(),r=mu,0===Ne&&Xe(r),58===u.charCodeAt(Oe)?(n=A,Oe++):n=i,n!==i?(je=e,e=ee(t)):(Oe=e,e=i)):(Oe=e,e=i),e}function ut(){var e,t,n;return e=Oe,(t=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(xu),36===u.charCodeAt(Oe)?(t=f,Oe++):t=i,t!==i&&(je=e,t=ne()),(e=t)===i&&(e=Oe,n(bu),38===u.charCodeAt(Oe)?(t=E,Oe++):t=i,t!==i&&(je=e,t=re()),(e=t)===i&&(e=Oe,n(Pu),33===u.charCodeAt(Oe)?(t=C,Oe++):t=i,t!==i&&(je=e,t=oe()),e=t)),e}())!==i?(bt(),(n=et())!==i?(je=e,e=te(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=et()),e}function et(){var e,t,n;return e=Oe,(t=tt())!==i?(bt(),(n=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(yu),63===u.charCodeAt(Oe)?(t=h,Oe++):t=i,t!==i&&(je=e,t=ae()),(e=t)===i&&(e=Oe,n(_u),42===u.charCodeAt(Oe)?(t=F,Oe++):t=i,t!==i&&(je=e,t=se()),(e=t)===i&&(e=Oe,n($u),43===u.charCodeAt(Oe)?(t=d,Oe++):t=i,t!==i&&(je=e,t=ce()),e=t)),e}())!==i?(je=e,e=ie(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=tt()),e}function tt(){var e,t,n,r,o=function(u){0===Ne&&Xe(u)};return(e=function(){var e,t,n,r;return r=Hu,0===Ne&&Xe(r),Ne++,e=Oe,(t=ft())!==i?(105===u.charCodeAt(Oe)?(n=L,Oe++):n=i,n===i&&(n=null),je=e,e=de(t,n)):(Oe=e,e=i),Ne--,e}())===i&&(e=function(){var e,t,n,r,o,a,s;if(s=Mu,0===Ne&&Xe(s),Ne++,e=Oe,91===u.charCodeAt(Oe)?(t=z,Oe++):t=i,t!==i){for(94===u.charCodeAt(Oe)?(n=M,Oe++):n=i,n===i&&(n=null),r=[],o=ht();o!==i;)r.push(o),o=ht();93===u.charCodeAt(Oe)?(o=V,Oe++):o=i,o!==i?(105===u.charCodeAt(Oe)?(a=L,Oe++):a=i,a===i&&(a=null),je=e,e=ve(n,r,a)):(Oe=e,e=i)}else Oe=e,e=i;return Ne--,e}())===i&&(e=function(){var e,t,n;return e=Oe,n=Vu,0===Ne&&Xe(n),46===u.charCodeAt(Oe)?(t=eu,Oe++):t=i,t!==i&&(je=e,t=ke()),e=t}())===i&&(e=function(){var e,t,n,r,o,a,s,p,l;return e=Oe,(t=pt())!==i?(n=Oe,Ge(),r=Oe,o=bt(),a=Oe,(s=ft())!==i?(p=bt(),a=s=[s,p]):(Oe=a,a=i),a===i&&(a=null),l=vu,0===Ne&&Xe(l),61===u.charCodeAt(Oe)?(s=c,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i),Ye(!0),r===i?n=void 0:(Oe=n,n=i),n!==i?(je=e,e=le(t)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=function(){var e,t,n;return e=Oe,(t=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(bu),38===u.charCodeAt(Oe)?(t=E,Oe++):t=i,t!==i&&(je=e,t=fe()),(e=t)===i&&(e=Oe,n(Pu),33===u.charCodeAt(Oe)?(t=C,Oe++):t=i,t!==i&&(je=e,t=Ee()),e=t),e}())!==i?(bt(),(n=xt())!==i?(je=e,e=Ae(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Oe,o(Su),40===u.charCodeAt(Oe)?(t=g,Oe++):t=i,t!==i?(bt(),(n=Je())!==i?(bt(),o(ku),41===u.charCodeAt(Oe)?(r=v,Oe++):r=i,r!==i?(je=e,e=pe(n)):(Oe=e,e=i)):(Oe=e,e=i)):(Oe=e,e=i)),e}function nt(){var e,t;return t=Ru,0===Ne&&Xe(t),u.length>Oe?(e=u.charAt(Oe),Oe++):e=i,e}function rt(){var e,t;return t=Ou,0===Ne&&Xe(t),Ne++,9===u.charCodeAt(Oe)?(e=D,Oe++):e=i,e===i&&(11===u.charCodeAt(Oe)?(e=B,Oe++):e=i,e===i&&(12===u.charCodeAt(Oe)?(e=m,Oe++):e=i,e===i&&(32===u.charCodeAt(Oe)?(e=x,Oe++):e=i,e===i&&(160===u.charCodeAt(Oe)?(e=b,Oe++):e=i,e===i&&(65279===u.charCodeAt(Oe)?(e=P,Oe++):e=i,e===i&&(e=function(){var e;return gu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())))))),Ne--,e}function ot(){var e,t;return t=ju,0===Ne&&Xe(t),ou.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function it(){var e,t;return t=Tu,0===Ne&&Xe(t),Ne++,10===u.charCodeAt(Oe)?(e=y,Oe++):e=i,e===i&&(u.substr(Oe,2)===_?(e=_,Oe+=2):e=i,e===i&&(13===u.charCodeAt(Oe)?(e=$,Oe++):e=i,e===i&&(8232===u.charCodeAt(Oe)?(e=S,Oe++):e=i,e===i&&(8233===u.charCodeAt(Oe)?(e=k,Oe++):e=i)))),Ne--,e}function at(){var e,t;return t=Iu,0===Ne&&Xe(t),Ne++,(e=function(){var e,t,n,r,o,a,s;if(e=Oe,u.substr(Oe,2)===R?(t=R,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),u.substr(Oe,2)===O?(r=O,Oe+=2):r=i,r!==i?(je=e,e=Ce(n)):(Oe=e,e=i)}else Oe=e,e=i;return e}())===i&&(e=ct()),Ne--,e}function st(){var e,t,n,r,o,a,s,c=function(u){0===Ne&&Xe(u)};if(e=Oe,c(Nu),u.substr(Oe,2)===R?(t=R,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),c(wu),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,s===i&&(s=ot()),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),c(wu),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,s===i&&(s=ot()),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),c(wu),u.substr(Oe,2)===O?(r=O,Oe+=2):r=i,r!==i?(je=e,e=Ce(n)):(Oe=e,e=i)}else Oe=e,e=i;return e}function ct(){var e,t,n,r,o,a,s,c;if(e=Oe,c=Lu,0===Ne&&Xe(c),u.substr(Oe,2)===j?(t=j,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),s=ot(),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),s=ot(),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),je=e,e=he(n)}else Oe=e,e=i;return e}function pt(){var u,e,t,n,r;if(r=Uu,0===Ne&&Xe(r),Ne++,u=Oe,(e=lt())!==i){for(t=[],n=At();n!==i;)t.push(n),n=At();je=u,u=Fe(e,t)}else Oe=u,u=i;return Ne--,u}function lt(){var e,t,n;return(e=function(){var e;return(e=function(){var e;return fu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return cu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Au.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return pu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return lu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Fu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}()),e}())===i&&(36===u.charCodeAt(Oe)?(e=f,Oe++):e=i,e===i&&(95===u.charCodeAt(Oe)?(e=T,Oe++):e=i,e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=Dt())!==i?e=n:(Oe=e,e=i)))),e}function At(){var e;return(e=lt())===i&&(e=function(){var e;return(e=function(){var e;return Cu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Eu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}()),e}())===i&&(e=function(){var e;return hu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return du.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(8204===u.charCodeAt(Oe)?(e=N,Oe++):e=i,e===i&&(8205===u.charCodeAt(Oe)?(e=w,Oe++):e=i)),e}function ft(){var e,t,n,r,o;if(o=zu,0===Ne&&Xe(o),Ne++,e=Oe,34===u.charCodeAt(Oe)?(t=U,Oe++):t=i,t!==i){for(n=[],r=Et();r!==i;)n.push(r),r=Et();34===u.charCodeAt(Oe)?(r=U,Oe++):r=i,r!==i?(je=e,e=ge(n)):(Oe=e,e=i)}else Oe=e,e=i;if(e===i)if(e=Oe,39===u.charCodeAt(Oe)?(t=H,Oe++):t=i,t!==i){for(n=[],r=Ct();r!==i;)n.push(r),r=Ct();39===u.charCodeAt(Oe)?(r=H,Oe++):r=i,r!==i?(je=e,e=ge(n)):(Oe=e,e=i)}else Oe=e,e=i;return Ne--,e}function Et(){var e,t,n;return e=Oe,t=Oe,Ge(),34===u.charCodeAt(Oe)?(n=U,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function Ct(){var e,t,n;return e=Oe,t=Oe,Ge(),39===u.charCodeAt(Oe)?(n=H,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function ht(){var e;return(e=function(){var e,t,n,r;return e=Oe,(t=Ft())!==i?(45===u.charCodeAt(Oe)?(n=G,Oe++):n=i,n!==i&&(r=Ft())!==i?(je=e,e=De(t,r)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Ft()),e}function Ft(){var e,t,n;return e=Oe,t=Oe,Ge(),93===u.charCodeAt(Oe)?(n=V,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function dt(){var e,t;return e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&it()!==i?(je=e,e=Be()):(Oe=e,e=i),e}function gt(){var e,t,n,r;return(e=function(){var e;return(e=vt())===i&&(e=function(){var e,t,n;return e=Oe,t=Oe,Ge(),(n=function(){var e;return(e=vt())===i&&(e=Bt())===i&&(120===u.charCodeAt(Oe)?(e=Q,Oe++):e=i,e===i&&(117===u.charCodeAt(Oe)?(e=uu,Oe++):e=i)),e}())===i&&(n=ot()),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e}()),e}())===i&&(e=Oe,48===u.charCodeAt(Oe)?(t=X,Oe++):t=i,t!==i?(n=Oe,Ge(),r=Bt(),Ye(!0),r===i?n=void 0:(Oe=n,n=i),n!==i?(je=e,e=me()):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=function(){var e,t,n,r,o,a;return e=Oe,120===u.charCodeAt(Oe)?(t=Q,Oe++):t=i,t!==i?(n=Oe,r=Oe,(o=mt())!==i&&(a=mt())!==i?r=o=[o,a]:(Oe=r,r=i),(n=r!==i?u.substring(n,Oe):r)!==i?(je=e,e=Se(n)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Dt())),e}function vt(){var e,t;return 39===u.charCodeAt(Oe)?(e=H,Oe++):e=i,e===i&&(34===u.charCodeAt(Oe)?(e=U,Oe++):e=i,e===i&&(92===u.charCodeAt(Oe)?(e=I,Oe++):e=i,e===i&&(e=Oe,98===u.charCodeAt(Oe)?(t=Y,Oe++):t=i,t!==i&&(je=e,t=xe()),(e=t)===i&&(e=Oe,102===u.charCodeAt(Oe)?(t=W,Oe++):t=i,t!==i&&(je=e,t=be()),(e=t)===i&&(e=Oe,110===u.charCodeAt(Oe)?(t=q,Oe++):t=i,t!==i&&(je=e,t=Pe()),(e=t)===i&&(e=Oe,114===u.charCodeAt(Oe)?(t=J,Oe++):t=i,t!==i&&(je=e,t=ye()),(e=t)===i&&(e=Oe,116===u.charCodeAt(Oe)?(t=K,Oe++):t=i,t!==i&&(je=e,t=_e()),(e=t)===i&&(e=Oe,118===u.charCodeAt(Oe)?(t=Z,Oe++):t=i,t!==i&&(je=e,t=$e()),e=t)))))))),e}function Dt(){var e,t,n,r,o,a,s,c;return e=Oe,117===u.charCodeAt(Oe)?(t=uu,Oe++):t=i,t!==i?(n=Oe,r=Oe,(o=mt())!==i&&(a=mt())!==i&&(s=mt())!==i&&(c=mt())!==i?r=o=[o,a,s,c]:(Oe=r,r=i),(n=r!==i?u.substring(n,Oe):r)!==i?(je=e,e=Se(n)):(Oe=e,e=i)):(Oe=e,e=i),e}function Bt(){var e;return iu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function mt(){var e;return au.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function xt(){var e,t,n,r,o;return o=Gu,0===Ne&&Xe(o),Ne++,e=Oe,123===u.charCodeAt(Oe)?(t=tu,Oe++):t=i,t!==i?(n=function e(){var t,n,r,o,a,s;if(t=Oe,n=[],r=[],o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i),o!==i)for(;o!==i;)r.push(o),o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);else r=i;for(r===i&&(r=Oe,123===u.charCodeAt(Oe)?(o=tu,Oe++):o=i,o!==i?(a=e(),125===u.charCodeAt(Oe)?(s=nu,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i)):(Oe=r,r=i));r!==i;){if(n.push(r),r=[],o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i),o!==i)for(;o!==i;)r.push(o),o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);else r=i;r===i&&(r=Oe,123===u.charCodeAt(Oe)?(o=tu,Oe++):o=i,o!==i?(a=e(),125===u.charCodeAt(Oe)?(s=nu,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i)):(Oe=r,r=i))}return t=u.substring(t,Oe)}(),125===u.charCodeAt(Oe)?(r=nu,Oe++):r=i,r!==i?e=n:(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=Oe,123===u.charCodeAt(Oe)?(t=tu,Oe++):t=i,t!==i&&(je=e,t=Re()),e=t),Ne--,e}function bt(){var u,e;for(u=[],(e=rt())===i&&(e=it())===i&&(e=at());e!==i;)u.push(e),(e=rt())===i&&(e=it())===i&&(e=at());return u}function Pt(){var e,t,n,r,o;return e=Oe,t=bt(),o=Xu,0===Ne&&Xe(o),59===u.charCodeAt(Oe)?(n=ru,Oe++):n=i,n!==i?e=t=[t,n]:(Oe=e,e=i),e===i&&(e=Oe,t=function(){var u,e;for(u=[],(e=rt())===i&&(e=st());e!==i;)u.push(e),(e=rt())===i&&(e=st());return u}(),(n=ct())===i&&(n=null),(r=it())!==i?e=t=[t,n,r]:(Oe=e,e=i),e===i&&(e=Oe,t=bt(),(n=function(){var e,t,n;return e=Oe,Ge(),n=Ru,0===Ne&&Xe(n),u.length>Oe?(t=u.charAt(Oe),Oe++):t=i,Ye(!0),t===i?e=void 0:(Oe=e,e=i),e}())!==i?e=t=[t,n]:(Oe=e,e=i))),e}var yt=!0,_t={},$t=e.reservedWords||r.reservedWords;function St(u,e){var t=new n.Node(u,we());return null===e?t:(r.extend(t,e),r.enforceFastProperties(t))}Array.isArray($t)&&$t.forEach(function(u){_t[u]=!0});var kt,Rt,Ot=e.extractComments?{}:null;function jt(u,t){if(e.extractComments){var n=we();Ot[n.start.offset]={text:u,multiline:t,location:n}}return u}if(Ge(),(t=s())!==i&&Oe===u.length)return t;throw t!==i&&Oe2&&void 0!==arguments[2]?arguments[2]:{};switch("parser"===(t=h.processOptions(t,{allowedStartRules:[u.rules[0].name],cache:!1,context:{},dependencies:{},exportVar:null,features:null,format:"bare",header:null,optimize:"speed",output:"parser",trace:!1})).output&&(t.format="umd"),h.each(e.passes,function(n){n.forEach(function(n){n(u,e,t)})}),t.output){case"parser":return e.vm.evalModule(u.code,t.context);case"source":return u.code;default:e.error("Invalid output format: ".concat(t.output,"."))}}};u.exports=F},function(u,e,t){"use strict";u.exports=function(u,e,t){u.rules.forEach(function(u){u.reportFailures=!1});for(var n=t.allowedStartRules.map(function(e){var t=u.findRule(e);return t.reportFailures=!0,t}),r=e.buildVisitor({rule:function(u){r(u.expression)},named:function(){},rule_ref:function(e){var t=u.findRule(e.name);t.reportFailures||(t.reportFailures=!0,n.push(t))}});n.length>0;)r(n.pop())}},function(u,e,t){"use strict";var n=t(1);u.exports=function(u,e){var t,r=e.opcodes,o=[],i=[],a=[],s=[];function c(u){var e=JSON.stringify(u),t=n.findIndex(a,function(u){return JSON.stringify(u)===e});return-1===t?a.push(u)-1:t}function p(u,e,t){var r={predicate:u,params:e,body:t},o=JSON.stringify(r),i=n.findIndex(s,function(u){return JSON.stringify(u)===o});return-1===i?s.push(r)-1:i}var l=function(){var u;return(u=[]).concat.apply(u,arguments)};function A(u,e,t,n){return u>0?t:u<0?n:e.concat([t.length,n.length],t,n)}function f(u,e,t,o){var i=n.values(t,function(u){return o-u});return[r.CALL,u,e,i.length].concat(i)}function E(u,e,o){var i=0|u.match;return l([r.PUSH_CURR_POS],[r.EXPECT_NS_BEGIN],t(u,{sp:o.sp+1,env:n.clone(o.env),action:null,reportFailures:o.reportFailures}),[r.EXPECT_NS_END,e?1:0],A(e?-i:i,[e?r.IF_ERROR:r.IF_NOT_ERROR],l([r.POP],[e?r.POP:r.POP_CURR_POS],[r.PUSH_UNDEFINED]),l([r.POP],[e?r.POP_CURR_POS:r.POP],[r.PUSH_FAILED])))}function C(u,e,t){var n=p(!0,Object.keys(t.env),u.code);return l([r.UPDATE_SAVED_POS],f(n,0,t.env,t.sp),A(0|u.match,[r.IF],l([r.POP],e?[r.PUSH_FAILED]:[r.PUSH_UNDEFINED]),l([r.POP],e?[r.PUSH_UNDEFINED]:[r.PUSH_FAILED])))}function h(u){return e=[r.WHILE_NOT_ERROR],t=l([r.APPEND],u),e.concat([t.length],t);var e,t}(t=e.buildVisitor({grammar:function(u){u.rules.forEach(t),u.literals=o,u.classes=i,u.expectations=a,u.functions=s},rule:function(u){u.bytecode=t(u.expression,{sp:-1,env:{},action:null,reportFailures:u.reportFailures})},named:function(u,e){var n=e.reportFailures?c({type:"rule",value:u.name}):null,o=t(u.expression,{sp:e.sp,env:e.env,action:e.action,reportFailures:!1});return e.reportFailures?l([r.EXPECT,n],[r.SILENT_FAILS_ON],o,[r.SILENT_FAILS_OFF]):o},choice:function(u,e){return function u(e,o){return l(t(e[0],{sp:o.sp,env:n.clone(o.env),action:null,reportFailures:o.reportFailures}),e.length<2?[]:A(-(0|e[0].match),[r.IF_ERROR],l([r.POP],u(e.slice(1),o)),[]))}(u.alternatives,e)},action:function(u,e){var o=n.clone(e.env),i="sequence"!==u.expression.type||0===u.expression.elements.length,a=t(u.expression,{sp:e.sp+(i?1:0),env:o,action:u,reportFailures:e.reportFailures}),s=0|u.expression.match,c=i&&s>=0?p(!1,Object.keys(o),u.code):null;return!1===i?a:l([r.PUSH_CURR_POS],a,A(s,[r.IF_NOT_ERROR],l([r.LOAD_SAVED_POS,1],f(c,1,o,e.sp+2)),[]),[r.NIP])},sequence:function(u,e){var n=u.elements.length;return l([r.PUSH_CURR_POS],function u(e,o){if(e.length>0){var i=n-e.slice(1).length;return l(t(e[0],{sp:o.sp,env:o.env,pluck:o.pluck,action:null,reportFailures:o.reportFailures}),A(0|e[0].match,[r.IF_NOT_ERROR],u(e.slice(1),{sp:o.sp+1,env:o.env,pluck:o.pluck,action:o.action,reportFailures:o.reportFailures}),l(i>1?[r.POP_N,i]:[r.POP],[r.POP_CURR_POS],[r.PUSH_FAILED])))}return o.pluck.length>0?l([r.PLUCK,n+1,o.pluck.length],o.pluck.map(function(u){return o.sp-u})):o.action?l([r.LOAD_SAVED_POS,n],f(p(!1,Object.keys(o.env),o.action.code),n+1,o.env,o.sp)):l([r.WRAP,n],[r.NIP])}(u.elements,{sp:e.sp+1,env:e.env,pluck:[],action:e.action,reportFailures:e.reportFailures}))},labeled:function(u,e){var r=e.env,o=u.label,i=e.sp+1;return null!==o&&(r=n.clone(e.env),e.env[o]=i),e.pluck&&u.pick&&e.pluck.push(i),t(u.expression,{sp:e.sp,env:r,action:null,reportFailures:e.reportFailures})},text:function(u,e){return l([r.PUSH_CURR_POS],t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures}),A(0|u.expression.match,[r.IF_NOT_ERROR],l([r.POP],[r.TEXT]),[r.NIP]))},simple_and:function(u,e){return E(u.expression,!1,e)},simple_not:function(u,e){return E(u.expression,!0,e)},optional:function(u,e){return l(t(u.expression,{sp:e.sp,env:n.clone(e.env),action:null,reportFailures:e.reportFailures}),A(-(0|u.expression.match),[r.IF_ERROR],l([r.POP],[r.PUSH_NULL]),[]))},zero_or_more:function(u,e){var o=t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures});return l([r.PUSH_EMPTY_ARRAY],o,h(o),[r.POP])},one_or_more:function(u,e){var o=t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures});return l([r.PUSH_EMPTY_ARRAY],o,A(0|u.expression.match,[r.IF_NOT_ERROR],l(h(o),[r.POP]),l([r.POP],[r.POP],[r.PUSH_FAILED])))},group:function(u,e){return t(u.expression,{sp:e.sp,env:n.clone(e.env),action:null,reportFailures:e.reportFailures})},semantic_and:function(u,e){return C(u,!1,e)},semantic_not:function(u,e){return C(u,!0,e)},rule_ref:function(e){return[r.RULE,u.indexOfRule(e.name)]},literal:function(u,e){if(u.value.length>0){var t=0|u.match,n=0===t||t>0&&!u.ignoreCase?(a=u.ignoreCase?u.value.toLowerCase():u.value,-1===(s=o.indexOf(a))?o.push(a)-1:s):null,i=e.reportFailures?c({type:"literal",value:u.value,ignoreCase:u.ignoreCase}):null;return l(e.reportFailures?[r.EXPECT,i]:[],A(t,u.ignoreCase?[r.MATCH_STRING_IC,n]:[r.MATCH_STRING,n],u.ignoreCase?[r.ACCEPT_N,u.value.length]:[r.ACCEPT_STRING,n],[r.PUSH_FAILED]))}var a,s;return[r.PUSH_EMPTY_STRING]},class:function(u,e){var t=0|u.match,o=0===t?function(u){var e={value:u.parts,inverted:u.inverted,ignoreCase:u.ignoreCase},t=JSON.stringify(e),r=n.findIndex(i,function(u){return JSON.stringify(u)===t});return-1===r?i.push(e)-1:r}(u):null,a=e.reportFailures?c({type:"class",value:u.parts,inverted:u.inverted,ignoreCase:u.ignoreCase}):null;return l(e.reportFailures?[r.EXPECT,a]:[],A(t,[r.MATCH_CLASS,o],[r.ACCEPT_N,1],[r.PUSH_FAILED]))},any:function(u,e){var t=e.reportFailures?c({type:"any"}):null;return l(e.reportFailures?[r.EXPECT,t]:[],A(0|u.match,[r.MATCH_ANY],[r.ACCEPT_N,1],[r.PUSH_FAILED]))}}))(u)}},function(u,e,t){"use strict";var n=t(1),r=t(13).version;u.exports=function(u,e,t){var o=e.opcodes,i=t.features||{};function a(u,e){return u in i?!!i[u]:null==e||!!e}var s=/^([^`\r\n]+?(?:`[^`]*?`[^\r\n]*?)?)$/gm;function c(u){return u.replace(s," $1")}function p(u){return u.replace(s," $1")}var l=function(u){return"peg$c"+u},A=function(u){return"peg$r"+u},f=function(u){return"peg$e"+u},E=function(u){return"peg$f"+u};function C(e,n){var r=[];return r.push(["","var rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);","}",""].join("\n")),t.trace&&r.push(["peg$tracer.trace({",' type: "rule.enter",'," rule: "+e+","," location: peg$computeLocation(startPos, startPos)","});",""].join("\n")),t.cache&&(r.push(["var key = peg$currPos * "+u.rules.length+" + "+n+";","var cached = peg$resultsCache[key];","var rule$expectations = [];","","rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);"," rule$expectations.push(expected);","}","","if (cached) {"," peg$currPos = cached.nextPos;",""," rule$expectations = cached.expectations;"," if (peg$silentFails === 0) {"," rule$expectations.forEach(peg$expect);"," }",""].join("\n")),t.trace&&r.push(["if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+e+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+e+","," location: peg$computeLocation(startPos, startPos)"," });","}",""].join("\n")),r.push([" return cached.result;","}",""].join("\n"))),r.join("\n")}function h(u,e){var n=[];return t.cache&&n.push(["","peg$resultsCache[key] = {"," nextPos: peg$currPos,"," result: "+e+","," expectations: rule$expectations","};"].join("\n")),t.trace&&n.push(["","if ("+e+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+u+","," result: "+e+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+u+","," location: peg$computeLocation(startPos, startPos)"," });","}"].join("\n")),n.push(["","return "+e+";"].join("\n")),n.join("\n")}u.code=function(u){function e(){var u="// Generated by PEG.js v".concat(r,", https://pegjs.org/"),e=t.header;return"string"==typeof e?u+="\n\n"+e:Array.isArray(e)&&(u+="\n\n",e.forEach(function(e){u+="// "+e})),u}function o(){return t.trace&&a("DefaultTracer")?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join("\n"):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join("\n")}return{bare:function(){return[e(),"(function() {",' "use strict";',"",c(u),"",c("return "+o()+";"),"})()"].join("\n")},commonjs:function(){var r=[],i=Object.keys(t.dependencies);return r.push([e(),"",'"use strict";',""].join("\n")),i.length>0&&(i.forEach(function(u){r.push("var "+u+' = require("'+n.stringEscape(t.dependencies[u])+'");')}),r.push("")),r.push([u,"","module.exports = "+o()+";",""].join("\n")),r.join("\n")},es:function(){var r=[],i=Object.keys(t.dependencies);return r.push(e(),""),i.length>0&&(i.forEach(function(u){r.push("import "+u+' from "'+n.stringEscape(t.dependencies[u])+'";')}),r.push("")),r.push(u,"","export "+(t.trace&&a("DefaultTracer")?["{"," peg$SyntaxError as SyntaxError,"," peg$DefaultTracer as DefaultTracer,"," peg$parse as parse","}"].join("\n"):["{"," peg$SyntaxError as SyntaxError,"," peg$parse as parse","}"].join("\n"))+";","","export default "+o()+";",""),r.join("\n")},amd:function(){var r=Object.keys(t.dependencies),i="["+r.map(function(u){return t.dependencies[u]}).map(function(u){return'"'.concat(n.stringEscape(u),'"')}).join(", ")+"]",a=r.join(", ");return[e(),"define("+i+", function("+a+") {",' "use strict";',"",c(u),"",c("return "+o()+";"),"});",""].join("\n")},globals:function(){return[e(),"(function(root) {",' "use strict";',"",c(u),"",c("root."+t.exportVar+" = "+o()+";"),"})(this);",""].join("\n")},umd:function(){var r=[],i=Object.keys(t.dependencies),a=i.map(function(u){return t.dependencies[u]}),s="["+a.map(function(u){return'"'.concat(n.stringEscape(u),'"')}).join(", ")+"]",p=a.map(function(u){return'require("'.concat(n.stringEscape(u),'")')}).join(", "),l=i.map(function(u){return"root."+u}).join(", "),A=i.join(", ");return r.push([e(),"(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+s+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+p+");"].join("\n")),null!==t.exportVar&&r.push([" } else {"," root."+t.exportVar+" = factory("+l+");"].join("\n")),r.push([" }","})(this, function("+A+") {",' "use strict";',"",c(u),"",c("return "+o()+";"),"});",""].join("\n")),r.join("\n")}}[t.format]()}(function(){var r=[];if(r.push(["function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," this.message = message;"," this.expected = expected;"," this.found = found;"," this.location = location;",' this.name = "SyntaxError";',""," // istanbul ignore next",' if (typeof Error.captureStackTrace === "function") {'," Error.captureStackTrace(this, peg$SyntaxError);"," }","}","","peg$subclass(peg$SyntaxError, Error);","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," },",""," not: function(expectation) {",' return "not " + describeExpectation(expectation.expected);'," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""].join("\n")),t.trace&&(a("DefaultTracer")?r.push(["function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," // istanbul ignore next"," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};",""].join("\n")):r.push(["var peg$FauxTracer = {"," trace: function(event) { }","};",""].join("\n"))),r.push(["function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};",""].join("\n")),"size"===t.optimize){var i="{ "+t.allowedStartRules.map(function(e){return e+": "+u.indexOfRule(e)}).join(", ")+" }",s=u.indexOfRule(t.allowedStartRules[0]);r.push([" var peg$startRuleIndices = "+i+";"," var peg$startRuleIndex = "+s+";"].join("\n"))}else{var F="{ "+t.allowedStartRules.map(function(u){return u+": peg$parse"+u}).join(", ")+" }",d="peg$parse"+t.allowedStartRules[0];r.push([" var peg$startRuleFunctions = "+F+";"," var peg$startRuleFunction = "+d+";"].join("\n"))}if(r.push(""),r.push(c(function(){function r(u){return'"'.concat(n.stringEscape(u),'"')}function o(u){return"/^["+(u.inverted?"^":"")+u.value.map(function(u){return Array.isArray(u)?n.regexpEscape(u[0])+"-"+n.regexpEscape(u[1]):n.regexpEscape(u)}).join("")+"]/"+(u.ignoreCase?"i":"")}function i(u){switch(u.type){case"rule":return'peg$otherExpectation("'.concat(n.stringEscape(u.value),'")');case"literal":return'peg$literalExpectation("'+n.stringEscape(u.value)+'", '+u.ignoreCase+")";case"class":return"peg$classExpectation(["+u.value.map(function(u){return Array.isArray(u)?'["'.concat(n.stringEscape(u[0]),'", "').concat(n.stringEscape(u[1]),'"]'):'"'.concat(n.stringEscape(u),'"')}).join(", ")+"], "+u.inverted+", "+u.ignoreCase+")";case"any":return"peg$anyExpectation()";default:e.fatal("Unknown expectation type (".concat(JSON.stringify(u),")"))}}function a(u){return"function(".concat(u.params.join(", "),") {").concat(u.body,"}")}return"size"===t.optimize?["var peg$literals = [",c(u.literals.map(r).join(",\n")),"];","var peg$regexps = [",c(u.classes.map(o).join(",\n")),"];","var peg$expectations = [",c(u.expectations.map(i).join(",\n")),"];","var peg$functions = [",c(u.functions.map(a).join(",\n")),"];","","var peg$bytecode = [",c(u.rules.map(function(u){return'peg$decode("'.concat(n.stringEscape(u.bytecode.map(function(u){return String.fromCharCode(u+32)}).join("")),'")')}).join(",\n")),"];"].join("\n"):u.literals.map(function(u,e){return"var "+l(e)+" = "+r(u)+";"}).concat("",u.classes.map(function(u,e){return"var "+A(e)+" = "+o(u)+";"})).concat("",u.expectations.map(function(u,e){return"var "+f(e)+" = "+i(u)+";"})).concat("",u.functions.map(function(u,e){return"var "+E(e)+" = "+a(u)+";"})).join("\n")}())),r.push([""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$expected = [];"," var peg$silentFails = 0;",""].join("\n")),t.cache&&r.push([" var peg$resultsCache = {};",""].join("\n")),t.trace){if("size"===t.optimize){var g="["+u.rules.map(function(u){return'"'.concat(n.stringEscape(u.name),'"')}).join(", ")+"]";r.push([" var peg$ruleNames = "+g+";",""].join("\n"))}a("DefaultTracer")?r.push([' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""].join("\n")):r.push([' var peg$tracer = "tracer" in options ? options.tracer : peg$FauxTracer;',""].join("\n"))}return r.push([" var peg$result;",""].join("\n")),"size"===t.optimize?r.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleIndices)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleIndex = peg$startRuleIndices[options.startRule];"," }"].join("\n")):r.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }"].join("\n")),a("text")&&r.push([""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }"].join("\n")),a("offset")&&r.push([""," function offset() {"," return peg$savedPos;"," }"].join("\n")),a("range")&&r.push([""," function range() {"," return [peg$savedPos, peg$currPos];"," }"].join("\n")),a("location")&&r.push([""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }"].join("\n")),a("expected")&&r.push([""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }"].join("\n")),a("error")&&r.push([""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }"].join("\n")),r.push([""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }","",a("filename")?' var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;':""," function peg$computeLocation(startPos, endPos) {"," var loc = {};","",a("filename")?" if ( peg$VALIDFILENAME ) loc.filename = options.filename;":"",""," var startPosDetails = peg$computePosDetails(startPos);"," loc.start = {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," };",""," var endPosDetails = peg$computePosDetails(endPos);"," loc.end = {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," };",""," return loc;"," }",""," function peg$begin() {"," peg$expected.push({ pos: peg$currPos, variants: [] });"," }",""," function peg$expect(expected) {"," var top = peg$expected[peg$expected.length - 1];",""," if (peg$currPos < top.pos) { return; }",""," if (peg$currPos > top.pos) {"," top.pos = peg$currPos;"," top.variants = [];"," }",""," top.variants.push(expected);"," }",""," function peg$end(invert) {"," var expected = peg$expected.pop();"," var top = peg$expected[peg$expected.length - 1];"," var variants = expected.variants;",""," if (top.pos !== expected.pos) { return; }",""," if (invert) {"," variants = variants.map(function(e) {",' return e.type === "not" ? e.expected : { type: "not", expected: e };'," });"," }",""," Array.prototype.push.apply(top.variants, variants);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""," function peg$buildError() {"," var expected = peg$expected[0];"," var failPos = expected.pos;",""," return peg$buildStructuredError("," expected.variants,"," failPos < input.length ? input.charAt(failPos) : null,"," failPos < input.length"," ? peg$computeLocation(failPos, failPos + 1)"," : peg$computeLocation(failPos, failPos)"," );"," }",""].join("\n")),"size"===t.optimize?(r.push(c(function(){var u,e=[];function n(u,e){var t=e+3,n="bc[ip + "+(t-2)+"]",r="bc[ip + "+(t-1)+"]";return["ends.push(end);","ips.push(ip + "+t+" + "+n+" + "+r+");","","if ("+u+") {"," end = ip + "+t+" + "+n+";"," ip += "+t+";","} else {"," end = ip + "+t+" + "+n+" + "+r+";"," ip += "+t+" + "+n+";","}","","break;"].join("\n")}return e.push(["function peg$decode(s) {",' return s.split("").map(function(ch) { return ch.charCodeAt(0) - 32; });',"}","","function peg$parseRule(index) {"].join("\n")),t.trace?e.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var startPos = peg$currPos;"," var params, paramsLength, paramsN;"].join("\n")):e.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var params, paramsLength, paramsN;"].join("\n")),e.push(c(C("peg$ruleNames[index]","index"))),e.push([" while (true) {"," while (ip < end) {"," switch (bc[ip]) {"," case "+o.PUSH_EMPTY_STRING+":"," stack.push('');"," ip++;"," break;",""," case "+o.PUSH_UNDEFINED+":"," stack.push(undefined);"," ip++;"," break;",""," case "+o.PUSH_NULL+":"," stack.push(null);"," ip++;"," break;",""," case "+o.PUSH_FAILED+":"," stack.push(peg$FAILED);"," ip++;"," break;",""," case "+o.PUSH_EMPTY_ARRAY+":"," stack.push([]);"," ip++;"," break;",""," case "+o.PUSH_CURR_POS+":"," stack.push(peg$currPos);"," ip++;"," break;",""," case "+o.POP+":"," stack.pop();"," ip++;"," break;",""," case "+o.POP_CURR_POS+":"," peg$currPos = stack.pop();"," ip++;"," break;",""," case "+o.POP_N+":"," stack.length -= bc[ip + 1];"," ip += 2;"," break;",""," case "+o.NIP+":"," stack.splice(-2, 1);"," ip++;"," break;",""," case "+o.APPEND+":"," stack[stack.length - 2].push(stack.pop());"," ip++;"," break;",""," case "+o.WRAP+":"," stack.push(stack.splice(stack.length - bc[ip + 1], bc[ip + 1]));"," ip += 2;"," break;",""," case "+o.TEXT+":"," stack.push(input.substring(stack.pop(), peg$currPos));"," ip++;"," break;",""," case "+o.PLUCK+":"," paramsLength = bc[ip + 2];"," paramsN = 3 + paramsLength",""," params = bc.slice(ip + 3, ip + paramsN);"," params = paramsLength === 1"," ? stack[stack.length - 1 - params[ 0 ]]"," : params.map(function(p) { return stack[stack.length - 1 - p]; });",""," stack.splice("," stack.length - bc[ip + 1],"," bc[ip + 1],"," params"," );",""," ip += paramsN;"," break;",""," case "+o.IF+":",p(n("stack[stack.length - 1]",0)),""," case "+o.IF_ERROR+":",p(n("stack[stack.length - 1] === peg$FAILED",0)),""," case "+o.IF_NOT_ERROR+":",p(n("stack[stack.length - 1] !== peg$FAILED",0)),""," case "+o.WHILE_NOT_ERROR+":",p((u="stack[stack.length - 1] !== peg$FAILED",["if ("+u+") {"," ends.push(end);"," ips.push(ip);",""," end = ip + 2 + bc[ip + 1];"," ip += 2;","} else {"," ip += 2 + bc[ip + 1];","}","","break;"].join("\n"))),""," case "+o.MATCH_ANY+":",p(n("input.length > peg$currPos",0)),""," case "+o.MATCH_STRING+":",p(n("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length) === peg$literals[bc[ip + 1]]",1)),""," case "+o.MATCH_STRING_IC+":",p(n("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length).toLowerCase() === peg$literals[bc[ip + 1]]",1)),""," case "+o.MATCH_CLASS+":",p(n("peg$regexps[bc[ip + 1]].test(input.charAt(peg$currPos))",1)),""," case "+o.ACCEPT_N+":"," stack.push(input.substr(peg$currPos, bc[ip + 1]));"," peg$currPos += bc[ip + 1];"," ip += 2;"," break;",""," case "+o.ACCEPT_STRING+":"," stack.push(peg$literals[bc[ip + 1]]);"," peg$currPos += peg$literals[bc[ip + 1]].length;"," ip += 2;"," break;",""," case "+o.EXPECT+":"," rule$expects(peg$expectations[bc[ip + 1]]);"," ip += 2;"," break;",""," case "+o.LOAD_SAVED_POS+":"," peg$savedPos = stack[stack.length - 1 - bc[ip + 1]];"," ip += 2;"," break;",""," case "+o.UPDATE_SAVED_POS+":"," peg$savedPos = peg$currPos;"," ip++;"," break;",""," case "+o.CALL+":",p(["params = bc.slice(ip + 4, ip + 4 + bc[ip + 3])"," .map(function(p) { return stack[stack.length - 1 - p]; });","","stack.splice("," stack.length - bc[ip + 2],"," bc[ip + 2],"," peg$functions[bc[ip + 1]].apply(null, params)",");","","ip += 4 + bc[ip + 3];","break;"].join("\n")),""," case "+o.RULE+":"," stack.push(peg$parseRule(bc[ip + 1]));"," ip += 2;"," break;",""," case "+o.SILENT_FAILS_ON+":"," peg$silentFails++;"," ip++;"," break;",""," case "+o.SILENT_FAILS_OFF+":"," peg$silentFails--;"," ip++;"," break;",""," case "+o.EXPECT_NS_BEGIN+":"," peg$begin();"," ip++;"," break;",""," case "+o.EXPECT_NS_END+":"," peg$end(bc[ip + 1]);"," ip += 2;"," break;",""," // istanbul ignore next"," default:"," throw new Error(",' "Rule #" + index + "'+(t.trace?" ('\" + peg$ruleNames[ index ] + \"')":"")+', position " + ip + ": "',' + "Invalid opcode " + bc[ip] + "."'," );"," }"," }",""," if (ends.length > 0) {"," end = ends.pop();"," ip = ips.pop();"," } else {"," break;"," }"," }"].join("\n")),e.push(c(h("peg$ruleNames[index]","stack[0]"))),e.push("}"),e.join("\n")}())),r.push("")):u.rules.forEach(function(i){r.push(c(function(r){var i=[],a=[];function s(u){return u<0&&e.fatal("Rule '"+r.name+"': Var stack underflow: attempt to use var at index "+u),"s"+u}var p={sp:-1,maxSp:-1,push:function(u){var e=s(++this.sp)+" = "+u+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),e},pop:function(u){if(void 0===u)return s(this.sp--);for(var e=Array(u),t=0;t0&&(p.sp=h,a=t(n.slice(g,g+C)),l=p.sp,g+=C,s!==l&&e.fatal("Rule '"+r.name+"', position "+A+": Branches of a condition can't move the stack pointer differently (before: "+h+", after then: "+s+", after else: "+l+").")),D.push("if ("+u+") {"),D.push(c(i)),C>0&&(D.push("} else {"),D.push(c(a))),D.push("}")}function m(){var u=n[g+4-1],e=E(n[g+1])+"("+n.slice(g+4,g+4+u).map(function(u){return p.index(u)}).join(", ")+")";p.pop(n[g+2]),D.push(p.push(e)),g+=4+u}for(;g peg$currPos",0);break;case o.MATCH_STRING:B(u.literals[n[g+1]].length>1?"input.substr(peg$currPos, "+u.literals[n[g+1]].length+") === "+l(n[g+1]):"input.charCodeAt(peg$currPos) === "+u.literals[n[g+1]].charCodeAt(0),1);break;case o.MATCH_STRING_IC:B("input.substr(peg$currPos, "+u.literals[n[g+1]].length+").toLowerCase() === "+l(n[g+1]),1);break;case o.MATCH_CLASS:B(A(n[g+1])+".test(input.charAt(peg$currPos))",1);break;case o.ACCEPT_N:D.push(p.push(n[g+1]>1?"input.substr(peg$currPos, "+n[g+1]+")":"input.charAt(peg$currPos)")),D.push(n[g+1]>1?"peg$currPos += "+n[g+1]+";":"peg$currPos++;"),g+=2;break;case o.ACCEPT_STRING:D.push(p.push(l(n[g+1]))),D.push(u.literals[n[g+1]].length>1?"peg$currPos += "+u.literals[n[g+1]].length+";":"peg$currPos++;"),g+=2;break;case o.EXPECT:D.push("rule$expects("+f(n[g+1])+");"),g+=2;break;case o.LOAD_SAVED_POS:D.push("peg$savedPos = "+p.index(n[g+1])+";"),g+=2;break;case o.UPDATE_SAVED_POS:D.push("peg$savedPos = peg$currPos;"),g++;break;case o.CALL:m();break;case o.RULE:D.push(p.push("peg$parse"+u.rules[n[g+1]].name+"()")),g+=2;break;case o.SILENT_FAILS_ON:D.push("peg$silentFails++;"),g++;break;case o.SILENT_FAILS_OFF:D.push("peg$silentFails--;"),g++;break;case o.EXPECT_NS_BEGIN:D.push("peg$begin();"),g++;break;case o.EXPECT_NS_END:D.push("peg$end("+(0!==n[g+1])+");"),g+=2;break;default:e.fatal("Rule '"+r.name+"', position "+g+": Invalid opcode "+n[g]+".")}return D.join("\n")}(r.bytecode);i.push("function peg$parse"+r.name+"() {"),t.trace&&i.push(" var startPos = peg$currPos;");for(var d=0;d<=p.maxSp;d++)a[d]=s(d);return i.push(" var "+a.join(", ")+";"),i.push(c(C('"'+n.stringEscape(r.name)+'"',u.indexOfRule(r.name)))),i.push(c(F)),i.push(c(h('"'+n.stringEscape(r.name)+'"',s(0)))),i.push("}"),i.join("\n")}(i))),r.push("")}),u.initializer&&(r.push(c(u.initializer.code)),r.push("")),r.push(" peg$begin();"),"size"===t.optimize?r.push(" peg$result = peg$parseRule(peg$startRuleIndex);"):r.push(" peg$result = peg$startRuleFunction();"),r.push([""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$expect(peg$endExpectation());"," }",""," throw peg$buildError();"," }","}"].join("\n")),r.join("\n")}())}},function(u,e,t){"use strict";u.exports=function(u,e,t){var n=e.buildVisitor({rule_ref:function(u,e,t){u.name===e&&(u.name=t)}}),r=t.allowedStartRules,o=[];u.rules.forEach(function(e){var t;"rule"===(t=e).type&&"rule_ref"===t.expression.type&&(n(u,e.name,e.expression.name),r.indexOf(e.name)<0)||o.push(e)}),u.rules=o}},function(u,e,t){"use strict";var n=t(1),r=Object.prototype.hasOwnProperty;u.exports=function(u,e){var t;function o(u,e){t(u.expression,n.clone(e))}(t=e.buildVisitor({rule:function(u){t(u.expression,{})},choice:function(u,e){u.alternatives.forEach(function(u){t(u,n.clone(e))})},action:o,labeled:function(u,n){var o=u.label;if(o&&r.call(n,o)){var i=n[o].start;e.error('Label "'.concat(o,'" is already defined at line ').concat(i.line,", column ").concat(i.column,"."),u.location)}t(u.expression,n),o&&(n[o]=u.location)},text:o,simple_and:o,simple_not:o,optional:o,zero_or_more:o,one_or_more:o,group:o}))(u)}},function(u,e,t){"use strict";var n=Object.prototype.hasOwnProperty;u.exports=function(u,e){var t={};e.buildVisitor({rule:function(u){var r=u.name;if(n.call(t,r)){var o=t[r].start;e.error('Rule "'.concat(r,'" is already defined at line ').concat(o.line,", column ").concat(o.column,"."),u.location)}t[u.name]=u.location}})(u)}},function(u,e,t){"use strict";u.exports=function(u,e,t){var n={};function r(u){n[u.name||u]=!0}t.allowedStartRules.forEach(r),e.buildVisitor({rule_ref:r})(u),u.rules.forEach(function(u){!0!==n[u.name]&&e.warn('Rule "'.concat(u.name,'" is not referenced.'),u.location)})}},function(u,e,t){"use strict";u.exports=function(u,e){var t=[],n=e.buildVisitor({rule:function(u){t.push(u.name),n(u.expression),t.pop(u.name)},sequence:function(e){e.elements.every(function(e){return n(e),!u.alwaysConsumesOnSuccess(e)})},rule_ref:function(r){if(-1!==t.indexOf(r.name)){t.push(r.name);var o=t.join(" -> ");e.error("Possible infinite loop when parsing (left recursion: ".concat(o,")."),r.location)}n(u.findRule(r.name))}});n(u)}},function(u,e,t){"use strict";u.exports=function(u,e){e.buildVisitor({zero_or_more:function(t){u.alwaysConsumesOnSuccess(t.expression)||e.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",t.location)},one_or_more:function(t){u.alwaysConsumesOnSuccess(t.expression)||e.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",t.location)}})(u)}},function(u,e,t){"use strict";u.exports=function(u,e,t){e.buildVisitor({rule_ref:function(t){u.findRule(t.name)||e.error('Rule "'.concat(t.name,'" is not defined.'),t.location)}})(u),t.allowedStartRules.forEach(function(t){u.findRule(t)||e.error('Start rule "'.concat(t,'" is not defined.'))})}},function(u,e,t){"use strict";u.exports=function(u,e){var t;function n(u){return u.match=0,u.match}function r(u){return t(u.expression),u.match=1,u.match}function o(u){return u.match=t(u.expression),u.match}function i(u,e){for(var n=u.length,r=0,o=0,i=0;i0&&++r,a<0&&++o}return r===n?1:e?o===n?-1:0:o>0?-1:0}(t=e.buildVisitor({rule:function(u){var n,r=0;if(void 0===u.match){u.match=0;do{n=u.match,u.match=t(u.expression),++r>6&&e.error("Infinity cycle detected when trying to evaluate node match result",u.location)}while(n!==u.match)}return u.match},named:o,choice:function(u){return u.match=i(u.alternatives,!0),u.match},action:o,sequence:function(u){return u.match=i(u.elements,!1),u.match},labeled:o,text:o,simple_and:o,simple_not:function(u){return u.match=-t(u.expression),u.match},optional:r,zero_or_more:r,one_or_more:o,group:o,semantic_and:n,semantic_not:n,rule_ref:function(e){var n=u.findRule(e.name);return e.match=t(n),e.match},literal:function(u){return u.match=0===u.value.length?1:0,u.match},class:function(u){return u.match=0===u.parts.length?-1:0,u.match},any:n}))(u)}},function(u,e,t){"use strict";u.exports=function(u,e){e.buildVisitor({action:function(u){this.visit(u.expression,!0)},labeled:function(u,t){var n;!0===u.pick&&(!0===t&&e.error('"@" cannot be used with an action block.',u.location),("semantic_and"===(n=u.expression.type)||"semantic_not"===n)&&e.error('"@" cannot be used on a semantic predicate.',u.location),this.visit(u.expression))}})(u)}},function(u,e,t){"use strict";function n(u,e){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{};!function(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),this.opcodes=e.opcodes||i,this.parser=e.parser||a,this.passes=e.passes||{},this.visitor=e.visitor||r.visitor,this.vm=e.vm||s,"function"==typeof e.warn&&(this.warn=e.warn),"function"==typeof e.error&&(this.error=e.error),Object.defineProperty(this,"fatal",{value:c})}var e,t,o;return e=u,(t=[{key:"parse",value:function(u,e){return this.parser.parse(u,e)}},{key:"buildVisitor",value:function(u){return this.visitor.build(u)}},{key:"warn",value:function(u,e){}},{key:"error",value:function(u,e){c(u,e)}}])&&n(e.prototype,t),o&&n(e,o),u}();u.exports=p},function(u,e,t){"use strict";u.exports={PUSH_EMPTY_STRING:0,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:41,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CLASS:20,ACCEPT_N:21,ACCEPT_STRING:22,EXPECT:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29,EXPECT_NS_BEGIN:38,EXPECT_NS_END:39}},,,,,,,,,,,function(u,e,t){"use strict";var n=t(49),r=t(50);$("#run").click(function(){var u=$("#results-table");function e(e,t,n,r,o){u.append("\n \n \n ").concat(null!==n?"":"","\n ").concat(t,"\n ").concat(null!==n?"":"","\n \n \n \n ").concat((r/1024).toFixed(2),"\n \n  kB\n \n \n \n ").concat(o.toFixed(2),"\n \n  ms\n \n \n \n ").concat((r/1024/(o/1e3)).toFixed(2),"\n \n  kB/s\n \n \n "))}var t=parseInt($("#run-count").val(),10),o={cache:$("#cache").is(":checked"),optimize:$("#optimize").val()};isNaN(t)||t<=0?alert("Number of runs must be a positive integer."):n.run(r,t,o,{readFile:function(u){return $.ajax({type:"GET",url:"/"+u,dataType:"text",async:!1}).responseText},testStart:function(){},testFinish:function(u,t,n,r){e("individual",t.title,"benchmark/"+u.id+"/"+t.file,n,r)},benchmarkStart:function(e){u.append("\n \n \n ").concat(e.title,' \n \n "\n '))},benchmarkFinish:function(u,t,n){e("benchmark-total",u.title+" total",null,t,n)},start:function(){$("#run-count, #cache, #run").attr("disabled","disabled"),u.show(),$("#results-table tr").slice(1).remove()},finish:function(u,t){e("total","Total",null,u,t),$.scrollTo("max",{axis:"y",duration:500}),$("#run-count, #cache, #run").removeAttr("disabled")}})}),$(document).ready(function(){return $("#run").focus()})},function(u,e,t){"use strict";var n=t(0),r={run:function(u,e,t,r){var o={functions:[],add:function(u){this.functions.push(u)},run:function(){this.functions.length>0&&(this.functions.shift()(),setTimeout(function(){o.run()},0))}},i={};o.add(function(){r.start(),i.totalInputSize=0,i.totalParseTime=0}),u.forEach(function(u){o.add(function(u){return function(){r.benchmarkStart(u),i.parser=n.generate(r.readFile("examples/"+u.id+".pegjs"),t),i.benchmarkInputSize=0,i.benchmarkParseTime=0}}(u)),u.tests.forEach(function(t){o.add(function(u,t){return function(){r.testStart(u,t);for(var n=r.readFile("benchmark/"+u.id+"/"+t.file),o=0,a=0;a1&&void 0!==arguments[1]?arguments[1]:{},t=new o.Session({passes:a.convertPasses(o.passes)});return Array.isArray(e.plugins)&&e.plugins.forEach(function(u){"function"==typeof u.use&&u.use(t,e)}),o.compile(t.parse(u,e.parser||{}),t,e)}};u.exports=s},function(u,e,t){"use strict";var n=t(19),r=t(20),o=t(21),i=t(11),a=function(){function u(u){return Array.isArray(u)?u:o.values(u)}return function(e){return o.map(e,u)}}();u.exports={find:n.find,findIndex:n.findIndex,stringEscape:r.stringEscape,regexpEscape:r.regexpEscape,reservedWords:r.reservedWords,clone:o.clone,each:o.each,extend:o.extend,map:o.map,values:o.values,enforceFastProperties:o.enforceFastProperties,evalModule:i.evalModule,convertPasses:a,processOptions:function(u,e){var t={};return o.extend(t,u),o.extend(t,e),t},noop:function(){}}},,,,function(u,e,t){"use strict";e.visitor=t(10),e.Node=t(12),e.Grammar=t(22)},,,,function(u,e,t){"use strict";u.exports=function u(e,t){!function(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),this.name="GrammarError",this.message=e,this.location=t,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,u)}},function(u,e,t){"use strict";function n(u,e){for(var t=0;t1?n-1:0),o=1;o1?t-1:0),r=1;r1?t-1:0),r=1;r (https://majda.cz/)","Futago-za Ryuu "],types:"typings/pegjs.d.ts",main:"lib/peg.js",bin:"bin/peg.js",engines:{node:">= 6"}}},function(u,e,t){"use strict";var n=t(5),r=t(1);function o(u,e,t,n){this.message=u,this.expected=e,this.found=t,this.location=n,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,o)}!function(u,e){function t(){this.constructor=u}t.prototype=e.prototype,u.prototype=new t}(o,Error),o.buildMessage=function(u,e){var t={literal:function(u){return'"'+r(u.text)+'"'},class:function(u){var e=u.parts.map(function(u){return Array.isArray(u)?o(u[0])+"-"+o(u[1]):o(u)});return"["+(u.inverted?"^":"")+e+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(u){return u.description},not:function(u){return"not "+i(u.expected)}};function n(u){return u.charCodeAt(0).toString(16).toUpperCase()}function r(u){return u.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function o(u){return u.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+n(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+n(u)})}function i(u){return t[u.type](u)}return"Expected "+function(u){var e,t,n=u.map(i);if(n.sort(),n.length>0){for(e=1,t=1;et.charCodeAt(0)&&Le("Invalid character range: "+u.substring(je,Oe)+"."),[e,t]},Be=function(){return""},me=function(){return"\0"},xe=function(){return"\b"},be=function(){return"\f"},Pe=function(){return"\n"},ye=function(){return"\r"},_e=function(){return"\t"},$e=function(){return"\v"},Se=function(u){return String.fromCharCode(parseInt(u,16))},ke=function(){return St("any")},Re=function(){Le("Unbalanced brace.")},Oe=0,je=0,Te=[{line:1,column:1}],Ie=[],Ne=0;if("startRule"in e){if(!(e.startRule in a))throw new Error("Can't start parsing from rule \""+e.startRule+'".');s=a[e.startRule]}function we(){return Ve(je,Oe)}function Le(u,e){throw function(u,e){return new o(u,null,null,e)}(u,e=void 0!==e?e:Ve(je,Oe))}function Ue(u,e){return{type:"literal",text:u,ignoreCase:e}}function He(u){return{type:"other",description:u}}function ze(e){var t,n=Te[e];if(n)return n;for(t=e-1;!Te[t];)t--;for(n={line:(n=Te[t]).line,column:n.column};t0;function Ve(u,t){var n={};Me&&(n.filename=e.filename);var r=ze(u);n.start={offset:u,line:r.line,column:r.column};var o=ze(t);return n.end={offset:t,line:o.line,column:o.column},n}function Ge(){Ie.push({pos:Oe,variants:[]})}function Xe(u){var e=Ie[Ie.length-1];Oee.pos&&(e.pos=Oe,e.variants=[]),e.variants.push(u))}function Ye(u){var e=Ie.pop(),t=Ie[Ie.length-1],n=e.variants;t.pos===e.pos&&(u&&(n=n.map(function(u){return"not"===u.type?u.expected:{type:"not",expected:u}})),Array.prototype.push.apply(t.variants,n))}function We(){var u,e,t,n,r;if(u=Oe,bt(),e=Oe,(t=function(){var u,e;return u=Oe,(e=xt())!==i&&Pt()!==i?(je=u,u=Wu(e)):(Oe=u,u=i),u}())!==i?(n=bt(),e=t):(Oe=e,e=i),e===i&&(e=null),t=[],n=Oe,(r=qe())!==i?(bt(),n=r):(Oe=n,n=i),n!==i)for(;n!==i;)t.push(n),n=Oe,(r=qe())!==i?(bt(),n=r):(Oe=n,n=i);else t=i;return t!==i?(je=u,u=Yu(e,t)):(Oe=u,u=i),u}function qe(){var e,t,n,r,o,a;return e=Oe,(t=pt())!==i?(bt(),n=Oe,(r=ft())!==i?(bt(),n=r):(Oe=n,n=i),n===i&&(n=null),a=vu,0===Ne&&Xe(a),61===u.charCodeAt(Oe)?(r=c,Oe++):r=i,r!==i?(bt(),(o=Je())!==i&&Pt()!==i?(je=e,e=qu(t,n,o)):(Oe=e,e=i)):(Oe=e,e=i)):(Oe=e,e=i),e}function Je(){var e,t,n,r,o,a,s=function(u){0===Ne&&Xe(u)};if(e=Oe,(t=Ke())!==i){for(n=[],r=Oe,bt(),s(Du),47===u.charCodeAt(Oe)?(o=p,Oe++):o=i,o!==i?(bt(),(a=Ke())!==i?r=a:(Oe=r,r=i)):(Oe=r,r=i);r!==i;)n.push(r),r=Oe,bt(),s(Du),47===u.charCodeAt(Oe)?(o=p,Oe++):o=i,o!==i?(bt(),(a=Ke())!==i?r=a:(Oe=r,r=i)):(Oe=r,r=i);je=e,e=Ju(t,n)}else Oe=e,e=i;return e}function Ke(){var u,e,t,n;return u=Oe,(e=function(){var u,e,t,n,r;if(u=Oe,(e=Ze())!==i){for(t=[],n=Oe,bt(),(r=Ze())!==i?n=r:(Oe=n,n=i);n!==i;)t.push(n),n=Oe,bt(),(r=Ze())!==i?n=r:(Oe=n,n=i);je=u,u=Zu(e,t)}else Oe=u,u=i;return u}())!==i?(t=Oe,bt(),(n=xt())!==i?t=n:(Oe=t,t=i),t===i&&(t=null),je=u,u=Ku(e,t)):(Oe=u,u=i),u}function Ze(){var e,t,n,r,o,a;return e=Oe,a=Bu,0===Ne&&Xe(a),64===u.charCodeAt(Oe)?(t=l,Oe++):t=i,t!==i?((n=Qe())===i&&(n=null),r=bt(),(o=ut())!==i?(je=e,e=Qu(n,o)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=Oe,(t=Qe())!==i?(n=bt(),(r=ut())!==i?(je=e,e=ue(t,r)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=ut())),e}function Qe(){var e,t,n,r;return e=Oe,(t=pt())!==i?(bt(),r=mu,0===Ne&&Xe(r),58===u.charCodeAt(Oe)?(n=A,Oe++):n=i,n!==i?(je=e,e=ee(t)):(Oe=e,e=i)):(Oe=e,e=i),e}function ut(){var e,t,n;return e=Oe,(t=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(xu),36===u.charCodeAt(Oe)?(t=f,Oe++):t=i,t!==i&&(je=e,t=ne()),(e=t)===i&&(e=Oe,n(bu),38===u.charCodeAt(Oe)?(t=E,Oe++):t=i,t!==i&&(je=e,t=re()),(e=t)===i&&(e=Oe,n(Pu),33===u.charCodeAt(Oe)?(t=C,Oe++):t=i,t!==i&&(je=e,t=oe()),e=t)),e}())!==i?(bt(),(n=et())!==i?(je=e,e=te(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=et()),e}function et(){var e,t,n;return e=Oe,(t=tt())!==i?(bt(),(n=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(yu),63===u.charCodeAt(Oe)?(t=h,Oe++):t=i,t!==i&&(je=e,t=ae()),(e=t)===i&&(e=Oe,n(_u),42===u.charCodeAt(Oe)?(t=F,Oe++):t=i,t!==i&&(je=e,t=se()),(e=t)===i&&(e=Oe,n($u),43===u.charCodeAt(Oe)?(t=d,Oe++):t=i,t!==i&&(je=e,t=ce()),e=t)),e}())!==i?(je=e,e=ie(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=tt()),e}function tt(){var e,t,n,r,o=function(u){0===Ne&&Xe(u)};return(e=function(){var e,t,n,r;return r=Hu,0===Ne&&Xe(r),Ne++,e=Oe,(t=ft())!==i?(105===u.charCodeAt(Oe)?(n=L,Oe++):n=i,n===i&&(n=null),je=e,e=de(t,n)):(Oe=e,e=i),Ne--,e}())===i&&(e=function(){var e,t,n,r,o,a,s;if(s=Mu,0===Ne&&Xe(s),Ne++,e=Oe,91===u.charCodeAt(Oe)?(t=z,Oe++):t=i,t!==i){for(94===u.charCodeAt(Oe)?(n=M,Oe++):n=i,n===i&&(n=null),r=[],o=ht();o!==i;)r.push(o),o=ht();93===u.charCodeAt(Oe)?(o=V,Oe++):o=i,o!==i?(105===u.charCodeAt(Oe)?(a=L,Oe++):a=i,a===i&&(a=null),je=e,e=ve(n,r,a)):(Oe=e,e=i)}else Oe=e,e=i;return Ne--,e}())===i&&(e=function(){var e,t,n;return e=Oe,n=Vu,0===Ne&&Xe(n),46===u.charCodeAt(Oe)?(t=eu,Oe++):t=i,t!==i&&(je=e,t=ke()),e=t}())===i&&(e=function(){var e,t,n,r,o,a,s,p,l;return e=Oe,(t=pt())!==i?(n=Oe,Ge(),r=Oe,o=bt(),a=Oe,(s=ft())!==i?(p=bt(),a=s=[s,p]):(Oe=a,a=i),a===i&&(a=null),l=vu,0===Ne&&Xe(l),61===u.charCodeAt(Oe)?(s=c,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i),Ye(!0),r===i?n=void 0:(Oe=n,n=i),n!==i?(je=e,e=le(t)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=function(){var e,t,n;return e=Oe,(t=function(){var e,t,n=function(u){0===Ne&&Xe(u)};return e=Oe,n(bu),38===u.charCodeAt(Oe)?(t=E,Oe++):t=i,t!==i&&(je=e,t=fe()),(e=t)===i&&(e=Oe,n(Pu),33===u.charCodeAt(Oe)?(t=C,Oe++):t=i,t!==i&&(je=e,t=Ee()),e=t),e}())!==i?(bt(),(n=xt())!==i?(je=e,e=Ae(t,n)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Oe,o(Su),40===u.charCodeAt(Oe)?(t=g,Oe++):t=i,t!==i?(bt(),(n=Je())!==i?(bt(),o(ku),41===u.charCodeAt(Oe)?(r=v,Oe++):r=i,r!==i?(je=e,e=pe(n)):(Oe=e,e=i)):(Oe=e,e=i)):(Oe=e,e=i)),e}function nt(){var e,t;return t=Ru,0===Ne&&Xe(t),u.length>Oe?(e=u.charAt(Oe),Oe++):e=i,e}function rt(){var e,t;return t=Ou,0===Ne&&Xe(t),Ne++,9===u.charCodeAt(Oe)?(e=D,Oe++):e=i,e===i&&(11===u.charCodeAt(Oe)?(e=B,Oe++):e=i,e===i&&(12===u.charCodeAt(Oe)?(e=m,Oe++):e=i,e===i&&(32===u.charCodeAt(Oe)?(e=x,Oe++):e=i,e===i&&(160===u.charCodeAt(Oe)?(e=b,Oe++):e=i,e===i&&(65279===u.charCodeAt(Oe)?(e=P,Oe++):e=i,e===i&&(e=function(){var e;return gu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())))))),Ne--,e}function ot(){var e,t;return t=ju,0===Ne&&Xe(t),ou.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function it(){var e,t;return t=Tu,0===Ne&&Xe(t),Ne++,10===u.charCodeAt(Oe)?(e=y,Oe++):e=i,e===i&&(u.substr(Oe,2)===_?(e=_,Oe+=2):e=i,e===i&&(13===u.charCodeAt(Oe)?(e=$,Oe++):e=i,e===i&&(8232===u.charCodeAt(Oe)?(e=S,Oe++):e=i,e===i&&(8233===u.charCodeAt(Oe)?(e=k,Oe++):e=i)))),Ne--,e}function at(){var e,t;return t=Iu,0===Ne&&Xe(t),Ne++,(e=function(){var e,t,n,r,o,a,s;if(e=Oe,u.substr(Oe,2)===R?(t=R,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),u.substr(Oe,2)===O?(r=O,Oe+=2):r=i,r!==i?(je=e,e=Ce(n)):(Oe=e,e=i)}else Oe=e,e=i;return e}())===i&&(e=ct()),Ne--,e}function st(){var e,t,n,r,o,a,s,c=function(u){0===Ne&&Xe(u)};if(e=Oe,c(Nu),u.substr(Oe,2)===R?(t=R,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),c(wu),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,s===i&&(s=ot()),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),c(wu),u.substr(Oe,2)===O?(s=O,Oe+=2):s=i,s===i&&(s=ot()),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),c(wu),u.substr(Oe,2)===O?(r=O,Oe+=2):r=i,r!==i?(je=e,e=Ce(n)):(Oe=e,e=i)}else Oe=e,e=i;return e}function ct(){var e,t,n,r,o,a,s,c;if(e=Oe,c=Lu,0===Ne&&Xe(c),u.substr(Oe,2)===j?(t=j,Oe+=2):t=i,t!==i){for(n=Oe,r=[],o=Oe,a=Oe,Ge(),s=ot(),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);o!==i;)r.push(o),o=Oe,a=Oe,Ge(),s=ot(),Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);n=u.substring(n,Oe),je=e,e=he(n)}else Oe=e,e=i;return e}function pt(){var u,e,t,n,r;if(r=Uu,0===Ne&&Xe(r),Ne++,u=Oe,(e=lt())!==i){for(t=[],n=At();n!==i;)t.push(n),n=At();je=u,u=Fe(e,t)}else Oe=u,u=i;return Ne--,u}function lt(){var e,t,n;return(e=function(){var e;return(e=function(){var e;return fu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return cu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Au.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return pu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return lu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Fu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}()),e}())===i&&(36===u.charCodeAt(Oe)?(e=f,Oe++):e=i,e===i&&(95===u.charCodeAt(Oe)?(e=T,Oe++):e=i,e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=Dt())!==i?e=n:(Oe=e,e=i)))),e}function At(){var e;return(e=lt())===i&&(e=function(){var e;return(e=function(){var e;return Cu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return Eu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}()),e}())===i&&(e=function(){var e;return hu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(e=function(){var e;return du.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}())===i&&(8204===u.charCodeAt(Oe)?(e=N,Oe++):e=i,e===i&&(8205===u.charCodeAt(Oe)?(e=w,Oe++):e=i)),e}function ft(){var e,t,n,r,o;if(o=zu,0===Ne&&Xe(o),Ne++,e=Oe,34===u.charCodeAt(Oe)?(t=U,Oe++):t=i,t!==i){for(n=[],r=Et();r!==i;)n.push(r),r=Et();34===u.charCodeAt(Oe)?(r=U,Oe++):r=i,r!==i?(je=e,e=ge(n)):(Oe=e,e=i)}else Oe=e,e=i;if(e===i)if(e=Oe,39===u.charCodeAt(Oe)?(t=H,Oe++):t=i,t!==i){for(n=[],r=Ct();r!==i;)n.push(r),r=Ct();39===u.charCodeAt(Oe)?(r=H,Oe++):r=i,r!==i?(je=e,e=ge(n)):(Oe=e,e=i)}else Oe=e,e=i;return Ne--,e}function Et(){var e,t,n;return e=Oe,t=Oe,Ge(),34===u.charCodeAt(Oe)?(n=U,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function Ct(){var e,t,n;return e=Oe,t=Oe,Ge(),39===u.charCodeAt(Oe)?(n=H,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function ht(){var e;return(e=function(){var e,t,n,r;return e=Oe,(t=Ft())!==i?(45===u.charCodeAt(Oe)?(n=G,Oe++):n=i,n!==i&&(r=Ft())!==i?(je=e,e=De(t,r)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Ft()),e}function Ft(){var e,t,n;return e=Oe,t=Oe,Ge(),93===u.charCodeAt(Oe)?(n=V,Oe++):n=i,n===i&&(92===u.charCodeAt(Oe)?(n=I,Oe++):n=i,n===i&&(n=ot())),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e===i&&(e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&(n=gt())!==i?e=n:(Oe=e,e=i),e===i&&(e=dt())),e}function dt(){var e,t;return e=Oe,92===u.charCodeAt(Oe)?(t=I,Oe++):t=i,t!==i&&it()!==i?(je=e,e=Be()):(Oe=e,e=i),e}function gt(){var e,t,n,r;return(e=function(){var e;return(e=vt())===i&&(e=function(){var e,t,n;return e=Oe,t=Oe,Ge(),(n=function(){var e;return(e=vt())===i&&(e=Bt())===i&&(120===u.charCodeAt(Oe)?(e=Q,Oe++):e=i,e===i&&(117===u.charCodeAt(Oe)?(e=uu,Oe++):e=i)),e}())===i&&(n=ot()),Ye(!0),n===i?t=void 0:(Oe=t,t=i),t!==i&&(n=nt())!==i?e=n:(Oe=e,e=i),e}()),e}())===i&&(e=Oe,48===u.charCodeAt(Oe)?(t=X,Oe++):t=i,t!==i?(n=Oe,Ge(),r=Bt(),Ye(!0),r===i?n=void 0:(Oe=n,n=i),n!==i?(je=e,e=me()):(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=function(){var e,t,n,r,o,a;return e=Oe,120===u.charCodeAt(Oe)?(t=Q,Oe++):t=i,t!==i?(n=Oe,r=Oe,(o=mt())!==i&&(a=mt())!==i?r=o=[o,a]:(Oe=r,r=i),(n=r!==i?u.substring(n,Oe):r)!==i?(je=e,e=Se(n)):(Oe=e,e=i)):(Oe=e,e=i),e}())===i&&(e=Dt())),e}function vt(){var e,t;return 39===u.charCodeAt(Oe)?(e=H,Oe++):e=i,e===i&&(34===u.charCodeAt(Oe)?(e=U,Oe++):e=i,e===i&&(92===u.charCodeAt(Oe)?(e=I,Oe++):e=i,e===i&&(e=Oe,98===u.charCodeAt(Oe)?(t=Y,Oe++):t=i,t!==i&&(je=e,t=xe()),(e=t)===i&&(e=Oe,102===u.charCodeAt(Oe)?(t=W,Oe++):t=i,t!==i&&(je=e,t=be()),(e=t)===i&&(e=Oe,110===u.charCodeAt(Oe)?(t=q,Oe++):t=i,t!==i&&(je=e,t=Pe()),(e=t)===i&&(e=Oe,114===u.charCodeAt(Oe)?(t=J,Oe++):t=i,t!==i&&(je=e,t=ye()),(e=t)===i&&(e=Oe,116===u.charCodeAt(Oe)?(t=K,Oe++):t=i,t!==i&&(je=e,t=_e()),(e=t)===i&&(e=Oe,118===u.charCodeAt(Oe)?(t=Z,Oe++):t=i,t!==i&&(je=e,t=$e()),e=t)))))))),e}function Dt(){var e,t,n,r,o,a,s,c;return e=Oe,117===u.charCodeAt(Oe)?(t=uu,Oe++):t=i,t!==i?(n=Oe,r=Oe,(o=mt())!==i&&(a=mt())!==i&&(s=mt())!==i&&(c=mt())!==i?r=o=[o,a,s,c]:(Oe=r,r=i),(n=r!==i?u.substring(n,Oe):r)!==i?(je=e,e=Se(n)):(Oe=e,e=i)):(Oe=e,e=i),e}function Bt(){var e;return iu.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function mt(){var e;return au.test(u.charAt(Oe))?(e=u.charAt(Oe),Oe++):e=i,e}function xt(){var e,t,n,r,o;return o=Gu,0===Ne&&Xe(o),Ne++,e=Oe,123===u.charCodeAt(Oe)?(t=tu,Oe++):t=i,t!==i?(n=function e(){var t,n,r,o,a,s;if(t=Oe,n=[],r=[],o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i),o!==i)for(;o!==i;)r.push(o),o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);else r=i;for(r===i&&(r=Oe,123===u.charCodeAt(Oe)?(o=tu,Oe++):o=i,o!==i?(a=e(),125===u.charCodeAt(Oe)?(s=nu,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i)):(Oe=r,r=i));r!==i;){if(n.push(r),r=[],o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i),o!==i)for(;o!==i;)r.push(o),o=Oe,a=Oe,Ge(),su.test(u.charAt(Oe))?(s=u.charAt(Oe),Oe++):s=i,Ye(!0),s===i?a=void 0:(Oe=a,a=i),a!==i&&(s=nt())!==i?o=a=[a,s]:(Oe=o,o=i);else r=i;r===i&&(r=Oe,123===u.charCodeAt(Oe)?(o=tu,Oe++):o=i,o!==i?(a=e(),125===u.charCodeAt(Oe)?(s=nu,Oe++):s=i,s!==i?r=o=[o,a,s]:(Oe=r,r=i)):(Oe=r,r=i))}return t=u.substring(t,Oe)}(),125===u.charCodeAt(Oe)?(r=nu,Oe++):r=i,r!==i?e=n:(Oe=e,e=i)):(Oe=e,e=i),e===i&&(e=Oe,123===u.charCodeAt(Oe)?(t=tu,Oe++):t=i,t!==i&&(je=e,t=Re()),e=t),Ne--,e}function bt(){var u,e;for(u=[],(e=rt())===i&&(e=it())===i&&(e=at());e!==i;)u.push(e),(e=rt())===i&&(e=it())===i&&(e=at());return u}function Pt(){var e,t,n,r,o;return e=Oe,t=bt(),o=Xu,0===Ne&&Xe(o),59===u.charCodeAt(Oe)?(n=ru,Oe++):n=i,n!==i?e=t=[t,n]:(Oe=e,e=i),e===i&&(e=Oe,t=function(){var u,e;for(u=[],(e=rt())===i&&(e=st());e!==i;)u.push(e),(e=rt())===i&&(e=st());return u}(),(n=ct())===i&&(n=null),(r=it())!==i?e=t=[t,n,r]:(Oe=e,e=i),e===i&&(e=Oe,t=bt(),(n=function(){var e,t,n;return e=Oe,Ge(),n=Ru,0===Ne&&Xe(n),u.length>Oe?(t=u.charAt(Oe),Oe++):t=i,Ye(!0),t===i?e=void 0:(Oe=e,e=i),e}())!==i?e=t=[t,n]:(Oe=e,e=i))),e}var yt=!0,_t={},$t=e.reservedWords||r.reservedWords;function St(u,e){var t=new n.Node(u,we());return null===e?t:(r.extend(t,e),r.enforceFastProperties(t))}Array.isArray($t)&&$t.forEach(function(u){_t[u]=!0});var kt,Rt,Ot=e.extractComments?{}:null;function jt(u,t){if(e.extractComments){var n=we();Ot[n.start.offset]={text:u,multiline:t,location:n}}return u}if(Ge(),(t=s())!==i&&Oe===u.length)return t;throw t!==i&&Oe2&&void 0!==arguments[2]?arguments[2]:{};switch("parser"===(t=h.processOptions(t,{allowedStartRules:[u.rules[0].name],cache:!1,context:{},dependencies:{},exportVar:null,features:null,format:"bare",header:null,optimize:"speed",output:"parser",trace:!1})).output&&(t.format="umd"),h.each(e.passes,function(n){n.forEach(function(n){n(u,e,t)})}),t.output){case"parser":return e.vm.evalModule(u.code,t.context);case"source":return u.code;default:e.error("Invalid output format: ".concat(t.output,"."))}}};u.exports=F},function(u,e,t){"use strict";u.exports=function(u,e,t){u.rules.forEach(function(u){u.reportFailures=!1});for(var n=t.allowedStartRules.map(function(e){var t=u.findRule(e);return t.reportFailures=!0,t}),r=e.buildVisitor({rule:function(u){r(u.expression)},named:function(){},rule_ref:function(e){var t=u.findRule(e.name);t.reportFailures||(t.reportFailures=!0,n.push(t))}});n.length>0;)r(n.pop())}},function(u,e,t){"use strict";var n=t(1);u.exports=function(u,e){var t,r=e.opcodes,o=[],i=[],a=[],s=[];function c(u){var e=JSON.stringify(u),t=n.findIndex(a,function(u){return JSON.stringify(u)===e});return-1===t?a.push(u)-1:t}function p(u,e,t){var r={predicate:u,params:e,body:t},o=JSON.stringify(r),i=n.findIndex(s,function(u){return JSON.stringify(u)===o});return-1===i?s.push(r)-1:i}var l=function(){var u;return(u=[]).concat.apply(u,arguments)};function A(u,e,t,n){return u>0?t:u<0?n:e.concat([t.length,n.length],t,n)}function f(u,e,t,o){var i=n.values(t,function(u){return o-u});return[r.CALL,u,e,i.length].concat(i)}function E(u,e,o){var i=0|u.match;return l([r.PUSH_CURR_POS],[r.EXPECT_NS_BEGIN],t(u,{sp:o.sp+1,env:n.clone(o.env),action:null,reportFailures:o.reportFailures}),[r.EXPECT_NS_END,e?1:0],A(e?-i:i,[e?r.IF_ERROR:r.IF_NOT_ERROR],l([r.POP],[e?r.POP:r.POP_CURR_POS],[r.PUSH_UNDEFINED]),l([r.POP],[e?r.POP_CURR_POS:r.POP],[r.PUSH_FAILED])))}function C(u,e,t){var n=p(!0,Object.keys(t.env),u.code);return l([r.UPDATE_SAVED_POS],f(n,0,t.env,t.sp),A(0|u.match,[r.IF],l([r.POP],e?[r.PUSH_FAILED]:[r.PUSH_UNDEFINED]),l([r.POP],e?[r.PUSH_UNDEFINED]:[r.PUSH_FAILED])))}function h(u){return e=[r.WHILE_NOT_ERROR],t=l([r.APPEND],u),e.concat([t.length],t);var e,t}(t=e.buildVisitor({grammar:function(u){u.rules.forEach(t),u.literals=o,u.classes=i,u.expectations=a,u.functions=s},rule:function(u){u.bytecode=t(u.expression,{sp:-1,env:{},action:null,reportFailures:u.reportFailures})},named:function(u,e){var n=e.reportFailures?c({type:"rule",value:u.name}):null,o=t(u.expression,{sp:e.sp,env:e.env,action:e.action,reportFailures:!1});return e.reportFailures?l([r.EXPECT,n],[r.SILENT_FAILS_ON],o,[r.SILENT_FAILS_OFF]):o},choice:function(u,e){return function u(e,o){return l(t(e[0],{sp:o.sp,env:n.clone(o.env),action:null,reportFailures:o.reportFailures}),e.length<2?[]:A(-(0|e[0].match),[r.IF_ERROR],l([r.POP],u(e.slice(1),o)),[]))}(u.alternatives,e)},action:function(u,e){var o=n.clone(e.env),i="sequence"!==u.expression.type||0===u.expression.elements.length,a=t(u.expression,{sp:e.sp+(i?1:0),env:o,action:u,reportFailures:e.reportFailures}),s=0|u.expression.match,c=i&&s>=0?p(!1,Object.keys(o),u.code):null;return!1===i?a:l([r.PUSH_CURR_POS],a,A(s,[r.IF_NOT_ERROR],l([r.LOAD_SAVED_POS,1],f(c,1,o,e.sp+2)),[]),[r.NIP])},sequence:function(u,e){var n=u.elements.length;return l([r.PUSH_CURR_POS],function u(e,o){if(e.length>0){var i=n-e.slice(1).length;return l(t(e[0],{sp:o.sp,env:o.env,pluck:o.pluck,action:null,reportFailures:o.reportFailures}),A(0|e[0].match,[r.IF_NOT_ERROR],u(e.slice(1),{sp:o.sp+1,env:o.env,pluck:o.pluck,action:o.action,reportFailures:o.reportFailures}),l(i>1?[r.POP_N,i]:[r.POP],[r.POP_CURR_POS],[r.PUSH_FAILED])))}return o.pluck.length>0?l([r.PLUCK,n+1,o.pluck.length],o.pluck.map(function(u){return o.sp-u})):o.action?l([r.LOAD_SAVED_POS,n],f(p(!1,Object.keys(o.env),o.action.code),n+1,o.env,o.sp)):l([r.WRAP,n],[r.NIP])}(u.elements,{sp:e.sp+1,env:e.env,pluck:[],action:e.action,reportFailures:e.reportFailures}))},labeled:function(u,e){var r=e.env,o=u.label,i=e.sp+1;return null!==o&&(r=n.clone(e.env),e.env[o]=i),e.pluck&&u.pick&&e.pluck.push(i),t(u.expression,{sp:e.sp,env:r,action:null,reportFailures:e.reportFailures})},text:function(u,e){return l([r.PUSH_CURR_POS],t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures}),A(0|u.expression.match,[r.IF_NOT_ERROR],l([r.POP],[r.TEXT]),[r.NIP]))},simple_and:function(u,e){return E(u.expression,!1,e)},simple_not:function(u,e){return E(u.expression,!0,e)},optional:function(u,e){return l(t(u.expression,{sp:e.sp,env:n.clone(e.env),action:null,reportFailures:e.reportFailures}),A(-(0|u.expression.match),[r.IF_ERROR],l([r.POP],[r.PUSH_NULL]),[]))},zero_or_more:function(u,e){var o=t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures});return l([r.PUSH_EMPTY_ARRAY],o,h(o),[r.POP])},one_or_more:function(u,e){var o=t(u.expression,{sp:e.sp+1,env:n.clone(e.env),action:null,reportFailures:e.reportFailures});return l([r.PUSH_EMPTY_ARRAY],o,A(0|u.expression.match,[r.IF_NOT_ERROR],l(h(o),[r.POP]),l([r.POP],[r.POP],[r.PUSH_FAILED])))},group:function(u,e){return t(u.expression,{sp:e.sp,env:n.clone(e.env),action:null,reportFailures:e.reportFailures})},semantic_and:function(u,e){return C(u,!1,e)},semantic_not:function(u,e){return C(u,!0,e)},rule_ref:function(e){return[r.RULE,u.indexOfRule(e.name)]},literal:function(u,e){if(u.value.length>0){var t=0|u.match,n=0===t||t>0&&!u.ignoreCase?(a=u.ignoreCase?u.value.toLowerCase():u.value,-1===(s=o.indexOf(a))?o.push(a)-1:s):null,i=e.reportFailures?c({type:"literal",value:u.value,ignoreCase:u.ignoreCase}):null;return l(e.reportFailures?[r.EXPECT,i]:[],A(t,u.ignoreCase?[r.MATCH_STRING_IC,n]:[r.MATCH_STRING,n],u.ignoreCase?[r.ACCEPT_N,u.value.length]:[r.ACCEPT_STRING,n],[r.PUSH_FAILED]))}var a,s;return[r.PUSH_EMPTY_STRING]},class:function(u,e){var t=0|u.match,o=0===t?function(u){var e={value:u.parts,inverted:u.inverted,ignoreCase:u.ignoreCase},t=JSON.stringify(e),r=n.findIndex(i,function(u){return JSON.stringify(u)===t});return-1===r?i.push(e)-1:r}(u):null,a=e.reportFailures?c({type:"class",value:u.parts,inverted:u.inverted,ignoreCase:u.ignoreCase}):null;return l(e.reportFailures?[r.EXPECT,a]:[],A(t,[r.MATCH_CLASS,o],[r.ACCEPT_N,1],[r.PUSH_FAILED]))},any:function(u,e){var t=e.reportFailures?c({type:"any"}):null;return l(e.reportFailures?[r.EXPECT,t]:[],A(0|u.match,[r.MATCH_ANY],[r.ACCEPT_N,1],[r.PUSH_FAILED]))}}))(u)}},function(u,e,t){"use strict";var n=t(1),r=t(13).version;u.exports=function(u,e,t){var o=e.opcodes,i=t.features||{};function a(u,e){return u in i?!!i[u]:null==e||!!e}var s=/^([^`\r\n]+?(?:`[^`]*?`[^\r\n]*?)?)$/gm;function c(u){return u.replace(s," $1")}function p(u){return u.replace(s," $1")}var l=function(u){return"peg$c"+u},A=function(u){return"peg$r"+u},f=function(u){return"peg$e"+u},E=function(u){return"peg$f"+u};function C(e,n){var r=[];return r.push(["","var rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);","}",""].join("\n")),t.trace&&r.push(["peg$tracer.trace({",' type: "rule.enter",'," rule: "+e+","," location: peg$computeLocation(startPos, startPos)","});",""].join("\n")),t.cache&&(r.push(["var key = peg$currPos * "+u.rules.length+" + "+n+";","var cached = peg$resultsCache[key];","var rule$expectations = [];","","rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);"," rule$expectations.push(expected);","}","","if (cached) {"," peg$currPos = cached.nextPos;",""," rule$expectations = cached.expectations;"," if (peg$silentFails === 0) {"," rule$expectations.forEach(peg$expect);"," }",""].join("\n")),t.trace&&r.push(["if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+e+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+e+","," location: peg$computeLocation(startPos, startPos)"," });","}",""].join("\n")),r.push([" return cached.result;","}",""].join("\n"))),r.join("\n")}function h(u,e){var n=[];return t.cache&&n.push(["","peg$resultsCache[key] = {"," nextPos: peg$currPos,"," result: "+e+","," expectations: rule$expectations","};"].join("\n")),t.trace&&n.push(["","if ("+e+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+u+","," result: "+e+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+u+","," location: peg$computeLocation(startPos, startPos)"," });","}"].join("\n")),n.push(["","return "+e+";"].join("\n")),n.join("\n")}u.code=function(u){function e(){var u="// Generated by PEG.js v".concat(r,", https://pegjs.org/"),e=t.header;return"string"==typeof e?u+="\n\n"+e:Array.isArray(e)&&(u+="\n\n",e.forEach(function(e){u+="// "+e})),u}function o(){return t.trace&&a("DefaultTracer")?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join("\n"):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join("\n")}return{bare:function(){return[e(),"(function() {",' "use strict";',"",c(u),"",c("return "+o()+";"),"})()"].join("\n")},commonjs:function(){var r=[],i=Object.keys(t.dependencies);return r.push([e(),"",'"use strict";',""].join("\n")),i.length>0&&(i.forEach(function(u){r.push("var "+u+' = require("'+n.stringEscape(t.dependencies[u])+'");')}),r.push("")),r.push([u,"","module.exports = "+o()+";",""].join("\n")),r.join("\n")},es:function(){var r=[],i=Object.keys(t.dependencies);return r.push(e(),""),i.length>0&&(i.forEach(function(u){r.push("import "+u+' from "'+n.stringEscape(t.dependencies[u])+'";')}),r.push("")),r.push(u,"","export "+(t.trace&&a("DefaultTracer")?["{"," peg$SyntaxError as SyntaxError,"," peg$DefaultTracer as DefaultTracer,"," peg$parse as parse","}"].join("\n"):["{"," peg$SyntaxError as SyntaxError,"," peg$parse as parse","}"].join("\n"))+";","","export default "+o()+";",""),r.join("\n")},amd:function(){var r=Object.keys(t.dependencies),i="["+r.map(function(u){return t.dependencies[u]}).map(function(u){return'"'.concat(n.stringEscape(u),'"')}).join(", ")+"]",a=r.join(", ");return[e(),"define("+i+", function("+a+") {",' "use strict";',"",c(u),"",c("return "+o()+";"),"});",""].join("\n")},globals:function(){return[e(),"(function(root) {",' "use strict";',"",c(u),"",c("root."+t.exportVar+" = "+o()+";"),"})(this);",""].join("\n")},umd:function(){var r=[],i=Object.keys(t.dependencies),a=i.map(function(u){return t.dependencies[u]}),s="["+a.map(function(u){return'"'.concat(n.stringEscape(u),'"')}).join(", ")+"]",p=a.map(function(u){return'require("'.concat(n.stringEscape(u),'")')}).join(", "),l=i.map(function(u){return"root."+u}).join(", "),A=i.join(", ");return r.push([e(),"(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+s+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+p+");"].join("\n")),null!==t.exportVar&&r.push([" } else {"," root."+t.exportVar+" = factory("+l+");"].join("\n")),r.push([" }","})(this, function("+A+") {",' "use strict";',"",c(u),"",c("return "+o()+";"),"});",""].join("\n")),r.join("\n")}}[t.format]()}(function(){var r=[];if(r.push(["function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," this.message = message;"," this.expected = expected;"," this.found = found;"," this.location = location;",' this.name = "SyntaxError";',""," // istanbul ignore next",' if (typeof Error.captureStackTrace === "function") {'," Error.captureStackTrace(this, peg$SyntaxError);"," }","}","","peg$subclass(peg$SyntaxError, Error);","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," },",""," not: function(expectation) {",' return "not " + describeExpectation(expectation.expected);'," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""].join("\n")),t.trace&&(a("DefaultTracer")?r.push(["function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," // istanbul ignore next"," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};",""].join("\n")):r.push(["var peg$FauxTracer = {"," trace: function(event) { }","};",""].join("\n"))),r.push(["function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};",""].join("\n")),"size"===t.optimize){var i="{ "+t.allowedStartRules.map(function(e){return e+": "+u.indexOfRule(e)}).join(", ")+" }",s=u.indexOfRule(t.allowedStartRules[0]);r.push([" var peg$startRuleIndices = "+i+";"," var peg$startRuleIndex = "+s+";"].join("\n"))}else{var F="{ "+t.allowedStartRules.map(function(u){return u+": peg$parse"+u}).join(", ")+" }",d="peg$parse"+t.allowedStartRules[0];r.push([" var peg$startRuleFunctions = "+F+";"," var peg$startRuleFunction = "+d+";"].join("\n"))}if(r.push(""),r.push(c(function(){function r(u){return'"'.concat(n.stringEscape(u),'"')}function o(u){return"/^["+(u.inverted?"^":"")+u.value.map(function(u){return Array.isArray(u)?n.regexpEscape(u[0])+"-"+n.regexpEscape(u[1]):n.regexpEscape(u)}).join("")+"]/"+(u.ignoreCase?"i":"")}function i(u){switch(u.type){case"rule":return'peg$otherExpectation("'.concat(n.stringEscape(u.value),'")');case"literal":return'peg$literalExpectation("'+n.stringEscape(u.value)+'", '+u.ignoreCase+")";case"class":return"peg$classExpectation(["+u.value.map(function(u){return Array.isArray(u)?'["'.concat(n.stringEscape(u[0]),'", "').concat(n.stringEscape(u[1]),'"]'):'"'.concat(n.stringEscape(u),'"')}).join(", ")+"], "+u.inverted+", "+u.ignoreCase+")";case"any":return"peg$anyExpectation()";default:e.fatal("Unknown expectation type (".concat(JSON.stringify(u),")"))}}function a(u){return"function(".concat(u.params.join(", "),") {").concat(u.body,"}")}return"size"===t.optimize?["var peg$literals = [",c(u.literals.map(r).join(",\n")),"];","var peg$regexps = [",c(u.classes.map(o).join(",\n")),"];","var peg$expectations = [",c(u.expectations.map(i).join(",\n")),"];","var peg$functions = [",c(u.functions.map(a).join(",\n")),"];","","var peg$bytecode = [",c(u.rules.map(function(u){return'peg$decode("'.concat(n.stringEscape(u.bytecode.map(function(u){return String.fromCharCode(u+32)}).join("")),'")')}).join(",\n")),"];"].join("\n"):u.literals.map(function(u,e){return"var "+l(e)+" = "+r(u)+";"}).concat("",u.classes.map(function(u,e){return"var "+A(e)+" = "+o(u)+";"})).concat("",u.expectations.map(function(u,e){return"var "+f(e)+" = "+i(u)+";"})).concat("",u.functions.map(function(u,e){return"var "+E(e)+" = "+a(u)+";"})).join("\n")}())),r.push([""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$expected = [];"," var peg$silentFails = 0;",""].join("\n")),t.cache&&r.push([" var peg$resultsCache = {};",""].join("\n")),t.trace){if("size"===t.optimize){var g="["+u.rules.map(function(u){return'"'.concat(n.stringEscape(u.name),'"')}).join(", ")+"]";r.push([" var peg$ruleNames = "+g+";",""].join("\n"))}a("DefaultTracer")?r.push([' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""].join("\n")):r.push([' var peg$tracer = "tracer" in options ? options.tracer : peg$FauxTracer;',""].join("\n"))}return r.push([" var peg$result;",""].join("\n")),"size"===t.optimize?r.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleIndices)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleIndex = peg$startRuleIndices[options.startRule];"," }"].join("\n")):r.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }"].join("\n")),a("text")&&r.push([""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }"].join("\n")),a("offset")&&r.push([""," function offset() {"," return peg$savedPos;"," }"].join("\n")),a("range")&&r.push([""," function range() {"," return [peg$savedPos, peg$currPos];"," }"].join("\n")),a("location")&&r.push([""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }"].join("\n")),a("expected")&&r.push([""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }"].join("\n")),a("error")&&r.push([""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }"].join("\n")),r.push([""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }","",a("filename")?' var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;':""," function peg$computeLocation(startPos, endPos) {"," var loc = {};","",a("filename")?" if ( peg$VALIDFILENAME ) loc.filename = options.filename;":"",""," var startPosDetails = peg$computePosDetails(startPos);"," loc.start = {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," };",""," var endPosDetails = peg$computePosDetails(endPos);"," loc.end = {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," };",""," return loc;"," }",""," function peg$begin() {"," peg$expected.push({ pos: peg$currPos, variants: [] });"," }",""," function peg$expect(expected) {"," var top = peg$expected[peg$expected.length - 1];",""," if (peg$currPos < top.pos) { return; }",""," if (peg$currPos > top.pos) {"," top.pos = peg$currPos;"," top.variants = [];"," }",""," top.variants.push(expected);"," }",""," function peg$end(invert) {"," var expected = peg$expected.pop();"," var top = peg$expected[peg$expected.length - 1];"," var variants = expected.variants;",""," if (top.pos !== expected.pos) { return; }",""," if (invert) {"," variants = variants.map(function(e) {",' return e.type === "not" ? e.expected : { type: "not", expected: e };'," });"," }",""," Array.prototype.push.apply(top.variants, variants);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""," function peg$buildError() {"," var expected = peg$expected[0];"," var failPos = expected.pos;",""," return peg$buildStructuredError("," expected.variants,"," failPos < input.length ? input.charAt(failPos) : null,"," failPos < input.length"," ? peg$computeLocation(failPos, failPos + 1)"," : peg$computeLocation(failPos, failPos)"," );"," }",""].join("\n")),"size"===t.optimize?(r.push(c(function(){var u,e=[];function n(u,e){var t=e+3,n="bc[ip + "+(t-2)+"]",r="bc[ip + "+(t-1)+"]";return["ends.push(end);","ips.push(ip + "+t+" + "+n+" + "+r+");","","if ("+u+") {"," end = ip + "+t+" + "+n+";"," ip += "+t+";","} else {"," end = ip + "+t+" + "+n+" + "+r+";"," ip += "+t+" + "+n+";","}","","break;"].join("\n")}return e.push(["function peg$decode(s) {",' return s.split("").map(function(ch) { return ch.charCodeAt(0) - 32; });',"}","","function peg$parseRule(index) {"].join("\n")),t.trace?e.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var startPos = peg$currPos;"," var params, paramsLength, paramsN;"].join("\n")):e.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var params, paramsLength, paramsN;"].join("\n")),e.push(c(C("peg$ruleNames[index]","index"))),e.push([" while (true) {"," while (ip < end) {"," switch (bc[ip]) {"," case "+o.PUSH_EMPTY_STRING+":"," stack.push('');"," ip++;"," break;",""," case "+o.PUSH_UNDEFINED+":"," stack.push(undefined);"," ip++;"," break;",""," case "+o.PUSH_NULL+":"," stack.push(null);"," ip++;"," break;",""," case "+o.PUSH_FAILED+":"," stack.push(peg$FAILED);"," ip++;"," break;",""," case "+o.PUSH_EMPTY_ARRAY+":"," stack.push([]);"," ip++;"," break;",""," case "+o.PUSH_CURR_POS+":"," stack.push(peg$currPos);"," ip++;"," break;",""," case "+o.POP+":"," stack.pop();"," ip++;"," break;",""," case "+o.POP_CURR_POS+":"," peg$currPos = stack.pop();"," ip++;"," break;",""," case "+o.POP_N+":"," stack.length -= bc[ip + 1];"," ip += 2;"," break;",""," case "+o.NIP+":"," stack.splice(-2, 1);"," ip++;"," break;",""," case "+o.APPEND+":"," stack[stack.length - 2].push(stack.pop());"," ip++;"," break;",""," case "+o.WRAP+":"," stack.push(stack.splice(stack.length - bc[ip + 1], bc[ip + 1]));"," ip += 2;"," break;",""," case "+o.TEXT+":"," stack.push(input.substring(stack.pop(), peg$currPos));"," ip++;"," break;",""," case "+o.PLUCK+":"," paramsLength = bc[ip + 2];"," paramsN = 3 + paramsLength",""," params = bc.slice(ip + 3, ip + paramsN);"," params = paramsLength === 1"," ? stack[stack.length - 1 - params[ 0 ]]"," : params.map(function(p) { return stack[stack.length - 1 - p]; });",""," stack.splice("," stack.length - bc[ip + 1],"," bc[ip + 1],"," params"," );",""," ip += paramsN;"," break;",""," case "+o.IF+":",p(n("stack[stack.length - 1]",0)),""," case "+o.IF_ERROR+":",p(n("stack[stack.length - 1] === peg$FAILED",0)),""," case "+o.IF_NOT_ERROR+":",p(n("stack[stack.length - 1] !== peg$FAILED",0)),""," case "+o.WHILE_NOT_ERROR+":",p((u="stack[stack.length - 1] !== peg$FAILED",["if ("+u+") {"," ends.push(end);"," ips.push(ip);",""," end = ip + 2 + bc[ip + 1];"," ip += 2;","} else {"," ip += 2 + bc[ip + 1];","}","","break;"].join("\n"))),""," case "+o.MATCH_ANY+":",p(n("input.length > peg$currPos",0)),""," case "+o.MATCH_STRING+":",p(n("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length) === peg$literals[bc[ip + 1]]",1)),""," case "+o.MATCH_STRING_IC+":",p(n("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length).toLowerCase() === peg$literals[bc[ip + 1]]",1)),""," case "+o.MATCH_CLASS+":",p(n("peg$regexps[bc[ip + 1]].test(input.charAt(peg$currPos))",1)),""," case "+o.ACCEPT_N+":"," stack.push(input.substr(peg$currPos, bc[ip + 1]));"," peg$currPos += bc[ip + 1];"," ip += 2;"," break;",""," case "+o.ACCEPT_STRING+":"," stack.push(peg$literals[bc[ip + 1]]);"," peg$currPos += peg$literals[bc[ip + 1]].length;"," ip += 2;"," break;",""," case "+o.EXPECT+":"," rule$expects(peg$expectations[bc[ip + 1]]);"," ip += 2;"," break;",""," case "+o.LOAD_SAVED_POS+":"," peg$savedPos = stack[stack.length - 1 - bc[ip + 1]];"," ip += 2;"," break;",""," case "+o.UPDATE_SAVED_POS+":"," peg$savedPos = peg$currPos;"," ip++;"," break;",""," case "+o.CALL+":",p(["params = bc.slice(ip + 4, ip + 4 + bc[ip + 3])"," .map(function(p) { return stack[stack.length - 1 - p]; });","","stack.splice("," stack.length - bc[ip + 2],"," bc[ip + 2],"," peg$functions[bc[ip + 1]].apply(null, params)",");","","ip += 4 + bc[ip + 3];","break;"].join("\n")),""," case "+o.RULE+":"," stack.push(peg$parseRule(bc[ip + 1]));"," ip += 2;"," break;",""," case "+o.SILENT_FAILS_ON+":"," peg$silentFails++;"," ip++;"," break;",""," case "+o.SILENT_FAILS_OFF+":"," peg$silentFails--;"," ip++;"," break;",""," case "+o.EXPECT_NS_BEGIN+":"," peg$begin();"," ip++;"," break;",""," case "+o.EXPECT_NS_END+":"," peg$end(bc[ip + 1]);"," ip += 2;"," break;",""," // istanbul ignore next"," default:"," throw new Error(",' "Rule #" + index + "'+(t.trace?" ('\" + peg$ruleNames[ index ] + \"')":"")+', position " + ip + ": "',' + "Invalid opcode " + bc[ip] + "."'," );"," }"," }",""," if (ends.length > 0) {"," end = ends.pop();"," ip = ips.pop();"," } else {"," break;"," }"," }"].join("\n")),e.push(c(h("peg$ruleNames[index]","stack[0]"))),e.push("}"),e.join("\n")}())),r.push("")):u.rules.forEach(function(i){r.push(c(function(r){var i=[],a=[];function s(u){return u<0&&e.fatal("Rule '"+r.name+"': Var stack underflow: attempt to use var at index "+u),"s"+u}var p={sp:-1,maxSp:-1,push:function(u){var e=s(++this.sp)+" = "+u+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),e},pop:function(u){if(void 0===u)return s(this.sp--);for(var e=Array(u),t=0;t0&&(p.sp=h,a=t(n.slice(g,g+C)),l=p.sp,g+=C,s!==l&&e.fatal("Rule '"+r.name+"', position "+A+": Branches of a condition can't move the stack pointer differently (before: "+h+", after then: "+s+", after else: "+l+").")),D.push("if ("+u+") {"),D.push(c(i)),C>0&&(D.push("} else {"),D.push(c(a))),D.push("}")}function m(){var u=n[g+4-1],e=E(n[g+1])+"("+n.slice(g+4,g+4+u).map(function(u){return p.index(u)}).join(", ")+")";p.pop(n[g+2]),D.push(p.push(e)),g+=4+u}for(;g peg$currPos",0);break;case o.MATCH_STRING:B(u.literals[n[g+1]].length>1?"input.substr(peg$currPos, "+u.literals[n[g+1]].length+") === "+l(n[g+1]):"input.charCodeAt(peg$currPos) === "+u.literals[n[g+1]].charCodeAt(0),1);break;case o.MATCH_STRING_IC:B("input.substr(peg$currPos, "+u.literals[n[g+1]].length+").toLowerCase() === "+l(n[g+1]),1);break;case o.MATCH_CLASS:B(A(n[g+1])+".test(input.charAt(peg$currPos))",1);break;case o.ACCEPT_N:D.push(p.push(n[g+1]>1?"input.substr(peg$currPos, "+n[g+1]+")":"input.charAt(peg$currPos)")),D.push(n[g+1]>1?"peg$currPos += "+n[g+1]+";":"peg$currPos++;"),g+=2;break;case o.ACCEPT_STRING:D.push(p.push(l(n[g+1]))),D.push(u.literals[n[g+1]].length>1?"peg$currPos += "+u.literals[n[g+1]].length+";":"peg$currPos++;"),g+=2;break;case o.EXPECT:D.push("rule$expects("+f(n[g+1])+");"),g+=2;break;case o.LOAD_SAVED_POS:D.push("peg$savedPos = "+p.index(n[g+1])+";"),g+=2;break;case o.UPDATE_SAVED_POS:D.push("peg$savedPos = peg$currPos;"),g++;break;case o.CALL:m();break;case o.RULE:D.push(p.push("peg$parse"+u.rules[n[g+1]].name+"()")),g+=2;break;case o.SILENT_FAILS_ON:D.push("peg$silentFails++;"),g++;break;case o.SILENT_FAILS_OFF:D.push("peg$silentFails--;"),g++;break;case o.EXPECT_NS_BEGIN:D.push("peg$begin();"),g++;break;case o.EXPECT_NS_END:D.push("peg$end("+(0!==n[g+1])+");"),g+=2;break;default:e.fatal("Rule '"+r.name+"', position "+g+": Invalid opcode "+n[g]+".")}return D.join("\n")}(r.bytecode);i.push("function peg$parse"+r.name+"() {"),t.trace&&i.push(" var startPos = peg$currPos;");for(var d=0;d<=p.maxSp;d++)a[d]=s(d);return i.push(" var "+a.join(", ")+";"),i.push(c(C('"'+n.stringEscape(r.name)+'"',u.indexOfRule(r.name)))),i.push(c(F)),i.push(c(h('"'+n.stringEscape(r.name)+'"',s(0)))),i.push("}"),i.join("\n")}(i))),r.push("")}),u.initializer&&(r.push(c(u.initializer.code)),r.push("")),r.push(" peg$begin();"),"size"===t.optimize?r.push(" peg$result = peg$parseRule(peg$startRuleIndex);"):r.push(" peg$result = peg$startRuleFunction();"),r.push([""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$expect(peg$endExpectation());"," }",""," throw peg$buildError();"," }","}"].join("\n")),r.join("\n")}())}},function(u,e,t){"use strict";u.exports=function(u,e,t){var n=e.buildVisitor({rule_ref:function(u,e,t){u.name===e&&(u.name=t)}}),r=t.allowedStartRules,o=[];u.rules.forEach(function(e){var t;"rule"===(t=e).type&&"rule_ref"===t.expression.type&&(n(u,e.name,e.expression.name),r.indexOf(e.name)<0)||o.push(e)}),u.rules=o}},function(u,e,t){"use strict";var n=t(1),r=Object.prototype.hasOwnProperty;u.exports=function(u,e){var t;function o(u,e){t(u.expression,n.clone(e))}(t=e.buildVisitor({rule:function(u){t(u.expression,{})},choice:function(u,e){u.alternatives.forEach(function(u){t(u,n.clone(e))})},action:o,labeled:function(u,n){var o=u.label;if(o&&r.call(n,o)){var i=n[o].start;e.error('Label "'.concat(o,'" is already defined at line ').concat(i.line,", column ").concat(i.column,"."),u.location)}t(u.expression,n),o&&(n[o]=u.location)},text:o,simple_and:o,simple_not:o,optional:o,zero_or_more:o,one_or_more:o,group:o}))(u)}},function(u,e,t){"use strict";var n=Object.prototype.hasOwnProperty;u.exports=function(u,e){var t={};e.buildVisitor({rule:function(u){var r=u.name;if(n.call(t,r)){var o=t[r].start;e.error('Rule "'.concat(r,'" is already defined at line ').concat(o.line,", column ").concat(o.column,"."),u.location)}t[u.name]=u.location}})(u)}},function(u,e,t){"use strict";u.exports=function(u,e,t){var n={};function r(u){n[u.name||u]=!0}t.allowedStartRules.forEach(r),e.buildVisitor({rule_ref:r})(u),u.rules.forEach(function(u){!0!==n[u.name]&&e.warn('Rule "'.concat(u.name,'" is not referenced.'),u.location)})}},function(u,e,t){"use strict";u.exports=function(u,e){var t=[],n=e.buildVisitor({rule:function(u){t.push(u.name),n(u.expression),t.pop(u.name)},sequence:function(e){e.elements.every(function(e){return n(e),!u.alwaysConsumesOnSuccess(e)})},rule_ref:function(r){if(-1!==t.indexOf(r.name)){t.push(r.name);var o=t.join(" -> ");e.error("Possible infinite loop when parsing (left recursion: ".concat(o,")."),r.location)}n(u.findRule(r.name))}});n(u)}},function(u,e,t){"use strict";u.exports=function(u,e){e.buildVisitor({zero_or_more:function(t){u.alwaysConsumesOnSuccess(t.expression)||e.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",t.location)},one_or_more:function(t){u.alwaysConsumesOnSuccess(t.expression)||e.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",t.location)}})(u)}},function(u,e,t){"use strict";u.exports=function(u,e,t){e.buildVisitor({rule_ref:function(t){u.findRule(t.name)||e.error('Rule "'.concat(t.name,'" is not defined.'),t.location)}})(u),t.allowedStartRules.forEach(function(t){u.findRule(t)||e.error('Start rule "'.concat(t,'" is not defined.'))})}},function(u,e,t){"use strict";u.exports=function(u,e){var t;function n(u){return u.match=0,u.match}function r(u){return t(u.expression),u.match=1,u.match}function o(u){return u.match=t(u.expression),u.match}function i(u,e){for(var n=u.length,r=0,o=0,i=0;i0&&++r,a<0&&++o}return r===n?1:e?o===n?-1:0:o>0?-1:0}(t=e.buildVisitor({rule:function(u){var n,r=0;if(void 0===u.match){u.match=0;do{n=u.match,u.match=t(u.expression),++r>6&&e.error("Infinity cycle detected when trying to evaluate node match result",u.location)}while(n!==u.match)}return u.match},named:o,choice:function(u){return u.match=i(u.alternatives,!0),u.match},action:o,sequence:function(u){return u.match=i(u.elements,!1),u.match},labeled:o,text:o,simple_and:o,simple_not:function(u){return u.match=-t(u.expression),u.match},optional:r,zero_or_more:r,one_or_more:o,group:o,semantic_and:n,semantic_not:n,rule_ref:function(e){var n=u.findRule(e.name);return e.match=t(n),e.match},literal:function(u){return u.match=0===u.value.length?1:0,u.match},class:function(u){return u.match=0===u.parts.length?-1:0,u.match},any:n}))(u)}},function(u,e,t){"use strict";u.exports=function(u,e){e.buildVisitor({action:function(u){this.visit(u.expression,!0)},labeled:function(u,t){var n;!0===u.pick&&(!0===t&&e.error('"@" cannot be used with an action block.',u.location),("semantic_and"===(n=u.expression.type)||"semantic_not"===n)&&e.error('"@" cannot be used on a semantic predicate.',u.location),this.visit(u.expression))}})(u)}},function(u,e,t){"use strict";function n(u,e){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{};!function(u,e){if(!(u instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),this.opcodes=e.opcodes||i,this.parser=e.parser||a,this.passes=e.passes||{},this.visitor=e.visitor||r.visitor,this.vm=e.vm||s,"function"==typeof e.warn&&(this.warn=e.warn),"function"==typeof e.error&&(this.error=e.error),Object.defineProperty(this,"fatal",{value:c})}var e,t,o;return e=u,(t=[{key:"parse",value:function(u,e){return this.parser.parse(u,e)}},{key:"buildVisitor",value:function(u){return this.visitor.build(u)}},{key:"warn",value:function(u,e){}},{key:"error",value:function(u,e){c(u,e)}}])&&n(e.prototype,t),o&&n(e,o),u}();u.exports=p},function(u,e,t){"use strict";u.exports={PUSH_EMPTY_STRING:0,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:41,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CLASS:20,ACCEPT_N:21,ACCEPT_STRING:22,EXPECT:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29,EXPECT_NS_BEGIN:38,EXPECT_NS_END:39}},,,,,,,,,,,,function(u,e,t){"use strict";var n=t(50),r=t(51);$("#run").click(function(){var u=$("#results-table");function e(e,t,n,r,o){u.append("\n \n \n ").concat(null!==n?"":"","\n ").concat(t,"\n ").concat(null!==n?"":"","\n \n \n \n ").concat((r/1024).toFixed(2),"\n \n  kB\n \n \n \n ").concat(o.toFixed(2),"\n \n  ms\n \n \n \n ").concat((r/1024/(o/1e3)).toFixed(2),"\n \n  kB/s\n \n \n "))}var t=parseInt($("#run-count").val(),10),o={cache:$("#cache").is(":checked"),optimize:$("#optimize").val()};isNaN(t)||t<=0?alert("Number of runs must be a positive integer."):n.run(r,t,o,{readFile:function(u){return $.ajax({type:"GET",url:"/"+u,dataType:"text",async:!1}).responseText},testStart:function(){},testFinish:function(u,t,n,r){e("individual",t.title,"benchmark/"+u.id+"/"+t.file,n,r)},benchmarkStart:function(e){u.append("\n \n \n ").concat(e.title,' \n \n "\n '))},benchmarkFinish:function(u,t,n){e("benchmark-total",u.title+" total",null,t,n)},start:function(){$("#run-count, #cache, #run").attr("disabled","disabled"),u.show(),$("#results-table tr").slice(1).remove()},finish:function(u,t){e("total","Total",null,u,t),$.scrollTo("max",{axis:"y",duration:500}),$("#run-count, #cache, #run").removeAttr("disabled")}})}),$(document).ready(function(){return $("#run").focus()})},function(u,e,t){"use strict";var n=t(0),r={run:function(u,e,t,r){var o={functions:[],add:function(u){this.functions.push(u)},run:function(){this.functions.length>0&&(this.functions.shift()(),setTimeout(function(){o.run()},0))}},i={};o.add(function(){r.start(),i.totalInputSize=0,i.totalParseTime=0}),u.forEach(function(u){o.add(function(u){return function(){r.benchmarkStart(u),i.parser=n.generate(r.readFile("examples/"+u.id+".pegjs"),t),i.benchmarkInputSize=0,i.benchmarkParseTime=0}}(u)),u.tests.forEach(function(t){o.add(function(u,t){return function(){r.testStart(u,t);for(var n=r.readFile("benchmark/"+u.id+"/"+t.file),o=0,a=0;a1&&void 0!==arguments[1]?arguments[1]:{},e=new r.Session({passes:i.convertPasses(r.passes)});return Array.isArray(n.plugins)&&n.plugins.forEach(function(l){"function"==typeof l.use&&l.use(e,n)}),r.compile(e.parse(l,n.parser||{}),e,n)}};l.exports=a},function(l,n,e){"use strict";var t=e(19),u=e(20),r=e(21),o=e(11),i=function(){function l(l){return Array.isArray(l)?l:r.values(l)}return function(n){return r.map(n,l)}}();l.exports={find:t.find,findIndex:t.findIndex,stringEscape:u.stringEscape,regexpEscape:u.regexpEscape,reservedWords:u.reservedWords,clone:r.clone,each:r.each,extend:r.extend,map:r.map,values:r.values,enforceFastProperties:r.enforceFastProperties,evalModule:o.evalModule,convertPasses:i,processOptions:function(l,n){var e={};return r.extend(e,l),r.extend(e,n),e},noop:function(){}}},function(l,n,e){l.exports=e(6)},function(l,n){ +!function(l,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("test",[],n):"object"==typeof exports?exports.test=n():(l.peg=l.peg||{},l.peg.test=n())}("undefined"!=typeof self?self:window,function(){return function(l){var n={};function e(t){if(n[t])return n[t].exports;var u=n[t]={i:t,l:!1,exports:{}};return l[t].call(u.exports,u,u.exports,e),u.l=!0,u.exports}return e.m=l,e.c=n,e.d=function(l,n,t){e.o(l,n)||Object.defineProperty(l,n,{enumerable:!0,get:t})},e.r=function(l){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},e.t=function(l,n){if(1&n&&(l=e(l)),8&n)return l;if(4&n&&"object"==typeof l&&l&&l.__esModule)return l;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:l}),2&n&&"string"!=typeof l)for(var u in l)e.d(t,u,function(n){return l[n]}.bind(null,u));return t},e.n=function(l){var n=l&&l.__esModule?function(){return l.default}:function(){return l};return e.d(n,"a",n),n},e.o=function(l,n){return Object.prototype.hasOwnProperty.call(l,n)},e.p="",e(e.s=52)}([function(l,n,e){"use strict";var t=e(9),u=e(5),r=e(23),o=e(14),i=e(1),a={VERSION:e(13).version,GrammarError:t,ast:u,parser:o,compiler:r,util:i,generate:function(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=new r.Session({passes:i.convertPasses(r.passes)});return Array.isArray(n.plugins)&&n.plugins.forEach(function(l){"function"==typeof l.use&&l.use(e,n)}),r.compile(e.parse(l,n.parser||{}),e,n)}};l.exports=a},function(l,n,e){"use strict";var t=e(19),u=e(20),r=e(21),o=e(11),i=function(){function l(l){return Array.isArray(l)?l:r.values(l)}return function(n){return r.map(n,l)}}();l.exports={find:t.find,findIndex:t.findIndex,stringEscape:u.stringEscape,regexpEscape:u.regexpEscape,reservedWords:u.reservedWords,clone:r.clone,each:r.each,extend:r.extend,map:r.map,values:r.values,enforceFastProperties:r.enforceFastProperties,evalModule:o.evalModule,convertPasses:i,processOptions:function(l,n){var e={};return r.extend(e,l),r.extend(e,n),e},noop:function(){}}},function(l,n,e){l.exports=e(6)},function(l,n){ /*! * Chai - flag utility * Copyright(c) 2012-2014 Jake Luer @@ -17,7 +17,7 @@ var t=[]; /*! * Assertion Error */ -n.AssertionError=e(42); +n.AssertionError=e(43); /*! * Utils for plugins (not exported) */ @@ -65,7 +65,7 @@ l.exports=function(l,n,e){var t=l.__flags||(l.__flags=Object.create(null));for(v * Chai - addLengthGuard utility * Copyright(c) 2012-2014 Jake Luer * MIT Licensed - */l.exports=function(l,n,t){return e.configurable?(Object.defineProperty(l,"length",{get:function(){if(t)throw Error("Invalid Chai property: "+n+'.length. Due to a compatibility issue, "length" cannot directly follow "'+n+'". Use "'+n+'.lengthOf" instead.');throw Error("Invalid Chai property: "+n+'.length. See docs for proper usage of "'+n+'".')}}),l):l}},function(l,n,e){var t=e(8),u=e(3),r=e(46),o=e(16),i=["__flags","__methods","_obj","assert"];l.exports=function(l,n){return o()?new Proxy(l,{get:function l(e,o){if("string"==typeof o&&-1===t.proxyExcludedKeys.indexOf(o)&&!Reflect.has(e,o)){if(n)throw Error("Invalid Chai property: "+n+"."+o+'. See docs for proper usage of "'+n+'".');var a=null,s=4;throw r(e).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&-1===i.indexOf(l)){var n=function(l,n,e){if(Math.abs(l.length-n.length)>=e)return e;for(var t=[],u=0;u<=l.length;u++)t[u]=Array(n.length+1).fill(0),t[u][0]=u;for(var r=0;r=e?t[u][r]=e:t[u][r]=Math.min(t[u-1][r]+1,t[u][r-1]+1,t[u-1][r-1]+(o===n.charCodeAt(r-1)?0:1));return t[l.length][n.length]}(o,l,s);n2&&void 0!==arguments[2]?arguments[2]:{};switch("parser"===(e=m.processOptions(e,{allowedStartRules:[l.rules[0].name],cache:!1,context:{},dependencies:{},exportVar:null,features:null,format:"bare",header:null,optimize:"speed",output:"parser",trace:!1})).output&&(e.format="umd"),m.each(n.passes,function(t){t.forEach(function(t){t(l,n,e)})}),e.output){case"parser":return n.vm.evalModule(l.code,e.context);case"source":return l.code;default:n.error("Invalid output format: ".concat(e.output,"."))}}};l.exports=y},function(l,n,e){"use strict";l.exports=function(l,n,e){l.rules.forEach(function(l){l.reportFailures=!1});for(var t=e.allowedStartRules.map(function(n){var e=l.findRule(n);return e.reportFailures=!0,e}),u=n.buildVisitor({rule:function(l){u(l.expression)},named:function(){},rule_ref:function(n){var e=l.findRule(n.name);e.reportFailures||(e.reportFailures=!0,t.push(e))}});t.length>0;)u(t.pop())}},function(l,n,e){"use strict";var t=e(1);l.exports=function(l,n){var e,u=n.opcodes,r=[],o=[],i=[],a=[];function s(l){var n=JSON.stringify(l),e=t.findIndex(i,function(l){return JSON.stringify(l)===n});return-1===e?i.push(l)-1:e}function c(l,n,e){var u={predicate:l,params:n,body:e},r=JSON.stringify(u),o=t.findIndex(a,function(l){return JSON.stringify(l)===r});return-1===o?a.push(u)-1:o}var f=function(){var l;return(l=[]).concat.apply(l,arguments)};function p(l,n,e,t){return l>0?e:l<0?t:n.concat([e.length,t.length],e,t)}function h(l,n,e,r){var o=t.values(e,function(l){return r-l});return[u.CALL,l,n,o.length].concat(o)}function d(l,n,r){var o=0|l.match;return f([u.PUSH_CURR_POS],[u.EXPECT_NS_BEGIN],e(l,{sp:r.sp+1,env:t.clone(r.env),action:null,reportFailures:r.reportFailures}),[u.EXPECT_NS_END,n?1:0],p(n?-o:o,[n?u.IF_ERROR:u.IF_NOT_ERROR],f([u.POP],[n?u.POP:u.POP_CURR_POS],[u.PUSH_UNDEFINED]),f([u.POP],[n?u.POP_CURR_POS:u.POP],[u.PUSH_FAILED])))}function g(l,n,e){var t=c(!0,Object.keys(e.env),l.code);return f([u.UPDATE_SAVED_POS],h(t,0,e.env,e.sp),p(0|l.match,[u.IF],f([u.POP],n?[u.PUSH_FAILED]:[u.PUSH_UNDEFINED]),f([u.POP],n?[u.PUSH_UNDEFINED]:[u.PUSH_FAILED])))}function m(l){return n=[u.WHILE_NOT_ERROR],e=f([u.APPEND],l),n.concat([e.length],e);var n,e}(e=n.buildVisitor({grammar:function(l){l.rules.forEach(e),l.literals=r,l.classes=o,l.expectations=i,l.functions=a},rule:function(l){l.bytecode=e(l.expression,{sp:-1,env:{},action:null,reportFailures:l.reportFailures})},named:function(l,n){var t=n.reportFailures?s({type:"rule",value:l.name}):null,r=e(l.expression,{sp:n.sp,env:n.env,action:n.action,reportFailures:!1});return n.reportFailures?f([u.EXPECT,t],[u.SILENT_FAILS_ON],r,[u.SILENT_FAILS_OFF]):r},choice:function(l,n){return function l(n,r){return f(e(n[0],{sp:r.sp,env:t.clone(r.env),action:null,reportFailures:r.reportFailures}),n.length<2?[]:p(-(0|n[0].match),[u.IF_ERROR],f([u.POP],l(n.slice(1),r)),[]))}(l.alternatives,n)},action:function(l,n){var r=t.clone(n.env),o="sequence"!==l.expression.type||0===l.expression.elements.length,i=e(l.expression,{sp:n.sp+(o?1:0),env:r,action:l,reportFailures:n.reportFailures}),a=0|l.expression.match,s=o&&a>=0?c(!1,Object.keys(r),l.code):null;return!1===o?i:f([u.PUSH_CURR_POS],i,p(a,[u.IF_NOT_ERROR],f([u.LOAD_SAVED_POS,1],h(s,1,r,n.sp+2)),[]),[u.NIP])},sequence:function(l,n){var t=l.elements.length;return f([u.PUSH_CURR_POS],function l(n,r){if(n.length>0){var o=t-n.slice(1).length;return f(e(n[0],{sp:r.sp,env:r.env,pluck:r.pluck,action:null,reportFailures:r.reportFailures}),p(0|n[0].match,[u.IF_NOT_ERROR],l(n.slice(1),{sp:r.sp+1,env:r.env,pluck:r.pluck,action:r.action,reportFailures:r.reportFailures}),f(o>1?[u.POP_N,o]:[u.POP],[u.POP_CURR_POS],[u.PUSH_FAILED])))}return r.pluck.length>0?f([u.PLUCK,t+1,r.pluck.length],r.pluck.map(function(l){return r.sp-l})):r.action?f([u.LOAD_SAVED_POS,t],h(c(!1,Object.keys(r.env),r.action.code),t+1,r.env,r.sp)):f([u.WRAP,t],[u.NIP])}(l.elements,{sp:n.sp+1,env:n.env,pluck:[],action:n.action,reportFailures:n.reportFailures}))},labeled:function(l,n){var u=n.env,r=l.label,o=n.sp+1;return null!==r&&(u=t.clone(n.env),n.env[r]=o),n.pluck&&l.pick&&n.pluck.push(o),e(l.expression,{sp:n.sp,env:u,action:null,reportFailures:n.reportFailures})},text:function(l,n){return f([u.PUSH_CURR_POS],e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures}),p(0|l.expression.match,[u.IF_NOT_ERROR],f([u.POP],[u.TEXT]),[u.NIP]))},simple_and:function(l,n){return d(l.expression,!1,n)},simple_not:function(l,n){return d(l.expression,!0,n)},optional:function(l,n){return f(e(l.expression,{sp:n.sp,env:t.clone(n.env),action:null,reportFailures:n.reportFailures}),p(-(0|l.expression.match),[u.IF_ERROR],f([u.POP],[u.PUSH_NULL]),[]))},zero_or_more:function(l,n){var r=e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures});return f([u.PUSH_EMPTY_ARRAY],r,m(r),[u.POP])},one_or_more:function(l,n){var r=e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures});return f([u.PUSH_EMPTY_ARRAY],r,p(0|l.expression.match,[u.IF_NOT_ERROR],f(m(r),[u.POP]),f([u.POP],[u.POP],[u.PUSH_FAILED])))},group:function(l,n){return e(l.expression,{sp:n.sp,env:t.clone(n.env),action:null,reportFailures:n.reportFailures})},semantic_and:function(l,n){return g(l,!1,n)},semantic_not:function(l,n){return g(l,!0,n)},rule_ref:function(n){return[u.RULE,l.indexOfRule(n.name)]},literal:function(l,n){if(l.value.length>0){var e=0|l.match,t=0===e||e>0&&!l.ignoreCase?(i=l.ignoreCase?l.value.toLowerCase():l.value,-1===(a=r.indexOf(i))?r.push(i)-1:a):null,o=n.reportFailures?s({type:"literal",value:l.value,ignoreCase:l.ignoreCase}):null;return f(n.reportFailures?[u.EXPECT,o]:[],p(e,l.ignoreCase?[u.MATCH_STRING_IC,t]:[u.MATCH_STRING,t],l.ignoreCase?[u.ACCEPT_N,l.value.length]:[u.ACCEPT_STRING,t],[u.PUSH_FAILED]))}var i,a;return[u.PUSH_EMPTY_STRING]},class:function(l,n){var e=0|l.match,r=0===e?function(l){var n={value:l.parts,inverted:l.inverted,ignoreCase:l.ignoreCase},e=JSON.stringify(n),u=t.findIndex(o,function(l){return JSON.stringify(l)===e});return-1===u?o.push(n)-1:u}(l):null,i=n.reportFailures?s({type:"class",value:l.parts,inverted:l.inverted,ignoreCase:l.ignoreCase}):null;return f(n.reportFailures?[u.EXPECT,i]:[],p(e,[u.MATCH_CLASS,r],[u.ACCEPT_N,1],[u.PUSH_FAILED]))},any:function(l,n){var e=n.reportFailures?s({type:"any"}):null;return f(n.reportFailures?[u.EXPECT,e]:[],p(0|l.match,[u.MATCH_ANY],[u.ACCEPT_N,1],[u.PUSH_FAILED]))}}))(l)}},function(l,n,e){"use strict";var t=e(1),u=e(13).version;l.exports=function(l,n,e){var r=n.opcodes,o=e.features||{};function i(l,n){return l in o?!!o[l]:null==n||!!n}var a=/^([^`\r\n]+?(?:`[^`]*?`[^\r\n]*?)?)$/gm;function s(l){return l.replace(a," $1")}function c(l){return l.replace(a," $1")}var f=function(l){return"peg$c"+l},p=function(l){return"peg$r"+l},h=function(l){return"peg$e"+l},d=function(l){return"peg$f"+l};function g(n,t){var u=[];return u.push(["","var rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);","}",""].join("\n")),e.trace&&u.push(["peg$tracer.trace({",' type: "rule.enter",'," rule: "+n+","," location: peg$computeLocation(startPos, startPos)","});",""].join("\n")),e.cache&&(u.push(["var key = peg$currPos * "+l.rules.length+" + "+t+";","var cached = peg$resultsCache[key];","var rule$expectations = [];","","rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);"," rule$expectations.push(expected);","}","","if (cached) {"," peg$currPos = cached.nextPos;",""," rule$expectations = cached.expectations;"," if (peg$silentFails === 0) {"," rule$expectations.forEach(peg$expect);"," }",""].join("\n")),e.trace&&u.push(["if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+n+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+n+","," location: peg$computeLocation(startPos, startPos)"," });","}",""].join("\n")),u.push([" return cached.result;","}",""].join("\n"))),u.join("\n")}function m(l,n){var t=[];return e.cache&&t.push(["","peg$resultsCache[key] = {"," nextPos: peg$currPos,"," result: "+n+","," expectations: rule$expectations","};"].join("\n")),e.trace&&t.push(["","if ("+n+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+l+","," result: "+n+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+l+","," location: peg$computeLocation(startPos, startPos)"," });","}"].join("\n")),t.push(["","return "+n+";"].join("\n")),t.join("\n")}l.code=function(l){function n(){var l="// Generated by PEG.js v".concat(u,", https://pegjs.org/"),n=e.header;return"string"==typeof n?l+="\n\n"+n:Array.isArray(n)&&(l+="\n\n",n.forEach(function(n){l+="// "+n})),l}function r(){return e.trace&&i("DefaultTracer")?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join("\n"):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join("\n")}return{bare:function(){return[n(),"(function() {",' "use strict";',"",s(l),"",s("return "+r()+";"),"})()"].join("\n")},commonjs:function(){var u=[],o=Object.keys(e.dependencies);return u.push([n(),"",'"use strict";',""].join("\n")),o.length>0&&(o.forEach(function(l){u.push("var "+l+' = require("'+t.stringEscape(e.dependencies[l])+'");')}),u.push("")),u.push([l,"","module.exports = "+r()+";",""].join("\n")),u.join("\n")},es:function(){var u=[],o=Object.keys(e.dependencies);return u.push(n(),""),o.length>0&&(o.forEach(function(l){u.push("import "+l+' from "'+t.stringEscape(e.dependencies[l])+'";')}),u.push("")),u.push(l,"","export "+(e.trace&&i("DefaultTracer")?["{"," peg$SyntaxError as SyntaxError,"," peg$DefaultTracer as DefaultTracer,"," peg$parse as parse","}"].join("\n"):["{"," peg$SyntaxError as SyntaxError,"," peg$parse as parse","}"].join("\n"))+";","","export default "+r()+";",""),u.join("\n")},amd:function(){var u=Object.keys(e.dependencies),o="["+u.map(function(l){return e.dependencies[l]}).map(function(l){return'"'.concat(t.stringEscape(l),'"')}).join(", ")+"]",i=u.join(", ");return[n(),"define("+o+", function("+i+") {",' "use strict";',"",s(l),"",s("return "+r()+";"),"});",""].join("\n")},globals:function(){return[n(),"(function(root) {",' "use strict";',"",s(l),"",s("root."+e.exportVar+" = "+r()+";"),"})(this);",""].join("\n")},umd:function(){var u=[],o=Object.keys(e.dependencies),i=o.map(function(l){return e.dependencies[l]}),a="["+i.map(function(l){return'"'.concat(t.stringEscape(l),'"')}).join(", ")+"]",c=i.map(function(l){return'require("'.concat(t.stringEscape(l),'")')}).join(", "),f=o.map(function(l){return"root."+l}).join(", "),p=o.join(", ");return u.push([n(),"(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+a+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+c+");"].join("\n")),null!==e.exportVar&&u.push([" } else {"," root."+e.exportVar+" = factory("+f+");"].join("\n")),u.push([" }","})(this, function("+p+") {",' "use strict";',"",s(l),"",s("return "+r()+";"),"});",""].join("\n")),u.join("\n")}}[e.format]()}(function(){var u=[];if(u.push(["function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," this.message = message;"," this.expected = expected;"," this.found = found;"," this.location = location;",' this.name = "SyntaxError";',""," // istanbul ignore next",' if (typeof Error.captureStackTrace === "function") {'," Error.captureStackTrace(this, peg$SyntaxError);"," }","}","","peg$subclass(peg$SyntaxError, Error);","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," },",""," not: function(expectation) {",' return "not " + describeExpectation(expectation.expected);'," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""].join("\n")),e.trace&&(i("DefaultTracer")?u.push(["function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," // istanbul ignore next"," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};",""].join("\n")):u.push(["var peg$FauxTracer = {"," trace: function(event) { }","};",""].join("\n"))),u.push(["function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};",""].join("\n")),"size"===e.optimize){var o="{ "+e.allowedStartRules.map(function(n){return n+": "+l.indexOfRule(n)}).join(", ")+" }",a=l.indexOfRule(e.allowedStartRules[0]);u.push([" var peg$startRuleIndices = "+o+";"," var peg$startRuleIndex = "+a+";"].join("\n"))}else{var y="{ "+e.allowedStartRules.map(function(l){return l+": peg$parse"+l}).join(", ")+" }",b="peg$parse"+e.allowedStartRules[0];u.push([" var peg$startRuleFunctions = "+y+";"," var peg$startRuleFunction = "+b+";"].join("\n"))}if(u.push(""),u.push(s(function(){function u(l){return'"'.concat(t.stringEscape(l),'"')}function r(l){return"/^["+(l.inverted?"^":"")+l.value.map(function(l){return Array.isArray(l)?t.regexpEscape(l[0])+"-"+t.regexpEscape(l[1]):t.regexpEscape(l)}).join("")+"]/"+(l.ignoreCase?"i":"")}function o(l){switch(l.type){case"rule":return'peg$otherExpectation("'.concat(t.stringEscape(l.value),'")');case"literal":return'peg$literalExpectation("'+t.stringEscape(l.value)+'", '+l.ignoreCase+")";case"class":return"peg$classExpectation(["+l.value.map(function(l){return Array.isArray(l)?'["'.concat(t.stringEscape(l[0]),'", "').concat(t.stringEscape(l[1]),'"]'):'"'.concat(t.stringEscape(l),'"')}).join(", ")+"], "+l.inverted+", "+l.ignoreCase+")";case"any":return"peg$anyExpectation()";default:n.fatal("Unknown expectation type (".concat(JSON.stringify(l),")"))}}function i(l){return"function(".concat(l.params.join(", "),") {").concat(l.body,"}")}return"size"===e.optimize?["var peg$literals = [",s(l.literals.map(u).join(",\n")),"];","var peg$regexps = [",s(l.classes.map(r).join(",\n")),"];","var peg$expectations = [",s(l.expectations.map(o).join(",\n")),"];","var peg$functions = [",s(l.functions.map(i).join(",\n")),"];","","var peg$bytecode = [",s(l.rules.map(function(l){return'peg$decode("'.concat(t.stringEscape(l.bytecode.map(function(l){return String.fromCharCode(l+32)}).join("")),'")')}).join(",\n")),"];"].join("\n"):l.literals.map(function(l,n){return"var "+f(n)+" = "+u(l)+";"}).concat("",l.classes.map(function(l,n){return"var "+p(n)+" = "+r(l)+";"})).concat("",l.expectations.map(function(l,n){return"var "+h(n)+" = "+o(l)+";"})).concat("",l.functions.map(function(l,n){return"var "+d(n)+" = "+i(l)+";"})).join("\n")}())),u.push([""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$expected = [];"," var peg$silentFails = 0;",""].join("\n")),e.cache&&u.push([" var peg$resultsCache = {};",""].join("\n")),e.trace){if("size"===e.optimize){var v="["+l.rules.map(function(l){return'"'.concat(t.stringEscape(l.name),'"')}).join(", ")+"]";u.push([" var peg$ruleNames = "+v+";",""].join("\n"))}i("DefaultTracer")?u.push([' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""].join("\n")):u.push([' var peg$tracer = "tracer" in options ? options.tracer : peg$FauxTracer;',""].join("\n"))}return u.push([" var peg$result;",""].join("\n")),"size"===e.optimize?u.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleIndices)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleIndex = peg$startRuleIndices[options.startRule];"," }"].join("\n")):u.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }"].join("\n")),i("text")&&u.push([""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }"].join("\n")),i("offset")&&u.push([""," function offset() {"," return peg$savedPos;"," }"].join("\n")),i("range")&&u.push([""," function range() {"," return [peg$savedPos, peg$currPos];"," }"].join("\n")),i("location")&&u.push([""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }"].join("\n")),i("expected")&&u.push([""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }"].join("\n")),i("error")&&u.push([""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }"].join("\n")),u.push([""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }","",i("filename")?' var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;':""," function peg$computeLocation(startPos, endPos) {"," var loc = {};","",i("filename")?" if ( peg$VALIDFILENAME ) loc.filename = options.filename;":"",""," var startPosDetails = peg$computePosDetails(startPos);"," loc.start = {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," };",""," var endPosDetails = peg$computePosDetails(endPos);"," loc.end = {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," };",""," return loc;"," }",""," function peg$begin() {"," peg$expected.push({ pos: peg$currPos, variants: [] });"," }",""," function peg$expect(expected) {"," var top = peg$expected[peg$expected.length - 1];",""," if (peg$currPos < top.pos) { return; }",""," if (peg$currPos > top.pos) {"," top.pos = peg$currPos;"," top.variants = [];"," }",""," top.variants.push(expected);"," }",""," function peg$end(invert) {"," var expected = peg$expected.pop();"," var top = peg$expected[peg$expected.length - 1];"," var variants = expected.variants;",""," if (top.pos !== expected.pos) { return; }",""," if (invert) {"," variants = variants.map(function(e) {",' return e.type === "not" ? e.expected : { type: "not", expected: e };'," });"," }",""," Array.prototype.push.apply(top.variants, variants);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""," function peg$buildError() {"," var expected = peg$expected[0];"," var failPos = expected.pos;",""," return peg$buildStructuredError("," expected.variants,"," failPos < input.length ? input.charAt(failPos) : null,"," failPos < input.length"," ? peg$computeLocation(failPos, failPos + 1)"," : peg$computeLocation(failPos, failPos)"," );"," }",""].join("\n")),"size"===e.optimize?(u.push(s(function(){var l,n=[];function t(l,n){var e=n+3,t="bc[ip + "+(e-2)+"]",u="bc[ip + "+(e-1)+"]";return["ends.push(end);","ips.push(ip + "+e+" + "+t+" + "+u+");","","if ("+l+") {"," end = ip + "+e+" + "+t+";"," ip += "+e+";","} else {"," end = ip + "+e+" + "+t+" + "+u+";"," ip += "+e+" + "+t+";","}","","break;"].join("\n")}return n.push(["function peg$decode(s) {",' return s.split("").map(function(ch) { return ch.charCodeAt(0) - 32; });',"}","","function peg$parseRule(index) {"].join("\n")),e.trace?n.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var startPos = peg$currPos;"," var params, paramsLength, paramsN;"].join("\n")):n.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var params, paramsLength, paramsN;"].join("\n")),n.push(s(g("peg$ruleNames[index]","index"))),n.push([" while (true) {"," while (ip < end) {"," switch (bc[ip]) {"," case "+r.PUSH_EMPTY_STRING+":"," stack.push('');"," ip++;"," break;",""," case "+r.PUSH_UNDEFINED+":"," stack.push(undefined);"," ip++;"," break;",""," case "+r.PUSH_NULL+":"," stack.push(null);"," ip++;"," break;",""," case "+r.PUSH_FAILED+":"," stack.push(peg$FAILED);"," ip++;"," break;",""," case "+r.PUSH_EMPTY_ARRAY+":"," stack.push([]);"," ip++;"," break;",""," case "+r.PUSH_CURR_POS+":"," stack.push(peg$currPos);"," ip++;"," break;",""," case "+r.POP+":"," stack.pop();"," ip++;"," break;",""," case "+r.POP_CURR_POS+":"," peg$currPos = stack.pop();"," ip++;"," break;",""," case "+r.POP_N+":"," stack.length -= bc[ip + 1];"," ip += 2;"," break;",""," case "+r.NIP+":"," stack.splice(-2, 1);"," ip++;"," break;",""," case "+r.APPEND+":"," stack[stack.length - 2].push(stack.pop());"," ip++;"," break;",""," case "+r.WRAP+":"," stack.push(stack.splice(stack.length - bc[ip + 1], bc[ip + 1]));"," ip += 2;"," break;",""," case "+r.TEXT+":"," stack.push(input.substring(stack.pop(), peg$currPos));"," ip++;"," break;",""," case "+r.PLUCK+":"," paramsLength = bc[ip + 2];"," paramsN = 3 + paramsLength",""," params = bc.slice(ip + 3, ip + paramsN);"," params = paramsLength === 1"," ? stack[stack.length - 1 - params[ 0 ]]"," : params.map(function(p) { return stack[stack.length - 1 - p]; });",""," stack.splice("," stack.length - bc[ip + 1],"," bc[ip + 1],"," params"," );",""," ip += paramsN;"," break;",""," case "+r.IF+":",c(t("stack[stack.length - 1]",0)),""," case "+r.IF_ERROR+":",c(t("stack[stack.length - 1] === peg$FAILED",0)),""," case "+r.IF_NOT_ERROR+":",c(t("stack[stack.length - 1] !== peg$FAILED",0)),""," case "+r.WHILE_NOT_ERROR+":",c((l="stack[stack.length - 1] !== peg$FAILED",["if ("+l+") {"," ends.push(end);"," ips.push(ip);",""," end = ip + 2 + bc[ip + 1];"," ip += 2;","} else {"," ip += 2 + bc[ip + 1];","}","","break;"].join("\n"))),""," case "+r.MATCH_ANY+":",c(t("input.length > peg$currPos",0)),""," case "+r.MATCH_STRING+":",c(t("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length) === peg$literals[bc[ip + 1]]",1)),""," case "+r.MATCH_STRING_IC+":",c(t("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length).toLowerCase() === peg$literals[bc[ip + 1]]",1)),""," case "+r.MATCH_CLASS+":",c(t("peg$regexps[bc[ip + 1]].test(input.charAt(peg$currPos))",1)),""," case "+r.ACCEPT_N+":"," stack.push(input.substr(peg$currPos, bc[ip + 1]));"," peg$currPos += bc[ip + 1];"," ip += 2;"," break;",""," case "+r.ACCEPT_STRING+":"," stack.push(peg$literals[bc[ip + 1]]);"," peg$currPos += peg$literals[bc[ip + 1]].length;"," ip += 2;"," break;",""," case "+r.EXPECT+":"," rule$expects(peg$expectations[bc[ip + 1]]);"," ip += 2;"," break;",""," case "+r.LOAD_SAVED_POS+":"," peg$savedPos = stack[stack.length - 1 - bc[ip + 1]];"," ip += 2;"," break;",""," case "+r.UPDATE_SAVED_POS+":"," peg$savedPos = peg$currPos;"," ip++;"," break;",""," case "+r.CALL+":",c(["params = bc.slice(ip + 4, ip + 4 + bc[ip + 3])"," .map(function(p) { return stack[stack.length - 1 - p]; });","","stack.splice("," stack.length - bc[ip + 2],"," bc[ip + 2],"," peg$functions[bc[ip + 1]].apply(null, params)",");","","ip += 4 + bc[ip + 3];","break;"].join("\n")),""," case "+r.RULE+":"," stack.push(peg$parseRule(bc[ip + 1]));"," ip += 2;"," break;",""," case "+r.SILENT_FAILS_ON+":"," peg$silentFails++;"," ip++;"," break;",""," case "+r.SILENT_FAILS_OFF+":"," peg$silentFails--;"," ip++;"," break;",""," case "+r.EXPECT_NS_BEGIN+":"," peg$begin();"," ip++;"," break;",""," case "+r.EXPECT_NS_END+":"," peg$end(bc[ip + 1]);"," ip += 2;"," break;",""," // istanbul ignore next"," default:"," throw new Error(",' "Rule #" + index + "'+(e.trace?" ('\" + peg$ruleNames[ index ] + \"')":"")+', position " + ip + ": "',' + "Invalid opcode " + bc[ip] + "."'," );"," }"," }",""," if (ends.length > 0) {"," end = ends.pop();"," ip = ips.pop();"," } else {"," break;"," }"," }"].join("\n")),n.push(s(m("peg$ruleNames[index]","stack[0]"))),n.push("}"),n.join("\n")}())),u.push("")):l.rules.forEach(function(o){u.push(s(function(u){var o=[],i=[];function a(l){return l<0&&n.fatal("Rule '"+u.name+"': Var stack underflow: attempt to use var at index "+l),"s"+l}var c={sp:-1,maxSp:-1,push:function(l){var n=a(++this.sp)+" = "+l+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),n},pop:function(l){if(void 0===l)return a(this.sp--);for(var n=Array(l),e=0;e0&&(c.sp=m,i=e(t.slice(v,v+g)),f=c.sp,v+=g,a!==f&&n.fatal("Rule '"+u.name+"', position "+p+": Branches of a condition can't move the stack pointer differently (before: "+m+", after then: "+a+", after else: "+f+").")),A.push("if ("+l+") {"),A.push(s(o)),g>0&&(A.push("} else {"),A.push(s(i))),A.push("}")}function x(){var l=t[v+4-1],n=d(t[v+1])+"("+t.slice(v+4,v+4+l).map(function(l){return c.index(l)}).join(", ")+")";c.pop(t[v+2]),A.push(c.push(n)),v+=4+l}for(;v peg$currPos",0);break;case r.MATCH_STRING:E(l.literals[t[v+1]].length>1?"input.substr(peg$currPos, "+l.literals[t[v+1]].length+") === "+f(t[v+1]):"input.charCodeAt(peg$currPos) === "+l.literals[t[v+1]].charCodeAt(0),1);break;case r.MATCH_STRING_IC:E("input.substr(peg$currPos, "+l.literals[t[v+1]].length+").toLowerCase() === "+f(t[v+1]),1);break;case r.MATCH_CLASS:E(p(t[v+1])+".test(input.charAt(peg$currPos))",1);break;case r.ACCEPT_N:A.push(c.push(t[v+1]>1?"input.substr(peg$currPos, "+t[v+1]+")":"input.charAt(peg$currPos)")),A.push(t[v+1]>1?"peg$currPos += "+t[v+1]+";":"peg$currPos++;"),v+=2;break;case r.ACCEPT_STRING:A.push(c.push(f(t[v+1]))),A.push(l.literals[t[v+1]].length>1?"peg$currPos += "+l.literals[t[v+1]].length+";":"peg$currPos++;"),v+=2;break;case r.EXPECT:A.push("rule$expects("+h(t[v+1])+");"),v+=2;break;case r.LOAD_SAVED_POS:A.push("peg$savedPos = "+c.index(t[v+1])+";"),v+=2;break;case r.UPDATE_SAVED_POS:A.push("peg$savedPos = peg$currPos;"),v++;break;case r.CALL:x();break;case r.RULE:A.push(c.push("peg$parse"+l.rules[t[v+1]].name+"()")),v+=2;break;case r.SILENT_FAILS_ON:A.push("peg$silentFails++;"),v++;break;case r.SILENT_FAILS_OFF:A.push("peg$silentFails--;"),v++;break;case r.EXPECT_NS_BEGIN:A.push("peg$begin();"),v++;break;case r.EXPECT_NS_END:A.push("peg$end("+(0!==t[v+1])+");"),v+=2;break;default:n.fatal("Rule '"+u.name+"', position "+v+": Invalid opcode "+t[v]+".")}return A.join("\n")}(u.bytecode);o.push("function peg$parse"+u.name+"() {"),e.trace&&o.push(" var startPos = peg$currPos;");for(var b=0;b<=c.maxSp;b++)i[b]=a(b);return o.push(" var "+i.join(", ")+";"),o.push(s(g('"'+t.stringEscape(u.name)+'"',l.indexOfRule(u.name)))),o.push(s(y)),o.push(s(m('"'+t.stringEscape(u.name)+'"',a(0)))),o.push("}"),o.join("\n")}(o))),u.push("")}),l.initializer&&(u.push(s(l.initializer.code)),u.push("")),u.push(" peg$begin();"),"size"===e.optimize?u.push(" peg$result = peg$parseRule(peg$startRuleIndex);"):u.push(" peg$result = peg$startRuleFunction();"),u.push([""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$expect(peg$endExpectation());"," }",""," throw peg$buildError();"," }","}"].join("\n")),u.join("\n")}())}},function(l,n,e){"use strict";l.exports=function(l,n,e){var t=n.buildVisitor({rule_ref:function(l,n,e){l.name===n&&(l.name=e)}}),u=e.allowedStartRules,r=[];l.rules.forEach(function(n){var e;"rule"===(e=n).type&&"rule_ref"===e.expression.type&&(t(l,n.name,n.expression.name),u.indexOf(n.name)<0)||r.push(n)}),l.rules=r}},function(l,n,e){"use strict";var t=e(1),u=Object.prototype.hasOwnProperty;l.exports=function(l,n){var e;function r(l,n){e(l.expression,t.clone(n))}(e=n.buildVisitor({rule:function(l){e(l.expression,{})},choice:function(l,n){l.alternatives.forEach(function(l){e(l,t.clone(n))})},action:r,labeled:function(l,t){var r=l.label;if(r&&u.call(t,r)){var o=t[r].start;n.error('Label "'.concat(r,'" is already defined at line ').concat(o.line,", column ").concat(o.column,"."),l.location)}e(l.expression,t),r&&(t[r]=l.location)},text:r,simple_and:r,simple_not:r,optional:r,zero_or_more:r,one_or_more:r,group:r}))(l)}},function(l,n,e){"use strict";var t=Object.prototype.hasOwnProperty;l.exports=function(l,n){var e={};n.buildVisitor({rule:function(l){var u=l.name;if(t.call(e,u)){var r=e[u].start;n.error('Rule "'.concat(u,'" is already defined at line ').concat(r.line,", column ").concat(r.column,"."),l.location)}e[l.name]=l.location}})(l)}},function(l,n,e){"use strict";l.exports=function(l,n,e){var t={};function u(l){t[l.name||l]=!0}e.allowedStartRules.forEach(u),n.buildVisitor({rule_ref:u})(l),l.rules.forEach(function(l){!0!==t[l.name]&&n.warn('Rule "'.concat(l.name,'" is not referenced.'),l.location)})}},function(l,n,e){"use strict";l.exports=function(l,n){var e=[],t=n.buildVisitor({rule:function(l){e.push(l.name),t(l.expression),e.pop(l.name)},sequence:function(n){n.elements.every(function(n){return t(n),!l.alwaysConsumesOnSuccess(n)})},rule_ref:function(u){if(-1!==e.indexOf(u.name)){e.push(u.name);var r=e.join(" -> ");n.error("Possible infinite loop when parsing (left recursion: ".concat(r,")."),u.location)}t(l.findRule(u.name))}});t(l)}},function(l,n,e){"use strict";l.exports=function(l,n){n.buildVisitor({zero_or_more:function(e){l.alwaysConsumesOnSuccess(e.expression)||n.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",e.location)},one_or_more:function(e){l.alwaysConsumesOnSuccess(e.expression)||n.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",e.location)}})(l)}},function(l,n,e){"use strict";l.exports=function(l,n,e){n.buildVisitor({rule_ref:function(e){l.findRule(e.name)||n.error('Rule "'.concat(e.name,'" is not defined.'),e.location)}})(l),e.allowedStartRules.forEach(function(e){l.findRule(e)||n.error('Start rule "'.concat(e,'" is not defined.'))})}},function(l,n,e){"use strict";l.exports=function(l,n){var e;function t(l){return l.match=0,l.match}function u(l){return e(l.expression),l.match=1,l.match}function r(l){return l.match=e(l.expression),l.match}function o(l,n){for(var t=l.length,u=0,r=0,o=0;o0&&++u,i<0&&++r}return u===t?1:n?r===t?-1:0:r>0?-1:0}(e=n.buildVisitor({rule:function(l){var t,u=0;if(void 0===l.match){l.match=0;do{t=l.match,l.match=e(l.expression),++u>6&&n.error("Infinity cycle detected when trying to evaluate node match result",l.location)}while(t!==l.match)}return l.match},named:r,choice:function(l){return l.match=o(l.alternatives,!0),l.match},action:r,sequence:function(l){return l.match=o(l.elements,!1),l.match},labeled:r,text:r,simple_and:r,simple_not:function(l){return l.match=-e(l.expression),l.match},optional:u,zero_or_more:u,one_or_more:r,group:r,semantic_and:t,semantic_not:t,rule_ref:function(n){var t=l.findRule(n.name);return n.match=e(t),n.match},literal:function(l){return l.match=0===l.value.length?1:0,l.match},class:function(l){return l.match=0===l.parts.length?-1:0,l.match},any:t}))(l)}},function(l,n,e){"use strict";l.exports=function(l,n){n.buildVisitor({action:function(l){this.visit(l.expression,!0)},labeled:function(l,e){var t;!0===l.pick&&(!0===e&&n.error('"@" cannot be used with an action block.',l.location),("semantic_and"===(t=l.expression.type)||"semantic_not"===t)&&n.error('"@" cannot be used on a semantic predicate.',l.location),this.visit(l.expression))}})(l)}},function(l,n,e){"use strict";function t(l,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.opcodes=n.opcodes||o,this.parser=n.parser||i,this.passes=n.passes||{},this.visitor=n.visitor||u.visitor,this.vm=n.vm||a,"function"==typeof n.warn&&(this.warn=n.warn),"function"==typeof n.error&&(this.error=n.error),Object.defineProperty(this,"fatal",{value:s})}var n,e,r;return n=l,(e=[{key:"parse",value:function(l,n){return this.parser.parse(l,n)}},{key:"buildVisitor",value:function(l){return this.visitor.build(l)}},{key:"warn",value:function(l,n){}},{key:"error",value:function(l,n){s(l,n)}}])&&t(n.prototype,e),r&&t(n,r),l}();l.exports=c},function(l,n,e){"use strict";l.exports={PUSH_EMPTY_STRING:0,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:41,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CLASS:20,ACCEPT_N:21,ACCEPT_STRING:22,EXPECT:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29,EXPECT_NS_BEGIN:38,EXPECT_NS_END:39}},function(l,n,e){(function(l){var t=void 0!==l&&l||"undefined"!=typeof self&&self||window,u=Function.prototype.apply;function r(l,n){this._id=l,this._clearFn=n}n.setTimeout=function(){return new r(u.call(setTimeout,t,arguments),clearTimeout)},n.setInterval=function(){return new r(u.call(setInterval,t,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(l){l&&l.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(t,this._id)},n.enroll=function(l,n){clearTimeout(l._idleTimeoutId),l._idleTimeout=n},n.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},n._unrefActive=n.active=function(l){clearTimeout(l._idleTimeoutId);var n=l._idleTimeout;n>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},n))},e(53),n.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==l&&l.setImmediate||this&&this.setImmediate,n.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==l&&l.clearImmediate||this&&this.clearImmediate}).call(this,e(15))},function(l,n,e){(function(n){var e;e=function(){"use strict";var l="function"==typeof Promise,e="object"==typeof self?self:n,t="undefined"!=typeof Symbol,u="undefined"!=typeof Map,r="undefined"!=typeof Set,o="undefined"!=typeof WeakMap,i="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,s=t&&void 0!==Symbol.iterator,c=t&&void 0!==Symbol.toStringTag,f=r&&"function"==typeof Set.prototype.entries,p=u&&"function"==typeof Map.prototype.entries,h=f&&Object.getPrototypeOf((new Set).entries()),d=p&&Object.getPrototypeOf((new Map).entries()),g=s&&"function"==typeof Array.prototype[Symbol.iterator],m=g&&Object.getPrototypeOf([][Symbol.iterator]()),y=s&&"function"==typeof String.prototype[Symbol.iterator],b=y&&Object.getPrototypeOf(""[Symbol.iterator]()),v=8,w=-1;return function(n){var t=typeof n;if("object"!==t)return t;if(null===n)return"null";if(n===e)return"global";if(Array.isArray(n)&&(!1===c||!(Symbol.toStringTag in n)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&n===window.location)return"Location";if("object"==typeof window.document&&n===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&n===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&n===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&n instanceof window.HTMLElement){if("BLOCKQUOTE"===n.tagName)return"HTMLQuoteElement";if("TD"===n.tagName)return"HTMLTableDataCellElement";if("TH"===n.tagName)return"HTMLTableHeaderCellElement"}}var s=c&&n[Symbol.toStringTag];if("string"==typeof s)return s;var f=Object.getPrototypeOf(n);return f===RegExp.prototype?"RegExp":f===Date.prototype?"Date":l&&f===Promise.prototype?"Promise":r&&f===Set.prototype?"Set":u&&f===Map.prototype?"Map":i&&f===WeakSet.prototype?"WeakSet":o&&f===WeakMap.prototype?"WeakMap":a&&f===DataView.prototype?"DataView":u&&f===d?"Map Iterator":r&&f===h?"Set Iterator":g&&f===m?"Array Iterator":y&&f===b?"String Iterator":null===f?"Object":Object.prototype.toString.call(n).slice(v,w)}},l.exports=e()}).call(this,e(15))},function(l,n,e){var t=e(45),u=e(46),r=e(62),o=e(8);l.exports=function(l,n,e,t){return a({showHidden:n,seen:[],stylize:function(l){return l}},l,void 0===e?2:e)};var i=function(l){return"object"==typeof HTMLElement?l instanceof HTMLElement:l&&"object"==typeof l&&"nodeType"in l&&1===l.nodeType&&"string"==typeof l.nodeName};function a(l,e,g){if(e&&"function"==typeof e.inspect&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var m=e.inspect(g,l);return"string"!=typeof m&&(m=a(l,m,g)),m}var y=function(l,n){switch(typeof n){case"undefined":return l.stylize("undefined","undefined");case"string":var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string");case"number":return 0===n&&1/n==-1/0?l.stylize("-0","number"):l.stylize(""+n,"number");case"boolean":return l.stylize(""+n,"boolean");case"symbol":return l.stylize(n.toString(),"symbol")}if(null===n)return l.stylize("null","null")}(l,e);if(y)return y;if(i(e)){if("outerHTML"in e)return e.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(e);var b=document.createElementNS("http://www.w3.org/1999/xhtml","_");b.appendChild(e.cloneNode(!1));var v=b.innerHTML.replace("><",">"+e.innerHTML+"<");return b.innerHTML="",v}catch(l){}}var w,A,E=r(e),x=l.showHidden?u(e):E;if(0===x.length||h(e)&&(1===x.length&&"stack"===x[0]||2===x.length&&"description"===x[0]&&"stack"===x[1])){if("function"==typeof e)return A=(w=t(e))?": "+w:"",l.stylize("[Function"+A+"]","special");if(f(e))return l.stylize(RegExp.prototype.toString.call(e),"regexp");if(p(e))return l.stylize(Date.prototype.toUTCString.call(e),"date");if(h(e))return s(e)}var C,_,T="",S=!1,k=!1,F=["{","}"];if("object"==typeof(C=e)&&/\w+Array]$/.test(d(C))&&(k=!0,F=["[","]"]),function(l){return Array.isArray(l)||"object"==typeof l&&"[object Array]"===d(l)}(e)&&(S=!0,F=["[","]"]),"function"==typeof e&&(T=" [Function"+(A=(w=t(e))?": "+w:"")+"]"),f(e)&&(T=" "+RegExp.prototype.toString.call(e)),p(e)&&(T=" "+Date.prototype.toUTCString.call(e)),h(e))return s(e);if(0===x.length&&(!S||0==e.length))return F[0]+T+F[1];if(g<0)return f(e)?l.stylize(RegExp.prototype.toString.call(e),"regexp"):l.stylize("[Object]","special");if(l.seen.push(e),S)_=function(l,n,e,t,u){for(var r=[],o=0,i=n.length;o=o.truncateThreshold-7){n+="...";break}n+=l[e]+", "}-1!==(n+=" ]").indexOf(", ]")&&(n=n.replace(", ]"," ]"));return n}(e);_=x.map(function(n){return c(l,e,g,E,n,S)})}return l.seen.pop(),function(l,n,e){if(l.reduce(function(l,n){return l+n.length+1},0)>60)return e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1];return e[0]+n+" "+l.join(", ")+" "+e[1]}(_,T,F)}function s(l){return"["+Error.prototype.toString.call(l)+"]"}function c(l,n,e,t,u,r){var o,i,s=Object.getOwnPropertyDescriptor(n,u);if(s&&(s.get?i=s.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):s.set&&(i=l.stylize("[Setter]","special"))),t.indexOf(u)<0&&(o="["+u+"]"),i||(l.seen.indexOf(n[u])<0?(i=a(l,n[u],null===e?null:e-1)).indexOf("\n")>-1&&(i=r?i.split("\n").map(function(l){return" "+l}).join("\n").substr(2):"\n"+i.split("\n").map(function(l){return" "+l}).join("\n")):i=l.stylize("[Circular]","special")),void 0===o){if(r&&u.match(/^\d+$/))return i;(o=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=l.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=l.stylize(o,"string"))}return o+": "+i}function f(l){return"object"==typeof l&&"[object RegExp]"===d(l)}function p(l){return"object"==typeof l&&"[object Date]"===d(l)}function h(l){return"object"==typeof l&&"[object Error]"===d(l)}function d(l){return Object.prototype.toString.call(l)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(global,setImmediate,clearImmediate){__webpack_require__.d(__webpack_exports__,"serverPrototype",function(){return _serverPrototype}),__webpack_require__.d(__webpack_exports__,"getFakes",function(){return _getFakes}),__webpack_require__.d(__webpack_exports__,"getRestorers",function(){return _getRestorers}),__webpack_require__.d(__webpack_exports__,"createStubInstance",function(){return _createStubInstance}),__webpack_require__.d(__webpack_exports__,"inject",function(){return _inject}),__webpack_require__.d(__webpack_exports__,"mock",function(){return _mock}),__webpack_require__.d(__webpack_exports__,"reset",function(){return _reset}),__webpack_require__.d(__webpack_exports__,"resetBehavior",function(){return _resetBehavior}),__webpack_require__.d(__webpack_exports__,"resetHistory",function(){return _resetHistory}),__webpack_require__.d(__webpack_exports__,"restore",function(){return _restore}),__webpack_require__.d(__webpack_exports__,"restoreContext",function(){return _restoreContext}),__webpack_require__.d(__webpack_exports__,"replace",function(){return _replace}),__webpack_require__.d(__webpack_exports__,"replaceGetter",function(){return _replaceGetter}),__webpack_require__.d(__webpack_exports__,"replaceSetter",function(){return _replaceSetter}),__webpack_require__.d(__webpack_exports__,"spy",function(){return _spy}),__webpack_require__.d(__webpack_exports__,"stub",function(){return _stub}),__webpack_require__.d(__webpack_exports__,"fake",function(){return _fake}),__webpack_require__.d(__webpack_exports__,"useFakeTimers",function(){return _useFakeTimers}),__webpack_require__.d(__webpack_exports__,"verify",function(){return _verify}),__webpack_require__.d(__webpack_exports__,"verifyAndRestore",function(){return _verifyAndRestore}),__webpack_require__.d(__webpack_exports__,"useFakeServer",function(){return _useFakeServer}),__webpack_require__.d(__webpack_exports__,"useFakeXMLHttpRequest",function(){return _useFakeXMLHttpRequest}),__webpack_require__.d(__webpack_exports__,"usingPromise",function(){return _usingPromise}),__webpack_require__.d(__webpack_exports__,"sandbox",function(){return _sandbox}),__webpack_require__.d(__webpack_exports__,"createSandbox",function(){return _createSandbox}),__webpack_require__.d(__webpack_exports__,"assert",function(){return _assert}),__webpack_require__.d(__webpack_exports__,"match",function(){return _match}),__webpack_require__.d(__webpack_exports__,"spyCall",function(){return _spyCall}),__webpack_require__.d(__webpack_exports__,"expectation",function(){return _expectation}),__webpack_require__.d(__webpack_exports__,"defaultConfig",function(){return _defaultConfig}),__webpack_require__.d(__webpack_exports__,"setFormatter",function(){return _setFormatter}),__webpack_require__.d(__webpack_exports__,"timers",function(){return _timers}),__webpack_require__.d(__webpack_exports__,"xhr",function(){return _xhr}),__webpack_require__.d(__webpack_exports__,"FakeXMLHttpRequest",function(){return _FakeXMLHttpRequest}),__webpack_require__.d(__webpack_exports__,"fakeServer",function(){return _fakeServer}),__webpack_require__.d(__webpack_exports__,"fakeServerWithClock",function(){return _fakeServerWithClock}),__webpack_require__.d(__webpack_exports__,"createFakeServer",function(){return _createFakeServer}),__webpack_require__.d(__webpack_exports__,"createFakeServerWithClock",function(){return _createFakeServerWithClock}),__webpack_require__.d(__webpack_exports__,"addBehavior",function(){return _addBehavior});var call=Function.call,copyPrototype=function(l){return Object.getOwnPropertyNames(l).reduce(function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=call.bind(l[e])),n},Object.create(null))},array=copyPrototype(Array.prototype),every=array.every;function hasCallsLeft(l,n){return void 0===l[n.id]&&(l[n.id]=0),l[n.id]1?arguments:l;return every(n,checkAdjacentCalls.bind(null,{}))},functionName=function(l){return l.displayName||l.name||(String(l).match(/function ([^\s(]+)/)||[])[1]},className=function(l){return l.constructor&&l.constructor.name||"function"==typeof l.constructor&&functionName(l.constructor)||null},every$1=function(l,n){var e=!0;try{l.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch(l){e=!1}return e},sort=array.sort,slice=array.slice;function comparator(l,n){var e=l.getCall(0),t=n.getCall(0);return(e&&e.callId||-1)<(t&&t.callId||-1)?-1:1}var orderByFirstCall=function(l){return sort(slice(l),comparator)},_function=copyPrototype(Function.prototype),object=copyPrototype(Object.prototype),string=copyPrototype(String.prototype),prototypes={array:array,function:_function,object:object,string:string},commonjsGlobal="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function createCommonjsModule(l,n){return l(n={exports:{}},n.exports),n.exports}var typeDetect=createCommonjsModule(function(l,n){var e,t,u,r,o,i,a,s,c,f,p,h,d,g,m,y,b,v,w,A;l.exports=(e="function"==typeof Promise,t="object"==typeof self?self:commonjsGlobal,u="undefined"!=typeof Symbol,r="undefined"!=typeof Map,o="undefined"!=typeof Set,i="undefined"!=typeof WeakMap,a="undefined"!=typeof WeakSet,s="undefined"!=typeof DataView,c=u&&void 0!==Symbol.iterator,f=u&&void 0!==Symbol.toStringTag,p=o&&"function"==typeof Set.prototype.entries,h=r&&"function"==typeof Map.prototype.entries,d=p&&Object.getPrototypeOf((new Set).entries()),g=h&&Object.getPrototypeOf((new Map).entries()),m=c&&"function"==typeof Array.prototype[Symbol.iterator],y=m&&Object.getPrototypeOf([][Symbol.iterator]()),b=c&&"function"==typeof String.prototype[Symbol.iterator],v=b&&Object.getPrototypeOf(""[Symbol.iterator]()),w=8,A=-1,function(l){var n=typeof l;if("object"!==n)return n;if(null===l)return"null";if(l===t)return"global";if(Array.isArray(l)&&(!1===f||!(Symbol.toStringTag in l)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&l===window.location)return"Location";if("object"==typeof window.document&&l===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&l===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&l===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&l instanceof window.HTMLElement){if("BLOCKQUOTE"===l.tagName)return"HTMLQuoteElement";if("TD"===l.tagName)return"HTMLTableDataCellElement";if("TH"===l.tagName)return"HTMLTableHeaderCellElement"}}var u=f&&l[Symbol.toStringTag];if("string"==typeof u)return u;var c=Object.getPrototypeOf(l);return c===RegExp.prototype?"RegExp":c===Date.prototype?"Date":e&&c===Promise.prototype?"Promise":o&&c===Set.prototype?"Set":r&&c===Map.prototype?"Map":a&&c===WeakSet.prototype?"WeakSet":i&&c===WeakMap.prototype?"WeakMap":s&&c===DataView.prototype?"DataView":r&&c===g?"Map Iterator":o&&c===d?"Set Iterator":m&&c===y?"Array Iterator":b&&c===v?"String Iterator":null===c?"Object":Object.prototype.toString.call(l).slice(w,A)})}),typeOf=function(l){return typeDetect(l).toLowerCase()};function valueToString(l){return l&&l.toString?l.toString():String(l)}var valueToString_1=valueToString,lib={calledInOrder:calledInOrder,className:className,every:every$1,functionName:functionName,orderByFirstCall:orderByFirstCall,prototypes:prototypes,typeOf:typeOf,valueToString:valueToString_1},arrayProto=lib.prototypes.array,hasOwnProperty=lib.prototypes.object.hasOwnProperty,join=arrayProto.join,push=arrayProto.push,slice$1=arrayProto.slice,hasDontEnumBug=function(){var l={constructor:function(){return"0"},toString:function(){return"1"},valueOf:function(){return"2"},toLocaleString:function(){return"3"},prototype:function(){return"4"},isPrototypeOf:function(){return"5"},propertyIsEnumerable:function(){return"6"},hasOwnProperty:function(){return"7"},length:function(){return"8"},unique:function(){return"9"}},n=[];for(var e in l)hasOwnProperty(l,e)&&push(n,l[e]());return"0123456789"!==join(n,"")}();function extendCommon(l,n,e){var t,u,r;for(u=0;u=0)return n[t];t===useLeftMostCallback&&(e=n),t===useRightMostCallback&&(e=reverse(slice$2(n)));for(var u=l.callArgProp,r=0,o=e.length;r0&&(t+=" Received ["+join$1(e,", ")+"]"),t):"argument at index "+l.callArgAt+" is not a function: "+n}function ensureArgs(l,n,e){var t=n[l.replace(/sArg/,"ArgAt")];if(t>=e.length)throw new TypeError(l+" failed: "+(t+1)+" arguments required but only "+e.length+" present")}function callCallback(l,n){if("number"==typeof l.callArgAt){ensureArgs("callsArg",l,n);var e=getCallback(l,n);if("function"!=typeof e)throw new TypeError(getCallbackError(l,e,n));if(!l.callbackAsync)return e.apply(l.callbackContext,l.callbackArguments);nextTick$1(function(){e.apply(l.callbackContext,l.callbackArguments)})}}var proto={create:function(l){var n=extend({},proto);return delete n.create,delete n.addBehavior,delete n.createBehavior,n.stub=l,l.defaultBehavior&&l.defaultBehavior.promiseLibrary&&(n.promiseLibrary=l.defaultBehavior.promiseLibrary),n},isPresent:function(){return"number"==typeof this.callArgAt||this.exception||this.exceptionCreator||"number"==typeof this.returnArgAt||this.returnThis||"number"==typeof this.resolveArgAt||this.resolveThis||"number"==typeof this.throwArgAt||this.fakeFn||this.returnValueDefined},invoke:function(l,n){var e=callCallback(this,n);if(this.exception)throw this.exception;if(this.exceptionCreator)throw this.exception=this.exceptionCreator(),this.exceptionCreator=void 0,this.exception;if("number"==typeof this.returnArgAt)return ensureArgs("returnsArg",this,n),n[this.returnArgAt];if(this.returnThis)return l;if("number"==typeof this.throwArgAt)throw ensureArgs("throwsArg",this,n),n[this.throwArgAt];return this.fakeFn?this.fakeFn.apply(l,n):"number"==typeof this.resolveArgAt?(ensureArgs("resolvesArg",this,n),(this.promiseLibrary||Promise).resolve(n[this.resolveArgAt])):this.resolveThis?(this.promiseLibrary||Promise).resolve(l):this.resolve?(this.promiseLibrary||Promise).resolve(this.returnValue):this.reject?(this.promiseLibrary||Promise).reject(this.returnValue):this.callsThrough?this.stub.wrappedMethod.apply(l,n):void 0!==this.returnValue?this.returnValue:"number"==typeof this.callArgAt?e:this.returnValue},onCall:function(l){return this.stub.onCall(l)},onFirstCall:function(){return this.stub.onFirstCall()},onSecondCall:function(){return this.stub.onSecondCall()},onThirdCall:function(){return this.stub.onThirdCall()},withArgs:function(){throw new Error('Defining a stub by invoking "stub.onCall(...).withArgs(...)" is not supported. Use "stub.withArgs(...).onCall(...)" to define sequential behavior for calls with certain arguments.')}};function createBehavior(l){return function(){return this.defaultBehavior=this.defaultBehavior||proto.create(this),this.defaultBehavior[l].apply(this.defaultBehavior,arguments),this}}function addBehavior(l,n,e){proto[n]=function(){return e.apply(this,concat([this],slice$2(arguments))),this.stub||this},l[n]=createBehavior(n)}proto.addBehavior=addBehavior,proto.createBehavior=createBehavior;var asyncBehaviors=exportAsyncBehaviors(proto),behavior=extend({},proto,asyncBehaviors),forEach=lib.prototypes.array.forEach;function walkInternal(l,n,e,t,u){var r,o;if("function"==typeof Object.getOwnPropertyNames)forEach(Object.getOwnPropertyNames(l),function(r){if(!0!==u[r]){u[r]=!0;var o="function"==typeof Object.getOwnPropertyDescriptor(l,r).get?t:l;n.call(e,r,o)}}),(r=Object.getPrototypeOf(l))&&walkInternal(r,n,e,t,u);else for(o in l)n.call(e,l[o],o,l)}var walk=function(l,n,e){return walkInternal(l,n,e,l,{})},getPropertyDescriptor=function(l,n){for(var e,t=l;t&&!(e=Object.getOwnPropertyDescriptor(t,n));)t=Object.getPrototypeOf(t);return e},hasOwnProperty$1=lib.prototypes.object.hasOwnProperty,push$1=lib.prototypes.array.push;function collectMethod(l,n,e,t){"function"==typeof getPropertyDescriptor(t,e).value&&hasOwnProperty$1(n,e)&&push$1(l,n[e])}function collectOwnMethods(l){var n=[];return walk(l,collectMethod.bind(null,n,l)),n}var collectOwnMethods_1=collectOwnMethods,isEsModule=function(l){return l&&"undefined"!=typeof Symbol&&"Module"===l[Symbol.toStringTag]&&Object.isSealed(l)};function isPropertyConfigurable(l,n){var e=getPropertyDescriptor(l,n);return!e||e.configurable}var isPropertyConfigurable_1=isPropertyConfigurable;function isNonExistentOwnProperty(l,n){return l&&void 0!==n&&!(n in l)}var isNonExistentOwnProperty_1=isNonExistentOwnProperty;function isNaN$1(l){return"number"==typeof l&&l!==l}var isNan=isNaN$1;function isNegZero(l){return 0===l&&1/l==-1/0}var isNegZero_1=isNegZero;function identical(l,n){return!!(l===n||isNan(l)&&isNan(n))&&(0!==l||isNegZero_1(l)===isNegZero_1(n))}var identical_1=identical,o=Object.prototype;function getClass(l){return o.toString.call(l).split(/[ \]]/)[1]}var getClass_1=getClass;function isArguments(l){if("Arguments"===getClass_1(l))return!0;if("object"!=typeof l||"number"!=typeof l.length||"Array"===getClass_1(l))return!1;if("function"==typeof l.callee)return!0;try{l[l.length]=6,delete l[l.length]}catch(l){return!0}return!1}var isArguments_1=isArguments,div="undefined"!=typeof document&&document.createElement("div");function isElement(l){if(!l||1!==l.nodeType||!div)return!1;try{l.appendChild(div),l.removeChild(div)}catch(l){return!1}return!0}var isElement_1=isElement;function isDate(l){return l instanceof Date}var isDate_1=isDate;function isObject(l){return!("object"!=typeof l||null===l||l instanceof Boolean||l instanceof Date||l instanceof Error||l instanceof Number||l instanceof RegExp||l instanceof String)}var isObject_1=isObject;function isSet(l){return"undefined"!=typeof Set&&l instanceof Set||!1}var isSet_1=isSet;function isSubset(l,n,e){var t=!0;return l.forEach(function(l){var u=!1;n.forEach(function(n){e(n,l)&&(u=!0)}),t=t&&u}),t}var isSubset_1=isSubset,re=/function (\w+)\s*\(/;function getClassName(l){if(l.constructor&&"name"in l.constructor)return l.constructor.name;if("function"==typeof l.constructor){var n=l.constructor.toString().match(re);if(n.length>1)return n[1]}return null}var getClassName_1=getClassName,every$2=Array.prototype.every,getTime=Date.prototype.getTime,hasOwnProperty$2=Object.prototype.hasOwnProperty,indexOf=Array.prototype.indexOf,keys=Object.keys;function deepEqualCyclic(l,n,e){var t=[],u=[],r=[],o=[],i={};return function l(n,a,s,c){if(e&&e.isMatcher(a))return e.isMatcher(n)?n===a:a.test(n);var f=typeof n,p=typeof a;if(n===a||isNan(n)||isNan(a)||null==n||null==a||"object"!==f||"object"!==p)return identical_1(n,a);if(isElement_1(n)||isElement_1(a))return!1;var h=isDate_1(n),d=isDate_1(a);if((h||d)&&(!h||!d||getTime.call(n)!==getTime.call(a)))return!1;if(n instanceof RegExp&&a instanceof RegExp&&n.toString()!==a.toString())return!1;if(n instanceof Error&&a instanceof Error)return n===a;var g=getClass_1(n),m=getClass_1(a),y=keys(n),b=keys(a),v=getClassName_1(n),w=getClassName_1(a);if(isArguments_1(n)||isArguments_1(a)){if(n.length!==a.length)return!1}else if(f!==p||g!==m||y.length!==b.length||v&&w&&v!==w)return!1;return isSet_1(n)||isSet_1(a)?!(!isSet_1(n)||!isSet_1(a)||n.size!==a.size)&&isSubset_1(n,a,l):every$2.call(y,function(e){if(!hasOwnProperty$2.call(a,e))return!1;var f=n[e],p=a[e],h=isObject_1(f),d=isObject_1(p),g=h?indexOf.call(t,f):-1,m=d?indexOf.call(u,p):-1,y=-1!==g?r[g]:s+"["+JSON.stringify(e)+"]",b=-1!==m?o[m]:c+"["+JSON.stringify(e)+"]",v=y+b;return!!i[v]||(-1===g&&h&&(t.push(f),r.push(y)),-1===m&&d&&(u.push(p),o.push(b)),h&&d&&(i[v]=!0),l(f,p,y,b))})}(l,n,"$1","$2")}deepEqualCyclic.use=function(l){return function(n,e){return deepEqualCyclic(n,e,l)}};var deepEqual=deepEqualCyclic,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")();function getValue(l,n){return null==l?void 0:l[n]}function isHostObject(l){var n=!1;if(null!=l&&"function"!=typeof l.toString)try{n=!!(l+"")}catch(l){}return n}var arrayProto$3=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root$1["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid,funcToString=funcProto.toString,hasOwnProperty$3=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$3).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol$1=root$1.Symbol,splice=arrayProto$3.splice,Map$1=getNative(root$1,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function Hash(l){var n=-1,e=l?l.length:0;for(this.clear();++n-1}function listCacheSet(l,n){var e=this.__data__,t=assocIndexOf(e,l);return t<0?e.push([l,n]):e[t][1]=n,this}function MapCache(l){var n=-1,e=l?l.length:0;for(this.clear();++n=u)return!1;if(!e(l[t+r],n[r]))return!1}return!0}return!1}function match$1(l,n){if(n&&"function"==typeof n.test)return n.test(l);if("function"==typeof n)return!0===n(l);if("string"==typeof n)return n=n.toLowerCase(),("string"==typeof l||!!l)&&String(l).toLowerCase().indexOf(n)>=0;if("number"==typeof n)return n===l;if("boolean"==typeof n)return n===l;if(void 0===n)return void 0===l;if(null===n)return null===l;if(null===l)return!1;if(isSet_1(l))return isSubset_1(n,l,match$1);if("Array"===getClass_1(l)&&"Array"===getClass_1(n))return arrayContains(l,n,match$1);if(isDate_1(n))return isDate_1(l)&&l.getTime()===n.getTime();if(n&&"object"==typeof n){if(n===l)return!0;if("object"!=typeof l)return!1;var e;for(e in n){var t=l[e];if(void 0===t&&"function"==typeof l.getAttribute&&(t=l.getAttribute(e)),null===n[e]||void 0===n[e]){if(t!==n[e])return!1}else if(void 0===t||!deepEqual$2(t,n[e]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")}Object.keys(matcher_1).forEach(function(l){match$1[l]=matcher_1[l]});var match_1=match$1,deepEqualCyclic$1=deepEqual.use(match_1),samsam={createMatcher:matcher_1,deepEqual:deepEqualCyclic$1,isArguments:isArguments_1,isElement:isElement_1,isNegZero:isNegZero_1,identical:identical_1,match:match_1},array$1=[null,"once","twice","thrice"],timesInWords=function(l){return array$1[l]||(l||0)+" times"},formatio={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},specialObjects=[];function functionName$3(l){if(!l)return"";if(l.displayName)return l.displayName;if(l.name)return l.name;var n=l.toString().match(/function\s+([^\(]+)/m);return n&&n[1]||""}function constructorName(l,n){var e,t,u=functionName$3(n&&n.constructor),r=l.excludeConstructors||formatio.excludeConstructors||[];for(e=0,t=r.length;e0?Math.min(this.limitChildrenCount,l.length):l.length,t=0;t0?Math.min(this.limitChildrenCount,c.length):c.length,o=0;o80?h+"{\n "+d+s.join(",\n "+d)+"\n"+d+"}":h+"{ "+s.join(", ")+" }"},ascii.element=function(l){var n,e,t,u,r,o=l.tagName.toLowerCase(),i=l.attributes,a=[];for(t=0,u=i.length;t0?" ":""),c=l.innerHTML||"";return c.length>20&&(c=c.substr(0,20)+"[...]"),(s+a.join(" ")+">"+c+"").replace(/ contentEditable="inherit"/,"")},Formatio.prototype={functionName:functionName$3,configure:function(l){return new Formatio(l)},constructorName:function(l){return constructorName(this,l)},ascii:function(l,n,e){return ascii(this,l,n,e)}};var formatio_1=Formatio.prototype,formatter=formatio_1.configure({quoteStrings:!1,limitChildrenCount:250}),customFormatter;function format(){return customFormatter?customFormatter.apply(null,arguments):formatter.ascii.apply(formatter,arguments)}format.setFormatter=function(l){if("function"!=typeof l)throw new Error("format.setFormatter must be called with a function");customFormatter=l};var format_1=format,arrayProto$5=lib.prototypes.array,calledInOrder$1=lib.calledInOrder,createMatcher=samsam.createMatcher,orderByFirstCall$1=lib.orderByFirstCall,stringSlice=lib.prototypes.string.slice,arraySlice=arrayProto$5.slice,concat$1=arrayProto$5.concat,forEach$1=arrayProto$5.forEach,join$3=arrayProto$5.join,splice$1=arrayProto$5.splice,assert;function verifyIsStub(){var l=arraySlice(arguments);forEach$1(l,function(l){l||assert.fail("fake is not a spy"),l.proxy&&l.proxy.isSinonProxy?verifyIsStub(l.proxy):("function"!=typeof l&&assert.fail(l+" is not a function"),"function"!=typeof l.getCall&&assert.fail(l+" is not stubbed"))})}function verifyIsValidAssertion(l,n){switch(l){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==n.length&&assert.fail(l+" takes 1 argument but was called with "+(n.length+1)+" arguments")}}function failAssertion(l,n){var e=l||commonjsGlobal;(e.fail||assert.fail).call(e,n)}function mirrorPropAsAssertion(l,n,e){var t=e,u=n;2===arguments.length&&(t=n,u=l),assert[l]=function(n){verifyIsStub(n);var e=arraySlice(arguments,1);verifyIsValidAssertion(l,e),("function"==typeof u?!u(n):"function"==typeof n[u]?!n[u].apply(n,e):!n[u])?failAssertion(this,(n.printf||n.proxy.printf).apply(n,concat$1([t],e))):assert.pass(l)}}function exposedName(l,n){return!l||/^fail/.test(n)?n:l+stringSlice(n,0,1).toUpperCase()+stringSlice(n,1)}assert={failException:"AssertError",fail:function(l){var n=new Error(l);throw n.name=this.failException||assert.failException,n},pass:function(){},callOrder:function(){verifyIsStub.apply(null,arguments);var l="",n="";if(calledInOrder$1(arguments))assert.pass("callOrder");else{try{l=join$3(arguments,", ");for(var e=arraySlice(arguments),t=e.length;t;)e[--t].called||splice$1(e,t,1);n=join$3(orderByFirstCall$1(e),", ")}catch(l){}failAssertion(this,"expected "+l+" to be called in order but were called as "+n)}},callCount:function(l,n){if(verifyIsStub(l),l.callCount!==n){var e="expected %n to be called "+timesInWords(n)+" but was called %c%C";failAssertion(this,l.printf(e))}else assert.pass("callCount")},expose:function(l,n){if(!l)throw new TypeError("target is null or undefined");var e=n||{},t=void 0===e.prefix?"assert":e.prefix,u=void 0===e.includeFail||Boolean(e.includeFail),r=this;return forEach$1(Object.keys(r),function(n){"expose"===n||!u&&/^(fail)/.test(n)||(l[exposedName(t,n)]=r[n])}),l},match:function(l,n){if(createMatcher(n).test(l))assert.pass("match");else{var e=["expected value to match"," expected = "+format_1(n)," actual = "+format_1(l)];failAssertion(this,join$3(e,"\n"))}}},mirrorPropAsAssertion("called","expected %n to have been called at least once but was never called"),mirrorPropAsAssertion("notCalled",function(l){return!l.called},"expected %n to not have been called but was called %c%C"),mirrorPropAsAssertion("calledOnce","expected %n to be called once but was called %c%C"),mirrorPropAsAssertion("calledTwice","expected %n to be called twice but was called %c%C"),mirrorPropAsAssertion("calledThrice","expected %n to be called thrice but was called %c%C"),mirrorPropAsAssertion("calledOn","expected %n to be called with %1 as this but was called with %t"),mirrorPropAsAssertion("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),mirrorPropAsAssertion("calledWithNew","expected %n to be called with new"),mirrorPropAsAssertion("alwaysCalledWithNew","expected %n to always be called with new"),mirrorPropAsAssertion("calledWith","expected %n to be called with arguments %D"),mirrorPropAsAssertion("calledWithMatch","expected %n to be called with match %D"),mirrorPropAsAssertion("alwaysCalledWith","expected %n to always be called with arguments %D"),mirrorPropAsAssertion("alwaysCalledWithMatch","expected %n to always be called with match %D"),mirrorPropAsAssertion("calledWithExactly","expected %n to be called with exact arguments %D"),mirrorPropAsAssertion("alwaysCalledWithExactly","expected %n to always be called with exact arguments %D"),mirrorPropAsAssertion("neverCalledWith","expected %n to never be called with arguments %*%C"),mirrorPropAsAssertion("neverCalledWithMatch","expected %n to never be called with match %*%C"),mirrorPropAsAssertion("threw","%n did not throw exception%C"),mirrorPropAsAssertion("alwaysThrew","%n did not always throw exception%C");var assert_1=assert,lolex=createCommonjsModule(function(module,exports){var f;f=function(){return function(){return function l(n,e,t){function u(o,i){if(!e[o]){if(!n[o]){var a="function"==typeof commonjsRequire&&commonjsRequire;if(!i&&a)return a(o,!0);if(r)return r(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[o]={exports:{}};n[o][0].call(c.exports,function(l){return u(n[o][1][l]||l)},c,c.exports,l,n,e,t)}return e[o].exports}for(var r="function"==typeof commonjsRequire&&commonjsRequire,o=0;o-1,maxTimeout=Math.pow(2,31)-1;isRunningInIE&&(_global.setTimeout=_global.setTimeout,_global.clearTimeout=_global.clearTimeout,_global.setInterval=_global.setInterval,_global.clearInterval=_global.clearInterval,_global.Date=_global.Date),void 0!==_global.setImmediate&&(_global.setImmediate=_global.setImmediate,_global.clearImmediate=_global.clearImmediate);var NOOP=function(){},timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=_global.process&&"function"==typeof _global.process.hrtime,nextTickPresent=_global.process&&"function"==typeof _global.process.nextTick,performancePresent=_global.performance&&"function"==typeof _global.performance.now,hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),requestAnimationFramePresent=_global.requestAnimationFrame&&"function"==typeof _global.requestAnimationFrame,cancelAnimationFramePresent=_global.cancelAnimationFrame&&"function"==typeof _global.cancelAnimationFrame;_global.clearTimeout(timeoutResult);var NativeDate=_global.Date,uniqueTimerId=1;function isNumberFinite(l){return Number.isFinite?Number.isFinite(l):"number"==typeof l&&isFinite(l)}function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,r=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);r+=n*Math.pow(60,t-u-1)}return 1e3*r}function nanoRemainder(l){var n=1e6*l%1e6,e=n<0?n+1e6:n;return Math.floor(e)}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties(function l(n,e,t,u,r,o,i){switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,r);case 6:return new NativeDate(n,e,t,u,r,o);default:return new NativeDate(n,e,t,u,r,o,i)}},NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nl.loopLimit)throw new Error("Aborting after running "+l.loopLimit+" timers, assuming an infinite loop!")}l.jobs=[]}}function addTimer(l,n){if(void 0===n.func)throw new Error("Callback must be provided to timer calls");if(n.type=n.immediate?"Immediate":"Timeout",n.hasOwnProperty("delay")&&(isNumberFinite(n.delay)||(n.delay=0),n.delay=n.delay>maxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject){var e={id:n.id,ref:function(){return e},unref:function(){return e},refresh:function(){return e}};return e}return n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,r=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||r&&1!==compareTimers(r,u[t])||(r=u[t]));return r}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n&&(l.timers||(l.timers={}),"object"==typeof n&&(n=n.id),l.timers.hasOwnProperty(n))){var t=l.timers[n];if(t.type!==e){var u="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===t.type?"requestAnimationFrame":"set"+t.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+u+"()")}delete l.timers[n]}}function uninstall(l,n,e){var t,u,r;for(u=0,r=l.methods.length;u1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");var a=n[0],s=i-n[1],c=o-a;return s<0&&(s+=1e9,c-=1),[c,s]}return[o,i]}if(u.Date.clock=u,u.setTimeout=function(l,n){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n})},u.clearTimeout=function(l){return clearTimer(u,l,"Timeout")},u.nextTick=function(l){return enqueueJob(u,{func:l,args:Array.prototype.slice.call(arguments,1)})},u.setInterval=function(l,n){return n=parseInt(n,10),addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n,interval:n})},u.clearInterval=function(l){return clearTimer(u,l,"Interval")},u.setImmediate=function(l){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,1),immediate:!0})},u.clearImmediate=function(l){return clearTimer(u,l,"Immediate")},u.countTimers=function(){return Object.keys(u.timers||{}).length},u.requestAnimationFrame=function(l){var n=addTimer(u,{func:l,delay:r(),args:[u.now+r()],animation:!0});return n.id||n},u.cancelAnimationFrame=function(l){return clearTimer(u,l,"AnimationFrame")},u.runMicrotasks=function(){runJobs(u)},u.tick=function(l){var n="number"==typeof l?l:parseTime(l),t=Math.floor(n),r=nanoRemainder(n),o=e+r,i=u.now+t;if(n<0)throw new TypeError("Negative ticks are not supported");o>=1e6&&(i+=1,o-=1e6),e=o;var a,s,c,f=u.now,p=u.now;for(u.duringTick=!0,c=u.now,runJobs(u),c!==u.now&&(f+=u.now-c,i+=u.now-c),a=firstTimerInRange(u,f,i);a&&f<=i;){if(u.timers[a.id]){f=a.callAt,u.now=a.callAt,c=u.now;try{runJobs(u),callTimer(u,a)}catch(l){s=s||l}c!==u.now&&(f+=u.now-c,i+=u.now-c,p+=u.now-c)}a=firstTimerInRange(u,p,i),p=f}if(c=u.now,runJobs(u),c!==u.now&&(f+=u.now-c,i+=u.now-c),u.duringTick=!1,a=firstTimerInRange(u,f,i))try{u.tick(i-u.now)}catch(l){s=s||l}else u.now=i,e=o;if(s)throw s;return u.now},u.next=function(){runJobs(u);var l=firstTimer(u);if(!l)return u.now;u.duringTick=!0;try{return u.now=l.callAt,callTimer(u,l),runJobs(u),u.now}finally{u.duringTick=!1}},u.runAll=function(){var l;for(runJobs(u),l=0;l1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("lolex.install called with "+String(l)+" lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||_global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter(function(l){return"nextTick"!==l})),n=0,e=u.methods.length;nl.args.length)&&reduce$1(n,function(n,e,t){return n&&deepEqual$3(l.args[t],e)},!0)},calledWithMatch:function(){var l=this,n=slice$4(arguments);return!(n.length>l.args.length)&&reduce$1(n,function(n,e,t){var u=l.args[t];return n&&match$2(e).test(u)},!0)},calledWithExactly:function(){return arguments.length===this.args.length&&this.calledWith.apply(this,arguments)},notCalledWith:function(){return!this.calledWith.apply(this,arguments)},notCalledWithMatch:function(){return!this.calledWithMatch.apply(this,arguments)},returned:function(l){return deepEqual$3(this.returnValue,l)},threw:function(l){return void 0!==l&&this.exception?this.exception===l||this.exception.name===l:Boolean(this.exception)},calledWithNew:function(){return this.proxy.prototype&&this.thisValue instanceof this.proxy},calledBefore:function(l){return this.callIdl.callId},calledImmediatelyBefore:function(l){return this.callId===l.callId-1},calledImmediatelyAfter:function(l){return this.callId===l.callId+1},callArg:function(l){return this.ensureArgIsAFunction(l),this.args[l]()},callArgOn:function(l,n){return this.ensureArgIsAFunction(l),this.args[l].apply(n)},callArgWith:function(l){return this.callArgOnWith.apply(this,concat$2([l,null],slice$4(arguments,1)))},callArgOnWith:function(l,n){this.ensureArgIsAFunction(l);var e=slice$4(arguments,2);return this.args[l].apply(n,e)},throwArg:function(l){if(l>this.args.length)throw new TypeError("Not enough arguments: "+l+" required but only "+this.args.length+" present");throw this.args[l]},yield:function(){return this.yieldOn.apply(this,concat$2([null],slice$4(arguments,0)))},yieldOn:function(l){var n=slice$4(this.args),e=filter(n,function(l){return"function"==typeof l})[0];return e||throwYieldError(this.proxy," cannot yield since no callback was passed.",n),e.apply(l,slice$4(arguments,1))},yieldTo:function(l){return this.yieldToOn.apply(this,concat$2([l,null],slice$4(arguments,1)))},yieldToOn:function(l,n){var e=slice$4(this.args),t=filter(e,function(n){return n&&"function"==typeof n[l]})[0],u=t&&t[l];return u||throwYieldError(this.proxy," cannot yield to '"+valueToString$3(l)+"' since no callback was passed.",e),u.apply(n,slice$4(arguments,2))},toString:function(){var l,n=this.proxy?String(this.proxy)+"(":"";return this.args?(l=map$1(this.args,function(l){return format_1(l)}),n=n+join$4(l,", ")+")",void 0!==this.returnValue&&(n+=" => "+format_1(this.returnValue)),this.exception&&(n+=" !"+this.exception.name,this.exception.message&&(n+="("+this.exception.message+")")),this.stack&&(n+=(this.stack.split("\n")[3]||"unknown").replace(/^\s*(?:at\s+|@)?/," at ")),n):":("},ensureArgIsAFunction:function(l){if("function"!=typeof this.args[l])throw new TypeError("Expected argument at position "+l+" to be a Function, but was "+typeof this.args[l])}};function createSpyCall(l,n,e,t,u,r,o){if("number"!=typeof r)throw new TypeError("Call id is not a number");var i=Object.create(callProto),a=e.length>0&&e[e.length-1]||void 0,s=a&&"function"==typeof a?a:void 0;return i.proxy=l,i.thisValue=n,i.args=e,i.lastArg=a,i.callback=s,i.returnValue=t,i.exception=u,i.callId=r,i.errorWithCallStack=o,i}Object.defineProperty(callProto,"stack",{enumerable:!0,configurable:!0,get:function(){return this.errorWithCallStack&&this.errorWithCallStack.stack||""}}),callProto.invokeCallback=callProto.yield,createSpyCall.toString=callProto.toString;var call$1=createSpyCall,hasOwnProperty$5=lib.prototypes.object.hasOwnProperty,valueToString$4=lib.valueToString;function isFunction$1(l){return"function"==typeof l||Boolean(l&&l.constructor&&l.call&&l.apply)}function mirrorProperties(l,n){for(var e in n)hasOwnProperty$5(l,e)||(l[e]=n[e])}var hasES5Support="keys"in Object,wrapMethod=function(l,n,e){if(!l)throw new TypeError("Should wrap property of object");if("function"!=typeof e&&"object"!=typeof e)throw new TypeError("Method wrapper should be a function or a property descriptor");function t(l){var e;if(isFunction$1(l)){if(l.restore&&l.restore.sinon)e=new TypeError("Attempted to wrap "+valueToString$4(n)+" which is already wrapped");else if(l.calledBefore){var t=l.returns?"stubbed":"spied on";e=new TypeError("Attempted to wrap "+valueToString$4(n)+" which is already "+t)}}else e=new TypeError("Attempted to wrap "+typeof l+" property "+valueToString$4(n)+" as function");if(e)throw l&&l.stackTraceError&&(e.stack+="\n--------------\n"+l.stackTraceError.stack),e}var u,r,o,i;function a(){t(r=l[n]),l[n]=e,e.displayName=n}var s=l.hasOwnProperty?l.hasOwnProperty(n):hasOwnProperty$5(l,n);if(hasES5Support){var c="function"==typeof e?{value:e}:e;if((i=getPropertyDescriptor(l,n))?i.restore&&i.restore.sinon&&(u=new TypeError("Attempted to wrap "+n+" which is already wrapped")):u=new TypeError("Attempted to wrap "+typeof r+" property "+n+" as function"),u)throw i&&i.stackTraceError&&(u.stack+="\n--------------\n"+i.stackTraceError.stack),u;var f=Object.keys(c);for(o=0;o1)for(var e=1;e{n=n||process.argv;const e=l.startsWith("-")?"":1===l.length?"-":"--",t=n.indexOf(e+l),u=n.indexOf("--");return-1!==t&&(-1===u||t=2,has16m:l>=3}}function supportsColor(l){if(!1===forceColor)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(l&&!l.isTTY&&!0!==forceColor)return 0;const n=forceColor?1:0;if("CI"in env$1)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(l=>l in env$1)||"codeship"===env$1.CI_NAME?1:n;if("TEAMCITY_VERSION"in env$1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION)?1:0;if("truecolor"===env$1.COLORTERM)return 3;if("TERM_PROGRAM"in env$1){const l=parseInt((env$1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env$1.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env$1.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)?1:"COLORTERM"in env$1?1:(env$1.TERM,n)}function getSupportLevel(l){return translateLevel(supportsColor(l))}hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")?forceColor=!1:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=!0),"FORCE_COLOR"in env$1&&(forceColor=0===env$1.FORCE_COLOR.length||0!==parseInt(env$1.FORCE_COLOR,10));var supportsColor_1={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)};function colorize(l,n){return!1===supportsColor_1.stdout?l:"["+n+"m"+l+""}var red=function(l){return colorize(l,31)},green=function(l){return colorize(l,32)},cyan=function(l){return colorize(l,96)},white=function(l){return colorize(l,39)},bold=function(l){return colorize(l,1)},color={red:red,green:green,cyan:cyan,white:white,bold:bold},base=createCommonjsModule(function(l,n){function e(){}function t(l,n,e,t,u){for(var r=0,o=n.length,i=0,a=0;rl.length?e:l}),s.value=l.join(f)}else s.value=l.join(e.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var p=n[o-1];return o>1&&"string"==typeof p.value&&(p.added||p.removed)&&l.equals("",p.value)&&(n[o-2].value+=p.value,n.pop()),n}n.__esModule=!0,n.default=e,e.prototype={diff:function(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=e.callback;"function"==typeof e&&(u=e,e={}),this.options=e;var r=this;function o(l){return u?(setTimeout(function(){u(void 0,l)},0),!0):l}l=this.castInput(l),n=this.castInput(n),l=this.removeEmpty(this.tokenize(l));var i=(n=this.removeEmpty(this.tokenize(n))).length,a=l.length,s=1,c=i+a,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],n,l,0);if(f[0].newPos+1>=i&&p+1>=a)return o([{value:this.join(n),count:n.length}]);function h(){for(var e=-1*s;e<=s;e+=2){var u=void 0,c=f[e-1],p=f[e+1],h=(p?p.newPos:0)-e;c&&(f[e-1]=void 0);var d=c&&c.newPos+1=i&&h+1>=a)return o(t(r,u.components,n,l,r.useLongestToken));f[e]=u}else f[e]=void 0}var m;s++}if(u)!function l(){setTimeout(function(){if(s>c)return u();h()||l()},0)}();else for(;s<=c;){var d=h();if(d)return d}},pushComponent:function(l,n,e){var t=l[l.length-1];t&&t.added===n&&t.removed===e?l[l.length-1]={count:t.count+1,added:n,removed:e}:l.push({count:1,added:n,removed:e})},extractCommon:function(l,n,e,t){for(var u=n.length,r=e.length,o=l.newPos,i=o-t,a=0;o+11&&void 0!==arguments[1]?arguments[1]:{},e=l.split(/\r\n|[\n\v\f\r\x85]/),t=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=[],r=0;function o(){var l={};for(u.push(l);r2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=(0,parse.parsePatch)(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var u=l.split(/\r\n|[\n\v\f\r\x85]/),r=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=n.hunks,i=e.compareLine||function(l,n,e,t){return n===t},a=0,s=e.fuzzFactor||0,c=0,f=0,p=void 0,h=void 0;function d(l,n){for(var e=0;e0?t[0]:" ",o=t.length>0?t.substr(1):t;if(" "===r||"-"===r){if(!i(n+1,u[n],r,o)&&++a>s)return!1;n++}}return!0}for(var g=0;g0?T[0]:" ",k=T.length>0?T.substr(1):T,F=x.linedelimiters[_];if(" "===S)C++;else if("-"===S)u.splice(C,1),r.splice(C,1);else if("+"===S)u.splice(C,0,k),r.splice(C,0,F),C++;else if("\\"===S){var D=x.lines[_-1]?x.lines[_-1][0]:null;"+"===D?p=!0:"-"===D&&(h=!0)}}}if(p)for(;!u[u.length-1];)u.pop(),r.pop();else h&&(u.push(""),r.push("\n"));for(var P=0;P0?s(m.lines.slice(-i.context)):[],f-=h.length,p-=h.length)}(o=h).push.apply(o,e(r.map(function(l){return(n.added?"+":"-")+l}))),n.added?g+=r.length:d+=r.length}else{if(f)if(r.length<=2*i.context&&l=a.length-2&&r.length<=i.context){var A=/\n$/.test(t),E=/\n$/.test(u);0!=r.length||A?A&&E||h.push("\\ No newline at end of file"):h.splice(w.oldLines,0,"\\ No newline at end of file")}c.push(w),f=0,p=0,h=[]}d+=r.length,g+=r.length}},y=0;yl.length)return!1;for(var e=0;e/g,">")).replace(/"/g,""")}n.__esModule=!0,n.convertChangesToXML=function(l){for(var n=[],t=0;t"):u.removed&&n.push(""),n.push(e(u.value)),u.added?n.push(""):u.removed&&n.push("")}return n.join("")}});unwrapExports(xml);var xml_1=xml.convertChangesToXML,lib$1=createCommonjsModule(function(l,n){n.__esModule=!0,n.canonicalize=n.convertChangesToXML=n.convertChangesToDMP=n.merge=n.parsePatch=n.applyPatches=n.applyPatch=n.createPatch=n.createTwoFilesPatch=n.structuredPatch=n.diffArrays=n.diffJson=n.diffCss=n.diffSentences=n.diffTrimmedLines=n.diffLines=n.diffWordsWithSpace=n.diffWords=n.diffChars=n.Diff=void 0;var e,t=(e=base)&&e.__esModule?e:{default:e};n.Diff=t.default,n.diffChars=character.diffChars,n.diffWords=word.diffWords,n.diffWordsWithSpace=word.diffWordsWithSpace,n.diffLines=line.diffLines,n.diffTrimmedLines=line.diffTrimmedLines,n.diffSentences=sentence.diffSentences,n.diffCss=css.diffCss,n.diffJson=json.diffJson,n.diffArrays=array$2.diffArrays,n.structuredPatch=create.structuredPatch,n.createTwoFilesPatch=create.createTwoFilesPatch,n.createPatch=create.createPatch,n.applyPatch=apply.applyPatch,n.applyPatches=apply.applyPatches,n.parsePatch=parse.parsePatch,n.merge=merge_1.merge,n.convertChangesToDMP=dmp.convertChangesToDMP,n.convertChangesToXML=xml.convertChangesToXML,n.canonicalize=json.canonicalize});unwrapExports(lib$1);var lib_1$1=lib$1.canonicalize,lib_2$1=lib$1.convertChangesToXML,lib_3$1=lib$1.convertChangesToDMP,lib_4$1=lib$1.merge,lib_5$1=lib$1.parsePatch,lib_6$1=lib$1.applyPatches,lib_7$1=lib$1.applyPatch,lib_8$1=lib$1.createPatch,lib_9=lib$1.createTwoFilesPatch,lib_10=lib$1.structuredPatch,lib_11=lib$1.diffArrays,lib_12=lib$1.diffJson,lib_13=lib$1.diffCss,lib_14=lib$1.diffSentences,lib_15=lib$1.diffTrimmedLines,lib_16=lib$1.diffLines,lib_17=lib$1.diffWordsWithSpace,lib_18=lib$1.diffWords,lib_19=lib$1.diffChars,lib_20=lib$1.Diff,arrayProto$7=lib.prototypes.array,match$3=samsam.createMatcher,join$5=arrayProto$7.join,map$2=arrayProto$7.map,push$2=arrayProto$7.push;function colorSinonMatchText(l,n,e){var t=e;return l.test(n)||(l.message=color.red(l.message),t&&(t=color.green(t))),t+" "+l.message}function colorDiffText(l){var n=map$2(l,function(n){var e=n.value;return n.added?e=color.green(e):n.removed&&(e=color.red(e)),2===l.length&&(e+=" "),e});return join$5(n,"")}var spyFormatters={c:function(l){return timesInWords(l.callCount)},n:function(l){return l.toString()},D:function(l,n){for(var e="",t=0,u=l.callCount;t1&&(e+="\nCall "+(t+1)+":");for(var r=l.getCall(t).args,o=0;o0?"\n"+join$5(n,"\n"):""},t:function(l){for(var n=[],e=0,t=l.callCount;e=this.callCount?null:call$1(this,this.thisValues[l],this.args[l],this.returnValues[l],this.exceptions[l],this.callIds[l],this.errorsWithCallStack[l])},getCalls:function(){var l,n=[];for(l=0;ll.callIds[0]},calledImmediatelyBefore:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]-1},calledImmediatelyAfter:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]+1},withArgs:function(){var l=slice$5(arguments);if(this.fakes){var n=pop(this.matchingFakes(l,!0));if(n)return n}else this.fakes=[];var e=this,t=this.instantiateFake();return t.matchingArguments=l,t.parent=this,push$3(this.fakes,t),e.defaultBehavior&&e.defaultBehavior.promiseLibrary&&(t.defaultBehavior=t.defaultBehavior||createBehavior$1(t),t.defaultBehavior.promiseLibrary=e.defaultBehavior.promiseLibrary),t.withArgs=function(){return e.withArgs.apply(e,arguments)},forEach$2(e.args,function(l,n){t.matches(l)&&(incrementCallCount.call(t),push$3(t.thisValues,e.thisValues[n]),push$3(t.args,l),push$3(t.returnValues,e.returnValues[n]),push$3(t.exceptions,e.exceptions[n]),push$3(t.callIds,e.callIds[n]))}),createCallProperties.call(t),t},matchingFakes:function(l,n){return filter$1.call(this.fakes||[],function(e){return e.matches(l,n)})},matches:function(l,n){var e=this.matchingArguments;if(e.length<=l.length&&deepEqual$4(slice$5(l,0,e.length),e))return!n||e.length===l.length},printf:function(l){var n,e=this,t=slice$5(arguments,1);return(l||"").replace(/%(.)/g,function(l,u){return"function"==typeof(n=spyApi.formatters[u])?String(n(e,t)):isNaN(parseInt(u,10))?"%"+u:format_1(t[u-1])})}};function delegateToCalls(l,n,e,t,u,r){spyApi[l]=function(){if(!this.called)return!!u&&u.apply(this,arguments);if(void 0!==r&&this.callCount!==r)return!1;for(var o,i=0,a=[],s=0,c=this.callCount;s2)throw new TypeError("stub(obj, 'meth', fn) has been removed, see documentation");if(isEsModule(l))throw new TypeError("ES Modules cannot be stubbed");if(throwOnFalsyObject_1.apply(null,arguments),isNonExistentOwnProperty_1(l,n))throw new TypeError("Cannot stub non-existent own property "+valueToString$7(n));var e=getPropertyDescriptor(l,n),t="object"==typeof l||"function"==typeof l,u=void 0===n&&t,r=!l&&void 0===n,o=t&&void 0!==n&&(void 0===e||"function"!=typeof e.value)&&"undefined"==typeof descriptor,i="object"==typeof l&&void 0!==e&&"function"==typeof e.value?l[n].length:0;if(u)return stubEntireObject_1(stub,l);if(r)return stub.create();var a=stub.create(i);return a.rootObj=l,a.propName=n,a.restore=function(){void 0===e?delete l[n]:Object.defineProperty(l,n,e)},o?a:wrapMethod(l,n,a)}function getParentBehaviour(l){return l.parent&&getCurrentBehavior(l.parent)}function getDefaultBehavior(l){return l.defaultBehavior||getParentBehaviour(l)||behavior.create(l)}function getCurrentBehavior(l){var n=l.behaviors[l.callCount-1];return n&&n.isPresent()?n:getDefaultBehavior(l)}stub.createStubInstance=function(l,n){if("function"!=typeof l)throw new TypeError("The constructor should be a function.");var e=stub(Object.create(l.prototype));return forEach$3(Object.keys(n||{}),function(l){if(!(l in e))throw new Error("Cannot stub "+l+". Property does not exist!");var t=n[l];t&&t.createStubInstance?e[l]=t:e[l].returns(t)}),e};var uuid$1=0,proto$1={create:function(l){var n=function(){var l=slice$7(arguments),e=n.matchingFakes(l);return getCurrentBehavior(pop$1(sort$1(e,function(l,n){return l.matchingArguments.length-n.matchingArguments.length}))||n).invoke(this,arguments)},e=n;return(n=spy_1.create(n,l)).id="stub#"+uuid$1++,n.func=e,extend(n,stub),n.instantiateFake=stub.create,n.displayName="stub",n.toString=functionToString,n.defaultBehavior=null,n.behaviors=[],n},resetBehavior:function(){var l=this.fakes||[];this.defaultBehavior=null,this.behaviors=[],delete this.returnValue,delete this.returnArgAt,delete this.throwArgAt,delete this.resolveArgAt,delete this.fakeFn,this.returnThis=!1,this.resolveThis=!1,forEach$3(l,function(l){l.resetBehavior()})},resetHistory:spy_1.resetHistory,reset:function(){this.resetHistory(),this.resetBehavior()},onCall:function(l){return this.behaviors[l]||(this.behaviors[l]=behavior.create(this)),this.behaviors[l]},onFirstCall:function(){return this.onCall(0)},onSecondCall:function(){return this.onCall(1)},onThirdCall:function(){return this.onCall(2)}};forEach$3(Object.keys(behavior),function(l){hasOwnProperty$6(behavior,l)&&!hasOwnProperty$6(proto$1,l)&&"create"!==l&&"withArgs"!==l&&"invoke"!==l&&(proto$1[l]=behavior.createBehavior(l))}),forEach$3(Object.keys(defaultBehaviors_1),function(l){hasOwnProperty$6(defaultBehaviors_1,l)&&!hasOwnProperty$6(proto$1,l)&&behavior.addBehavior(stub,l,defaultBehaviors_1[l])}),extend(stub,proto$1);var stub_1=stub,arrayProto$b=lib.prototypes.array,spyInvoke=spy_1.invoke,spyCallToString=call$1.toString,match$4=samsam.createMatcher,deepEqual$5=samsam.deepEqual,valueToString$8=lib.valueToString,every$4=arrayProto$b.every,forEach$4=arrayProto$b.forEach,push$4=arrayProto$b.push,slice$8=arrayProto$b.slice;function callCountInWords(l){return 0===l?"never called":"called "+timesInWords(l)}function expectedCallCountInWords(l){var n=l.minCalls,e=l.maxCalls;if("number"==typeof n&&"number"==typeof e){var t=timesInWords(n);return n!==e&&(t="at least "+t+" and at most "+timesInWords(e)),t}return"number"==typeof n?"at least "+timesInWords(n):"at most "+timesInWords(e)}function receivedMinCalls(l){return!("number"==typeof l.minCalls)||l.callCount>=l.minCalls}function receivedMaxCalls(l){return"number"==typeof l.maxCalls&&l.callCount===l.maxCalls}function verifyMatcher(l,n){return match$4.isMatcher(l)&&l.test(n)||!0}var mockExpectation={minCalls:1,maxCalls:1,create:function(l){var n=extend(stub_1.create(),mockExpectation);return delete n.create,n.method=l,n},invoke:function(l,n,e){return this.verifyCallAllowed(n,e),spyInvoke.apply(this,arguments)},atLeast:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not number");return this.limitsSet||(this.maxCalls=null,this.limitsSet=!0),this.minCalls=l,this},atMost:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not number");return this.limitsSet||(this.minCalls=null,this.limitsSet=!0),this.maxCalls=l,this},never:function(){return this.exactly(0)},once:function(){return this.exactly(1)},twice:function(){return this.exactly(2)},thrice:function(){return this.exactly(3)},exactly:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not a number");return this.atLeast(l),this.atMost(l)},met:function(){return!this.failed&&receivedMinCalls(this)},verifyCallAllowed:function(l,n){var e=this.expectedArguments;receivedMaxCalls(this)&&(this.failed=!0,mockExpectation.fail(this.method+" already called "+timesInWords(this.maxCalls))),"expectedThis"in this&&this.expectedThis!==l&&mockExpectation.fail(this.method+" called with "+valueToString$8(l)+" as thisValue, expected "+valueToString$8(this.expectedThis)),"expectedArguments"in this&&(n||mockExpectation.fail(this.method+" received no arguments, expected "+format_1(e)),n.length0?mockExpectation_1.fail(join$6(concat$4(n,e),"\n")):e.length>0&&mockExpectation_1.pass(join$6(concat$4(n,e),"\n")),!0},usingPromise:function(l){return this.promiseLibrary=l,this},invokeMethod:function(l,n,e){var t,u=this.expectations&&this.expectations[l]?this.expectations[l]:[],r=e||[],o=filter$2(u,function(l){return arrayEquals(l.expectedArguments||[],r,l.expectsExactArgCount)}),i=filter$2(o,function(l){return!l.met()&&l.allowsCall(n,e)});if(i.length>0)return i[0].apply(n,e);var a=[],s=0;if(forEach$6(o,function(l){l.allowsCall(n,e)?t=t||l:s+=1}),t&&0===s)return t.apply(n,e);forEach$6(u,function(l){push$5(a," "+String(l))}),unshift(a,"Unexpected call: "+spyCallToString$1.call({proxy:l,args:e}));var c=new Error;if(!c.stack)try{throw c}catch(l){}push$5(this.failures,"Unexpected call: "+spyCallToString$1.call({proxy:l,args:e,stack:c.stack})),mockExpectation_1.fail(join$6(a,"\n"))}});var mock_1=mock,arrayProto$d=lib.prototypes.array,forEach$7=arrayProto$d.forEach,slice$a=arrayProto$d.slice;function getError(l){return l instanceof Error?l:new Error(l)}function cleanProxy(l){return forEach$7(["instantiateFake","callArg","callArgOn","callArgOnWith","callArgWith","invokeCallback","throwArg","withArgs","yield","yieldOn","yieldTo","yieldToOn"],function(n){delete l[n]}),l}var uuid$2=0;function wrapFunc(l){var n=cleanProxy(spy_1(function(){var e=arguments.length>0&&arguments[arguments.length-1]||void 0,t=e&&"function"==typeof e?e:void 0;return n.lastArg=e,n.callback=t,l&&l.apply(this,arguments)}));return n.displayName="fake",n.id="fake#"+uuid$2++,n}function fake(l){if(arguments.length>0&&"function"!=typeof l)throw new TypeError("Expected f argument to be a Function");return wrapFunc(l)}function yieldInternal(l,n){return wrapFunc(function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw new TypeError("Expected last argument to be a function");l?nextTick$1(function(){e.apply(null,n)}):e.apply(null,n)})}fake.returns=function(l){return wrapFunc(function(){return l})},fake.throws=function(l){return wrapFunc(function(){throw getError(l)})},fake.resolves=function(l){return wrapFunc(function(){return Promise.resolve(l)})},fake.rejects=function(l){return wrapFunc(function(){return Promise.reject(getError(l))})},fake.yields=function(){return yieldInternal(!1,slice$a(arguments))},fake.yieldsAsync=function(){return yieldInternal(!0,slice$a(arguments))};var fake_1=fake,nise=createCommonjsModule(function(module,exports){var f;f=function(){var define;return function(){return function l(n,e,t){function u(o,i){if(!e[o]){if(!n[o]){var a="function"==typeof commonjsRequire&&commonjsRequire;if(!i&&a)return a(o,!0);if(r)return r(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[o]={exports:{}};n[o][0].call(c.exports,function(l){var e=n[o][1][l];return u(e||l)},c,c.exports,l,n,e,t)}return e[o].exports}for(var r="function"==typeof commonjsRequire&&commonjsRequire,o=0;o0&&this.respondWith.apply(this,arguments);var l=this.queue||[],n=l.splice(0,l.length),e=this;n.forEach(function(l){e.processRequest(l)})},processRequest:function(l){try{if(l.aborted)return;var n=this.response||[404,{},""];if(this.responses)for(var e=this.responses.length-1;e>=0;e--)if(c.call(this,this.responses[e],l)){n=this.responses[e].response;break}4!==l.readyState&&(this.log(n,l),l.respond(n[0],n[1],n[2]))}catch(l){this.logError("Fake server request processing",l)}},restore:function(){return this.xhr.restore&&this.xhr.restore.apply(this.xhr,arguments)},getRequest:function(l){return this.requests[l]||null},reset:function(){this.resetBehavior(),this.resetHistory()},resetBehavior:function(){this.responses.length=this.queue.length=0},resetHistory:function(){this.requests.length=this.requestCount=0,this.requestedOnce=this.requestedTwice=this.requestedThrice=this.requested=!1,this.firstRequest=this.secondRequest=this.thirdRequest=this.lastRequest=null}};n.exports=f},{"../configure-logger":1,"../fake-xhr":11,"./format":8,"path-to-regexp":45}],10:[function(l,n,e){e.isSupported=function(){try{return!!new Blob}catch(l){return!1}}()},{}],11:[function(l,n,e){(function(e){var t=l("text-encoding").TextEncoder,u=l("../configure-logger"),r=l("../event"),o=l("just-extend");var i,a="undefined"!=typeof ProgressEvent,s="undefined"!=typeof CustomEvent,c="undefined"!=typeof FormData,f="undefined"!=typeof ArrayBuffer,p=l("./blob").isSupported,h=e.navigator&&"ReactNative"===e.navigator.product,d={XMLHttpRequest:e.XMLHttpRequest};d.GlobalXMLHttpRequest=e.XMLHttpRequest,d.GlobalActiveXObject=e.ActiveXObject,d.supportsActiveX=void 0!==d.GlobalActiveXObject,d.supportsXHR=void 0!==d.GlobalXMLHttpRequest,d.workingXHR=void 0!==(i=e).XMLHttpRequest?i.XMLHttpRequest:!(void 0===i.ActiveXObject)&&function(){return new i.ActiveXObject("MSXML2.XMLHTTP.3.0")},d.supportsTimeout=d.supportsXHR&&"timeout"in new d.GlobalXMLHttpRequest,d.supportsCORS=h||d.supportsXHR&&"withCredentials"in new d.GlobalXMLHttpRequest;var g={"Accept-Charset":!0,"Access-Control-Request-Headers":!0,"Access-Control-Request-Method":!0,"Accept-Encoding":!0,Connection:!0,"Content-Length":!0,Cookie:!0,Cookie2:!0,"Content-Transfer-Encoding":!0,Date:!0,DNT:!0,Expect:!0,Host:!0,"Keep-Alive":!0,Origin:!0,Referer:!0,TE:!0,Trailer:!0,"Transfer-Encoding":!0,Upgrade:!0,"User-Agent":!0,Via:!0};function m(){var l=this;["loadstart","progress","abort","error","load","timeout","loadend"].forEach(function(n){l.addEventListener(n,function(e){var t=l["on"+n];t&&"function"==typeof t&&t.call(this,e)})})}function y(l){m.call(this),this.readyState=y.UNSENT,this.requestHeaders={},this.requestBody=null,this.status=0,this.statusText="",this.upload=new m,this.responseType="",this.response="",this.logError=u(l),d.supportsTimeout&&(this.timeout=0),d.supportsCORS&&(this.withCredentials=!1),"function"==typeof y.onCreate&&y.onCreate(this)}function b(l){if(l.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR");if(l.sendFlag)throw new Error("INVALID_STATE_ERR")}function v(l,n){return Object.keys(l).filter(function(l){return l.toLowerCase()===n.toLowerCase()})[0]||null}function w(l){return!/^Set-Cookie2?$/i.test(l)}m.prototype=r.EventTarget;var A=function(l,n,e){switch(e.length){case 0:return l[n]();case 1:return l[n](e[0]);case 2:return l[n](e[0],e[1]);case 3:return l[n](e[0],e[1],e[2]);case 4:return l[n](e[0],e[1],e[2],e[3]);case 5:return l[n](e[0],e[1],e[2],e[3],e[4]);default:throw new Error("Unhandled case")}};function E(l){if(l.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR - "+l.readyState)}function x(l,n){return l instanceof ArrayBuffer?l:new t(n||"utf-8").encode(l).buffer}function C(l){return!l||/(text\/xml)|(application\/xml)|(\+xml)/.test(l)}function _(l){""===l.responseType||"text"===l.responseType?l.response=l.responseText="":l.response=l.responseText=null,l.responseXML=null}function T(l){_(l),l.errorFlag=!0,l.requestHeaders={},l.responseHeaders={},l.readyState!==y.UNSENT&&l.sendFlag&&l.readyState!==y.DONE&&(l.readyStateChange(y.DONE),l.sendFlag=!1)}y.filters=[],y.addFilter=function(l){this.filters.push(l)},y.defake=function(l,n){var e=new d.workingXHR;["open","setRequestHeader","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"].forEach(function(n){l[n]=function(){return A(e,n,arguments)}}),l.send=function(){return e.responseType!==l.responseType&&(e.responseType=l.responseType),A(e,"send",arguments)};var t=function(n){n.forEach(function(n){l[n]=e[n]})},u=function(){l.readyState=e.readyState,e.readyState>=y.HEADERS_RECEIVED&&t(["status","statusText"]),e.readyState>=y.LOADING&&(t(["response"]),""!==e.responseType&&"text"!==e.responseType||t(["responseText"])),e.readyState!==y.DONE||""!==e.responseType&&"document"!==e.responseType||t(["responseXML"])},r=function(){l.onreadystatechange&&l.onreadystatechange.call(l,{target:l,currentTarget:l})};e.addEventListener?(e.addEventListener("readystatechange",u),Object.keys(l.eventListeners).forEach(function(n){l.eventListeners[n].forEach(function(l){e.addEventListener(n,l.listener,{capture:l.capture,once:l.once})})}),e.addEventListener("readystatechange",r)):e.onreadystatechange=function(){u(),r()},A(e,"open",n)},y.useFilters=!1,y.parseXML=function(l){if(""!==l)try{if("undefined"!=typeof DOMParser){var n,e=new DOMParser,t="";try{var u=e.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror");u.length&&(t=u[0].namespaceURI)}catch(l){}try{n=e.parseFromString(l,"text/xml")}catch(l){return null}return n.getElementsByTagNameNS(t,"parsererror").length?null:n}var r=new window.ActiveXObject("Microsoft.XMLDOM");return r.async="false",r.loadXML(l),0!==r.parseError.errorCode?null:r}catch(l){}return null},y.statusCodes={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},o(y.prototype,r.EventTarget,{async:!0,open:function(l,n,e,t,u){if(this.method=l,this.url=n,this.async="boolean"!=typeof e||e,this.username=t,this.password=u,_(this),this.requestHeaders={},this.sendFlag=!1,!0===y.useFilters){var r=arguments;if(y.filters.some(function(l){return l.apply(this,r)}))return void y.defake(this,arguments)}this.readyStateChange(y.OPENED)},readyStateChange:function(l){this.readyState=l;var n,e,t=new r.Event("readystatechange",!1,!1,this);if("function"==typeof this.onreadystatechange)try{this.onreadystatechange(t)}catch(l){this.logError("Fake XHR onreadystatechange handler",l)}this.readyState===y.DONE&&(this.timedOut||this.aborted||0===this.status?(e={loaded:0,total:0},n=(this.timedOut?"timeout":this.aborted&&"abort")||"error"):(e={loaded:100,total:100},n="load"),a&&(this.upload.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.upload.dispatchEvent(new r.ProgressEvent(n,e,this)),this.upload.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.dispatchEvent(new r.ProgressEvent(n,e,this)),this.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(t)},setRequestHeader:function(l,n){if("string"!=typeof n)throw new TypeError("By RFC7230, section 3.2.4, header values should be strings. Got "+typeof n);b(this);var e=!0;if("function"==typeof this.unsafeHeadersEnabled&&(e=this.unsafeHeadersEnabled()),e&&(null!==v(g,l)||/^(Sec-|Proxy-)/i.test(l)))throw new Error('Refused to set unsafe header "'+l+'"');n=function(l){return l.replace(/^[\x09\x0A\x0D\x20]+|[\x09\x0A\x0D\x20]+$/g,"")}(n);var t=v(this.requestHeaders,l);t?this.requestHeaders[t]+=", "+n:this.requestHeaders[l]=n},setStatus:function(l){var n="number"==typeof l?l:200;E(this),this.status=n,this.statusText=y.statusCodes[n]},setResponseHeaders:function(l){E(this);var n=this.responseHeaders={};Object.keys(l).forEach(function(e){n[e]=l[e]}),this.async?this.readyStateChange(y.HEADERS_RECEIVED):this.readyState=y.HEADERS_RECEIVED},send:function(l){if(b(this),!/^(head)$/i.test(this.method)){var n=v(this.requestHeaders,"Content-Type");if(this.requestHeaders[n]){var e=this.requestHeaders[n].split(";");this.requestHeaders[n]=e[0]+";charset=utf-8"}else!c||l instanceof FormData||(this.requestHeaders["Content-Type"]="text/plain;charset=utf-8");this.requestBody=l}if(this.errorFlag=!1,this.sendFlag=this.async,_(this),this.readyStateChange(y.OPENED),"function"==typeof this.onSend&&this.onSend(this),d.supportsTimeout&&"object"==typeof setInterval.clock&&"object"==typeof Date.clock)var t=Date.now(),u=this,o=setInterval(function(){u.readyState===y.UNSENT||u.readyState===y.DONE?clearInterval(o):"number"==typeof u.timeout&&u.timeout>0&&Date.now()>=t+u.timeout&&(u.triggerTimeout(),clearInterval(o))},1);this.dispatchEvent(new r.Event("loadstart",!1,!1,this))},abort:function(){this.aborted=!0,T(this),this.readyState=y.UNSENT},error:function(){_(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyStateChange(y.DONE)},triggerTimeout:function(){d.supportsTimeout&&(this.timedOut=!0,T(this))},getResponseHeader:function(l){return this.readyState=y.LOADING)throw new Error("INVALID_STATE_ERR");this.overriddenMimeType=l}});var S={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};o(y,S),o(y.prototype,S),n.exports={xhr:d,FakeXMLHttpRequest:y,useFakeXMLHttpRequest:function(){return y.restore=function(l){d.supportsXHR&&(e.XMLHttpRequest=d.GlobalXMLHttpRequest),d.supportsActiveX&&(e.ActiveXObject=d.GlobalActiveXObject),delete y.restore,!0!==l&&delete y.onCreate},d.supportsXHR&&(e.XMLHttpRequest=y),d.supportsActiveX&&(e.ActiveXObject=function(l){return"Microsoft.XMLHTTP"===l||/^Msxml2\.XMLHTTP/i.test(l)?new y:new d.GlobalActiveXObject(l)}),y}}}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../configure-logger":1,"../event":5,"./blob":10,"just-extend":42,"text-encoding":46}],12:[function(l,n,e){n.exports={fakeServer:l("./fake-server"),fakeServerWithClock:l("./fake-server/fake-server-with-clock"),fakeXhr:l("./fake-xhr")}},{"./fake-server":9,"./fake-server/fake-server-with-clock":7,"./fake-xhr":11}],13:[function(l,n,e){n.exports=function(l,n){var e=!0;try{l.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch(l){e=!1}return e}},{}],14:[function(l,n,e){n.exports=function(l){return l.displayName||l.name||(String(l).match(/function ([^\s\(]+)/)||[])[1]}},{}],15:[function(l,n,e){n.exports={every:l("./every"),functionName:l("./function-name"),prototypes:l("./prototypes"),typeOf:l("./type-of"),valueToString:l("./value-to-string")}},{"./every":13,"./function-name":14,"./prototypes":19,"./type-of":22,"./value-to-string":23}],16:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Array.prototype)},{"./copy-prototype":17}],17:[function(l,n,e){var t=Function.call;n.exports=function(l){return Object.getOwnPropertyNames(l).reduce(function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=t.bind(l[e])),n},Object.create(null))}},{}],18:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Function.prototype)},{"./copy-prototype":17}],19:[function(l,n,e){n.exports={array:l("./array"),function:l("./function"),object:l("./object"),string:l("./string")}},{"./array":16,"./function":18,"./object":20,"./string":21}],20:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Object.prototype)},{"./copy-prototype":17}],21:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(String.prototype)},{"./copy-prototype":17}],22:[function(l,n,e){var t=l("type-detect");n.exports=function(l){return t(l).toLowerCase()}},{"type-detect":49}],23:[function(l,n,e){n.exports=function(l){return l&&l.toString?l.toString():String(l)}},{}],24:[function(l,n,e){(function(e){var t=l("@sinonjs/samsam"),u={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},r=[];function o(l){if(!l)return"";if(l.displayName)return l.displayName;if(l.name)return l.name;var n=l.toString().match(/function\s+([^\(]+)/m);return n&&n[1]||""}function i(l,n){var e,t,r=o(n&&n.constructor),i=l.excludeConstructors||u.excludeConstructors||[];for(e=0,t=i.length;e0?Math.min(this.limitChildrenCount,l.length):l.length,t=0;t0?Math.min(this.limitChildrenCount,h.length):h.length,o=0;o80?m+"{\n "+y+p.join(",\n "+y)+"\n"+y+"}":m+"{ "+p.join(", ")+" }"},s.element=function(l){var n,e,t,u,r,o=l.tagName.toLowerCase(),i=l.attributes,a=[];for(t=0,u=i.length;t0?" ":""),c=l.innerHTML||"";return c.length>20&&(c=c.substr(0,20)+"[...]"),(s+a.join(" ")+">"+c+"").replace(/ contentEditable="inherit"/,"")},c.prototype={functionName:o,configure:function(l){return new c(l)},constructorName:function(l){return i(this,l)},ascii:function(l,n,e){return s(this,l,n,e)}},n.exports=c.prototype}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@sinonjs/samsam":40}],25:[function(l,n,e){var t=l("./get-class"),u=l("./identical"),r=l("./is-arguments"),o=l("./is-date"),i=l("./is-element"),a=l("./is-nan"),s=l("./is-object"),c=l("./is-set"),f=l("./is-subset"),p=l("./get-class-name"),h=Array.prototype.every,d=Date.prototype.getTime,g=Object.prototype.hasOwnProperty,m=Array.prototype.indexOf,y=Object.keys;function b(l,n,e){var b=[],v=[],w=[],A=[],E={};return function l(n,x,C,_){if(e&&e.isMatcher(x))return e.isMatcher(n)?n===x:x.test(n);var T=typeof n,S=typeof x;if(n===x||a(n)||a(x)||null==n||null==x||"object"!==T||"object"!==S)return u(n,x);if(i(n)||i(x))return!1;var k=o(n),F=o(x);if((k||F)&&(!k||!F||d.call(n)!==d.call(x)))return!1;if(n instanceof RegExp&&x instanceof RegExp&&n.toString()!==x.toString())return!1;if(n instanceof Error&&x instanceof Error&&(n.constructor!==x.constructor||n.message!==x.message||n.stack!==x.stack))return!1;var D=t(n),P=t(x),j=y(n),O=y(x),B=p(n),$=p(x);if(r(n)||r(x)){if(n.length!==x.length)return!1}else if(T!==S||D!==P||j.length!==O.length||B&&$&&B!==$)return!1;return c(n)||c(x)?!(!c(n)||!c(x)||n.size!==x.size)&&f(n,x,l):h.call(j,function(e){if(!g.call(x,e))return!1;var t=n[e],u=x[e],r=s(t),o=s(u),i=r?m.call(b,t):-1,a=o?m.call(v,u):-1,c=-1!==i?w[i]:C+"["+JSON.stringify(e)+"]",f=-1!==a?A[a]:_+"["+JSON.stringify(e)+"]",p=c+f;return!!E[p]||(-1===i&&r&&(b.push(t),w.push(c)),-1===a&&o&&(v.push(u),A.push(f)),r&&o&&(E[p]=!0),l(t,u,c,f))})}(l,n,"$1","$2")}b.use=function(l){return function(n,e){return b(n,e,l)}},n.exports=b},{"./get-class":27,"./get-class-name":26,"./identical":28,"./is-arguments":29,"./is-date":30,"./is-element":31,"./is-nan":32,"./is-object":34,"./is-set":35,"./is-subset":36}],26:[function(l,n,e){var t=/function (\w+)\s*\(/;n.exports=function(l){if(l.constructor&&"name"in l.constructor)return l.constructor.name;if("function"==typeof l.constructor){var n=l.constructor.toString().match(t);if(n.length>1)return n[1]}return null}},{}],27:[function(l,n,e){var t=Object.prototype;n.exports=function(l){return t.toString.call(l).split(/[ \]]/)[1]}},{}],28:[function(l,n,e){var t=l("./is-nan"),u=l("./is-neg-zero");n.exports=function(l,n){return!!(l===n||t(l)&&t(n))&&(0!==l||u(l)===u(n))}},{"./is-nan":32,"./is-neg-zero":33}],29:[function(l,n,e){var t=l("./get-class");n.exports=function(l){if("Arguments"===t(l))return!0;if("object"!=typeof l||"number"!=typeof l.length||"Array"===t(l))return!1;if("function"==typeof l.callee)return!0;try{l[l.length]=6,delete l[l.length]}catch(l){return!0}return!1}},{"./get-class":27}],30:[function(l,n,e){n.exports=function(l){return l instanceof Date}},{}],31:[function(l,n,e){var t="undefined"!=typeof document&&document.createElement("div");n.exports=function(l){if(!l||1!==l.nodeType||!t)return!1;try{l.appendChild(t),l.removeChild(t)}catch(l){return!1}return!0}},{}],32:[function(l,n,e){n.exports=function(l){return"number"==typeof l&&l!=l}},{}],33:[function(l,n,e){n.exports=function(l){return 0===l&&1/l==-1/0}},{}],34:[function(l,n,e){n.exports=function(l){return!("object"!=typeof l||null===l||l instanceof Boolean||l instanceof Date||l instanceof Error||l instanceof Number||l instanceof RegExp||l instanceof String)}},{}],35:[function(l,n,e){n.exports=function(l){return"undefined"!=typeof Set&&l instanceof Set||!1}},{}],36:[function(l,n,e){n.exports=function(l,n,e){var t=!0;return l.forEach(function(l){var u=!1;n.forEach(function(n){e(n,l)&&(u=!0)}),t=t&&u}),t}},{}],37:[function(l,n,e){var t=l("@sinonjs/commons").prototypes.string.slice,u=l("@sinonjs/commons").typeOf;n.exports=function(l){var n="";function e(l){return"string"==typeof l?"'"+l+"'":String(l)}return"map"===u(l)?(l.forEach(function(l,t){n+="["+e(t)+","+e(l)+"],"}),n=t(n,0,-1)):(l.forEach(function(l){n+=e(l)+","}),n=t(n,0,-1))}},{"@sinonjs/commons":15}],38:[function(l,n,e){var t=l("./deep-equal").use(s),u=l("./get-class"),r=l("./is-date"),o=l("./is-set"),i=l("./is-subset"),a=l("./matcher");function s(l,n){if(n&&"function"==typeof n.test)return n.test(l);if("function"==typeof n)return!0===n(l);if("string"==typeof n)return n=n.toLowerCase(),("string"==typeof l||!!l)&&String(l).toLowerCase().indexOf(n)>=0;if("number"==typeof n)return n===l;if("boolean"==typeof n)return n===l;if(void 0===n)return void 0===l;if(null===n)return null===l;if(null===l)return!1;if(o(l))return i(n,l,s);if("Array"===u(l)&&"Array"===u(n))return function(l,n,e){if(0===n.length)return!0;var t,u,r,o;for(t=0,u=l.length;t=u)return!1;if(!e(l[t+r],n[r]))return!1}return!0}return!1}(l,n,s);if(r(n))return r(l)&&l.getTime()===n.getTime();if(n&&"object"==typeof n){if(n===l)return!0;if("object"!=typeof l)return!1;var e;for(e in n){var a=l[e];if(void 0===a&&"function"==typeof l.getAttribute&&(a=l.getAttribute(e)),null===n[e]||void 0===n[e]){if(a!==n[e])return!1}else if(void 0===a||!t(a,n[e]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")}Object.keys(a).forEach(function(l){s[l]=a[l]}),n.exports=s},{"./deep-equal":25,"./get-class":27,"./is-date":30,"./is-set":35,"./is-subset":36,"./matcher":39}],39:[function(l,n,e){var t=l("@sinonjs/commons").prototypes.array,u=l("./deep-equal").use(_),r=l("@sinonjs/commons").every,o=l("@sinonjs/commons").functionName,i=l("lodash.get"),a=l("./iterable-to-string"),s=l("@sinonjs/commons").prototypes.object,c=l("@sinonjs/commons").prototypes.string,f=l("@sinonjs/commons").typeOf,p=l("@sinonjs/commons").valueToString,h=t.indexOf,d=t.every,g=t.join,m=t.map,y=t.some,b=s.hasOwnProperty,v=s.isPrototypeOf,w=c.indexOf;function A(l,n,e){var t=f(l);if(t!==n)throw new TypeError("Expected type of "+e+" to be "+n+", but was "+t)}var E={toString:function(){return this.message}};function x(l){return v(E,l)}var C={function:function(l,n,e){l.test=n,l.message=e||"match("+o(n)+")"},number:function(l,n){l.test=function(l){return n==l}},object:function(l,n){var e;return"function"==typeof n.test?(l.test=function(l){return!0===n.test(l)},l.message="match("+o(n.test)+")",l):(e=m(Object.keys(n),function(l){return l+": "+p(n[l])}),l.test=function(l){return function l(n,e){return null!=n&&d(Object.keys(e),function(t){var r=e[t],o=n[t];if(x(r)){if(!r.test(o))return!1}else if("object"===f(r)){if(!l(o,r))return!1}else if(!u(o,r))return!1;return!0})}(l,n)},l.message="match("+g(e,", ")+")",l)},regexp:function(l,n){l.test=function(l){return"string"==typeof l&&n.test(l)}},string:function(l,n){l.test=function(l){return"string"==typeof l&&-1!==w(l,n)},l.message='match("'+n+'")'}};function _(l,n){var e=Object.create(E),t=f(l);return t in C?C[t](e,l,n):e.test=function(n){return u(n,l)},e.message||(e.message="match("+p(l)+")"),e}function T(l,n){return function(e,t){A(e,"string","property");var r=1===arguments.length,o=n+'("'+e+'"';return r||(o+=", "+p(t)),_(function(n){return!(null==n||!l(n,e))&&(r||u(n[e],t))},o+=")")}}E.or=function(l){if(!arguments.length)throw new TypeError("Matcher expected");x(l)||(l=_(l));var n=this,e=Object.create(E);return e.test=function(e){return n.test(e)||l.test(e)},e.message=n.message+".or("+l.message+")",e},E.and=function(l){if(!arguments.length)throw new TypeError("Matcher expected");x(l)||(l=_(l));var n=this,e=Object.create(E);return e.test=function(e){return n.test(e)&&l.test(e)},e.message=n.message+".and("+l.message+")",e},_.isMatcher=x,_.any=_(function(){return!0},"any"),_.defined=_(function(l){return null!=l},"defined"),_.truthy=_(function(l){return!!l},"truthy"),_.falsy=_(function(l){return!l},"falsy"),_.same=function(l){return _(function(n){return l===n},"same("+p(l)+")")},_.in=function(l){if(!Array.isArray(l))throw new TypeError("array expected");return _(function(n){return y(l,function(l){return l===n})},"in("+p(l)+")")},_.typeOf=function(l){return A(l,"string","type"),_(function(n){return f(n)===l},'typeOf("'+l+'")')},_.instanceOf=function(l){return"undefined"==typeof Symbol||void 0===Symbol.hasInstance?A(l,"function","type"):function(l,n,e,t){if(null==l[n])throw new TypeError("Expected "+e+" to have method "+t)}(l,Symbol.hasInstance,"type","[Symbol.hasInstance]"),_(function(n){return n instanceof l},"instanceOf("+(o(l)||Object.prototype.toString.call(l))+")")},_.has=T(function(l,n){return"object"==typeof l?n in l:void 0!==l[n]},"has"),_.hasOwn=T(function(l,n){return b(l,n)},"hasOwn"),_.hasNested=function(l,n){A(l,"string","property");var e=1===arguments.length,t='hasNested("'+l+'"';return e||(t+=", "+p(n)),_(function(t){return null!=t&&void 0!==i(t,l)&&(e||u(i(t,l),n))},t+=")")},_.every=function(l){if(!x(l))throw new TypeError("Matcher expected");return _(function(n){return"object"===f(n)?r(Object.keys(n),function(e){return l.test(n[e])}):!!n&&"function"===f(n.forEach)&&r(n,function(n){return l.test(n)})},"every("+l.message+")")},_.some=function(l){if(!x(l))throw new TypeError("Matcher expected");return _(function(n){return"object"===f(n)?!r(Object.keys(n),function(e){return!l.test(n[e])}):!!n&&"function"===f(n.forEach)&&!r(n,function(n){return!l.test(n)})},"some("+l.message+")")},_.array=_.typeOf("array"),_.array.deepEquals=function(l){return _(function(n){var e=n.length===l.length;return"array"===f(n)&&e&&r(n,function(n,e){return l[e]===n})},"deepEquals(["+a(l)+"])")},_.array.startsWith=function(l){return _(function(n){return"array"===f(n)&&r(l,function(l,e){return n[e]===l})},"startsWith(["+a(l)+"])")},_.array.endsWith=function(l){return _(function(n){var e=n.length-l.length;return"array"===f(n)&&r(l,function(l,t){return n[e+t]===l})},"endsWith(["+a(l)+"])")},_.array.contains=function(l){return _(function(n){return"array"===f(n)&&r(l,function(l){return-1!==h(n,l)})},"contains(["+a(l)+"])")},_.map=_.typeOf("map"),_.map.deepEquals=function(l){return _(function(n){var e=n.size===l.size;return"map"===f(n)&&e&&r(n,function(n,e){return l.has(e)&&l.get(e)===n})},"deepEquals(Map["+a(l)+"])")},_.map.contains=function(l){return _(function(n){return"map"===f(n)&&r(l,function(l,e){return n.has(e)&&n.get(e)===l})},"contains(Map["+a(l)+"])")},_.set=_.typeOf("set"),_.set.deepEquals=function(l){return _(function(n){var e=n.size===l.size;return"set"===f(n)&&e&&r(n,function(n){return l.has(n)})},"deepEquals(Set["+a(l)+"])")},_.set.contains=function(l){return _(function(n){return"set"===f(n)&&r(l,function(l){return n.has(l)})},"contains(Set["+a(l)+"])")},_.bool=_.typeOf("boolean"),_.number=_.typeOf("number"),_.string=_.typeOf("string"),_.object=_.typeOf("object"),_.func=_.typeOf("function"),_.regexp=_.typeOf("regexp"),_.date=_.typeOf("date"),_.symbol=_.typeOf("symbol"),n.exports=_},{"./deep-equal":25,"./iterable-to-string":37,"@sinonjs/commons":15,"lodash.get":43}],40:[function(l,n,e){var t=l("./identical"),u=l("./is-arguments"),r=l("./is-element"),o=l("./is-neg-zero"),i=l("./match"),a=l("./deep-equal").use(i),s=l("./matcher");n.exports={createMatcher:s,deepEqual:a,isArguments:u,isElement:r,isNegZero:o,identical:t,match:i}},{"./deep-equal":25,"./identical":28,"./is-arguments":29,"./is-element":31,"./is-neg-zero":33,"./match":38,"./matcher":39}],41:[function(l,n,e){n.exports=Array.isArray||function(l){return"[object Array]"==Object.prototype.toString.call(l)}},{}],42:[function(l,n,e){n.exports=function l(){var n=[].slice.call(arguments);var e=!1;"boolean"==typeof n[0]&&(e=n.shift());var t=n[0];if(!t||"object"!=typeof t&&"function"!=typeof t)throw new Error("extendee must be an object");var u=n.slice(1);var r=u.length;for(var o=0;o-1},B.prototype.set=function(l,n){var e=this.__data__,t=L(e,l);return t<0?e.push([l,n]):e[t][1]=n,this},$.prototype.clear=function(){this.__data__={hash:new O,map:new(F||B),string:new O}},$.prototype.delete=function(l){return R(this,l).delete(l)},$.prototype.get=function(l){return R(this,l).get(l)},$.prototype.has=function(l){return R(this,l).has(l)},$.prototype.set=function(l,n){return R(this,l).set(l,n),this};var q=H(function(l){var n;l=null==(n=l)?"":function(l){if("string"==typeof l)return l;if(V(l))return j?j.call(l):"";var n=l+"";return"0"==n&&1/l==-u?"-0":n}(n);var e=[];return c.test(l)&&e.push(""),l.replace(f,function(l,n,t,u){e.push(t?u.replace(p,"$1"):n||l)}),e});function U(l){if("string"==typeof l||V(l))return l;var n=l+"";return"0"==n&&1/l==-u?"-0":n}function H(l,n){if("function"!=typeof l||n&&"function"!=typeof n)throw new TypeError(e);var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],r=t.cache;if(r.has(u))return r.get(u);var o=l.apply(this,e);return t.cache=r.set(u,o),o};return t.cache=new(H.Cache||$),t}H.Cache=$;var z=Array.isArray;function W(l){var n=typeof l;return!!l&&("object"==n||"function"==n)}function V(l){return"symbol"==typeof l||function(l){return!!l&&"object"==typeof l}(l)&&_.call(l)==i}n.exports=function(l,n,e){var t=null==l?void 0:N(l,n);return void 0===t?e:t}}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(require,module,exports){(function(global){var userAgent=global.navigator&&global.navigator.userAgent,isRunningInIE=userAgent&&userAgent.indexOf("MSIE ")>-1,maxTimeout=Math.pow(2,31)-1;isRunningInIE&&(global.setTimeout=global.setTimeout,global.clearTimeout=global.clearTimeout,global.setInterval=global.setInterval,global.clearInterval=global.clearInterval,global.Date=global.Date),void 0!==global.setImmediate&&(global.setImmediate=global.setImmediate,global.clearImmediate=global.clearImmediate);var NOOP=function(){},timeoutResult=setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=global.process&&"function"==typeof global.process.hrtime,nextTickPresent=global.process&&"function"==typeof global.process.nextTick,performancePresent=global.performance&&"function"==typeof global.performance.now,requestAnimationFramePresent=global.requestAnimationFrame&&"function"==typeof global.requestAnimationFrame,cancelAnimationFramePresent=global.cancelAnimationFrame&&"function"==typeof global.cancelAnimationFrame;clearTimeout(timeoutResult);var NativeDate=Date,uniqueTimerId=1;function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,r=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);r+=n*Math.pow(60,t-u-1)}return 1e3*r}function fixedFloor(l){return l>=0?Math.floor(l):Math.ceil(l)}function fixedModulo(l,n){return(l%n+n)%n}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties(function l(n,e,t,u,r,o,i){switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,r);case 6:return new NativeDate(n,e,t,u,r,o);default:return new NativeDate(n,e,t,u,r,o,i)}},NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nmaxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject?{id:n.id,ref:NOOP,unref:NOOP}:n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,r=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||r&&1!==compareTimers(r,u[t])||(r=u[t]));return r}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n&&(l.timers||(l.timers=[]),"object"==typeof n&&(n=n.id),l.timers.hasOwnProperty(n))){var t=l.timers[n];if(t.type!==e){var u="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===t.type?"requestAnimationFrame":"set"+t.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+u+"()")}delete l.timers[n]}}function uninstall(l,n,e){var t,u,r;for(u=0,r=l.methods.length;u1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("lolex.install called with "+String(l)+" lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter(function(l){return"nextTick"!==l})),n=0,e=u.methods.length;n>6*e)+u];e>0;){var o=n>>6*(e-1);r.push(128|63&o),e-=1}return r}}function k(l,n){var e=n.fatal;this.handler=function(n,t){if(t===a)return c;if(o(t))return t;var u=l[t-128];return null===u?f(e):u}}function F(l,n){n.fatal;this.handler=function(n,e){if(e===a)return c;if(i(e))return e;var t=A(e,l);return null===t&&p(e),t+128}}function D(l){var n=l.fatal,e=0,u=0,r=0;this.handler=function(l,i){if(i===a&&0===e&&0===u&&0===r)return c;var s;if(i!==a||0===e&&0===u&&0===r||(e=0,u=0,r=0,f(n)),0!==r){s=null,t(i,48,57)&&(s=function(l){if(l>39419&&l<189e3||l>1237575)return null;if(7457===l)return 59335;var n,e=0,t=0,u=E("gb18030-ranges");for(n=0;n>8,t=255&l;return n?[e,t]:[t,e]}function H(l,n){var e=n.fatal,u=null,r=null;this.handler=function(n,o){if(o===a&&(null!==u||null!==r))return f(e);if(o===a&&null===u&&null===r)return c;if(null===u)return u=o,null;var i;if(i=l?(u<<8)+o:(o<<8)+u,u=null,null!==r){var s=r;return r=null,t(i,56320,57343)?65536+1024*(s-55296)+(i-56320):(n.prepend(U(i,l)),f(e))}return t(i,55296,56319)?(r=i,null):t(i,56320,57343)?f(e):i}}function z(l,n){n.fatal;this.handler=function(n,e){if(e===a)return c;if(t(e,0,65535))return U(e,l);var u=U(55296+(e-65536>>10),l),r=U(56320+(e-65536&1023),l);return u.concat(r)}}function W(l){l.fatal;this.handler=function(l,n){return n===a?c:o(n)?n:63360+n-128}}function V(l){l.fatal;this.handler=function(l,n){return n===a?c:i(n)?n:t(n,63360,63487)?n-63360+128:p(n)}}Object.defineProperty&&(Object.defineProperty(C.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(C.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(C.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),C.prototype.decode=function(l,n){var e;e="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=r(n),this._do_not_flush||(this._decoder=v[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(n.stream);for(var t,u=new s(e),o=[];;){var i=u.read();if(i===a)break;if((t=this._decoder.handler(u,i))===c)break;null!==t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t))}if(!this._do_not_flush){do{if((t=this._decoder.handler(u,u.read()))===c)break;null!==t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t))}while(!u.endOfStream());this._decoder=null}return function(l){var n,e;return n=["UTF-8","UTF-16LE","UTF-16BE"],e=this._encoding.name,-1===n.indexOf(e)||this._ignoreBOM||this._BOMseen||(l.length>0&&65279===l[0]?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),function(l){for(var n="",e=0;e>10),56320+(1023&t)))}return n}(l)}.call(this,o)},Object.defineProperty&&Object.defineProperty(_.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),_.prototype.encode=function(l,n){l=void 0===l?"":String(l),n=r(n),this._do_not_flush||(this._encoder=b[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(n.stream);for(var e,t=new s(function(l){for(var n=String(l),e=n.length,t=0,u=[];t57343)u.push(r);else if(56320<=r&&r<=57343)u.push(65533);else if(55296<=r&&r<=56319)if(t===e-1)u.push(65533);else{var o=n.charCodeAt(t+1);if(56320<=o&&o<=57343){var i=1023&r,a=1023&o;u.push(65536+(i<<10)+a),t+=1}else u.push(65533)}t+=1}return u}(l)),u=[];;){var o=t.read();if(o===a)break;if((e=this._encoder.handler(t,o))===c)break;Array.isArray(e)?u.push.apply(u,e):u.push(e)}if(!this._do_not_flush){for(;(e=this._encoder.handler(t,t.read()))!==c;)Array.isArray(e)?u.push.apply(u,e):u.push(e);this._encoder=null}return new Uint8Array(u)},b["UTF-8"]=function(l){return new S(l)},v["UTF-8"]=function(l){return new T(l)},"encoding-indexes"in e&&d.forEach(function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach(function(l){var n=l.name,e=E(n.toLowerCase());v[n]=function(l){return new k(e,l)},b[n]=function(l){return new F(e,l)}})}),v.GBK=function(l){return new D(l)},b.GBK=function(l){return new P(l,!0)},b.gb18030=function(l){return new P(l)},v.gb18030=function(l){return new D(l)},b.Big5=function(l){return new O(l)},v.Big5=function(l){return new j(l)},b["EUC-JP"]=function(l){return new $(l)},v["EUC-JP"]=function(l){return new B(l)},b["ISO-2022-JP"]=function(l){return new N(l)},v["ISO-2022-JP"]=function(l){return new L(l)},b.Shift_JIS=function(l){return new R(l)},v.Shift_JIS=function(l){return new M(l)},b["EUC-KR"]=function(l){return new q(l)},v["EUC-KR"]=function(l){return new I(l)},b["UTF-16BE"]=function(l){return new z(!0,l)},v["UTF-16BE"]=function(l){return new H(!0,l)},b["UTF-16LE"]=function(l){return new z(!1,l)},v["UTF-16LE"]=function(l){return new H(!1,l)},b["x-user-defined"]=function(l){return new V(l)},v["x-user-defined"]=function(l){return new W(l)},e.TextEncoder||(e.TextEncoder=_),e.TextDecoder||(e.TextDecoder=C),void 0!==n&&n.exports&&(n.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},{"./encoding-indexes.js":47}],49:[function(l,n,e){(function(l){!function(l,t){"object"==typeof e&&void 0!==n?n.exports=t():"function"==typeof define&&define.amd?define(t):l.typeDetect=t()}(this,function(){var n="function"==typeof Promise,e="object"==typeof self?self:l,t="undefined"!=typeof Symbol,u="undefined"!=typeof Map,r="undefined"!=typeof Set,o="undefined"!=typeof WeakMap,i="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,s=t&&void 0!==Symbol.iterator,c=t&&void 0!==Symbol.toStringTag,f=r&&"function"==typeof Set.prototype.entries,p=u&&"function"==typeof Map.prototype.entries,h=f&&Object.getPrototypeOf((new Set).entries()),d=p&&Object.getPrototypeOf((new Map).entries()),g=s&&"function"==typeof Array.prototype[Symbol.iterator],m=g&&Object.getPrototypeOf([][Symbol.iterator]()),y=s&&"function"==typeof String.prototype[Symbol.iterator],b=y&&Object.getPrototypeOf(""[Symbol.iterator]()),v=8,w=-1;return function(l){var t=typeof l;if("object"!==t)return t;if(null===l)return"null";if(l===e)return"global";if(Array.isArray(l)&&(!1===c||!(Symbol.toStringTag in l)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&l===window.location)return"Location";if("object"==typeof window.document&&l===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&l===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&l===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&l instanceof window.HTMLElement){if("BLOCKQUOTE"===l.tagName)return"HTMLQuoteElement";if("TD"===l.tagName)return"HTMLTableDataCellElement";if("TH"===l.tagName)return"HTMLTableHeaderCellElement"}}var s=c&&l[Symbol.toStringTag];if("string"==typeof s)return s;var f=Object.getPrototypeOf(l);return f===RegExp.prototype?"RegExp":f===Date.prototype?"Date":n&&f===Promise.prototype?"Promise":r&&f===Set.prototype?"Set":u&&f===Map.prototype?"Map":i&&f===WeakSet.prototype?"WeakSet":o&&f===WeakMap.prototype?"WeakMap":a&&f===DataView.prototype?"DataView":u&&f===d?"Map Iterator":r&&f===h?"Set Iterator":g&&f===m?"Array Iterator":y&&f===b?"String Iterator":null===f?"Object":Object.prototype.toString.call(l).slice(v,w)}})}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[12])(12)},module.exports=f()}),arrayProto$e=lib.prototypes.array,match$5=samsam.createMatcher,valueToString$9=lib.valueToString,fakeServer=nise.fakeServer,fakeXhr=nise.fakeXhr,filter$3=arrayProto$e.filter,forEach$8=arrayProto$e.filter,push$6=arrayProto$e.push,reverse$1=arrayProto$e.reverse;function applyOnEach(l,n){var e=filter$3(l,function(l){return"function"==typeof l[n]});forEach$8(e,function(l){l[n]()})}function Sandbox(){var l,n=this,e=[],t=[];function u(l,n){var e=getPropertyDescriptor(l,n);function t(){Object.defineProperty(l,n,e)}return t.object=l,t.property=n,t}function r(l,n){forEach$8(t,function(e){if(e.object===l&&e.property===n)throw new TypeError("Attempted to replace "+n+" which is already replaced")})}n.serverPrototype=fakeServer,n.getFakes=function(){return e},n.getRestorers=function(){return t},n.createStubInstance=function(l){if("function"!=typeof l)throw new TypeError("The constructor should be a function.");return this.stub(Object.create(l.prototype))},n.inject=function(l){return l.spy=function(){return n.spy.apply(null,arguments)},l.stub=function(){return n.stub.apply(null,arguments)},l.mock=function(){return n.mock.apply(null,arguments)},n.clock&&(l.clock=n.clock),n.server&&(l.server=n.server,l.requests=n.server.requests),l.match=match$5,l},n.mock=function(){var n=mock_1.apply(null,arguments);return push$6(e,n),usePromiseLibrary_1(l,n),n},n.reset=function(){applyOnEach(e,"reset"),applyOnEach(e,"resetHistory")},n.resetBehavior=function(){applyOnEach(e,"resetBehavior")},n.resetHistory=function(){function l(l){var n=l.resetHistory||l.reset;n&&n.call(l)}forEach$8(e,function(n){if("function"!=typeof n){var e=[];n.get&&push$6(e,n.get),n.set&&push$6(e,n.set),forEach$8(e,l)}else l(n)})},n.restore=function(){if(arguments.length)throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()");reverse$1(e),applyOnEach(e,"restore"),e=[],forEach$8(t,function(l){l()}),t=[],n.restoreContext()},n.restoreContext=function(){var l=n.injectedKeys,e=n.injectInto;l&&(forEach$8(l,function(l){delete e[l]}),l=[])},n.replace=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if(void 0===e)throw new TypeError("Expected replacement argument to be defined");if("function"==typeof o.get)throw new Error("Use sandbox.replaceGetter for replacing getters");if("function"==typeof o.set)throw new Error("Use sandbox.replaceSetter for replacing setters");if(typeof l[n]!=typeof e)throw new TypeError("Cannot replace "+typeof l[n]+" with "+typeof e);return r(l,n),push$6(t,u(l,n)),l[n]=e,e},n.replaceGetter=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof o.get)throw new Error("`object.property` is not a getter");return r(l,n),push$6(t,u(l,n)),Object.defineProperty(l,n,{get:e,configurable:isPropertyConfigurable_1(l,n)}),e},n.replaceSetter=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof o.set)throw new Error("`object.property` is not a setter");return r(l,n),push$6(t,u(l,n)),Object.defineProperty(l,n,{set:e,configurable:isPropertyConfigurable_1(l,n)}),e},n.spy=function(){var l=spy_1.apply(spy_1,arguments);return push$6(e,l),l},n.stub=function(n,t){if(isEsModule(n))throw new TypeError("ES Modules cannot be stubbed");if(isNonExistentOwnProperty_1(n,t))throw new TypeError("Cannot stub non-existent own property "+valueToString$9(t));var u=stub_1.apply(null,arguments);if(void 0===t&&"object"==typeof n){var r=collectOwnMethods_1(u);forEach$8(r,function(l){push$6(e,l)}),usePromiseLibrary_1(l,r)}else push$6(e,u),usePromiseLibrary_1(l,u);return u},n.fake=function(l){var n=fake_1.apply(fake_1,arguments);return push$6(e,n),n},forEach$8(Object.keys(fake_1),function(l){var t=fake_1[l];"function"==typeof t&&(n.fake[l]=function(){var l=t.apply(t,arguments);return push$6(e,l),l})}),n.useFakeTimers=function(l){var t=fakeTimers.useFakeTimers.call(null,l);return n.clock=t,push$6(e,t),t},n.verify=function(){applyOnEach(e,"verify")},n.verifyAndRestore=function(){var l;try{n.verify()}catch(n){l=n}if(n.restore(),l)throw l},n.useFakeServer=function(){var l=n.serverPrototype||fakeServer;return l&&l.create?(n.server=l.create(),push$6(e,n.server),n.server):null},n.useFakeXMLHttpRequest=function(){var l=fakeXhr.useFakeXMLHttpRequest();return push$6(e,l),l},n.usingPromise=function(t){return l=t,e.promiseLibrary=t,n}}Sandbox.prototype.assert=assert_1,Sandbox.prototype.match=match$5;var sandbox=Sandbox,arrayProto$f=lib.prototypes.array,forEach$9=arrayProto$f.forEach,push$7=arrayProto$f.push;function prepareSandboxFromConfig(l){var n=new sandbox;return l.useFakeServer&&("object"==typeof l.useFakeServer&&(n.serverPrototype=l.useFakeServer),n.useFakeServer()),l.useFakeTimers&&("object"==typeof l.useFakeTimers?n.useFakeTimers(l.useFakeTimers):n.useFakeTimers()),n}function exposeValue(l,n,e,t){t&&(!n.injectInto||e in n.injectInto?push$7(l.args,t):(n.injectInto[e]=t,push$7(l.injectedKeys,e)))}function createSandbox(l){if(!l)return new sandbox;var n=prepareSandboxFromConfig(l);n.args=n.args||[],n.injectedKeys=[],n.injectInto=l.injectInto;var e=n.inject({});return l.properties?forEach$9(l.properties,function(t){var u=e[t]||"sandbox"===t&&n;exposeValue(n,l,t,u)}):exposeValue(n,l,"sandbox"),n}var createSandbox_1=createSandbox,deprecated=createCommonjsModule(function(l,n){n.wrap=function(l,e){var t=function(){return n.printWarning(e),l.apply(this,arguments)};return l.prototype&&(t.prototype=l.prototype),t},n.defaultMsg=function(l){return"sinon."+l+" is deprecated and will be removed from the public API in a future version of sinon."},n.printWarning=function(l){"undefined"!=typeof console&&(console.info?console.info(l):console.log(l))}}),deprecated_1=deprecated.wrap,deprecated_2=deprecated.defaultMsg,deprecated_3=deprecated.printWarning,defaultConfig={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},apiMethods={createSandbox:createSandbox_1,assert:assert_1,match:samsam.createMatcher,spyCall:call$1,expectation:mockExpectation_1,createStubInstance:stub_1.createStubInstance,defaultConfig:defaultConfig,setFormatter:format_1.setFormatter,timers:fakeTimers.timers,xhr:nise.fakeXhr.xhr,FakeXMLHttpRequest:nise.fakeXhr.FakeXMLHttpRequest,fakeServer:nise.fakeServer,fakeServerWithClock:nise.fakeServerWithClock,createFakeServer:nise.fakeServer.create.bind(nise.fakeServer),createFakeServerWithClock:nise.fakeServerWithClock.create.bind(nise.fakeServerWithClock),addBehavior:function(l,n){behavior.addBehavior(stub_1,l,n)}},legacySandboxAPI={sandbox:{create:deprecated.wrap(createSandbox_1,"`sandbox.create()` is deprecated. Use default sandbox at `sinon.sandbox` or create new sandboxes with `sinon.createSandbox()`")}},sandbox$1=new sandbox,api=extend(sandbox$1,legacySandboxAPI,apiMethods),sinon=api;__webpack_exports__.default=sinon;const _serverPrototype=sinon.serverPrototype,_getFakes=sinon.getFakes,_getRestorers=sinon.getRestorers,_createStubInstance=sinon.createStubInstance,_inject=sinon.inject,_mock=sinon.mock,_reset=sinon.reset,_resetBehavior=sinon.resetBehavior,_resetHistory=sinon.resetHistory,_restore=sinon.restore,_restoreContext=sinon.restoreContext,_replace=sinon.replace,_replaceGetter=sinon.replaceGetter,_replaceSetter=sinon.replaceSetter,_spy=sinon.spy,_stub=sinon.stub,_fake=sinon.fake,_useFakeTimers=sinon.useFakeTimers,_verify=sinon.verify,_verifyAndRestore=sinon.verifyAndRestore,_useFakeServer=sinon.useFakeServer,_useFakeXMLHttpRequest=sinon.useFakeXMLHttpRequest,_usingPromise=sinon.usingPromise,_sandbox=sinon.sandbox,_createSandbox=sinon.createSandbox,_assert=sinon.assert,_match=sinon.match,_spyCall=sinon.spyCall,_expectation=sinon.expectation,_defaultConfig=sinon.defaultConfig,_setFormatter=sinon.setFormatter,_timers=sinon.timers,_xhr=sinon.xhr,_FakeXMLHttpRequest=sinon.FakeXMLHttpRequest,_fakeServer=sinon.fakeServer,_fakeServerWithClock=sinon.fakeServerWithClock,_createFakeServer=sinon.createFakeServer,_createFakeServerWithClock=sinon.createFakeServerWithClock,_addBehavior=sinon.addBehavior}.call(this,__webpack_require__(15),__webpack_require__(38).setImmediate,__webpack_require__(38).clearImmediate)},function(l,n){ + */l.exports=function(l,n,t){return e.configurable?(Object.defineProperty(l,"length",{get:function(){if(t)throw Error("Invalid Chai property: "+n+'.length. Due to a compatibility issue, "length" cannot directly follow "'+n+'". Use "'+n+'.lengthOf" instead.');throw Error("Invalid Chai property: "+n+'.length. See docs for proper usage of "'+n+'".')}}),l):l}},function(l,n,e){var t=e(8),u=e(3),r=e(47),o=e(16),i=["__flags","__methods","_obj","assert"];l.exports=function(l,n){return o()?new Proxy(l,{get:function l(e,o){if("string"==typeof o&&-1===t.proxyExcludedKeys.indexOf(o)&&!Reflect.has(e,o)){if(n)throw Error("Invalid Chai property: "+n+"."+o+'. See docs for proper usage of "'+n+'".');var a=null,s=4;throw r(e).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&-1===i.indexOf(l)){var n=function(l,n,e){if(Math.abs(l.length-n.length)>=e)return e;for(var t=[],u=0;u<=l.length;u++)t[u]=Array(n.length+1).fill(0),t[u][0]=u;for(var r=0;r=e?t[u][r]=e:t[u][r]=Math.min(t[u-1][r]+1,t[u][r-1]+1,t[u-1][r-1]+(o===n.charCodeAt(r-1)?0:1));return t[l.length][n.length]}(o,l,s);n2&&void 0!==arguments[2]?arguments[2]:{};switch("parser"===(e=m.processOptions(e,{allowedStartRules:[l.rules[0].name],cache:!1,context:{},dependencies:{},exportVar:null,features:null,format:"bare",header:null,optimize:"speed",output:"parser",trace:!1})).output&&(e.format="umd"),m.each(n.passes,function(t){t.forEach(function(t){t(l,n,e)})}),e.output){case"parser":return n.vm.evalModule(l.code,e.context);case"source":return l.code;default:n.error("Invalid output format: ".concat(e.output,"."))}}};l.exports=y},function(l,n,e){"use strict";l.exports=function(l,n,e){l.rules.forEach(function(l){l.reportFailures=!1});for(var t=e.allowedStartRules.map(function(n){var e=l.findRule(n);return e.reportFailures=!0,e}),u=n.buildVisitor({rule:function(l){u(l.expression)},named:function(){},rule_ref:function(n){var e=l.findRule(n.name);e.reportFailures||(e.reportFailures=!0,t.push(e))}});t.length>0;)u(t.pop())}},function(l,n,e){"use strict";var t=e(1);l.exports=function(l,n){var e,u=n.opcodes,r=[],o=[],i=[],a=[];function s(l){var n=JSON.stringify(l),e=t.findIndex(i,function(l){return JSON.stringify(l)===n});return-1===e?i.push(l)-1:e}function c(l,n,e){var u={predicate:l,params:n,body:e},r=JSON.stringify(u),o=t.findIndex(a,function(l){return JSON.stringify(l)===r});return-1===o?a.push(u)-1:o}var f=function(){var l;return(l=[]).concat.apply(l,arguments)};function p(l,n,e,t){return l>0?e:l<0?t:n.concat([e.length,t.length],e,t)}function h(l,n,e,r){var o=t.values(e,function(l){return r-l});return[u.CALL,l,n,o.length].concat(o)}function d(l,n,r){var o=0|l.match;return f([u.PUSH_CURR_POS],[u.EXPECT_NS_BEGIN],e(l,{sp:r.sp+1,env:t.clone(r.env),action:null,reportFailures:r.reportFailures}),[u.EXPECT_NS_END,n?1:0],p(n?-o:o,[n?u.IF_ERROR:u.IF_NOT_ERROR],f([u.POP],[n?u.POP:u.POP_CURR_POS],[u.PUSH_UNDEFINED]),f([u.POP],[n?u.POP_CURR_POS:u.POP],[u.PUSH_FAILED])))}function g(l,n,e){var t=c(!0,Object.keys(e.env),l.code);return f([u.UPDATE_SAVED_POS],h(t,0,e.env,e.sp),p(0|l.match,[u.IF],f([u.POP],n?[u.PUSH_FAILED]:[u.PUSH_UNDEFINED]),f([u.POP],n?[u.PUSH_UNDEFINED]:[u.PUSH_FAILED])))}function m(l){return n=[u.WHILE_NOT_ERROR],e=f([u.APPEND],l),n.concat([e.length],e);var n,e}(e=n.buildVisitor({grammar:function(l){l.rules.forEach(e),l.literals=r,l.classes=o,l.expectations=i,l.functions=a},rule:function(l){l.bytecode=e(l.expression,{sp:-1,env:{},action:null,reportFailures:l.reportFailures})},named:function(l,n){var t=n.reportFailures?s({type:"rule",value:l.name}):null,r=e(l.expression,{sp:n.sp,env:n.env,action:n.action,reportFailures:!1});return n.reportFailures?f([u.EXPECT,t],[u.SILENT_FAILS_ON],r,[u.SILENT_FAILS_OFF]):r},choice:function(l,n){return function l(n,r){return f(e(n[0],{sp:r.sp,env:t.clone(r.env),action:null,reportFailures:r.reportFailures}),n.length<2?[]:p(-(0|n[0].match),[u.IF_ERROR],f([u.POP],l(n.slice(1),r)),[]))}(l.alternatives,n)},action:function(l,n){var r=t.clone(n.env),o="sequence"!==l.expression.type||0===l.expression.elements.length,i=e(l.expression,{sp:n.sp+(o?1:0),env:r,action:l,reportFailures:n.reportFailures}),a=0|l.expression.match,s=o&&a>=0?c(!1,Object.keys(r),l.code):null;return!1===o?i:f([u.PUSH_CURR_POS],i,p(a,[u.IF_NOT_ERROR],f([u.LOAD_SAVED_POS,1],h(s,1,r,n.sp+2)),[]),[u.NIP])},sequence:function(l,n){var t=l.elements.length;return f([u.PUSH_CURR_POS],function l(n,r){if(n.length>0){var o=t-n.slice(1).length;return f(e(n[0],{sp:r.sp,env:r.env,pluck:r.pluck,action:null,reportFailures:r.reportFailures}),p(0|n[0].match,[u.IF_NOT_ERROR],l(n.slice(1),{sp:r.sp+1,env:r.env,pluck:r.pluck,action:r.action,reportFailures:r.reportFailures}),f(o>1?[u.POP_N,o]:[u.POP],[u.POP_CURR_POS],[u.PUSH_FAILED])))}return r.pluck.length>0?f([u.PLUCK,t+1,r.pluck.length],r.pluck.map(function(l){return r.sp-l})):r.action?f([u.LOAD_SAVED_POS,t],h(c(!1,Object.keys(r.env),r.action.code),t+1,r.env,r.sp)):f([u.WRAP,t],[u.NIP])}(l.elements,{sp:n.sp+1,env:n.env,pluck:[],action:n.action,reportFailures:n.reportFailures}))},labeled:function(l,n){var u=n.env,r=l.label,o=n.sp+1;return null!==r&&(u=t.clone(n.env),n.env[r]=o),n.pluck&&l.pick&&n.pluck.push(o),e(l.expression,{sp:n.sp,env:u,action:null,reportFailures:n.reportFailures})},text:function(l,n){return f([u.PUSH_CURR_POS],e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures}),p(0|l.expression.match,[u.IF_NOT_ERROR],f([u.POP],[u.TEXT]),[u.NIP]))},simple_and:function(l,n){return d(l.expression,!1,n)},simple_not:function(l,n){return d(l.expression,!0,n)},optional:function(l,n){return f(e(l.expression,{sp:n.sp,env:t.clone(n.env),action:null,reportFailures:n.reportFailures}),p(-(0|l.expression.match),[u.IF_ERROR],f([u.POP],[u.PUSH_NULL]),[]))},zero_or_more:function(l,n){var r=e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures});return f([u.PUSH_EMPTY_ARRAY],r,m(r),[u.POP])},one_or_more:function(l,n){var r=e(l.expression,{sp:n.sp+1,env:t.clone(n.env),action:null,reportFailures:n.reportFailures});return f([u.PUSH_EMPTY_ARRAY],r,p(0|l.expression.match,[u.IF_NOT_ERROR],f(m(r),[u.POP]),f([u.POP],[u.POP],[u.PUSH_FAILED])))},group:function(l,n){return e(l.expression,{sp:n.sp,env:t.clone(n.env),action:null,reportFailures:n.reportFailures})},semantic_and:function(l,n){return g(l,!1,n)},semantic_not:function(l,n){return g(l,!0,n)},rule_ref:function(n){return[u.RULE,l.indexOfRule(n.name)]},literal:function(l,n){if(l.value.length>0){var e=0|l.match,t=0===e||e>0&&!l.ignoreCase?(i=l.ignoreCase?l.value.toLowerCase():l.value,-1===(a=r.indexOf(i))?r.push(i)-1:a):null,o=n.reportFailures?s({type:"literal",value:l.value,ignoreCase:l.ignoreCase}):null;return f(n.reportFailures?[u.EXPECT,o]:[],p(e,l.ignoreCase?[u.MATCH_STRING_IC,t]:[u.MATCH_STRING,t],l.ignoreCase?[u.ACCEPT_N,l.value.length]:[u.ACCEPT_STRING,t],[u.PUSH_FAILED]))}var i,a;return[u.PUSH_EMPTY_STRING]},class:function(l,n){var e=0|l.match,r=0===e?function(l){var n={value:l.parts,inverted:l.inverted,ignoreCase:l.ignoreCase},e=JSON.stringify(n),u=t.findIndex(o,function(l){return JSON.stringify(l)===e});return-1===u?o.push(n)-1:u}(l):null,i=n.reportFailures?s({type:"class",value:l.parts,inverted:l.inverted,ignoreCase:l.ignoreCase}):null;return f(n.reportFailures?[u.EXPECT,i]:[],p(e,[u.MATCH_CLASS,r],[u.ACCEPT_N,1],[u.PUSH_FAILED]))},any:function(l,n){var e=n.reportFailures?s({type:"any"}):null;return f(n.reportFailures?[u.EXPECT,e]:[],p(0|l.match,[u.MATCH_ANY],[u.ACCEPT_N,1],[u.PUSH_FAILED]))}}))(l)}},function(l,n,e){"use strict";var t=e(1),u=e(13).version;l.exports=function(l,n,e){var r=n.opcodes,o=e.features||{};function i(l,n){return l in o?!!o[l]:null==n||!!n}var a=/^([^`\r\n]+?(?:`[^`]*?`[^\r\n]*?)?)$/gm;function s(l){return l.replace(a," $1")}function c(l){return l.replace(a," $1")}var f=function(l){return"peg$c"+l},p=function(l){return"peg$r"+l},h=function(l){return"peg$e"+l},d=function(l){return"peg$f"+l};function g(n,t){var u=[];return u.push(["","var rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);","}",""].join("\n")),e.trace&&u.push(["peg$tracer.trace({",' type: "rule.enter",'," rule: "+n+","," location: peg$computeLocation(startPos, startPos)","});",""].join("\n")),e.cache&&(u.push(["var key = peg$currPos * "+l.rules.length+" + "+t+";","var cached = peg$resultsCache[key];","var rule$expectations = [];","","rule$expects = function (expected) {"," if (peg$silentFails === 0) peg$expect(expected);"," rule$expectations.push(expected);","}","","if (cached) {"," peg$currPos = cached.nextPos;",""," rule$expectations = cached.expectations;"," if (peg$silentFails === 0) {"," rule$expectations.forEach(peg$expect);"," }",""].join("\n")),e.trace&&u.push(["if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+n+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+n+","," location: peg$computeLocation(startPos, startPos)"," });","}",""].join("\n")),u.push([" return cached.result;","}",""].join("\n"))),u.join("\n")}function m(l,n){var t=[];return e.cache&&t.push(["","peg$resultsCache[key] = {"," nextPos: peg$currPos,"," result: "+n+","," expectations: rule$expectations","};"].join("\n")),e.trace&&t.push(["","if ("+n+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+l+","," result: "+n+","," location: peg$computeLocation(startPos, peg$currPos)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+l+","," location: peg$computeLocation(startPos, startPos)"," });","}"].join("\n")),t.push(["","return "+n+";"].join("\n")),t.join("\n")}l.code=function(l){function n(){var l="// Generated by PEG.js v".concat(u,", https://pegjs.org/"),n=e.header;return"string"==typeof n?l+="\n\n"+n:Array.isArray(n)&&(l+="\n\n",n.forEach(function(n){l+="// "+n})),l}function r(){return e.trace&&i("DefaultTracer")?["{"," SyntaxError: peg$SyntaxError,"," DefaultTracer: peg$DefaultTracer,"," parse: peg$parse","}"].join("\n"):["{"," SyntaxError: peg$SyntaxError,"," parse: peg$parse","}"].join("\n")}return{bare:function(){return[n(),"(function() {",' "use strict";',"",s(l),"",s("return "+r()+";"),"})()"].join("\n")},commonjs:function(){var u=[],o=Object.keys(e.dependencies);return u.push([n(),"",'"use strict";',""].join("\n")),o.length>0&&(o.forEach(function(l){u.push("var "+l+' = require("'+t.stringEscape(e.dependencies[l])+'");')}),u.push("")),u.push([l,"","module.exports = "+r()+";",""].join("\n")),u.join("\n")},es:function(){var u=[],o=Object.keys(e.dependencies);return u.push(n(),""),o.length>0&&(o.forEach(function(l){u.push("import "+l+' from "'+t.stringEscape(e.dependencies[l])+'";')}),u.push("")),u.push(l,"","export "+(e.trace&&i("DefaultTracer")?["{"," peg$SyntaxError as SyntaxError,"," peg$DefaultTracer as DefaultTracer,"," peg$parse as parse","}"].join("\n"):["{"," peg$SyntaxError as SyntaxError,"," peg$parse as parse","}"].join("\n"))+";","","export default "+r()+";",""),u.join("\n")},amd:function(){var u=Object.keys(e.dependencies),o="["+u.map(function(l){return e.dependencies[l]}).map(function(l){return'"'.concat(t.stringEscape(l),'"')}).join(", ")+"]",i=u.join(", ");return[n(),"define("+o+", function("+i+") {",' "use strict";',"",s(l),"",s("return "+r()+";"),"});",""].join("\n")},globals:function(){return[n(),"(function(root) {",' "use strict";',"",s(l),"",s("root."+e.exportVar+" = "+r()+";"),"})(this);",""].join("\n")},umd:function(){var u=[],o=Object.keys(e.dependencies),i=o.map(function(l){return e.dependencies[l]}),a="["+i.map(function(l){return'"'.concat(t.stringEscape(l),'"')}).join(", ")+"]",c=i.map(function(l){return'require("'.concat(t.stringEscape(l),'")')}).join(", "),f=o.map(function(l){return"root."+l}).join(", "),p=o.join(", ");return u.push([n(),"(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+a+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+c+");"].join("\n")),null!==e.exportVar&&u.push([" } else {"," root."+e.exportVar+" = factory("+f+");"].join("\n")),u.push([" }","})(this, function("+p+") {",' "use strict";',"",s(l),"",s("return "+r()+";"),"});",""].join("\n")),u.join("\n")}}[e.format]()}(function(){var u=[];if(u.push(["function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," this.message = message;"," this.expected = expected;"," this.found = found;"," this.location = location;",' this.name = "SyntaxError";',""," // istanbul ignore next",' if (typeof Error.captureStackTrace === "function") {'," Error.captureStackTrace(this, peg$SyntaxError);"," }","}","","peg$subclass(peg$SyntaxError, Error);","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," },",""," not: function(expectation) {",' return "not " + describeExpectation(expectation.expected);'," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""].join("\n")),e.trace&&(i("DefaultTracer")?u.push(["function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," // istanbul ignore next"," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};",""].join("\n")):u.push(["var peg$FauxTracer = {"," trace: function(event) { }","};",""].join("\n"))),u.push(["function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};",""].join("\n")),"size"===e.optimize){var o="{ "+e.allowedStartRules.map(function(n){return n+": "+l.indexOfRule(n)}).join(", ")+" }",a=l.indexOfRule(e.allowedStartRules[0]);u.push([" var peg$startRuleIndices = "+o+";"," var peg$startRuleIndex = "+a+";"].join("\n"))}else{var y="{ "+e.allowedStartRules.map(function(l){return l+": peg$parse"+l}).join(", ")+" }",b="peg$parse"+e.allowedStartRules[0];u.push([" var peg$startRuleFunctions = "+y+";"," var peg$startRuleFunction = "+b+";"].join("\n"))}if(u.push(""),u.push(s(function(){function u(l){return'"'.concat(t.stringEscape(l),'"')}function r(l){return"/^["+(l.inverted?"^":"")+l.value.map(function(l){return Array.isArray(l)?t.regexpEscape(l[0])+"-"+t.regexpEscape(l[1]):t.regexpEscape(l)}).join("")+"]/"+(l.ignoreCase?"i":"")}function o(l){switch(l.type){case"rule":return'peg$otherExpectation("'.concat(t.stringEscape(l.value),'")');case"literal":return'peg$literalExpectation("'+t.stringEscape(l.value)+'", '+l.ignoreCase+")";case"class":return"peg$classExpectation(["+l.value.map(function(l){return Array.isArray(l)?'["'.concat(t.stringEscape(l[0]),'", "').concat(t.stringEscape(l[1]),'"]'):'"'.concat(t.stringEscape(l),'"')}).join(", ")+"], "+l.inverted+", "+l.ignoreCase+")";case"any":return"peg$anyExpectation()";default:n.fatal("Unknown expectation type (".concat(JSON.stringify(l),")"))}}function i(l){return"function(".concat(l.params.join(", "),") {").concat(l.body,"}")}return"size"===e.optimize?["var peg$literals = [",s(l.literals.map(u).join(",\n")),"];","var peg$regexps = [",s(l.classes.map(r).join(",\n")),"];","var peg$expectations = [",s(l.expectations.map(o).join(",\n")),"];","var peg$functions = [",s(l.functions.map(i).join(",\n")),"];","","var peg$bytecode = [",s(l.rules.map(function(l){return'peg$decode("'.concat(t.stringEscape(l.bytecode.map(function(l){return String.fromCharCode(l+32)}).join("")),'")')}).join(",\n")),"];"].join("\n"):l.literals.map(function(l,n){return"var "+f(n)+" = "+u(l)+";"}).concat("",l.classes.map(function(l,n){return"var "+p(n)+" = "+r(l)+";"})).concat("",l.expectations.map(function(l,n){return"var "+h(n)+" = "+o(l)+";"})).concat("",l.functions.map(function(l,n){return"var "+d(n)+" = "+i(l)+";"})).join("\n")}())),u.push([""," var peg$currPos = 0;"," var peg$savedPos = 0;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$expected = [];"," var peg$silentFails = 0;",""].join("\n")),e.cache&&u.push([" var peg$resultsCache = {};",""].join("\n")),e.trace){if("size"===e.optimize){var v="["+l.rules.map(function(l){return'"'.concat(t.stringEscape(l.name),'"')}).join(", ")+"]";u.push([" var peg$ruleNames = "+v+";",""].join("\n"))}i("DefaultTracer")?u.push([' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""].join("\n")):u.push([' var peg$tracer = "tracer" in options ? options.tracer : peg$FauxTracer;',""].join("\n"))}return u.push([" var peg$result;",""].join("\n")),"size"===e.optimize?u.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleIndices)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleIndex = peg$startRuleIndices[options.startRule];"," }"].join("\n")):u.push([' if ("startRule" in options) {'," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }"].join("\n")),i("text")&&u.push([""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }"].join("\n")),i("offset")&&u.push([""," function offset() {"," return peg$savedPos;"," }"].join("\n")),i("range")&&u.push([""," function range() {"," return [peg$savedPos, peg$currPos];"," }"].join("\n")),i("location")&&u.push([""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }"].join("\n")),i("expected")&&u.push([""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }"].join("\n")),i("error")&&u.push([""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }"].join("\n")),u.push([""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," p = pos - 1;"," while (!peg$posDetailsCache[p]) {"," p--;"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }","",i("filename")?' var peg$VALIDFILENAME = typeof options.filename === "string" && options.filename.length > 0;':""," function peg$computeLocation(startPos, endPos) {"," var loc = {};","",i("filename")?" if ( peg$VALIDFILENAME ) loc.filename = options.filename;":"",""," var startPosDetails = peg$computePosDetails(startPos);"," loc.start = {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," };",""," var endPosDetails = peg$computePosDetails(endPos);"," loc.end = {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," };",""," return loc;"," }",""," function peg$begin() {"," peg$expected.push({ pos: peg$currPos, variants: [] });"," }",""," function peg$expect(expected) {"," var top = peg$expected[peg$expected.length - 1];",""," if (peg$currPos < top.pos) { return; }",""," if (peg$currPos > top.pos) {"," top.pos = peg$currPos;"," top.variants = [];"," }",""," top.variants.push(expected);"," }",""," function peg$end(invert) {"," var expected = peg$expected.pop();"," var top = peg$expected[peg$expected.length - 1];"," var variants = expected.variants;",""," if (top.pos !== expected.pos) { return; }",""," if (invert) {"," variants = variants.map(function(e) {",' return e.type === "not" ? e.expected : { type: "not", expected: e };'," });"," }",""," Array.prototype.push.apply(top.variants, variants);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""," function peg$buildError() {"," var expected = peg$expected[0];"," var failPos = expected.pos;",""," return peg$buildStructuredError("," expected.variants,"," failPos < input.length ? input.charAt(failPos) : null,"," failPos < input.length"," ? peg$computeLocation(failPos, failPos + 1)"," : peg$computeLocation(failPos, failPos)"," );"," }",""].join("\n")),"size"===e.optimize?(u.push(s(function(){var l,n=[];function t(l,n){var e=n+3,t="bc[ip + "+(e-2)+"]",u="bc[ip + "+(e-1)+"]";return["ends.push(end);","ips.push(ip + "+e+" + "+t+" + "+u+");","","if ("+l+") {"," end = ip + "+e+" + "+t+";"," ip += "+e+";","} else {"," end = ip + "+e+" + "+t+" + "+u+";"," ip += "+e+" + "+t+";","}","","break;"].join("\n")}return n.push(["function peg$decode(s) {",' return s.split("").map(function(ch) { return ch.charCodeAt(0) - 32; });',"}","","function peg$parseRule(index) {"].join("\n")),e.trace?n.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var startPos = peg$currPos;"," var params, paramsLength, paramsN;"].join("\n")):n.push([" var bc = peg$bytecode[index];"," var ip = 0;"," var ips = [];"," var end = bc.length;"," var ends = [];"," var stack = [];"," var params, paramsLength, paramsN;"].join("\n")),n.push(s(g("peg$ruleNames[index]","index"))),n.push([" while (true) {"," while (ip < end) {"," switch (bc[ip]) {"," case "+r.PUSH_EMPTY_STRING+":"," stack.push('');"," ip++;"," break;",""," case "+r.PUSH_UNDEFINED+":"," stack.push(undefined);"," ip++;"," break;",""," case "+r.PUSH_NULL+":"," stack.push(null);"," ip++;"," break;",""," case "+r.PUSH_FAILED+":"," stack.push(peg$FAILED);"," ip++;"," break;",""," case "+r.PUSH_EMPTY_ARRAY+":"," stack.push([]);"," ip++;"," break;",""," case "+r.PUSH_CURR_POS+":"," stack.push(peg$currPos);"," ip++;"," break;",""," case "+r.POP+":"," stack.pop();"," ip++;"," break;",""," case "+r.POP_CURR_POS+":"," peg$currPos = stack.pop();"," ip++;"," break;",""," case "+r.POP_N+":"," stack.length -= bc[ip + 1];"," ip += 2;"," break;",""," case "+r.NIP+":"," stack.splice(-2, 1);"," ip++;"," break;",""," case "+r.APPEND+":"," stack[stack.length - 2].push(stack.pop());"," ip++;"," break;",""," case "+r.WRAP+":"," stack.push(stack.splice(stack.length - bc[ip + 1], bc[ip + 1]));"," ip += 2;"," break;",""," case "+r.TEXT+":"," stack.push(input.substring(stack.pop(), peg$currPos));"," ip++;"," break;",""," case "+r.PLUCK+":"," paramsLength = bc[ip + 2];"," paramsN = 3 + paramsLength",""," params = bc.slice(ip + 3, ip + paramsN);"," params = paramsLength === 1"," ? stack[stack.length - 1 - params[ 0 ]]"," : params.map(function(p) { return stack[stack.length - 1 - p]; });",""," stack.splice("," stack.length - bc[ip + 1],"," bc[ip + 1],"," params"," );",""," ip += paramsN;"," break;",""," case "+r.IF+":",c(t("stack[stack.length - 1]",0)),""," case "+r.IF_ERROR+":",c(t("stack[stack.length - 1] === peg$FAILED",0)),""," case "+r.IF_NOT_ERROR+":",c(t("stack[stack.length - 1] !== peg$FAILED",0)),""," case "+r.WHILE_NOT_ERROR+":",c((l="stack[stack.length - 1] !== peg$FAILED",["if ("+l+") {"," ends.push(end);"," ips.push(ip);",""," end = ip + 2 + bc[ip + 1];"," ip += 2;","} else {"," ip += 2 + bc[ip + 1];","}","","break;"].join("\n"))),""," case "+r.MATCH_ANY+":",c(t("input.length > peg$currPos",0)),""," case "+r.MATCH_STRING+":",c(t("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length) === peg$literals[bc[ip + 1]]",1)),""," case "+r.MATCH_STRING_IC+":",c(t("input.substr(peg$currPos, peg$literals[bc[ip + 1]].length).toLowerCase() === peg$literals[bc[ip + 1]]",1)),""," case "+r.MATCH_CLASS+":",c(t("peg$regexps[bc[ip + 1]].test(input.charAt(peg$currPos))",1)),""," case "+r.ACCEPT_N+":"," stack.push(input.substr(peg$currPos, bc[ip + 1]));"," peg$currPos += bc[ip + 1];"," ip += 2;"," break;",""," case "+r.ACCEPT_STRING+":"," stack.push(peg$literals[bc[ip + 1]]);"," peg$currPos += peg$literals[bc[ip + 1]].length;"," ip += 2;"," break;",""," case "+r.EXPECT+":"," rule$expects(peg$expectations[bc[ip + 1]]);"," ip += 2;"," break;",""," case "+r.LOAD_SAVED_POS+":"," peg$savedPos = stack[stack.length - 1 - bc[ip + 1]];"," ip += 2;"," break;",""," case "+r.UPDATE_SAVED_POS+":"," peg$savedPos = peg$currPos;"," ip++;"," break;",""," case "+r.CALL+":",c(["params = bc.slice(ip + 4, ip + 4 + bc[ip + 3])"," .map(function(p) { return stack[stack.length - 1 - p]; });","","stack.splice("," stack.length - bc[ip + 2],"," bc[ip + 2],"," peg$functions[bc[ip + 1]].apply(null, params)",");","","ip += 4 + bc[ip + 3];","break;"].join("\n")),""," case "+r.RULE+":"," stack.push(peg$parseRule(bc[ip + 1]));"," ip += 2;"," break;",""," case "+r.SILENT_FAILS_ON+":"," peg$silentFails++;"," ip++;"," break;",""," case "+r.SILENT_FAILS_OFF+":"," peg$silentFails--;"," ip++;"," break;",""," case "+r.EXPECT_NS_BEGIN+":"," peg$begin();"," ip++;"," break;",""," case "+r.EXPECT_NS_END+":"," peg$end(bc[ip + 1]);"," ip += 2;"," break;",""," // istanbul ignore next"," default:"," throw new Error(",' "Rule #" + index + "'+(e.trace?" ('\" + peg$ruleNames[ index ] + \"')":"")+', position " + ip + ": "',' + "Invalid opcode " + bc[ip] + "."'," );"," }"," }",""," if (ends.length > 0) {"," end = ends.pop();"," ip = ips.pop();"," } else {"," break;"," }"," }"].join("\n")),n.push(s(m("peg$ruleNames[index]","stack[0]"))),n.push("}"),n.join("\n")}())),u.push("")):l.rules.forEach(function(o){u.push(s(function(u){var o=[],i=[];function a(l){return l<0&&n.fatal("Rule '"+u.name+"': Var stack underflow: attempt to use var at index "+l),"s"+l}var c={sp:-1,maxSp:-1,push:function(l){var n=a(++this.sp)+" = "+l+";";return this.sp>this.maxSp&&(this.maxSp=this.sp),n},pop:function(l){if(void 0===l)return a(this.sp--);for(var n=Array(l),e=0;e0&&(c.sp=m,i=e(t.slice(v,v+g)),f=c.sp,v+=g,a!==f&&n.fatal("Rule '"+u.name+"', position "+p+": Branches of a condition can't move the stack pointer differently (before: "+m+", after then: "+a+", after else: "+f+").")),A.push("if ("+l+") {"),A.push(s(o)),g>0&&(A.push("} else {"),A.push(s(i))),A.push("}")}function x(){var l=t[v+4-1],n=d(t[v+1])+"("+t.slice(v+4,v+4+l).map(function(l){return c.index(l)}).join(", ")+")";c.pop(t[v+2]),A.push(c.push(n)),v+=4+l}for(;v peg$currPos",0);break;case r.MATCH_STRING:E(l.literals[t[v+1]].length>1?"input.substr(peg$currPos, "+l.literals[t[v+1]].length+") === "+f(t[v+1]):"input.charCodeAt(peg$currPos) === "+l.literals[t[v+1]].charCodeAt(0),1);break;case r.MATCH_STRING_IC:E("input.substr(peg$currPos, "+l.literals[t[v+1]].length+").toLowerCase() === "+f(t[v+1]),1);break;case r.MATCH_CLASS:E(p(t[v+1])+".test(input.charAt(peg$currPos))",1);break;case r.ACCEPT_N:A.push(c.push(t[v+1]>1?"input.substr(peg$currPos, "+t[v+1]+")":"input.charAt(peg$currPos)")),A.push(t[v+1]>1?"peg$currPos += "+t[v+1]+";":"peg$currPos++;"),v+=2;break;case r.ACCEPT_STRING:A.push(c.push(f(t[v+1]))),A.push(l.literals[t[v+1]].length>1?"peg$currPos += "+l.literals[t[v+1]].length+";":"peg$currPos++;"),v+=2;break;case r.EXPECT:A.push("rule$expects("+h(t[v+1])+");"),v+=2;break;case r.LOAD_SAVED_POS:A.push("peg$savedPos = "+c.index(t[v+1])+";"),v+=2;break;case r.UPDATE_SAVED_POS:A.push("peg$savedPos = peg$currPos;"),v++;break;case r.CALL:x();break;case r.RULE:A.push(c.push("peg$parse"+l.rules[t[v+1]].name+"()")),v+=2;break;case r.SILENT_FAILS_ON:A.push("peg$silentFails++;"),v++;break;case r.SILENT_FAILS_OFF:A.push("peg$silentFails--;"),v++;break;case r.EXPECT_NS_BEGIN:A.push("peg$begin();"),v++;break;case r.EXPECT_NS_END:A.push("peg$end("+(0!==t[v+1])+");"),v+=2;break;default:n.fatal("Rule '"+u.name+"', position "+v+": Invalid opcode "+t[v]+".")}return A.join("\n")}(u.bytecode);o.push("function peg$parse"+u.name+"() {"),e.trace&&o.push(" var startPos = peg$currPos;");for(var b=0;b<=c.maxSp;b++)i[b]=a(b);return o.push(" var "+i.join(", ")+";"),o.push(s(g('"'+t.stringEscape(u.name)+'"',l.indexOfRule(u.name)))),o.push(s(y)),o.push(s(m('"'+t.stringEscape(u.name)+'"',a(0)))),o.push("}"),o.join("\n")}(o))),u.push("")}),l.initializer&&(u.push(s(l.initializer.code)),u.push("")),u.push(" peg$begin();"),"size"===e.optimize?u.push(" peg$result = peg$parseRule(peg$startRuleIndex);"):u.push(" peg$result = peg$startRuleFunction();"),u.push([""," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$expect(peg$endExpectation());"," }",""," throw peg$buildError();"," }","}"].join("\n")),u.join("\n")}())}},function(l,n,e){"use strict";l.exports=function(l,n,e){var t=n.buildVisitor({rule_ref:function(l,n,e){l.name===n&&(l.name=e)}}),u=e.allowedStartRules,r=[];l.rules.forEach(function(n){var e;"rule"===(e=n).type&&"rule_ref"===e.expression.type&&(t(l,n.name,n.expression.name),u.indexOf(n.name)<0)||r.push(n)}),l.rules=r}},function(l,n,e){"use strict";var t=e(1),u=Object.prototype.hasOwnProperty;l.exports=function(l,n){var e;function r(l,n){e(l.expression,t.clone(n))}(e=n.buildVisitor({rule:function(l){e(l.expression,{})},choice:function(l,n){l.alternatives.forEach(function(l){e(l,t.clone(n))})},action:r,labeled:function(l,t){var r=l.label;if(r&&u.call(t,r)){var o=t[r].start;n.error('Label "'.concat(r,'" is already defined at line ').concat(o.line,", column ").concat(o.column,"."),l.location)}e(l.expression,t),r&&(t[r]=l.location)},text:r,simple_and:r,simple_not:r,optional:r,zero_or_more:r,one_or_more:r,group:r}))(l)}},function(l,n,e){"use strict";var t=Object.prototype.hasOwnProperty;l.exports=function(l,n){var e={};n.buildVisitor({rule:function(l){var u=l.name;if(t.call(e,u)){var r=e[u].start;n.error('Rule "'.concat(u,'" is already defined at line ').concat(r.line,", column ").concat(r.column,"."),l.location)}e[l.name]=l.location}})(l)}},function(l,n,e){"use strict";l.exports=function(l,n,e){var t={};function u(l){t[l.name||l]=!0}e.allowedStartRules.forEach(u),n.buildVisitor({rule_ref:u})(l),l.rules.forEach(function(l){!0!==t[l.name]&&n.warn('Rule "'.concat(l.name,'" is not referenced.'),l.location)})}},function(l,n,e){"use strict";l.exports=function(l,n){var e=[],t=n.buildVisitor({rule:function(l){e.push(l.name),t(l.expression),e.pop(l.name)},sequence:function(n){n.elements.every(function(n){return t(n),!l.alwaysConsumesOnSuccess(n)})},rule_ref:function(u){if(-1!==e.indexOf(u.name)){e.push(u.name);var r=e.join(" -> ");n.error("Possible infinite loop when parsing (left recursion: ".concat(r,")."),u.location)}t(l.findRule(u.name))}});t(l)}},function(l,n,e){"use strict";l.exports=function(l,n){n.buildVisitor({zero_or_more:function(e){l.alwaysConsumesOnSuccess(e.expression)||n.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",e.location)},one_or_more:function(e){l.alwaysConsumesOnSuccess(e.expression)||n.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input).",e.location)}})(l)}},function(l,n,e){"use strict";l.exports=function(l,n,e){n.buildVisitor({rule_ref:function(e){l.findRule(e.name)||n.error('Rule "'.concat(e.name,'" is not defined.'),e.location)}})(l),e.allowedStartRules.forEach(function(e){l.findRule(e)||n.error('Start rule "'.concat(e,'" is not defined.'))})}},function(l,n,e){"use strict";l.exports=function(l,n){var e;function t(l){return l.match=0,l.match}function u(l){return e(l.expression),l.match=1,l.match}function r(l){return l.match=e(l.expression),l.match}function o(l,n){for(var t=l.length,u=0,r=0,o=0;o0&&++u,i<0&&++r}return u===t?1:n?r===t?-1:0:r>0?-1:0}(e=n.buildVisitor({rule:function(l){var t,u=0;if(void 0===l.match){l.match=0;do{t=l.match,l.match=e(l.expression),++u>6&&n.error("Infinity cycle detected when trying to evaluate node match result",l.location)}while(t!==l.match)}return l.match},named:r,choice:function(l){return l.match=o(l.alternatives,!0),l.match},action:r,sequence:function(l){return l.match=o(l.elements,!1),l.match},labeled:r,text:r,simple_and:r,simple_not:function(l){return l.match=-e(l.expression),l.match},optional:u,zero_or_more:u,one_or_more:r,group:r,semantic_and:t,semantic_not:t,rule_ref:function(n){var t=l.findRule(n.name);return n.match=e(t),n.match},literal:function(l){return l.match=0===l.value.length?1:0,l.match},class:function(l){return l.match=0===l.parts.length?-1:0,l.match},any:t}))(l)}},function(l,n,e){"use strict";l.exports=function(l,n){n.buildVisitor({action:function(l){this.visit(l.expression,!0)},labeled:function(l,e){var t;!0===l.pick&&(!0===e&&n.error('"@" cannot be used with an action block.',l.location),("semantic_and"===(t=l.expression.type)||"semantic_not"===t)&&n.error('"@" cannot be used on a semantic predicate.',l.location),this.visit(l.expression))}})(l)}},function(l,n,e){"use strict";function t(l,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.opcodes=n.opcodes||o,this.parser=n.parser||i,this.passes=n.passes||{},this.visitor=n.visitor||u.visitor,this.vm=n.vm||a,"function"==typeof n.warn&&(this.warn=n.warn),"function"==typeof n.error&&(this.error=n.error),Object.defineProperty(this,"fatal",{value:s})}var n,e,r;return n=l,(e=[{key:"parse",value:function(l,n){return this.parser.parse(l,n)}},{key:"buildVisitor",value:function(l){return this.visitor.build(l)}},{key:"warn",value:function(l,n){}},{key:"error",value:function(l,n){s(l,n)}}])&&t(n.prototype,e),r&&t(n,r),l}();l.exports=c},function(l,n,e){"use strict";l.exports={PUSH_EMPTY_STRING:0,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:41,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CLASS:20,ACCEPT_N:21,ACCEPT_STRING:22,EXPECT:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29,EXPECT_NS_BEGIN:38,EXPECT_NS_END:39}},function(l,n,e){(function(l){var t=void 0!==l&&l||"undefined"!=typeof self&&self||window,u=Function.prototype.apply;function r(l,n){this._id=l,this._clearFn=n}n.setTimeout=function(){return new r(u.call(setTimeout,t,arguments),clearTimeout)},n.setInterval=function(){return new r(u.call(setInterval,t,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(l){l&&l.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(t,this._id)},n.enroll=function(l,n){clearTimeout(l._idleTimeoutId),l._idleTimeout=n},n.unenroll=function(l){clearTimeout(l._idleTimeoutId),l._idleTimeout=-1},n._unrefActive=n.active=function(l){clearTimeout(l._idleTimeoutId);var n=l._idleTimeout;n>=0&&(l._idleTimeoutId=setTimeout(function(){l._onTimeout&&l._onTimeout()},n))},e(54),n.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==l&&l.setImmediate||this&&this.setImmediate,n.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==l&&l.clearImmediate||this&&this.clearImmediate}).call(this,e(15))},function(l,n,e){(function(n){var e;e=function(){"use strict";var l="function"==typeof Promise,e="object"==typeof self?self:n,t="undefined"!=typeof Symbol,u="undefined"!=typeof Map,r="undefined"!=typeof Set,o="undefined"!=typeof WeakMap,i="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,s=t&&void 0!==Symbol.iterator,c=t&&void 0!==Symbol.toStringTag,f=r&&"function"==typeof Set.prototype.entries,p=u&&"function"==typeof Map.prototype.entries,h=f&&Object.getPrototypeOf((new Set).entries()),d=p&&Object.getPrototypeOf((new Map).entries()),g=s&&"function"==typeof Array.prototype[Symbol.iterator],m=g&&Object.getPrototypeOf([][Symbol.iterator]()),y=s&&"function"==typeof String.prototype[Symbol.iterator],b=y&&Object.getPrototypeOf(""[Symbol.iterator]()),v=8,w=-1;return function(n){var t=typeof n;if("object"!==t)return t;if(null===n)return"null";if(n===e)return"global";if(Array.isArray(n)&&(!1===c||!(Symbol.toStringTag in n)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&n===window.location)return"Location";if("object"==typeof window.document&&n===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&n===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&n===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&n instanceof window.HTMLElement){if("BLOCKQUOTE"===n.tagName)return"HTMLQuoteElement";if("TD"===n.tagName)return"HTMLTableDataCellElement";if("TH"===n.tagName)return"HTMLTableHeaderCellElement"}}var s=c&&n[Symbol.toStringTag];if("string"==typeof s)return s;var f=Object.getPrototypeOf(n);return f===RegExp.prototype?"RegExp":f===Date.prototype?"Date":l&&f===Promise.prototype?"Promise":r&&f===Set.prototype?"Set":u&&f===Map.prototype?"Map":i&&f===WeakSet.prototype?"WeakSet":o&&f===WeakMap.prototype?"WeakMap":a&&f===DataView.prototype?"DataView":u&&f===d?"Map Iterator":r&&f===h?"Set Iterator":g&&f===m?"Array Iterator":y&&f===b?"String Iterator":null===f?"Object":Object.prototype.toString.call(n).slice(v,w)}},l.exports=e()}).call(this,e(15))},function(l,n,e){var t=e(46),u=e(47),r=e(62),o=e(8);l.exports=function(l,n,e,t){return a({showHidden:n,seen:[],stylize:function(l){return l}},l,void 0===e?2:e)};var i=function(l){return"object"==typeof HTMLElement?l instanceof HTMLElement:l&&"object"==typeof l&&"nodeType"in l&&1===l.nodeType&&"string"==typeof l.nodeName};function a(l,e,g){if(e&&"function"==typeof e.inspect&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var m=e.inspect(g,l);return"string"!=typeof m&&(m=a(l,m,g)),m}var y=function(l,n){switch(typeof n){case"undefined":return l.stylize("undefined","undefined");case"string":var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string");case"number":return 0===n&&1/n==-1/0?l.stylize("-0","number"):l.stylize(""+n,"number");case"boolean":return l.stylize(""+n,"boolean");case"symbol":return l.stylize(n.toString(),"symbol")}if(null===n)return l.stylize("null","null")}(l,e);if(y)return y;if(i(e)){if("outerHTML"in e)return e.outerHTML;try{if(document.xmlVersion)return(new XMLSerializer).serializeToString(e);var b=document.createElementNS("http://www.w3.org/1999/xhtml","_");b.appendChild(e.cloneNode(!1));var v=b.innerHTML.replace("><",">"+e.innerHTML+"<");return b.innerHTML="",v}catch(l){}}var w,A,E=r(e),x=l.showHidden?u(e):E;if(0===x.length||h(e)&&(1===x.length&&"stack"===x[0]||2===x.length&&"description"===x[0]&&"stack"===x[1])){if("function"==typeof e)return A=(w=t(e))?": "+w:"",l.stylize("[Function"+A+"]","special");if(f(e))return l.stylize(RegExp.prototype.toString.call(e),"regexp");if(p(e))return l.stylize(Date.prototype.toUTCString.call(e),"date");if(h(e))return s(e)}var C,_,T="",S=!1,k=!1,F=["{","}"];if("object"==typeof(C=e)&&/\w+Array]$/.test(d(C))&&(k=!0,F=["[","]"]),function(l){return Array.isArray(l)||"object"==typeof l&&"[object Array]"===d(l)}(e)&&(S=!0,F=["[","]"]),"function"==typeof e&&(T=" [Function"+(A=(w=t(e))?": "+w:"")+"]"),f(e)&&(T=" "+RegExp.prototype.toString.call(e)),p(e)&&(T=" "+Date.prototype.toUTCString.call(e)),h(e))return s(e);if(0===x.length&&(!S||0==e.length))return F[0]+T+F[1];if(g<0)return f(e)?l.stylize(RegExp.prototype.toString.call(e),"regexp"):l.stylize("[Object]","special");if(l.seen.push(e),S)_=function(l,n,e,t,u){for(var r=[],o=0,i=n.length;o=o.truncateThreshold-7){n+="...";break}n+=l[e]+", "}-1!==(n+=" ]").indexOf(", ]")&&(n=n.replace(", ]"," ]"));return n}(e);_=x.map(function(n){return c(l,e,g,E,n,S)})}return l.seen.pop(),function(l,n,e){if(l.reduce(function(l,n){return l+n.length+1},0)>60)return e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1];return e[0]+n+" "+l.join(", ")+" "+e[1]}(_,T,F)}function s(l){return"["+Error.prototype.toString.call(l)+"]"}function c(l,n,e,t,u,r){var o,i,s=Object.getOwnPropertyDescriptor(n,u);if(s&&(s.get?i=s.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):s.set&&(i=l.stylize("[Setter]","special"))),t.indexOf(u)<0&&(o="["+u+"]"),i||(l.seen.indexOf(n[u])<0?(i=a(l,n[u],null===e?null:e-1)).indexOf("\n")>-1&&(i=r?i.split("\n").map(function(l){return" "+l}).join("\n").substr(2):"\n"+i.split("\n").map(function(l){return" "+l}).join("\n")):i=l.stylize("[Circular]","special")),void 0===o){if(r&&u.match(/^\d+$/))return i;(o=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=l.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=l.stylize(o,"string"))}return o+": "+i}function f(l){return"object"==typeof l&&"[object RegExp]"===d(l)}function p(l){return"object"==typeof l&&"[object Date]"===d(l)}function h(l){return"object"==typeof l&&"[object Error]"===d(l)}function d(l){return Object.prototype.toString.call(l)}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),function(global,setImmediate,clearImmediate){__webpack_require__.d(__webpack_exports__,"serverPrototype",function(){return _serverPrototype}),__webpack_require__.d(__webpack_exports__,"getFakes",function(){return _getFakes}),__webpack_require__.d(__webpack_exports__,"getRestorers",function(){return _getRestorers}),__webpack_require__.d(__webpack_exports__,"createStubInstance",function(){return _createStubInstance}),__webpack_require__.d(__webpack_exports__,"inject",function(){return _inject}),__webpack_require__.d(__webpack_exports__,"mock",function(){return _mock}),__webpack_require__.d(__webpack_exports__,"reset",function(){return _reset}),__webpack_require__.d(__webpack_exports__,"resetBehavior",function(){return _resetBehavior}),__webpack_require__.d(__webpack_exports__,"resetHistory",function(){return _resetHistory}),__webpack_require__.d(__webpack_exports__,"restore",function(){return _restore}),__webpack_require__.d(__webpack_exports__,"restoreContext",function(){return _restoreContext}),__webpack_require__.d(__webpack_exports__,"replace",function(){return _replace}),__webpack_require__.d(__webpack_exports__,"replaceGetter",function(){return _replaceGetter}),__webpack_require__.d(__webpack_exports__,"replaceSetter",function(){return _replaceSetter}),__webpack_require__.d(__webpack_exports__,"spy",function(){return _spy}),__webpack_require__.d(__webpack_exports__,"stub",function(){return _stub}),__webpack_require__.d(__webpack_exports__,"fake",function(){return _fake}),__webpack_require__.d(__webpack_exports__,"useFakeTimers",function(){return _useFakeTimers}),__webpack_require__.d(__webpack_exports__,"verify",function(){return _verify}),__webpack_require__.d(__webpack_exports__,"verifyAndRestore",function(){return _verifyAndRestore}),__webpack_require__.d(__webpack_exports__,"useFakeServer",function(){return _useFakeServer}),__webpack_require__.d(__webpack_exports__,"useFakeXMLHttpRequest",function(){return _useFakeXMLHttpRequest}),__webpack_require__.d(__webpack_exports__,"usingPromise",function(){return _usingPromise}),__webpack_require__.d(__webpack_exports__,"sandbox",function(){return _sandbox}),__webpack_require__.d(__webpack_exports__,"createSandbox",function(){return _createSandbox}),__webpack_require__.d(__webpack_exports__,"assert",function(){return _assert}),__webpack_require__.d(__webpack_exports__,"match",function(){return _match}),__webpack_require__.d(__webpack_exports__,"spyCall",function(){return _spyCall}),__webpack_require__.d(__webpack_exports__,"expectation",function(){return _expectation}),__webpack_require__.d(__webpack_exports__,"defaultConfig",function(){return _defaultConfig}),__webpack_require__.d(__webpack_exports__,"setFormatter",function(){return _setFormatter}),__webpack_require__.d(__webpack_exports__,"timers",function(){return _timers}),__webpack_require__.d(__webpack_exports__,"xhr",function(){return _xhr}),__webpack_require__.d(__webpack_exports__,"FakeXMLHttpRequest",function(){return _FakeXMLHttpRequest}),__webpack_require__.d(__webpack_exports__,"fakeServer",function(){return _fakeServer}),__webpack_require__.d(__webpack_exports__,"fakeServerWithClock",function(){return _fakeServerWithClock}),__webpack_require__.d(__webpack_exports__,"createFakeServer",function(){return _createFakeServer}),__webpack_require__.d(__webpack_exports__,"createFakeServerWithClock",function(){return _createFakeServerWithClock}),__webpack_require__.d(__webpack_exports__,"addBehavior",function(){return _addBehavior});var call=Function.call,copyPrototype=function(l){return Object.getOwnPropertyNames(l).reduce(function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=call.bind(l[e])),n},Object.create(null))},array=copyPrototype(Array.prototype),every=array.every;function hasCallsLeft(l,n){return void 0===l[n.id]&&(l[n.id]=0),l[n.id]1?arguments:l;return every(n,checkAdjacentCalls.bind(null,{}))},functionName=function(l){return l.displayName||l.name||(String(l).match(/function ([^\s(]+)/)||[])[1]},className=function(l){return l.constructor&&l.constructor.name||"function"==typeof l.constructor&&functionName(l.constructor)||null},every$1=function(l,n){var e=!0;try{l.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch(l){e=!1}return e},sort=array.sort,slice=array.slice;function comparator(l,n){var e=l.getCall(0),t=n.getCall(0);return(e&&e.callId||-1)<(t&&t.callId||-1)?-1:1}var orderByFirstCall=function(l){return sort(slice(l),comparator)},_function=copyPrototype(Function.prototype),object=copyPrototype(Object.prototype),string=copyPrototype(String.prototype),prototypes={array:array,function:_function,object:object,string:string},commonjsGlobal="undefined"!=typeof window?window:void 0!==global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function unwrapExports(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}function createCommonjsModule(l,n){return l(n={exports:{}},n.exports),n.exports}var typeDetect=createCommonjsModule(function(l,n){var e,t,u,r,o,i,a,s,c,f,p,h,d,g,m,y,b,v,w,A;l.exports=(e="function"==typeof Promise,t="object"==typeof self?self:commonjsGlobal,u="undefined"!=typeof Symbol,r="undefined"!=typeof Map,o="undefined"!=typeof Set,i="undefined"!=typeof WeakMap,a="undefined"!=typeof WeakSet,s="undefined"!=typeof DataView,c=u&&void 0!==Symbol.iterator,f=u&&void 0!==Symbol.toStringTag,p=o&&"function"==typeof Set.prototype.entries,h=r&&"function"==typeof Map.prototype.entries,d=p&&Object.getPrototypeOf((new Set).entries()),g=h&&Object.getPrototypeOf((new Map).entries()),m=c&&"function"==typeof Array.prototype[Symbol.iterator],y=m&&Object.getPrototypeOf([][Symbol.iterator]()),b=c&&"function"==typeof String.prototype[Symbol.iterator],v=b&&Object.getPrototypeOf(""[Symbol.iterator]()),w=8,A=-1,function(l){var n=typeof l;if("object"!==n)return n;if(null===l)return"null";if(l===t)return"global";if(Array.isArray(l)&&(!1===f||!(Symbol.toStringTag in l)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&l===window.location)return"Location";if("object"==typeof window.document&&l===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&l===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&l===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&l instanceof window.HTMLElement){if("BLOCKQUOTE"===l.tagName)return"HTMLQuoteElement";if("TD"===l.tagName)return"HTMLTableDataCellElement";if("TH"===l.tagName)return"HTMLTableHeaderCellElement"}}var u=f&&l[Symbol.toStringTag];if("string"==typeof u)return u;var c=Object.getPrototypeOf(l);return c===RegExp.prototype?"RegExp":c===Date.prototype?"Date":e&&c===Promise.prototype?"Promise":o&&c===Set.prototype?"Set":r&&c===Map.prototype?"Map":a&&c===WeakSet.prototype?"WeakSet":i&&c===WeakMap.prototype?"WeakMap":s&&c===DataView.prototype?"DataView":r&&c===g?"Map Iterator":o&&c===d?"Set Iterator":m&&c===y?"Array Iterator":b&&c===v?"String Iterator":null===c?"Object":Object.prototype.toString.call(l).slice(w,A)})}),typeOf=function(l){return typeDetect(l).toLowerCase()};function valueToString(l){return l&&l.toString?l.toString():String(l)}var valueToString_1=valueToString,lib={calledInOrder:calledInOrder,className:className,every:every$1,functionName:functionName,orderByFirstCall:orderByFirstCall,prototypes:prototypes,typeOf:typeOf,valueToString:valueToString_1},arrayProto=lib.prototypes.array,hasOwnProperty=lib.prototypes.object.hasOwnProperty,join=arrayProto.join,push=arrayProto.push,slice$1=arrayProto.slice,hasDontEnumBug=function(){var l={constructor:function(){return"0"},toString:function(){return"1"},valueOf:function(){return"2"},toLocaleString:function(){return"3"},prototype:function(){return"4"},isPrototypeOf:function(){return"5"},propertyIsEnumerable:function(){return"6"},hasOwnProperty:function(){return"7"},length:function(){return"8"},unique:function(){return"9"}},n=[];for(var e in l)hasOwnProperty(l,e)&&push(n,l[e]());return"0123456789"!==join(n,"")}();function extendCommon(l,n,e){var t,u,r;for(u=0;u=0)return n[t];t===useLeftMostCallback&&(e=n),t===useRightMostCallback&&(e=reverse(slice$2(n)));for(var u=l.callArgProp,r=0,o=e.length;r0&&(t+=" Received ["+join$1(e,", ")+"]"),t):"argument at index "+l.callArgAt+" is not a function: "+n}function ensureArgs(l,n,e){var t=n[l.replace(/sArg/,"ArgAt")];if(t>=e.length)throw new TypeError(l+" failed: "+(t+1)+" arguments required but only "+e.length+" present")}function callCallback(l,n){if("number"==typeof l.callArgAt){ensureArgs("callsArg",l,n);var e=getCallback(l,n);if("function"!=typeof e)throw new TypeError(getCallbackError(l,e,n));if(!l.callbackAsync)return e.apply(l.callbackContext,l.callbackArguments);nextTick$1(function(){e.apply(l.callbackContext,l.callbackArguments)})}}var proto={create:function(l){var n=extend({},proto);return delete n.create,delete n.addBehavior,delete n.createBehavior,n.stub=l,l.defaultBehavior&&l.defaultBehavior.promiseLibrary&&(n.promiseLibrary=l.defaultBehavior.promiseLibrary),n},isPresent:function(){return"number"==typeof this.callArgAt||this.exception||this.exceptionCreator||"number"==typeof this.returnArgAt||this.returnThis||"number"==typeof this.resolveArgAt||this.resolveThis||"number"==typeof this.throwArgAt||this.fakeFn||this.returnValueDefined},invoke:function(l,n){var e=callCallback(this,n);if(this.exception)throw this.exception;if(this.exceptionCreator)throw this.exception=this.exceptionCreator(),this.exceptionCreator=void 0,this.exception;if("number"==typeof this.returnArgAt)return ensureArgs("returnsArg",this,n),n[this.returnArgAt];if(this.returnThis)return l;if("number"==typeof this.throwArgAt)throw ensureArgs("throwsArg",this,n),n[this.throwArgAt];return this.fakeFn?this.fakeFn.apply(l,n):"number"==typeof this.resolveArgAt?(ensureArgs("resolvesArg",this,n),(this.promiseLibrary||Promise).resolve(n[this.resolveArgAt])):this.resolveThis?(this.promiseLibrary||Promise).resolve(l):this.resolve?(this.promiseLibrary||Promise).resolve(this.returnValue):this.reject?(this.promiseLibrary||Promise).reject(this.returnValue):this.callsThrough?this.stub.wrappedMethod.apply(l,n):void 0!==this.returnValue?this.returnValue:"number"==typeof this.callArgAt?e:this.returnValue},onCall:function(l){return this.stub.onCall(l)},onFirstCall:function(){return this.stub.onFirstCall()},onSecondCall:function(){return this.stub.onSecondCall()},onThirdCall:function(){return this.stub.onThirdCall()},withArgs:function(){throw new Error('Defining a stub by invoking "stub.onCall(...).withArgs(...)" is not supported. Use "stub.withArgs(...).onCall(...)" to define sequential behavior for calls with certain arguments.')}};function createBehavior(l){return function(){return this.defaultBehavior=this.defaultBehavior||proto.create(this),this.defaultBehavior[l].apply(this.defaultBehavior,arguments),this}}function addBehavior(l,n,e){proto[n]=function(){return e.apply(this,concat([this],slice$2(arguments))),this.stub||this},l[n]=createBehavior(n)}proto.addBehavior=addBehavior,proto.createBehavior=createBehavior;var asyncBehaviors=exportAsyncBehaviors(proto),behavior=extend({},proto,asyncBehaviors),forEach=lib.prototypes.array.forEach;function walkInternal(l,n,e,t,u){var r,o;if("function"==typeof Object.getOwnPropertyNames)forEach(Object.getOwnPropertyNames(l),function(r){if(!0!==u[r]){u[r]=!0;var o="function"==typeof Object.getOwnPropertyDescriptor(l,r).get?t:l;n.call(e,r,o)}}),(r=Object.getPrototypeOf(l))&&walkInternal(r,n,e,t,u);else for(o in l)n.call(e,l[o],o,l)}var walk=function(l,n,e){return walkInternal(l,n,e,l,{})},getPropertyDescriptor=function(l,n){for(var e,t=l;t&&!(e=Object.getOwnPropertyDescriptor(t,n));)t=Object.getPrototypeOf(t);return e},hasOwnProperty$1=lib.prototypes.object.hasOwnProperty,push$1=lib.prototypes.array.push;function collectMethod(l,n,e,t){"function"==typeof getPropertyDescriptor(t,e).value&&hasOwnProperty$1(n,e)&&push$1(l,n[e])}function collectOwnMethods(l){var n=[];return walk(l,collectMethod.bind(null,n,l)),n}var collectOwnMethods_1=collectOwnMethods,isEsModule=function(l){return l&&"undefined"!=typeof Symbol&&"Module"===l[Symbol.toStringTag]&&Object.isSealed(l)};function isPropertyConfigurable(l,n){var e=getPropertyDescriptor(l,n);return!e||e.configurable}var isPropertyConfigurable_1=isPropertyConfigurable;function isNonExistentOwnProperty(l,n){return l&&void 0!==n&&!(n in l)}var isNonExistentOwnProperty_1=isNonExistentOwnProperty;function isNaN$1(l){return"number"==typeof l&&l!==l}var isNan=isNaN$1;function isNegZero(l){return 0===l&&1/l==-1/0}var isNegZero_1=isNegZero;function identical(l,n){return!!(l===n||isNan(l)&&isNan(n))&&(0!==l||isNegZero_1(l)===isNegZero_1(n))}var identical_1=identical,o=Object.prototype;function getClass(l){return o.toString.call(l).split(/[ \]]/)[1]}var getClass_1=getClass;function isArguments(l){if("Arguments"===getClass_1(l))return!0;if("object"!=typeof l||"number"!=typeof l.length||"Array"===getClass_1(l))return!1;if("function"==typeof l.callee)return!0;try{l[l.length]=6,delete l[l.length]}catch(l){return!0}return!1}var isArguments_1=isArguments,div="undefined"!=typeof document&&document.createElement("div");function isElement(l){if(!l||1!==l.nodeType||!div)return!1;try{l.appendChild(div),l.removeChild(div)}catch(l){return!1}return!0}var isElement_1=isElement;function isDate(l){return l instanceof Date}var isDate_1=isDate;function isObject(l){return!("object"!=typeof l||null===l||l instanceof Boolean||l instanceof Date||l instanceof Error||l instanceof Number||l instanceof RegExp||l instanceof String)}var isObject_1=isObject;function isSet(l){return"undefined"!=typeof Set&&l instanceof Set||!1}var isSet_1=isSet;function isSubset(l,n,e){var t=!0;return l.forEach(function(l){var u=!1;n.forEach(function(n){e(n,l)&&(u=!0)}),t=t&&u}),t}var isSubset_1=isSubset,re=/function (\w+)\s*\(/;function getClassName(l){if(l.constructor&&"name"in l.constructor)return l.constructor.name;if("function"==typeof l.constructor){var n=l.constructor.toString().match(re);if(n.length>1)return n[1]}return null}var getClassName_1=getClassName,every$2=Array.prototype.every,getTime=Date.prototype.getTime,hasOwnProperty$2=Object.prototype.hasOwnProperty,indexOf=Array.prototype.indexOf,keys=Object.keys;function deepEqualCyclic(l,n,e){var t=[],u=[],r=[],o=[],i={};return function l(n,a,s,c){if(e&&e.isMatcher(a))return e.isMatcher(n)?n===a:a.test(n);var f=typeof n,p=typeof a;if(n===a||isNan(n)||isNan(a)||null==n||null==a||"object"!==f||"object"!==p)return identical_1(n,a);if(isElement_1(n)||isElement_1(a))return!1;var h=isDate_1(n),d=isDate_1(a);if((h||d)&&(!h||!d||getTime.call(n)!==getTime.call(a)))return!1;if(n instanceof RegExp&&a instanceof RegExp&&n.toString()!==a.toString())return!1;if(n instanceof Error&&a instanceof Error)return n===a;var g=getClass_1(n),m=getClass_1(a),y=keys(n),b=keys(a),v=getClassName_1(n),w=getClassName_1(a);if(isArguments_1(n)||isArguments_1(a)){if(n.length!==a.length)return!1}else if(f!==p||g!==m||y.length!==b.length||v&&w&&v!==w)return!1;return isSet_1(n)||isSet_1(a)?!(!isSet_1(n)||!isSet_1(a)||n.size!==a.size)&&isSubset_1(n,a,l):every$2.call(y,function(e){if(!hasOwnProperty$2.call(a,e))return!1;var f=n[e],p=a[e],h=isObject_1(f),d=isObject_1(p),g=h?indexOf.call(t,f):-1,m=d?indexOf.call(u,p):-1,y=-1!==g?r[g]:s+"["+JSON.stringify(e)+"]",b=-1!==m?o[m]:c+"["+JSON.stringify(e)+"]",v=y+b;return!!i[v]||(-1===g&&h&&(t.push(f),r.push(y)),-1===m&&d&&(u.push(p),o.push(b)),h&&d&&(i[v]=!0),l(f,p,y,b))})}(l,n,"$1","$2")}deepEqualCyclic.use=function(l){return function(n,e){return deepEqualCyclic(n,e,l)}};var deepEqual=deepEqualCyclic,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",INFINITY=1/0,funcTag="[object Function]",genTag="[object GeneratorFunction]",symbolTag="[object Symbol]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,freeGlobal="object"==typeof commonjsGlobal&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root$1=freeGlobal||freeSelf||Function("return this")();function getValue(l,n){return null==l?void 0:l[n]}function isHostObject(l){var n=!1;if(null!=l&&"function"!=typeof l.toString)try{n=!!(l+"")}catch(l){}return n}var arrayProto$3=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root$1["__core-js_shared__"],maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""),uid?"Symbol(src)_1."+uid:""),uid,funcToString=funcProto.toString,hasOwnProperty$3=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty$3).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol$1=root$1.Symbol,splice=arrayProto$3.splice,Map$1=getNative(root$1,"Map"),nativeCreate=getNative(Object,"create"),symbolProto=Symbol$1?Symbol$1.prototype:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;function Hash(l){var n=-1,e=l?l.length:0;for(this.clear();++n-1}function listCacheSet(l,n){var e=this.__data__,t=assocIndexOf(e,l);return t<0?e.push([l,n]):e[t][1]=n,this}function MapCache(l){var n=-1,e=l?l.length:0;for(this.clear();++n=u)return!1;if(!e(l[t+r],n[r]))return!1}return!0}return!1}function match$1(l,n){if(n&&"function"==typeof n.test)return n.test(l);if("function"==typeof n)return!0===n(l);if("string"==typeof n)return n=n.toLowerCase(),("string"==typeof l||!!l)&&String(l).toLowerCase().indexOf(n)>=0;if("number"==typeof n)return n===l;if("boolean"==typeof n)return n===l;if(void 0===n)return void 0===l;if(null===n)return null===l;if(null===l)return!1;if(isSet_1(l))return isSubset_1(n,l,match$1);if("Array"===getClass_1(l)&&"Array"===getClass_1(n))return arrayContains(l,n,match$1);if(isDate_1(n))return isDate_1(l)&&l.getTime()===n.getTime();if(n&&"object"==typeof n){if(n===l)return!0;if("object"!=typeof l)return!1;var e;for(e in n){var t=l[e];if(void 0===t&&"function"==typeof l.getAttribute&&(t=l.getAttribute(e)),null===n[e]||void 0===n[e]){if(t!==n[e])return!1}else if(void 0===t||!deepEqual$2(t,n[e]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")}Object.keys(matcher_1).forEach(function(l){match$1[l]=matcher_1[l]});var match_1=match$1,deepEqualCyclic$1=deepEqual.use(match_1),samsam={createMatcher:matcher_1,deepEqual:deepEqualCyclic$1,isArguments:isArguments_1,isElement:isElement_1,isNegZero:isNegZero_1,identical:identical_1,match:match_1},array$1=[null,"once","twice","thrice"],timesInWords=function(l){return array$1[l]||(l||0)+" times"},formatio={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},specialObjects=[];function functionName$3(l){if(!l)return"";if(l.displayName)return l.displayName;if(l.name)return l.name;var n=l.toString().match(/function\s+([^\(]+)/m);return n&&n[1]||""}function constructorName(l,n){var e,t,u=functionName$3(n&&n.constructor),r=l.excludeConstructors||formatio.excludeConstructors||[];for(e=0,t=r.length;e0?Math.min(this.limitChildrenCount,l.length):l.length,t=0;t0?Math.min(this.limitChildrenCount,c.length):c.length,o=0;o80?h+"{\n "+d+s.join(",\n "+d)+"\n"+d+"}":h+"{ "+s.join(", ")+" }"},ascii.element=function(l){var n,e,t,u,r,o=l.tagName.toLowerCase(),i=l.attributes,a=[];for(t=0,u=i.length;t0?" ":""),c=l.innerHTML||"";return c.length>20&&(c=c.substr(0,20)+"[...]"),(s+a.join(" ")+">"+c+"").replace(/ contentEditable="inherit"/,"")},Formatio.prototype={functionName:functionName$3,configure:function(l){return new Formatio(l)},constructorName:function(l){return constructorName(this,l)},ascii:function(l,n,e){return ascii(this,l,n,e)}};var formatio_1=Formatio.prototype,formatter=formatio_1.configure({quoteStrings:!1,limitChildrenCount:250}),customFormatter;function format(){return customFormatter?customFormatter.apply(null,arguments):formatter.ascii.apply(formatter,arguments)}format.setFormatter=function(l){if("function"!=typeof l)throw new Error("format.setFormatter must be called with a function");customFormatter=l};var format_1=format,arrayProto$5=lib.prototypes.array,calledInOrder$1=lib.calledInOrder,createMatcher=samsam.createMatcher,orderByFirstCall$1=lib.orderByFirstCall,stringSlice=lib.prototypes.string.slice,arraySlice=arrayProto$5.slice,concat$1=arrayProto$5.concat,forEach$1=arrayProto$5.forEach,join$3=arrayProto$5.join,splice$1=arrayProto$5.splice,assert;function verifyIsStub(){var l=arraySlice(arguments);forEach$1(l,function(l){l||assert.fail("fake is not a spy"),l.proxy&&l.proxy.isSinonProxy?verifyIsStub(l.proxy):("function"!=typeof l&&assert.fail(l+" is not a function"),"function"!=typeof l.getCall&&assert.fail(l+" is not stubbed"))})}function verifyIsValidAssertion(l,n){switch(l){case"notCalled":case"called":case"calledOnce":case"calledTwice":case"calledThrice":0!==n.length&&assert.fail(l+" takes 1 argument but was called with "+(n.length+1)+" arguments")}}function failAssertion(l,n){var e=l||commonjsGlobal;(e.fail||assert.fail).call(e,n)}function mirrorPropAsAssertion(l,n,e){var t=e,u=n;2===arguments.length&&(t=n,u=l),assert[l]=function(n){verifyIsStub(n);var e=arraySlice(arguments,1);verifyIsValidAssertion(l,e),("function"==typeof u?!u(n):"function"==typeof n[u]?!n[u].apply(n,e):!n[u])?failAssertion(this,(n.printf||n.proxy.printf).apply(n,concat$1([t],e))):assert.pass(l)}}function exposedName(l,n){return!l||/^fail/.test(n)?n:l+stringSlice(n,0,1).toUpperCase()+stringSlice(n,1)}assert={failException:"AssertError",fail:function(l){var n=new Error(l);throw n.name=this.failException||assert.failException,n},pass:function(){},callOrder:function(){verifyIsStub.apply(null,arguments);var l="",n="";if(calledInOrder$1(arguments))assert.pass("callOrder");else{try{l=join$3(arguments,", ");for(var e=arraySlice(arguments),t=e.length;t;)e[--t].called||splice$1(e,t,1);n=join$3(orderByFirstCall$1(e),", ")}catch(l){}failAssertion(this,"expected "+l+" to be called in order but were called as "+n)}},callCount:function(l,n){if(verifyIsStub(l),l.callCount!==n){var e="expected %n to be called "+timesInWords(n)+" but was called %c%C";failAssertion(this,l.printf(e))}else assert.pass("callCount")},expose:function(l,n){if(!l)throw new TypeError("target is null or undefined");var e=n||{},t=void 0===e.prefix?"assert":e.prefix,u=void 0===e.includeFail||Boolean(e.includeFail),r=this;return forEach$1(Object.keys(r),function(n){"expose"===n||!u&&/^(fail)/.test(n)||(l[exposedName(t,n)]=r[n])}),l},match:function(l,n){if(createMatcher(n).test(l))assert.pass("match");else{var e=["expected value to match"," expected = "+format_1(n)," actual = "+format_1(l)];failAssertion(this,join$3(e,"\n"))}}},mirrorPropAsAssertion("called","expected %n to have been called at least once but was never called"),mirrorPropAsAssertion("notCalled",function(l){return!l.called},"expected %n to not have been called but was called %c%C"),mirrorPropAsAssertion("calledOnce","expected %n to be called once but was called %c%C"),mirrorPropAsAssertion("calledTwice","expected %n to be called twice but was called %c%C"),mirrorPropAsAssertion("calledThrice","expected %n to be called thrice but was called %c%C"),mirrorPropAsAssertion("calledOn","expected %n to be called with %1 as this but was called with %t"),mirrorPropAsAssertion("alwaysCalledOn","expected %n to always be called with %1 as this but was called with %t"),mirrorPropAsAssertion("calledWithNew","expected %n to be called with new"),mirrorPropAsAssertion("alwaysCalledWithNew","expected %n to always be called with new"),mirrorPropAsAssertion("calledWith","expected %n to be called with arguments %D"),mirrorPropAsAssertion("calledWithMatch","expected %n to be called with match %D"),mirrorPropAsAssertion("alwaysCalledWith","expected %n to always be called with arguments %D"),mirrorPropAsAssertion("alwaysCalledWithMatch","expected %n to always be called with match %D"),mirrorPropAsAssertion("calledWithExactly","expected %n to be called with exact arguments %D"),mirrorPropAsAssertion("alwaysCalledWithExactly","expected %n to always be called with exact arguments %D"),mirrorPropAsAssertion("neverCalledWith","expected %n to never be called with arguments %*%C"),mirrorPropAsAssertion("neverCalledWithMatch","expected %n to never be called with match %*%C"),mirrorPropAsAssertion("threw","%n did not throw exception%C"),mirrorPropAsAssertion("alwaysThrew","%n did not always throw exception%C");var assert_1=assert,lolex=createCommonjsModule(function(module,exports){var f;f=function(){return function(){return function l(n,e,t){function u(o,i){if(!e[o]){if(!n[o]){var a="function"==typeof commonjsRequire&&commonjsRequire;if(!i&&a)return a(o,!0);if(r)return r(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[o]={exports:{}};n[o][0].call(c.exports,function(l){return u(n[o][1][l]||l)},c,c.exports,l,n,e,t)}return e[o].exports}for(var r="function"==typeof commonjsRequire&&commonjsRequire,o=0;o-1,maxTimeout=Math.pow(2,31)-1;isRunningInIE&&(_global.setTimeout=_global.setTimeout,_global.clearTimeout=_global.clearTimeout,_global.setInterval=_global.setInterval,_global.clearInterval=_global.clearInterval,_global.Date=_global.Date),void 0!==_global.setImmediate&&(_global.setImmediate=_global.setImmediate,_global.clearImmediate=_global.clearImmediate);var NOOP=function(){},timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=_global.process&&"function"==typeof _global.process.hrtime,nextTickPresent=_global.process&&"function"==typeof _global.process.nextTick,performancePresent=_global.performance&&"function"==typeof _global.performance.now,hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),requestAnimationFramePresent=_global.requestAnimationFrame&&"function"==typeof _global.requestAnimationFrame,cancelAnimationFramePresent=_global.cancelAnimationFrame&&"function"==typeof _global.cancelAnimationFrame;_global.clearTimeout(timeoutResult);var NativeDate=_global.Date,uniqueTimerId=1;function isNumberFinite(l){return Number.isFinite?Number.isFinite(l):"number"==typeof l&&isFinite(l)}function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,r=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);r+=n*Math.pow(60,t-u-1)}return 1e3*r}function nanoRemainder(l){var n=1e6*l%1e6,e=n<0?n+1e6:n;return Math.floor(e)}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties(function l(n,e,t,u,r,o,i){switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,r);case 6:return new NativeDate(n,e,t,u,r,o);default:return new NativeDate(n,e,t,u,r,o,i)}},NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nl.loopLimit)throw new Error("Aborting after running "+l.loopLimit+" timers, assuming an infinite loop!")}l.jobs=[]}}function addTimer(l,n){if(void 0===n.func)throw new Error("Callback must be provided to timer calls");if(n.type=n.immediate?"Immediate":"Timeout",n.hasOwnProperty("delay")&&(isNumberFinite(n.delay)||(n.delay=0),n.delay=n.delay>maxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject){var e={id:n.id,ref:function(){return e},unref:function(){return e},refresh:function(){return e}};return e}return n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,r=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||r&&1!==compareTimers(r,u[t])||(r=u[t]));return r}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n&&(l.timers||(l.timers={}),"object"==typeof n&&(n=n.id),l.timers.hasOwnProperty(n))){var t=l.timers[n];if(t.type!==e){var u="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===t.type?"requestAnimationFrame":"set"+t.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+u+"()")}delete l.timers[n]}}function uninstall(l,n,e){var t,u,r;for(u=0,r=l.methods.length;u1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");var a=n[0],s=i-n[1],c=o-a;return s<0&&(s+=1e9,c-=1),[c,s]}return[o,i]}if(u.Date.clock=u,u.setTimeout=function(l,n){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n})},u.clearTimeout=function(l){return clearTimer(u,l,"Timeout")},u.nextTick=function(l){return enqueueJob(u,{func:l,args:Array.prototype.slice.call(arguments,1)})},u.setInterval=function(l,n){return n=parseInt(n,10),addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,2),delay:n,interval:n})},u.clearInterval=function(l){return clearTimer(u,l,"Interval")},u.setImmediate=function(l){return addTimer(u,{func:l,args:Array.prototype.slice.call(arguments,1),immediate:!0})},u.clearImmediate=function(l){return clearTimer(u,l,"Immediate")},u.countTimers=function(){return Object.keys(u.timers||{}).length},u.requestAnimationFrame=function(l){var n=addTimer(u,{func:l,delay:r(),args:[u.now+r()],animation:!0});return n.id||n},u.cancelAnimationFrame=function(l){return clearTimer(u,l,"AnimationFrame")},u.runMicrotasks=function(){runJobs(u)},u.tick=function(l){var n="number"==typeof l?l:parseTime(l),t=Math.floor(n),r=nanoRemainder(n),o=e+r,i=u.now+t;if(n<0)throw new TypeError("Negative ticks are not supported");o>=1e6&&(i+=1,o-=1e6),e=o;var a,s,c,f=u.now,p=u.now;for(u.duringTick=!0,c=u.now,runJobs(u),c!==u.now&&(f+=u.now-c,i+=u.now-c),a=firstTimerInRange(u,f,i);a&&f<=i;){if(u.timers[a.id]){f=a.callAt,u.now=a.callAt,c=u.now;try{runJobs(u),callTimer(u,a)}catch(l){s=s||l}c!==u.now&&(f+=u.now-c,i+=u.now-c,p+=u.now-c)}a=firstTimerInRange(u,p,i),p=f}if(c=u.now,runJobs(u),c!==u.now&&(f+=u.now-c,i+=u.now-c),u.duringTick=!1,a=firstTimerInRange(u,f,i))try{u.tick(i-u.now)}catch(l){s=s||l}else u.now=i,e=o;if(s)throw s;return u.now},u.next=function(){runJobs(u);var l=firstTimer(u);if(!l)return u.now;u.duringTick=!0;try{return u.now=l.callAt,callTimer(u,l),runJobs(u),u.now}finally{u.duringTick=!1}},u.runAll=function(){var l;for(runJobs(u),l=0;l1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("lolex.install called with "+String(l)+" lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||_global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter(function(l){return"nextTick"!==l})),n=0,e=u.methods.length;nl.args.length)&&reduce$1(n,function(n,e,t){return n&&deepEqual$3(l.args[t],e)},!0)},calledWithMatch:function(){var l=this,n=slice$4(arguments);return!(n.length>l.args.length)&&reduce$1(n,function(n,e,t){var u=l.args[t];return n&&match$2(e).test(u)},!0)},calledWithExactly:function(){return arguments.length===this.args.length&&this.calledWith.apply(this,arguments)},notCalledWith:function(){return!this.calledWith.apply(this,arguments)},notCalledWithMatch:function(){return!this.calledWithMatch.apply(this,arguments)},returned:function(l){return deepEqual$3(this.returnValue,l)},threw:function(l){return void 0!==l&&this.exception?this.exception===l||this.exception.name===l:Boolean(this.exception)},calledWithNew:function(){return this.proxy.prototype&&this.thisValue instanceof this.proxy},calledBefore:function(l){return this.callIdl.callId},calledImmediatelyBefore:function(l){return this.callId===l.callId-1},calledImmediatelyAfter:function(l){return this.callId===l.callId+1},callArg:function(l){return this.ensureArgIsAFunction(l),this.args[l]()},callArgOn:function(l,n){return this.ensureArgIsAFunction(l),this.args[l].apply(n)},callArgWith:function(l){return this.callArgOnWith.apply(this,concat$2([l,null],slice$4(arguments,1)))},callArgOnWith:function(l,n){this.ensureArgIsAFunction(l);var e=slice$4(arguments,2);return this.args[l].apply(n,e)},throwArg:function(l){if(l>this.args.length)throw new TypeError("Not enough arguments: "+l+" required but only "+this.args.length+" present");throw this.args[l]},yield:function(){return this.yieldOn.apply(this,concat$2([null],slice$4(arguments,0)))},yieldOn:function(l){var n=slice$4(this.args),e=filter(n,function(l){return"function"==typeof l})[0];return e||throwYieldError(this.proxy," cannot yield since no callback was passed.",n),e.apply(l,slice$4(arguments,1))},yieldTo:function(l){return this.yieldToOn.apply(this,concat$2([l,null],slice$4(arguments,1)))},yieldToOn:function(l,n){var e=slice$4(this.args),t=filter(e,function(n){return n&&"function"==typeof n[l]})[0],u=t&&t[l];return u||throwYieldError(this.proxy," cannot yield to '"+valueToString$3(l)+"' since no callback was passed.",e),u.apply(n,slice$4(arguments,2))},toString:function(){var l,n=this.proxy?String(this.proxy)+"(":"";return this.args?(l=map$1(this.args,function(l){return format_1(l)}),n=n+join$4(l,", ")+")",void 0!==this.returnValue&&(n+=" => "+format_1(this.returnValue)),this.exception&&(n+=" !"+this.exception.name,this.exception.message&&(n+="("+this.exception.message+")")),this.stack&&(n+=(this.stack.split("\n")[3]||"unknown").replace(/^\s*(?:at\s+|@)?/," at ")),n):":("},ensureArgIsAFunction:function(l){if("function"!=typeof this.args[l])throw new TypeError("Expected argument at position "+l+" to be a Function, but was "+typeof this.args[l])}};function createSpyCall(l,n,e,t,u,r,o){if("number"!=typeof r)throw new TypeError("Call id is not a number");var i=Object.create(callProto),a=e.length>0&&e[e.length-1]||void 0,s=a&&"function"==typeof a?a:void 0;return i.proxy=l,i.thisValue=n,i.args=e,i.lastArg=a,i.callback=s,i.returnValue=t,i.exception=u,i.callId=r,i.errorWithCallStack=o,i}Object.defineProperty(callProto,"stack",{enumerable:!0,configurable:!0,get:function(){return this.errorWithCallStack&&this.errorWithCallStack.stack||""}}),callProto.invokeCallback=callProto.yield,createSpyCall.toString=callProto.toString;var call$1=createSpyCall,hasOwnProperty$5=lib.prototypes.object.hasOwnProperty,valueToString$4=lib.valueToString;function isFunction$1(l){return"function"==typeof l||Boolean(l&&l.constructor&&l.call&&l.apply)}function mirrorProperties(l,n){for(var e in n)hasOwnProperty$5(l,e)||(l[e]=n[e])}var hasES5Support="keys"in Object,wrapMethod=function(l,n,e){if(!l)throw new TypeError("Should wrap property of object");if("function"!=typeof e&&"object"!=typeof e)throw new TypeError("Method wrapper should be a function or a property descriptor");function t(l){var e;if(isFunction$1(l)){if(l.restore&&l.restore.sinon)e=new TypeError("Attempted to wrap "+valueToString$4(n)+" which is already wrapped");else if(l.calledBefore){var t=l.returns?"stubbed":"spied on";e=new TypeError("Attempted to wrap "+valueToString$4(n)+" which is already "+t)}}else e=new TypeError("Attempted to wrap "+typeof l+" property "+valueToString$4(n)+" as function");if(e)throw l&&l.stackTraceError&&(e.stack+="\n--------------\n"+l.stackTraceError.stack),e}var u,r,o,i;function a(){t(r=l[n]),l[n]=e,e.displayName=n}var s=l.hasOwnProperty?l.hasOwnProperty(n):hasOwnProperty$5(l,n);if(hasES5Support){var c="function"==typeof e?{value:e}:e;if((i=getPropertyDescriptor(l,n))?i.restore&&i.restore.sinon&&(u=new TypeError("Attempted to wrap "+n+" which is already wrapped")):u=new TypeError("Attempted to wrap "+typeof r+" property "+n+" as function"),u)throw i&&i.stackTraceError&&(u.stack+="\n--------------\n"+i.stackTraceError.stack),u;var f=Object.keys(c);for(o=0;o1)for(var e=1;e{n=n||process.argv;const e=l.startsWith("-")?"":1===l.length?"-":"--",t=n.indexOf(e+l),u=n.indexOf("--");return-1!==t&&(-1===u||t=2,has16m:l>=3}}function supportsColor(l){if(!1===forceColor)return 0;if(hasFlag("color=16m")||hasFlag("color=full")||hasFlag("color=truecolor"))return 3;if(hasFlag("color=256"))return 2;if(l&&!l.isTTY&&!0!==forceColor)return 0;const n=forceColor?1:0;if("CI"in env$1)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(l=>l in env$1)||"codeship"===env$1.CI_NAME?1:n;if("TEAMCITY_VERSION"in env$1)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env$1.TEAMCITY_VERSION)?1:0;if("truecolor"===env$1.COLORTERM)return 3;if("TERM_PROGRAM"in env$1){const l=parseInt((env$1.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(env$1.TERM_PROGRAM){case"iTerm.app":return l>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(env$1.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env$1.TERM)?1:"COLORTERM"in env$1?1:(env$1.TERM,n)}function getSupportLevel(l){return translateLevel(supportsColor(l))}hasFlag("no-color")||hasFlag("no-colors")||hasFlag("color=false")?forceColor=!1:(hasFlag("color")||hasFlag("colors")||hasFlag("color=true")||hasFlag("color=always"))&&(forceColor=!0),"FORCE_COLOR"in env$1&&(forceColor=0===env$1.FORCE_COLOR.length||0!==parseInt(env$1.FORCE_COLOR,10));var supportsColor_1={supportsColor:getSupportLevel,stdout:getSupportLevel(process.stdout),stderr:getSupportLevel(process.stderr)};function colorize(l,n){return!1===supportsColor_1.stdout?l:"["+n+"m"+l+""}var red=function(l){return colorize(l,31)},green=function(l){return colorize(l,32)},cyan=function(l){return colorize(l,96)},white=function(l){return colorize(l,39)},bold=function(l){return colorize(l,1)},color={red:red,green:green,cyan:cyan,white:white,bold:bold},base=createCommonjsModule(function(l,n){function e(){}function t(l,n,e,t,u){for(var r=0,o=n.length,i=0,a=0;rl.length?e:l}),s.value=l.join(f)}else s.value=l.join(e.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var p=n[o-1];return o>1&&"string"==typeof p.value&&(p.added||p.removed)&&l.equals("",p.value)&&(n[o-2].value+=p.value,n.pop()),n}n.__esModule=!0,n.default=e,e.prototype={diff:function(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=e.callback;"function"==typeof e&&(u=e,e={}),this.options=e;var r=this;function o(l){return u?(setTimeout(function(){u(void 0,l)},0),!0):l}l=this.castInput(l),n=this.castInput(n),l=this.removeEmpty(this.tokenize(l));var i=(n=this.removeEmpty(this.tokenize(n))).length,a=l.length,s=1,c=i+a,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],n,l,0);if(f[0].newPos+1>=i&&p+1>=a)return o([{value:this.join(n),count:n.length}]);function h(){for(var e=-1*s;e<=s;e+=2){var u=void 0,c=f[e-1],p=f[e+1],h=(p?p.newPos:0)-e;c&&(f[e-1]=void 0);var d=c&&c.newPos+1=i&&h+1>=a)return o(t(r,u.components,n,l,r.useLongestToken));f[e]=u}else f[e]=void 0}var m;s++}if(u)!function l(){setTimeout(function(){if(s>c)return u();h()||l()},0)}();else for(;s<=c;){var d=h();if(d)return d}},pushComponent:function(l,n,e){var t=l[l.length-1];t&&t.added===n&&t.removed===e?l[l.length-1]={count:t.count+1,added:n,removed:e}:l.push({count:1,added:n,removed:e})},extractCommon:function(l,n,e,t){for(var u=n.length,r=e.length,o=l.newPos,i=o-t,a=0;o+11&&void 0!==arguments[1]?arguments[1]:{},e=l.split(/\r\n|[\n\v\f\r\x85]/),t=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],u=[],r=0;function o(){var l={};for(u.push(l);r2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n&&(n=(0,parse.parsePatch)(n)),Array.isArray(n)){if(n.length>1)throw new Error("applyPatch only works with a single input.");n=n[0]}var u=l.split(/\r\n|[\n\v\f\r\x85]/),r=l.match(/\r\n|[\n\v\f\r\x85]/g)||[],o=n.hunks,i=e.compareLine||function(l,n,e,t){return n===t},a=0,s=e.fuzzFactor||0,c=0,f=0,p=void 0,h=void 0;function d(l,n){for(var e=0;e0?t[0]:" ",o=t.length>0?t.substr(1):t;if(" "===r||"-"===r){if(!i(n+1,u[n],r,o)&&++a>s)return!1;n++}}return!0}for(var g=0;g0?T[0]:" ",k=T.length>0?T.substr(1):T,F=x.linedelimiters[_];if(" "===S)C++;else if("-"===S)u.splice(C,1),r.splice(C,1);else if("+"===S)u.splice(C,0,k),r.splice(C,0,F),C++;else if("\\"===S){var D=x.lines[_-1]?x.lines[_-1][0]:null;"+"===D?p=!0:"-"===D&&(h=!0)}}}if(p)for(;!u[u.length-1];)u.pop(),r.pop();else h&&(u.push(""),r.push("\n"));for(var P=0;P0?s(m.lines.slice(-i.context)):[],f-=h.length,p-=h.length)}(o=h).push.apply(o,e(r.map(function(l){return(n.added?"+":"-")+l}))),n.added?g+=r.length:d+=r.length}else{if(f)if(r.length<=2*i.context&&l=a.length-2&&r.length<=i.context){var A=/\n$/.test(t),E=/\n$/.test(u);0!=r.length||A?A&&E||h.push("\\ No newline at end of file"):h.splice(w.oldLines,0,"\\ No newline at end of file")}c.push(w),f=0,p=0,h=[]}d+=r.length,g+=r.length}},y=0;yl.length)return!1;for(var e=0;e/g,">")).replace(/"/g,""")}n.__esModule=!0,n.convertChangesToXML=function(l){for(var n=[],t=0;t"):u.removed&&n.push(""),n.push(e(u.value)),u.added?n.push(""):u.removed&&n.push("")}return n.join("")}});unwrapExports(xml);var xml_1=xml.convertChangesToXML,lib$1=createCommonjsModule(function(l,n){n.__esModule=!0,n.canonicalize=n.convertChangesToXML=n.convertChangesToDMP=n.merge=n.parsePatch=n.applyPatches=n.applyPatch=n.createPatch=n.createTwoFilesPatch=n.structuredPatch=n.diffArrays=n.diffJson=n.diffCss=n.diffSentences=n.diffTrimmedLines=n.diffLines=n.diffWordsWithSpace=n.diffWords=n.diffChars=n.Diff=void 0;var e,t=(e=base)&&e.__esModule?e:{default:e};n.Diff=t.default,n.diffChars=character.diffChars,n.diffWords=word.diffWords,n.diffWordsWithSpace=word.diffWordsWithSpace,n.diffLines=line.diffLines,n.diffTrimmedLines=line.diffTrimmedLines,n.diffSentences=sentence.diffSentences,n.diffCss=css.diffCss,n.diffJson=json.diffJson,n.diffArrays=array$2.diffArrays,n.structuredPatch=create.structuredPatch,n.createTwoFilesPatch=create.createTwoFilesPatch,n.createPatch=create.createPatch,n.applyPatch=apply.applyPatch,n.applyPatches=apply.applyPatches,n.parsePatch=parse.parsePatch,n.merge=merge_1.merge,n.convertChangesToDMP=dmp.convertChangesToDMP,n.convertChangesToXML=xml.convertChangesToXML,n.canonicalize=json.canonicalize});unwrapExports(lib$1);var lib_1$1=lib$1.canonicalize,lib_2$1=lib$1.convertChangesToXML,lib_3$1=lib$1.convertChangesToDMP,lib_4$1=lib$1.merge,lib_5$1=lib$1.parsePatch,lib_6$1=lib$1.applyPatches,lib_7$1=lib$1.applyPatch,lib_8$1=lib$1.createPatch,lib_9=lib$1.createTwoFilesPatch,lib_10=lib$1.structuredPatch,lib_11=lib$1.diffArrays,lib_12=lib$1.diffJson,lib_13=lib$1.diffCss,lib_14=lib$1.diffSentences,lib_15=lib$1.diffTrimmedLines,lib_16=lib$1.diffLines,lib_17=lib$1.diffWordsWithSpace,lib_18=lib$1.diffWords,lib_19=lib$1.diffChars,lib_20=lib$1.Diff,arrayProto$7=lib.prototypes.array,match$3=samsam.createMatcher,join$5=arrayProto$7.join,map$2=arrayProto$7.map,push$2=arrayProto$7.push;function colorSinonMatchText(l,n,e){var t=e;return l.test(n)||(l.message=color.red(l.message),t&&(t=color.green(t))),t+" "+l.message}function colorDiffText(l){var n=map$2(l,function(n){var e=n.value;return n.added?e=color.green(e):n.removed&&(e=color.red(e)),2===l.length&&(e+=" "),e});return join$5(n,"")}var spyFormatters={c:function(l){return timesInWords(l.callCount)},n:function(l){return l.toString()},D:function(l,n){for(var e="",t=0,u=l.callCount;t1&&(e+="\nCall "+(t+1)+":");for(var r=l.getCall(t).args,o=0;o0?"\n"+join$5(n,"\n"):""},t:function(l){for(var n=[],e=0,t=l.callCount;e=this.callCount?null:call$1(this,this.thisValues[l],this.args[l],this.returnValues[l],this.exceptions[l],this.callIds[l],this.errorsWithCallStack[l])},getCalls:function(){var l,n=[];for(l=0;ll.callIds[0]},calledImmediatelyBefore:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]-1},calledImmediatelyAfter:function(l){return!(!this.called||!l.called)&&this.callIds[this.callCount-1]===l.callIds[l.callCount-1]+1},withArgs:function(){var l=slice$5(arguments);if(this.fakes){var n=pop(this.matchingFakes(l,!0));if(n)return n}else this.fakes=[];var e=this,t=this.instantiateFake();return t.matchingArguments=l,t.parent=this,push$3(this.fakes,t),e.defaultBehavior&&e.defaultBehavior.promiseLibrary&&(t.defaultBehavior=t.defaultBehavior||createBehavior$1(t),t.defaultBehavior.promiseLibrary=e.defaultBehavior.promiseLibrary),t.withArgs=function(){return e.withArgs.apply(e,arguments)},forEach$2(e.args,function(l,n){t.matches(l)&&(incrementCallCount.call(t),push$3(t.thisValues,e.thisValues[n]),push$3(t.args,l),push$3(t.returnValues,e.returnValues[n]),push$3(t.exceptions,e.exceptions[n]),push$3(t.callIds,e.callIds[n]))}),createCallProperties.call(t),t},matchingFakes:function(l,n){return filter$1.call(this.fakes||[],function(e){return e.matches(l,n)})},matches:function(l,n){var e=this.matchingArguments;if(e.length<=l.length&&deepEqual$4(slice$5(l,0,e.length),e))return!n||e.length===l.length},printf:function(l){var n,e=this,t=slice$5(arguments,1);return(l||"").replace(/%(.)/g,function(l,u){return"function"==typeof(n=spyApi.formatters[u])?String(n(e,t)):isNaN(parseInt(u,10))?"%"+u:format_1(t[u-1])})}};function delegateToCalls(l,n,e,t,u,r){spyApi[l]=function(){if(!this.called)return!!u&&u.apply(this,arguments);if(void 0!==r&&this.callCount!==r)return!1;for(var o,i=0,a=[],s=0,c=this.callCount;s2)throw new TypeError("stub(obj, 'meth', fn) has been removed, see documentation");if(isEsModule(l))throw new TypeError("ES Modules cannot be stubbed");if(throwOnFalsyObject_1.apply(null,arguments),isNonExistentOwnProperty_1(l,n))throw new TypeError("Cannot stub non-existent own property "+valueToString$7(n));var e=getPropertyDescriptor(l,n),t="object"==typeof l||"function"==typeof l,u=void 0===n&&t,r=!l&&void 0===n,o=t&&void 0!==n&&(void 0===e||"function"!=typeof e.value)&&"undefined"==typeof descriptor,i="object"==typeof l&&void 0!==e&&"function"==typeof e.value?l[n].length:0;if(u)return stubEntireObject_1(stub,l);if(r)return stub.create();var a=stub.create(i);return a.rootObj=l,a.propName=n,a.restore=function(){void 0===e?delete l[n]:Object.defineProperty(l,n,e)},o?a:wrapMethod(l,n,a)}function getParentBehaviour(l){return l.parent&&getCurrentBehavior(l.parent)}function getDefaultBehavior(l){return l.defaultBehavior||getParentBehaviour(l)||behavior.create(l)}function getCurrentBehavior(l){var n=l.behaviors[l.callCount-1];return n&&n.isPresent()?n:getDefaultBehavior(l)}stub.createStubInstance=function(l,n){if("function"!=typeof l)throw new TypeError("The constructor should be a function.");var e=stub(Object.create(l.prototype));return forEach$3(Object.keys(n||{}),function(l){if(!(l in e))throw new Error("Cannot stub "+l+". Property does not exist!");var t=n[l];t&&t.createStubInstance?e[l]=t:e[l].returns(t)}),e};var uuid$1=0,proto$1={create:function(l){var n=function(){var l=slice$7(arguments),e=n.matchingFakes(l);return getCurrentBehavior(pop$1(sort$1(e,function(l,n){return l.matchingArguments.length-n.matchingArguments.length}))||n).invoke(this,arguments)},e=n;return(n=spy_1.create(n,l)).id="stub#"+uuid$1++,n.func=e,extend(n,stub),n.instantiateFake=stub.create,n.displayName="stub",n.toString=functionToString,n.defaultBehavior=null,n.behaviors=[],n},resetBehavior:function(){var l=this.fakes||[];this.defaultBehavior=null,this.behaviors=[],delete this.returnValue,delete this.returnArgAt,delete this.throwArgAt,delete this.resolveArgAt,delete this.fakeFn,this.returnThis=!1,this.resolveThis=!1,forEach$3(l,function(l){l.resetBehavior()})},resetHistory:spy_1.resetHistory,reset:function(){this.resetHistory(),this.resetBehavior()},onCall:function(l){return this.behaviors[l]||(this.behaviors[l]=behavior.create(this)),this.behaviors[l]},onFirstCall:function(){return this.onCall(0)},onSecondCall:function(){return this.onCall(1)},onThirdCall:function(){return this.onCall(2)}};forEach$3(Object.keys(behavior),function(l){hasOwnProperty$6(behavior,l)&&!hasOwnProperty$6(proto$1,l)&&"create"!==l&&"withArgs"!==l&&"invoke"!==l&&(proto$1[l]=behavior.createBehavior(l))}),forEach$3(Object.keys(defaultBehaviors_1),function(l){hasOwnProperty$6(defaultBehaviors_1,l)&&!hasOwnProperty$6(proto$1,l)&&behavior.addBehavior(stub,l,defaultBehaviors_1[l])}),extend(stub,proto$1);var stub_1=stub,arrayProto$b=lib.prototypes.array,spyInvoke=spy_1.invoke,spyCallToString=call$1.toString,match$4=samsam.createMatcher,deepEqual$5=samsam.deepEqual,valueToString$8=lib.valueToString,every$4=arrayProto$b.every,forEach$4=arrayProto$b.forEach,push$4=arrayProto$b.push,slice$8=arrayProto$b.slice;function callCountInWords(l){return 0===l?"never called":"called "+timesInWords(l)}function expectedCallCountInWords(l){var n=l.minCalls,e=l.maxCalls;if("number"==typeof n&&"number"==typeof e){var t=timesInWords(n);return n!==e&&(t="at least "+t+" and at most "+timesInWords(e)),t}return"number"==typeof n?"at least "+timesInWords(n):"at most "+timesInWords(e)}function receivedMinCalls(l){return!("number"==typeof l.minCalls)||l.callCount>=l.minCalls}function receivedMaxCalls(l){return"number"==typeof l.maxCalls&&l.callCount===l.maxCalls}function verifyMatcher(l,n){return match$4.isMatcher(l)&&l.test(n)||!0}var mockExpectation={minCalls:1,maxCalls:1,create:function(l){var n=extend(stub_1.create(),mockExpectation);return delete n.create,n.method=l,n},invoke:function(l,n,e){return this.verifyCallAllowed(n,e),spyInvoke.apply(this,arguments)},atLeast:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not number");return this.limitsSet||(this.maxCalls=null,this.limitsSet=!0),this.minCalls=l,this},atMost:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not number");return this.limitsSet||(this.minCalls=null,this.limitsSet=!0),this.maxCalls=l,this},never:function(){return this.exactly(0)},once:function(){return this.exactly(1)},twice:function(){return this.exactly(2)},thrice:function(){return this.exactly(3)},exactly:function(l){if("number"!=typeof l)throw new TypeError("'"+valueToString$8(l)+"' is not a number");return this.atLeast(l),this.atMost(l)},met:function(){return!this.failed&&receivedMinCalls(this)},verifyCallAllowed:function(l,n){var e=this.expectedArguments;receivedMaxCalls(this)&&(this.failed=!0,mockExpectation.fail(this.method+" already called "+timesInWords(this.maxCalls))),"expectedThis"in this&&this.expectedThis!==l&&mockExpectation.fail(this.method+" called with "+valueToString$8(l)+" as thisValue, expected "+valueToString$8(this.expectedThis)),"expectedArguments"in this&&(n||mockExpectation.fail(this.method+" received no arguments, expected "+format_1(e)),n.length0?mockExpectation_1.fail(join$6(concat$4(n,e),"\n")):e.length>0&&mockExpectation_1.pass(join$6(concat$4(n,e),"\n")),!0},usingPromise:function(l){return this.promiseLibrary=l,this},invokeMethod:function(l,n,e){var t,u=this.expectations&&this.expectations[l]?this.expectations[l]:[],r=e||[],o=filter$2(u,function(l){return arrayEquals(l.expectedArguments||[],r,l.expectsExactArgCount)}),i=filter$2(o,function(l){return!l.met()&&l.allowsCall(n,e)});if(i.length>0)return i[0].apply(n,e);var a=[],s=0;if(forEach$6(o,function(l){l.allowsCall(n,e)?t=t||l:s+=1}),t&&0===s)return t.apply(n,e);forEach$6(u,function(l){push$5(a," "+String(l))}),unshift(a,"Unexpected call: "+spyCallToString$1.call({proxy:l,args:e}));var c=new Error;if(!c.stack)try{throw c}catch(l){}push$5(this.failures,"Unexpected call: "+spyCallToString$1.call({proxy:l,args:e,stack:c.stack})),mockExpectation_1.fail(join$6(a,"\n"))}});var mock_1=mock,arrayProto$d=lib.prototypes.array,forEach$7=arrayProto$d.forEach,slice$a=arrayProto$d.slice;function getError(l){return l instanceof Error?l:new Error(l)}function cleanProxy(l){return forEach$7(["instantiateFake","callArg","callArgOn","callArgOnWith","callArgWith","invokeCallback","throwArg","withArgs","yield","yieldOn","yieldTo","yieldToOn"],function(n){delete l[n]}),l}var uuid$2=0;function wrapFunc(l){var n=cleanProxy(spy_1(function(){var e=arguments.length>0&&arguments[arguments.length-1]||void 0,t=e&&"function"==typeof e?e:void 0;return n.lastArg=e,n.callback=t,l&&l.apply(this,arguments)}));return n.displayName="fake",n.id="fake#"+uuid$2++,n}function fake(l){if(arguments.length>0&&"function"!=typeof l)throw new TypeError("Expected f argument to be a Function");return wrapFunc(l)}function yieldInternal(l,n){return wrapFunc(function(){var e=arguments[arguments.length-1];if("function"!=typeof e)throw new TypeError("Expected last argument to be a function");l?nextTick$1(function(){e.apply(null,n)}):e.apply(null,n)})}fake.returns=function(l){return wrapFunc(function(){return l})},fake.throws=function(l){return wrapFunc(function(){throw getError(l)})},fake.resolves=function(l){return wrapFunc(function(){return Promise.resolve(l)})},fake.rejects=function(l){return wrapFunc(function(){return Promise.reject(getError(l))})},fake.yields=function(){return yieldInternal(!1,slice$a(arguments))},fake.yieldsAsync=function(){return yieldInternal(!0,slice$a(arguments))};var fake_1=fake,nise=createCommonjsModule(function(module,exports){var f;f=function(){var define;return function(){return function l(n,e,t){function u(o,i){if(!e[o]){if(!n[o]){var a="function"==typeof commonjsRequire&&commonjsRequire;if(!i&&a)return a(o,!0);if(r)return r(o,!0);var s=new Error("Cannot find module '"+o+"'");throw s.code="MODULE_NOT_FOUND",s}var c=e[o]={exports:{}};n[o][0].call(c.exports,function(l){var e=n[o][1][l];return u(e||l)},c,c.exports,l,n,e,t)}return e[o].exports}for(var r="function"==typeof commonjsRequire&&commonjsRequire,o=0;o0&&this.respondWith.apply(this,arguments);var l=this.queue||[],n=l.splice(0,l.length),e=this;n.forEach(function(l){e.processRequest(l)})},processRequest:function(l){try{if(l.aborted)return;var n=this.response||[404,{},""];if(this.responses)for(var e=this.responses.length-1;e>=0;e--)if(c.call(this,this.responses[e],l)){n=this.responses[e].response;break}4!==l.readyState&&(this.log(n,l),l.respond(n[0],n[1],n[2]))}catch(l){this.logError("Fake server request processing",l)}},restore:function(){return this.xhr.restore&&this.xhr.restore.apply(this.xhr,arguments)},getRequest:function(l){return this.requests[l]||null},reset:function(){this.resetBehavior(),this.resetHistory()},resetBehavior:function(){this.responses.length=this.queue.length=0},resetHistory:function(){this.requests.length=this.requestCount=0,this.requestedOnce=this.requestedTwice=this.requestedThrice=this.requested=!1,this.firstRequest=this.secondRequest=this.thirdRequest=this.lastRequest=null}};n.exports=f},{"../configure-logger":1,"../fake-xhr":11,"./format":8,"path-to-regexp":45}],10:[function(l,n,e){e.isSupported=function(){try{return!!new Blob}catch(l){return!1}}()},{}],11:[function(l,n,e){(function(e){var t=l("text-encoding").TextEncoder,u=l("../configure-logger"),r=l("../event"),o=l("just-extend");var i,a="undefined"!=typeof ProgressEvent,s="undefined"!=typeof CustomEvent,c="undefined"!=typeof FormData,f="undefined"!=typeof ArrayBuffer,p=l("./blob").isSupported,h=e.navigator&&"ReactNative"===e.navigator.product,d={XMLHttpRequest:e.XMLHttpRequest};d.GlobalXMLHttpRequest=e.XMLHttpRequest,d.GlobalActiveXObject=e.ActiveXObject,d.supportsActiveX=void 0!==d.GlobalActiveXObject,d.supportsXHR=void 0!==d.GlobalXMLHttpRequest,d.workingXHR=void 0!==(i=e).XMLHttpRequest?i.XMLHttpRequest:!(void 0===i.ActiveXObject)&&function(){return new i.ActiveXObject("MSXML2.XMLHTTP.3.0")},d.supportsTimeout=d.supportsXHR&&"timeout"in new d.GlobalXMLHttpRequest,d.supportsCORS=h||d.supportsXHR&&"withCredentials"in new d.GlobalXMLHttpRequest;var g={"Accept-Charset":!0,"Access-Control-Request-Headers":!0,"Access-Control-Request-Method":!0,"Accept-Encoding":!0,Connection:!0,"Content-Length":!0,Cookie:!0,Cookie2:!0,"Content-Transfer-Encoding":!0,Date:!0,DNT:!0,Expect:!0,Host:!0,"Keep-Alive":!0,Origin:!0,Referer:!0,TE:!0,Trailer:!0,"Transfer-Encoding":!0,Upgrade:!0,"User-Agent":!0,Via:!0};function m(){var l=this;["loadstart","progress","abort","error","load","timeout","loadend"].forEach(function(n){l.addEventListener(n,function(e){var t=l["on"+n];t&&"function"==typeof t&&t.call(this,e)})})}function y(l){m.call(this),this.readyState=y.UNSENT,this.requestHeaders={},this.requestBody=null,this.status=0,this.statusText="",this.upload=new m,this.responseType="",this.response="",this.logError=u(l),d.supportsTimeout&&(this.timeout=0),d.supportsCORS&&(this.withCredentials=!1),"function"==typeof y.onCreate&&y.onCreate(this)}function b(l){if(l.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR");if(l.sendFlag)throw new Error("INVALID_STATE_ERR")}function v(l,n){return Object.keys(l).filter(function(l){return l.toLowerCase()===n.toLowerCase()})[0]||null}function w(l){return!/^Set-Cookie2?$/i.test(l)}m.prototype=r.EventTarget;var A=function(l,n,e){switch(e.length){case 0:return l[n]();case 1:return l[n](e[0]);case 2:return l[n](e[0],e[1]);case 3:return l[n](e[0],e[1],e[2]);case 4:return l[n](e[0],e[1],e[2],e[3]);case 5:return l[n](e[0],e[1],e[2],e[3],e[4]);default:throw new Error("Unhandled case")}};function E(l){if(l.readyState!==y.OPENED)throw new Error("INVALID_STATE_ERR - "+l.readyState)}function x(l,n){return l instanceof ArrayBuffer?l:new t(n||"utf-8").encode(l).buffer}function C(l){return!l||/(text\/xml)|(application\/xml)|(\+xml)/.test(l)}function _(l){""===l.responseType||"text"===l.responseType?l.response=l.responseText="":l.response=l.responseText=null,l.responseXML=null}function T(l){_(l),l.errorFlag=!0,l.requestHeaders={},l.responseHeaders={},l.readyState!==y.UNSENT&&l.sendFlag&&l.readyState!==y.DONE&&(l.readyStateChange(y.DONE),l.sendFlag=!1)}y.filters=[],y.addFilter=function(l){this.filters.push(l)},y.defake=function(l,n){var e=new d.workingXHR;["open","setRequestHeader","abort","getResponseHeader","getAllResponseHeaders","addEventListener","overrideMimeType","removeEventListener"].forEach(function(n){l[n]=function(){return A(e,n,arguments)}}),l.send=function(){return e.responseType!==l.responseType&&(e.responseType=l.responseType),A(e,"send",arguments)};var t=function(n){n.forEach(function(n){l[n]=e[n]})},u=function(){l.readyState=e.readyState,e.readyState>=y.HEADERS_RECEIVED&&t(["status","statusText"]),e.readyState>=y.LOADING&&(t(["response"]),""!==e.responseType&&"text"!==e.responseType||t(["responseText"])),e.readyState!==y.DONE||""!==e.responseType&&"document"!==e.responseType||t(["responseXML"])},r=function(){l.onreadystatechange&&l.onreadystatechange.call(l,{target:l,currentTarget:l})};e.addEventListener?(e.addEventListener("readystatechange",u),Object.keys(l.eventListeners).forEach(function(n){l.eventListeners[n].forEach(function(l){e.addEventListener(n,l.listener,{capture:l.capture,once:l.once})})}),e.addEventListener("readystatechange",r)):e.onreadystatechange=function(){u(),r()},A(e,"open",n)},y.useFilters=!1,y.parseXML=function(l){if(""!==l)try{if("undefined"!=typeof DOMParser){var n,e=new DOMParser,t="";try{var u=e.parseFromString("INVALID","text/xml").getElementsByTagName("parsererror");u.length&&(t=u[0].namespaceURI)}catch(l){}try{n=e.parseFromString(l,"text/xml")}catch(l){return null}return n.getElementsByTagNameNS(t,"parsererror").length?null:n}var r=new window.ActiveXObject("Microsoft.XMLDOM");return r.async="false",r.loadXML(l),0!==r.parseError.errorCode?null:r}catch(l){}return null},y.statusCodes={100:"Continue",101:"Switching Protocols",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choice",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",422:"Unprocessable Entity",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported"},o(y.prototype,r.EventTarget,{async:!0,open:function(l,n,e,t,u){if(this.method=l,this.url=n,this.async="boolean"!=typeof e||e,this.username=t,this.password=u,_(this),this.requestHeaders={},this.sendFlag=!1,!0===y.useFilters){var r=arguments;if(y.filters.some(function(l){return l.apply(this,r)}))return void y.defake(this,arguments)}this.readyStateChange(y.OPENED)},readyStateChange:function(l){this.readyState=l;var n,e,t=new r.Event("readystatechange",!1,!1,this);if("function"==typeof this.onreadystatechange)try{this.onreadystatechange(t)}catch(l){this.logError("Fake XHR onreadystatechange handler",l)}this.readyState===y.DONE&&(this.timedOut||this.aborted||0===this.status?(e={loaded:0,total:0},n=(this.timedOut?"timeout":this.aborted&&"abort")||"error"):(e={loaded:100,total:100},n="load"),a&&(this.upload.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.upload.dispatchEvent(new r.ProgressEvent(n,e,this)),this.upload.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(new r.ProgressEvent("progress",e,this)),this.dispatchEvent(new r.ProgressEvent(n,e,this)),this.dispatchEvent(new r.ProgressEvent("loadend",e,this))),this.dispatchEvent(t)},setRequestHeader:function(l,n){if("string"!=typeof n)throw new TypeError("By RFC7230, section 3.2.4, header values should be strings. Got "+typeof n);b(this);var e=!0;if("function"==typeof this.unsafeHeadersEnabled&&(e=this.unsafeHeadersEnabled()),e&&(null!==v(g,l)||/^(Sec-|Proxy-)/i.test(l)))throw new Error('Refused to set unsafe header "'+l+'"');n=function(l){return l.replace(/^[\x09\x0A\x0D\x20]+|[\x09\x0A\x0D\x20]+$/g,"")}(n);var t=v(this.requestHeaders,l);t?this.requestHeaders[t]+=", "+n:this.requestHeaders[l]=n},setStatus:function(l){var n="number"==typeof l?l:200;E(this),this.status=n,this.statusText=y.statusCodes[n]},setResponseHeaders:function(l){E(this);var n=this.responseHeaders={};Object.keys(l).forEach(function(e){n[e]=l[e]}),this.async?this.readyStateChange(y.HEADERS_RECEIVED):this.readyState=y.HEADERS_RECEIVED},send:function(l){if(b(this),!/^(head)$/i.test(this.method)){var n=v(this.requestHeaders,"Content-Type");if(this.requestHeaders[n]){var e=this.requestHeaders[n].split(";");this.requestHeaders[n]=e[0]+";charset=utf-8"}else!c||l instanceof FormData||(this.requestHeaders["Content-Type"]="text/plain;charset=utf-8");this.requestBody=l}if(this.errorFlag=!1,this.sendFlag=this.async,_(this),this.readyStateChange(y.OPENED),"function"==typeof this.onSend&&this.onSend(this),d.supportsTimeout&&"object"==typeof setInterval.clock&&"object"==typeof Date.clock)var t=Date.now(),u=this,o=setInterval(function(){u.readyState===y.UNSENT||u.readyState===y.DONE?clearInterval(o):"number"==typeof u.timeout&&u.timeout>0&&Date.now()>=t+u.timeout&&(u.triggerTimeout(),clearInterval(o))},1);this.dispatchEvent(new r.Event("loadstart",!1,!1,this))},abort:function(){this.aborted=!0,T(this),this.readyState=y.UNSENT},error:function(){_(this),this.errorFlag=!0,this.requestHeaders={},this.responseHeaders={},this.readyStateChange(y.DONE)},triggerTimeout:function(){d.supportsTimeout&&(this.timedOut=!0,T(this))},getResponseHeader:function(l){return this.readyState=y.LOADING)throw new Error("INVALID_STATE_ERR");this.overriddenMimeType=l}});var S={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4};o(y,S),o(y.prototype,S),n.exports={xhr:d,FakeXMLHttpRequest:y,useFakeXMLHttpRequest:function(){return y.restore=function(l){d.supportsXHR&&(e.XMLHttpRequest=d.GlobalXMLHttpRequest),d.supportsActiveX&&(e.ActiveXObject=d.GlobalActiveXObject),delete y.restore,!0!==l&&delete y.onCreate},d.supportsXHR&&(e.XMLHttpRequest=y),d.supportsActiveX&&(e.ActiveXObject=function(l){return"Microsoft.XMLHTTP"===l||/^Msxml2\.XMLHTTP/i.test(l)?new y:new d.GlobalActiveXObject(l)}),y}}}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../configure-logger":1,"../event":5,"./blob":10,"just-extend":42,"text-encoding":46}],12:[function(l,n,e){n.exports={fakeServer:l("./fake-server"),fakeServerWithClock:l("./fake-server/fake-server-with-clock"),fakeXhr:l("./fake-xhr")}},{"./fake-server":9,"./fake-server/fake-server-with-clock":7,"./fake-xhr":11}],13:[function(l,n,e){n.exports=function(l,n){var e=!0;try{l.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch(l){e=!1}return e}},{}],14:[function(l,n,e){n.exports=function(l){return l.displayName||l.name||(String(l).match(/function ([^\s\(]+)/)||[])[1]}},{}],15:[function(l,n,e){n.exports={every:l("./every"),functionName:l("./function-name"),prototypes:l("./prototypes"),typeOf:l("./type-of"),valueToString:l("./value-to-string")}},{"./every":13,"./function-name":14,"./prototypes":19,"./type-of":22,"./value-to-string":23}],16:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Array.prototype)},{"./copy-prototype":17}],17:[function(l,n,e){var t=Function.call;n.exports=function(l){return Object.getOwnPropertyNames(l).reduce(function(n,e){return"size"!==e&&"caller"!==e&&"callee"!==e&&"arguments"!==e&&"function"==typeof l[e]&&(n[e]=t.bind(l[e])),n},Object.create(null))}},{}],18:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Function.prototype)},{"./copy-prototype":17}],19:[function(l,n,e){n.exports={array:l("./array"),function:l("./function"),object:l("./object"),string:l("./string")}},{"./array":16,"./function":18,"./object":20,"./string":21}],20:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(Object.prototype)},{"./copy-prototype":17}],21:[function(l,n,e){var t=l("./copy-prototype");n.exports=t(String.prototype)},{"./copy-prototype":17}],22:[function(l,n,e){var t=l("type-detect");n.exports=function(l){return t(l).toLowerCase()}},{"type-detect":49}],23:[function(l,n,e){n.exports=function(l){return l&&l.toString?l.toString():String(l)}},{}],24:[function(l,n,e){(function(e){var t=l("@sinonjs/samsam"),u={excludeConstructors:["Object",/^.$/],quoteStrings:!0,limitChildrenCount:0},r=[];function o(l){if(!l)return"";if(l.displayName)return l.displayName;if(l.name)return l.name;var n=l.toString().match(/function\s+([^\(]+)/m);return n&&n[1]||""}function i(l,n){var e,t,r=o(n&&n.constructor),i=l.excludeConstructors||u.excludeConstructors||[];for(e=0,t=i.length;e0?Math.min(this.limitChildrenCount,l.length):l.length,t=0;t0?Math.min(this.limitChildrenCount,h.length):h.length,o=0;o80?m+"{\n "+y+p.join(",\n "+y)+"\n"+y+"}":m+"{ "+p.join(", ")+" }"},s.element=function(l){var n,e,t,u,r,o=l.tagName.toLowerCase(),i=l.attributes,a=[];for(t=0,u=i.length;t0?" ":""),c=l.innerHTML||"";return c.length>20&&(c=c.substr(0,20)+"[...]"),(s+a.join(" ")+">"+c+"").replace(/ contentEditable="inherit"/,"")},c.prototype={functionName:o,configure:function(l){return new c(l)},constructorName:function(l){return i(this,l)},ascii:function(l,n,e){return s(this,l,n,e)}},n.exports=c.prototype}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@sinonjs/samsam":40}],25:[function(l,n,e){var t=l("./get-class"),u=l("./identical"),r=l("./is-arguments"),o=l("./is-date"),i=l("./is-element"),a=l("./is-nan"),s=l("./is-object"),c=l("./is-set"),f=l("./is-subset"),p=l("./get-class-name"),h=Array.prototype.every,d=Date.prototype.getTime,g=Object.prototype.hasOwnProperty,m=Array.prototype.indexOf,y=Object.keys;function b(l,n,e){var b=[],v=[],w=[],A=[],E={};return function l(n,x,C,_){if(e&&e.isMatcher(x))return e.isMatcher(n)?n===x:x.test(n);var T=typeof n,S=typeof x;if(n===x||a(n)||a(x)||null==n||null==x||"object"!==T||"object"!==S)return u(n,x);if(i(n)||i(x))return!1;var k=o(n),F=o(x);if((k||F)&&(!k||!F||d.call(n)!==d.call(x)))return!1;if(n instanceof RegExp&&x instanceof RegExp&&n.toString()!==x.toString())return!1;if(n instanceof Error&&x instanceof Error&&(n.constructor!==x.constructor||n.message!==x.message||n.stack!==x.stack))return!1;var D=t(n),P=t(x),j=y(n),O=y(x),B=p(n),$=p(x);if(r(n)||r(x)){if(n.length!==x.length)return!1}else if(T!==S||D!==P||j.length!==O.length||B&&$&&B!==$)return!1;return c(n)||c(x)?!(!c(n)||!c(x)||n.size!==x.size)&&f(n,x,l):h.call(j,function(e){if(!g.call(x,e))return!1;var t=n[e],u=x[e],r=s(t),o=s(u),i=r?m.call(b,t):-1,a=o?m.call(v,u):-1,c=-1!==i?w[i]:C+"["+JSON.stringify(e)+"]",f=-1!==a?A[a]:_+"["+JSON.stringify(e)+"]",p=c+f;return!!E[p]||(-1===i&&r&&(b.push(t),w.push(c)),-1===a&&o&&(v.push(u),A.push(f)),r&&o&&(E[p]=!0),l(t,u,c,f))})}(l,n,"$1","$2")}b.use=function(l){return function(n,e){return b(n,e,l)}},n.exports=b},{"./get-class":27,"./get-class-name":26,"./identical":28,"./is-arguments":29,"./is-date":30,"./is-element":31,"./is-nan":32,"./is-object":34,"./is-set":35,"./is-subset":36}],26:[function(l,n,e){var t=/function (\w+)\s*\(/;n.exports=function(l){if(l.constructor&&"name"in l.constructor)return l.constructor.name;if("function"==typeof l.constructor){var n=l.constructor.toString().match(t);if(n.length>1)return n[1]}return null}},{}],27:[function(l,n,e){var t=Object.prototype;n.exports=function(l){return t.toString.call(l).split(/[ \]]/)[1]}},{}],28:[function(l,n,e){var t=l("./is-nan"),u=l("./is-neg-zero");n.exports=function(l,n){return!!(l===n||t(l)&&t(n))&&(0!==l||u(l)===u(n))}},{"./is-nan":32,"./is-neg-zero":33}],29:[function(l,n,e){var t=l("./get-class");n.exports=function(l){if("Arguments"===t(l))return!0;if("object"!=typeof l||"number"!=typeof l.length||"Array"===t(l))return!1;if("function"==typeof l.callee)return!0;try{l[l.length]=6,delete l[l.length]}catch(l){return!0}return!1}},{"./get-class":27}],30:[function(l,n,e){n.exports=function(l){return l instanceof Date}},{}],31:[function(l,n,e){var t="undefined"!=typeof document&&document.createElement("div");n.exports=function(l){if(!l||1!==l.nodeType||!t)return!1;try{l.appendChild(t),l.removeChild(t)}catch(l){return!1}return!0}},{}],32:[function(l,n,e){n.exports=function(l){return"number"==typeof l&&l!=l}},{}],33:[function(l,n,e){n.exports=function(l){return 0===l&&1/l==-1/0}},{}],34:[function(l,n,e){n.exports=function(l){return!("object"!=typeof l||null===l||l instanceof Boolean||l instanceof Date||l instanceof Error||l instanceof Number||l instanceof RegExp||l instanceof String)}},{}],35:[function(l,n,e){n.exports=function(l){return"undefined"!=typeof Set&&l instanceof Set||!1}},{}],36:[function(l,n,e){n.exports=function(l,n,e){var t=!0;return l.forEach(function(l){var u=!1;n.forEach(function(n){e(n,l)&&(u=!0)}),t=t&&u}),t}},{}],37:[function(l,n,e){var t=l("@sinonjs/commons").prototypes.string.slice,u=l("@sinonjs/commons").typeOf;n.exports=function(l){var n="";function e(l){return"string"==typeof l?"'"+l+"'":String(l)}return"map"===u(l)?(l.forEach(function(l,t){n+="["+e(t)+","+e(l)+"],"}),n=t(n,0,-1)):(l.forEach(function(l){n+=e(l)+","}),n=t(n,0,-1))}},{"@sinonjs/commons":15}],38:[function(l,n,e){var t=l("./deep-equal").use(s),u=l("./get-class"),r=l("./is-date"),o=l("./is-set"),i=l("./is-subset"),a=l("./matcher");function s(l,n){if(n&&"function"==typeof n.test)return n.test(l);if("function"==typeof n)return!0===n(l);if("string"==typeof n)return n=n.toLowerCase(),("string"==typeof l||!!l)&&String(l).toLowerCase().indexOf(n)>=0;if("number"==typeof n)return n===l;if("boolean"==typeof n)return n===l;if(void 0===n)return void 0===l;if(null===n)return null===l;if(null===l)return!1;if(o(l))return i(n,l,s);if("Array"===u(l)&&"Array"===u(n))return function(l,n,e){if(0===n.length)return!0;var t,u,r,o;for(t=0,u=l.length;t=u)return!1;if(!e(l[t+r],n[r]))return!1}return!0}return!1}(l,n,s);if(r(n))return r(l)&&l.getTime()===n.getTime();if(n&&"object"==typeof n){if(n===l)return!0;if("object"!=typeof l)return!1;var e;for(e in n){var a=l[e];if(void 0===a&&"function"==typeof l.getAttribute&&(a=l.getAttribute(e)),null===n[e]||void 0===n[e]){if(a!==n[e])return!1}else if(void 0===a||!t(a,n[e]))return!1}return!0}throw new Error("Matcher was not a string, a number, a function, a boolean or an object")}Object.keys(a).forEach(function(l){s[l]=a[l]}),n.exports=s},{"./deep-equal":25,"./get-class":27,"./is-date":30,"./is-set":35,"./is-subset":36,"./matcher":39}],39:[function(l,n,e){var t=l("@sinonjs/commons").prototypes.array,u=l("./deep-equal").use(_),r=l("@sinonjs/commons").every,o=l("@sinonjs/commons").functionName,i=l("lodash.get"),a=l("./iterable-to-string"),s=l("@sinonjs/commons").prototypes.object,c=l("@sinonjs/commons").prototypes.string,f=l("@sinonjs/commons").typeOf,p=l("@sinonjs/commons").valueToString,h=t.indexOf,d=t.every,g=t.join,m=t.map,y=t.some,b=s.hasOwnProperty,v=s.isPrototypeOf,w=c.indexOf;function A(l,n,e){var t=f(l);if(t!==n)throw new TypeError("Expected type of "+e+" to be "+n+", but was "+t)}var E={toString:function(){return this.message}};function x(l){return v(E,l)}var C={function:function(l,n,e){l.test=n,l.message=e||"match("+o(n)+")"},number:function(l,n){l.test=function(l){return n==l}},object:function(l,n){var e;return"function"==typeof n.test?(l.test=function(l){return!0===n.test(l)},l.message="match("+o(n.test)+")",l):(e=m(Object.keys(n),function(l){return l+": "+p(n[l])}),l.test=function(l){return function l(n,e){return null!=n&&d(Object.keys(e),function(t){var r=e[t],o=n[t];if(x(r)){if(!r.test(o))return!1}else if("object"===f(r)){if(!l(o,r))return!1}else if(!u(o,r))return!1;return!0})}(l,n)},l.message="match("+g(e,", ")+")",l)},regexp:function(l,n){l.test=function(l){return"string"==typeof l&&n.test(l)}},string:function(l,n){l.test=function(l){return"string"==typeof l&&-1!==w(l,n)},l.message='match("'+n+'")'}};function _(l,n){var e=Object.create(E),t=f(l);return t in C?C[t](e,l,n):e.test=function(n){return u(n,l)},e.message||(e.message="match("+p(l)+")"),e}function T(l,n){return function(e,t){A(e,"string","property");var r=1===arguments.length,o=n+'("'+e+'"';return r||(o+=", "+p(t)),_(function(n){return!(null==n||!l(n,e))&&(r||u(n[e],t))},o+=")")}}E.or=function(l){if(!arguments.length)throw new TypeError("Matcher expected");x(l)||(l=_(l));var n=this,e=Object.create(E);return e.test=function(e){return n.test(e)||l.test(e)},e.message=n.message+".or("+l.message+")",e},E.and=function(l){if(!arguments.length)throw new TypeError("Matcher expected");x(l)||(l=_(l));var n=this,e=Object.create(E);return e.test=function(e){return n.test(e)&&l.test(e)},e.message=n.message+".and("+l.message+")",e},_.isMatcher=x,_.any=_(function(){return!0},"any"),_.defined=_(function(l){return null!=l},"defined"),_.truthy=_(function(l){return!!l},"truthy"),_.falsy=_(function(l){return!l},"falsy"),_.same=function(l){return _(function(n){return l===n},"same("+p(l)+")")},_.in=function(l){if(!Array.isArray(l))throw new TypeError("array expected");return _(function(n){return y(l,function(l){return l===n})},"in("+p(l)+")")},_.typeOf=function(l){return A(l,"string","type"),_(function(n){return f(n)===l},'typeOf("'+l+'")')},_.instanceOf=function(l){return"undefined"==typeof Symbol||void 0===Symbol.hasInstance?A(l,"function","type"):function(l,n,e,t){if(null==l[n])throw new TypeError("Expected "+e+" to have method "+t)}(l,Symbol.hasInstance,"type","[Symbol.hasInstance]"),_(function(n){return n instanceof l},"instanceOf("+(o(l)||Object.prototype.toString.call(l))+")")},_.has=T(function(l,n){return"object"==typeof l?n in l:void 0!==l[n]},"has"),_.hasOwn=T(function(l,n){return b(l,n)},"hasOwn"),_.hasNested=function(l,n){A(l,"string","property");var e=1===arguments.length,t='hasNested("'+l+'"';return e||(t+=", "+p(n)),_(function(t){return null!=t&&void 0!==i(t,l)&&(e||u(i(t,l),n))},t+=")")},_.every=function(l){if(!x(l))throw new TypeError("Matcher expected");return _(function(n){return"object"===f(n)?r(Object.keys(n),function(e){return l.test(n[e])}):!!n&&"function"===f(n.forEach)&&r(n,function(n){return l.test(n)})},"every("+l.message+")")},_.some=function(l){if(!x(l))throw new TypeError("Matcher expected");return _(function(n){return"object"===f(n)?!r(Object.keys(n),function(e){return!l.test(n[e])}):!!n&&"function"===f(n.forEach)&&!r(n,function(n){return!l.test(n)})},"some("+l.message+")")},_.array=_.typeOf("array"),_.array.deepEquals=function(l){return _(function(n){var e=n.length===l.length;return"array"===f(n)&&e&&r(n,function(n,e){return l[e]===n})},"deepEquals(["+a(l)+"])")},_.array.startsWith=function(l){return _(function(n){return"array"===f(n)&&r(l,function(l,e){return n[e]===l})},"startsWith(["+a(l)+"])")},_.array.endsWith=function(l){return _(function(n){var e=n.length-l.length;return"array"===f(n)&&r(l,function(l,t){return n[e+t]===l})},"endsWith(["+a(l)+"])")},_.array.contains=function(l){return _(function(n){return"array"===f(n)&&r(l,function(l){return-1!==h(n,l)})},"contains(["+a(l)+"])")},_.map=_.typeOf("map"),_.map.deepEquals=function(l){return _(function(n){var e=n.size===l.size;return"map"===f(n)&&e&&r(n,function(n,e){return l.has(e)&&l.get(e)===n})},"deepEquals(Map["+a(l)+"])")},_.map.contains=function(l){return _(function(n){return"map"===f(n)&&r(l,function(l,e){return n.has(e)&&n.get(e)===l})},"contains(Map["+a(l)+"])")},_.set=_.typeOf("set"),_.set.deepEquals=function(l){return _(function(n){var e=n.size===l.size;return"set"===f(n)&&e&&r(n,function(n){return l.has(n)})},"deepEquals(Set["+a(l)+"])")},_.set.contains=function(l){return _(function(n){return"set"===f(n)&&r(l,function(l){return n.has(l)})},"contains(Set["+a(l)+"])")},_.bool=_.typeOf("boolean"),_.number=_.typeOf("number"),_.string=_.typeOf("string"),_.object=_.typeOf("object"),_.func=_.typeOf("function"),_.regexp=_.typeOf("regexp"),_.date=_.typeOf("date"),_.symbol=_.typeOf("symbol"),n.exports=_},{"./deep-equal":25,"./iterable-to-string":37,"@sinonjs/commons":15,"lodash.get":43}],40:[function(l,n,e){var t=l("./identical"),u=l("./is-arguments"),r=l("./is-element"),o=l("./is-neg-zero"),i=l("./match"),a=l("./deep-equal").use(i),s=l("./matcher");n.exports={createMatcher:s,deepEqual:a,isArguments:u,isElement:r,isNegZero:o,identical:t,match:i}},{"./deep-equal":25,"./identical":28,"./is-arguments":29,"./is-element":31,"./is-neg-zero":33,"./match":38,"./matcher":39}],41:[function(l,n,e){n.exports=Array.isArray||function(l){return"[object Array]"==Object.prototype.toString.call(l)}},{}],42:[function(l,n,e){n.exports=function l(){var n=[].slice.call(arguments);var e=!1;"boolean"==typeof n[0]&&(e=n.shift());var t=n[0];if(!t||"object"!=typeof t&&"function"!=typeof t)throw new Error("extendee must be an object");var u=n.slice(1);var r=u.length;for(var o=0;o-1},B.prototype.set=function(l,n){var e=this.__data__,t=L(e,l);return t<0?e.push([l,n]):e[t][1]=n,this},$.prototype.clear=function(){this.__data__={hash:new O,map:new(F||B),string:new O}},$.prototype.delete=function(l){return R(this,l).delete(l)},$.prototype.get=function(l){return R(this,l).get(l)},$.prototype.has=function(l){return R(this,l).has(l)},$.prototype.set=function(l,n){return R(this,l).set(l,n),this};var q=H(function(l){var n;l=null==(n=l)?"":function(l){if("string"==typeof l)return l;if(V(l))return j?j.call(l):"";var n=l+"";return"0"==n&&1/l==-u?"-0":n}(n);var e=[];return c.test(l)&&e.push(""),l.replace(f,function(l,n,t,u){e.push(t?u.replace(p,"$1"):n||l)}),e});function U(l){if("string"==typeof l||V(l))return l;var n=l+"";return"0"==n&&1/l==-u?"-0":n}function H(l,n){if("function"!=typeof l||n&&"function"!=typeof n)throw new TypeError(e);var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],r=t.cache;if(r.has(u))return r.get(u);var o=l.apply(this,e);return t.cache=r.set(u,o),o};return t.cache=new(H.Cache||$),t}H.Cache=$;var z=Array.isArray;function W(l){var n=typeof l;return!!l&&("object"==n||"function"==n)}function V(l){return"symbol"==typeof l||function(l){return!!l&&"object"==typeof l}(l)&&_.call(l)==i}n.exports=function(l,n,e){var t=null==l?void 0:N(l,n);return void 0===t?e:t}}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],44:[function(require,module,exports){(function(global){var userAgent=global.navigator&&global.navigator.userAgent,isRunningInIE=userAgent&&userAgent.indexOf("MSIE ")>-1,maxTimeout=Math.pow(2,31)-1;isRunningInIE&&(global.setTimeout=global.setTimeout,global.clearTimeout=global.clearTimeout,global.setInterval=global.setInterval,global.clearInterval=global.clearInterval,global.Date=global.Date),void 0!==global.setImmediate&&(global.setImmediate=global.setImmediate,global.clearImmediate=global.clearImmediate);var NOOP=function(){},timeoutResult=setTimeout(NOOP,0),addTimerReturnsObject="object"==typeof timeoutResult,hrtimePresent=global.process&&"function"==typeof global.process.hrtime,nextTickPresent=global.process&&"function"==typeof global.process.nextTick,performancePresent=global.performance&&"function"==typeof global.performance.now,requestAnimationFramePresent=global.requestAnimationFrame&&"function"==typeof global.requestAnimationFrame,cancelAnimationFramePresent=global.cancelAnimationFrame&&"function"==typeof global.cancelAnimationFrame;clearTimeout(timeoutResult);var NativeDate=Date,uniqueTimerId=1;function parseTime(l){if(!l)return 0;var n,e=l.split(":"),t=e.length,u=t,r=0;if(t>3||!/^(\d\d:){0,2}\d\d?$/.test(l))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if((n=parseInt(e[u],10))>=60)throw new Error("Invalid time "+l);r+=n*Math.pow(60,t-u-1)}return 1e3*r}function fixedFloor(l){return l>=0?Math.floor(l):Math.ceil(l)}function fixedModulo(l,n){return(l%n+n)%n}function getEpoch(l){if(!l)return 0;if("function"==typeof l.getTime)return l.getTime();if("number"==typeof l)return l;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(l,n,e){return e&&e.callAt>=l&&e.callAt<=n}function mirrorDateProperties(l,n){var e;for(e in n)n.hasOwnProperty(e)&&(l[e]=n[e]);return n.now?l.now=function(){return l.clock.now}:delete l.now,n.toSource?l.toSource=function(){return n.toSource()}:delete l.toSource,l.toString=function(){return n.toString()},l.prototype=n.prototype,l.parse=n.parse,l.UTC=n.UTC,l.prototype.toUTCString=n.prototype.toUTCString,l}function createDate(){return mirrorDateProperties(function l(n,e,t,u,r,o,i){switch(arguments.length){case 0:return new NativeDate(l.clock.now);case 1:return new NativeDate(n);case 2:return new NativeDate(n,e);case 3:return new NativeDate(n,e,t);case 4:return new NativeDate(n,e,t,u);case 5:return new NativeDate(n,e,t,u,r);case 6:return new NativeDate(n,e,t,u,r,o);default:return new NativeDate(n,e,t,u,r,o,i)}},NativeDate)}function enqueueJob(l,n){l.jobs||(l.jobs=[]),l.jobs.push(n)}function runJobs(l){if(l.jobs){for(var n=0;nmaxTimeout?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>maxTimeout?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),l.timers||(l.timers={}),n.id=uniqueTimerId++,n.createdAt=l.now,n.callAt=l.now+(parseInt(n.delay)||(l.duringTick?1:0)),l.timers[n.id]=n,addTimerReturnsObject?{id:n.id,ref:NOOP,unref:NOOP}:n.id}function compareTimers(l,n){return l.callAtn.callAt?1:l.immediate&&!n.immediate?-1:!l.immediate&&n.immediate?1:l.createdAtn.createdAt?1:l.idn.id?1:void 0}function firstTimerInRange(l,n,e){var t,u=l.timers,r=null;for(t in u)u.hasOwnProperty(t)&&(!inRange(n,e,u[t])||r&&1!==compareTimers(r,u[t])||(r=u[t]));return r}function firstTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&1!==compareTimers(t,e[n])||(t=e[n]));return t}function lastTimer(l){var n,e=l.timers,t=null;for(n in e)e.hasOwnProperty(n)&&(t&&-1!==compareTimers(t,e[n])||(t=e[n]));return t}function callTimer(clock,timer){"number"==typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"==typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(l,n,e){if(n&&(l.timers||(l.timers=[]),"object"==typeof n&&(n=n.id),l.timers.hasOwnProperty(n))){var t=l.timers[n];if(t.type!==e){var u="AnimationFrame"===e?"cancelAnimationFrame":"clear"+e,r="AnimationFrame"===t.type?"requestAnimationFrame":"set"+t.type;throw new Error("Cannot clear timer: timer created with "+r+"() but cleared with "+u+"()")}delete l.timers[n]}}function uninstall(l,n,e){var t,u,r;for(u=0,r=l.methods.length;u1||l instanceof Date||Array.isArray(l)||"number"==typeof l)throw new TypeError("lolex.install called with "+String(l)+" lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");var n,e;(l=void 0!==l?l:{}).shouldAdvanceTime=l.shouldAdvanceTime||!1,l.advanceTimeDelta=l.advanceTimeDelta||20;var t=l.target||global,u=createClock(l.now,l.loopLimit);for(u.uninstall=function(){return uninstall(u,t,l)},u.methods=l.toFake||[],0===u.methods.length&&(u.methods=keys(timers).filter(function(l){return"nextTick"!==l})),n=0,e=u.methods.length;n>6*e)+u];e>0;){var o=n>>6*(e-1);r.push(128|63&o),e-=1}return r}}function k(l,n){var e=n.fatal;this.handler=function(n,t){if(t===a)return c;if(o(t))return t;var u=l[t-128];return null===u?f(e):u}}function F(l,n){n.fatal;this.handler=function(n,e){if(e===a)return c;if(i(e))return e;var t=A(e,l);return null===t&&p(e),t+128}}function D(l){var n=l.fatal,e=0,u=0,r=0;this.handler=function(l,i){if(i===a&&0===e&&0===u&&0===r)return c;var s;if(i!==a||0===e&&0===u&&0===r||(e=0,u=0,r=0,f(n)),0!==r){s=null,t(i,48,57)&&(s=function(l){if(l>39419&&l<189e3||l>1237575)return null;if(7457===l)return 59335;var n,e=0,t=0,u=E("gb18030-ranges");for(n=0;n>8,t=255&l;return n?[e,t]:[t,e]}function H(l,n){var e=n.fatal,u=null,r=null;this.handler=function(n,o){if(o===a&&(null!==u||null!==r))return f(e);if(o===a&&null===u&&null===r)return c;if(null===u)return u=o,null;var i;if(i=l?(u<<8)+o:(o<<8)+u,u=null,null!==r){var s=r;return r=null,t(i,56320,57343)?65536+1024*(s-55296)+(i-56320):(n.prepend(U(i,l)),f(e))}return t(i,55296,56319)?(r=i,null):t(i,56320,57343)?f(e):i}}function z(l,n){n.fatal;this.handler=function(n,e){if(e===a)return c;if(t(e,0,65535))return U(e,l);var u=U(55296+(e-65536>>10),l),r=U(56320+(e-65536&1023),l);return u.concat(r)}}function W(l){l.fatal;this.handler=function(l,n){return n===a?c:o(n)?n:63360+n-128}}function V(l){l.fatal;this.handler=function(l,n){return n===a?c:i(n)?n:t(n,63360,63487)?n-63360+128:p(n)}}Object.defineProperty&&(Object.defineProperty(C.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(C.prototype,"fatal",{get:function(){return"fatal"===this._error_mode}}),Object.defineProperty(C.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}})),C.prototype.decode=function(l,n){var e;e="object"==typeof l&&l instanceof ArrayBuffer?new Uint8Array(l):"object"==typeof l&&"buffer"in l&&l.buffer instanceof ArrayBuffer?new Uint8Array(l.buffer,l.byteOffset,l.byteLength):new Uint8Array(0),n=r(n),this._do_not_flush||(this._decoder=v[this._encoding.name]({fatal:"fatal"===this._error_mode}),this._BOMseen=!1),this._do_not_flush=Boolean(n.stream);for(var t,u=new s(e),o=[];;){var i=u.read();if(i===a)break;if((t=this._decoder.handler(u,i))===c)break;null!==t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t))}if(!this._do_not_flush){do{if((t=this._decoder.handler(u,u.read()))===c)break;null!==t&&(Array.isArray(t)?o.push.apply(o,t):o.push(t))}while(!u.endOfStream());this._decoder=null}return function(l){var n,e;return n=["UTF-8","UTF-16LE","UTF-16BE"],e=this._encoding.name,-1===n.indexOf(e)||this._ignoreBOM||this._BOMseen||(l.length>0&&65279===l[0]?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),function(l){for(var n="",e=0;e>10),56320+(1023&t)))}return n}(l)}.call(this,o)},Object.defineProperty&&Object.defineProperty(_.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),_.prototype.encode=function(l,n){l=void 0===l?"":String(l),n=r(n),this._do_not_flush||(this._encoder=b[this._encoding.name]({fatal:"fatal"===this._fatal})),this._do_not_flush=Boolean(n.stream);for(var e,t=new s(function(l){for(var n=String(l),e=n.length,t=0,u=[];t57343)u.push(r);else if(56320<=r&&r<=57343)u.push(65533);else if(55296<=r&&r<=56319)if(t===e-1)u.push(65533);else{var o=n.charCodeAt(t+1);if(56320<=o&&o<=57343){var i=1023&r,a=1023&o;u.push(65536+(i<<10)+a),t+=1}else u.push(65533)}t+=1}return u}(l)),u=[];;){var o=t.read();if(o===a)break;if((e=this._encoder.handler(t,o))===c)break;Array.isArray(e)?u.push.apply(u,e):u.push(e)}if(!this._do_not_flush){for(;(e=this._encoder.handler(t,t.read()))!==c;)Array.isArray(e)?u.push.apply(u,e):u.push(e);this._encoder=null}return new Uint8Array(u)},b["UTF-8"]=function(l){return new S(l)},v["UTF-8"]=function(l){return new T(l)},"encoding-indexes"in e&&d.forEach(function(l){"Legacy single-byte encodings"===l.heading&&l.encodings.forEach(function(l){var n=l.name,e=E(n.toLowerCase());v[n]=function(l){return new k(e,l)},b[n]=function(l){return new F(e,l)}})}),v.GBK=function(l){return new D(l)},b.GBK=function(l){return new P(l,!0)},b.gb18030=function(l){return new P(l)},v.gb18030=function(l){return new D(l)},b.Big5=function(l){return new O(l)},v.Big5=function(l){return new j(l)},b["EUC-JP"]=function(l){return new $(l)},v["EUC-JP"]=function(l){return new B(l)},b["ISO-2022-JP"]=function(l){return new N(l)},v["ISO-2022-JP"]=function(l){return new L(l)},b.Shift_JIS=function(l){return new R(l)},v.Shift_JIS=function(l){return new M(l)},b["EUC-KR"]=function(l){return new q(l)},v["EUC-KR"]=function(l){return new I(l)},b["UTF-16BE"]=function(l){return new z(!0,l)},v["UTF-16BE"]=function(l){return new H(!0,l)},b["UTF-16LE"]=function(l){return new z(!1,l)},v["UTF-16LE"]=function(l){return new H(!1,l)},b["x-user-defined"]=function(l){return new V(l)},v["x-user-defined"]=function(l){return new W(l)},e.TextEncoder||(e.TextEncoder=_),e.TextDecoder||(e.TextDecoder=C),void 0!==n&&n.exports&&(n.exports={TextEncoder:e.TextEncoder,TextDecoder:e.TextDecoder,EncodingIndexes:e["encoding-indexes"]})}(this||{})},{"./encoding-indexes.js":47}],49:[function(l,n,e){(function(l){!function(l,t){"object"==typeof e&&void 0!==n?n.exports=t():"function"==typeof define&&define.amd?define(t):l.typeDetect=t()}(this,function(){var n="function"==typeof Promise,e="object"==typeof self?self:l,t="undefined"!=typeof Symbol,u="undefined"!=typeof Map,r="undefined"!=typeof Set,o="undefined"!=typeof WeakMap,i="undefined"!=typeof WeakSet,a="undefined"!=typeof DataView,s=t&&void 0!==Symbol.iterator,c=t&&void 0!==Symbol.toStringTag,f=r&&"function"==typeof Set.prototype.entries,p=u&&"function"==typeof Map.prototype.entries,h=f&&Object.getPrototypeOf((new Set).entries()),d=p&&Object.getPrototypeOf((new Map).entries()),g=s&&"function"==typeof Array.prototype[Symbol.iterator],m=g&&Object.getPrototypeOf([][Symbol.iterator]()),y=s&&"function"==typeof String.prototype[Symbol.iterator],b=y&&Object.getPrototypeOf(""[Symbol.iterator]()),v=8,w=-1;return function(l){var t=typeof l;if("object"!==t)return t;if(null===l)return"null";if(l===e)return"global";if(Array.isArray(l)&&(!1===c||!(Symbol.toStringTag in l)))return"Array";if("object"==typeof window&&null!==window){if("object"==typeof window.location&&l===window.location)return"Location";if("object"==typeof window.document&&l===window.document)return"Document";if("object"==typeof window.navigator){if("object"==typeof window.navigator.mimeTypes&&l===window.navigator.mimeTypes)return"MimeTypeArray";if("object"==typeof window.navigator.plugins&&l===window.navigator.plugins)return"PluginArray"}if(("function"==typeof window.HTMLElement||"object"==typeof window.HTMLElement)&&l instanceof window.HTMLElement){if("BLOCKQUOTE"===l.tagName)return"HTMLQuoteElement";if("TD"===l.tagName)return"HTMLTableDataCellElement";if("TH"===l.tagName)return"HTMLTableHeaderCellElement"}}var s=c&&l[Symbol.toStringTag];if("string"==typeof s)return s;var f=Object.getPrototypeOf(l);return f===RegExp.prototype?"RegExp":f===Date.prototype?"Date":n&&f===Promise.prototype?"Promise":r&&f===Set.prototype?"Set":u&&f===Map.prototype?"Map":i&&f===WeakSet.prototype?"WeakSet":o&&f===WeakMap.prototype?"WeakMap":a&&f===DataView.prototype?"DataView":u&&f===d?"Map Iterator":r&&f===h?"Set Iterator":g&&f===m?"Array Iterator":y&&f===b?"String Iterator":null===f?"Object":Object.prototype.toString.call(l).slice(v,w)}})}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[12])(12)},module.exports=f()}),arrayProto$e=lib.prototypes.array,match$5=samsam.createMatcher,valueToString$9=lib.valueToString,fakeServer=nise.fakeServer,fakeXhr=nise.fakeXhr,filter$3=arrayProto$e.filter,forEach$8=arrayProto$e.filter,push$6=arrayProto$e.push,reverse$1=arrayProto$e.reverse;function applyOnEach(l,n){var e=filter$3(l,function(l){return"function"==typeof l[n]});forEach$8(e,function(l){l[n]()})}function Sandbox(){var l,n=this,e=[],t=[];function u(l,n){var e=getPropertyDescriptor(l,n);function t(){Object.defineProperty(l,n,e)}return t.object=l,t.property=n,t}function r(l,n){forEach$8(t,function(e){if(e.object===l&&e.property===n)throw new TypeError("Attempted to replace "+n+" which is already replaced")})}n.serverPrototype=fakeServer,n.getFakes=function(){return e},n.getRestorers=function(){return t},n.createStubInstance=function(l){if("function"!=typeof l)throw new TypeError("The constructor should be a function.");return this.stub(Object.create(l.prototype))},n.inject=function(l){return l.spy=function(){return n.spy.apply(null,arguments)},l.stub=function(){return n.stub.apply(null,arguments)},l.mock=function(){return n.mock.apply(null,arguments)},n.clock&&(l.clock=n.clock),n.server&&(l.server=n.server,l.requests=n.server.requests),l.match=match$5,l},n.mock=function(){var n=mock_1.apply(null,arguments);return push$6(e,n),usePromiseLibrary_1(l,n),n},n.reset=function(){applyOnEach(e,"reset"),applyOnEach(e,"resetHistory")},n.resetBehavior=function(){applyOnEach(e,"resetBehavior")},n.resetHistory=function(){function l(l){var n=l.resetHistory||l.reset;n&&n.call(l)}forEach$8(e,function(n){if("function"!=typeof n){var e=[];n.get&&push$6(e,n.get),n.set&&push$6(e,n.set),forEach$8(e,l)}else l(n)})},n.restore=function(){if(arguments.length)throw new Error("sandbox.restore() does not take any parameters. Perhaps you meant stub.restore()");reverse$1(e),applyOnEach(e,"restore"),e=[],forEach$8(t,function(l){l()}),t=[],n.restoreContext()},n.restoreContext=function(){var l=n.injectedKeys,e=n.injectInto;l&&(forEach$8(l,function(l){delete e[l]}),l=[])},n.replace=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if(void 0===e)throw new TypeError("Expected replacement argument to be defined");if("function"==typeof o.get)throw new Error("Use sandbox.replaceGetter for replacing getters");if("function"==typeof o.set)throw new Error("Use sandbox.replaceSetter for replacing setters");if(typeof l[n]!=typeof e)throw new TypeError("Cannot replace "+typeof l[n]+" with "+typeof e);return r(l,n),push$6(t,u(l,n)),l[n]=e,e},n.replaceGetter=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof o.get)throw new Error("`object.property` is not a getter");return r(l,n),push$6(t,u(l,n)),Object.defineProperty(l,n,{get:e,configurable:isPropertyConfigurable_1(l,n)}),e},n.replaceSetter=function(l,n,e){var o=getPropertyDescriptor(l,n);if(void 0===o)throw new TypeError("Cannot replace non-existent own property "+valueToString$9(n));if("function"!=typeof e)throw new TypeError("Expected replacement argument to be a function");if("function"!=typeof o.set)throw new Error("`object.property` is not a setter");return r(l,n),push$6(t,u(l,n)),Object.defineProperty(l,n,{set:e,configurable:isPropertyConfigurable_1(l,n)}),e},n.spy=function(){var l=spy_1.apply(spy_1,arguments);return push$6(e,l),l},n.stub=function(n,t){if(isEsModule(n))throw new TypeError("ES Modules cannot be stubbed");if(isNonExistentOwnProperty_1(n,t))throw new TypeError("Cannot stub non-existent own property "+valueToString$9(t));var u=stub_1.apply(null,arguments);if(void 0===t&&"object"==typeof n){var r=collectOwnMethods_1(u);forEach$8(r,function(l){push$6(e,l)}),usePromiseLibrary_1(l,r)}else push$6(e,u),usePromiseLibrary_1(l,u);return u},n.fake=function(l){var n=fake_1.apply(fake_1,arguments);return push$6(e,n),n},forEach$8(Object.keys(fake_1),function(l){var t=fake_1[l];"function"==typeof t&&(n.fake[l]=function(){var l=t.apply(t,arguments);return push$6(e,l),l})}),n.useFakeTimers=function(l){var t=fakeTimers.useFakeTimers.call(null,l);return n.clock=t,push$6(e,t),t},n.verify=function(){applyOnEach(e,"verify")},n.verifyAndRestore=function(){var l;try{n.verify()}catch(n){l=n}if(n.restore(),l)throw l},n.useFakeServer=function(){var l=n.serverPrototype||fakeServer;return l&&l.create?(n.server=l.create(),push$6(e,n.server),n.server):null},n.useFakeXMLHttpRequest=function(){var l=fakeXhr.useFakeXMLHttpRequest();return push$6(e,l),l},n.usingPromise=function(t){return l=t,e.promiseLibrary=t,n}}Sandbox.prototype.assert=assert_1,Sandbox.prototype.match=match$5;var sandbox=Sandbox,arrayProto$f=lib.prototypes.array,forEach$9=arrayProto$f.forEach,push$7=arrayProto$f.push;function prepareSandboxFromConfig(l){var n=new sandbox;return l.useFakeServer&&("object"==typeof l.useFakeServer&&(n.serverPrototype=l.useFakeServer),n.useFakeServer()),l.useFakeTimers&&("object"==typeof l.useFakeTimers?n.useFakeTimers(l.useFakeTimers):n.useFakeTimers()),n}function exposeValue(l,n,e,t){t&&(!n.injectInto||e in n.injectInto?push$7(l.args,t):(n.injectInto[e]=t,push$7(l.injectedKeys,e)))}function createSandbox(l){if(!l)return new sandbox;var n=prepareSandboxFromConfig(l);n.args=n.args||[],n.injectedKeys=[],n.injectInto=l.injectInto;var e=n.inject({});return l.properties?forEach$9(l.properties,function(t){var u=e[t]||"sandbox"===t&&n;exposeValue(n,l,t,u)}):exposeValue(n,l,"sandbox"),n}var createSandbox_1=createSandbox,deprecated=createCommonjsModule(function(l,n){n.wrap=function(l,e){var t=function(){return n.printWarning(e),l.apply(this,arguments)};return l.prototype&&(t.prototype=l.prototype),t},n.defaultMsg=function(l){return"sinon."+l+" is deprecated and will be removed from the public API in a future version of sinon."},n.printWarning=function(l){"undefined"!=typeof console&&(console.info?console.info(l):console.log(l))}}),deprecated_1=deprecated.wrap,deprecated_2=deprecated.defaultMsg,deprecated_3=deprecated.printWarning,defaultConfig={injectIntoThis:!0,injectInto:null,properties:["spy","stub","mock","clock","server","requests"],useFakeTimers:!0,useFakeServer:!0},apiMethods={createSandbox:createSandbox_1,assert:assert_1,match:samsam.createMatcher,spyCall:call$1,expectation:mockExpectation_1,createStubInstance:stub_1.createStubInstance,defaultConfig:defaultConfig,setFormatter:format_1.setFormatter,timers:fakeTimers.timers,xhr:nise.fakeXhr.xhr,FakeXMLHttpRequest:nise.fakeXhr.FakeXMLHttpRequest,fakeServer:nise.fakeServer,fakeServerWithClock:nise.fakeServerWithClock,createFakeServer:nise.fakeServer.create.bind(nise.fakeServer),createFakeServerWithClock:nise.fakeServerWithClock.create.bind(nise.fakeServerWithClock),addBehavior:function(l,n){behavior.addBehavior(stub_1,l,n)}},legacySandboxAPI={sandbox:{create:deprecated.wrap(createSandbox_1,"`sandbox.create()` is deprecated. Use default sandbox at `sinon.sandbox` or create new sandboxes with `sinon.createSandbox()`")}},sandbox$1=new sandbox,api=extend(sandbox$1,legacySandboxAPI,apiMethods),sinon=api;__webpack_exports__.default=sinon;const _serverPrototype=sinon.serverPrototype,_getFakes=sinon.getFakes,_getRestorers=sinon.getRestorers,_createStubInstance=sinon.createStubInstance,_inject=sinon.inject,_mock=sinon.mock,_reset=sinon.reset,_resetBehavior=sinon.resetBehavior,_resetHistory=sinon.resetHistory,_restore=sinon.restore,_restoreContext=sinon.restoreContext,_replace=sinon.replace,_replaceGetter=sinon.replaceGetter,_replaceSetter=sinon.replaceSetter,_spy=sinon.spy,_stub=sinon.stub,_fake=sinon.fake,_useFakeTimers=sinon.useFakeTimers,_verify=sinon.verify,_verifyAndRestore=sinon.verifyAndRestore,_useFakeServer=sinon.useFakeServer,_useFakeXMLHttpRequest=sinon.useFakeXMLHttpRequest,_usingPromise=sinon.usingPromise,_sandbox=sinon.sandbox,_createSandbox=sinon.createSandbox,_assert=sinon.assert,_match=sinon.match,_spyCall=sinon.spyCall,_expectation=sinon.expectation,_defaultConfig=sinon.defaultConfig,_setFormatter=sinon.setFormatter,_timers=sinon.timers,_xhr=sinon.xhr,_FakeXMLHttpRequest=sinon.FakeXMLHttpRequest,_fakeServer=sinon.fakeServer,_fakeServerWithClock=sinon.fakeServerWithClock,_createFakeServer=sinon.createFakeServer,_createFakeServerWithClock=sinon.createFakeServerWithClock,_addBehavior=sinon.addBehavior}.call(this,__webpack_require__(15),__webpack_require__(38).setImmediate,__webpack_require__(38).clearImmediate)},function(l,n){var e,t,u=l.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function i(l){if(e===setTimeout)return setTimeout(l,0);if((e===r||!e)&&setTimeout)return e=setTimeout,setTimeout(l,0);try{return e(l,0)}catch(n){try{return e.call(null,l,0)}catch(n){return e.call(this,l,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:r}catch(l){e=r}try{t="function"==typeof clearTimeout?clearTimeout:o}catch(l){t=o}}();var a,s=[],c=!1,f=-1;function p(){c&&a&&(c=!1,a.length?s=a.concat(s):f=-1,s.length&&h())}function h(){if(!c){var l=i(p);c=!0;for(var n=s.length;n;){for(a=s,s=[];++f1)for(var e=1;e @@ -121,7 +121,7 @@ l.exports=function(l){var n=Object.getOwnPropertyNames(l);function e(l){-1===n.i * Copyright(c) 2011-2016 Jake Luer * MIT Licensed */ -l.exports=function(l){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(l).filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})}},,,,function(l,n,e){"use strict";e(52);var t=e(55);t.keys().forEach(t),l.exports=t},function(l,n,e){(function(l,n){var e;!function(){return function l(n,t,u){function r(i,a){if(!t[i]){if(!n[i]){if(!a&&"function"==typeof e&&e)return e(i,!0);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=t[i]={exports:{}};n[i][0].call(c.exports,function(l){return r(n[i][1][l]||l)},c,c.exports,l,n,t,u)}return t[i].exports}for(var o="function"==typeof e&&e,i=0;i1&&e.shift(),i.suite.create({title:l,file:r,fn:!1})},u.suite.only=function(l){return e.length>1&&e.shift(),i.suite.only({title:l,file:r,fn:!1})},u.test=function(l,n){var u=new t(l,n);return u.file=r,e[0].addTest(u),u},u.test.only=function(l,n){return i.test.only(o,u.test(l,n))},u.test.skip=i.test.skip,u.test.retries=i.test.retries})}},{"../test":35,"./common":8}],12:[function(l,n,e){"use strict";var t=l("../test");n.exports=function(n){var e=[n];n.on("pre-require",function(u,r,o){var i=l("./common")(e,u,o);u.setup=i.beforeEach,u.teardown=i.afterEach,u.suiteSetup=i.before,u.suiteTeardown=i.after,u.run=o.options.delay&&i.runWithSuite(n),u.suite=function(l,n){return i.suite.create({title:l,file:r,fn:n})},u.suite.skip=function(l,n){return i.suite.skip({title:l,file:r,fn:n})},u.suite.only=function(l,n){return i.suite.only({title:l,file:r,fn:n})},u.test=function(l,n){var u=e[0];u.isPending()&&(n=null);var o=new t(l,n);return o.file=r,u.addTest(o),o},u.test.only=function(l,n){return i.test.only(o,u.test(l,n))},u.test.skip=i.test.skip,u.test.retries=i.test.retries})}},{"../test":35,"./common":8}],13:[function(n,e,t){(function(l,u,r){"use strict"; +l.exports=function(l){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(l).filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})}},,,,function(l,n,e){"use strict";(function(l){e(53),mocha.setup({reporter:"spec",ui:"bdd"});var n=e(55);n.keys().forEach(n),l.nextTick(function(){return mocha.run()})}).call(this,e(42))},function(l,n,e){(function(l,n){var e;!function(){return function l(n,t,u){function r(i,a){if(!t[i]){if(!n[i]){if(!a&&"function"==typeof e&&e)return e(i,!0);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=t[i]={exports:{}};n[i][0].call(c.exports,function(l){return r(n[i][1][l]||l)},c,c.exports,l,n,t,u)}return t[i].exports}for(var o="function"==typeof e&&e,i=0;i1&&e.shift(),i.suite.create({title:l,file:r,fn:!1})},u.suite.only=function(l){return e.length>1&&e.shift(),i.suite.only({title:l,file:r,fn:!1})},u.test=function(l,n){var u=new t(l,n);return u.file=r,e[0].addTest(u),u},u.test.only=function(l,n){return i.test.only(o,u.test(l,n))},u.test.skip=i.test.skip,u.test.retries=i.test.retries})}},{"../test":35,"./common":8}],12:[function(l,n,e){"use strict";var t=l("../test");n.exports=function(n){var e=[n];n.on("pre-require",function(u,r,o){var i=l("./common")(e,u,o);u.setup=i.beforeEach,u.teardown=i.afterEach,u.suiteSetup=i.before,u.suiteTeardown=i.after,u.run=o.options.delay&&i.runWithSuite(n),u.suite=function(l,n){return i.suite.create({title:l,file:r,fn:n})},u.suite.skip=function(l,n){return i.suite.skip({title:l,file:r,fn:n})},u.suite.only=function(l,n){return i.suite.only({title:l,file:r,fn:n})},u.test=function(l,n){var u=e[0];u.isPending()&&(n=null);var o=new t(l,n);return o.file=r,u.addTest(o),o},u.test.only=function(l,n){return i.test.only(o,u.test(l,n))},u.test.skip=i.test.skip,u.test.retries=i.test.retries})}},{"../test":35,"./common":8}],13:[function(n,e,t){(function(l,u,r){"use strict"; /*! * mocha * Copyright(c) 2011 TJ Holowaychuk @@ -178,7 +178,7 @@ var t,u;t=this,u=function(){return function(l){var n={};function e(t){if(n[t])re * @author Feross Aboukhadijeh * @license MIT */ -n.exports=function(l){return null!=l&&(t(l)||function(l){return"function"==typeof l.readFloatLE&&"function"==typeof l.slice&&t(l.slice(0,0))}(l)||!!l._isBuffer)}},{}],52:[function(l,n,e){var t={}.toString;n.exports=Array.isArray||function(l){return"[object Array]"==t.call(l)}},{}],53:[function(l,n,e){(function(e){var t=l("path"),u=l("fs"),r=parseInt("0777",8);function o(l,n,i,a){"function"==typeof n?(i=n,n={}):n&&"object"==typeof n||(n={mode:n});var s=n.mode,c=n.fs||u;void 0===s&&(s=r&~e.umask()),a||(a=null);var f=i||function(){};l=t.resolve(l),c.mkdir(l,s,function(e){if(!e)return f(null,a=a||l);switch(e.code){case"ENOENT":o(t.dirname(l),n,function(e,t){e?f(e,t):o(l,n,f,t)});break;default:c.stat(l,function(l,n){l||!n.isDirectory()?f(e,a):f(null,a)})}})}n.exports=o.mkdirp=o.mkdirP=o,o.sync=function l(n,o,i){o&&"object"==typeof o||(o={mode:o});var a=o.mode,s=o.fs||u;void 0===a&&(a=r&~e.umask()),i||(i=null),n=t.resolve(n);try{s.mkdirSync(n,a),i=i||n}catch(e){switch(e.code){case"ENOENT":i=l(t.dirname(n),o,i),l(n,o,i);break;default:var c;try{c=s.statSync(n)}catch(l){throw e}if(!c.isDirectory())throw e}}return i}}).call(this,l("_process"))},{_process:56,fs:40,path:40}],54:[function(l,n,e){var t=1e3,u=60*t,r=60*u,o=24*r,i=365.25*o;function a(l,n,e){if(!(l0)return function(l){if((l=String(l)).length>100)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(l);if(!n)return;var e=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return e*i;case"days":case"day":case"d":return e*o;case"hours":case"hour":case"hrs":case"hr":case"h":return e*r;case"minutes":case"minute":case"mins":case"min":case"m":return e*u;case"seconds":case"second":case"secs":case"sec":case"s":return e*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}(l);if("number"===s&&!1===isNaN(l))return n.long?a(e=l,o,"day")||a(e,r,"hour")||a(e,u,"minute")||a(e,t,"second")||e+" ms":function(l){if(l>=o)return Math.round(l/o)+"d";if(l>=r)return Math.round(l/r)+"h";if(l>=u)return Math.round(l/u)+"m";if(l>=t)return Math.round(l/t)+"s";return l+"ms"}(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))}},{}],55:[function(l,n,e){(function(l){"use strict";!l.version||0===l.version.indexOf("v0.")||0===l.version.indexOf("v1.")&&0!==l.version.indexOf("v1.8.")?n.exports={nextTick:function(n,e,t,u){if("function"!=typeof n)throw new TypeError('"callback" argument must be a function');var r,o,i=arguments.length;switch(i){case 0:case 1:return l.nextTick(n);case 2:return l.nextTick(function(){n.call(null,e)});case 3:return l.nextTick(function(){n.call(null,e,t)});case 4:return l.nextTick(function(){n.call(null,e,t,u)});default:for(r=new Array(i-1),o=0;o1)for(var e=1;e0?("string"==typeof n||o.objectMode||Object.getPrototypeOf(n)===s.prototype||(n=function(l){return s.from(l)}(n)),t?o.endEmitted?l.emit("error",new Error("stream.unshift() after end event")):A(l,o,n,!0):o.ended?l.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!e?(n=o.decoder.write(n),o.objectMode||0!==n.length?A(l,o,n,!1):T(l,o)):A(l,o,n,!1))):t||(o.reading=!1));return function(l){return!l.ended&&(l.needReadable||l.lengthn.highWaterMark&&(n.highWaterMark=function(l){return l>=E?l=E:(l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++),l}(l)),l<=n.length?l:n.ended?n.length:(n.needReadable=!0,0))}function C(l){var n=l._readableState;n.needReadable=!1,n.emittedReadable||(h("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?u.nextTick(_,l):_(l))}function _(l){h("emit readable"),l.emit("readable"),D(l)}function T(l,n){n.readingMore||(n.readingMore=!0,u.nextTick(S,l,n))}function S(l,n){for(var e=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length=n.length?(e=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.head.data:n.buffer.concat(n.length),n.buffer.clear()):e=function(l,n,e){var t;lr.length?r.length:l;if(o===r.length?u+=r:u+=r.slice(0,l),0===(l-=o)){o===r.length?(++t,e.next?n.head=e.next:n.head=n.tail=null):(n.head=e,e.data=r.slice(o));break}++t}return n.length-=t,u}(l,n):function(l,n){var e=s.allocUnsafe(l),t=n.head,u=1;t.data.copy(e),l-=t.data.length;for(;t=t.next;){var r=t.data,o=l>r.length?r.length:l;if(r.copy(e,e.length-l,0,o),0===(l-=o)){o===r.length?(++u,t.next?n.head=t.next:n.head=n.tail=null):(n.head=t,t.data=r.slice(o));break}++u}return n.length-=u,e}(l,n);return t}(l,n.buffer,n.decoder),e);var e}function j(l){var n=l._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,u.nextTick(O,n,l))}function O(l,n){l.endEmitted||0!==l.length||(l.endEmitted=!0,n.readable=!1,n.emit("end"))}function B(l,n){for(var e=0,t=l.length;e=n.highWaterMark||n.ended))return h("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?j(this):C(this),null;if(0===(l=x(l,n))&&n.ended)return 0===n.length&&j(this),null;var t,u=n.needReadable;return h("need readable",u),(0===n.length||n.length-l0?P(l,n):null)?(n.needReadable=!0,l=0):n.length-=l,0===n.length&&(n.ended||(n.needReadable=!0),e!==l&&n.ended&&j(this)),null!==t&&this.emit("data",t),t},v.prototype._read=function(l){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(n,e){var t=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=n;break;case 1:r.pipes=[r.pipes,n];break;default:r.pipes.push(n)}r.pipesCount+=1,h("pipe count=%d opts=%j",r.pipesCount,e);var a=(!e||!1!==e.end)&&n!==l.stdout&&n!==l.stderr?c:v;function s(l,e){h("onunpipe"),l===t&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h("cleanup"),n.removeListener("close",y),n.removeListener("finish",b),n.removeListener("drain",f),n.removeListener("error",m),n.removeListener("unpipe",s),t.removeListener("end",c),t.removeListener("end",v),t.removeListener("data",g),p=!0,!r.awaitDrain||n._writableState&&!n._writableState.needDrain||f())}function c(){h("onend"),n.end()}r.endEmitted?u.nextTick(a):t.once("end",a),n.on("unpipe",s);var f=function(l){return function(){var n=l._readableState;h("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&i(l,"data")&&(n.flowing=!0,D(l))}}(t);n.on("drain",f);var p=!1;var d=!1;function g(l){h("ondata"),d=!1,!1!==n.write(l)||d||((1===r.pipesCount&&r.pipes===n||r.pipesCount>1&&-1!==B(r.pipes,n))&&!p&&(h("false write response, pause",t._readableState.awaitDrain),t._readableState.awaitDrain++,d=!0),t.pause())}function m(l){h("onerror",l),v(),n.removeListener("error",m),0===i(n,"error")&&n.emit("error",l)}function y(){n.removeListener("finish",b),v()}function b(){h("onfinish"),n.removeListener("close",y),v()}function v(){h("unpipe"),t.unpipe(n)}return t.on("data",g),function(l,n,e){if("function"==typeof l.prependListener)return l.prependListener(n,e);l._events&&l._events[n]?o(l._events[n])?l._events[n].unshift(e):l._events[n]=[e,l._events[n]]:l.on(n,e)}(n,"error",m),n.once("close",y),n.once("finish",b),n.emit("pipe",t),r.flowing||(h("pipe resume"),t.resume()),n},v.prototype.unpipe=function(l){var n=this._readableState,e={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return l&&l!==n.pipes?this:(l||(l=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,l&&l.emit("unpipe",this,e),this);if(!l){var t=n.pipes,u=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var r=0;r-1?n:r.nextTick;b.WritableState=y;var s=e("core-util-is");s.inherits=e("inherits");var c={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),p=e("safe-buffer").Buffer,h=u.Uint8Array||function(){};var d,g=e("./internal/streams/destroy");function m(){}function y(l,n){i=i||e("./_stream_duplex"),l=l||{};var t=n instanceof i;this.objectMode=!!l.objectMode,t&&(this.objectMode=this.objectMode||!!l.writableObjectMode);var u=l.highWaterMark,s=l.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:t&&(s||0===s)?s:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===l.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(l){!function(l,n){var e=l._writableState,t=e.sync,u=e.writecb;if(function(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}(e),n)!function(l,n,e,t,u){--n.pendingcb,e?(r.nextTick(u,t),r.nextTick(C,l,n),l._writableState.errorEmitted=!0,l.emit("error",t)):(u(t),l._writableState.errorEmitted=!0,l.emit("error",t),C(l,n))}(l,e,t,n,u);else{var o=E(e);o||e.corked||e.bufferProcessing||!e.bufferedRequest||A(l,e),t?a(w,l,e,o,u):w(l,e,o,u)}}(n,l)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function b(l){if(i=i||e("./_stream_duplex"),!(d.call(b,this)||this instanceof i))return new b(l);this._writableState=new y(l,this),this.writable=!0,l&&("function"==typeof l.write&&(this._write=l.write),"function"==typeof l.writev&&(this._writev=l.writev),"function"==typeof l.destroy&&(this._destroy=l.destroy),"function"==typeof l.final&&(this._final=l.final)),f.call(this)}function v(l,n,e,t,u,r,o){n.writelen=t,n.writecb=o,n.writing=!0,n.sync=!0,e?l._writev(u,n.onwrite):l._write(u,r,n.onwrite),n.sync=!1}function w(l,n,e,t){e||function(l,n){0===n.length&&n.needDrain&&(n.needDrain=!1,l.emit("drain"))}(l,n),n.pendingcb--,t(),C(l,n)}function A(l,n){n.bufferProcessing=!0;var e=n.bufferedRequest;if(l._writev&&e&&e.next){var t=n.bufferedRequestCount,u=new Array(t),r=n.corkedRequestsFree;r.entry=e;for(var i=0,a=!0;e;)u[i]=e,e.isBuf||(a=!1),e=e.next,i+=1;u.allBuffers=a,v(l,n,!0,n.length,u,"",r.finish),n.pendingcb++,n.lastBufferedRequest=null,r.next?(n.corkedRequestsFree=r.next,r.next=null):n.corkedRequestsFree=new o(n),n.bufferedRequestCount=0}else{for(;e;){var s=e.chunk,c=e.encoding,f=e.callback;if(v(l,n,!1,n.objectMode?1:s.length,s,c,f),e=e.next,n.bufferedRequestCount--,n.writing)break}null===e&&(n.lastBufferedRequest=null)}n.bufferedRequest=e,n.bufferProcessing=!1}function E(l){return l.ending&&0===l.length&&null===l.bufferedRequest&&!l.finished&&!l.writing}function x(l,n){l._final(function(e){n.pendingcb--,e&&l.emit("error",e),n.prefinished=!0,l.emit("prefinish"),C(l,n)})}function C(l,n){var e=E(n);return e&&(!function(l,n){n.prefinished||n.finalCalled||("function"==typeof l._final?(n.pendingcb++,n.finalCalled=!0,r.nextTick(x,l,n)):(n.prefinished=!0,l.emit("prefinish")))}(l,n),0===n.pendingcb&&(n.finished=!0,l.emit("finish"))),e}s.inherits(b,f),y.prototype.getBuffer=function(){for(var l=this.bufferedRequest,n=[];l;)n.push(l),l=l.next;return n},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(l){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(l){return!!d.call(this,l)||this===b&&(l&&l._writableState instanceof y)}})):d=function(l){return l instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(l,n,e){var t,u=this._writableState,o=!1,i=!u.objectMode&&(t=l,p.isBuffer(t)||t instanceof h);return i&&!p.isBuffer(l)&&(l=function(l){return p.from(l)}(l)),"function"==typeof n&&(e=n,n=null),i?n="buffer":n||(n=u.defaultEncoding),"function"!=typeof e&&(e=m),u.ended?function(l,n){var e=new Error("write after end");l.emit("error",e),r.nextTick(n,e)}(this,e):(i||function(l,n,e,t){var u=!0,o=!1;return null===e?o=new TypeError("May not write null values to stream"):"string"==typeof e||void 0===e||n.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(l.emit("error",o),r.nextTick(t,o),u=!1),u}(this,u,l,e))&&(u.pendingcb++,o=function(l,n,e,t,u,r){if(!e){var o=function(l,n,e){l.objectMode||!1===l.decodeStrings||"string"!=typeof n||(n=p.from(n,e));return n}(n,t,u);t!==o&&(e=!0,u="buffer",t=o)}var i=n.objectMode?1:t.length;n.length+=i;var a=n.length-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(l,n,e){e(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(l,n,e){var t=this._writableState;"function"==typeof l?(e=l,l=null,n=null):"function"==typeof n&&(e=n,n=null),null!=l&&this.write(l,n),t.corked&&(t.corked=1,this.uncork()),t.ending||t.finished||function(l,n,e){n.ending=!0,C(l,n),e&&(n.finished?r.nextTick(e):l.once("finish",e));n.ended=!0,l.writable=!1}(this,t,e)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(l){this._writableState&&(this._writableState.destroyed=l)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(l,n){this.end(),n(l)}}).call(this,e("_process"),void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":58,"./internal/streams/destroy":64,"./internal/streams/stream":65,_process:56,"core-util-is":42,inherits:50,"process-nextick-args":55,"safe-buffer":70,"util-deprecate":73}],63:[function(l,n,e){"use strict";var t=l("safe-buffer").Buffer,u=l("util");n.exports=function(){function l(){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(l){var n={data:l,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},l.prototype.unshift=function(l){var n={data:l,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},l.prototype.shift=function(){if(0!==this.length){var l=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(l){if(0===this.length)return"";for(var n=this.head,e=""+n.data;n=n.next;)e+=l+n.data;return e},l.prototype.concat=function(l){if(0===this.length)return t.alloc(0);if(1===this.length)return this.head.data;for(var n,e,u,r=t.allocUnsafe(l>>>0),o=this.head,i=0;o;)n=o.data,e=r,u=i,n.copy(e,u),i+=o.data.length,o=o.next;return r},l}(),u&&u.inspect&&u.inspect.custom&&(n.exports.prototype[u.inspect.custom]=function(){var l=u.inspect({length:this.length});return this.constructor.name+" "+l})},{"safe-buffer":70,util:38}],64:[function(l,n,e){"use strict";var t=l("process-nextick-args");function u(l,n){l.emit("error",n)}n.exports={destroy:function(l,n){var e=this,r=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return r||o?(n?n(l):!l||this._writableState&&this._writableState.errorEmitted||t.nextTick(u,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(l){!n&&l?(t.nextTick(u,e,l),e._writableState&&(e._writableState.errorEmitted=!0)):n&&n(l)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":55}],65:[function(l,n,e){n.exports=l("events").EventEmitter},{events:47}],66:[function(l,n,e){n.exports=l("./readable").PassThrough},{"./readable":67}],67:[function(l,n,e){(e=n.exports=l("./lib/_stream_readable.js")).Stream=e,e.Readable=e,e.Writable=l("./lib/_stream_writable.js"),e.Duplex=l("./lib/_stream_duplex.js"),e.Transform=l("./lib/_stream_transform.js"),e.PassThrough=l("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":58,"./lib/_stream_passthrough.js":59,"./lib/_stream_readable.js":60,"./lib/_stream_transform.js":61,"./lib/_stream_writable.js":62}],68:[function(l,n,e){n.exports=l("./readable").Transform},{"./readable":67}],69:[function(l,n,e){n.exports=l("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":62}],70:[function(l,n,e){var t=l("buffer"),u=t.Buffer;function r(l,n){for(var e in l)n[e]=l[e]}function o(l,n,e){return u(l,n,e)}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?n.exports=t:(r(t,e),e.Buffer=o),r(u,o),o.from=function(l,n,e){if("number"==typeof l)throw new TypeError("Argument must not be a number");return u(l,n,e)},o.alloc=function(l,n,e){if("number"!=typeof l)throw new TypeError("Argument must be a number");var t=u(l);return void 0!==n?"string"==typeof e?t.fill(n,e):t.fill(n):t.fill(0),t},o.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return u(l)},o.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return t.SlowBuffer(l)}},{buffer:41}],71:[function(l,n,e){n.exports=u;var t=l("events").EventEmitter;function u(){t.call(this)}l("inherits")(u,t),u.Readable=l("readable-stream/readable.js"),u.Writable=l("readable-stream/writable.js"),u.Duplex=l("readable-stream/duplex.js"),u.Transform=l("readable-stream/transform.js"),u.PassThrough=l("readable-stream/passthrough.js"),u.Stream=u,u.prototype.pipe=function(l,n){var e=this;function u(n){l.writable&&!1===l.write(n)&&e.pause&&e.pause()}function r(){e.readable&&e.resume&&e.resume()}e.on("data",u),l.on("drain",r),l._isStdio||n&&!1===n.end||(e.on("end",i),e.on("close",a));var o=!1;function i(){o||(o=!0,l.end())}function a(){o||(o=!0,"function"==typeof l.destroy&&l.destroy())}function s(l){if(c(),0===t.listenerCount(this,"error"))throw l}function c(){e.removeListener("data",u),l.removeListener("drain",r),e.removeListener("end",i),e.removeListener("close",a),e.removeListener("error",s),l.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),l.removeListener("close",c)}return e.on("error",s),l.on("error",s),e.on("end",c),e.on("close",c),l.on("close",c),l.emit("pipe",e),l}},{events:47,inherits:50,"readable-stream/duplex.js":57,"readable-stream/passthrough.js":66,"readable-stream/readable.js":67,"readable-stream/transform.js":68,"readable-stream/writable.js":69}],72:[function(l,n,e){"use strict";var t=l("safe-buffer").Buffer,u=t.isEncoding||function(l){switch((l=""+l)&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(l){var n;switch(this.encoding=function(l){var n=function(l){if(!l)return"utf8";for(var n;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(n)return;l=(""+l).toLowerCase(),n=!0}}(l);if("string"!=typeof n&&(t.isEncoding===u||!u(l)))throw new Error("Unknown encoding: "+l);return n||l}(l),this.encoding){case"utf16le":this.text=a,this.end=s,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=c,this.end=f,n=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}function o(l){return l<=127?0:l>>5==6?2:l>>4==14?3:l>>3==30?4:l>>6==2?-1:-2}function i(l){var n=this.lastTotal-this.lastNeed,e=function(l,n,e){if(128!=(192&n[0]))return l.lastNeed=0,"�";if(l.lastNeed>1&&n.length>1){if(128!=(192&n[1]))return l.lastNeed=1,"�";if(l.lastNeed>2&&n.length>2&&128!=(192&n[2]))return l.lastNeed=2,"�"}}(this,l);return void 0!==e?e:this.lastNeed<=l.length?(l.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(l.copy(this.lastChar,n,0,l.length),void(this.lastNeed-=l.length))}function a(l,n){if((l.length-n)%2==0){var e=l.toString("utf16le",n);if(e){var t=e.charCodeAt(e.length-1);if(t>=55296&&t<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",n,l.length-1)}function s(l){var n=l&&l.length?this.write(l):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,e)}return n}function c(l,n){var e=(l.length-n)%3;return 0===e?l.toString("base64",n):(this.lastNeed=3-e,this.lastTotal=3,1===e?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",n,l.length-e))}function f(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function p(l){return l.toString(this.encoding)}function h(l){return l&&l.length?this.write(l):""}e.StringDecoder=r,r.prototype.write=function(l){if(0===l.length)return"";var n,e;if(this.lastNeed){if(void 0===(n=this.fillLast(l)))return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e=0)return u>0&&(l.lastNeed=u-1),u;if(--t=0)return u>0&&(l.lastNeed=u-2),u;if(--t=0)return u>0&&(2===u?u=0:l.lastNeed=u-3),u;return 0}(this,l,n);if(!this.lastNeed)return l.toString("utf8",n);this.lastTotal=e;var t=l.length-(e-this.lastNeed);return l.copy(this.lastChar,0,t),l.toString("utf8",n,t)},r.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length}},{"safe-buffer":70}],73:[function(n,e,t){(function(l){function n(n){try{if(!l.localStorage)return!1}catch(l){return!1}var e=l.localStorage[n];return null!=e&&"true"===String(e).toLowerCase()}e.exports=function(l,e){if(n("noDeprecation"))return l;var t=!1;return function(){if(!t){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return l.apply(this,arguments)}}}).call(this,void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],74:[function(l,n,e){arguments[4][50][0].apply(e,arguments)},{dup:50}],75:[function(l,n,e){n.exports=function(l){return l&&"object"==typeof l&&"function"==typeof l.copy&&"function"==typeof l.fill&&"function"==typeof l.readUInt8}},{}],76:[function(n,e,t){(function(l,e){var u=/%[sdj%]/g;t.format=function(l){if(!y(l)){for(var n=[],e=0;e=r)return l;switch(l){case"%s":return String(t[e++]);case"%d":return Number(t[e++]);case"%j":try{return JSON.stringify(t[e++])}catch(l){return"[Circular]"}default:return l}}),a=t[e];e=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),d(n)?e.showHidden=n:n&&t._extend(e,n),b(e.showHidden)&&(e.showHidden=!1),b(e.depth)&&(e.depth=2),b(e.colors)&&(e.colors=!1),b(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=a),c(e,l,e.depth)}function a(l,n){var e=i.styles[n];return e?"["+i.colors[e][0]+"m"+l+"["+i.colors[e][1]+"m":l}function s(l,n){return l}function c(l,n,e){if(l.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var u=n.inspect(e,l);return y(u)||(u=c(l,u,e)),u}var r=function(l,n){if(b(n))return l.stylize("undefined","undefined");if(y(n)){var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string")}if(m(n))return l.stylize(""+n,"number");if(d(n))return l.stylize(""+n,"boolean");if(g(n))return l.stylize("null","null")}(l,n);if(r)return r;var o=Object.keys(n),i=function(l){var n={};return l.forEach(function(l,e){n[l]=!0}),n}(o);if(l.showHidden&&(o=Object.getOwnPropertyNames(n)),E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(n);if(0===o.length){if(x(n)){var a=n.name?": "+n.name:"";return l.stylize("[Function"+a+"]","special")}if(v(n))return l.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return l.stylize(Date.prototype.toString.call(n),"date");if(E(n))return f(n)}var s,w="",C=!1,_=["{","}"];(h(n)&&(C=!0,_=["[","]"]),x(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(w=" "+RegExp.prototype.toString.call(n)),A(n)&&(w=" "+Date.prototype.toUTCString.call(n)),E(n)&&(w=" "+f(n)),0!==o.length||C&&0!=n.length?e<0?v(n)?l.stylize(RegExp.prototype.toString.call(n),"regexp"):l.stylize("[Object]","special"):(l.seen.push(n),s=C?function(l,n,e,t,u){for(var r=[],o=0,i=n.length;o=0&&0,l+n.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1];return e[0]+n+" "+l.join(", ")+" "+e[1]}(s,w,_)):_[0]+w+_[1]}function f(l){return"["+Error.prototype.toString.call(l)+"]"}function p(l,n,e,t,u,r){var o,i,a;if((a=Object.getOwnPropertyDescriptor(n,u)||{value:n[u]}).get?i=a.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):a.set&&(i=l.stylize("[Setter]","special")),S(t,u)||(o="["+u+"]"),i||(l.seen.indexOf(a.value)<0?(i=g(e)?c(l,a.value,null):c(l,a.value,e-1)).indexOf("\n")>-1&&(i=r?i.split("\n").map(function(l){return" "+l}).join("\n").substr(2):"\n"+i.split("\n").map(function(l){return" "+l}).join("\n")):i=l.stylize("[Circular]","special")),b(o)){if(r&&u.match(/^\d+$/))return i;(o=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=l.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=l.stylize(o,"string"))}return o+": "+i}function h(l){return Array.isArray(l)}function d(l){return"boolean"==typeof l}function g(l){return null===l}function m(l){return"number"==typeof l}function y(l){return"string"==typeof l}function b(l){return void 0===l}function v(l){return w(l)&&"[object RegExp]"===C(l)}function w(l){return"object"==typeof l&&null!==l}function A(l){return w(l)&&"[object Date]"===C(l)}function E(l){return w(l)&&("[object Error]"===C(l)||l instanceof Error)}function x(l){return"function"==typeof l}function C(l){return Object.prototype.toString.call(l)}function _(l){return l<10?"0"+l.toString(10):l.toString(10)}t.debuglog=function(n){if(b(r)&&(r=l.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(r)){var e=l.pid;o[n]=function(){var l=t.format.apply(t,arguments);console.error("%s %d: %s",n,e,l)}}else o[n]=function(){};return o[n]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(l){return null==l},t.isNumber=m,t.isString=y,t.isSymbol=function(l){return"symbol"==typeof l},t.isUndefined=b,t.isRegExp=v,t.isObject=w,t.isDate=A,t.isError=E,t.isFunction=x,t.isPrimitive=function(l){return null===l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||"symbol"==typeof l||void 0===l},t.isBuffer=n("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(l,n){return Object.prototype.hasOwnProperty.call(l,n)}t.log=function(){var l,n;console.log("%s - %s",(l=new Date,n=[_(l.getHours()),_(l.getMinutes()),_(l.getSeconds())].join(":"),[l.getDate(),T[l.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n("inherits"),t._extend=function(l,n){if(!n||!w(n))return l;for(var e=Object.keys(n),t=e.length;t--;)l[e[t]]=n[e[t]];return l}}).call(this,n("_process"),void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":75,_process:56,inherits:74}]},{},[1])}).call(this,e(15),e(38).setImmediate)},function(l,n,e){(function(l,n){!function(l,e){"use strict";if(!l.setImmediate){var t,u,r,o,i,a=1,s={},c=!1,f=l.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(l);p=p&&p.setTimeout?p:l,"[object process]"==={}.toString.call(l.process)?t=function(l){n.nextTick(function(){d(l)})}:!function(){if(l.postMessage&&!l.importScripts){var n=!0,e=l.onmessage;return l.onmessage=function(){n=!1},l.postMessage("","*"),l.onmessage=e,n}}()?l.MessageChannel?((r=new MessageChannel).port1.onmessage=function(l){d(l.data)},t=function(l){r.port2.postMessage(l)}):f&&"onreadystatechange"in f.createElement("script")?(u=f.documentElement,t=function(l){var n=f.createElement("script");n.onreadystatechange=function(){d(l),n.onreadystatechange=null,u.removeChild(n),n=null},u.appendChild(n)}):t=function(l){setTimeout(d,0,l)}:(o="setImmediate$"+Math.random()+"$",i=function(n){n.source===l&&"string"==typeof n.data&&0===n.data.indexOf(o)&&d(+n.data.slice(o.length))},l.addEventListener?l.addEventListener("message",i,!1):l.attachEvent("onmessage",i),t=function(n){l.postMessage(o+n,"*")}),p.setImmediate=function(l){"function"!=typeof l&&(l=new Function(""+l));for(var n=new Array(arguments.length-1),e=0;e1)for(var e=1;e0)return function(l){if((l=String(l)).length>100)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(l);if(!n)return;var e=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return e*i;case"days":case"day":case"d":return e*o;case"hours":case"hour":case"hrs":case"hr":case"h":return e*r;case"minutes":case"minute":case"mins":case"min":case"m":return e*u;case"seconds":case"second":case"secs":case"sec":case"s":return e*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}(l);if("number"===s&&!1===isNaN(l))return n.long?a(e=l,o,"day")||a(e,r,"hour")||a(e,u,"minute")||a(e,t,"second")||e+" ms":function(l){if(l>=o)return Math.round(l/o)+"d";if(l>=r)return Math.round(l/r)+"h";if(l>=u)return Math.round(l/u)+"m";if(l>=t)return Math.round(l/t)+"s";return l+"ms"}(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))}},{}],55:[function(l,n,e){(function(l){"use strict";!l.version||0===l.version.indexOf("v0.")||0===l.version.indexOf("v1.")&&0!==l.version.indexOf("v1.8.")?n.exports={nextTick:function(n,e,t,u){if("function"!=typeof n)throw new TypeError('"callback" argument must be a function');var r,o,i=arguments.length;switch(i){case 0:case 1:return l.nextTick(n);case 2:return l.nextTick(function(){n.call(null,e)});case 3:return l.nextTick(function(){n.call(null,e,t)});case 4:return l.nextTick(function(){n.call(null,e,t,u)});default:for(r=new Array(i-1),o=0;o1)for(var e=1;e0?("string"==typeof n||o.objectMode||Object.getPrototypeOf(n)===s.prototype||(n=function(l){return s.from(l)}(n)),t?o.endEmitted?l.emit("error",new Error("stream.unshift() after end event")):A(l,o,n,!0):o.ended?l.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!e?(n=o.decoder.write(n),o.objectMode||0!==n.length?A(l,o,n,!1):T(l,o)):A(l,o,n,!1))):t||(o.reading=!1));return function(l){return!l.ended&&(l.needReadable||l.lengthn.highWaterMark&&(n.highWaterMark=function(l){return l>=E?l=E:(l--,l|=l>>>1,l|=l>>>2,l|=l>>>4,l|=l>>>8,l|=l>>>16,l++),l}(l)),l<=n.length?l:n.ended?n.length:(n.needReadable=!0,0))}function C(l){var n=l._readableState;n.needReadable=!1,n.emittedReadable||(h("emitReadable",n.flowing),n.emittedReadable=!0,n.sync?u.nextTick(_,l):_(l))}function _(l){h("emit readable"),l.emit("readable"),D(l)}function T(l,n){n.readingMore||(n.readingMore=!0,u.nextTick(S,l,n))}function S(l,n){for(var e=n.length;!n.reading&&!n.flowing&&!n.ended&&n.length=n.length?(e=n.decoder?n.buffer.join(""):1===n.buffer.length?n.buffer.head.data:n.buffer.concat(n.length),n.buffer.clear()):e=function(l,n,e){var t;lr.length?r.length:l;if(o===r.length?u+=r:u+=r.slice(0,l),0===(l-=o)){o===r.length?(++t,e.next?n.head=e.next:n.head=n.tail=null):(n.head=e,e.data=r.slice(o));break}++t}return n.length-=t,u}(l,n):function(l,n){var e=s.allocUnsafe(l),t=n.head,u=1;t.data.copy(e),l-=t.data.length;for(;t=t.next;){var r=t.data,o=l>r.length?r.length:l;if(r.copy(e,e.length-l,0,o),0===(l-=o)){o===r.length?(++u,t.next?n.head=t.next:n.head=n.tail=null):(n.head=t,t.data=r.slice(o));break}++u}return n.length-=u,e}(l,n);return t}(l,n.buffer,n.decoder),e);var e}function j(l){var n=l._readableState;if(n.length>0)throw new Error('"endReadable()" called on non-empty stream');n.endEmitted||(n.ended=!0,u.nextTick(O,n,l))}function O(l,n){l.endEmitted||0!==l.length||(l.endEmitted=!0,n.readable=!1,n.emit("end"))}function B(l,n){for(var e=0,t=l.length;e=n.highWaterMark||n.ended))return h("read: emitReadable",n.length,n.ended),0===n.length&&n.ended?j(this):C(this),null;if(0===(l=x(l,n))&&n.ended)return 0===n.length&&j(this),null;var t,u=n.needReadable;return h("need readable",u),(0===n.length||n.length-l0?P(l,n):null)?(n.needReadable=!0,l=0):n.length-=l,0===n.length&&(n.ended||(n.needReadable=!0),e!==l&&n.ended&&j(this)),null!==t&&this.emit("data",t),t},v.prototype._read=function(l){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(n,e){var t=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=n;break;case 1:r.pipes=[r.pipes,n];break;default:r.pipes.push(n)}r.pipesCount+=1,h("pipe count=%d opts=%j",r.pipesCount,e);var a=(!e||!1!==e.end)&&n!==l.stdout&&n!==l.stderr?c:v;function s(l,e){h("onunpipe"),l===t&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,h("cleanup"),n.removeListener("close",y),n.removeListener("finish",b),n.removeListener("drain",f),n.removeListener("error",m),n.removeListener("unpipe",s),t.removeListener("end",c),t.removeListener("end",v),t.removeListener("data",g),p=!0,!r.awaitDrain||n._writableState&&!n._writableState.needDrain||f())}function c(){h("onend"),n.end()}r.endEmitted?u.nextTick(a):t.once("end",a),n.on("unpipe",s);var f=function(l){return function(){var n=l._readableState;h("pipeOnDrain",n.awaitDrain),n.awaitDrain&&n.awaitDrain--,0===n.awaitDrain&&i(l,"data")&&(n.flowing=!0,D(l))}}(t);n.on("drain",f);var p=!1;var d=!1;function g(l){h("ondata"),d=!1,!1!==n.write(l)||d||((1===r.pipesCount&&r.pipes===n||r.pipesCount>1&&-1!==B(r.pipes,n))&&!p&&(h("false write response, pause",t._readableState.awaitDrain),t._readableState.awaitDrain++,d=!0),t.pause())}function m(l){h("onerror",l),v(),n.removeListener("error",m),0===i(n,"error")&&n.emit("error",l)}function y(){n.removeListener("finish",b),v()}function b(){h("onfinish"),n.removeListener("close",y),v()}function v(){h("unpipe"),t.unpipe(n)}return t.on("data",g),function(l,n,e){if("function"==typeof l.prependListener)return l.prependListener(n,e);l._events&&l._events[n]?o(l._events[n])?l._events[n].unshift(e):l._events[n]=[e,l._events[n]]:l.on(n,e)}(n,"error",m),n.once("close",y),n.once("finish",b),n.emit("pipe",t),r.flowing||(h("pipe resume"),t.resume()),n},v.prototype.unpipe=function(l){var n=this._readableState,e={hasUnpiped:!1};if(0===n.pipesCount)return this;if(1===n.pipesCount)return l&&l!==n.pipes?this:(l||(l=n.pipes),n.pipes=null,n.pipesCount=0,n.flowing=!1,l&&l.emit("unpipe",this,e),this);if(!l){var t=n.pipes,u=n.pipesCount;n.pipes=null,n.pipesCount=0,n.flowing=!1;for(var r=0;r-1?n:r.nextTick;b.WritableState=y;var s=e("core-util-is");s.inherits=e("inherits");var c={deprecate:e("util-deprecate")},f=e("./internal/streams/stream"),p=e("safe-buffer").Buffer,h=u.Uint8Array||function(){};var d,g=e("./internal/streams/destroy");function m(){}function y(l,n){i=i||e("./_stream_duplex"),l=l||{};var t=n instanceof i;this.objectMode=!!l.objectMode,t&&(this.objectMode=this.objectMode||!!l.writableObjectMode);var u=l.highWaterMark,s=l.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:t&&(s||0===s)?s:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===l.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(l){!function(l,n){var e=l._writableState,t=e.sync,u=e.writecb;if(function(l){l.writing=!1,l.writecb=null,l.length-=l.writelen,l.writelen=0}(e),n)!function(l,n,e,t,u){--n.pendingcb,e?(r.nextTick(u,t),r.nextTick(C,l,n),l._writableState.errorEmitted=!0,l.emit("error",t)):(u(t),l._writableState.errorEmitted=!0,l.emit("error",t),C(l,n))}(l,e,t,n,u);else{var o=E(e);o||e.corked||e.bufferProcessing||!e.bufferedRequest||A(l,e),t?a(w,l,e,o,u):w(l,e,o,u)}}(n,l)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function b(l){if(i=i||e("./_stream_duplex"),!(d.call(b,this)||this instanceof i))return new b(l);this._writableState=new y(l,this),this.writable=!0,l&&("function"==typeof l.write&&(this._write=l.write),"function"==typeof l.writev&&(this._writev=l.writev),"function"==typeof l.destroy&&(this._destroy=l.destroy),"function"==typeof l.final&&(this._final=l.final)),f.call(this)}function v(l,n,e,t,u,r,o){n.writelen=t,n.writecb=o,n.writing=!0,n.sync=!0,e?l._writev(u,n.onwrite):l._write(u,r,n.onwrite),n.sync=!1}function w(l,n,e,t){e||function(l,n){0===n.length&&n.needDrain&&(n.needDrain=!1,l.emit("drain"))}(l,n),n.pendingcb--,t(),C(l,n)}function A(l,n){n.bufferProcessing=!0;var e=n.bufferedRequest;if(l._writev&&e&&e.next){var t=n.bufferedRequestCount,u=new Array(t),r=n.corkedRequestsFree;r.entry=e;for(var i=0,a=!0;e;)u[i]=e,e.isBuf||(a=!1),e=e.next,i+=1;u.allBuffers=a,v(l,n,!0,n.length,u,"",r.finish),n.pendingcb++,n.lastBufferedRequest=null,r.next?(n.corkedRequestsFree=r.next,r.next=null):n.corkedRequestsFree=new o(n),n.bufferedRequestCount=0}else{for(;e;){var s=e.chunk,c=e.encoding,f=e.callback;if(v(l,n,!1,n.objectMode?1:s.length,s,c,f),e=e.next,n.bufferedRequestCount--,n.writing)break}null===e&&(n.lastBufferedRequest=null)}n.bufferedRequest=e,n.bufferProcessing=!1}function E(l){return l.ending&&0===l.length&&null===l.bufferedRequest&&!l.finished&&!l.writing}function x(l,n){l._final(function(e){n.pendingcb--,e&&l.emit("error",e),n.prefinished=!0,l.emit("prefinish"),C(l,n)})}function C(l,n){var e=E(n);return e&&(!function(l,n){n.prefinished||n.finalCalled||("function"==typeof l._final?(n.pendingcb++,n.finalCalled=!0,r.nextTick(x,l,n)):(n.prefinished=!0,l.emit("prefinish")))}(l,n),0===n.pendingcb&&(n.finished=!0,l.emit("finish"))),e}s.inherits(b,f),y.prototype.getBuffer=function(){for(var l=this.bufferedRequest,n=[];l;)n.push(l),l=l.next;return n},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(l){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(l){return!!d.call(this,l)||this===b&&(l&&l._writableState instanceof y)}})):d=function(l){return l instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(l,n,e){var t,u=this._writableState,o=!1,i=!u.objectMode&&(t=l,p.isBuffer(t)||t instanceof h);return i&&!p.isBuffer(l)&&(l=function(l){return p.from(l)}(l)),"function"==typeof n&&(e=n,n=null),i?n="buffer":n||(n=u.defaultEncoding),"function"!=typeof e&&(e=m),u.ended?function(l,n){var e=new Error("write after end");l.emit("error",e),r.nextTick(n,e)}(this,e):(i||function(l,n,e,t){var u=!0,o=!1;return null===e?o=new TypeError("May not write null values to stream"):"string"==typeof e||void 0===e||n.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(l.emit("error",o),r.nextTick(t,o),u=!1),u}(this,u,l,e))&&(u.pendingcb++,o=function(l,n,e,t,u,r){if(!e){var o=function(l,n,e){l.objectMode||!1===l.decodeStrings||"string"!=typeof n||(n=p.from(n,e));return n}(n,t,u);t!==o&&(e=!0,u="buffer",t=o)}var i=n.objectMode?1:t.length;n.length+=i;var a=n.length-1))throw new TypeError("Unknown encoding: "+l);return this._writableState.defaultEncoding=l,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(l,n,e){e(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(l,n,e){var t=this._writableState;"function"==typeof l?(e=l,l=null,n=null):"function"==typeof n&&(e=n,n=null),null!=l&&this.write(l,n),t.corked&&(t.corked=1,this.uncork()),t.ending||t.finished||function(l,n,e){n.ending=!0,C(l,n),e&&(n.finished?r.nextTick(e):l.once("finish",e));n.ended=!0,l.writable=!1}(this,t,e)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(l){this._writableState&&(this._writableState.destroyed=l)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(l,n){this.end(),n(l)}}).call(this,e("_process"),void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":58,"./internal/streams/destroy":64,"./internal/streams/stream":65,_process:56,"core-util-is":42,inherits:50,"process-nextick-args":55,"safe-buffer":70,"util-deprecate":73}],63:[function(l,n,e){"use strict";var t=l("safe-buffer").Buffer,u=l("util");n.exports=function(){function l(){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.head=null,this.tail=null,this.length=0}return l.prototype.push=function(l){var n={data:l,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},l.prototype.unshift=function(l){var n={data:l,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length},l.prototype.shift=function(){if(0!==this.length){var l=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,l}},l.prototype.clear=function(){this.head=this.tail=null,this.length=0},l.prototype.join=function(l){if(0===this.length)return"";for(var n=this.head,e=""+n.data;n=n.next;)e+=l+n.data;return e},l.prototype.concat=function(l){if(0===this.length)return t.alloc(0);if(1===this.length)return this.head.data;for(var n,e,u,r=t.allocUnsafe(l>>>0),o=this.head,i=0;o;)n=o.data,e=r,u=i,n.copy(e,u),i+=o.data.length,o=o.next;return r},l}(),u&&u.inspect&&u.inspect.custom&&(n.exports.prototype[u.inspect.custom]=function(){var l=u.inspect({length:this.length});return this.constructor.name+" "+l})},{"safe-buffer":70,util:38}],64:[function(l,n,e){"use strict";var t=l("process-nextick-args");function u(l,n){l.emit("error",n)}n.exports={destroy:function(l,n){var e=this,r=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return r||o?(n?n(l):!l||this._writableState&&this._writableState.errorEmitted||t.nextTick(u,this,l),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(l||null,function(l){!n&&l?(t.nextTick(u,e,l),e._writableState&&(e._writableState.errorEmitted=!0)):n&&n(l)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":55}],65:[function(l,n,e){n.exports=l("events").EventEmitter},{events:47}],66:[function(l,n,e){n.exports=l("./readable").PassThrough},{"./readable":67}],67:[function(l,n,e){(e=n.exports=l("./lib/_stream_readable.js")).Stream=e,e.Readable=e,e.Writable=l("./lib/_stream_writable.js"),e.Duplex=l("./lib/_stream_duplex.js"),e.Transform=l("./lib/_stream_transform.js"),e.PassThrough=l("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":58,"./lib/_stream_passthrough.js":59,"./lib/_stream_readable.js":60,"./lib/_stream_transform.js":61,"./lib/_stream_writable.js":62}],68:[function(l,n,e){n.exports=l("./readable").Transform},{"./readable":67}],69:[function(l,n,e){n.exports=l("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":62}],70:[function(l,n,e){var t=l("buffer"),u=t.Buffer;function r(l,n){for(var e in l)n[e]=l[e]}function o(l,n,e){return u(l,n,e)}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?n.exports=t:(r(t,e),e.Buffer=o),r(u,o),o.from=function(l,n,e){if("number"==typeof l)throw new TypeError("Argument must not be a number");return u(l,n,e)},o.alloc=function(l,n,e){if("number"!=typeof l)throw new TypeError("Argument must be a number");var t=u(l);return void 0!==n?"string"==typeof e?t.fill(n,e):t.fill(n):t.fill(0),t},o.allocUnsafe=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return u(l)},o.allocUnsafeSlow=function(l){if("number"!=typeof l)throw new TypeError("Argument must be a number");return t.SlowBuffer(l)}},{buffer:41}],71:[function(l,n,e){n.exports=u;var t=l("events").EventEmitter;function u(){t.call(this)}l("inherits")(u,t),u.Readable=l("readable-stream/readable.js"),u.Writable=l("readable-stream/writable.js"),u.Duplex=l("readable-stream/duplex.js"),u.Transform=l("readable-stream/transform.js"),u.PassThrough=l("readable-stream/passthrough.js"),u.Stream=u,u.prototype.pipe=function(l,n){var e=this;function u(n){l.writable&&!1===l.write(n)&&e.pause&&e.pause()}function r(){e.readable&&e.resume&&e.resume()}e.on("data",u),l.on("drain",r),l._isStdio||n&&!1===n.end||(e.on("end",i),e.on("close",a));var o=!1;function i(){o||(o=!0,l.end())}function a(){o||(o=!0,"function"==typeof l.destroy&&l.destroy())}function s(l){if(c(),0===t.listenerCount(this,"error"))throw l}function c(){e.removeListener("data",u),l.removeListener("drain",r),e.removeListener("end",i),e.removeListener("close",a),e.removeListener("error",s),l.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),l.removeListener("close",c)}return e.on("error",s),l.on("error",s),e.on("end",c),e.on("close",c),l.on("close",c),l.emit("pipe",e),l}},{events:47,inherits:50,"readable-stream/duplex.js":57,"readable-stream/passthrough.js":66,"readable-stream/readable.js":67,"readable-stream/transform.js":68,"readable-stream/writable.js":69}],72:[function(l,n,e){"use strict";var t=l("safe-buffer").Buffer,u=t.isEncoding||function(l){switch((l=""+l)&&l.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(l){var n;switch(this.encoding=function(l){var n=function(l){if(!l)return"utf8";for(var n;;)switch(l){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return l;default:if(n)return;l=(""+l).toLowerCase(),n=!0}}(l);if("string"!=typeof n&&(t.isEncoding===u||!u(l)))throw new Error("Unknown encoding: "+l);return n||l}(l),this.encoding){case"utf16le":this.text=a,this.end=s,n=4;break;case"utf8":this.fillLast=i,n=4;break;case"base64":this.text=c,this.end=f,n=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(n)}function o(l){return l<=127?0:l>>5==6?2:l>>4==14?3:l>>3==30?4:l>>6==2?-1:-2}function i(l){var n=this.lastTotal-this.lastNeed,e=function(l,n,e){if(128!=(192&n[0]))return l.lastNeed=0,"�";if(l.lastNeed>1&&n.length>1){if(128!=(192&n[1]))return l.lastNeed=1,"�";if(l.lastNeed>2&&n.length>2&&128!=(192&n[2]))return l.lastNeed=2,"�"}}(this,l);return void 0!==e?e:this.lastNeed<=l.length?(l.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(l.copy(this.lastChar,n,0,l.length),void(this.lastNeed-=l.length))}function a(l,n){if((l.length-n)%2==0){var e=l.toString("utf16le",n);if(e){var t=e.charCodeAt(e.length-1);if(t>=55296&&t<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=l[l.length-1],l.toString("utf16le",n,l.length-1)}function s(l){var n=l&&l.length?this.write(l):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,e)}return n}function c(l,n){var e=(l.length-n)%3;return 0===e?l.toString("base64",n):(this.lastNeed=3-e,this.lastTotal=3,1===e?this.lastChar[0]=l[l.length-1]:(this.lastChar[0]=l[l.length-2],this.lastChar[1]=l[l.length-1]),l.toString("base64",n,l.length-e))}function f(l){var n=l&&l.length?this.write(l):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function p(l){return l.toString(this.encoding)}function h(l){return l&&l.length?this.write(l):""}e.StringDecoder=r,r.prototype.write=function(l){if(0===l.length)return"";var n,e;if(this.lastNeed){if(void 0===(n=this.fillLast(l)))return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e=0)return u>0&&(l.lastNeed=u-1),u;if(--t=0)return u>0&&(l.lastNeed=u-2),u;if(--t=0)return u>0&&(2===u?u=0:l.lastNeed=u-3),u;return 0}(this,l,n);if(!this.lastNeed)return l.toString("utf8",n);this.lastTotal=e;var t=l.length-(e-this.lastNeed);return l.copy(this.lastChar,0,t),l.toString("utf8",n,t)},r.prototype.fillLast=function(l){if(this.lastNeed<=l.length)return l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);l.copy(this.lastChar,this.lastTotal-this.lastNeed,0,l.length),this.lastNeed-=l.length}},{"safe-buffer":70}],73:[function(n,e,t){(function(l){function n(n){try{if(!l.localStorage)return!1}catch(l){return!1}var e=l.localStorage[n];return null!=e&&"true"===String(e).toLowerCase()}e.exports=function(l,e){if(n("noDeprecation"))return l;var t=!1;return function(){if(!t){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),t=!0}return l.apply(this,arguments)}}}).call(this,void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],74:[function(l,n,e){arguments[4][50][0].apply(e,arguments)},{dup:50}],75:[function(l,n,e){n.exports=function(l){return l&&"object"==typeof l&&"function"==typeof l.copy&&"function"==typeof l.fill&&"function"==typeof l.readUInt8}},{}],76:[function(n,e,t){(function(l,e){var u=/%[sdj%]/g;t.format=function(l){if(!y(l)){for(var n=[],e=0;e=r)return l;switch(l){case"%s":return String(t[e++]);case"%d":return Number(t[e++]);case"%j":try{return JSON.stringify(t[e++])}catch(l){return"[Circular]"}default:return l}}),a=t[e];e=3&&(e.depth=arguments[2]),arguments.length>=4&&(e.colors=arguments[3]),d(n)?e.showHidden=n:n&&t._extend(e,n),b(e.showHidden)&&(e.showHidden=!1),b(e.depth)&&(e.depth=2),b(e.colors)&&(e.colors=!1),b(e.customInspect)&&(e.customInspect=!0),e.colors&&(e.stylize=a),c(e,l,e.depth)}function a(l,n){var e=i.styles[n];return e?"["+i.colors[e][0]+"m"+l+"["+i.colors[e][1]+"m":l}function s(l,n){return l}function c(l,n,e){if(l.customInspect&&n&&x(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var u=n.inspect(e,l);return y(u)||(u=c(l,u,e)),u}var r=function(l,n){if(b(n))return l.stylize("undefined","undefined");if(y(n)){var e="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(e,"string")}if(m(n))return l.stylize(""+n,"number");if(d(n))return l.stylize(""+n,"boolean");if(g(n))return l.stylize("null","null")}(l,n);if(r)return r;var o=Object.keys(n),i=function(l){var n={};return l.forEach(function(l,e){n[l]=!0}),n}(o);if(l.showHidden&&(o=Object.getOwnPropertyNames(n)),E(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(n);if(0===o.length){if(x(n)){var a=n.name?": "+n.name:"";return l.stylize("[Function"+a+"]","special")}if(v(n))return l.stylize(RegExp.prototype.toString.call(n),"regexp");if(A(n))return l.stylize(Date.prototype.toString.call(n),"date");if(E(n))return f(n)}var s,w="",C=!1,_=["{","}"];(h(n)&&(C=!0,_=["[","]"]),x(n))&&(w=" [Function"+(n.name?": "+n.name:"")+"]");return v(n)&&(w=" "+RegExp.prototype.toString.call(n)),A(n)&&(w=" "+Date.prototype.toUTCString.call(n)),E(n)&&(w=" "+f(n)),0!==o.length||C&&0!=n.length?e<0?v(n)?l.stylize(RegExp.prototype.toString.call(n),"regexp"):l.stylize("[Object]","special"):(l.seen.push(n),s=C?function(l,n,e,t,u){for(var r=[],o=0,i=n.length;o=0&&0,l+n.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return e[0]+(""===n?"":n+"\n ")+" "+l.join(",\n ")+" "+e[1];return e[0]+n+" "+l.join(", ")+" "+e[1]}(s,w,_)):_[0]+w+_[1]}function f(l){return"["+Error.prototype.toString.call(l)+"]"}function p(l,n,e,t,u,r){var o,i,a;if((a=Object.getOwnPropertyDescriptor(n,u)||{value:n[u]}).get?i=a.set?l.stylize("[Getter/Setter]","special"):l.stylize("[Getter]","special"):a.set&&(i=l.stylize("[Setter]","special")),S(t,u)||(o="["+u+"]"),i||(l.seen.indexOf(a.value)<0?(i=g(e)?c(l,a.value,null):c(l,a.value,e-1)).indexOf("\n")>-1&&(i=r?i.split("\n").map(function(l){return" "+l}).join("\n").substr(2):"\n"+i.split("\n").map(function(l){return" "+l}).join("\n")):i=l.stylize("[Circular]","special")),b(o)){if(r&&u.match(/^\d+$/))return i;(o=JSON.stringify(""+u)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=l.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=l.stylize(o,"string"))}return o+": "+i}function h(l){return Array.isArray(l)}function d(l){return"boolean"==typeof l}function g(l){return null===l}function m(l){return"number"==typeof l}function y(l){return"string"==typeof l}function b(l){return void 0===l}function v(l){return w(l)&&"[object RegExp]"===C(l)}function w(l){return"object"==typeof l&&null!==l}function A(l){return w(l)&&"[object Date]"===C(l)}function E(l){return w(l)&&("[object Error]"===C(l)||l instanceof Error)}function x(l){return"function"==typeof l}function C(l){return Object.prototype.toString.call(l)}function _(l){return l<10?"0"+l.toString(10):l.toString(10)}t.debuglog=function(n){if(b(r)&&(r=l.env.NODE_DEBUG||""),n=n.toUpperCase(),!o[n])if(new RegExp("\\b"+n+"\\b","i").test(r)){var e=l.pid;o[n]=function(){var l=t.format.apply(t,arguments);console.error("%s %d: %s",n,e,l)}}else o[n]=function(){};return o[n]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=d,t.isNull=g,t.isNullOrUndefined=function(l){return null==l},t.isNumber=m,t.isString=y,t.isSymbol=function(l){return"symbol"==typeof l},t.isUndefined=b,t.isRegExp=v,t.isObject=w,t.isDate=A,t.isError=E,t.isFunction=x,t.isPrimitive=function(l){return null===l||"boolean"==typeof l||"number"==typeof l||"string"==typeof l||"symbol"==typeof l||void 0===l},t.isBuffer=n("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(l,n){return Object.prototype.hasOwnProperty.call(l,n)}t.log=function(){var l,n;console.log("%s - %s",(l=new Date,n=[_(l.getHours()),_(l.getMinutes()),_(l.getSeconds())].join(":"),[l.getDate(),T[l.getMonth()],n].join(" ")),t.format.apply(t,arguments))},t.inherits=n("inherits"),t._extend=function(l,n){if(!n||!w(n))return l;for(var e=Object.keys(n),t=e.length;t--;)l[e[t]]=n[e[t]];return l}}).call(this,n("_process"),void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":75,_process:56,inherits:74}]},{},[1])}).call(this,e(15),e(38).setImmediate)},function(l,n,e){(function(l,n){!function(l,e){"use strict";if(!l.setImmediate){var t,u,r,o,i,a=1,s={},c=!1,f=l.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(l);p=p&&p.setTimeout?p:l,"[object process]"==={}.toString.call(l.process)?t=function(l){n.nextTick(function(){d(l)})}:!function(){if(l.postMessage&&!l.importScripts){var n=!0,e=l.onmessage;return l.onmessage=function(){n=!1},l.postMessage("","*"),l.onmessage=e,n}}()?l.MessageChannel?((r=new MessageChannel).port1.onmessage=function(l){d(l.data)},t=function(l){r.port2.postMessage(l)}):f&&"onreadystatechange"in f.createElement("script")?(u=f.documentElement,t=function(l){var n=f.createElement("script");n.onreadystatechange=function(){d(l),n.onreadystatechange=null,u.removeChild(n),n=null},u.appendChild(n)}):t=function(l){setTimeout(d,0,l)}:(o="setImmediate$"+Math.random()+"$",i=function(n){n.source===l&&"string"==typeof n.data&&0===n.data.indexOf(o)&&d(+n.data.slice(o.length))},l.addEventListener?l.addEventListener("message",i,!1):l.attachEvent("onmessage",i),t=function(n){l.postMessage(o+n,"*")}),p.setImmediate=function(l){"function"!=typeof l&&(l=new Function(""+l));for(var n=new Array(arguments.length-1),e=0;e @@ -206,7 +206,7 @@ n.getMessage=e(61), /*! * actual utility */ -n.getActual=e(43), +n.getActual=e(44), /*! * Inspect util */ @@ -214,7 +214,7 @@ n.inspect=e(40), /*! * Object Display util */ -n.objDisplay=e(44), +n.objDisplay=e(45), /*! * Flag utility */ @@ -238,7 +238,7 @@ n.hasProperty=t.hasProperty, /*! * Function name */ -n.getName=e(45), +n.getName=e(46), /*! * add Property */ @@ -270,7 +270,7 @@ n.compareByInspect=e(70), /*! * Get own enumerable property symbols method */ -n.getOwnEnumerablePropertySymbols=e(47), +n.getOwnEnumerablePropertySymbols=e(48), /*! * Get own enumerable properties method */ @@ -309,7 +309,7 @@ var t=e(3);l.exports=function(l,n){var e=t(l,"negate"),u=n[0];return e?!u:u}},fu * Copyright(c) 2012-2014 Jake Luer * MIT Licensed */ -var t=e(42),u=e(3),r=e(39);l.exports=function(l,n){var e=u(l,"message"),o=u(l,"ssfi");e=e?e+": ":"",l=u(l,"object"),(n=n.map(function(l){return l.toLowerCase()})).sort();var i=n.map(function(l,e){var t=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an":"a";return(n.length>1&&e===n.length-1?"or ":"")+t+" "+l}).join(", "),a=r(l).toLowerCase();if(!n.some(function(l){return a===l}))throw new t(e+"object tested must be "+i+", but "+a+" given",void 0,o)}},function(l,n,e){ +var t=e(43),u=e(3),r=e(39);l.exports=function(l,n){var e=u(l,"message"),o=u(l,"ssfi");e=e?e+": ":"",l=u(l,"object"),(n=n.map(function(l){return l.toLowerCase()})).sort();var i=n.map(function(l,e){var t=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an":"a";return(n.length>1&&e===n.length-1?"or ":"")+t+" "+l}).join(", "),a=r(l).toLowerCase();if(!n.some(function(l){return a===l}))throw new t(e+"object tested must be "+i+", but "+a+" given",void 0,o)}},function(l,n,e){ /*! * Chai - message composition utility * Copyright(c) 2012-2014 Jake Luer @@ -318,7 +318,7 @@ var t=e(42),u=e(3),r=e(39);l.exports=function(l,n){var e=u(l,"message"),o=u(l,"s /*! * Module dependencies */ -var t=e(3),u=e(43),r=e(44);l.exports=function(l,n){var e=t(l,"negate"),o=t(l,"object"),i=n[3],a=u(l,n),s=e?n[2]:n[1],c=t(l,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,function(){return r(o)}).replace(/#\{act\}/g,function(){return r(a)}).replace(/#\{exp\}/g,function(){return r(i)}),c?c+": "+s:s}},function(l,n){ +var t=e(3),u=e(44),r=e(45);l.exports=function(l,n){var e=t(l,"negate"),o=t(l,"object"),i=n[3],a=u(l,n),s=e?n[2]:n[1],c=t(l,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,function(){return r(o)}).replace(/#\{act\}/g,function(){return r(a)}).replace(/#\{exp\}/g,function(){return r(i)}),c?c+": "+s:s}},function(l,n){ /*! * Chai - getEnumerableProperties utility * Copyright(c) 2012-2014 Jake Luer @@ -506,7 +506,7 @@ var t=e(40);l.exports=function(l,n){return t(l) diff --git a/test/browser.stub.js b/test/browser.stub.js index 0030683..7f2af08 100644 --- a/test/browser.stub.js +++ b/test/browser.stub.js @@ -7,8 +7,15 @@ require( "mocha/mocha.js" ); +mocha.setup( { + + reporter: "spec", + ui: "bdd", + +} ); + const context = require.context( "./", true, /.+\.(spec|test)\.js?$/ ); context.keys().forEach( context ); -module.exports = context; +process.nextTick( () => mocha.run() );