rb-document-form-constructor 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -79,6 +79,20 @@ const UtFormConfig = {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
return fields;
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
parseFacets(formConfig) {
|
|
85
|
+
let facets = [];
|
|
86
|
+
formConfig.sections.every(section => {
|
|
87
|
+
section.columns.every(c => {
|
|
88
|
+
c.fields.forEach(f => {
|
|
89
|
+
if (!facets.indexOf(f.facet)) {
|
|
90
|
+
facets.push(f.facet);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
return facets;
|
|
82
96
|
}
|
|
83
97
|
|
|
84
98
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var RbDocumentFormConstructor=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={findField:function(e,t){if(!t||!t.sections)return null;var n=null;return t.sections.every((function(t){if(t.columns&&t.columns.every((function(t){if(t.fields.forEach((function(t){t.name===e&&(n=t)})),n)return!1})),n)return!1})),n},findRule:function(e,t){if(!t||!t.sections)return null;var n=null;return t.sections.every((function(t){if(t.columns&&t.columns.every((function(t){if(t.fields.every((function(t){if(t.rules&&t.rules.forEach((function(t){t.id===e&&(n=t)})),n)return!1})),n)return!1})),n)return!1})),n},getFields:function(e){var t=[];return e.sections.forEach((function(e){e.columns&&e.columns.forEach((function(e){e.fields&&e.fields.forEach((function(e){t.push(e)}))}))})),t}},c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var f=u((function(e,t){!function(e){var t,n,r,i,o,a,l,s,c,u,f,p,d,h,m;function v(e,t){if(!e)throw new Error("ASSERT: "+t)}function g(e,t){return l.slice(e,t)}function b(e){return"0123456789".indexOf(e)>=0}function y(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function x(e){return"01234567".indexOf(e)>=0}function S(e){return" "===e||"\t"===e||"\v"===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" \ufeff".indexOf(e)>=0}function w(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function E(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e.charCodeAt(0)>=128&&a.NonAsciiIdentifierStart.test(e)}function _(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e.charCodeAt(0)>=128&&a.NonAsciiIdentifierPart.test(e)}function C(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function O(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function I(e){return"eval"===e||"arguments"===e}function k(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":case"yield":case"let":return!0}return!(!s||!O(e))||C(e)}function D(){var e,t,n;for(t=!1,n=!1;c<p;)if(e=l[c],n)w(e=l[c++])&&(n=!1,"\r"===e&&"\n"===l[c]&&++c,++u,f=c);else if(t)w(e)?("\r"===e&&"\n"===l[c+1]&&++c,++u,++c,f=c,c>=p&&$({},o.UnexpectedToken,"ILLEGAL")):(e=l[c++],c>=p&&$({},o.UnexpectedToken,"ILLEGAL"),"*"===e&&"/"===(e=l[c])&&(++c,t=!1));else if("/"===e)if("/"===(e=l[c+1]))c+=2,n=!0;else{if("*"!==e)break;t=!0,(c+=2)>=p&&$({},o.UnexpectedToken,"ILLEGAL")}else if(S(e))++c;else{if(!w(e))break;++c,"\r"===e&&"\n"===l[c]&&++c,++u,f=c}}function F(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(c<p&&y(l[c])))return"";r=l[c++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(i)}function T(){var e,n,r,i;if(E(e=l[c])){if(n=c,"\\"===e){if(++c,"u"!==l[c])return;if(i=++c,e=F("u")){if("\\"===e||!E(e))return;r=e}else c=i,r="u"}else r=l[c++];for(;c<p&&_(e=l[c]);)if("\\"===e){if(++c,"u"!==l[c])return;if(i=++c,e=F("u")){if("\\"===e||!_(e))return;r+=e}else c=i,r+="u"}else r+=l[c++];return 1===r.length?{type:t.Identifier,value:r,lineNumber:u,lineStart:f,range:[n,c]}:k(r)?{type:t.Keyword,value:r,lineNumber:u,lineStart:f,range:[n,c]}:"null"===r?{type:t.NullLiteral,value:r,lineNumber:u,lineStart:f,range:[n,c]}:"true"===r||"false"===r?{type:t.BooleanLiteral,value:r,lineNumber:u,lineStart:f,range:[n,c]}:{type:t.Identifier,value:r,lineNumber:u,lineStart:f,range:[n,c]}}}function P(){var e,n,r,i=c,o=l[c];return";"===o||"{"===o||"}"===o||","===o||"("===o||")"===o?(++c,{type:t.Punctuator,value:o,lineNumber:u,lineStart:f,range:[i,c]}):(e=l[c+1],"."!==o||b(e)?(n=l[c+2],r=l[c+3],">"===o&&">"===e&&">"===n&&"="===r?(c+=4,{type:t.Punctuator,value:">>>=",lineNumber:u,lineStart:f,range:[i,c]}):"="===o&&"="===e&&"="===n?(c+=3,{type:t.Punctuator,value:"===",lineNumber:u,lineStart:f,range:[i,c]}):"!"===o&&"="===e&&"="===n?(c+=3,{type:t.Punctuator,value:"!==",lineNumber:u,lineStart:f,range:[i,c]}):">"===o&&">"===e&&">"===n?(c+=3,{type:t.Punctuator,value:">>>",lineNumber:u,lineStart:f,range:[i,c]}):"<"===o&&"<"===e&&"="===n?(c+=3,{type:t.Punctuator,value:"<<=",lineNumber:u,lineStart:f,range:[i,c]}):">"===o&&">"===e&&"="===n?(c+=3,{type:t.Punctuator,value:">>=",lineNumber:u,lineStart:f,range:[i,c]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0||o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(c+=2,{type:t.Punctuator,value:o+e,lineNumber:u,lineStart:f,range:[i,c]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:t.Punctuator,value:l[c++],lineNumber:u,lineStart:f,range:[i,c]}:void 0):{type:t.Punctuator,value:l[c++],lineNumber:u,lineStart:f,range:[i,c]})}function L(){var e,n,r;if(v(b(r=l[c])||"."===r,"Numeric literal must start with a decimal digit or a decimal point"),n=c,e="","."!==r){if(e=l[c++],r=l[c],"0"===e){if("x"===r||"X"===r){for(e+=l[c++];c<p&&y(r=l[c]);)e+=l[c++];return e.length<=2&&$({},o.UnexpectedToken,"ILLEGAL"),c<p&&E(r=l[c])&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(e,16),lineNumber:u,lineStart:f,range:[n,c]}}if(x(r)){for(e+=l[c++];c<p&&x(r=l[c]);)e+=l[c++];return c<p&&(E(r=l[c])||b(r))&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:u,lineStart:f,range:[n,c]}}b(r)&&$({},o.UnexpectedToken,"ILLEGAL")}for(;c<p&&b(r=l[c]);)e+=l[c++]}if("."===r)for(e+=l[c++];c<p&&b(r=l[c]);)e+=l[c++];if("e"===r||"E"===r)if(e+=l[c++],"+"!==(r=l[c])&&"-"!==r||(e+=l[c++]),b(r=l[c]))for(e+=l[c++];c<p&&b(r=l[c]);)e+=l[c++];else r="character "+r,c>=p&&(r="<end>"),$({},o.UnexpectedToken,"ILLEGAL");return c<p&&E(r=l[c])&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:u,lineStart:f,range:[n,c]}}function A(){var e,n,r,i,a,s,d="",h=!1;for(v("'"===(e=l[c])||'"'===e,"String literal must starts with a quote"),n=c,++c;c<p;){if((r=l[c++])===e){e="";break}if("\\"===r)if(w(r=l[c++]))++u,"\r"===r&&"\n"===l[c]&&++c;else switch(r){case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"u":case"x":s=c,(a=F(r))?d+=a:(c=s,d+=r);break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:x(r)?(0!==(i="01234567".indexOf(r))&&(h=!0),c<p&&x(l[c])&&(h=!0,i=8*i+"01234567".indexOf(l[c++]),"0123".indexOf(r)>=0&&c<p&&x(l[c])&&(i=8*i+"01234567".indexOf(l[c++]))),d+=String.fromCharCode(i)):d+=r}else{if(w(r))break;d+=r}}return""!==e&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:d,octal:h,lineNumber:u,lineStart:f,range:[n,c]}}function R(){var e,t,n,r,i,a,s,u=!1,f=!1;for(d=null,D(),n=c,v("/"===(t=l[c]),"Regular expression literal must start with a slash"),e=l[c++];c<p;)if(e+=t=l[c++],"\\"===t)w(t=l[c++])&&$({},o.UnterminatedRegExp),e+=t;else if(u)"]"===t&&(u=!1);else{if("/"===t){f=!0;break}"["===t?u=!0:w(t)&&$({},o.UnterminatedRegExp)}for(f||$({},o.UnterminatedRegExp),r=e.substr(1,e.length-2),i="";c<p&&_(t=l[c]);)if(++c,"\\"===t&&c<p)if("u"===(t=l[c]))if(s=++c,t=F("u"))for(i+=t,e+="\\u";s<c;++s)e+=l[s];else c=s,i+="u",e+="\\u";else e+="\\";else i+=t,e+=t;try{a=new RegExp(r,i)}catch(e){$({},o.InvalidRegExp)}return{literal:e,value:a,range:[n,c]}}function N(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}function j(){var e,n;return D(),c>=p?{type:t.EOF,lineNumber:u,lineStart:f,range:[c,c]}:void 0!==(n=P())?n:"'"===(e=l[c])||'"'===e?A():"."===e||b(e)?L():void 0!==(n=T())?n:void $({},o.UnexpectedToken,"ILLEGAL")}function M(){var e;return d?(c=d.range[1],u=d.lineNumber,f=d.lineStart,e=d,d=null,e):(d=null,j())}function B(){var e,t,n;return null!==d||(e=c,t=u,n=f,d=j(),c=e,u=t,f=n),d}function V(){var e,t,n,r;return e=c,t=u,n=f,D(),r=u!==t,c=e,u=t,f=n,r}function $(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(function(e,t){return r[t]||""}));throw"number"==typeof e.lineNumber?((n=new Error("Line "+e.lineNumber+": "+i)).index=e.range[0],n.lineNumber=e.lineNumber,n.column=e.range[0]-f+1):((n=new Error("Line "+u+": "+i)).index=c,n.lineNumber=u,n.column=c-f+1),n}function U(){try{$.apply(null,arguments)}catch(e){if(!m.errors)throw e;m.errors.push(e)}}function H(e){if(e.type===t.EOF&&$(e,o.UnexpectedEOS),e.type===t.NumericLiteral&&$(e,o.UnexpectedNumber),e.type===t.StringLiteral&&$(e,o.UnexpectedString),e.type===t.Identifier&&$(e,o.UnexpectedIdentifier),e.type===t.Keyword){if(C(e.value))$(e,o.UnexpectedReserved);else if(s&&O(e.value))return void U(e,o.StrictReservedWord);$(e,o.UnexpectedToken,e.value)}$(e,o.UnexpectedToken,e.value)}function X(e){var n=M();n.type===t.Punctuator&&n.value===e||H(n)}function W(e){var n=M();n.type===t.Keyword&&n.value===e||H(n)}function G(e){var n=B();return n.type===t.Punctuator&&n.value===e}function Y(e){var n=B();return n.type===t.Keyword&&n.value===e}function z(){var e=B(),n=e.value;return e.type===t.Punctuator&&("="===n||"*="===n||"/="===n||"%="===n||"+="===n||"-="===n||"<<="===n||">>="===n||">>>="===n||"&="===n||"^="===n||"|="===n)}function q(){var e,n;";"!==l[c]?(n=u,D(),u===n&&(G(";")?M():(e=B()).type===t.EOF||G("}")||H(e))):M()}function J(e){return e.type===r.Identifier||e.type===r.MemberExpression}function K(){var e=[];for(X("[");!G("]");)G(",")?(M(),e.push(null)):(e.push(_e()),G("]")||X(","));return X("]"),{type:r.ArrayExpression,elements:e}}function Z(e,t){var n,i;return n=s,i=Ke(),t&&s&&I(e[0].name)&&U(t,o.StrictParamName),s=n,{type:r.FunctionExpression,id:null,params:e,defaults:[],body:i,rest:null,generator:!1,expression:!1}}function Q(){var e=M();return e.type===t.StringLiteral||e.type===t.NumericLiteral?(s&&e.octal&&U(e,o.StrictOctalLiteral),ct(e)):{type:r.Identifier,name:e.value}}function ee(){var e,n,i,a;return(e=B()).type===t.Identifier?(i=Q(),"get"!==e.value||G(":")?"set"!==e.value||G(":")?(X(":"),{type:r.Property,key:i,value:_e(),kind:"init"}):(n=Q(),X("("),(e=B()).type!==t.Identifier?(X(")"),U(e,o.UnexpectedToken,e.value),{type:r.Property,key:n,value:Z([]),kind:"set"}):(a=[ke()],X(")"),{type:r.Property,key:n,value:Z(a,e),kind:"set"})):(n=Q(),X("("),X(")"),{type:r.Property,key:n,value:Z([]),kind:"get"})):e.type!==t.EOF&&e.type!==t.Punctuator?(n=Q(),X(":"),{type:r.Property,key:n,value:_e(),kind:"init"}):void H(e)}function te(){var e,t,n,a=[],l={},c=String;for(X("{");!G("}");)t=(e=ee()).key.type===r.Identifier?e.key.name:c(e.key.value),n="init"===e.kind?i.Data:"get"===e.kind?i.Get:i.Set,Object.prototype.hasOwnProperty.call(l,t)?(l[t]===i.Data?s&&n===i.Data?U({},o.StrictDuplicateProperty):n!==i.Data&&U({},o.AccessorDataProperty):n===i.Data?U({},o.AccessorDataProperty):l[t]&n&&U({},o.AccessorGetSet),l[t]|=n):l[t]=n,a.push(e),G("}")||X(",");return X("}"),{type:r.ObjectExpression,properties:a}}function ne(){var e;return X("("),e=Ce(),X(")"),e}function re(){var e=B(),n=e.type;if(n===t.Identifier)return{type:r.Identifier,name:M().value};if(n===t.StringLiteral||n===t.NumericLiteral)return s&&e.octal&&U(e,o.StrictOctalLiteral),ct(M());if(n===t.Keyword){if(Y("this"))return M(),{type:r.ThisExpression};if(Y("function"))return Qe()}return n===t.BooleanLiteral?(M(),e.value="true"===e.value,ct(e)):n===t.NullLiteral?(M(),e.value=null,ct(e)):G("[")?K():G("{")?te():G("(")?ne():G("/")||G("/=")?ct(R()):H(M())}function ie(){var e=[];if(X("("),!G(")"))for(;c<p&&(e.push(_e()),!G(")"));)X(",");return X(")"),e}function oe(){var e=M();return N(e)||H(e),{type:r.Identifier,name:e.value}}function ae(){return X("."),oe()}function le(){var e;return X("["),e=Ce(),X("]"),e}function se(){var e;return W("new"),e={type:r.NewExpression,callee:ue(),arguments:[]},G("(")&&(e.arguments=ie()),e}function ce(){var e;for(e=Y("new")?se():re();G(".")||G("[")||G("(");)e=G("(")?{type:r.CallExpression,callee:e,arguments:ie()}:G("[")?{type:r.MemberExpression,computed:!0,object:e,property:le()}:{type:r.MemberExpression,computed:!1,object:e,property:ae()};return e}function ue(){var e;for(e=Y("new")?se():re();G(".")||G("[");)e=G("[")?{type:r.MemberExpression,computed:!0,object:e,property:le()}:{type:r.MemberExpression,computed:!1,object:e,property:ae()};return e}function fe(){var e=ce();return B().type!==t.Punctuator||!G("++")&&!G("--")||V()||(s&&e.type===r.Identifier&&I(e.name)&&U({},o.StrictLHSPostfix),J(e)||U({},o.InvalidLHSInAssignment),e={type:r.UpdateExpression,operator:M().value,argument:e,prefix:!1}),e}function pe(){var e,n;return(e=B()).type!==t.Punctuator&&e.type!==t.Keyword?fe():G("++")||G("--")?(e=M(),n=pe(),s&&n.type===r.Identifier&&I(n.name)&&U({},o.StrictLHSPrefix),J(n)||U({},o.InvalidLHSInAssignment),n={type:r.UpdateExpression,operator:e.value,argument:n,prefix:!0}):G("+")||G("-")||G("~")||G("!")?n={type:r.UnaryExpression,operator:M().value,argument:pe(),prefix:!0}:Y("delete")||Y("void")||Y("typeof")?(n={type:r.UnaryExpression,operator:M().value,argument:pe(),prefix:!0},s&&"delete"===n.operator&&n.argument.type===r.Identifier&&U({},o.StrictDelete),n):fe()}function de(){for(var e=pe();G("*")||G("/")||G("%");)e={type:r.BinaryExpression,operator:M().value,left:e,right:pe()};return e}function he(){for(var e=de();G("+")||G("-");)e={type:r.BinaryExpression,operator:M().value,left:e,right:de()};return e}function me(){for(var e=he();G("<<")||G(">>")||G(">>>");)e={type:r.BinaryExpression,operator:M().value,left:e,right:he()};return e}function ve(){var e,t;for(t=h.allowIn,h.allowIn=!0,e=me();G("<")||G(">")||G("<=")||G(">=")||t&&Y("in")||Y("instanceof");)e={type:r.BinaryExpression,operator:M().value,left:e,right:me()};return h.allowIn=t,e}function ge(){for(var e=ve();G("==")||G("!=")||G("===")||G("!==");)e={type:r.BinaryExpression,operator:M().value,left:e,right:ve()};return e}function be(){for(var e=ge();G("&");)M(),e={type:r.BinaryExpression,operator:"&",left:e,right:ge()};return e}function ye(){for(var e=be();G("^");)M(),e={type:r.BinaryExpression,operator:"^",left:e,right:be()};return e}function xe(){for(var e=ye();G("|");)M(),e={type:r.BinaryExpression,operator:"|",left:e,right:ye()};return e}function Se(){for(var e=xe();G("&&");)M(),e={type:r.LogicalExpression,operator:"&&",left:e,right:xe()};return e}function we(){for(var e=Se();G("||");)M(),e={type:r.LogicalExpression,operator:"||",left:e,right:Se()};return e}function Ee(){var e,t,n;return e=we(),G("?")&&(M(),t=h.allowIn,h.allowIn=!0,n=_e(),h.allowIn=t,X(":"),e={type:r.ConditionalExpression,test:e,consequent:n,alternate:_e()}),e}function _e(){var e,t;return e=B(),t=Ee(),z()&&(J(t)||U({},o.InvalidLHSInAssignment),s&&t.type===r.Identifier&&I(t.name)&&U(e,o.StrictLHSAssignment),t={type:r.AssignmentExpression,operator:M().value,left:t,right:_e()}),t}function Ce(){var e=_e();if(G(","))for(e={type:r.SequenceExpression,expressions:[e]};c<p&&G(",");)M(),e.expressions.push(_e());return e}function Oe(){for(var e,t=[];c<p&&!G("}")&&void 0!==(e=et());)t.push(e);return t}function Ie(){var e;return X("{"),e=Oe(),X("}"),{type:r.BlockStatement,body:e}}function ke(){var e=M();return e.type!==t.Identifier&&H(e),{type:r.Identifier,name:e.value}}function De(e){var t=ke(),n=null;return s&&I(t.name)&&U({},o.StrictVarName),"const"===e?(X("="),n=_e()):G("=")&&(M(),n=_e()),{type:r.VariableDeclarator,id:t,init:n}}function Fe(e){var t=[];do{if(t.push(De(e)),!G(","))break;M()}while(c<p);return t}function Te(){var e;return W("var"),e=Fe(),q(),{type:r.VariableDeclaration,declarations:e,kind:"var"}}function Pe(e){var t;return W(e),t=Fe(e),q(),{type:r.VariableDeclaration,declarations:t,kind:e}}function Le(){return X(";"),{type:r.EmptyStatement}}function Ae(){var e=Ce();return q(),{type:r.ExpressionStatement,expression:e}}function Re(){var e,t,n;return W("if"),X("("),e=Ce(),X(")"),t=Je(),Y("else")?(M(),n=Je()):n=null,{type:r.IfStatement,test:e,consequent:t,alternate:n}}function Ne(){var e,t,n;return W("do"),n=h.inIteration,h.inIteration=!0,e=Je(),h.inIteration=n,W("while"),X("("),t=Ce(),X(")"),G(";")&&M(),{type:r.DoWhileStatement,body:e,test:t}}function je(){var e,t,n;return W("while"),X("("),e=Ce(),X(")"),n=h.inIteration,h.inIteration=!0,t=Je(),h.inIteration=n,{type:r.WhileStatement,test:e,body:t}}function Me(){var e=M();return{type:r.VariableDeclaration,declarations:Fe(),kind:e.value}}function Be(){var e,t,n,i,a,l,s;return e=t=n=null,W("for"),X("("),G(";")?M():(Y("var")||Y("let")?(h.allowIn=!1,e=Me(),h.allowIn=!0,1===e.declarations.length&&Y("in")&&(M(),i=e,a=Ce(),e=null)):(h.allowIn=!1,e=Ce(),h.allowIn=!0,Y("in")&&(J(e)||U({},o.InvalidLHSInForIn),M(),i=e,a=Ce(),e=null)),void 0===i&&X(";")),void 0===i&&(G(";")||(t=Ce()),X(";"),G(")")||(n=Ce())),X(")"),s=h.inIteration,h.inIteration=!0,l=Je(),h.inIteration=s,void 0===i?{type:r.ForStatement,init:e,test:t,update:n,body:l}:{type:r.ForInStatement,left:i,right:a,body:l,each:!1}}function Ve(){var e=null;return W("continue"),";"===l[c]?(M(),h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:null}):V()?(h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:null}):(B().type===t.Identifier&&(e=ke(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)||$({},o.UnknownLabel,e.name)),q(),null!==e||h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:e})}function $e(){var e=null;return W("break"),";"===l[c]?(M(),h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:null}):V()?(h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:null}):(B().type===t.Identifier&&(e=ke(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)||$({},o.UnknownLabel,e.name)),q(),null!==e||h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:e})}function Ue(){var e,n=null;return W("return"),h.inFunctionBody||U({},o.IllegalReturn)," "===l[c]&&E(l[c+1])?(n=Ce(),q(),{type:r.ReturnStatement,argument:n}):V()?{type:r.ReturnStatement,argument:null}:(G(";")||(e=B(),G("}")||e.type===t.EOF||(n=Ce())),q(),{type:r.ReturnStatement,argument:n})}function He(){var e,t;return s&&U({},o.StrictModeWith),W("with"),X("("),e=Ce(),X(")"),t=Je(),{type:r.WithStatement,object:e,body:t}}function Xe(){var e,t,n=[];for(Y("default")?(M(),e=null):(W("case"),e=Ce()),X(":");c<p&&!(G("}")||Y("default")||Y("case"))&&void 0!==(t=Je());)n.push(t);return{type:r.SwitchCase,test:e,consequent:n}}function We(){var e,t,n,i,a;if(W("switch"),X("("),e=Ce(),X(")"),X("{"),t=[],G("}"))return M(),{type:r.SwitchStatement,discriminant:e,cases:t};for(i=h.inSwitch,h.inSwitch=!0,a=!1;c<p&&!G("}");)null===(n=Xe()).test&&(a&&$({},o.MultipleDefaultsInSwitch),a=!0),t.push(n);return h.inSwitch=i,X("}"),{type:r.SwitchStatement,discriminant:e,cases:t}}function Ge(){var e;return W("throw"),V()&&$({},o.NewlineAfterThrow),e=Ce(),q(),{type:r.ThrowStatement,argument:e}}function Ye(){var e;return W("catch"),X("("),G(")")&&H(B()),e=ke(),s&&I(e.name)&&U({},o.StrictCatchVariable),X(")"),{type:r.CatchClause,param:e,body:Ie()}}function ze(){var e,t=[],n=null;return W("try"),e=Ie(),Y("catch")&&t.push(Ye()),Y("finally")&&(M(),n=Ie()),0!==t.length||n||$({},o.NoCatchOrFinally),{type:r.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:n}}function qe(){return W("debugger"),q(),{type:r.DebuggerStatement}}function Je(){var e,n,i=B();if(i.type===t.EOF&&H(i),i.type===t.Punctuator)switch(i.value){case";":return Le();case"{":return Ie();case"(":return Ae()}if(i.type===t.Keyword)switch(i.value){case"break":return $e();case"continue":return Ve();case"debugger":return qe();case"do":return Ne();case"for":return Be();case"function":return Ze();case"if":return Re();case"return":return Ue();case"switch":return We();case"throw":return Ge();case"try":return ze();case"var":return Te();case"while":return je();case"with":return He()}return(e=Ce()).type===r.Identifier&&G(":")?(M(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)&&$({},o.Redeclaration,"Label",e.name),h.labelSet[e.name]=!0,n=Je(),delete h.labelSet[e.name],{type:r.LabeledStatement,label:e,body:n}):(q(),{type:r.ExpressionStatement,expression:e})}function Ke(){var e,n,i,a,l,u,f,d=[];for(X("{");c<p&&(n=B()).type===t.StringLiteral&&(e=et(),d.push(e),e.expression.type===r.Literal);)"use strict"===g(n.range[0]+1,n.range[1]-1)?(s=!0,i&&U(i,o.StrictOctalLiteral)):!i&&n.octal&&(i=n);for(a=h.labelSet,l=h.inIteration,u=h.inSwitch,f=h.inFunctionBody,h.labelSet={},h.inIteration=!1,h.inSwitch=!1,h.inFunctionBody=!0;c<p&&!G("}")&&void 0!==(e=et());)d.push(e);return X("}"),h.labelSet=a,h.inIteration=l,h.inSwitch=u,h.inFunctionBody=f,{type:r.BlockStatement,body:d}}function Ze(){var e,t,n,i,a,l,u,f,d,h=[];if(W("function"),i=B(),e=ke(),s?I(i.value)&&U(i,o.StrictFunctionName):I(i.value)?(l=i,u=o.StrictFunctionName):O(i.value)&&(l=i,u=o.StrictReservedWord),X("("),!G(")"))for(d={};c<p&&(i=B(),t=ke(),s?(I(i.value)&&(a=i,u=o.StrictParamName),Object.prototype.hasOwnProperty.call(d,i.value)&&(a=i,u=o.StrictParamDupe)):l||(I(i.value)?(l=i,u=o.StrictParamName):O(i.value)?(l=i,u=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(d,i.value)&&(l=i,u=o.StrictParamDupe)),h.push(t),d[t.name]=!0,!G(")"));)X(",");return X(")"),f=s,n=Ke(),s&&l&&$(l,u),s&&a&&U(a,u),s=f,{type:r.FunctionDeclaration,id:e,params:h,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function Qe(){var e,t,n,i,a,l,u,f,d=null,h=[];if(W("function"),G("(")||(e=B(),d=ke(),s?I(e.value)&&U(e,o.StrictFunctionName):I(e.value)?(n=e,i=o.StrictFunctionName):O(e.value)&&(n=e,i=o.StrictReservedWord)),X("("),!G(")"))for(f={};c<p&&(e=B(),a=ke(),s?(I(e.value)&&(t=e,i=o.StrictParamName),Object.prototype.hasOwnProperty.call(f,e.value)&&(t=e,i=o.StrictParamDupe)):n||(I(e.value)?(n=e,i=o.StrictParamName):O(e.value)?(n=e,i=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(f,e.value)&&(n=e,i=o.StrictParamDupe)),h.push(a),f[a.name]=!0,!G(")"));)X(",");return X(")"),u=s,l=Ke(),s&&n&&$(n,i),s&&t&&U(t,i),s=u,{type:r.FunctionExpression,id:d,params:h,defaults:[],body:l,rest:null,generator:!1,expression:!1}}function et(){var e=B();if(e.type===t.Keyword)switch(e.value){case"const":case"let":return Pe(e.value);case"function":return Ze();default:return Je()}if(e.type!==t.EOF)return Je()}function tt(){for(var e,n,i,a=[];c<p&&(n=B()).type===t.StringLiteral&&(e=et(),a.push(e),e.expression.type===r.Literal);)"use strict"===g(n.range[0]+1,n.range[1]-1)?(s=!0,i&&U(i,o.StrictOctalLiteral)):!i&&n.octal&&(i=n);for(;c<p&&void 0!==(e=et());)a.push(e);return a}function nt(){return s=!1,{type:r.Program,body:tt()}}function rt(e,t,n,r,i){v("number"==typeof n,"Comment must have valid position"),m.comments.length>0&&m.comments[m.comments.length-1].range[1]>n||m.comments.push({type:e,value:t,range:[n,r],loc:i})}function it(){var e,t,n,r,i,a;for(e="",i=!1,a=!1;c<p;)if(t=l[c],a)w(t=l[c++])?(n.end={line:u,column:c-f-1},a=!1,rt("Line",e,r,c-1,n),"\r"===t&&"\n"===l[c]&&++c,++u,f=c,e=""):c>=p?(a=!1,e+=t,n.end={line:u,column:p-f},rt("Line",e,r,p,n)):e+=t;else if(i)w(t)?("\r"===t&&"\n"===l[c+1]?(++c,e+="\r\n"):e+=t,++u,++c,f=c,c>=p&&$({},o.UnexpectedToken,"ILLEGAL")):(t=l[c++],c>=p&&$({},o.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&"/"===(t=l[c])&&(e=e.substr(0,e.length-1),i=!1,++c,n.end={line:u,column:c-f},rt("Block",e,r,c,n),e=""));else if("/"===t)if("/"===(t=l[c+1]))n={start:{line:u,column:c-f}},r=c,a=!0,(c+=2)>=p&&(n.end={line:u,column:c-f},a=!1,rt("Line",e,r,c,n));else{if("*"!==t)break;r=c,i=!0,n={start:{line:u,column:(c+=2)-f-2}},c>=p&&$({},o.UnexpectedToken,"ILLEGAL")}else if(S(t))++c;else{if(!w(t))break;++c,"\r"===t&&"\n"===l[c]&&++c,++u,f=c}}function ot(){var e,t,n,r=[];for(e=0;e<m.comments.length;++e)n={type:(t=m.comments[e]).type,value:t.value},m.range&&(n.range=t.range),m.loc&&(n.loc=t.loc),r.push(n);m.comments=r}function at(){var e,r,i,o;return D(),e={start:{line:u,column:c-f}},r=m.advance(),e.end={line:u,column:c-f},r.type!==t.EOF&&(i=[r.range[0],r.range[1]],o=g(r.range[0],r.range[1]),m.tokens.push({type:n[r.type],value:o,range:i,loc:e})),r}function lt(){var e,t,n,r;return D(),e=c,t={start:{line:u,column:c-f}},n=m.scanRegExp(),t.end={line:u,column:c-f},m.tokens.length>0&&(r=m.tokens[m.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||m.tokens.pop()),m.tokens.push({type:"RegularExpression",value:n.literal,range:[e,c],loc:t}),n}function st(){var e,t,n,r=[];for(e=0;e<m.tokens.length;++e)n={type:(t=m.tokens[e]).type,value:t.value},m.range&&(n.range=t.range),m.loc&&(n.loc=t.loc),r.push(n);m.tokens=r}function ct(e){return{type:r.Literal,value:e.value}}function ut(e){return{type:r.Literal,value:e.value,raw:g(e.range[0],e.range[1])}}function ft(){var e={};return e.range=[c,c],e.loc={start:{line:u,column:c-f},end:{line:u,column:c-f}},e.end=function(){this.range[1]=c,this.loc.end.line=u,this.loc.end.column=c-f},e.applyGroup=function(e){m.range&&(e.groupRange=[this.range[0],this.range[1]]),m.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){m.range&&(e.range=[this.range[0],this.range[1]]),m.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function pt(){var e,t;return D(),e=ft(),X("("),t=Ce(),X(")"),e.end(),e.applyGroup(t),t}function dt(){var e,t;for(D(),e=ft(),t=Y("new")?se():re();G(".")||G("[");)G("[")?(t={type:r.MemberExpression,computed:!0,object:t,property:le()},e.end(),e.apply(t)):(t={type:r.MemberExpression,computed:!1,object:t,property:ae()},e.end(),e.apply(t));return t}function ht(){var e,t;for(D(),e=ft(),t=Y("new")?se():re();G(".")||G("[")||G("(");)G("(")?(t={type:r.CallExpression,callee:t,arguments:ie()},e.end(),e.apply(t)):G("[")?(t={type:r.MemberExpression,computed:!0,object:t,property:le()},e.end(),e.apply(t)):(t={type:r.MemberExpression,computed:!1,object:t,property:ae()},e.end(),e.apply(t));return t}function mt(e){var t,n,r;for(n in t="[object Array]"===Object.prototype.toString.apply(e)?[]:{},e)e.hasOwnProperty(n)&&"groupRange"!==n&&"groupLoc"!==n&&(null===(r=e[n])||"object"!=typeof r||r instanceof RegExp?t[n]=r:t[n]=mt(r));return t}function vt(e,t){return function(n){function i(e){return e.type===r.LogicalExpression||e.type===r.BinaryExpression}function o(n){var r,a;i(n.left)&&o(n.left),i(n.right)&&o(n.right),e&&(n.left.groupRange||n.right.groupRange?(r=n.left.groupRange?n.left.groupRange[0]:n.left.range[0],a=n.right.groupRange?n.right.groupRange[1]:n.right.range[1],n.range=[r,a]):void 0===n.range&&(r=n.left.range[0],a=n.right.range[1],n.range=[r,a])),t&&(n.left.groupLoc||n.right.groupLoc?(r=n.left.groupLoc?n.left.groupLoc.start:n.left.loc.start,a=n.right.groupLoc?n.right.groupLoc.end:n.right.loc.end,n.loc={start:r,end:a}):void 0===n.loc&&(n.loc={start:n.left.loc.start,end:n.right.loc.end}))}return function(){var r,a;return D(),r=ft(),a=n.apply(null,arguments),r.end(),e&&void 0===a.range&&r.apply(a),t&&void 0===a.loc&&r.apply(a),i(a)&&o(a),a}}}function gt(){var e;m.comments&&(m.skipComment=D,D=it),m.raw&&(m.createLiteral=ct,ct=ut),(m.range||m.loc)&&(m.parseGroupExpression=ne,m.parseLeftHandSideExpression=ue,m.parseLeftHandSideExpressionAllowCall=ce,ne=pt,ue=dt,ce=ht,e=vt(m.range,m.loc),m.parseAdditiveExpression=he,m.parseAssignmentExpression=_e,m.parseBitwiseANDExpression=be,m.parseBitwiseORExpression=xe,m.parseBitwiseXORExpression=ye,m.parseBlock=Ie,m.parseFunctionSourceElements=Ke,m.parseCatchClause=Ye,m.parseComputedMember=le,m.parseConditionalExpression=Ee,m.parseConstLetDeclaration=Pe,m.parseEqualityExpression=ge,m.parseExpression=Ce,m.parseForVariableDeclaration=Me,m.parseFunctionDeclaration=Ze,m.parseFunctionExpression=Qe,m.parseLogicalANDExpression=Se,m.parseLogicalORExpression=we,m.parseMultiplicativeExpression=de,m.parseNewExpression=se,m.parseNonComputedProperty=oe,m.parseObjectProperty=ee,m.parseObjectPropertyKey=Q,m.parsePostfixExpression=fe,m.parsePrimaryExpression=re,m.parseProgram=nt,m.parsePropertyFunction=Z,m.parseRelationalExpression=ve,m.parseStatement=Je,m.parseShiftExpression=me,m.parseSwitchCase=Xe,m.parseUnaryExpression=pe,m.parseVariableDeclaration=De,m.parseVariableIdentifier=ke,he=e(m.parseAdditiveExpression),_e=e(m.parseAssignmentExpression),be=e(m.parseBitwiseANDExpression),xe=e(m.parseBitwiseORExpression),ye=e(m.parseBitwiseXORExpression),Ie=e(m.parseBlock),Ke=e(m.parseFunctionSourceElements),Ye=e(m.parseCatchClause),le=e(m.parseComputedMember),Ee=e(m.parseConditionalExpression),Pe=e(m.parseConstLetDeclaration),ge=e(m.parseEqualityExpression),Ce=e(m.parseExpression),Me=e(m.parseForVariableDeclaration),Ze=e(m.parseFunctionDeclaration),Qe=e(m.parseFunctionExpression),ue=e(ue),Se=e(m.parseLogicalANDExpression),we=e(m.parseLogicalORExpression),de=e(m.parseMultiplicativeExpression),se=e(m.parseNewExpression),oe=e(m.parseNonComputedProperty),ee=e(m.parseObjectProperty),Q=e(m.parseObjectPropertyKey),fe=e(m.parsePostfixExpression),re=e(m.parsePrimaryExpression),nt=e(m.parseProgram),Z=e(m.parsePropertyFunction),ve=e(m.parseRelationalExpression),Je=e(m.parseStatement),me=e(m.parseShiftExpression),Xe=e(m.parseSwitchCase),pe=e(m.parseUnaryExpression),De=e(m.parseVariableDeclaration),ke=e(m.parseVariableIdentifier)),void 0!==m.tokens&&(m.advance=j,m.scanRegExp=R,j=at,R=lt)}function bt(){"function"==typeof m.skipComment&&(D=m.skipComment),m.raw&&(ct=m.createLiteral),(m.range||m.loc)&&(he=m.parseAdditiveExpression,_e=m.parseAssignmentExpression,be=m.parseBitwiseANDExpression,xe=m.parseBitwiseORExpression,ye=m.parseBitwiseXORExpression,Ie=m.parseBlock,Ke=m.parseFunctionSourceElements,Ye=m.parseCatchClause,le=m.parseComputedMember,Ee=m.parseConditionalExpression,Pe=m.parseConstLetDeclaration,ge=m.parseEqualityExpression,Ce=m.parseExpression,Me=m.parseForVariableDeclaration,Ze=m.parseFunctionDeclaration,Qe=m.parseFunctionExpression,ne=m.parseGroupExpression,ue=m.parseLeftHandSideExpression,ce=m.parseLeftHandSideExpressionAllowCall,Se=m.parseLogicalANDExpression,we=m.parseLogicalORExpression,de=m.parseMultiplicativeExpression,se=m.parseNewExpression,oe=m.parseNonComputedProperty,ee=m.parseObjectProperty,Q=m.parseObjectPropertyKey,re=m.parsePrimaryExpression,fe=m.parsePostfixExpression,nt=m.parseProgram,Z=m.parsePropertyFunction,ve=m.parseRelationalExpression,Je=m.parseStatement,me=m.parseShiftExpression,Xe=m.parseSwitchCase,pe=m.parseUnaryExpression,De=m.parseVariableDeclaration,ke=m.parseVariableIdentifier),"function"==typeof m.scanRegExp&&(j=m.advance,R=m.scanRegExp)}function yt(e){var t,n=e.length,r=[];for(t=0;t<n;++t)r[t]=e.charAt(t);return r}function xt(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),c=0,u=(l=e).length>0?1:0,f=0,p=l.length,d=null,h={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},m={},void 0!==t&&(m.range="boolean"==typeof t.range&&t.range,m.loc="boolean"==typeof t.loc&&t.loc,m.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(m.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(m.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(m.errors=[])),p>0&&void 0===l[0]&&(e instanceof String&&(l=e.valueOf()),void 0===l[0]&&(l=yt(e))),gt();try{n=nt(),void 0!==m.comments&&(ot(),n.comments=m.comments),void 0!==m.tokens&&(st(),n.tokens=m.tokens),void 0!==m.errors&&(n.errors=m.errors),(m.range||m.loc)&&(n.body=mt(n.body))}catch(e){throw e}finally{bt(),m={}}return n}(n={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8}).BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",r={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},i={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},a={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},void 0==="esprima"[0]&&(g=function(e,t){return l.slice(e,t).join("")}),e.version="1.0.4",e.parse=xt,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),r)r.hasOwnProperty(e)&&(t[e]=r[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}(t)})),p=function e(t){var n=[],r=[],i=[];Array.isArray(t)?(o(t),function(e,t,n){if(t&&t.length){for(var r=[],i=0;i<t.length;i++)r.push({type:"VariableDeclarator",id:t[i].id,init:null});e.unshift({type:"VariableDeclaration",kind:"var",declarations:r})}if(n&&n.length)for(i=0;i<n.length;i++)e.unshift(n[i])}(t,r,i)):a(t);return t;function o(e){for(var t=0;t<e.length;t++){var n=e[t];if("EmptyStatement"!==n.type)"remove"===a(n)&&e.splice(t--,1)}}function a(t){var l=n[n.length-1],s=!1;n.push(t);var c=!1;for(var u in function(e,t){if("Program"===e.type)return!0;if("BlockStatement"===e.type&&t&&("FunctionExpression"===t.type||"FunctionDeclaration"===t.type))return!0}(t,l)&&(e(t.body),c=!0),"VariableDeclarator"===t.type&&r.push(t),"FunctionDeclaration"===t.type&&(i.push(t),s=!0),t)"type"===u||c&&"body"===u||u in t&&t[u]&&"object"==typeof t[u]&&(t[u].type?a(t[u]):Array.isArray(t[u])&&o(t[u]));if(n.pop(),s)return"remove"}};var d=h;function h(e){if(!(this instanceof h))return new h(e);this.maxIterations=e,this.count=0}h.prototype.check=function(){if(this.count+=1,this.count>this.maxIterations)throw new Error("Infinite loop detected - reached max iterations")};var m=["Object","String","Boolean","Number","RegExp","Date","Array","Function"],v={string:"String",boolean:"Boolean",number:"Number"},g=m.map((function(e){return c[e]})),b=g.map((function(e){return e.prototype})),y=x;function x(e){if(!(this instanceof x))return new x(e);this.context=e;for(var t=0;t<m.length;t++)this.context[m[t]]||(this.context[m[t]]=w(g[t]))}function S(e,t){e.__proto__=t}function w(e){var t=Object.create(e.prototype),n=function(){if(!(this instanceof n)){var r=e.apply(null,arguments);return S(r,t),r}e.apply(this,arguments)};return S(n,e),n.prototype=t,n.wrapped=!0,n}x.prototype.replace=function(e){var t=g.indexOf(e),n=b.indexOf(e);if(~t){var r=m[t];return this.context[r]}if(~n){r=m[n];return this.context[r].prototype}return e},x.prototype.getPropertyObject=function(e,t){return v[typeof e]?this.getPrototypeOf(e):e},x.prototype.isPrimitive=function(e){return!!~g.indexOf(e)||!!~b.indexOf(e)},x.prototype.getPrototypeOf=function(e){if(null==e)return e;var t=v[typeof e];if(t)var n=this.context[t].prototype;else n=Object.getPrototypeOf(e);if(n&&n!==Object.prototype){var r=this.replace(n);return r===e&&(r=this.replace(Object.prototype)),r}return null},x.prototype.applyNew=function(e,t){if(e.wrapped){var n=Object.getPrototypeOf(e),r=new(Function.prototype.bind.apply(n,arguments));return S(r,e.prototype),r}return new(Function.prototype.bind.apply(e,arguments))};var E=f.parse,_=D,C=D,O=F,I=F(),k=1e6;function D(e,t){return B(P(T(e),Object.create(t||{})))}function F(e){var t=Object.create(e||{});return function(){var e=Array.prototype.slice.call(arguments),n=e.slice(-1)[0];e=e.slice(0,-1),"string"==typeof n&&(n=E("function a(){"+n+"}").body[0].body);var r=T(n);return M(r,e,t)}}function T(e){var t="string"==typeof e?E(e,{loc:!0}):e;return p(t)}function P(e,t){var n=F(t),r=y(t),i=t;return a(e);function o(e){for(var t=void 0,n=0;n<e.length;n++){var r=e[n];if("EmptyStatement"!==r.type&&(t=a(r))instanceof $)return t}return t}function a(e,n){try{if(!e)return;switch(e.type){case"Program":return o(e.body);case"BlockStatement":s();var f=o(e.body);return c(),f;case"FunctionDeclaration":var p=e.params.map(V),h=M(e.body,p,i,e);return t[e.id.name]=h;case"FunctionExpression":p=e.params.map(V);return!e.id&&n&&n.key&&"Identifier"===n.key.type&&(e.id=n.key),M(e.body,p,i,e);case"ReturnStatement":return new $("return",h=a(e.argument));case"BreakStatement":return new $("break");case"ContinueStatement":return new $("continue");case"ExpressionStatement":return a(e.expression);case"AssignmentExpression":return u(i,e.left,e.right,e.operator);case"UpdateExpression":return u(i,e.argument,null,e.operator);case"VariableDeclaration":e.declarations.forEach((function(n){var r="let"===e.kind?i:t;n.init?r[n.id.name]=a(n.init):r[n.id.name]=void 0}));break;case"SwitchStatement":var m=null,v=!1;h=a(e.discriminant),f=void 0;s();for(var g=0;null==f;)if(g<e.cases.length){if(e.cases[g].test?v=v||a(e.cases[g].test)===h:null==m&&(m=g),v)if((D=o(e.cases[g].consequent))instanceof $){if("break"==D.type)break;f=D}g+=1}else{if(v||null==m)break;g=m,v=!0}return c(),f;case"IfStatement":if(a(e.test))return a(e.consequent);if(e.alternate)return a(e.alternate);case"ForStatement":var b=d(k);f=void 0;for(s(),a(e.init);a(e.test);a(e.update)){if((D=a(e.body))instanceof $){if("continue"==D.type)continue;if("break"==D.type)break;f=D;break}b.check()}return c(),f;case"ForInStatement":b=d(k),f=void 0,h=a(e.right);var y=e.left,x=t;for(var S in s(),"VariableDeclaration"==y.type&&(a(y),"let"===(y=y.declarations[0].id).kind&&(x=i)),h){if(u(x,y,{type:"Literal",value:S}),(D=a(e.body))instanceof $){if("continue"==D.type)continue;if("break"==D.type)break;f=D;break}b.check()}return c(),f;case"WhileStatement":for(b=d(k);a(e.test);)a(e.body),b.check();break;case"TryStatement":try{a(e.block)}catch(t){s();var w=e.handlers[0];w&&(i[w.param.name]=t,a(w.body)),c()}finally{e.finalizer&&a(e.finalizer)}break;case"Literal":return e.value;case"UnaryExpression":if("delete"===e.operator&&"MemberExpression"===e.argument.type){var E=e.argument;return delete a(E.object)[T=E.computed?a(E.property):E.property.name],!0}var _=a(e.argument);switch(e.operator){case"+":return+_;case"-":return-_;case"~":return~_;case"!":return!_;case"typeof":return typeof _;default:return L(e)}case"ArrayExpression":var C=i.Array();for(g=0;g<e.elements.length;g++)C.push(a(e.elements[g]));return C;case"ObjectExpression":for(C=i.Object(),g=0;g<e.properties.length;g++){h=null===(T=e.properties[g]).value?T.value:a(T.value,T);C[T.key.value||T.key.name]=h}return C;case"NewExpression":var O=e.arguments.map((function(e){return a(e)}));x=a(e.callee);return r.applyNew(x,O);case"BinaryExpression":var I=a(e.left),D=a(e.right);switch(e.operator){case"==":return I==D;case"===":return I===D;case"!=":return I!=D;case"!==":return I!==D;case"+":return I+D;case"-":return I-D;case"*":return I*D;case"/":return I/D;case"%":return I%D;case"<":return I<D;case"<=":return I<=D;case">":return I>D;case">=":return I>=D;case"|":return I|D;case"&":return I&D;case"^":return I^D;case"instanceof":return I instanceof D;default:return L(e)}case"LogicalExpression":switch(e.operator){case"&&":return a(e.left)&&a(e.right);case"||":return a(e.left)||a(e.right);default:return L(e)}case"ThisExpression":return i.this;case"Identifier":if("undefined"===e.name)return;if(R(i,e.name,r))return l(i[e.name]);throw new ReferenceError(e.name+" is not defined");case"CallExpression":O=e.arguments.map((function(e){return a(e)}));var F=null;x=a(e.callee);return"MemberExpression"===e.callee.type&&(F=a(e.callee.object)),l(x.apply(F,O));case"MemberExpression":C=a(e.object);if(e.computed)var T=a(e.property);else T=e.property.name;return l((C=r.getPropertyObject(C,T))[T]);case"ConditionalExpression":_=a(e.test);return a(_?e.consequent:e.alternate);case"EmptyStatement":return;default:return L(e)}}catch(t){throw t.trace=t.trace||[],t.trace.push(e),t}}function l(e){return e===Function&&(e=n),B(e)}function s(){i=Object.create(i)}function c(){i=Object.getPrototypeOf(i)}function u(e,t,n,i){var o=null;if("Identifier"===t.type?e=A(e,o=t.name,r):"MemberExpression"===t.type&&(o=t.computed?a(t.property):t.property.name,e=a(t.object)),j(e,o,r))switch(i){case void 0:case"=":return e[o]=a(n);case"+=":return e[o]+=a(n);case"-=":return e[o]-=a(n);case"++":return e[o]++;case"--":return e[o]--}}}function L(e){console.error(e);var t=new Error("Unsupported expression: "+e.type);throw t.node=e,t}function A(e,t,n){var r=n.getPrototypeOf(e);return!r||N(e,t)?e:A(r,t,n)}function R(e,t,n){var r=n.getPrototypeOf(e),i=N(e,t);return void 0!==e[t]||(!r||i?i:R(r,t,n))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t,n){return"__proto__"!==t&&!n.isPrimitive(e)&&(null==e||(N(e,t)?!!function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)}(e,t):j(n.getPrototypeOf(e),t,n)))}function M(e,t,n,r){return function(){try{var i=Object.create(n);i.this=this==c?null:this;var o=Array.prototype.slice.call(arguments);i.arguments=arguments,o.forEach((function(e,n){var r=t[n];r&&(i[r]=e)}));var a=P(e,i);if(a instanceof $)return a.value}catch(e){throw e.trace=e.trace||[],e.trace.push(r),e}}}function B(e){return e instanceof $?e.value:e}function V(e){return e.name}function $(e,t){this.type=e,this.value=t}_.eval=C,_.FunctionFactory=O,_.Function=I;var U=function(e){return JSON.parse(JSON.stringify(e))},H=function(){return H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},H.apply(this,arguments)},X=function(e,t){for(var n in t){var r=e[n];r?W(r,t[n]):e[n]=t[n]}},W=function(e,t){t.forEach((function(t){var n=e.findIndex((function(e){return e.name===t.name}));n>=0?e[n]=t:e.push(t)}))},G=function(e){for(var t in e.props)e.propsData[t]=e.props[t].default},Y=function(e,t){if(null!=t&&t.propsData)for(var n in t.propsData)e.propsData[n]=t.propsData[n]},z={string:{text:"Текст",name:"string",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"text",label:"Тип данных",visible:!1}},propsData:{},defaultValue:null},number:{text:"Число",name:"number",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"number",label:"Тип данных",visible:!1}},propsData:{},defaultValue:null},memo:{text:"Большой текст",name:"memo",type:"b-form-textarea",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null},date:{text:"Дата",name:"date",type:"rb-date-picker-input",props:{},propsData:{},defaultValue:null},datetime:{text:"Дата и вермя",name:"date",type:"rb-date-picker-input",props:{},propsData:{},defaultValue:null},phone:{text:"Телефон",name:"phone",type:"rb-phone-input",props:{placeholder:{type:"string",default:"Телефон",label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null}},q={string:[U(z.string),U(z.number),U(z.memo),U(z.phone)],memo:[U(z.memo),U(z.string)],number:[U(z.string),U(z.number)],double:[U(z.string),U(z.number)],float:[U(z.string),U(z.number)],integer:[U(z.string),U(z.number)],long:[U(z.string),U(z.number)],date:[U(z.date)],datetime:[U(z.datetime)]},J={inputs:U(z),primitiveInputs:U(q),dictInputs:U([]),refInputs:U({}),refInputConfigs:U({}),rules:[],icons:{iconExpandFacet:"icon-chevron-up",iconCollapseFacet:"icon-chevron-down",iconCloseFieldSidebar:"icon-chevron-right",iconOpenFieldSidebar:"icon-chevron-left",iconAdd:"icon-add",iconEdit:"icon-edit",iconDelete:"icon-delete",iconDrag:"icon-reorder"},ruleContext:{}},K={config:{},init:function(e){this.config=U(J),e&&(e.inputs&&function(e,t){for(var n in t)e[n]=H(e[n]?e[n]:{},t[n]?t[n]:{})}(this.config.inputs,e.inputs),e.primitiveInputs&&X(this.config.primitiveInputs,e.primitiveInputs),e.dictInputs&&W(this.config.dictInputs,e.dictInputs),e.refInputs&&X(this.config.refInputs,e.refInputs),e.refInputConfigs&&(this.config.refInputConfigs=e.refInputConfigs),e.icons&&(this.config.icons=H(this.config.icons,e.icons)),e.rules&&(this.config.rules=e.rules),e.ruleContext&&(this.config.ruleContext=e.ruleContext))},getInputTypes:function(e){return e?e.dict&&!this.config.refInputs[e.ref]?this.config.dictInputs:e.ref?this.config.refInputs[e.ref]:this.config.primitiveInputs[e.type]:[]},getDefaultInput:function(e){var t=null;return e.ref&&this.config.refInputs[e.ref]?(t=U(this.config.refInputs[e.ref][0]),G(t),this.config.refInputConfigs[e.ref]&&this.config.refInputConfigs[e.ref][t.name]&&Y(t,this.config.refInputConfigs[e.ref][t.name])):e.dict?((t=U(this.config.dictInputs[0])).props.dict.default=e.ref,G(t)):(t=U(this.config.primitiveInputs[e.type][0]),G(t)),t},getInputTypeByName:function(e,t){var n=JSON.parse(JSON.stringify(this.config.inputs[e]));return t.ref&&this.config.refInputs[t.ref]?(G(n),this.config.refInputConfigs[t.ref]&&this.config.refInputConfigs[t.ref][n.name]&&Y(n,this.config.refInputConfigs[t.ref][n.name])):t.dict?(n.props.dict.default=t.ref,G(n)):G(n),n.propsData.ref=t.name,n},getAvailableFieldRules:function(e){return this.config.rules.filter((function(t){return!t.fields||0===t.fields.length||t.fields.indexOf(e.name)>=0}))},getRuleContext:function(){return this.config.ruleContext},runRule:function(e,t){(e=e||{}).console=console;(function(t){return _(t,e)}).call(e,""+t)}};function Z(e,t,n,r,i,o,a,l,s,c){"boolean"!=typeof a&&(s=l,l=a,a=!1);const u="function"==typeof n?n.options:n;let f;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=f):t&&(f=a?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,l(e))}),f)if(u.functional){const e=u.render;u.render=function(t,n){return f.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,f):[f]}return n}var Q=Z({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:"rb-doc-template-section-modal","modal-class":"rb-doc-template-section-modal","ok-title":"Сохранить изменения","cancel-variant":"outline-gray","cancel-title":"Отмена",title:e.title},on:{ok:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-form",{on:{submit:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Наименование секции"}},[n("b-form-input",{model:{value:e.label,callback:function(t){e.label=t},expression:"label"}})],1)],1)],1)],1)],1)},staticRenderFns:[]},undefined,{name:"DocTemplateSectionModal",props:{section:Object,mode:{type:String,default:"ins"},onAfterOk:{type:Function,default:function(){}}},data:function(){return{id:"rb-doc-template-section-modal",label:null}},computed:{title:function(){return"ins"===this.mode?"Добавление секции":"Редактирование секции"}},watch:{section:function(){this.section&&(this.label=this.section.labelRu)}},methods:{onOk:function(){var e=this;this.section.labelRu=this.label,this.onAfterOk&&this.onAfterOk(),this.$nextTick((function(){e.$bvModal.hide(e.id)}))}},created:function(){this.section&&(this.label=this.section.labelRu)}},undefined,false,undefined,!1,void 0,void 0,void 0),ee=Q;
|
|
1
|
+
var RbDocumentFormConstructor=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){l=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw i}}return o}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={findField:function(e,t){if(!t||!t.sections)return null;var n=null;return t.sections.every((function(t){if(t.columns&&t.columns.every((function(t){if(t.fields.forEach((function(t){t.name===e&&(n=t)})),n)return!1})),n)return!1})),n},findRule:function(e,t){if(!t||!t.sections)return null;var n=null;return t.sections.every((function(t){if(t.columns&&t.columns.every((function(t){if(t.fields.every((function(t){if(t.rules&&t.rules.forEach((function(t){t.id===e&&(n=t)})),n)return!1})),n)return!1})),n)return!1})),n},getFields:function(e){var t=[];return e.sections.forEach((function(e){e.columns&&e.columns.forEach((function(e){e.fields&&e.fields.forEach((function(e){t.push(e)}))}))})),t},parseFacets:function(e){var t=[];return e.sections.every((function(e){e.columns.every((function(e){e.fields.forEach((function(e){t.indexOf(e.facet)||t.push(e.facet)}))}))})),t}},c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function u(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var f=u((function(e,t){!function(e){var t,n,r,i,o,a,l,s,c,u,f,p,d,h,m;function v(e,t){if(!e)throw new Error("ASSERT: "+t)}function g(e,t){return l.slice(e,t)}function b(e){return"0123456789".indexOf(e)>=0}function y(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function x(e){return"01234567".indexOf(e)>=0}function S(e){return" "===e||"\t"===e||"\v"===e||"\f"===e||" "===e||e.charCodeAt(0)>=5760&&" \ufeff".indexOf(e)>=0}function w(e){return"\n"===e||"\r"===e||"\u2028"===e||"\u2029"===e}function E(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e.charCodeAt(0)>=128&&a.NonAsciiIdentifierStart.test(e)}function _(e){return"$"===e||"_"===e||"\\"===e||e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e.charCodeAt(0)>=128&&a.NonAsciiIdentifierPart.test(e)}function C(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0}return!1}function O(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0}return!1}function I(e){return"eval"===e||"arguments"===e}function k(e){var t=!1;switch(e.length){case 2:t="if"===e||"in"===e||"do"===e;break;case 3:t="var"===e||"for"===e||"new"===e||"try"===e;break;case 4:t="this"===e||"else"===e||"case"===e||"void"===e||"with"===e;break;case 5:t="while"===e||"break"===e||"catch"===e||"throw"===e;break;case 6:t="return"===e||"typeof"===e||"delete"===e||"switch"===e;break;case 7:t="default"===e||"finally"===e;break;case 8:t="function"===e||"continue"===e||"debugger"===e;break;case 10:t="instanceof"===e}if(t)return!0;switch(e){case"const":case"yield":case"let":return!0}return!(!s||!O(e))||C(e)}function D(){var e,t,n;for(t=!1,n=!1;c<p;)if(e=l[c],n)w(e=l[c++])&&(n=!1,"\r"===e&&"\n"===l[c]&&++c,++u,f=c);else if(t)w(e)?("\r"===e&&"\n"===l[c+1]&&++c,++u,++c,f=c,c>=p&&$({},o.UnexpectedToken,"ILLEGAL")):(e=l[c++],c>=p&&$({},o.UnexpectedToken,"ILLEGAL"),"*"===e&&"/"===(e=l[c])&&(++c,t=!1));else if("/"===e)if("/"===(e=l[c+1]))c+=2,n=!0;else{if("*"!==e)break;t=!0,(c+=2)>=p&&$({},o.UnexpectedToken,"ILLEGAL")}else if(S(e))++c;else{if(!w(e))break;++c,"\r"===e&&"\n"===l[c]&&++c,++u,f=c}}function F(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(c<p&&y(l[c])))return"";r=l[c++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(i)}function T(){var e,n,r,i;if(E(e=l[c])){if(n=c,"\\"===e){if(++c,"u"!==l[c])return;if(i=++c,e=F("u")){if("\\"===e||!E(e))return;r=e}else c=i,r="u"}else r=l[c++];for(;c<p&&_(e=l[c]);)if("\\"===e){if(++c,"u"!==l[c])return;if(i=++c,e=F("u")){if("\\"===e||!_(e))return;r+=e}else c=i,r+="u"}else r+=l[c++];return 1===r.length?{type:t.Identifier,value:r,lineNumber:u,lineStart:f,range:[n,c]}:k(r)?{type:t.Keyword,value:r,lineNumber:u,lineStart:f,range:[n,c]}:"null"===r?{type:t.NullLiteral,value:r,lineNumber:u,lineStart:f,range:[n,c]}:"true"===r||"false"===r?{type:t.BooleanLiteral,value:r,lineNumber:u,lineStart:f,range:[n,c]}:{type:t.Identifier,value:r,lineNumber:u,lineStart:f,range:[n,c]}}}function P(){var e,n,r,i=c,o=l[c];return";"===o||"{"===o||"}"===o||","===o||"("===o||")"===o?(++c,{type:t.Punctuator,value:o,lineNumber:u,lineStart:f,range:[i,c]}):(e=l[c+1],"."!==o||b(e)?(n=l[c+2],r=l[c+3],">"===o&&">"===e&&">"===n&&"="===r?(c+=4,{type:t.Punctuator,value:">>>=",lineNumber:u,lineStart:f,range:[i,c]}):"="===o&&"="===e&&"="===n?(c+=3,{type:t.Punctuator,value:"===",lineNumber:u,lineStart:f,range:[i,c]}):"!"===o&&"="===e&&"="===n?(c+=3,{type:t.Punctuator,value:"!==",lineNumber:u,lineStart:f,range:[i,c]}):">"===o&&">"===e&&">"===n?(c+=3,{type:t.Punctuator,value:">>>",lineNumber:u,lineStart:f,range:[i,c]}):"<"===o&&"<"===e&&"="===n?(c+=3,{type:t.Punctuator,value:"<<=",lineNumber:u,lineStart:f,range:[i,c]}):">"===o&&">"===e&&"="===n?(c+=3,{type:t.Punctuator,value:">>=",lineNumber:u,lineStart:f,range:[i,c]}):"="===e&&"<>=!+-*%&|^/".indexOf(o)>=0||o===e&&"+-<>&|".indexOf(o)>=0&&"+-<>&|".indexOf(e)>=0?(c+=2,{type:t.Punctuator,value:o+e,lineNumber:u,lineStart:f,range:[i,c]}):"[]<>+-*%&|^!~?:=/".indexOf(o)>=0?{type:t.Punctuator,value:l[c++],lineNumber:u,lineStart:f,range:[i,c]}:void 0):{type:t.Punctuator,value:l[c++],lineNumber:u,lineStart:f,range:[i,c]})}function L(){var e,n,r;if(v(b(r=l[c])||"."===r,"Numeric literal must start with a decimal digit or a decimal point"),n=c,e="","."!==r){if(e=l[c++],r=l[c],"0"===e){if("x"===r||"X"===r){for(e+=l[c++];c<p&&y(r=l[c]);)e+=l[c++];return e.length<=2&&$({},o.UnexpectedToken,"ILLEGAL"),c<p&&E(r=l[c])&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(e,16),lineNumber:u,lineStart:f,range:[n,c]}}if(x(r)){for(e+=l[c++];c<p&&x(r=l[c]);)e+=l[c++];return c<p&&(E(r=l[c])||b(r))&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(e,8),octal:!0,lineNumber:u,lineStart:f,range:[n,c]}}b(r)&&$({},o.UnexpectedToken,"ILLEGAL")}for(;c<p&&b(r=l[c]);)e+=l[c++]}if("."===r)for(e+=l[c++];c<p&&b(r=l[c]);)e+=l[c++];if("e"===r||"E"===r)if(e+=l[c++],"+"!==(r=l[c])&&"-"!==r||(e+=l[c++]),b(r=l[c]))for(e+=l[c++];c<p&&b(r=l[c]);)e+=l[c++];else r="character "+r,c>=p&&(r="<end>"),$({},o.UnexpectedToken,"ILLEGAL");return c<p&&E(r=l[c])&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:u,lineStart:f,range:[n,c]}}function A(){var e,n,r,i,a,s,d="",h=!1;for(v("'"===(e=l[c])||'"'===e,"String literal must starts with a quote"),n=c,++c;c<p;){if((r=l[c++])===e){e="";break}if("\\"===r)if(w(r=l[c++]))++u,"\r"===r&&"\n"===l[c]&&++c;else switch(r){case"n":d+="\n";break;case"r":d+="\r";break;case"t":d+="\t";break;case"u":case"x":s=c,(a=F(r))?d+=a:(c=s,d+=r);break;case"b":d+="\b";break;case"f":d+="\f";break;case"v":d+="\v";break;default:x(r)?(0!==(i="01234567".indexOf(r))&&(h=!0),c<p&&x(l[c])&&(h=!0,i=8*i+"01234567".indexOf(l[c++]),"0123".indexOf(r)>=0&&c<p&&x(l[c])&&(i=8*i+"01234567".indexOf(l[c++]))),d+=String.fromCharCode(i)):d+=r}else{if(w(r))break;d+=r}}return""!==e&&$({},o.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:d,octal:h,lineNumber:u,lineStart:f,range:[n,c]}}function R(){var e,t,n,r,i,a,s,u=!1,f=!1;for(d=null,D(),n=c,v("/"===(t=l[c]),"Regular expression literal must start with a slash"),e=l[c++];c<p;)if(e+=t=l[c++],"\\"===t)w(t=l[c++])&&$({},o.UnterminatedRegExp),e+=t;else if(u)"]"===t&&(u=!1);else{if("/"===t){f=!0;break}"["===t?u=!0:w(t)&&$({},o.UnterminatedRegExp)}for(f||$({},o.UnterminatedRegExp),r=e.substr(1,e.length-2),i="";c<p&&_(t=l[c]);)if(++c,"\\"===t&&c<p)if("u"===(t=l[c]))if(s=++c,t=F("u"))for(i+=t,e+="\\u";s<c;++s)e+=l[s];else c=s,i+="u",e+="\\u";else e+="\\";else i+=t,e+=t;try{a=new RegExp(r,i)}catch(e){$({},o.InvalidRegExp)}return{literal:e,value:a,range:[n,c]}}function N(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}function j(){var e,n;return D(),c>=p?{type:t.EOF,lineNumber:u,lineStart:f,range:[c,c]}:void 0!==(n=P())?n:"'"===(e=l[c])||'"'===e?A():"."===e||b(e)?L():void 0!==(n=T())?n:void $({},o.UnexpectedToken,"ILLEGAL")}function M(){var e;return d?(c=d.range[1],u=d.lineNumber,f=d.lineStart,e=d,d=null,e):(d=null,j())}function B(){var e,t,n;return null!==d||(e=c,t=u,n=f,d=j(),c=e,u=t,f=n),d}function V(){var e,t,n,r;return e=c,t=u,n=f,D(),r=u!==t,c=e,u=t,f=n,r}function $(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(function(e,t){return r[t]||""}));throw"number"==typeof e.lineNumber?((n=new Error("Line "+e.lineNumber+": "+i)).index=e.range[0],n.lineNumber=e.lineNumber,n.column=e.range[0]-f+1):((n=new Error("Line "+u+": "+i)).index=c,n.lineNumber=u,n.column=c-f+1),n}function U(){try{$.apply(null,arguments)}catch(e){if(!m.errors)throw e;m.errors.push(e)}}function H(e){if(e.type===t.EOF&&$(e,o.UnexpectedEOS),e.type===t.NumericLiteral&&$(e,o.UnexpectedNumber),e.type===t.StringLiteral&&$(e,o.UnexpectedString),e.type===t.Identifier&&$(e,o.UnexpectedIdentifier),e.type===t.Keyword){if(C(e.value))$(e,o.UnexpectedReserved);else if(s&&O(e.value))return void U(e,o.StrictReservedWord);$(e,o.UnexpectedToken,e.value)}$(e,o.UnexpectedToken,e.value)}function X(e){var n=M();n.type===t.Punctuator&&n.value===e||H(n)}function W(e){var n=M();n.type===t.Keyword&&n.value===e||H(n)}function G(e){var n=B();return n.type===t.Punctuator&&n.value===e}function Y(e){var n=B();return n.type===t.Keyword&&n.value===e}function z(){var e=B(),n=e.value;return e.type===t.Punctuator&&("="===n||"*="===n||"/="===n||"%="===n||"+="===n||"-="===n||"<<="===n||">>="===n||">>>="===n||"&="===n||"^="===n||"|="===n)}function q(){var e,n;";"!==l[c]?(n=u,D(),u===n&&(G(";")?M():(e=B()).type===t.EOF||G("}")||H(e))):M()}function J(e){return e.type===r.Identifier||e.type===r.MemberExpression}function K(){var e=[];for(X("[");!G("]");)G(",")?(M(),e.push(null)):(e.push(_e()),G("]")||X(","));return X("]"),{type:r.ArrayExpression,elements:e}}function Z(e,t){var n,i;return n=s,i=Ke(),t&&s&&I(e[0].name)&&U(t,o.StrictParamName),s=n,{type:r.FunctionExpression,id:null,params:e,defaults:[],body:i,rest:null,generator:!1,expression:!1}}function Q(){var e=M();return e.type===t.StringLiteral||e.type===t.NumericLiteral?(s&&e.octal&&U(e,o.StrictOctalLiteral),ct(e)):{type:r.Identifier,name:e.value}}function ee(){var e,n,i,a;return(e=B()).type===t.Identifier?(i=Q(),"get"!==e.value||G(":")?"set"!==e.value||G(":")?(X(":"),{type:r.Property,key:i,value:_e(),kind:"init"}):(n=Q(),X("("),(e=B()).type!==t.Identifier?(X(")"),U(e,o.UnexpectedToken,e.value),{type:r.Property,key:n,value:Z([]),kind:"set"}):(a=[ke()],X(")"),{type:r.Property,key:n,value:Z(a,e),kind:"set"})):(n=Q(),X("("),X(")"),{type:r.Property,key:n,value:Z([]),kind:"get"})):e.type!==t.EOF&&e.type!==t.Punctuator?(n=Q(),X(":"),{type:r.Property,key:n,value:_e(),kind:"init"}):void H(e)}function te(){var e,t,n,a=[],l={},c=String;for(X("{");!G("}");)t=(e=ee()).key.type===r.Identifier?e.key.name:c(e.key.value),n="init"===e.kind?i.Data:"get"===e.kind?i.Get:i.Set,Object.prototype.hasOwnProperty.call(l,t)?(l[t]===i.Data?s&&n===i.Data?U({},o.StrictDuplicateProperty):n!==i.Data&&U({},o.AccessorDataProperty):n===i.Data?U({},o.AccessorDataProperty):l[t]&n&&U({},o.AccessorGetSet),l[t]|=n):l[t]=n,a.push(e),G("}")||X(",");return X("}"),{type:r.ObjectExpression,properties:a}}function ne(){var e;return X("("),e=Ce(),X(")"),e}function re(){var e=B(),n=e.type;if(n===t.Identifier)return{type:r.Identifier,name:M().value};if(n===t.StringLiteral||n===t.NumericLiteral)return s&&e.octal&&U(e,o.StrictOctalLiteral),ct(M());if(n===t.Keyword){if(Y("this"))return M(),{type:r.ThisExpression};if(Y("function"))return Qe()}return n===t.BooleanLiteral?(M(),e.value="true"===e.value,ct(e)):n===t.NullLiteral?(M(),e.value=null,ct(e)):G("[")?K():G("{")?te():G("(")?ne():G("/")||G("/=")?ct(R()):H(M())}function ie(){var e=[];if(X("("),!G(")"))for(;c<p&&(e.push(_e()),!G(")"));)X(",");return X(")"),e}function oe(){var e=M();return N(e)||H(e),{type:r.Identifier,name:e.value}}function ae(){return X("."),oe()}function le(){var e;return X("["),e=Ce(),X("]"),e}function se(){var e;return W("new"),e={type:r.NewExpression,callee:ue(),arguments:[]},G("(")&&(e.arguments=ie()),e}function ce(){var e;for(e=Y("new")?se():re();G(".")||G("[")||G("(");)e=G("(")?{type:r.CallExpression,callee:e,arguments:ie()}:G("[")?{type:r.MemberExpression,computed:!0,object:e,property:le()}:{type:r.MemberExpression,computed:!1,object:e,property:ae()};return e}function ue(){var e;for(e=Y("new")?se():re();G(".")||G("[");)e=G("[")?{type:r.MemberExpression,computed:!0,object:e,property:le()}:{type:r.MemberExpression,computed:!1,object:e,property:ae()};return e}function fe(){var e=ce();return B().type!==t.Punctuator||!G("++")&&!G("--")||V()||(s&&e.type===r.Identifier&&I(e.name)&&U({},o.StrictLHSPostfix),J(e)||U({},o.InvalidLHSInAssignment),e={type:r.UpdateExpression,operator:M().value,argument:e,prefix:!1}),e}function pe(){var e,n;return(e=B()).type!==t.Punctuator&&e.type!==t.Keyword?fe():G("++")||G("--")?(e=M(),n=pe(),s&&n.type===r.Identifier&&I(n.name)&&U({},o.StrictLHSPrefix),J(n)||U({},o.InvalidLHSInAssignment),n={type:r.UpdateExpression,operator:e.value,argument:n,prefix:!0}):G("+")||G("-")||G("~")||G("!")?n={type:r.UnaryExpression,operator:M().value,argument:pe(),prefix:!0}:Y("delete")||Y("void")||Y("typeof")?(n={type:r.UnaryExpression,operator:M().value,argument:pe(),prefix:!0},s&&"delete"===n.operator&&n.argument.type===r.Identifier&&U({},o.StrictDelete),n):fe()}function de(){for(var e=pe();G("*")||G("/")||G("%");)e={type:r.BinaryExpression,operator:M().value,left:e,right:pe()};return e}function he(){for(var e=de();G("+")||G("-");)e={type:r.BinaryExpression,operator:M().value,left:e,right:de()};return e}function me(){for(var e=he();G("<<")||G(">>")||G(">>>");)e={type:r.BinaryExpression,operator:M().value,left:e,right:he()};return e}function ve(){var e,t;for(t=h.allowIn,h.allowIn=!0,e=me();G("<")||G(">")||G("<=")||G(">=")||t&&Y("in")||Y("instanceof");)e={type:r.BinaryExpression,operator:M().value,left:e,right:me()};return h.allowIn=t,e}function ge(){for(var e=ve();G("==")||G("!=")||G("===")||G("!==");)e={type:r.BinaryExpression,operator:M().value,left:e,right:ve()};return e}function be(){for(var e=ge();G("&");)M(),e={type:r.BinaryExpression,operator:"&",left:e,right:ge()};return e}function ye(){for(var e=be();G("^");)M(),e={type:r.BinaryExpression,operator:"^",left:e,right:be()};return e}function xe(){for(var e=ye();G("|");)M(),e={type:r.BinaryExpression,operator:"|",left:e,right:ye()};return e}function Se(){for(var e=xe();G("&&");)M(),e={type:r.LogicalExpression,operator:"&&",left:e,right:xe()};return e}function we(){for(var e=Se();G("||");)M(),e={type:r.LogicalExpression,operator:"||",left:e,right:Se()};return e}function Ee(){var e,t,n;return e=we(),G("?")&&(M(),t=h.allowIn,h.allowIn=!0,n=_e(),h.allowIn=t,X(":"),e={type:r.ConditionalExpression,test:e,consequent:n,alternate:_e()}),e}function _e(){var e,t;return e=B(),t=Ee(),z()&&(J(t)||U({},o.InvalidLHSInAssignment),s&&t.type===r.Identifier&&I(t.name)&&U(e,o.StrictLHSAssignment),t={type:r.AssignmentExpression,operator:M().value,left:t,right:_e()}),t}function Ce(){var e=_e();if(G(","))for(e={type:r.SequenceExpression,expressions:[e]};c<p&&G(",");)M(),e.expressions.push(_e());return e}function Oe(){for(var e,t=[];c<p&&!G("}")&&void 0!==(e=et());)t.push(e);return t}function Ie(){var e;return X("{"),e=Oe(),X("}"),{type:r.BlockStatement,body:e}}function ke(){var e=M();return e.type!==t.Identifier&&H(e),{type:r.Identifier,name:e.value}}function De(e){var t=ke(),n=null;return s&&I(t.name)&&U({},o.StrictVarName),"const"===e?(X("="),n=_e()):G("=")&&(M(),n=_e()),{type:r.VariableDeclarator,id:t,init:n}}function Fe(e){var t=[];do{if(t.push(De(e)),!G(","))break;M()}while(c<p);return t}function Te(){var e;return W("var"),e=Fe(),q(),{type:r.VariableDeclaration,declarations:e,kind:"var"}}function Pe(e){var t;return W(e),t=Fe(e),q(),{type:r.VariableDeclaration,declarations:t,kind:e}}function Le(){return X(";"),{type:r.EmptyStatement}}function Ae(){var e=Ce();return q(),{type:r.ExpressionStatement,expression:e}}function Re(){var e,t,n;return W("if"),X("("),e=Ce(),X(")"),t=Je(),Y("else")?(M(),n=Je()):n=null,{type:r.IfStatement,test:e,consequent:t,alternate:n}}function Ne(){var e,t,n;return W("do"),n=h.inIteration,h.inIteration=!0,e=Je(),h.inIteration=n,W("while"),X("("),t=Ce(),X(")"),G(";")&&M(),{type:r.DoWhileStatement,body:e,test:t}}function je(){var e,t,n;return W("while"),X("("),e=Ce(),X(")"),n=h.inIteration,h.inIteration=!0,t=Je(),h.inIteration=n,{type:r.WhileStatement,test:e,body:t}}function Me(){var e=M();return{type:r.VariableDeclaration,declarations:Fe(),kind:e.value}}function Be(){var e,t,n,i,a,l,s;return e=t=n=null,W("for"),X("("),G(";")?M():(Y("var")||Y("let")?(h.allowIn=!1,e=Me(),h.allowIn=!0,1===e.declarations.length&&Y("in")&&(M(),i=e,a=Ce(),e=null)):(h.allowIn=!1,e=Ce(),h.allowIn=!0,Y("in")&&(J(e)||U({},o.InvalidLHSInForIn),M(),i=e,a=Ce(),e=null)),void 0===i&&X(";")),void 0===i&&(G(";")||(t=Ce()),X(";"),G(")")||(n=Ce())),X(")"),s=h.inIteration,h.inIteration=!0,l=Je(),h.inIteration=s,void 0===i?{type:r.ForStatement,init:e,test:t,update:n,body:l}:{type:r.ForInStatement,left:i,right:a,body:l,each:!1}}function Ve(){var e=null;return W("continue"),";"===l[c]?(M(),h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:null}):V()?(h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:null}):(B().type===t.Identifier&&(e=ke(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)||$({},o.UnknownLabel,e.name)),q(),null!==e||h.inIteration||$({},o.IllegalContinue),{type:r.ContinueStatement,label:e})}function $e(){var e=null;return W("break"),";"===l[c]?(M(),h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:null}):V()?(h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:null}):(B().type===t.Identifier&&(e=ke(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)||$({},o.UnknownLabel,e.name)),q(),null!==e||h.inIteration||h.inSwitch||$({},o.IllegalBreak),{type:r.BreakStatement,label:e})}function Ue(){var e,n=null;return W("return"),h.inFunctionBody||U({},o.IllegalReturn)," "===l[c]&&E(l[c+1])?(n=Ce(),q(),{type:r.ReturnStatement,argument:n}):V()?{type:r.ReturnStatement,argument:null}:(G(";")||(e=B(),G("}")||e.type===t.EOF||(n=Ce())),q(),{type:r.ReturnStatement,argument:n})}function He(){var e,t;return s&&U({},o.StrictModeWith),W("with"),X("("),e=Ce(),X(")"),t=Je(),{type:r.WithStatement,object:e,body:t}}function Xe(){var e,t,n=[];for(Y("default")?(M(),e=null):(W("case"),e=Ce()),X(":");c<p&&!(G("}")||Y("default")||Y("case"))&&void 0!==(t=Je());)n.push(t);return{type:r.SwitchCase,test:e,consequent:n}}function We(){var e,t,n,i,a;if(W("switch"),X("("),e=Ce(),X(")"),X("{"),t=[],G("}"))return M(),{type:r.SwitchStatement,discriminant:e,cases:t};for(i=h.inSwitch,h.inSwitch=!0,a=!1;c<p&&!G("}");)null===(n=Xe()).test&&(a&&$({},o.MultipleDefaultsInSwitch),a=!0),t.push(n);return h.inSwitch=i,X("}"),{type:r.SwitchStatement,discriminant:e,cases:t}}function Ge(){var e;return W("throw"),V()&&$({},o.NewlineAfterThrow),e=Ce(),q(),{type:r.ThrowStatement,argument:e}}function Ye(){var e;return W("catch"),X("("),G(")")&&H(B()),e=ke(),s&&I(e.name)&&U({},o.StrictCatchVariable),X(")"),{type:r.CatchClause,param:e,body:Ie()}}function ze(){var e,t=[],n=null;return W("try"),e=Ie(),Y("catch")&&t.push(Ye()),Y("finally")&&(M(),n=Ie()),0!==t.length||n||$({},o.NoCatchOrFinally),{type:r.TryStatement,block:e,guardedHandlers:[],handlers:t,finalizer:n}}function qe(){return W("debugger"),q(),{type:r.DebuggerStatement}}function Je(){var e,n,i=B();if(i.type===t.EOF&&H(i),i.type===t.Punctuator)switch(i.value){case";":return Le();case"{":return Ie();case"(":return Ae()}if(i.type===t.Keyword)switch(i.value){case"break":return $e();case"continue":return Ve();case"debugger":return qe();case"do":return Ne();case"for":return Be();case"function":return Ze();case"if":return Re();case"return":return Ue();case"switch":return We();case"throw":return Ge();case"try":return ze();case"var":return Te();case"while":return je();case"with":return He()}return(e=Ce()).type===r.Identifier&&G(":")?(M(),Object.prototype.hasOwnProperty.call(h.labelSet,e.name)&&$({},o.Redeclaration,"Label",e.name),h.labelSet[e.name]=!0,n=Je(),delete h.labelSet[e.name],{type:r.LabeledStatement,label:e,body:n}):(q(),{type:r.ExpressionStatement,expression:e})}function Ke(){var e,n,i,a,l,u,f,d=[];for(X("{");c<p&&(n=B()).type===t.StringLiteral&&(e=et(),d.push(e),e.expression.type===r.Literal);)"use strict"===g(n.range[0]+1,n.range[1]-1)?(s=!0,i&&U(i,o.StrictOctalLiteral)):!i&&n.octal&&(i=n);for(a=h.labelSet,l=h.inIteration,u=h.inSwitch,f=h.inFunctionBody,h.labelSet={},h.inIteration=!1,h.inSwitch=!1,h.inFunctionBody=!0;c<p&&!G("}")&&void 0!==(e=et());)d.push(e);return X("}"),h.labelSet=a,h.inIteration=l,h.inSwitch=u,h.inFunctionBody=f,{type:r.BlockStatement,body:d}}function Ze(){var e,t,n,i,a,l,u,f,d,h=[];if(W("function"),i=B(),e=ke(),s?I(i.value)&&U(i,o.StrictFunctionName):I(i.value)?(l=i,u=o.StrictFunctionName):O(i.value)&&(l=i,u=o.StrictReservedWord),X("("),!G(")"))for(d={};c<p&&(i=B(),t=ke(),s?(I(i.value)&&(a=i,u=o.StrictParamName),Object.prototype.hasOwnProperty.call(d,i.value)&&(a=i,u=o.StrictParamDupe)):l||(I(i.value)?(l=i,u=o.StrictParamName):O(i.value)?(l=i,u=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(d,i.value)&&(l=i,u=o.StrictParamDupe)),h.push(t),d[t.name]=!0,!G(")"));)X(",");return X(")"),f=s,n=Ke(),s&&l&&$(l,u),s&&a&&U(a,u),s=f,{type:r.FunctionDeclaration,id:e,params:h,defaults:[],body:n,rest:null,generator:!1,expression:!1}}function Qe(){var e,t,n,i,a,l,u,f,d=null,h=[];if(W("function"),G("(")||(e=B(),d=ke(),s?I(e.value)&&U(e,o.StrictFunctionName):I(e.value)?(n=e,i=o.StrictFunctionName):O(e.value)&&(n=e,i=o.StrictReservedWord)),X("("),!G(")"))for(f={};c<p&&(e=B(),a=ke(),s?(I(e.value)&&(t=e,i=o.StrictParamName),Object.prototype.hasOwnProperty.call(f,e.value)&&(t=e,i=o.StrictParamDupe)):n||(I(e.value)?(n=e,i=o.StrictParamName):O(e.value)?(n=e,i=o.StrictReservedWord):Object.prototype.hasOwnProperty.call(f,e.value)&&(n=e,i=o.StrictParamDupe)),h.push(a),f[a.name]=!0,!G(")"));)X(",");return X(")"),u=s,l=Ke(),s&&n&&$(n,i),s&&t&&U(t,i),s=u,{type:r.FunctionExpression,id:d,params:h,defaults:[],body:l,rest:null,generator:!1,expression:!1}}function et(){var e=B();if(e.type===t.Keyword)switch(e.value){case"const":case"let":return Pe(e.value);case"function":return Ze();default:return Je()}if(e.type!==t.EOF)return Je()}function tt(){for(var e,n,i,a=[];c<p&&(n=B()).type===t.StringLiteral&&(e=et(),a.push(e),e.expression.type===r.Literal);)"use strict"===g(n.range[0]+1,n.range[1]-1)?(s=!0,i&&U(i,o.StrictOctalLiteral)):!i&&n.octal&&(i=n);for(;c<p&&void 0!==(e=et());)a.push(e);return a}function nt(){return s=!1,{type:r.Program,body:tt()}}function rt(e,t,n,r,i){v("number"==typeof n,"Comment must have valid position"),m.comments.length>0&&m.comments[m.comments.length-1].range[1]>n||m.comments.push({type:e,value:t,range:[n,r],loc:i})}function it(){var e,t,n,r,i,a;for(e="",i=!1,a=!1;c<p;)if(t=l[c],a)w(t=l[c++])?(n.end={line:u,column:c-f-1},a=!1,rt("Line",e,r,c-1,n),"\r"===t&&"\n"===l[c]&&++c,++u,f=c,e=""):c>=p?(a=!1,e+=t,n.end={line:u,column:p-f},rt("Line",e,r,p,n)):e+=t;else if(i)w(t)?("\r"===t&&"\n"===l[c+1]?(++c,e+="\r\n"):e+=t,++u,++c,f=c,c>=p&&$({},o.UnexpectedToken,"ILLEGAL")):(t=l[c++],c>=p&&$({},o.UnexpectedToken,"ILLEGAL"),e+=t,"*"===t&&"/"===(t=l[c])&&(e=e.substr(0,e.length-1),i=!1,++c,n.end={line:u,column:c-f},rt("Block",e,r,c,n),e=""));else if("/"===t)if("/"===(t=l[c+1]))n={start:{line:u,column:c-f}},r=c,a=!0,(c+=2)>=p&&(n.end={line:u,column:c-f},a=!1,rt("Line",e,r,c,n));else{if("*"!==t)break;r=c,i=!0,n={start:{line:u,column:(c+=2)-f-2}},c>=p&&$({},o.UnexpectedToken,"ILLEGAL")}else if(S(t))++c;else{if(!w(t))break;++c,"\r"===t&&"\n"===l[c]&&++c,++u,f=c}}function ot(){var e,t,n,r=[];for(e=0;e<m.comments.length;++e)n={type:(t=m.comments[e]).type,value:t.value},m.range&&(n.range=t.range),m.loc&&(n.loc=t.loc),r.push(n);m.comments=r}function at(){var e,r,i,o;return D(),e={start:{line:u,column:c-f}},r=m.advance(),e.end={line:u,column:c-f},r.type!==t.EOF&&(i=[r.range[0],r.range[1]],o=g(r.range[0],r.range[1]),m.tokens.push({type:n[r.type],value:o,range:i,loc:e})),r}function lt(){var e,t,n,r;return D(),e=c,t={start:{line:u,column:c-f}},n=m.scanRegExp(),t.end={line:u,column:c-f},m.tokens.length>0&&(r=m.tokens[m.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||m.tokens.pop()),m.tokens.push({type:"RegularExpression",value:n.literal,range:[e,c],loc:t}),n}function st(){var e,t,n,r=[];for(e=0;e<m.tokens.length;++e)n={type:(t=m.tokens[e]).type,value:t.value},m.range&&(n.range=t.range),m.loc&&(n.loc=t.loc),r.push(n);m.tokens=r}function ct(e){return{type:r.Literal,value:e.value}}function ut(e){return{type:r.Literal,value:e.value,raw:g(e.range[0],e.range[1])}}function ft(){var e={};return e.range=[c,c],e.loc={start:{line:u,column:c-f},end:{line:u,column:c-f}},e.end=function(){this.range[1]=c,this.loc.end.line=u,this.loc.end.column=c-f},e.applyGroup=function(e){m.range&&(e.groupRange=[this.range[0],this.range[1]]),m.loc&&(e.groupLoc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e.apply=function(e){m.range&&(e.range=[this.range[0],this.range[1]]),m.loc&&(e.loc={start:{line:this.loc.start.line,column:this.loc.start.column},end:{line:this.loc.end.line,column:this.loc.end.column}})},e}function pt(){var e,t;return D(),e=ft(),X("("),t=Ce(),X(")"),e.end(),e.applyGroup(t),t}function dt(){var e,t;for(D(),e=ft(),t=Y("new")?se():re();G(".")||G("[");)G("[")?(t={type:r.MemberExpression,computed:!0,object:t,property:le()},e.end(),e.apply(t)):(t={type:r.MemberExpression,computed:!1,object:t,property:ae()},e.end(),e.apply(t));return t}function ht(){var e,t;for(D(),e=ft(),t=Y("new")?se():re();G(".")||G("[")||G("(");)G("(")?(t={type:r.CallExpression,callee:t,arguments:ie()},e.end(),e.apply(t)):G("[")?(t={type:r.MemberExpression,computed:!0,object:t,property:le()},e.end(),e.apply(t)):(t={type:r.MemberExpression,computed:!1,object:t,property:ae()},e.end(),e.apply(t));return t}function mt(e){var t,n,r;for(n in t="[object Array]"===Object.prototype.toString.apply(e)?[]:{},e)e.hasOwnProperty(n)&&"groupRange"!==n&&"groupLoc"!==n&&(null===(r=e[n])||"object"!=typeof r||r instanceof RegExp?t[n]=r:t[n]=mt(r));return t}function vt(e,t){return function(n){function i(e){return e.type===r.LogicalExpression||e.type===r.BinaryExpression}function o(n){var r,a;i(n.left)&&o(n.left),i(n.right)&&o(n.right),e&&(n.left.groupRange||n.right.groupRange?(r=n.left.groupRange?n.left.groupRange[0]:n.left.range[0],a=n.right.groupRange?n.right.groupRange[1]:n.right.range[1],n.range=[r,a]):void 0===n.range&&(r=n.left.range[0],a=n.right.range[1],n.range=[r,a])),t&&(n.left.groupLoc||n.right.groupLoc?(r=n.left.groupLoc?n.left.groupLoc.start:n.left.loc.start,a=n.right.groupLoc?n.right.groupLoc.end:n.right.loc.end,n.loc={start:r,end:a}):void 0===n.loc&&(n.loc={start:n.left.loc.start,end:n.right.loc.end}))}return function(){var r,a;return D(),r=ft(),a=n.apply(null,arguments),r.end(),e&&void 0===a.range&&r.apply(a),t&&void 0===a.loc&&r.apply(a),i(a)&&o(a),a}}}function gt(){var e;m.comments&&(m.skipComment=D,D=it),m.raw&&(m.createLiteral=ct,ct=ut),(m.range||m.loc)&&(m.parseGroupExpression=ne,m.parseLeftHandSideExpression=ue,m.parseLeftHandSideExpressionAllowCall=ce,ne=pt,ue=dt,ce=ht,e=vt(m.range,m.loc),m.parseAdditiveExpression=he,m.parseAssignmentExpression=_e,m.parseBitwiseANDExpression=be,m.parseBitwiseORExpression=xe,m.parseBitwiseXORExpression=ye,m.parseBlock=Ie,m.parseFunctionSourceElements=Ke,m.parseCatchClause=Ye,m.parseComputedMember=le,m.parseConditionalExpression=Ee,m.parseConstLetDeclaration=Pe,m.parseEqualityExpression=ge,m.parseExpression=Ce,m.parseForVariableDeclaration=Me,m.parseFunctionDeclaration=Ze,m.parseFunctionExpression=Qe,m.parseLogicalANDExpression=Se,m.parseLogicalORExpression=we,m.parseMultiplicativeExpression=de,m.parseNewExpression=se,m.parseNonComputedProperty=oe,m.parseObjectProperty=ee,m.parseObjectPropertyKey=Q,m.parsePostfixExpression=fe,m.parsePrimaryExpression=re,m.parseProgram=nt,m.parsePropertyFunction=Z,m.parseRelationalExpression=ve,m.parseStatement=Je,m.parseShiftExpression=me,m.parseSwitchCase=Xe,m.parseUnaryExpression=pe,m.parseVariableDeclaration=De,m.parseVariableIdentifier=ke,he=e(m.parseAdditiveExpression),_e=e(m.parseAssignmentExpression),be=e(m.parseBitwiseANDExpression),xe=e(m.parseBitwiseORExpression),ye=e(m.parseBitwiseXORExpression),Ie=e(m.parseBlock),Ke=e(m.parseFunctionSourceElements),Ye=e(m.parseCatchClause),le=e(m.parseComputedMember),Ee=e(m.parseConditionalExpression),Pe=e(m.parseConstLetDeclaration),ge=e(m.parseEqualityExpression),Ce=e(m.parseExpression),Me=e(m.parseForVariableDeclaration),Ze=e(m.parseFunctionDeclaration),Qe=e(m.parseFunctionExpression),ue=e(ue),Se=e(m.parseLogicalANDExpression),we=e(m.parseLogicalORExpression),de=e(m.parseMultiplicativeExpression),se=e(m.parseNewExpression),oe=e(m.parseNonComputedProperty),ee=e(m.parseObjectProperty),Q=e(m.parseObjectPropertyKey),fe=e(m.parsePostfixExpression),re=e(m.parsePrimaryExpression),nt=e(m.parseProgram),Z=e(m.parsePropertyFunction),ve=e(m.parseRelationalExpression),Je=e(m.parseStatement),me=e(m.parseShiftExpression),Xe=e(m.parseSwitchCase),pe=e(m.parseUnaryExpression),De=e(m.parseVariableDeclaration),ke=e(m.parseVariableIdentifier)),void 0!==m.tokens&&(m.advance=j,m.scanRegExp=R,j=at,R=lt)}function bt(){"function"==typeof m.skipComment&&(D=m.skipComment),m.raw&&(ct=m.createLiteral),(m.range||m.loc)&&(he=m.parseAdditiveExpression,_e=m.parseAssignmentExpression,be=m.parseBitwiseANDExpression,xe=m.parseBitwiseORExpression,ye=m.parseBitwiseXORExpression,Ie=m.parseBlock,Ke=m.parseFunctionSourceElements,Ye=m.parseCatchClause,le=m.parseComputedMember,Ee=m.parseConditionalExpression,Pe=m.parseConstLetDeclaration,ge=m.parseEqualityExpression,Ce=m.parseExpression,Me=m.parseForVariableDeclaration,Ze=m.parseFunctionDeclaration,Qe=m.parseFunctionExpression,ne=m.parseGroupExpression,ue=m.parseLeftHandSideExpression,ce=m.parseLeftHandSideExpressionAllowCall,Se=m.parseLogicalANDExpression,we=m.parseLogicalORExpression,de=m.parseMultiplicativeExpression,se=m.parseNewExpression,oe=m.parseNonComputedProperty,ee=m.parseObjectProperty,Q=m.parseObjectPropertyKey,re=m.parsePrimaryExpression,fe=m.parsePostfixExpression,nt=m.parseProgram,Z=m.parsePropertyFunction,ve=m.parseRelationalExpression,Je=m.parseStatement,me=m.parseShiftExpression,Xe=m.parseSwitchCase,pe=m.parseUnaryExpression,De=m.parseVariableDeclaration,ke=m.parseVariableIdentifier),"function"==typeof m.scanRegExp&&(j=m.advance,R=m.scanRegExp)}function yt(e){var t,n=e.length,r=[];for(t=0;t<n;++t)r[t]=e.charAt(t);return r}function xt(e,t){var n;"string"==typeof e||e instanceof String||(e=String(e)),c=0,u=(l=e).length>0?1:0,f=0,p=l.length,d=null,h={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},m={},void 0!==t&&(m.range="boolean"==typeof t.range&&t.range,m.loc="boolean"==typeof t.loc&&t.loc,m.raw="boolean"==typeof t.raw&&t.raw,"boolean"==typeof t.tokens&&t.tokens&&(m.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(m.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(m.errors=[])),p>0&&void 0===l[0]&&(e instanceof String&&(l=e.valueOf()),void 0===l[0]&&(l=yt(e))),gt();try{n=nt(),void 0!==m.comments&&(ot(),n.comments=m.comments),void 0!==m.tokens&&(st(),n.tokens=m.tokens),void 0!==m.errors&&(n.errors=m.errors),(m.range||m.loc)&&(n.body=mt(n.body))}catch(e){throw e}finally{bt(),m={}}return n}(n={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8}).BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",r={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},i={Data:1,Get:2,Set:4},o={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},a={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},void 0==="esprima"[0]&&(g=function(e,t){return l.slice(e,t).join("")}),e.version="1.0.4",e.parse=xt,e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),r)r.hasOwnProperty(e)&&(t[e]=r[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}(t)})),p=function e(t){var n=[],r=[],i=[];Array.isArray(t)?(o(t),function(e,t,n){if(t&&t.length){for(var r=[],i=0;i<t.length;i++)r.push({type:"VariableDeclarator",id:t[i].id,init:null});e.unshift({type:"VariableDeclaration",kind:"var",declarations:r})}if(n&&n.length)for(i=0;i<n.length;i++)e.unshift(n[i])}(t,r,i)):a(t);return t;function o(e){for(var t=0;t<e.length;t++){var n=e[t];if("EmptyStatement"!==n.type)"remove"===a(n)&&e.splice(t--,1)}}function a(t){var l=n[n.length-1],s=!1;n.push(t);var c=!1;for(var u in function(e,t){if("Program"===e.type)return!0;if("BlockStatement"===e.type&&t&&("FunctionExpression"===t.type||"FunctionDeclaration"===t.type))return!0}(t,l)&&(e(t.body),c=!0),"VariableDeclarator"===t.type&&r.push(t),"FunctionDeclaration"===t.type&&(i.push(t),s=!0),t)"type"===u||c&&"body"===u||u in t&&t[u]&&"object"==typeof t[u]&&(t[u].type?a(t[u]):Array.isArray(t[u])&&o(t[u]));if(n.pop(),s)return"remove"}};var d=h;function h(e){if(!(this instanceof h))return new h(e);this.maxIterations=e,this.count=0}h.prototype.check=function(){if(this.count+=1,this.count>this.maxIterations)throw new Error("Infinite loop detected - reached max iterations")};var m=["Object","String","Boolean","Number","RegExp","Date","Array","Function"],v={string:"String",boolean:"Boolean",number:"Number"},g=m.map((function(e){return c[e]})),b=g.map((function(e){return e.prototype})),y=x;function x(e){if(!(this instanceof x))return new x(e);this.context=e;for(var t=0;t<m.length;t++)this.context[m[t]]||(this.context[m[t]]=w(g[t]))}function S(e,t){e.__proto__=t}function w(e){var t=Object.create(e.prototype),n=function(){if(!(this instanceof n)){var r=e.apply(null,arguments);return S(r,t),r}e.apply(this,arguments)};return S(n,e),n.prototype=t,n.wrapped=!0,n}x.prototype.replace=function(e){var t=g.indexOf(e),n=b.indexOf(e);if(~t){var r=m[t];return this.context[r]}if(~n){r=m[n];return this.context[r].prototype}return e},x.prototype.getPropertyObject=function(e,t){return v[typeof e]?this.getPrototypeOf(e):e},x.prototype.isPrimitive=function(e){return!!~g.indexOf(e)||!!~b.indexOf(e)},x.prototype.getPrototypeOf=function(e){if(null==e)return e;var t=v[typeof e];if(t)var n=this.context[t].prototype;else n=Object.getPrototypeOf(e);if(n&&n!==Object.prototype){var r=this.replace(n);return r===e&&(r=this.replace(Object.prototype)),r}return null},x.prototype.applyNew=function(e,t){if(e.wrapped){var n=Object.getPrototypeOf(e),r=new(Function.prototype.bind.apply(n,arguments));return S(r,e.prototype),r}return new(Function.prototype.bind.apply(e,arguments))};var E=f.parse,_=D,C=D,O=F,I=F(),k=1e6;function D(e,t){return B(P(T(e),Object.create(t||{})))}function F(e){var t=Object.create(e||{});return function(){var e=Array.prototype.slice.call(arguments),n=e.slice(-1)[0];e=e.slice(0,-1),"string"==typeof n&&(n=E("function a(){"+n+"}").body[0].body);var r=T(n);return M(r,e,t)}}function T(e){var t="string"==typeof e?E(e,{loc:!0}):e;return p(t)}function P(e,t){var n=F(t),r=y(t),i=t;return a(e);function o(e){for(var t=void 0,n=0;n<e.length;n++){var r=e[n];if("EmptyStatement"!==r.type&&(t=a(r))instanceof $)return t}return t}function a(e,n){try{if(!e)return;switch(e.type){case"Program":return o(e.body);case"BlockStatement":s();var f=o(e.body);return c(),f;case"FunctionDeclaration":var p=e.params.map(V),h=M(e.body,p,i,e);return t[e.id.name]=h;case"FunctionExpression":p=e.params.map(V);return!e.id&&n&&n.key&&"Identifier"===n.key.type&&(e.id=n.key),M(e.body,p,i,e);case"ReturnStatement":return new $("return",h=a(e.argument));case"BreakStatement":return new $("break");case"ContinueStatement":return new $("continue");case"ExpressionStatement":return a(e.expression);case"AssignmentExpression":return u(i,e.left,e.right,e.operator);case"UpdateExpression":return u(i,e.argument,null,e.operator);case"VariableDeclaration":e.declarations.forEach((function(n){var r="let"===e.kind?i:t;n.init?r[n.id.name]=a(n.init):r[n.id.name]=void 0}));break;case"SwitchStatement":var m=null,v=!1;h=a(e.discriminant),f=void 0;s();for(var g=0;null==f;)if(g<e.cases.length){if(e.cases[g].test?v=v||a(e.cases[g].test)===h:null==m&&(m=g),v)if((D=o(e.cases[g].consequent))instanceof $){if("break"==D.type)break;f=D}g+=1}else{if(v||null==m)break;g=m,v=!0}return c(),f;case"IfStatement":if(a(e.test))return a(e.consequent);if(e.alternate)return a(e.alternate);case"ForStatement":var b=d(k);f=void 0;for(s(),a(e.init);a(e.test);a(e.update)){if((D=a(e.body))instanceof $){if("continue"==D.type)continue;if("break"==D.type)break;f=D;break}b.check()}return c(),f;case"ForInStatement":b=d(k),f=void 0,h=a(e.right);var y=e.left,x=t;for(var S in s(),"VariableDeclaration"==y.type&&(a(y),"let"===(y=y.declarations[0].id).kind&&(x=i)),h){if(u(x,y,{type:"Literal",value:S}),(D=a(e.body))instanceof $){if("continue"==D.type)continue;if("break"==D.type)break;f=D;break}b.check()}return c(),f;case"WhileStatement":for(b=d(k);a(e.test);)a(e.body),b.check();break;case"TryStatement":try{a(e.block)}catch(t){s();var w=e.handlers[0];w&&(i[w.param.name]=t,a(w.body)),c()}finally{e.finalizer&&a(e.finalizer)}break;case"Literal":return e.value;case"UnaryExpression":if("delete"===e.operator&&"MemberExpression"===e.argument.type){var E=e.argument;return delete a(E.object)[T=E.computed?a(E.property):E.property.name],!0}var _=a(e.argument);switch(e.operator){case"+":return+_;case"-":return-_;case"~":return~_;case"!":return!_;case"typeof":return typeof _;default:return L(e)}case"ArrayExpression":var C=i.Array();for(g=0;g<e.elements.length;g++)C.push(a(e.elements[g]));return C;case"ObjectExpression":for(C=i.Object(),g=0;g<e.properties.length;g++){h=null===(T=e.properties[g]).value?T.value:a(T.value,T);C[T.key.value||T.key.name]=h}return C;case"NewExpression":var O=e.arguments.map((function(e){return a(e)}));x=a(e.callee);return r.applyNew(x,O);case"BinaryExpression":var I=a(e.left),D=a(e.right);switch(e.operator){case"==":return I==D;case"===":return I===D;case"!=":return I!=D;case"!==":return I!==D;case"+":return I+D;case"-":return I-D;case"*":return I*D;case"/":return I/D;case"%":return I%D;case"<":return I<D;case"<=":return I<=D;case">":return I>D;case">=":return I>=D;case"|":return I|D;case"&":return I&D;case"^":return I^D;case"instanceof":return I instanceof D;default:return L(e)}case"LogicalExpression":switch(e.operator){case"&&":return a(e.left)&&a(e.right);case"||":return a(e.left)||a(e.right);default:return L(e)}case"ThisExpression":return i.this;case"Identifier":if("undefined"===e.name)return;if(R(i,e.name,r))return l(i[e.name]);throw new ReferenceError(e.name+" is not defined");case"CallExpression":O=e.arguments.map((function(e){return a(e)}));var F=null;x=a(e.callee);return"MemberExpression"===e.callee.type&&(F=a(e.callee.object)),l(x.apply(F,O));case"MemberExpression":C=a(e.object);if(e.computed)var T=a(e.property);else T=e.property.name;return l((C=r.getPropertyObject(C,T))[T]);case"ConditionalExpression":_=a(e.test);return a(_?e.consequent:e.alternate);case"EmptyStatement":return;default:return L(e)}}catch(t){throw t.trace=t.trace||[],t.trace.push(e),t}}function l(e){return e===Function&&(e=n),B(e)}function s(){i=Object.create(i)}function c(){i=Object.getPrototypeOf(i)}function u(e,t,n,i){var o=null;if("Identifier"===t.type?e=A(e,o=t.name,r):"MemberExpression"===t.type&&(o=t.computed?a(t.property):t.property.name,e=a(t.object)),j(e,o,r))switch(i){case void 0:case"=":return e[o]=a(n);case"+=":return e[o]+=a(n);case"-=":return e[o]-=a(n);case"++":return e[o]++;case"--":return e[o]--}}}function L(e){console.error(e);var t=new Error("Unsupported expression: "+e.type);throw t.node=e,t}function A(e,t,n){var r=n.getPrototypeOf(e);return!r||N(e,t)?e:A(r,t,n)}function R(e,t,n){var r=n.getPrototypeOf(e),i=N(e,t);return void 0!==e[t]||(!r||i?i:R(r,t,n))}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t,n){return"__proto__"!==t&&!n.isPrimitive(e)&&(null==e||(N(e,t)?!!function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)}(e,t):j(n.getPrototypeOf(e),t,n)))}function M(e,t,n,r){return function(){try{var i=Object.create(n);i.this=this==c?null:this;var o=Array.prototype.slice.call(arguments);i.arguments=arguments,o.forEach((function(e,n){var r=t[n];r&&(i[r]=e)}));var a=P(e,i);if(a instanceof $)return a.value}catch(e){throw e.trace=e.trace||[],e.trace.push(r),e}}}function B(e){return e instanceof $?e.value:e}function V(e){return e.name}function $(e,t){this.type=e,this.value=t}_.eval=C,_.FunctionFactory=O,_.Function=I;var U=function(e){return JSON.parse(JSON.stringify(e))},H=function(){return H=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},H.apply(this,arguments)},X=function(e,t){for(var n in t){var r=e[n];r?W(r,t[n]):e[n]=t[n]}},W=function(e,t){t.forEach((function(t){var n=e.findIndex((function(e){return e.name===t.name}));n>=0?e[n]=t:e.push(t)}))},G=function(e){for(var t in e.props)e.propsData[t]=e.props[t].default},Y=function(e,t){if(null!=t&&t.propsData)for(var n in t.propsData)e.propsData[n]=t.propsData[n]},z={string:{text:"Текст",name:"string",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"text",label:"Тип данных",visible:!1}},propsData:{},defaultValue:null},number:{text:"Число",name:"number",type:"b-form-input",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0},type:{type:"string",default:"number",label:"Тип данных",visible:!1}},propsData:{},defaultValue:null},memo:{text:"Большой текст",name:"memo",type:"b-form-textarea",props:{placeholder:{type:"string",default:null,label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null},date:{text:"Дата",name:"date",type:"rb-date-picker-input",props:{},propsData:{},defaultValue:null},datetime:{text:"Дата и вермя",name:"date",type:"rb-date-picker-input",props:{},propsData:{},defaultValue:null},phone:{text:"Телефон",name:"phone",type:"rb-phone-input",props:{placeholder:{type:"string",default:"Телефон",label:"Надпись внутри",visible:!0}},propsData:{},defaultValue:null}},q={string:[U(z.string),U(z.number),U(z.memo),U(z.phone)],memo:[U(z.memo),U(z.string)],number:[U(z.string),U(z.number)],double:[U(z.string),U(z.number)],float:[U(z.string),U(z.number)],integer:[U(z.string),U(z.number)],long:[U(z.string),U(z.number)],date:[U(z.date)],datetime:[U(z.datetime)]},J={inputs:U(z),primitiveInputs:U(q),dictInputs:U([]),refInputs:U({}),refInputConfigs:U({}),rules:[],icons:{iconExpandFacet:"icon-chevron-up",iconCollapseFacet:"icon-chevron-down",iconCloseFieldSidebar:"icon-chevron-right",iconOpenFieldSidebar:"icon-chevron-left",iconAdd:"icon-add",iconEdit:"icon-edit",iconDelete:"icon-delete",iconDrag:"icon-reorder"},ruleContext:{}},K={config:{},init:function(e){this.config=U(J),e&&(e.inputs&&function(e,t){for(var n in t)e[n]=H(e[n]?e[n]:{},t[n]?t[n]:{})}(this.config.inputs,e.inputs),e.primitiveInputs&&X(this.config.primitiveInputs,e.primitiveInputs),e.dictInputs&&W(this.config.dictInputs,e.dictInputs),e.refInputs&&X(this.config.refInputs,e.refInputs),e.refInputConfigs&&(this.config.refInputConfigs=e.refInputConfigs),e.icons&&(this.config.icons=H(this.config.icons,e.icons)),e.rules&&(this.config.rules=e.rules),e.ruleContext&&(this.config.ruleContext=e.ruleContext))},getInputTypes:function(e){return e?e.dict&&!this.config.refInputs[e.ref]?this.config.dictInputs:e.ref?this.config.refInputs[e.ref]:this.config.primitiveInputs[e.type]:[]},getDefaultInput:function(e){var t=null;return e.ref&&this.config.refInputs[e.ref]?(t=U(this.config.refInputs[e.ref][0]),G(t),this.config.refInputConfigs[e.ref]&&this.config.refInputConfigs[e.ref][t.name]&&Y(t,this.config.refInputConfigs[e.ref][t.name])):e.dict?((t=U(this.config.dictInputs[0])).props.dict.default=e.ref,G(t)):(t=U(this.config.primitiveInputs[e.type][0]),G(t)),t},getInputTypeByName:function(e,t){var n=JSON.parse(JSON.stringify(this.config.inputs[e]));return t.ref&&this.config.refInputs[t.ref]?(G(n),this.config.refInputConfigs[t.ref]&&this.config.refInputConfigs[t.ref][n.name]&&Y(n,this.config.refInputConfigs[t.ref][n.name])):t.dict?(n.props.dict.default=t.ref,G(n)):G(n),n.propsData.ref=t.name,n},getAvailableFieldRules:function(e){return this.config.rules.filter((function(t){return!t.fields||0===t.fields.length||t.fields.indexOf(e.name)>=0}))},getRuleContext:function(){return this.config.ruleContext},runRule:function(e,t){(e=e||{}).console=console;(function(t){return _(t,e)}).call(e,""+t)}};function Z(e,t,n,r,i,o,a,l,s,c){"boolean"!=typeof a&&(s=l,l=a,a=!1);const u="function"==typeof n?n.options:n;let f;if(e&&e.render&&(u.render=e.render,u.staticRenderFns=e.staticRenderFns,u._compiled=!0,i&&(u.functional=!0)),r&&(u._scopeId=r),o?(f=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,s(e)),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=f):t&&(f=a?function(e){t.call(this,c(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,l(e))}),f)if(u.functional){const e=u.render;u.render=function(t,n){return f.call(n),e(t,n)}}else{const e=u.beforeCreate;u.beforeCreate=e?[].concat(e,f):[f]}return n}var Q=Z({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("b-modal",{attrs:{id:"rb-doc-template-section-modal","modal-class":"rb-doc-template-section-modal","ok-title":"Сохранить изменения","cancel-variant":"outline-gray","cancel-title":"Отмена",title:e.title},on:{ok:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-form",{on:{submit:function(t){return t.preventDefault(),e.onOk.apply(null,arguments)}}},[n("b-form-row",[n("b-col",{attrs:{lg:"12"}},[n("b-form-group",{attrs:{label:"Наименование секции"}},[n("b-form-input",{model:{value:e.label,callback:function(t){e.label=t},expression:"label"}})],1)],1)],1)],1)],1)},staticRenderFns:[]},undefined,{name:"DocTemplateSectionModal",props:{section:Object,mode:{type:String,default:"ins"},onAfterOk:{type:Function,default:function(){}}},data:function(){return{id:"rb-doc-template-section-modal",label:null}},computed:{title:function(){return"ins"===this.mode?"Добавление секции":"Редактирование секции"}},watch:{section:function(){this.section&&(this.label=this.section.labelRu)}},methods:{onOk:function(){var e=this;this.section.labelRu=this.label,this.onAfterOk&&this.onAfterOk(),this.$nextTick((function(){e.$bvModal.hide(e.id)}))}},created:function(){this.section&&(this.label=this.section.labelRu)}},undefined,false,undefined,!1,void 0,void 0,void 0),ee=Q;
|
|
2
2
|
/**!
|
|
3
3
|
* Sortable 1.10.2
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
@@ -185,6 +185,19 @@ function _nonIterableRest() {
|
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
return fields;
|
|
188
|
+
},
|
|
189
|
+
parseFacets: function parseFacets(formConfig) {
|
|
190
|
+
var facets = [];
|
|
191
|
+
formConfig.sections.every(function (section) {
|
|
192
|
+
section.columns.every(function (c) {
|
|
193
|
+
c.fields.forEach(function (f) {
|
|
194
|
+
if (!facets.indexOf(f.facet)) {
|
|
195
|
+
facets.push(f.facet);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
return facets;
|
|
188
201
|
}
|
|
189
202
|
};var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
190
203
|
|