aboutsummaryrefslogtreecommitdiffstats
path: root/src/assets/javascripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/assets/javascripts')
-rw-r--r--src/assets/javascripts/pug.js43022
-rw-r--r--src/assets/javascripts/services.js42
-rw-r--r--src/assets/javascripts/utils.js196
3 files changed, 6 insertions, 43254 deletions
diff --git a/src/assets/javascripts/pug.js b/src/assets/javascripts/pug.js
deleted file mode 100644
index c52f2226..00000000
--- a/src/assets/javascripts/pug.js
+++ /dev/null
@@ -1,43022 +0,0 @@
-require = function () {
- return function e(t, n, r) {
- function i(o, a) {
- if (!n[o]) {
- if (!t[o]) {
- var u = 'function' == typeof require && require;
- if (!a && u) return u(o, !0);
- if (s) return s(o, !0);
- var l = new Error('Cannot find module \'' + o + '\'');
- throw l.code = 'MODULE_NOT_FOUND',
- l
- }
- var c = n[o] = {
- exports: {
- }
- };
- t[o][0].call(c.exports, function (e) {
- return i(t[o][1][e] || e)
- }, c, c.exports, e, t, n, r)
- }
- return n[o].exports
- }
- for (var s = 'function' == typeof require && require, o = 0; o < r.length; o++) i(r[o]);
- return i
- }
- }() ({
- 1: [
- function (e, t, n) {
- 'use strict';
- var r = e('acorn'),
- i = e('acorn/dist/walk');
- function s(e) {
- return 'FunctionExpression' === e.type || 'FunctionDeclaration' === e.type || 'ArrowFunctionExpression' === e.type || 'Program' === e.type
- }
- function o(e) {
- return 'BlockStatement' === e.type || s(e)
- }
- function a(e) {
- return 'FunctionExpression' === e.type || 'FunctionDeclaration' === e.type
- }
- function u(e) {
- return 'FunctionExpression' === e.type || 'FunctionDeclaration' === e.type
- }
- function l(e) {
- return r.parse(e, {
- allowReturnOutsideFunction: !0,
- allowImportExportEverywhere: !0,
- allowHashBang: !0
- })
- }
- t.exports = function (e) {
- var t,
- n = [
- ];
- t = 'string' == typeof e ? l(e) : e;
- if (!t || 'object' != typeof t || 'Program' !== t.type) throw new TypeError('Source must be either a string of JavaScript or an acorn AST');
- var r = function (e) {
- var t = e;
- t.locals = t.locals || {
- },
- e.params.forEach(function (e) {
- c(e, t)
- }),
- e.id && (t.locals[e.id.name] = !0)
- },
- c = function (e, t) {
- switch (e.type) {
- case 'Identifier':
- t.locals[e.name] = !0;
- break;
- case 'ObjectPattern':
- e.properties.forEach(function (e) {
- c(e.value, t)
- });
- break;
- case 'ArrayPattern':
- e.elements.forEach(function (e) {
- e && c(e, t)
- });
- break;
- case 'RestElement':
- c(e.argument, t);
- break;
- case 'AssignmentPattern':
- c(e.left, t);
- break;
- default:
- throw new Error('Unrecognized pattern type: ' + e.type)
- }
- },
- p = function (e, n) {
- t.locals = t.locals || {
- },
- t.locals[e.local.name] = !0
- };
- function h(e, t) {
- var r = e.name;
- if ('undefined' !== r) {
- for (var i = 0; i < t.length; i++) {
- if ('arguments' === r && a(t[i])) return;
- if (t[i].locals && r in t[i].locals) return
- }
- e.parents = t,
- n.push(e)
- }
- }
- i.ancestor(t, {
- VariableDeclaration: function (e, t) {
- for (var n = null, r = t.length - 1; r >= 0 && null === n; r--) ('var' === e.kind ? s(t[r]) : o(t[r])) && (n = t[r]);
- n.locals = n.locals || {
- },
- e.declarations.forEach(function (e) {
- c(e.id, n)
- })
- },
- FunctionDeclaration: function (e, t) {
- for (var n = null, i = t.length - 2; i >= 0 && null === n; i--) s(t[i]) && (n = t[i]);
- n.locals = n.locals || {
- },
- n.locals[e.id.name] = !0,
- r(e)
- },
- Function: r,
- ClassDeclaration: function (e, t) {
- for (var n = null, r = t.length - 2; r >= 0 && null === n; r--) s(t[r]) && (n = t[r]);
- n.locals = n.locals || {
- },
- n.locals[e.id.name] = !0
- },
- TryStatement: function (e) {
- null !== e.handler && (e.handler.locals = e.handler.locals || {
- }, e.handler.locals[e.handler.param.name] = !0)
- },
- ImportDefaultSpecifier: p,
- ImportSpecifier: p,
- ImportNamespaceSpecifier: p
- }),
- i.ancestor(t, {
- VariablePattern: h,
- Identifier: h,
- ThisExpression: function (e, t) {
- for (var r = 0; r < t.length; r++) if (u(t[r])) return;
- e.parents = t,
- n.push(e)
- }
- });
- var f = {
- };
- return n.forEach(function (e) {
- var t = 'ThisExpression' === e.type ? 'this' : e.name;
- f[t] = f[t] || [
- ],
- f[t].push(e)
- }),
- Object.keys(f).sort().map(function (e) {
- return {
- name: e,
- nodes: f[e]
- }
- })
- },
- t.exports.parse = l
- },
- {
- acorn: 2,
- 'acorn/dist/walk': 3
- }
- ],
- 2: [
- function (e, t, n) {
- var r,
- i;
- r = this,
- i = function (e) {
- 'use strict';
- var t = {
- 3: 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile',
- 5: 'class enum extends super const export import',
- 6: 'enum',
- strict: 'implements interface let package private protected public static yield',
- strictBind: 'eval arguments'
- },
- n = 'break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this',
- r = {
- 5: n,
- 6: n + ' const class extends export import super'
- },
- i = 'ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ',
- s = '‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_',
- o = new RegExp('[' + i + ']'),
- a = new RegExp('[' + i + s + ']');
- i = s = null;
- var u = [
- 0,
- 11,
- 2,
- 25,
- 2,
- 18,
- 2,
- 1,
- 2,
- 14,
- 3,
- 13,
- 35,
- 122,
- 70,
- 52,
- 268,
- 28,
- 4,
- 48,
- 48,
- 31,
- 17,
- 26,
- 6,
- 37,
- 11,
- 29,
- 3,
- 35,
- 5,
- 7,
- 2,
- 4,
- 43,
- 157,
- 19,
- 35,
- 5,
- 35,
- 5,
- 39,
- 9,
- 51,
- 157,
- 310,
- 10,
- 21,
- 11,
- 7,
- 153,
- 5,
- 3,
- 0,
- 2,
- 43,
- 2,
- 1,
- 4,
- 0,
- 3,
- 22,
- 11,
- 22,
- 10,
- 30,
- 66,
- 18,
- 2,
- 1,
- 11,
- 21,
- 11,
- 25,
- 71,
- 55,
- 7,
- 1,
- 65,
- 0,
- 16,
- 3,
- 2,
- 2,
- 2,
- 26,
- 45,
- 28,
- 4,
- 28,
- 36,
- 7,
- 2,
- 27,
- 28,
- 53,
- 11,
- 21,
- 11,
- 18,
- 14,
- 17,
- 111,
- 72,
- 56,
- 50,
- 14,
- 50,
- 785,
- 52,
- 76,
- 44,
- 33,
- 24,
- 27,
- 35,
- 42,
- 34,
- 4,
- 0,
- 13,
- 47,
- 15,
- 3,
- 22,
- 0,
- 2,
- 0,
- 36,
- 17,
- 2,
- 24,
- 85,
- 6,
- 2,
- 0,
- 2,
- 3,
- 2,
- 14,
- 2,
- 9,
- 8,
- 46,
- 39,
- 7,
- 3,
- 1,
- 3,
- 21,
- 2,
- 6,
- 2,
- 1,
- 2,
- 4,
- 4,
- 0,
- 19,
- 0,
- 13,
- 4,
- 159,
- 52,
- 19,
- 3,
- 54,
- 47,
- 21,
- 1,
- 2,
- 0,
- 185,
- 46,
- 42,
- 3,
- 37,
- 47,
- 21,
- 0,
- 60,
- 42,
- 86,
- 25,
- 391,
- 63,
- 32,
- 0,
- 449,
- 56,
- 264,
- 8,
- 2,
- 36,
- 18,
- 0,
- 50,
- 29,
- 881,
- 921,
- 103,
- 110,
- 18,
- 195,
- 2749,
- 1070,
- 4050,
- 582,
- 8634,
- 568,
- 8,
- 30,
- 114,
- 29,
- 19,
- 47,
- 17,
- 3,
- 32,
- 20,
- 6,
- 18,
- 881,
- 68,
- 12,
- 0,
- 67,
- 12,
- 65,
- 0,
- 32,
- 6124,
- 20,
- 754,
- 9486,
- 1,
- 3071,
- 106,
- 6,
- 12,
- 4,
- 8,
- 8,
- 9,
- 5991,
- 84,
- 2,
- 70,
- 2,
- 1,
- 3,
- 0,
- 3,
- 1,
- 3,
- 3,
- 2,
- 11,
- 2,
- 0,
- 2,
- 6,
- 2,
- 64,
- 2,
- 3,
- 3,
- 7,
- 2,
- 6,
- 2,
- 27,
- 2,
- 3,
- 2,
- 4,
- 2,
- 0,
- 4,
- 6,
- 2,
- 339,
- 3,
- 24,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 7,
- 4149,
- 196,
- 60,
- 67,
- 1213,
- 3,
- 2,
- 26,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 9,
- 2,
- 3,
- 2,
- 0,
- 2,
- 0,
- 7,
- 0,
- 5,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 2,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 1,
- 2,
- 0,
- 3,
- 3,
- 2,
- 6,
- 2,
- 3,
- 2,
- 3,
- 2,
- 0,
- 2,
- 9,
- 2,
- 16,
- 6,
- 2,
- 2,
- 4,
- 2,
- 16,
- 4421,
- 42710,
- 42,
- 4148,
- 12,
- 221,
- 3,
- 5761,
- 10591,
- 541
- ],
- l = [
- 509,
- 0,
- 227,
- 0,
- 150,
- 4,
- 294,
- 9,
- 1368,
- 2,
- 2,
- 1,
- 6,
- 3,
- 41,
- 2,
- 5,
- 0,
- 166,
- 1,
- 1306,
- 2,
- 54,
- 14,
- 32,
- 9,
- 16,
- 3,
- 46,
- 10,
- 54,
- 9,
- 7,
- 2,
- 37,
- 13,
- 2,
- 9,
- 52,
- 0,
- 13,
- 2,
- 49,
- 13,
- 10,
- 2,
- 4,
- 9,
- 83,
- 11,
- 7,
- 0,
- 161,
- 11,
- 6,
- 9,
- 7,
- 3,
- 57,
- 0,
- 2,
- 6,
- 3,
- 1,
- 3,
- 2,
- 10,
- 0,
- 11,
- 1,
- 3,
- 6,
- 4,
- 4,
- 193,
- 17,
- 10,
- 9,
- 87,
- 19,
- 13,
- 9,
- 214,
- 6,
- 3,
- 8,
- 28,
- 1,
- 83,
- 16,
- 16,
- 9,
- 82,
- 12,
- 9,
- 9,
- 84,
- 14,
- 5,
- 9,
- 423,
- 9,
- 838,
- 7,
- 2,
- 7,
- 17,
- 9,
- 57,
- 21,
- 2,
- 13,
- 19882,
- 9,
- 135,
- 4,
- 60,
- 6,
- 26,
- 9,
- 1016,
- 45,
- 17,
- 3,
- 19723,
- 1,
- 5319,
- 4,
- 4,
- 5,
- 9,
- 7,
- 3,
- 6,
- 31,
- 3,
- 149,
- 2,
- 1418,
- 49,
- 513,
- 54,
- 5,
- 49,
- 9,
- 0,
- 15,
- 0,
- 23,
- 4,
- 2,
- 14,
- 1361,
- 6,
- 2,
- 16,
- 3,
- 6,
- 2,
- 1,
- 2,
- 4,
- 2214,
- 6,
- 110,
- 6,
- 6,
- 9,
- 792487,
- 239
- ];
- function c(e, t) {
- for (var n = 65536, r = 0; r < t.length; r += 2) {
- if ((n += t[r]) > e) return !1;
- if ((n += t[r + 1]) >= e) return !0
- }
- }
- function p(e, t) {
- return e < 65 ? 36 === e : e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && o.test(String.fromCharCode(e)) : !1 !== t && c(e, u)))
- }
- function h(e, t) {
- return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && a.test(String.fromCharCode(e)) : !1 !== t && (c(e, u) || c(e, l)))))
- }
- var f = function (e, t) {
- void 0 === t && (t = {
- }),
- this.label = e,
- this.keyword = t.keyword,
- this.beforeExpr = !!t.beforeExpr,
- this.startsExpr = !!t.startsExpr,
- this.isLoop = !!t.isLoop,
- this.isAssign = !!t.isAssign,
- this.prefix = !!t.prefix,
- this.postfix = !!t.postfix,
- this.binop = t.binop || null,
- this.updateContext = null
- };
- function d(e, t) {
- return new f(e, {
- beforeExpr: !0,
- binop: t
- })
- }
- var m = {
- beforeExpr: !0
- },
- g = {
- startsExpr: !0
- },
- y = {
- };
- function v(e, t) {
- return void 0 === t && (t = {
- }),
- t.keyword = e,
- y[e] = new f(e, t)
- }
- var b = {
- num: new f('num', g),
- regexp: new f('regexp', g),
- string: new f('string', g),
- name: new f('name', g),
- eof: new f('eof'),
- bracketL: new f('[', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- bracketR: new f(']'),
- braceL: new f('{', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- braceR: new f('}'),
- parenL: new f('(', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- parenR: new f(')'),
- comma: new f(',', m),
- semi: new f(';', m),
- colon: new f(':', m),
- dot: new f('.'),
- question: new f('?', m),
- arrow: new f('=>', m),
- template: new f('template'),
- ellipsis: new f('...', m),
- backQuote: new f('`', g),
- dollarBraceL: new f('${', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- eq: new f('=', {
- beforeExpr: !0,
- isAssign: !0
- }),
- assign: new f('_=', {
- beforeExpr: !0,
- isAssign: !0
- }),
- incDec: new f('++/--', {
- prefix: !0,
- postfix: !0,
- startsExpr: !0
- }),
- prefix: new f('prefix', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- logicalOR: d('||', 1),
- logicalAND: d('&&', 2),
- bitwiseOR: d('|', 3),
- bitwiseXOR: d('^', 4),
- bitwiseAND: d('&', 5),
- equality: d('==/!=', 6),
- relational: d('</>', 7),
- bitShift: d('<</>>', 8),
- plusMin: new f('+/-', {
- beforeExpr: !0,
- binop: 9,
- prefix: !0,
- startsExpr: !0
- }),
- modulo: d('%', 10),
- star: d('*', 10),
- slash: d('/', 10),
- starstar: new f('**', {
- beforeExpr: !0
- }),
- _break: v('break'),
- _case: v('case', m),
- _catch: v('catch'),
- _continue: v('continue'),
- _debugger: v('debugger'),
- _default: v('default', m),
- _do: v('do', {
- isLoop: !0,
- beforeExpr: !0
- }),
- _else: v('else', m),
- _finally: v('finally'),
- _for: v('for', {
- isLoop: !0
- }),
- _function: v('function', g),
- _if: v('if'),
- _return: v('return', m),
- _switch: v('switch'),
- _throw: v('throw', m),
- _try: v('try'),
- _var: v('var'),
- _const: v('const'),
- _while: v('while', {
- isLoop: !0
- }),
- _with: v('with'),
- _new: v('new', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- _this: v('this', g),
- _super: v('super', g),
- _class: v('class'),
- _extends: v('extends', m),
- _export: v('export'),
- _import: v('import'),
- _null: v('null', g),
- _true: v('true', g),
- _false: v('false', g),
- _in: v('in', {
- beforeExpr: !0,
- binop: 7
- }),
- _instanceof: v('instanceof', {
- beforeExpr: !0,
- binop: 7
- }),
- _typeof: v('typeof', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- _void: v('void', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- _delete: v('delete', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- })
- },
- x = /\r\n?|\n|\u2028|\u2029/,
- A = new RegExp(x.source, 'g');
- function E(e) {
- return 10 === e || 13 === e || 8232 === e || 8233 === e
- }
- var _ = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
- C = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
- function w(e) {
- return '[object Array]' === Object.prototype.toString.call(e)
- }
- function D(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- var k = function (e, t) {
- this.line = e,
- this.column = t
- };
- k.prototype.offset = function (e) {
- return new k(this.line, this.column + e)
- };
- var S = function (e, t, n) {
- this.start = t,
- this.end = n,
- null !== e.sourceFile && (this.source = e.sourceFile)
- };
- function T(e, t) {
- for (var n = 1, r = 0; ; ) {
- A.lastIndex = r;
- var i = A.exec(e);
- if (!(i && i.index < t)) return new k(n, t - r);
- ++n,
- r = i.index + i[0].length
- }
- }
- var F = {
- ecmaVersion: 7,
- sourceType: 'script',
- onInsertedSemicolon: null,
- onTrailingComma: null,
- allowReserved: null,
- allowReturnOutsideFunction: !1,
- allowImportExportEverywhere: !1,
- allowHashBang: !1,
- locations: !1,
- onToken: null,
- onComment: null,
- ranges: !1,
- program: null,
- sourceFile: null,
- directSourceFile: null,
- preserveParens: !1,
- plugins: {
- }
- };
- function O(e) {
- var t = {
- };
- for (var n in F) t[n] = e && D(e, n) ? e[n] : F[n];
- if (t.ecmaVersion >= 2015 && (t.ecmaVersion -= 2009), null == t.allowReserved && (t.allowReserved = t.ecmaVersion < 5), w(t.onToken)) {
- var r = t.onToken;
- t.onToken = function (e) {
- return r.push(e)
- }
- }
- return w(t.onComment) && (t.onComment = function (e, t) {
- return function (n, r, i, s, o, a) {
- var u = {
- type: n ? 'Block' : 'Line',
- value: r,
- start: i,
- end: s
- };
- e.locations && (u.loc = new S(this, o, a)),
- e.ranges && (u.range = [
- i,
- s
- ]),
- t.push(u)
- }
- }(t, t.onComment)),
- t
- }
- var B = {
- };
- function P(e) {
- return new RegExp('^(' + e.replace(/ /g, '|') + ')$')
- }
- var N = function (e, n, i) {
- this.options = e = O(e),
- this.sourceFile = e.sourceFile,
- this.keywords = P(r[e.ecmaVersion >= 6 ? 6 : 5]);
- var s = '';
- if (!e.allowReserved) {
- for (var o = e.ecmaVersion; !(s = t[o]); o--);
- 'module' == e.sourceType && (s += ' await')
- }
- this.reservedWords = P(s);
- var a = (s ? s + ' ' : '') + t.strict;
- this.reservedWordsStrict = P(a),
- this.reservedWordsStrictBind = P(a + ' ' + t.strictBind),
- this.input = String(n),
- this.containsEsc = !1,
- this.loadPlugins(e.plugins),
- i ? (this.pos = i, this.lineStart = this.input.lastIndexOf('\n', i - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(x).length) : (this.pos = this.lineStart = 0, this.curLine = 1),
- this.type = b.eof,
- this.value = null,
- this.start = this.end = this.pos,
- this.startLoc = this.endLoc = this.curPosition(),
- this.lastTokEndLoc = this.lastTokStartLoc = null,
- this.lastTokStart = this.lastTokEnd = this.pos,
- this.context = this.initialContext(),
- this.exprAllowed = !0,
- this.inModule = 'module' === e.sourceType,
- this.strict = this.inModule || this.strictDirective(this.pos),
- this.potentialArrowAt = - 1,
- this.inFunction = this.inGenerator = this.inAsync = !1,
- this.yieldPos = this.awaitPos = 0,
- this.labels = [
- ],
- 0 === this.pos && e.allowHashBang && '#!' === this.input.slice(0, 2) && this.skipLineComment(2)
- };
- N.prototype.isKeyword = function (e) {
- return this.keywords.test(e)
- },
- N.prototype.isReservedWord = function (e) {
- return this.reservedWords.test(e)
- },
- N.prototype.extend = function (e, t) {
- this[e] = t(this[e])
- },
- N.prototype.loadPlugins = function (e) {
- for (var t in e) {
- var n = B[t];
- if (!n) throw new Error('Plugin \'' + t + '\' not found');
- n(this, e[t])
- }
- },
- N.prototype.parse = function () {
- var e = this.options.program || this.startNode();
- return this.nextToken(),
- this.parseTopLevel(e)
- };
- var R = N.prototype,
- L = /^(?:'((?:[^\']|\.)*)'|"((?:[^\"]|\.)*)"|;)/;
- R.strictDirective = function (e) {
- for (; ; ) {
- C.lastIndex = e,
- e += C.exec(this.input) [0].length;
- var t = L.exec(this.input.slice(e));
- if (!t) return !1;
- if ('use strict' == (t[1] || t[2])) return !0;
- e += t[0].length
- }
- },
- R.eat = function (e) {
- return this.type === e && (this.next(), !0)
- },
- R.isContextual = function (e) {
- return this.type === b.name && this.value === e
- },
- R.eatContextual = function (e) {
- return this.value === e && this.eat(b.name)
- },
- R.expectContextual = function (e) {
- this.eatContextual(e) || this.unexpected()
- },
- R.canInsertSemicolon = function () {
- return this.type === b.eof || this.type === b.braceR || x.test(this.input.slice(this.lastTokEnd, this.start))
- },
- R.insertSemicolon = function () {
- if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc),
- !0
- },
- R.semicolon = function () {
- this.eat(b.semi) || this.insertSemicolon() || this.unexpected()
- },
- R.afterTrailingComma = function (e, t) {
- if (this.type == e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc),
- t || this.next(),
- !0
- },
- R.expect = function (e) {
- this.eat(e) || this.unexpected()
- },
- R.unexpected = function (e) {
- this.raise(null != e ? e : this.start, 'Unexpected token')
- };
- var I = function () {
- this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = - 1
- };
- R.checkPatternErrors = function (e, t) {
- if (e) {
- e.trailingComma > - 1 && this.raiseRecoverable(e.trailingComma, 'Comma is not permitted after the rest element');
- var n = t ? e.parenthesizedAssign : e.parenthesizedBind;
- n > - 1 && this.raiseRecoverable(n, 'Parenthesized pattern')
- }
- },
- R.checkExpressionErrors = function (e, t) {
- var n = e ? e.shorthandAssign : - 1;
- if (!t) return n >= 0;
- n > - 1 && this.raise(n, 'Shorthand property assignments are valid only in destructuring patterns')
- },
- R.checkYieldAwaitInDefaultParams = function () {
- this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos) && this.raise(this.yieldPos, 'Yield expression cannot be a default value'),
- this.awaitPos && this.raise(this.awaitPos, 'Await expression cannot be a default value')
- },
- R.isSimpleAssignTarget = function (e) {
- return 'ParenthesizedExpression' === e.type ? this.isSimpleAssignTarget(e.expression) : 'Identifier' === e.type || 'MemberExpression' === e.type
- };
- var j = N.prototype;
- j.parseTopLevel = function (e) {
- var t = {
- };
- for (e.body || (e.body = [
- ]); this.type !== b.eof; ) {
- var n = this.parseStatement(!0, !0, t);
- e.body.push(n)
- }
- return this.next(),
- this.options.ecmaVersion >= 6 && (e.sourceType = this.options.sourceType),
- this.finishNode(e, 'Program')
- };
- var M = {
- kind: 'loop'
- },
- U = {
- kind: 'switch'
- };
- j.isLet = function () {
- if (this.type !== b.name || this.options.ecmaVersion < 6 || 'let' != this.value) return !1;
- C.lastIndex = this.pos;
- var e = C.exec(this.input),
- t = this.pos + e[0].length,
- n = this.input.charCodeAt(t);
- if (91 === n || 123 == n) return !0;
- if (p(n, !0)) {
- for (var r = t + 1; h(this.input.charCodeAt(r), !0); ++r);
- var i = this.input.slice(t, r);
- if (!this.isKeyword(i)) return !0
- }
- return !1
- },
- j.isAsyncFunction = function () {
- if (this.type !== b.name || this.options.ecmaVersion < 8 || 'async' != this.value) return !1;
- C.lastIndex = this.pos;
- var e = C.exec(this.input),
- t = this.pos + e[0].length;
- return !(x.test(this.input.slice(this.pos, t)) || 'function' !== this.input.slice(t, t + 8) || t + 8 != this.input.length && h(this.input.charAt(t + 8)))
- },
- j.parseStatement = function (e, t, n) {
- var r,
- i = this.type,
- s = this.startNode();
- switch (this.isLet() && (i = b._var, r = 'let'), i) {
- case b._break:
- case b._continue:
- return this.parseBreakContinueStatement(s, i.keyword);
- case b._debugger:
- return this.parseDebuggerStatement(s);
- case b._do:
- return this.parseDoStatement(s);
- case b._for:
- return this.parseForStatement(s);
- case b._function:
- return !e && this.options.ecmaVersion >= 6 && this.unexpected(),
- this.parseFunctionStatement(s, !1);
- case b._class:
- return e || this.unexpected(),
- this.parseClass(s, !0);
- case b._if:
- return this.parseIfStatement(s);
- case b._return:
- return this.parseReturnStatement(s);
- case b._switch:
- return this.parseSwitchStatement(s);
- case b._throw:
- return this.parseThrowStatement(s);
- case b._try:
- return this.parseTryStatement(s);
- case b._const:
- case b._var:
- return r = r || this.value,
- e || 'var' == r || this.unexpected(),
- this.parseVarStatement(s, r);
- case b._while:
- return this.parseWhileStatement(s);
- case b._with:
- return this.parseWithStatement(s);
- case b.braceL:
- return this.parseBlock();
- case b.semi:
- return this.parseEmptyStatement(s);
- case b._export:
- case b._import:
- return this.options.allowImportExportEverywhere || (t || this.raise(this.start, '\'import\' and \'export\' may only appear at the top level'), this.inModule || this.raise(this.start, '\'import\' and \'export\' may appear only with \'sourceType: module\'')),
- i === b._import ? this.parseImport(s) : this.parseExport(s, n);
- default:
- if (this.isAsyncFunction() && e) return this.next(),
- this.parseFunctionStatement(s, !0);
- var o = this.value,
- a = this.parseExpression();
- return i === b.name && 'Identifier' === a.type && this.eat(b.colon) ? this.parseLabeledStatement(s, o, a) : this.parseExpressionStatement(s, a)
- }
- },
- j.parseBreakContinueStatement = function (e, t) {
- var n = 'break' == t;
- this.next(),
- this.eat(b.semi) || this.insertSemicolon() ? e.label = null : this.type !== b.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
- for (var r = 0; r < this.labels.length; ++r) {
- var i = this.labels[r];
- if (null == e.label || i.name === e.label.name) {
- if (null != i.kind && (n || 'loop' === i.kind)) break;
- if (e.label && n) break
- }
- }
- return r === this.labels.length && this.raise(e.start, 'Unsyntactic ' + t),
- this.finishNode(e, n ? 'BreakStatement' : 'ContinueStatement')
- },
- j.parseDebuggerStatement = function (e) {
- return this.next(),
- this.semicolon(),
- this.finishNode(e, 'DebuggerStatement')
- },
- j.parseDoStatement = function (e) {
- return this.next(),
- this.labels.push(M),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.expect(b._while),
- e.test = this.parseParenExpression(),
- this.options.ecmaVersion >= 6 ? this.eat(b.semi) : this.semicolon(),
- this.finishNode(e, 'DoWhileStatement')
- },
- j.parseForStatement = function (e) {
- if (this.next(), this.labels.push(M), this.expect(b.parenL), this.type === b.semi) return this.parseFor(e, null);
- var t = this.isLet();
- if (this.type === b._var || this.type === b._const || t) {
- var n = this.startNode(),
- r = t ? 'let' : this.value;
- return this.next(),
- this.parseVar(n, !0, r),
- this.finishNode(n, 'VariableDeclaration'),
- !(this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of')) || 1 !== n.declarations.length || 'var' !== r && n.declarations[0].init ? this.parseFor(e, n) : this.parseForIn(e, n)
- }
- var i = new I,
- s = this.parseExpression(!0, i);
- return this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of') ? (this.toAssignable(s), this.checkLVal(s), this.checkPatternErrors(i, !0), this.parseForIn(e, s)) : (this.checkExpressionErrors(i, !0), this.parseFor(e, s))
- },
- j.parseFunctionStatement = function (e, t) {
- return this.next(),
- this.parseFunction(e, !0, !1, t)
- },
- j.isFunction = function () {
- return this.type === b._function || this.isAsyncFunction()
- },
- j.parseIfStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- e.consequent = this.parseStatement(!this.strict && this.isFunction()),
- e.alternate = this.eat(b._else) ? this.parseStatement(!this.strict && this.isFunction()) : null,
- this.finishNode(e, 'IfStatement')
- },
- j.parseReturnStatement = function (e) {
- return this.inFunction || this.options.allowReturnOutsideFunction || this.raise(this.start, '\'return\' outside of function'),
- this.next(),
- this.eat(b.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()),
- this.finishNode(e, 'ReturnStatement')
- },
- j.parseSwitchStatement = function (e) {
- this.next(),
- e.discriminant = this.parseParenExpression(),
- e.cases = [
- ],
- this.expect(b.braceL),
- this.labels.push(U);
- for (var t, n = !1; this.type != b.braceR; ) if (this.type === b._case || this.type === b._default) {
- var r = this.type === b._case;
- t && this.finishNode(t, 'SwitchCase'),
- e.cases.push(t = this.startNode()),
- t.consequent = [
- ],
- this.next(),
- r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, 'Multiple default clauses'), n = !0, t.test = null),
- this.expect(b.colon)
- } else t || this.unexpected(),
- t.consequent.push(this.parseStatement(!0));
- return t && this.finishNode(t, 'SwitchCase'),
- this.next(),
- this.labels.pop(),
- this.finishNode(e, 'SwitchStatement')
- },
- j.parseThrowStatement = function (e) {
- return this.next(),
- x.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, 'Illegal newline after throw'),
- e.argument = this.parseExpression(),
- this.semicolon(),
- this.finishNode(e, 'ThrowStatement')
- };
- var V = [
- ];
- j.parseTryStatement = function (e) {
- if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === b._catch) {
- var t = this.startNode();
- this.next(),
- this.expect(b.parenL),
- t.param = this.parseBindingAtom(),
- this.checkLVal(t.param, !0),
- this.expect(b.parenR),
- t.body = this.parseBlock(),
- e.handler = this.finishNode(t, 'CatchClause')
- }
- return e.finalizer = this.eat(b._finally) ? this.parseBlock() : null,
- e.handler || e.finalizer || this.raise(e.start, 'Missing catch or finally clause'),
- this.finishNode(e, 'TryStatement')
- },
- j.parseVarStatement = function (e, t) {
- return this.next(),
- this.parseVar(e, !1, t),
- this.semicolon(),
- this.finishNode(e, 'VariableDeclaration')
- },
- j.parseWhileStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- this.labels.push(M),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, 'WhileStatement')
- },
- j.parseWithStatement = function (e) {
- return this.strict && this.raise(this.start, '\'with\' in strict mode'),
- this.next(),
- e.object = this.parseParenExpression(),
- e.body = this.parseStatement(!1),
- this.finishNode(e, 'WithStatement')
- },
- j.parseEmptyStatement = function (e) {
- return this.next(),
- this.finishNode(e, 'EmptyStatement')
- },
- j.parseLabeledStatement = function (e, t, n) {
- for (var r = 0; r < this.labels.length; ++r) this.labels[r].name === t && this.raise(n.start, 'Label \'' + t + '\' is already declared');
- for (var i = this.type.isLoop ? 'loop' : this.type === b._switch ? 'switch' : null, s = this.labels.length - 1; s >= 0; s--) {
- var o = this.labels[s];
- if (o.statementStart != e.start) break;
- o.statementStart = this.start,
- o.kind = i
- }
- return this.labels.push({
- name: t,
- kind: i,
- statementStart: this.start
- }),
- e.body = this.parseStatement(!0),
- ('ClassDeclaration' == e.body.type || 'VariableDeclaration' == e.body.type && (this.strict || 'var' != e.body.kind) || 'FunctionDeclaration' == e.body.type && (this.strict || e.body.generator)) && this.raiseRecoverable(e.body.start, 'Invalid labeled declaration'),
- this.labels.pop(),
- e.label = n,
- this.finishNode(e, 'LabeledStatement')
- },
- j.parseExpressionStatement = function (e, t) {
- return e.expression = t,
- this.semicolon(),
- this.finishNode(e, 'ExpressionStatement')
- },
- j.parseBlock = function () {
- var e = this.startNode();
- for (e.body = [
- ], this.expect(b.braceL); !this.eat(b.braceR); ) {
- var t = this.parseStatement(!0);
- e.body.push(t)
- }
- return this.finishNode(e, 'BlockStatement')
- },
- j.parseFor = function (e, t) {
- return e.init = t,
- this.expect(b.semi),
- e.test = this.type === b.semi ? null : this.parseExpression(),
- this.expect(b.semi),
- e.update = this.type === b.parenR ? null : this.parseExpression(),
- this.expect(b.parenR),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, 'ForStatement')
- },
- j.parseForIn = function (e, t) {
- var n = this.type === b._in ? 'ForInStatement' : 'ForOfStatement';
- return this.next(),
- e.left = t,
- e.right = this.parseExpression(),
- this.expect(b.parenR),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, n)
- },
- j.parseVar = function (e, t, n) {
- for (e.declarations = [
- ], e.kind = n; ; ) {
- var r = this.startNode();
- if (this.parseVarId(r), this.eat(b.eq) ? r.init = this.parseMaybeAssign(t) : 'const' !== n || this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of') ? 'Identifier' == r.id.type || t && (this.type === b._in || this.isContextual('of')) ? r.init = null : this.raise(this.lastTokEnd, 'Complex binding patterns require an initialization value') : this.unexpected(), e.declarations.push(this.finishNode(r, 'VariableDeclarator')), !this.eat(b.comma)) break
- }
- return e
- },
- j.parseVarId = function (e) {
- e.id = this.parseBindingAtom(),
- this.checkLVal(e.id, !0)
- },
- j.parseFunction = function (e, t, n, r) {
- this.initFunction(e),
- this.options.ecmaVersion >= 6 && !r && (e.generator = this.eat(b.star)),
- this.options.ecmaVersion >= 8 && (e.async = !!r),
- null == t && (t = this.type == b.name),
- t && (e.id = this.parseIdent());
- var i = this.inGenerator,
- s = this.inAsync,
- o = this.yieldPos,
- a = this.awaitPos,
- u = this.inFunction;
- return this.inGenerator = e.generator,
- this.inAsync = e.async,
- this.yieldPos = 0,
- this.awaitPos = 0,
- this.inFunction = !0,
- t || this.type !== b.name || (e.id = this.parseIdent()),
- this.parseFunctionParams(e),
- this.parseFunctionBody(e, n),
- this.inGenerator = i,
- this.inAsync = s,
- this.yieldPos = o,
- this.awaitPos = a,
- this.inFunction = u,
- this.finishNode(e, t ? 'FunctionDeclaration' : 'FunctionExpression')
- },
- j.parseFunctionParams = function (e) {
- this.expect(b.parenL),
- e.params = this.parseBindingList(b.parenR, !1, this.options.ecmaVersion >= 8, !0),
- this.checkYieldAwaitInDefaultParams()
- },
- j.parseClass = function (e, t) {
- this.next(),
- null == t && (t = this.type === b.name),
- this.parseClassId(e, t),
- this.parseClassSuper(e);
- var n = this.startNode(),
- r = !1;
- for (n.body = [
- ], this.expect(b.braceL); !this.eat(b.braceR); ) if (!this.eat(b.semi)) {
- var i = this.startNode(),
- s = this.eat(b.star),
- o = !1,
- a = this.type === b.name && 'static' === this.value;
- this.parsePropertyName(i),
- i.static = a && this.type !== b.parenL,
- i.static && (s && this.unexpected(), s = this.eat(b.star), this.parsePropertyName(i)),
- this.options.ecmaVersion >= 8 && !s && !i.computed && 'Identifier' === i.key.type && 'async' === i.key.name && this.type !== b.parenL && !this.canInsertSemicolon() && (o = !0, this.parsePropertyName(i)),
- i.kind = 'method';
- var u = !1;
- if (!i.computed) {
- var l = i.key;
- s || o || 'Identifier' !== l.type || this.type === b.parenL || 'get' !== l.name && 'set' !== l.name || (u = !0, i.kind = l.name, l = this.parsePropertyName(i)),
- !i.static && ('Identifier' === l.type && 'constructor' === l.name || 'Literal' === l.type && 'constructor' === l.value) && (r && this.raise(l.start, 'Duplicate constructor in the same class'), u && this.raise(l.start, 'Constructor can\'t have get/set modifier'), s && this.raise(l.start, 'Constructor can\'t be a generator'), o && this.raise(l.start, 'Constructor can\'t be an async method'), i.kind = 'constructor', r = !0)
- }
- if (this.parseClassMethod(n, i, s, o), u) {
- var c = 'get' === i.kind ? 0 : 1;
- if (i.value.params.length !== c) {
- var p = i.value.start;
- 'get' === i.kind ? this.raiseRecoverable(p, 'getter should have no params') : this.raiseRecoverable(p, 'setter should have exactly one param')
- } else 'set' === i.kind && 'RestElement' === i.value.params[0].type && this.raiseRecoverable(i.value.params[0].start, 'Setter cannot use rest params')
- }
- }
- return e.body = this.finishNode(n, 'ClassBody'),
- this.finishNode(e, t ? 'ClassDeclaration' : 'ClassExpression')
- },
- j.parseClassMethod = function (e, t, n, r) {
- t.value = this.parseMethod(n, r),
- e.body.push(this.finishNode(t, 'MethodDefinition'))
- },
- j.parseClassId = function (e, t) {
- e.id = this.type === b.name ? this.parseIdent() : t ? this.unexpected() : null
- },
- j.parseClassSuper = function (e) {
- e.superClass = this.eat(b._extends) ? this.parseExprSubscripts() : null
- },
- j.parseExport = function (e, t) {
- if (this.next(), this.eat(b.star)) return this.expectContextual('from'),
- e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected(),
- this.semicolon(),
- this.finishNode(e, 'ExportAllDeclaration');
- if (this.eat(b._default)) {
- var n;
- if (this.checkExport(t, 'default', this.lastTokStart), this.type === b._function || (n = this.isAsyncFunction())) {
- var r = this.startNode();
- this.next(),
- n && this.next(),
- e.declaration = this.parseFunction(r, null, !1, n)
- } else if (this.type === b._class) {
- var i = this.startNode();
- e.declaration = this.parseClass(i, null)
- } else e.declaration = this.parseMaybeAssign(),
- this.semicolon();
- return this.finishNode(e, 'ExportDefaultDeclaration')
- }
- if (this.shouldParseExportStatement()) e.declaration = this.parseStatement(!0),
- 'VariableDeclaration' === e.declaration.type ? this.checkVariableExport(t, e.declaration.declarations) : this.checkExport(t, e.declaration.id.name, e.declaration.id.start),
- e.specifiers = [
- ],
- e.source = null;
- else {
- if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(t), this.eatContextual('from')) e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected();
- else {
- for (var s = 0; s < e.specifiers.length; s++) (this.keywords.test(e.specifiers[s].local.name) || this.reservedWords.test(e.specifiers[s].local.name)) && this.unexpected(e.specifiers[s].local.start);
- e.source = null
- }
- this.semicolon()
- }
- return this.finishNode(e, 'ExportNamedDeclaration')
- },
- j.checkExport = function (e, t, n) {
- e && (Object.prototype.hasOwnProperty.call(e, t) && this.raiseRecoverable(n, 'Duplicate export \'' + t + '\''), e[t] = !0)
- },
- j.checkPatternExport = function (e, t) {
- var n = t.type;
- if ('Identifier' == n) this.checkExport(e, t.name, t.start);
- else if ('ObjectPattern' == n) for (var r = 0; r < t.properties.length; ++r) this.checkPatternExport(e, t.properties[r].value);
- else if ('ArrayPattern' == n) for (var i = 0; i < t.elements.length; ++i) {
- var s = t.elements[i];
- s && this.checkPatternExport(e, s)
- } else 'AssignmentPattern' == n ? this.checkPatternExport(e, t.left) : 'ParenthesizedExpression' == n && this.checkPatternExport(e, t.expression)
- },
- j.checkVariableExport = function (e, t) {
- if (e) for (var n = 0; n < t.length; n++) this.checkPatternExport(e, t[n].id)
- },
- j.shouldParseExportStatement = function () {
- return 'var' === this.type.keyword || 'const' === this.type.keyword || 'class' === this.type.keyword || 'function' === this.type.keyword || this.isLet() || this.isAsyncFunction()
- },
- j.parseExportSpecifiers = function (e) {
- var t = [
- ],
- n = !0;
- for (this.expect(b.braceL); !this.eat(b.braceR); ) {
- if (n) n = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var r = this.startNode();
- r.local = this.parseIdent(!0),
- r.exported = this.eatContextual('as') ? this.parseIdent(!0) : r.local,
- this.checkExport(e, r.exported.name, r.exported.start),
- t.push(this.finishNode(r, 'ExportSpecifier'))
- }
- return t
- },
- j.parseImport = function (e) {
- return this.next(),
- this.type === b.string ? (e.specifiers = V, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual('from'), e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected()),
- this.semicolon(),
- this.finishNode(e, 'ImportDeclaration')
- },
- j.parseImportSpecifiers = function () {
- var e = [
- ],
- t = !0;
- if (this.type === b.name) {
- var n = this.startNode();
- if (n.local = this.parseIdent(), this.checkLVal(n.local, !0), e.push(this.finishNode(n, 'ImportDefaultSpecifier')), !this.eat(b.comma)) return e
- }
- if (this.type === b.star) {
- var r = this.startNode();
- return this.next(),
- this.expectContextual('as'),
- r.local = this.parseIdent(),
- this.checkLVal(r.local, !0),
- e.push(this.finishNode(r, 'ImportNamespaceSpecifier')),
- e
- }
- for (this.expect(b.braceL); !this.eat(b.braceR); ) {
- if (t) t = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var i = this.startNode();
- i.imported = this.parseIdent(!0),
- this.eatContextual('as') ? i.local = this.parseIdent() : (i.local = i.imported, this.isKeyword(i.local.name) && this.unexpected(i.local.start), this.reservedWordsStrict.test(i.local.name) && this.raiseRecoverable(i.local.start, 'The keyword \'' + i.local.name + '\' is reserved')),
- this.checkLVal(i.local, !0),
- e.push(this.finishNode(i, 'ImportSpecifier'))
- }
- return e
- };
- var z = N.prototype;
- z.toAssignable = function (e, t) {
- if (this.options.ecmaVersion >= 6 && e) switch (e.type) {
- case 'Identifier':
- this.inAsync && 'await' === e.name && this.raise(e.start, 'Can not use \'await\' as identifier inside an async function');
- break;
- case 'ObjectPattern':
- case 'ArrayPattern':
- break;
- case 'ObjectExpression':
- e.type = 'ObjectPattern';
- for (var n = 0; n < e.properties.length; n++) {
- var r = e.properties[n];
- 'init' !== r.kind && this.raise(r.key.start, 'Object pattern can\'t contain getter or setter'),
- this.toAssignable(r.value, t)
- }
- break;
- case 'ArrayExpression':
- e.type = 'ArrayPattern',
- this.toAssignableList(e.elements, t);
- break;
- case 'AssignmentExpression':
- if ('=' !== e.operator) {
- this.raise(e.left.end, 'Only \'=\' operator can be used for specifying default value.');
- break
- }
- e.type = 'AssignmentPattern',
- delete e.operator,
- this.toAssignable(e.left, t);
- case 'AssignmentPattern':
- break;
- case 'ParenthesizedExpression':
- e.expression = this.toAssignable(e.expression, t);
- break;
- case 'MemberExpression':
- if (!t) break;
- default:
- this.raise(e.start, 'Assigning to rvalue')
- }
- return e
- },
- z.toAssignableList = function (e, t) {
- var n = e.length;
- if (n) {
- var r = e[n - 1];
- if (r && 'RestElement' == r.type) --n;
- else if (r && 'SpreadElement' == r.type) {
- r.type = 'RestElement';
- var i = r.argument;
- this.toAssignable(i, t),
- 'Identifier' !== i.type && 'MemberExpression' !== i.type && 'ArrayPattern' !== i.type && this.unexpected(i.start),
- --n
- }
- t && r && 'RestElement' === r.type && 'Identifier' !== r.argument.type && this.unexpected(r.argument.start)
- }
- for (var s = 0; s < n; s++) {
- var o = e[s];
- o && this.toAssignable(o, t)
- }
- return e
- },
- z.parseSpread = function (e) {
- var t = this.startNode();
- return this.next(),
- t.argument = this.parseMaybeAssign(!1, e),
- this.finishNode(t, 'SpreadElement')
- },
- z.parseRest = function (e) {
- var t = this.startNode();
- return this.next(),
- t.argument = e ? this.type === b.name ? this.parseIdent() : this.unexpected() : this.type === b.name || this.type === b.bracketL ? this.parseBindingAtom() : this.unexpected(),
- this.finishNode(t, 'RestElement')
- },
- z.parseBindingAtom = function () {
- if (this.options.ecmaVersion < 6) return this.parseIdent();
- switch (this.type) {
- case b.name:
- return this.parseIdent();
- case b.bracketL:
- var e = this.startNode();
- return this.next(),
- e.elements = this.parseBindingList(b.bracketR, !0, !0),
- this.finishNode(e, 'ArrayPattern');
- case b.braceL:
- return this.parseObj(!0);
- default:
- this.unexpected()
- }
- },
- z.parseBindingList = function (e, t, n, r) {
- for (var i = [
- ], s = !0; !this.eat(e); ) if (s ? s = !1 : this.expect(b.comma), t && this.type === b.comma) i.push(null);
- else {
- if (n && this.afterTrailingComma(e)) break;
- if (this.type === b.ellipsis) {
- var o = this.parseRest(r);
- this.parseBindingListItem(o),
- i.push(o),
- this.type === b.comma && this.raise(this.start, 'Comma is not permitted after the rest element'),
- this.expect(e);
- break
- }
- var a = this.parseMaybeDefault(this.start, this.startLoc);
- this.parseBindingListItem(a),
- i.push(a)
- }
- return i
- },
- z.parseBindingListItem = function (e) {
- return e
- },
- z.parseMaybeDefault = function (e, t, n) {
- if (n = n || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(b.eq)) return n;
- var r = this.startNodeAt(e, t);
- return r.left = n,
- r.right = this.parseMaybeAssign(),
- this.finishNode(r, 'AssignmentPattern')
- },
- z.checkLVal = function (e, t, n) {
- switch (e.type) {
- case 'Identifier':
- this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (t ? 'Binding ' : 'Assigning to ') + e.name + ' in strict mode'),
- n && (D(n, e.name) && this.raiseRecoverable(e.start, 'Argument name clash'), n[e.name] = !0);
- break;
- case 'MemberExpression':
- t && this.raiseRecoverable(e.start, (t ? 'Binding' : 'Assigning to') + ' member expression');
- break;
- case 'ObjectPattern':
- for (var r = 0; r < e.properties.length; r++) this.checkLVal(e.properties[r].value, t, n);
- break;
- case 'ArrayPattern':
- for (var i = 0; i < e.elements.length; i++) {
- var s = e.elements[i];
- s && this.checkLVal(s, t, n)
- }
- break;
- case 'AssignmentPattern':
- this.checkLVal(e.left, t, n);
- break;
- case 'RestElement':
- this.checkLVal(e.argument, t, n);
- break;
- case 'ParenthesizedExpression':
- this.checkLVal(e.expression, t, n);
- break;
- default:
- this.raise(e.start, (t ? 'Binding' : 'Assigning to') + ' rvalue')
- }
- };
- var q = N.prototype;
- q.checkPropClash = function (e, t) {
- if (!(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
- var n,
- r = e.key;
- switch (r.type) {
- case 'Identifier':
- n = r.name;
- break;
- case 'Literal':
- n = String(r.value);
- break;
- default:
- return
- }
- var i = e.kind;
- if (this.options.ecmaVersion >= 6) '__proto__' === n && 'init' === i && (t.proto && this.raiseRecoverable(r.start, 'Redefinition of __proto__ property'), t.proto = !0);
- else {
- var s = t[n = '$' + n];
- if (s) {
- var o = 'init' !== i;
- (!this.strict && !o || !s[i]) && o ^ s.init || this.raiseRecoverable(r.start, 'Redefinition of property')
- } else s = t[n] = {
- init: !1,
- get: !1,
- set: !1
- };
- s[i] = !0
- }
- }
- },
- q.parseExpression = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseMaybeAssign(e, t);
- if (this.type === b.comma) {
- var s = this.startNodeAt(n, r);
- for (s.expressions = [
- i
- ]; this.eat(b.comma); ) s.expressions.push(this.parseMaybeAssign(e, t));
- return this.finishNode(s, 'SequenceExpression')
- }
- return i
- },
- q.parseMaybeAssign = function (e, t, n) {
- if (this.inGenerator && this.isContextual('yield')) return this.parseYield();
- var r = !1,
- i = - 1;
- t ? (i = t.parenthesizedAssign, t.parenthesizedAssign = - 1) : (t = new I, r = !0);
- var s = this.start,
- o = this.startLoc;
- this.type != b.parenL && this.type != b.name || (this.potentialArrowAt = this.start);
- var a = this.parseMaybeConditional(e, t);
- if (n && (a = n.call(this, a, s, o)), this.type.isAssign) {
- this.checkPatternErrors(t, !0),
- r || I.call(t);
- var u = this.startNodeAt(s, o);
- return u.operator = this.value,
- u.left = this.type === b.eq ? this.toAssignable(a) : a,
- t.shorthandAssign = - 1,
- this.checkLVal(a),
- this.next(),
- u.right = this.parseMaybeAssign(e),
- this.finishNode(u, 'AssignmentExpression')
- }
- return r && this.checkExpressionErrors(t, !0),
- i > - 1 && (t.parenthesizedAssign = i),
- a
- },
- q.parseMaybeConditional = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseExprOps(e, t);
- if (this.checkExpressionErrors(t)) return i;
- if (this.eat(b.question)) {
- var s = this.startNodeAt(n, r);
- return s.test = i,
- s.consequent = this.parseMaybeAssign(),
- this.expect(b.colon),
- s.alternate = this.parseMaybeAssign(e),
- this.finishNode(s, 'ConditionalExpression')
- }
- return i
- },
- q.parseExprOps = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseMaybeUnary(t, !1);
- return this.checkExpressionErrors(t) ? i : this.parseExprOp(i, n, r, - 1, e)
- },
- q.parseExprOp = function (e, t, n, r, i) {
- var s = this.type.binop;
- if (null != s && (!i || this.type !== b._in) && s > r) {
- var o = this.type === b.logicalOR || this.type === b.logicalAND,
- a = this.value;
- this.next();
- var u = this.start,
- l = this.startLoc,
- c = this.parseExprOp(this.parseMaybeUnary(null, !1), u, l, s, i),
- p = this.buildBinary(t, n, e, c, a, o);
- return this.parseExprOp(p, t, n, r, i)
- }
- return e
- },
- q.buildBinary = function (e, t, n, r, i, s) {
- var o = this.startNodeAt(e, t);
- return o.left = n,
- o.operator = i,
- o.right = r,
- this.finishNode(o, s ? 'LogicalExpression' : 'BinaryExpression')
- },
- q.parseMaybeUnary = function (e, t) {
- var n,
- r = this.start,
- i = this.startLoc;
- if (this.inAsync && this.isContextual('await')) n = this.parseAwait(e),
- t = !0;
- else if (this.type.prefix) {
- var s = this.startNode(),
- o = this.type === b.incDec;
- s.operator = this.value,
- s.prefix = !0,
- this.next(),
- s.argument = this.parseMaybeUnary(null, !0),
- this.checkExpressionErrors(e, !0),
- o ? this.checkLVal(s.argument) : this.strict && 'delete' === s.operator && 'Identifier' === s.argument.type ? this.raiseRecoverable(s.start, 'Deleting local variable in strict mode') : t = !0,
- n = this.finishNode(s, o ? 'UpdateExpression' : 'UnaryExpression')
- } else {
- if (n = this.parseExprSubscripts(e), this.checkExpressionErrors(e)) return n;
- for (; this.type.postfix && !this.canInsertSemicolon(); ) {
- var a = this.startNodeAt(r, i);
- a.operator = this.value,
- a.prefix = !1,
- a.argument = n,
- this.checkLVal(n),
- this.next(),
- n = this.finishNode(a, 'UpdateExpression')
- }
- }
- return !t && this.eat(b.starstar) ? this.buildBinary(r, i, n, this.parseMaybeUnary(null, !1), '**', !1) : n
- },
- q.parseExprSubscripts = function (e) {
- var t = this.start,
- n = this.startLoc,
- r = this.parseExprAtom(e),
- i = 'ArrowFunctionExpression' === r.type && ')' !== this.input.slice(this.lastTokStart, this.lastTokEnd);
- if (this.checkExpressionErrors(e) || i) return r;
- var s = this.parseSubscripts(r, t, n);
- return e && 'MemberExpression' === s.type && (e.parenthesizedAssign >= s.start && (e.parenthesizedAssign = - 1), e.parenthesizedBind >= s.start && (e.parenthesizedBind = - 1)),
- s
- },
- q.parseSubscripts = function (e, t, n, r) {
- for (var i, s = this.options.ecmaVersion >= 8 && 'Identifier' === e.type && 'async' === e.name && this.lastTokEnd == e.end && !this.canInsertSemicolon(); ; ) if ((i = this.eat(b.bracketL)) || this.eat(b.dot)) {
- var o = this.startNodeAt(t, n);
- o.object = e,
- o.property = i ? this.parseExpression() : this.parseIdent(!0),
- o.computed = !!i,
- i && this.expect(b.bracketR),
- e = this.finishNode(o, 'MemberExpression')
- } else if (!r && this.eat(b.parenL)) {
- var a = new I,
- u = this.yieldPos,
- l = this.awaitPos;
- this.yieldPos = 0,
- this.awaitPos = 0;
- var c = this.parseExprList(b.parenR, this.options.ecmaVersion >= 8, !1, a);
- if (s && !this.canInsertSemicolon() && this.eat(b.arrow)) return this.checkPatternErrors(a, !1),
- this.checkYieldAwaitInDefaultParams(),
- this.yieldPos = u,
- this.awaitPos = l,
- this.parseArrowExpression(this.startNodeAt(t, n), c, !0);
- this.checkExpressionErrors(a, !0),
- this.yieldPos = u || this.yieldPos,
- this.awaitPos = l || this.awaitPos;
- var p = this.startNodeAt(t, n);
- p.callee = e,
- p.arguments = c,
- e = this.finishNode(p, 'CallExpression')
- } else {
- if (this.type !== b.backQuote) return e;
- var h = this.startNodeAt(t, n);
- h.tag = e,
- h.quasi = this.parseTemplate(),
- e = this.finishNode(h, 'TaggedTemplateExpression')
- }
- },
- q.parseExprAtom = function (e) {
- var t,
- n = this.potentialArrowAt == this.start;
- switch (this.type) {
- case b._super:
- this.inFunction || this.raise(this.start, '\'super\' outside of function or class');
- case b._this:
- var r = this.type === b._this ? 'ThisExpression' : 'Super';
- return t = this.startNode(),
- this.next(),
- this.finishNode(t, r);
- case b.name:
- var i = this.start,
- s = this.startLoc,
- o = this.parseIdent(this.type !== b.name);
- if (this.options.ecmaVersion >= 8 && 'async' === o.name && !this.canInsertSemicolon() && this.eat(b._function)) return this.parseFunction(this.startNodeAt(i, s), !1, !1, !0);
- if (n && !this.canInsertSemicolon()) {
- if (this.eat(b.arrow)) return this.parseArrowExpression(this.startNodeAt(i, s), [
- o
- ], !1);
- if (this.options.ecmaVersion >= 8 && 'async' === o.name && this.type === b.name) return o = this.parseIdent(),
- !this.canInsertSemicolon() && this.eat(b.arrow) || this.unexpected(),
- this.parseArrowExpression(this.startNodeAt(i, s), [
- o
- ], !0)
- }
- return o;
- case b.regexp:
- var a = this.value;
- return (t = this.parseLiteral(a.value)).regex = {
- pattern: a.pattern,
- flags: a.flags
- },
- t;
- case b.num:
- case b.string:
- return this.parseLiteral(this.value);
- case b._null:
- case b._true:
- case b._false:
- return (t = this.startNode()).value = this.type === b._null ? null : this.type === b._true,
- t.raw = this.type.keyword,
- this.next(),
- this.finishNode(t, 'Literal');
- case b.parenL:
- var u = this.start,
- l = this.parseParenAndDistinguishExpression(n);
- return e && (e.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(l) && (e.parenthesizedAssign = u), e.parenthesizedBind < 0 && (e.parenthesizedBind = u)),
- l;
- case b.bracketL:
- return t = this.startNode(),
- this.next(),
- t.elements = this.parseExprList(b.bracketR, !0, !0, e),
- this.finishNode(t, 'ArrayExpression');
- case b.braceL:
- return this.parseObj(!1, e);
- case b._function:
- return t = this.startNode(),
- this.next(),
- this.parseFunction(t, !1);
- case b._class:
- return this.parseClass(this.startNode(), !1);
- case b._new:
- return this.parseNew();
- case b.backQuote:
- return this.parseTemplate();
- default:
- this.unexpected()
- }
- },
- q.parseLiteral = function (e) {
- var t = this.startNode();
- return t.value = e,
- t.raw = this.input.slice(this.start, this.end),
- this.next(),
- this.finishNode(t, 'Literal')
- },
- q.parseParenExpression = function () {
- this.expect(b.parenL);
- var e = this.parseExpression();
- return this.expect(b.parenR),
- e
- },
- q.parseParenAndDistinguishExpression = function (e) {
- var t,
- n = this.start,
- r = this.startLoc,
- i = this.options.ecmaVersion >= 8;
- if (this.options.ecmaVersion >= 6) {
- this.next();
- var s,
- o,
- a = this.start,
- u = this.startLoc,
- l = [
- ],
- c = !0,
- p = !1,
- h = new I,
- f = this.yieldPos,
- d = this.awaitPos;
- for (this.yieldPos = 0, this.awaitPos = 0; this.type !== b.parenR; ) {
- if (c ? c = !1 : this.expect(b.comma), i && this.afterTrailingComma(b.parenR, !0)) {
- p = !0;
- break
- }
- if (this.type === b.ellipsis) {
- s = this.start,
- l.push(this.parseParenItem(this.parseRest())),
- this.type === b.comma && this.raise(this.start, 'Comma is not permitted after the rest element');
- break
- }
- this.type !== b.parenL || o || (o = this.start),
- l.push(this.parseMaybeAssign(!1, h, this.parseParenItem))
- }
- var m = this.start,
- g = this.startLoc;
- if (this.expect(b.parenR), e && !this.canInsertSemicolon() && this.eat(b.arrow)) return this.checkPatternErrors(h, !1),
- this.checkYieldAwaitInDefaultParams(),
- o && this.unexpected(o),
- this.yieldPos = f,
- this.awaitPos = d,
- this.parseParenArrowList(n, r, l);
- l.length && !p || this.unexpected(this.lastTokStart),
- s && this.unexpected(s),
- this.checkExpressionErrors(h, !0),
- this.yieldPos = f || this.yieldPos,
- this.awaitPos = d || this.awaitPos,
- l.length > 1 ? ((t = this.startNodeAt(a, u)).expressions = l, this.finishNodeAt(t, 'SequenceExpression', m, g)) : t = l[0]
- } else t = this.parseParenExpression();
- if (this.options.preserveParens) {
- var y = this.startNodeAt(n, r);
- return y.expression = t,
- this.finishNode(y, 'ParenthesizedExpression')
- }
- return t
- },
- q.parseParenItem = function (e) {
- return e
- },
- q.parseParenArrowList = function (e, t, n) {
- return this.parseArrowExpression(this.startNodeAt(e, t), n)
- };
- var K = [
- ];
- q.parseNew = function () {
- var e = this.startNode(),
- t = this.parseIdent(!0);
- if (this.options.ecmaVersion >= 6 && this.eat(b.dot)) return e.meta = t,
- e.property = this.parseIdent(!0),
- 'target' !== e.property.name && this.raiseRecoverable(e.property.start, 'The only valid meta property for new is new.target'),
- this.inFunction || this.raiseRecoverable(e.start, 'new.target can only be used in functions'),
- this.finishNode(e, 'MetaProperty');
- var n = this.start,
- r = this.startLoc;
- return e.callee = this.parseSubscripts(this.parseExprAtom(), n, r, !0),
- this.eat(b.parenL) ? e.arguments = this.parseExprList(b.parenR, this.options.ecmaVersion >= 8, !1) : e.arguments = K,
- this.finishNode(e, 'NewExpression')
- },
- q.parseTemplateElement = function () {
- var e = this.startNode();
- return e.value = {
- raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
- cooked: this.value
- },
- this.next(),
- e.tail = this.type === b.backQuote,
- this.finishNode(e, 'TemplateElement')
- },
- q.parseTemplate = function () {
- var e = this.startNode();
- this.next(),
- e.expressions = [
- ];
- var t = this.parseTemplateElement();
- for (e.quasis = [
- t
- ]; !t.tail; ) this.expect(b.dollarBraceL),
- e.expressions.push(this.parseExpression()),
- this.expect(b.braceR),
- e.quasis.push(t = this.parseTemplateElement());
- return this.next(),
- this.finishNode(e, 'TemplateLiteral')
- },
- q.parseObj = function (e, t) {
- var n = this.startNode(),
- r = !0,
- i = {
- };
- for (n.properties = [
- ], this.next(); !this.eat(b.braceR); ) {
- if (r) r = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var s,
- o,
- a,
- u,
- l = this.startNode();
- this.options.ecmaVersion >= 6 && (l.method = !1, l.shorthand = !1, (e || t) && (a = this.start, u = this.startLoc), e || (s = this.eat(b.star))),
- this.parsePropertyName(l),
- e || !(this.options.ecmaVersion >= 8) || s || l.computed || 'Identifier' !== l.key.type || 'async' !== l.key.name || this.type === b.parenL || this.type === b.colon || this.canInsertSemicolon() ? o = !1 : (o = !0, this.parsePropertyName(l, t)),
- this.parsePropertyValue(l, e, s, o, a, u, t),
- this.checkPropClash(l, i),
- n.properties.push(this.finishNode(l, 'Property'))
- }
- return this.finishNode(n, e ? 'ObjectPattern' : 'ObjectExpression')
- },
- q.parsePropertyValue = function (e, t, n, r, i, s, o) {
- if ((n || r) && this.type === b.colon && this.unexpected(), this.eat(b.colon)) e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, o),
- e.kind = 'init';
- else if (this.options.ecmaVersion >= 6 && this.type === b.parenL) t && this.unexpected(),
- e.kind = 'init',
- e.method = !0,
- e.value = this.parseMethod(n, r);
- else if (this.options.ecmaVersion >= 5 && !e.computed && 'Identifier' === e.key.type && ('get' === e.key.name || 'set' === e.key.name) && this.type != b.comma && this.type != b.braceR) {
- (n || r || t) && this.unexpected(),
- e.kind = e.key.name,
- this.parsePropertyName(e),
- e.value = this.parseMethod(!1);
- var a = 'get' === e.kind ? 0 : 1;
- if (e.value.params.length !== a) {
- var u = e.value.start;
- 'get' === e.kind ? this.raiseRecoverable(u, 'getter should have no params') : this.raiseRecoverable(u, 'setter should have exactly one param')
- } else 'set' === e.kind && 'RestElement' === e.value.params[0].type && this.raiseRecoverable(e.value.params[0].start, 'Setter cannot use rest params')
- } else this.options.ecmaVersion >= 6 && !e.computed && 'Identifier' === e.key.type ? ((this.keywords.test(e.key.name) || (this.strict ? this.reservedWordsStrict : this.reservedWords).test(e.key.name) || this.inGenerator && 'yield' == e.key.name || this.inAsync && 'await' == e.key.name) && this.raiseRecoverable(e.key.start, '\'' + e.key.name + '\' can not be used as shorthand property'), e.kind = 'init', t ? e.value = this.parseMaybeDefault(i, s, e.key) : this.type === b.eq && o ? (o.shorthandAssign < 0 && (o.shorthandAssign = this.start), e.value = this.parseMaybeDefault(i, s, e.key)) : e.value = e.key, e.shorthand = !0) : this.unexpected()
- },
- q.parsePropertyName = function (e) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(b.bracketL)) return e.computed = !0,
- e.key = this.parseMaybeAssign(),
- this.expect(b.bracketR),
- e.key;
- e.computed = !1
- }
- return e.key = this.type === b.num || this.type === b.string ? this.parseExprAtom() : this.parseIdent(!0)
- },
- q.initFunction = function (e) {
- e.id = null,
- this.options.ecmaVersion >= 6 && (e.generator = !1, e.expression = !1),
- this.options.ecmaVersion >= 8 && (e.async = !1)
- },
- q.parseMethod = function (e, t) {
- var n = this.startNode(),
- r = this.inGenerator,
- i = this.inAsync,
- s = this.yieldPos,
- o = this.awaitPos,
- a = this.inFunction;
- return this.initFunction(n),
- this.options.ecmaVersion >= 6 && (n.generator = e),
- this.options.ecmaVersion >= 8 && (n.async = !!t),
- this.inGenerator = n.generator,
- this.inAsync = n.async,
- this.yieldPos = 0,
- this.awaitPos = 0,
- this.inFunction = !0,
- this.expect(b.parenL),
- n.params = this.parseBindingList(b.parenR, !1, this.options.ecmaVersion >= 8),
- this.checkYieldAwaitInDefaultParams(),
- this.parseFunctionBody(n, !1),
- this.inGenerator = r,
- this.inAsync = i,
- this.yieldPos = s,
- this.awaitPos = o,
- this.inFunction = a,
- this.finishNode(n, 'FunctionExpression')
- },
- q.parseArrowExpression = function (e, t, n) {
- var r = this.inGenerator,
- i = this.inAsync,
- s = this.yieldPos,
- o = this.awaitPos,
- a = this.inFunction;
- return this.initFunction(e),
- this.options.ecmaVersion >= 8 && (e.async = !!n),
- this.inGenerator = !1,
- this.inAsync = e.async,
- this.yieldPos = 0,
- this.awaitPos = 0,
- this.inFunction = !0,
- e.params = this.toAssignableList(t, !0),
- this.parseFunctionBody(e, !0),
- this.inGenerator = r,
- this.inAsync = i,
- this.yieldPos = s,
- this.awaitPos = o,
- this.inFunction = a,
- this.finishNode(e, 'ArrowFunctionExpression')
- },
- q.parseFunctionBody = function (e, t) {
- var n = t && this.type !== b.braceL,
- r = this.strict,
- i = !1;
- if (n) e.body = this.parseMaybeAssign(),
- e.expression = !0;
- else {
- var s = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(e.params);
- r && !s || (i = this.strictDirective(this.end)) && s && this.raiseRecoverable(e.start, 'Illegal \'use strict\' directive in function with non-simple parameter list');
- var o = this.labels;
- this.labels = [
- ],
- i && (this.strict = !0),
- e.body = this.parseBlock(!0),
- e.expression = !1,
- this.labels = o
- }
- r || i ? (this.strict = !0, e.id && this.checkLVal(e.id, !0), this.checkParams(e), this.strict = r) : !t && this.isSimpleParamList(e.params) || this.checkParams(e)
- },
- q.isSimpleParamList = function (e) {
- for (var t = 0; t < e.length; t++) if ('Identifier' !== e[t].type) return !1;
- return !0
- },
- q.checkParams = function (e) {
- for (var t = {
- }, n = 0; n < e.params.length; n++) this.checkLVal(e.params[n], !0, t)
- },
- q.parseExprList = function (e, t, n, r) {
- for (var i = [
- ], s = !0; !this.eat(e); ) {
- if (s) s = !1;
- else if (this.expect(b.comma), t && this.afterTrailingComma(e)) break;
- var o;
- n && this.type === b.comma ? o = null : this.type === b.ellipsis ? (o = this.parseSpread(r), r && this.type === b.comma && r.trailingComma < 0 && (r.trailingComma = this.start)) : o = this.parseMaybeAssign(!1, r),
- i.push(o)
- }
- return i
- },
- q.parseIdent = function (e) {
- var t = this.startNode();
- return e && 'never' == this.options.allowReserved && (e = !1),
- this.type === b.name ? (!e && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || - 1 == this.input.slice(this.start, this.end).indexOf('\\')) && this.raiseRecoverable(this.start, 'The keyword \'' + this.value + '\' is reserved'), this.inGenerator && 'yield' === this.value && this.raiseRecoverable(this.start, 'Can not use \'yield\' as identifier inside a generator'), this.inAsync && 'await' === this.value && this.raiseRecoverable(this.start, 'Can not use \'await\' as identifier inside an async function'), t.name = this.value) : e && this.type.keyword ? t.name = this.type.keyword : this.unexpected(),
- this.next(),
- this.finishNode(t, 'Identifier')
- },
- q.parseYield = function () {
- this.yieldPos || (this.yieldPos = this.start);
- var e = this.startNode();
- return this.next(),
- this.type == b.semi || this.canInsertSemicolon() || this.type != b.star && !this.type.startsExpr ? (e.delegate = !1, e.argument = null) : (e.delegate = this.eat(b.star), e.argument = this.parseMaybeAssign()),
- this.finishNode(e, 'YieldExpression')
- },
- q.parseAwait = function () {
- this.awaitPos || (this.awaitPos = this.start);
- var e = this.startNode();
- return this.next(),
- e.argument = this.parseMaybeUnary(null, !0),
- this.finishNode(e, 'AwaitExpression')
- };
- var $ = N.prototype;
- $.raise = function (e, t) {
- var n = T(this.input, e);
- t += ' (' + n.line + ':' + n.column + ')';
- var r = new SyntaxError(t);
- throw r.pos = e,
- r.loc = n,
- r.raisedAt = this.pos,
- r
- },
- $.raiseRecoverable = $.raise,
- $.curPosition = function () {
- if (this.options.locations) return new k(this.curLine, this.pos - this.lineStart)
- };
- var Y = function (e, t, n) {
- this.type = '',
- this.start = t,
- this.end = 0,
- e.options.locations && (this.loc = new S(e, n)),
- e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile),
- e.options.ranges && (this.range = [
- t,
- 0
- ])
- },
- W = N.prototype;
- function G(e, t, n, r) {
- return e.type = t,
- e.end = n,
- this.options.locations && (e.loc.end = r),
- this.options.ranges && (e.range[1] = n),
- e
- }
- W.startNode = function () {
- return new Y(this, this.start, this.startLoc)
- },
- W.startNodeAt = function (e, t) {
- return new Y(this, e, t)
- },
- W.finishNode = function (e, t) {
- return G.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc)
- },
- W.finishNodeAt = function (e, t, n, r) {
- return G.call(this, e, t, n, r)
- };
- var H = function (e, t, n, r) {
- this.token = e,
- this.isExpr = !!t,
- this.preserveSpace = !!n,
- this.override = r
- },
- X = {
- b_stat: new H('{', !1),
- b_expr: new H('{', !0),
- b_tmpl: new H('${', !0),
- p_stat: new H('(', !1),
- p_expr: new H('(', !0),
- q_tmpl: new H('`', !0, !0, function (e) {
- return e.readTmplToken()
- }),
- f_expr: new H('function', !0)
- },
- J = N.prototype;
- J.initialContext = function () {
- return [X.b_stat]
- },
- J.braceIsBlock = function (e) {
- if (e === b.colon) {
- var t = this.curContext();
- if (t === X.b_stat || t === X.b_expr) return !t.isExpr
- }
- return e === b._return ? x.test(this.input.slice(this.lastTokEnd, this.start)) : e === b._else || e === b.semi || e === b.eof || e === b.parenR || (e == b.braceL ? this.curContext() === X.b_stat : !this.exprAllowed)
- },
- J.updateContext = function (e) {
- var t,
- n = this.type;
- n.keyword && e == b.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr
- },
- b.parenR.updateContext = b.braceR.updateContext = function () {
- if (1 != this.context.length) {
- var e = this.context.pop();
- e === X.b_stat && this.curContext() === X.f_expr ? (this.context.pop(), this.exprAllowed = !1) : this.exprAllowed = e === X.b_tmpl || !e.isExpr
- } else this.exprAllowed = !0
- },
- b.braceL.updateContext = function (e) {
- this.context.push(this.braceIsBlock(e) ? X.b_stat : X.b_expr),
- this.exprAllowed = !0
- },
- b.dollarBraceL.updateContext = function () {
- this.context.push(X.b_tmpl),
- this.exprAllowed = !0
- },
- b.parenL.updateContext = function (e) {
- var t = e === b._if || e === b._for || e === b._with || e === b._while;
- this.context.push(t ? X.p_stat : X.p_expr),
- this.exprAllowed = !0
- },
- b.incDec.updateContext = function () {
- },
- b._function.updateContext = function (e) {
- e.beforeExpr && e !== b.semi && e !== b._else && (e !== b.colon && e !== b.braceL || this.curContext() !== X.b_stat) && this.context.push(X.f_expr),
- this.exprAllowed = !1
- },
- b.backQuote.updateContext = function () {
- this.curContext() === X.q_tmpl ? this.context.pop() : this.context.push(X.q_tmpl),
- this.exprAllowed = !1
- };
- var Q = function (e) {
- this.type = e.type,
- this.value = e.value,
- this.start = e.start,
- this.end = e.end,
- e.options.locations && (this.loc = new S(e, e.startLoc, e.endLoc)),
- e.options.ranges && (this.range = [
- e.start,
- e.end
- ])
- },
- Z = N.prototype,
- ee = 'object' == typeof Packages && '[object JavaPackage]' == Object.prototype.toString.call(Packages);
- function te(e, t, n, r) {
- try {
- return new RegExp(e, t)
- } catch (e) {
- if (void 0 !== n) throw e instanceof SyntaxError && r.raise(n, 'Error parsing regular expression: ' + e.message),
- e
- }
- }
- Z.next = function () {
- this.options.onToken && this.options.onToken(new Q(this)),
- this.lastTokEnd = this.end,
- this.lastTokStart = this.start,
- this.lastTokEndLoc = this.endLoc,
- this.lastTokStartLoc = this.startLoc,
- this.nextToken()
- },
- Z.getToken = function () {
- return this.next(),
- new Q(this)
- },
- 'undefined' != typeof Symbol && (Z[Symbol.iterator] = function () {
- var e = this;
- return {
- next: function () {
- var t = e.getToken();
- return {
- done: t.type === b.eof,
- value: t
- }
- }
- }
- }),
- Z.curContext = function () {
- return this.context[this.context.length - 1]
- },
- Z.nextToken = function () {
- var e = this.curContext();
- return e && e.preserveSpace || this.skipSpace(),
- this.start = this.pos,
- this.options.locations && (this.startLoc = this.curPosition()),
- this.pos >= this.input.length ? this.finishToken(b.eof) : e.override ? e.override(this) : void this.readToken(this.fullCharCodeAtPos())
- },
- Z.readToken = function (e) {
- return p(e, this.options.ecmaVersion >= 6) || 92 === e ? this.readWord() : this.getTokenFromCode(e)
- },
- Z.fullCharCodeAtPos = function () {
- var e = this.input.charCodeAt(this.pos);
- return e <= 55295 || e >= 57344 ? e : (e << 10) + this.input.charCodeAt(this.pos + 1) - 56613888
- },
- Z.skipBlockComment = function () {
- var e,
- t = this.options.onComment && this.curPosition(),
- n = this.pos,
- r = this.input.indexOf('*/', this.pos += 2);
- if ( - 1 === r && this.raise(this.pos - 2, 'Unterminated comment'), this.pos = r + 2, this.options.locations) for (A.lastIndex = n; (e = A.exec(this.input)) && e.index < this.pos; ) ++this.curLine,
- this.lineStart = e.index + e[0].length;
- this.options.onComment && this.options.onComment(!0, this.input.slice(n + 2, r), n, this.pos, t, this.curPosition())
- },
- Z.skipLineComment = function (e) {
- for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && 10 !== r && 13 !== r && 8232 !== r && 8233 !== r; ) ++this.pos,
- r = this.input.charCodeAt(this.pos);
- this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition())
- },
- Z.skipSpace = function () {
- e: for (; this.pos < this.input.length; ) {
- var e = this.input.charCodeAt(this.pos);
- switch (e) {
- case 32:
- case 160:
- ++this.pos;
- break;
- case 13:
- 10 === this.input.charCodeAt(this.pos + 1) && ++this.pos;
- case 10:
- case 8232:
- case 8233:
- ++this.pos,
- this.options.locations && (++this.curLine, this.lineStart = this.pos);
- break;
- case 47:
- switch (this.input.charCodeAt(this.pos + 1)) {
- case 42:
- this.skipBlockComment();
- break;
- case 47:
- this.skipLineComment(2);
- break;
- default:
- break e
- }
- break;
- default:
- if (!(e > 8 && e < 14 || e >= 5760 && _.test(String.fromCharCode(e)))) break e;
- ++this.pos
- }
- }
- },
- Z.finishToken = function (e, t) {
- this.end = this.pos,
- this.options.locations && (this.endLoc = this.curPosition());
- var n = this.type;
- this.type = e,
- this.value = t,
- this.updateContext(n)
- },
- Z.readToken_dot = function () {
- var e = this.input.charCodeAt(this.pos + 1);
- if (e >= 48 && e <= 57) return this.readNumber(!0);
- var t = this.input.charCodeAt(this.pos + 2);
- return this.options.ecmaVersion >= 6 && 46 === e && 46 === t ? (this.pos += 3, this.finishToken(b.ellipsis)) : (++this.pos, this.finishToken(b.dot))
- },
- Z.readToken_slash = function () {
- var e = this.input.charCodeAt(this.pos + 1);
- return this.exprAllowed ? (++this.pos, this.readRegexp()) : 61 === e ? this.finishOp(b.assign, 2) : this.finishOp(b.slash, 1)
- },
- Z.readToken_mult_modulo_exp = function (e) {
- var t = this.input.charCodeAt(this.pos + 1),
- n = 1,
- r = 42 === e ? b.star : b.modulo;
- return this.options.ecmaVersion >= 7 && 42 === t && (++n, r = b.starstar, t = this.input.charCodeAt(this.pos + 2)),
- 61 === t ? this.finishOp(b.assign, n + 1) : this.finishOp(r, n)
- },
- Z.readToken_pipe_amp = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return t === e ? this.finishOp(124 === e ? b.logicalOR : b.logicalAND, 2) : 61 === t ? this.finishOp(b.assign, 2) : this.finishOp(124 === e ? b.bitwiseOR : b.bitwiseAND, 1)
- },
- Z.readToken_caret = function () {
- return 61 === this.input.charCodeAt(this.pos + 1) ? this.finishOp(b.assign, 2) : this.finishOp(b.bitwiseXOR, 1)
- },
- Z.readToken_plus_min = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return t === e ? 45 == t && 62 == this.input.charCodeAt(this.pos + 2) && x.test(this.input.slice(this.lastTokEnd, this.pos)) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(b.incDec, 2) : 61 === t ? this.finishOp(b.assign, 2) : this.finishOp(b.plusMin, 1)
- },
- Z.readToken_lt_gt = function (e) {
- var t = this.input.charCodeAt(this.pos + 1),
- n = 1;
- return t === e ? (n = 62 === e && 62 === this.input.charCodeAt(this.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.pos + n) ? this.finishOp(b.assign, n + 1) : this.finishOp(b.bitShift, n)) : 33 == t && 60 == e && 45 == this.input.charCodeAt(this.pos + 2) && 45 == this.input.charCodeAt(this.pos + 3) ? (this.inModule && this.unexpected(), this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (61 === t && (n = 2), this.finishOp(b.relational, n))
- },
- Z.readToken_eq_excl = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return 61 === t ? this.finishOp(b.equality, 61 === this.input.charCodeAt(this.pos + 2) ? 3 : 2) : 61 === e && 62 === t && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(b.arrow)) : this.finishOp(61 === e ? b.eq : b.prefix, 1)
- },
- Z.getTokenFromCode = function (e) {
- switch (e) {
- case 46:
- return this.readToken_dot();
- case 40:
- return ++this.pos,
- this.finishToken(b.parenL);
- case 41:
- return ++this.pos,
- this.finishToken(b.parenR);
- case 59:
- return ++this.pos,
- this.finishToken(b.semi);
- case 44:
- return ++this.pos,
- this.finishToken(b.comma);
- case 91:
- return ++this.pos,
- this.finishToken(b.bracketL);
- case 93:
- return ++this.pos,
- this.finishToken(b.bracketR);
- case 123:
- return ++this.pos,
- this.finishToken(b.braceL);
- case 125:
- return ++this.pos,
- this.finishToken(b.braceR);
- case 58:
- return ++this.pos,
- this.finishToken(b.colon);
- case 63:
- return ++this.pos,
- this.finishToken(b.question);
- case 96:
- if (this.options.ecmaVersion < 6) break;
- return ++this.pos,
- this.finishToken(b.backQuote);
- case 48:
- var t = this.input.charCodeAt(this.pos + 1);
- if (120 === t || 88 === t) return this.readRadixNumber(16);
- if (this.options.ecmaVersion >= 6) {
- if (111 === t || 79 === t) return this.readRadixNumber(8);
- if (98 === t || 66 === t) return this.readRadixNumber(2)
- }
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- return this.readNumber(!1);
- case 34:
- case 39:
- return this.readString(e);
- case 47:
- return this.readToken_slash();
- case 37:
- case 42:
- return this.readToken_mult_modulo_exp(e);
- case 124:
- case 38:
- return this.readToken_pipe_amp(e);
- case 94:
- return this.readToken_caret();
- case 43:
- case 45:
- return this.readToken_plus_min(e);
- case 60:
- case 62:
- return this.readToken_lt_gt(e);
- case 61:
- case 33:
- return this.readToken_eq_excl(e);
- case 126:
- return this.finishOp(b.prefix, 1)
- }
- this.raise(this.pos, 'Unexpected character \'' + re(e) + '\'')
- },
- Z.finishOp = function (e, t) {
- var n = this.input.slice(this.pos, this.pos + t);
- return this.pos += t,
- this.finishToken(e, n)
- };
- var ne = !!te('￿', 'u');
- function re(e) {
- return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode(55296 + (e >> 10), 56320 + (1023 & e)))
- }
- Z.readRegexp = function () {
- for (var e, t, n = this, r = this.pos; ; ) {
- n.pos >= n.input.length && n.raise(r, 'Unterminated regular expression');
- var i = n.input.charAt(n.pos);
- if (x.test(i) && n.raise(r, 'Unterminated regular expression'), e) e = !1;
- else {
- if ('[' === i) t = !0;
- else if (']' === i && t) t = !1;
- else if ('/' === i && !t) break;
- e = '\\' === i
- }
- ++n.pos
- }
- var s = this.input.slice(r, this.pos);
- ++this.pos;
- var o = this.readWord1(),
- a = s,
- u = '';
- if (o) {
- var l = /^[gim]*$/;
- this.options.ecmaVersion >= 6 && (l = /^[gimuy]*$/),
- l.test(o) || this.raise(r, 'Invalid regular expression flag'),
- o.indexOf('u') >= 0 && (ne ? u = 'u' : (a = (a = a.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (e, t, i) {
- return (t = Number('0x' + t)) > 1114111 && n.raise(r + i + 3, 'Code point out of bounds'),
- 'x'
- })).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x'), u = u.replace('u', '')))
- }
- var c = null;
- return ee || (te(a, u, r, this), c = te(s, o)),
- this.finishToken(b.regexp, {
- pattern: s,
- flags: o,
- value: c
- })
- },
- Z.readInt = function (e, t) {
- for (var n = this.pos, r = 0, i = 0, s = null == t ? 1 / 0 : t; i < s; ++i) {
- var o,
- a = this.input.charCodeAt(this.pos);
- if ((o = a >= 97 ? a - 97 + 10 : a >= 65 ? a - 65 + 10 : a >= 48 && a <= 57 ? a - 48 : 1 / 0) >= e) break;
- ++this.pos,
- r = r * e + o
- }
- return this.pos === n || null != t && this.pos - n !== t ? null : r
- },
- Z.readRadixNumber = function (e) {
- this.pos += 2;
- var t = this.readInt(e);
- return null == t && this.raise(this.start + 2, 'Expected number in radix ' + e),
- p(this.fullCharCodeAtPos()) && this.raise(this.pos, 'Identifier directly after number'),
- this.finishToken(b.num, t)
- },
- Z.readNumber = function (e) {
- var t = this.pos,
- n = !1,
- r = 48 === this.input.charCodeAt(this.pos);
- e || null !== this.readInt(10) || this.raise(t, 'Invalid number'),
- r && this.pos == t + 1 && (r = !1);
- var i = this.input.charCodeAt(this.pos);
- 46 !== i || r || (++this.pos, this.readInt(10), n = !0, i = this.input.charCodeAt(this.pos)),
- 69 !== i && 101 !== i || r || (43 !== (i = this.input.charCodeAt(++this.pos)) && 45 !== i || ++this.pos, null === this.readInt(10) && this.raise(t, 'Invalid number'), n = !0),
- p(this.fullCharCodeAtPos()) && this.raise(this.pos, 'Identifier directly after number');
- var s,
- o = this.input.slice(t, this.pos);
- return n ? s = parseFloat(o) : r && 1 !== o.length ? /[89]/.test(o) || this.strict ? this.raise(t, 'Invalid number') : s = parseInt(o, 8) : s = parseInt(o, 10),
- this.finishToken(b.num, s)
- },
- Z.readCodePoint = function () {
- var e;
- if (123 === this.input.charCodeAt(this.pos)) {
- this.options.ecmaVersion < 6 && this.unexpected();
- var t = ++this.pos;
- e = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos),
- ++this.pos,
- e > 1114111 && this.raise(t, 'Code point out of bounds')
- } else e = this.readHexChar(4);
- return e
- },
- Z.readString = function (e) {
- for (var t = '', n = ++this.pos; ; ) {
- this.pos >= this.input.length && this.raise(this.start, 'Unterminated string constant');
- var r = this.input.charCodeAt(this.pos);
- if (r === e) break;
- 92 === r ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : (E(r) && this.raise(this.start, 'Unterminated string constant'), ++this.pos)
- }
- return t += this.input.slice(n, this.pos++),
- this.finishToken(b.string, t)
- },
- Z.readTmplToken = function () {
- for (var e = '', t = this.pos; ; ) {
- this.pos >= this.input.length && this.raise(this.start, 'Unterminated template');
- var n = this.input.charCodeAt(this.pos);
- if (96 === n || 36 === n && 123 === this.input.charCodeAt(this.pos + 1)) return this.pos === this.start && this.type === b.template ? 36 === n ? (this.pos += 2, this.finishToken(b.dollarBraceL)) : (++this.pos, this.finishToken(b.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(b.template, e));
- if (92 === n) e += this.input.slice(t, this.pos),
- e += this.readEscapedChar(!0),
- t = this.pos;
- else if (E(n)) {
- switch (e += this.input.slice(t, this.pos), ++this.pos, n) {
- case 13:
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
- case 10:
- e += '\n';
- break;
- default:
- e += String.fromCharCode(n)
- }
- this.options.locations && (++this.curLine, this.lineStart = this.pos),
- t = this.pos
- } else ++this.pos
- }
- },
- Z.readEscapedChar = function (e) {
- var t = this.input.charCodeAt(++this.pos);
- switch (++this.pos, t) {
- case 110:
- return '\n';
- case 114:
- return '\r';
- case 120:
- return String.fromCharCode(this.readHexChar(2));
- case 117:
- return re(this.readCodePoint());
- case 116:
- return '\t';
- case 98:
- return '';
- case 118:
- return '\v';
- case 102:
- return '\f';
- case 13:
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
- case 10:
- return this.options.locations && (this.lineStart = this.pos, ++this.curLine),
- '';
- default:
- if (t >= 48 && t <= 55) {
- var n = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/) [0],
- r = parseInt(n, 8);
- return r > 255 && (n = n.slice(0, - 1), r = parseInt(n, 8)),
- '0' !== n && (this.strict || e) && this.raise(this.pos - 2, 'Octal literal in strict mode'),
- this.pos += n.length - 1,
- String.fromCharCode(r)
- }
- return String.fromCharCode(t)
- }
- },
- Z.readHexChar = function (e) {
- var t = this.pos,
- n = this.readInt(16, e);
- return null === n && this.raise(t, 'Bad character escape sequence'),
- n
- },
- Z.readWord1 = function () {
- this.containsEsc = !1;
- for (var e = '', t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
- var i = this.fullCharCodeAtPos();
- if (h(i, r)) this.pos += i <= 65535 ? 1 : 2;
- else {
- if (92 !== i) break;
- this.containsEsc = !0,
- e += this.input.slice(n, this.pos);
- var s = this.pos;
- 117 != this.input.charCodeAt(++this.pos) && this.raise(this.pos, 'Expecting Unicode escape sequence \\uXXXX'),
- ++this.pos;
- var o = this.readCodePoint();
- (t ? p : h) (o, r) || this.raise(s, 'Invalid Unicode escape'),
- e += re(o),
- n = this.pos
- }
- t = !1
- }
- return e + this.input.slice(n, this.pos)
- },
- Z.readWord = function () {
- var e = this.readWord1(),
- t = b.name;
- return this.keywords.test(e) && (this.containsEsc && this.raiseRecoverable(this.start, 'Escape sequence in keyword ' + e), t = y[e]),
- this.finishToken(t, e)
- };
- e.version = '4.0.11',
- e.parse = function (e, t) {
- return new N(t, e).parse()
- },
- e.parseExpressionAt = function (e, t, n) {
- var r = new N(n, e, t);
- return r.nextToken(),
- r.parseExpression()
- },
- e.tokenizer = function (e, t) {
- return new N(t, e)
- },
- e.addLooseExports = function (t, n, r) {
- e.parse_dammit = t,
- e.LooseParser = n,
- e.pluginsLoose = r
- },
- e.Parser = N,
- e.plugins = B,
- e.defaultOptions = F,
- e.Position = k,
- e.SourceLocation = S,
- e.getLineInfo = T,
- e.Node = Y,
- e.TokenType = f,
- e.tokTypes = b,
- e.keywordTypes = y,
- e.TokContext = H,
- e.tokContexts = X,
- e.isIdentifierChar = h,
- e.isIdentifierStart = p,
- e.Token = Q,
- e.isNewLine = E,
- e.lineBreak = x,
- e.lineBreakG = A,
- Object.defineProperty(e, '__esModule', {
- value: !0
- })
- },
- 'object' == typeof n && void 0 !== t ? i(n) : 'function' == typeof define && define.amd ? define(['exports'], i) : i(r.acorn = r.acorn || {
- })
- },
- {
- }
- ],
- 3: [
- function (e, t, n) {
- var r,
- i;
- r = this,
- i = function (e) {
- 'use strict';
- function t(e) {
- return 'string' == typeof e ? function (t) {
- return t == e
- }
- : e || function () {
- return !0
- }
- }
- var n = function (e, t) {
- this.node = e,
- this.state = t
- };
- var r = Object.create || function (e) {
- function t() {
- }
- return t.prototype = e,
- new t
- };
- function i(e, t, n) {
- n(e, t)
- }
- function s(e, t, n) {
- }
- var o = {
- };
- o.Program = o.BlockStatement = function (e, t, n) {
- for (var r = 0; r < e.body.length; ++r) n(e.body[r], t, 'Statement')
- },
- o.Statement = i,
- o.EmptyStatement = s,
- o.ExpressionStatement = o.ParenthesizedExpression = function (e, t, n) {
- return n(e.expression, t, 'Expression')
- },
- o.IfStatement = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.consequent, t, 'Statement'),
- e.alternate && n(e.alternate, t, 'Statement')
- },
- o.LabeledStatement = function (e, t, n) {
- return n(e.body, t, 'Statement')
- },
- o.BreakStatement = o.ContinueStatement = s,
- o.WithStatement = function (e, t, n) {
- n(e.object, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.SwitchStatement = function (e, t, n) {
- n(e.discriminant, t, 'Expression');
- for (var r = 0; r < e.cases.length; ++r) {
- var i = e.cases[r];
- i.test && n(i.test, t, 'Expression');
- for (var s = 0; s < i.consequent.length; ++s) n(i.consequent[s], t, 'Statement')
- }
- },
- o.ReturnStatement = o.YieldExpression = o.AwaitExpression = function (e, t, n) {
- e.argument && n(e.argument, t, 'Expression')
- },
- o.ThrowStatement = o.SpreadElement = function (e, t, n) {
- return n(e.argument, t, 'Expression')
- },
- o.TryStatement = function (e, t, n) {
- n(e.block, t, 'Statement'),
- e.handler && n(e.handler, t),
- e.finalizer && n(e.finalizer, t, 'Statement')
- },
- o.CatchClause = function (e, t, n) {
- n(e.param, t, 'Pattern'),
- n(e.body, t, 'ScopeBody')
- },
- o.WhileStatement = o.DoWhileStatement = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForStatement = function (e, t, n) {
- e.init && n(e.init, t, 'ForInit'),
- e.test && n(e.test, t, 'Expression'),
- e.update && n(e.update, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForInStatement = o.ForOfStatement = function (e, t, n) {
- n(e.left, t, 'ForInit'),
- n(e.right, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForInit = function (e, t, n) {
- 'VariableDeclaration' == e.type ? n(e, t) : n(e, t, 'Expression')
- },
- o.DebuggerStatement = s,
- o.FunctionDeclaration = function (e, t, n) {
- return n(e, t, 'Function')
- },
- o.VariableDeclaration = function (e, t, n) {
- for (var r = 0; r < e.declarations.length; ++r) n(e.declarations[r], t)
- },
- o.VariableDeclarator = function (e, t, n) {
- n(e.id, t, 'Pattern'),
- e.init && n(e.init, t, 'Expression')
- },
- o.Function = function (e, t, n) {
- e.id && n(e.id, t, 'Pattern');
- for (var r = 0; r < e.params.length; r++) n(e.params[r], t, 'Pattern');
- n(e.body, t, e.expression ? 'ScopeExpression' : 'ScopeBody')
- },
- o.ScopeBody = function (e, t, n) {
- return n(e, t, 'Statement')
- },
- o.ScopeExpression = function (e, t, n) {
- return n(e, t, 'Expression')
- },
- o.Pattern = function (e, t, n) {
- 'Identifier' == e.type ? n(e, t, 'VariablePattern') : 'MemberExpression' == e.type ? n(e, t, 'MemberPattern') : n(e, t)
- },
- o.VariablePattern = s,
- o.MemberPattern = i,
- o.RestElement = function (e, t, n) {
- return n(e.argument, t, 'Pattern')
- },
- o.ArrayPattern = function (e, t, n) {
- for (var r = 0; r < e.elements.length; ++r) {
- var i = e.elements[r];
- i && n(i, t, 'Pattern')
- }
- },
- o.ObjectPattern = function (e, t, n) {
- for (var r = 0; r < e.properties.length; ++r) n(e.properties[r].value, t, 'Pattern')
- },
- o.Expression = i,
- o.ThisExpression = o.Super = o.MetaProperty = s,
- o.ArrayExpression = function (e, t, n) {
- for (var r = 0; r < e.elements.length; ++r) {
- var i = e.elements[r];
- i && n(i, t, 'Expression')
- }
- },
- o.ObjectExpression = function (e, t, n) {
- for (var r = 0; r < e.properties.length; ++r) n(e.properties[r], t)
- },
- o.FunctionExpression = o.ArrowFunctionExpression = o.FunctionDeclaration,
- o.SequenceExpression = o.TemplateLiteral = function (e, t, n) {
- for (var r = 0; r < e.expressions.length; ++r) n(e.expressions[r], t, 'Expression')
- },
- o.UnaryExpression = o.UpdateExpression = function (e, t, n) {
- n(e.argument, t, 'Expression')
- },
- o.BinaryExpression = o.LogicalExpression = function (e, t, n) {
- n(e.left, t, 'Expression'),
- n(e.right, t, 'Expression')
- },
- o.AssignmentExpression = o.AssignmentPattern = function (e, t, n) {
- n(e.left, t, 'Pattern'),
- n(e.right, t, 'Expression')
- },
- o.ConditionalExpression = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.consequent, t, 'Expression'),
- n(e.alternate, t, 'Expression')
- },
- o.NewExpression = o.CallExpression = function (e, t, n) {
- if (n(e.callee, t, 'Expression'), e.arguments) for (var r = 0; r < e.arguments.length; ++r) n(e.arguments[r], t, 'Expression')
- },
- o.MemberExpression = function (e, t, n) {
- n(e.object, t, 'Expression'),
- e.computed && n(e.property, t, 'Expression')
- },
- o.ExportNamedDeclaration = o.ExportDefaultDeclaration = function (e, t, n) {
- e.declaration && n(e.declaration, t, 'ExportNamedDeclaration' == e.type || e.declaration.id ? 'Statement' : 'Expression'),
- e.source && n(e.source, t, 'Expression')
- },
- o.ExportAllDeclaration = function (e, t, n) {
- n(e.source, t, 'Expression')
- },
- o.ImportDeclaration = function (e, t, n) {
- for (var r = 0; r < e.specifiers.length; r++) n(e.specifiers[r], t);
- n(e.source, t, 'Expression')
- },
- o.ImportSpecifier = o.ImportDefaultSpecifier = o.ImportNamespaceSpecifier = o.Identifier = o.Literal = s,
- o.TaggedTemplateExpression = function (e, t, n) {
- n(e.tag, t, 'Expression'),
- n(e.quasi, t)
- },
- o.ClassDeclaration = o.ClassExpression = function (e, t, n) {
- return n(e, t, 'Class')
- },
- o.Class = function (e, t, n) {
- e.id && n(e.id, t, 'Pattern'),
- e.superClass && n(e.superClass, t, 'Expression');
- for (var r = 0; r < e.body.body.length; r++) n(e.body.body[r], t)
- },
- o.MethodDefinition = o.Property = function (e, t, n) {
- e.computed && n(e.key, t, 'Expression'),
- n(e.value, t, 'Expression')
- },
- e.simple = function (t, n, r, i, s) {
- r || (r = e.base),
- function e(t, i, s) {
- var o = s || t.type,
- a = n[o];
- r[o](t, i, e),
- a && a(t, i)
- }(t, i, s)
- },
- e.ancestor = function (t, n, r, i) {
- r || (r = e.base);
- var s = [
- ];
- !function e(t, i, o) {
- var a = o || t.type,
- u = n[a],
- l = t != s[s.length - 1];
- l && s.push(t),
- r[a](t, i, e),
- u && u(t, i || s, s),
- l && s.pop()
- }(t, i)
- },
- e.recursive = function (t, n, r, i, s) {
- var o = r ? e.make(r, i) : i;
- !function e(t, n, r) {
- o[r || t.type](t, n, e)
- }(t, n, s)
- },
- e.findNodeAt = function (r, i, s, o, a, u) {
- o = t(o),
- a || (a = e.base);
- try {
- !function e(t, r, u) {
- var l = u || t.type;
- if ((null == i || t.start <= i) && (null == s || t.end >= s) && a[l](t, r, e), (null == i || t.start == i) && (null == s || t.end == s) && o(l, t)) throw new n(t, r)
- }(r, u)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeAround = function (r, i, s, o, a) {
- s = t(s),
- o || (o = e.base);
- try {
- !function e(t, r, a) {
- var u = a || t.type;
- if (!(t.start > i || t.end < i) && (o[u](t, r, e), s(u, t))) throw new n(t, r)
- }(r, a)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeAfter = function (r, i, s, o, a) {
- s = t(s),
- o || (o = e.base);
- try {
- !function e(t, r, a) {
- if (!(t.end < i)) {
- var u = a || t.type;
- if (t.start >= i && s(u, t)) throw new n(t, r);
- o[u](t, r, e)
- }
- }(r, a)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeBefore = function (r, i, s, o, a) {
- var u;
- return s = t(s),
- o || (o = e.base),
- function e(t, r, a) {
- if (!(t.start > i)) {
- var l = a || t.type;
- t.end <= i && (!u || u.node.end < t.end) && s(l, t) && (u = new n(t, r)),
- o[l](t, r, e)
- }
- }(r, a),
- u
- },
- e.make = function (t, n) {
- n || (n = e.base);
- var i = r(n);
- for (var s in t) i[s] = t[s];
- return i
- },
- e.base = o,
- Object.defineProperty(e, '__esModule', {
- value: !0
- })
- },
- 'object' == typeof n && void 0 !== t ? i(n) : 'function' == typeof define && define.amd ? define(['exports'], i) : i((r.acorn = r.acorn || {
- }, r.acorn.walk = r.acorn.walk || {
- }))
- },
- {
- }
- ],
- 4: [
- function (e, t, n) {
- var r,
- i;
- r = this,
- i = function (e) {
- 'use strict';
- var t = {
- 3: 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile',
- 5: 'class enum extends super const export import',
- 6: 'enum',
- 7: 'enum',
- strict: 'implements interface let package private protected public static yield',
- strictBind: 'eval arguments'
- },
- n = 'break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this',
- r = {
- 5: n,
- 6: n + ' const class extends export import super'
- },
- i = 'ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ',
- s = '‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_',
- o = new RegExp('[' + i + ']'),
- a = new RegExp('[' + i + s + ']');
- i = s = null;
- var u = [
- 0,
- 11,
- 2,
- 25,
- 2,
- 18,
- 2,
- 1,
- 2,
- 14,
- 3,
- 13,
- 35,
- 122,
- 70,
- 52,
- 268,
- 28,
- 4,
- 48,
- 48,
- 31,
- 17,
- 26,
- 6,
- 37,
- 11,
- 29,
- 3,
- 35,
- 5,
- 7,
- 2,
- 4,
- 43,
- 157,
- 19,
- 35,
- 5,
- 35,
- 5,
- 39,
- 9,
- 51,
- 157,
- 310,
- 10,
- 21,
- 11,
- 7,
- 153,
- 5,
- 3,
- 0,
- 2,
- 43,
- 2,
- 1,
- 4,
- 0,
- 3,
- 22,
- 11,
- 22,
- 10,
- 30,
- 66,
- 18,
- 2,
- 1,
- 11,
- 21,
- 11,
- 25,
- 71,
- 55,
- 7,
- 1,
- 65,
- 0,
- 16,
- 3,
- 2,
- 2,
- 2,
- 26,
- 45,
- 28,
- 4,
- 28,
- 36,
- 7,
- 2,
- 27,
- 28,
- 53,
- 11,
- 21,
- 11,
- 18,
- 14,
- 17,
- 111,
- 72,
- 56,
- 50,
- 14,
- 50,
- 785,
- 52,
- 76,
- 44,
- 33,
- 24,
- 27,
- 35,
- 42,
- 34,
- 4,
- 0,
- 13,
- 47,
- 15,
- 3,
- 22,
- 0,
- 2,
- 0,
- 36,
- 17,
- 2,
- 24,
- 85,
- 6,
- 2,
- 0,
- 2,
- 3,
- 2,
- 14,
- 2,
- 9,
- 8,
- 46,
- 39,
- 7,
- 3,
- 1,
- 3,
- 21,
- 2,
- 6,
- 2,
- 1,
- 2,
- 4,
- 4,
- 0,
- 19,
- 0,
- 13,
- 4,
- 159,
- 52,
- 19,
- 3,
- 54,
- 47,
- 21,
- 1,
- 2,
- 0,
- 185,
- 46,
- 42,
- 3,
- 37,
- 47,
- 21,
- 0,
- 60,
- 42,
- 86,
- 25,
- 391,
- 63,
- 32,
- 0,
- 449,
- 56,
- 264,
- 8,
- 2,
- 36,
- 18,
- 0,
- 50,
- 29,
- 881,
- 921,
- 103,
- 110,
- 18,
- 195,
- 2749,
- 1070,
- 4050,
- 582,
- 8634,
- 568,
- 8,
- 30,
- 114,
- 29,
- 19,
- 47,
- 17,
- 3,
- 32,
- 20,
- 6,
- 18,
- 881,
- 68,
- 12,
- 0,
- 67,
- 12,
- 65,
- 0,
- 32,
- 6124,
- 20,
- 754,
- 9486,
- 1,
- 3071,
- 106,
- 6,
- 12,
- 4,
- 8,
- 8,
- 9,
- 5991,
- 84,
- 2,
- 70,
- 2,
- 1,
- 3,
- 0,
- 3,
- 1,
- 3,
- 3,
- 2,
- 11,
- 2,
- 0,
- 2,
- 6,
- 2,
- 64,
- 2,
- 3,
- 3,
- 7,
- 2,
- 6,
- 2,
- 27,
- 2,
- 3,
- 2,
- 4,
- 2,
- 0,
- 4,
- 6,
- 2,
- 339,
- 3,
- 24,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 7,
- 4149,
- 196,
- 60,
- 67,
- 1213,
- 3,
- 2,
- 26,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 9,
- 2,
- 3,
- 2,
- 0,
- 2,
- 0,
- 7,
- 0,
- 5,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 2,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 1,
- 2,
- 0,
- 3,
- 3,
- 2,
- 6,
- 2,
- 3,
- 2,
- 3,
- 2,
- 0,
- 2,
- 9,
- 2,
- 16,
- 6,
- 2,
- 2,
- 4,
- 2,
- 16,
- 4421,
- 42710,
- 42,
- 4148,
- 12,
- 221,
- 3,
- 5761,
- 10591,
- 541
- ],
- l = [
- 509,
- 0,
- 227,
- 0,
- 150,
- 4,
- 294,
- 9,
- 1368,
- 2,
- 2,
- 1,
- 6,
- 3,
- 41,
- 2,
- 5,
- 0,
- 166,
- 1,
- 1306,
- 2,
- 54,
- 14,
- 32,
- 9,
- 16,
- 3,
- 46,
- 10,
- 54,
- 9,
- 7,
- 2,
- 37,
- 13,
- 2,
- 9,
- 52,
- 0,
- 13,
- 2,
- 49,
- 13,
- 10,
- 2,
- 4,
- 9,
- 83,
- 11,
- 7,
- 0,
- 161,
- 11,
- 6,
- 9,
- 7,
- 3,
- 57,
- 0,
- 2,
- 6,
- 3,
- 1,
- 3,
- 2,
- 10,
- 0,
- 11,
- 1,
- 3,
- 6,
- 4,
- 4,
- 193,
- 17,
- 10,
- 9,
- 87,
- 19,
- 13,
- 9,
- 214,
- 6,
- 3,
- 8,
- 28,
- 1,
- 83,
- 16,
- 16,
- 9,
- 82,
- 12,
- 9,
- 9,
- 84,
- 14,
- 5,
- 9,
- 423,
- 9,
- 838,
- 7,
- 2,
- 7,
- 17,
- 9,
- 57,
- 21,
- 2,
- 13,
- 19882,
- 9,
- 135,
- 4,
- 60,
- 6,
- 26,
- 9,
- 1016,
- 45,
- 17,
- 3,
- 19723,
- 1,
- 5319,
- 4,
- 4,
- 5,
- 9,
- 7,
- 3,
- 6,
- 31,
- 3,
- 149,
- 2,
- 1418,
- 49,
- 513,
- 54,
- 5,
- 49,
- 9,
- 0,
- 15,
- 0,
- 23,
- 4,
- 2,
- 14,
- 1361,
- 6,
- 2,
- 16,
- 3,
- 6,
- 2,
- 1,
- 2,
- 4,
- 2214,
- 6,
- 110,
- 6,
- 6,
- 9,
- 792487,
- 239
- ];
- function c(e, t) {
- for (var n = 65536, r = 0; r < t.length; r += 2) {
- if ((n += t[r]) > e) return !1;
- if ((n += t[r + 1]) >= e) return !0
- }
- }
- function p(e, t) {
- return e < 65 ? 36 === e : e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && o.test(String.fromCharCode(e)) : !1 !== t && c(e, u)))
- }
- function h(e, t) {
- return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && a.test(String.fromCharCode(e)) : !1 !== t && (c(e, u) || c(e, l)))))
- }
- var f = function (e, t) {
- void 0 === t && (t = {
- }),
- this.label = e,
- this.keyword = t.keyword,
- this.beforeExpr = !!t.beforeExpr,
- this.startsExpr = !!t.startsExpr,
- this.isLoop = !!t.isLoop,
- this.isAssign = !!t.isAssign,
- this.prefix = !!t.prefix,
- this.postfix = !!t.postfix,
- this.binop = t.binop || null,
- this.updateContext = null
- };
- function d(e, t) {
- return new f(e, {
- beforeExpr: !0,
- binop: t
- })
- }
- var m = {
- beforeExpr: !0
- },
- g = {
- startsExpr: !0
- },
- y = {
- };
- function v(e, t) {
- return void 0 === t && (t = {
- }),
- t.keyword = e,
- y[e] = new f(e, t)
- }
- var b = {
- num: new f('num', g),
- regexp: new f('regexp', g),
- string: new f('string', g),
- name: new f('name', g),
- eof: new f('eof'),
- bracketL: new f('[', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- bracketR: new f(']'),
- braceL: new f('{', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- braceR: new f('}'),
- parenL: new f('(', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- parenR: new f(')'),
- comma: new f(',', m),
- semi: new f(';', m),
- colon: new f(':', m),
- dot: new f('.'),
- question: new f('?', m),
- arrow: new f('=>', m),
- template: new f('template'),
- ellipsis: new f('...', m),
- backQuote: new f('`', g),
- dollarBraceL: new f('${', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- eq: new f('=', {
- beforeExpr: !0,
- isAssign: !0
- }),
- assign: new f('_=', {
- beforeExpr: !0,
- isAssign: !0
- }),
- incDec: new f('++/--', {
- prefix: !0,
- postfix: !0,
- startsExpr: !0
- }),
- prefix: new f('prefix', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- logicalOR: d('||', 1),
- logicalAND: d('&&', 2),
- bitwiseOR: d('|', 3),
- bitwiseXOR: d('^', 4),
- bitwiseAND: d('&', 5),
- equality: d('==/!=', 6),
- relational: d('</>', 7),
- bitShift: d('<</>>', 8),
- plusMin: new f('+/-', {
- beforeExpr: !0,
- binop: 9,
- prefix: !0,
- startsExpr: !0
- }),
- modulo: d('%', 10),
- star: d('*', 10),
- slash: d('/', 10),
- starstar: new f('**', {
- beforeExpr: !0
- }),
- _break: v('break'),
- _case: v('case', m),
- _catch: v('catch'),
- _continue: v('continue'),
- _debugger: v('debugger'),
- _default: v('default', m),
- _do: v('do', {
- isLoop: !0,
- beforeExpr: !0
- }),
- _else: v('else', m),
- _finally: v('finally'),
- _for: v('for', {
- isLoop: !0
- }),
- _function: v('function', g),
- _if: v('if'),
- _return: v('return', m),
- _switch: v('switch'),
- _throw: v('throw', m),
- _try: v('try'),
- _var: v('var'),
- _const: v('const'),
- _while: v('while', {
- isLoop: !0
- }),
- _with: v('with'),
- _new: v('new', {
- beforeExpr: !0,
- startsExpr: !0
- }),
- _this: v('this', g),
- _super: v('super', g),
- _class: v('class'),
- _extends: v('extends', m),
- _export: v('export'),
- _import: v('import'),
- _null: v('null', g),
- _true: v('true', g),
- _false: v('false', g),
- _in: v('in', {
- beforeExpr: !0,
- binop: 7
- }),
- _instanceof: v('instanceof', {
- beforeExpr: !0,
- binop: 7
- }),
- _typeof: v('typeof', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- _void: v('void', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- }),
- _delete: v('delete', {
- beforeExpr: !0,
- prefix: !0,
- startsExpr: !0
- })
- },
- x = /\r\n?|\n|\u2028|\u2029/,
- A = new RegExp(x.source, 'g');
- function E(e) {
- return 10 === e || 13 === e || 8232 === e || 8233 == e
- }
- var _ = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
- C = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
- function w(e) {
- return '[object Array]' === Object.prototype.toString.call(e)
- }
- function D(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- var k = function (e, t) {
- this.line = e,
- this.column = t
- };
- k.prototype.offset = function (e) {
- return new k(this.line, this.column + e)
- };
- var S = function (e, t, n) {
- this.start = t,
- this.end = n,
- null !== e.sourceFile && (this.source = e.sourceFile)
- };
- function T(e, t) {
- for (var n = 1, r = 0; ; ) {
- A.lastIndex = r;
- var i = A.exec(e);
- if (!(i && i.index < t)) return new k(n, t - r);
- ++n,
- r = i.index + i[0].length
- }
- }
- var F = {
- ecmaVersion: 6,
- sourceType: 'script',
- onInsertedSemicolon: null,
- onTrailingComma: null,
- allowReserved: null,
- allowReturnOutsideFunction: !1,
- allowImportExportEverywhere: !1,
- allowHashBang: !1,
- locations: !1,
- onToken: null,
- onComment: null,
- ranges: !1,
- program: null,
- sourceFile: null,
- directSourceFile: null,
- preserveParens: !1,
- plugins: {
- }
- };
- function O(e) {
- var t = {
- };
- for (var n in F) t[n] = e && D(e, n) ? e[n] : F[n];
- if (null == t.allowReserved && (t.allowReserved = t.ecmaVersion < 5), w(t.onToken)) {
- var r = t.onToken;
- t.onToken = function (e) {
- return r.push(e)
- }
- }
- return w(t.onComment) && (t.onComment = function (e, t) {
- return function (n, r, i, s, o, a) {
- var u = {
- type: n ? 'Block' : 'Line',
- value: r,
- start: i,
- end: s
- };
- e.locations && (u.loc = new S(this, o, a)),
- e.ranges && (u.range = [
- i,
- s
- ]),
- t.push(u)
- }
- }(t, t.onComment)),
- t
- }
- var B = {
- };
- function P(e) {
- return new RegExp('^(' + e.replace(/ /g, '|') + ')$')
- }
- var N = function (e, n, i) {
- this.options = e = O(e),
- this.sourceFile = e.sourceFile,
- this.keywords = P(r[e.ecmaVersion >= 6 ? 6 : 5]);
- var s = e.allowReserved ? '' : t[e.ecmaVersion] + ('module' == e.sourceType ? ' await' : '');
- this.reservedWords = P(s);
- var o = (s ? s + ' ' : '') + t.strict;
- this.reservedWordsStrict = P(o),
- this.reservedWordsStrictBind = P(o + ' ' + t.strictBind),
- this.input = String(n),
- this.containsEsc = !1,
- this.loadPlugins(e.plugins),
- i ? (this.pos = i, this.lineStart = Math.max(0, this.input.lastIndexOf('\n', i)), this.curLine = this.input.slice(0, this.lineStart).split(x).length) : (this.pos = this.lineStart = 0, this.curLine = 1),
- this.type = b.eof,
- this.value = null,
- this.start = this.end = this.pos,
- this.startLoc = this.endLoc = this.curPosition(),
- this.lastTokEndLoc = this.lastTokStartLoc = null,
- this.lastTokStart = this.lastTokEnd = this.pos,
- this.context = this.initialContext(),
- this.exprAllowed = !0,
- this.strict = this.inModule = 'module' === e.sourceType,
- this.potentialArrowAt = - 1,
- this.inFunction = this.inGenerator = !1,
- this.labels = [
- ],
- 0 === this.pos && e.allowHashBang && '#!' === this.input.slice(0, 2) && this.skipLineComment(2)
- };
- N.prototype.isKeyword = function (e) {
- return this.keywords.test(e)
- },
- N.prototype.isReservedWord = function (e) {
- return this.reservedWords.test(e)
- },
- N.prototype.extend = function (e, t) {
- this[e] = t(this[e])
- },
- N.prototype.loadPlugins = function (e) {
- for (var t in e) {
- var n = B[t];
- if (!n) throw new Error('Plugin \'' + t + '\' not found');
- n(this, e[t])
- }
- },
- N.prototype.parse = function () {
- var e = this.options.program || this.startNode();
- return this.nextToken(),
- this.parseTopLevel(e)
- };
- var R = N.prototype;
- R.isUseStrict = function (e) {
- return this.options.ecmaVersion >= 5 && 'ExpressionStatement' === e.type && 'Literal' === e.expression.type && 'use strict' === e.expression.raw.slice(1, - 1)
- },
- R.eat = function (e) {
- return this.type === e && (this.next(), !0)
- },
- R.isContextual = function (e) {
- return this.type === b.name && this.value === e
- },
- R.eatContextual = function (e) {
- return this.value === e && this.eat(b.name)
- },
- R.expectContextual = function (e) {
- this.eatContextual(e) || this.unexpected()
- },
- R.canInsertSemicolon = function () {
- return this.type === b.eof || this.type === b.braceR || x.test(this.input.slice(this.lastTokEnd, this.start))
- },
- R.insertSemicolon = function () {
- if (this.canInsertSemicolon()) return this.options.onInsertedSemicolon && this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc),
- !0
- },
- R.semicolon = function () {
- this.eat(b.semi) || this.insertSemicolon() || this.unexpected()
- },
- R.afterTrailingComma = function (e) {
- if (this.type == e) return this.options.onTrailingComma && this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc),
- this.next(),
- !0
- },
- R.expect = function (e) {
- this.eat(e) || this.unexpected()
- },
- R.unexpected = function (e) {
- this.raise(null != e ? e : this.start, 'Unexpected token')
- };
- var L = function () {
- this.shorthandAssign = 0,
- this.trailingComma = 0
- };
- R.checkPatternErrors = function (e, t) {
- var n = e && e.trailingComma;
- if (!t) return !!n;
- n && this.raise(n, 'Comma is not permitted after the rest element')
- },
- R.checkExpressionErrors = function (e, t) {
- var n = e && e.shorthandAssign;
- if (!t) return !!n;
- n && this.raise(n, 'Shorthand property assignments are valid only in destructuring patterns')
- };
- var I = N.prototype;
- I.parseTopLevel = function (e) {
- var t = !0;
- for (e.body || (e.body = [
- ]); this.type !== b.eof; ) {
- var n = this.parseStatement(!0, !0);
- e.body.push(n),
- t && (this.isUseStrict(n) && this.setStrict(!0), t = !1)
- }
- return this.next(),
- this.options.ecmaVersion >= 6 && (e.sourceType = this.options.sourceType),
- this.finishNode(e, 'Program')
- };
- var j = {
- kind: 'loop'
- },
- M = {
- kind: 'switch'
- };
- I.isLet = function () {
- if (this.type !== b.name || this.options.ecmaVersion < 6 || 'let' != this.value) return !1;
- C.lastIndex = this.pos;
- var e = C.exec(this.input),
- t = this.pos + e[0].length,
- n = this.input.charCodeAt(t);
- if (91 === n || 123 == n) return !0;
- if (p(n, !0)) {
- for (var r = t + 1; h(this.input.charCodeAt(r), !0); ++r);
- var i = this.input.slice(t, r);
- if (!this.isKeyword(i)) return !0
- }
- return !1
- },
- I.parseStatement = function (e, t) {
- var n,
- r = this.type,
- i = this.startNode();
- switch (this.isLet() && (r = b._var, n = 'let'), r) {
- case b._break:
- case b._continue:
- return this.parseBreakContinueStatement(i, r.keyword);
- case b._debugger:
- return this.parseDebuggerStatement(i);
- case b._do:
- return this.parseDoStatement(i);
- case b._for:
- return this.parseForStatement(i);
- case b._function:
- return !e && this.options.ecmaVersion >= 6 && this.unexpected(),
- this.parseFunctionStatement(i);
- case b._class:
- return e || this.unexpected(),
- this.parseClass(i, !0);
- case b._if:
- return this.parseIfStatement(i);
- case b._return:
- return this.parseReturnStatement(i);
- case b._switch:
- return this.parseSwitchStatement(i);
- case b._throw:
- return this.parseThrowStatement(i);
- case b._try:
- return this.parseTryStatement(i);
- case b._const:
- case b._var:
- return n = n || this.value,
- e || 'var' == n || this.unexpected(),
- this.parseVarStatement(i, n);
- case b._while:
- return this.parseWhileStatement(i);
- case b._with:
- return this.parseWithStatement(i);
- case b.braceL:
- return this.parseBlock();
- case b.semi:
- return this.parseEmptyStatement(i);
- case b._export:
- case b._import:
- return this.options.allowImportExportEverywhere || (t || this.raise(this.start, '\'import\' and \'export\' may only appear at the top level'), this.inModule || this.raise(this.start, '\'import\' and \'export\' may appear only with \'sourceType: module\'')),
- r === b._import ? this.parseImport(i) : this.parseExport(i);
- default:
- var s = this.value,
- o = this.parseExpression();
- return r === b.name && 'Identifier' === o.type && this.eat(b.colon) ? this.parseLabeledStatement(i, s, o) : this.parseExpressionStatement(i, o)
- }
- },
- I.parseBreakContinueStatement = function (e, t) {
- var n = 'break' == t;
- this.next(),
- this.eat(b.semi) || this.insertSemicolon() ? e.label = null : this.type !== b.name ? this.unexpected() : (e.label = this.parseIdent(), this.semicolon());
- for (var r = 0; r < this.labels.length; ++r) {
- var i = this.labels[r];
- if (null == e.label || i.name === e.label.name) {
- if (null != i.kind && (n || 'loop' === i.kind)) break;
- if (e.label && n) break
- }
- }
- return r === this.labels.length && this.raise(e.start, 'Unsyntactic ' + t),
- this.finishNode(e, n ? 'BreakStatement' : 'ContinueStatement')
- },
- I.parseDebuggerStatement = function (e) {
- return this.next(),
- this.semicolon(),
- this.finishNode(e, 'DebuggerStatement')
- },
- I.parseDoStatement = function (e) {
- return this.next(),
- this.labels.push(j),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.expect(b._while),
- e.test = this.parseParenExpression(),
- this.options.ecmaVersion >= 6 ? this.eat(b.semi) : this.semicolon(),
- this.finishNode(e, 'DoWhileStatement')
- },
- I.parseForStatement = function (e) {
- if (this.next(), this.labels.push(j), this.expect(b.parenL), this.type === b.semi) return this.parseFor(e, null);
- var t = this.isLet();
- if (this.type === b._var || this.type === b._const || t) {
- var n = this.startNode(),
- r = t ? 'let' : this.value;
- return this.next(),
- this.parseVar(n, !0, r),
- this.finishNode(n, 'VariableDeclaration'),
- !(this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of')) || 1 !== n.declarations.length || 'var' !== r && n.declarations[0].init ? this.parseFor(e, n) : this.parseForIn(e, n)
- }
- var i = new L,
- s = this.parseExpression(!0, i);
- return this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of') ? (this.checkPatternErrors(i, !0), this.toAssignable(s), this.checkLVal(s), this.parseForIn(e, s)) : (this.checkExpressionErrors(i, !0), this.parseFor(e, s))
- },
- I.parseFunctionStatement = function (e) {
- return this.next(),
- this.parseFunction(e, !0)
- },
- I.parseIfStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- e.consequent = this.parseStatement(!1),
- e.alternate = this.eat(b._else) ? this.parseStatement(!1) : null,
- this.finishNode(e, 'IfStatement')
- },
- I.parseReturnStatement = function (e) {
- return this.inFunction || this.options.allowReturnOutsideFunction || this.raise(this.start, '\'return\' outside of function'),
- this.next(),
- this.eat(b.semi) || this.insertSemicolon() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()),
- this.finishNode(e, 'ReturnStatement')
- },
- I.parseSwitchStatement = function (e) {
- this.next(),
- e.discriminant = this.parseParenExpression(),
- e.cases = [
- ],
- this.expect(b.braceL),
- this.labels.push(M);
- for (var t, n = !1; this.type != b.braceR; ) if (this.type === b._case || this.type === b._default) {
- var r = this.type === b._case;
- t && this.finishNode(t, 'SwitchCase'),
- e.cases.push(t = this.startNode()),
- t.consequent = [
- ],
- this.next(),
- r ? t.test = this.parseExpression() : (n && this.raiseRecoverable(this.lastTokStart, 'Multiple default clauses'), n = !0, t.test = null),
- this.expect(b.colon)
- } else t || this.unexpected(),
- t.consequent.push(this.parseStatement(!0));
- return t && this.finishNode(t, 'SwitchCase'),
- this.next(),
- this.labels.pop(),
- this.finishNode(e, 'SwitchStatement')
- },
- I.parseThrowStatement = function (e) {
- return this.next(),
- x.test(this.input.slice(this.lastTokEnd, this.start)) && this.raise(this.lastTokEnd, 'Illegal newline after throw'),
- e.argument = this.parseExpression(),
- this.semicolon(),
- this.finishNode(e, 'ThrowStatement')
- };
- var U = [
- ];
- I.parseTryStatement = function (e) {
- if (this.next(), e.block = this.parseBlock(), e.handler = null, this.type === b._catch) {
- var t = this.startNode();
- this.next(),
- this.expect(b.parenL),
- t.param = this.parseBindingAtom(),
- this.checkLVal(t.param, !0),
- this.expect(b.parenR),
- t.body = this.parseBlock(),
- e.handler = this.finishNode(t, 'CatchClause')
- }
- return e.finalizer = this.eat(b._finally) ? this.parseBlock() : null,
- e.handler || e.finalizer || this.raise(e.start, 'Missing catch or finally clause'),
- this.finishNode(e, 'TryStatement')
- },
- I.parseVarStatement = function (e, t) {
- return this.next(),
- this.parseVar(e, !1, t),
- this.semicolon(),
- this.finishNode(e, 'VariableDeclaration')
- },
- I.parseWhileStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- this.labels.push(j),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, 'WhileStatement')
- },
- I.parseWithStatement = function (e) {
- return this.strict && this.raise(this.start, '\'with\' in strict mode'),
- this.next(),
- e.object = this.parseParenExpression(),
- e.body = this.parseStatement(!1),
- this.finishNode(e, 'WithStatement')
- },
- I.parseEmptyStatement = function (e) {
- return this.next(),
- this.finishNode(e, 'EmptyStatement')
- },
- I.parseLabeledStatement = function (e, t, n) {
- for (var r = 0; r < this.labels.length; ++r) this.labels[r].name === t && this.raise(n.start, 'Label \'' + t + '\' is already declared');
- for (var i = this.type.isLoop ? 'loop' : this.type === b._switch ? 'switch' : null, s = this.labels.length - 1; s >= 0; s--) {
- var o = this.labels[s];
- if (o.statementStart != e.start) break;
- o.statementStart = this.start,
- o.kind = i
- }
- return this.labels.push({
- name: t,
- kind: i,
- statementStart: this.start
- }),
- e.body = this.parseStatement(!0),
- this.labels.pop(),
- e.label = n,
- this.finishNode(e, 'LabeledStatement')
- },
- I.parseExpressionStatement = function (e, t) {
- return e.expression = t,
- this.semicolon(),
- this.finishNode(e, 'ExpressionStatement')
- },
- I.parseBlock = function (e) {
- var t,
- n = this.startNode(),
- r = !0;
- for (n.body = [
- ], this.expect(b.braceL); !this.eat(b.braceR); ) {
- var i = this.parseStatement(!0);
- n.body.push(i),
- r && e && this.isUseStrict(i) && (t = this.strict, this.setStrict(this.strict = !0)),
- r = !1
- }
- return !1 === t && this.setStrict(!1),
- this.finishNode(n, 'BlockStatement')
- },
- I.parseFor = function (e, t) {
- return e.init = t,
- this.expect(b.semi),
- e.test = this.type === b.semi ? null : this.parseExpression(),
- this.expect(b.semi),
- e.update = this.type === b.parenR ? null : this.parseExpression(),
- this.expect(b.parenR),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, 'ForStatement')
- },
- I.parseForIn = function (e, t) {
- var n = this.type === b._in ? 'ForInStatement' : 'ForOfStatement';
- return this.next(),
- e.left = t,
- e.right = this.parseExpression(),
- this.expect(b.parenR),
- e.body = this.parseStatement(!1),
- this.labels.pop(),
- this.finishNode(e, n)
- },
- I.parseVar = function (e, t, n) {
- for (e.declarations = [
- ], e.kind = n; ; ) {
- var r = this.startNode();
- if (this.parseVarId(r), this.eat(b.eq) ? r.init = this.parseMaybeAssign(t) : 'const' !== n || this.type === b._in || this.options.ecmaVersion >= 6 && this.isContextual('of') ? 'Identifier' == r.id.type || t && (this.type === b._in || this.isContextual('of')) ? r.init = null : this.raise(this.lastTokEnd, 'Complex binding patterns require an initialization value') : this.unexpected(), e.declarations.push(this.finishNode(r, 'VariableDeclarator')), !this.eat(b.comma)) break
- }
- return e
- },
- I.parseVarId = function (e) {
- e.id = this.parseBindingAtom(),
- this.checkLVal(e.id, !0)
- },
- I.parseFunction = function (e, t, n) {
- this.initFunction(e),
- this.options.ecmaVersion >= 6 && (e.generator = this.eat(b.star));
- var r = this.inGenerator;
- return this.inGenerator = e.generator,
- (t || this.type === b.name) && (e.id = this.parseIdent()),
- this.parseFunctionParams(e),
- this.parseFunctionBody(e, n),
- this.inGenerator = r,
- this.finishNode(e, t ? 'FunctionDeclaration' : 'FunctionExpression')
- },
- I.parseFunctionParams = function (e) {
- this.expect(b.parenL),
- e.params = this.parseBindingList(b.parenR, !1, !1, !0)
- },
- I.parseClass = function (e, t) {
- this.next(),
- this.parseClassId(e, t),
- this.parseClassSuper(e);
- var n = this.startNode(),
- r = !1;
- for (n.body = [
- ], this.expect(b.braceL); !this.eat(b.braceR); ) if (!this.eat(b.semi)) {
- var i = this.startNode(),
- s = this.eat(b.star),
- o = this.type === b.name && 'static' === this.value;
- this.parsePropertyName(i),
- i.static = o && this.type !== b.parenL,
- i.static && (s && this.unexpected(), s = this.eat(b.star), this.parsePropertyName(i)),
- i.kind = 'method';
- var a = !1;
- if (!i.computed) {
- var u = i.key;
- s || 'Identifier' !== u.type || this.type === b.parenL || 'get' !== u.name && 'set' !== u.name || (a = !0, i.kind = u.name, u = this.parsePropertyName(i)),
- !i.static && ('Identifier' === u.type && 'constructor' === u.name || 'Literal' === u.type && 'constructor' === u.value) && (r && this.raise(u.start, 'Duplicate constructor in the same class'), a && this.raise(u.start, 'Constructor can\'t have get/set modifier'), s && this.raise(u.start, 'Constructor can\'t be a generator'), i.kind = 'constructor', r = !0)
- }
- if (this.parseClassMethod(n, i, s), a) {
- var l = 'get' === i.kind ? 0 : 1;
- if (i.value.params.length !== l) {
- var c = i.value.start;
- 'get' === i.kind ? this.raiseRecoverable(c, 'getter should have no params') : this.raiseRecoverable(c, 'setter should have exactly one param')
- }
- 'set' === i.kind && 'RestElement' === i.value.params[0].type && this.raise(i.value.params[0].start, 'Setter cannot use rest params')
- }
- }
- return e.body = this.finishNode(n, 'ClassBody'),
- this.finishNode(e, t ? 'ClassDeclaration' : 'ClassExpression')
- },
- I.parseClassMethod = function (e, t, n) {
- t.value = this.parseMethod(n),
- e.body.push(this.finishNode(t, 'MethodDefinition'))
- },
- I.parseClassId = function (e, t) {
- e.id = this.type === b.name ? this.parseIdent() : t ? this.unexpected() : null
- },
- I.parseClassSuper = function (e) {
- e.superClass = this.eat(b._extends) ? this.parseExprSubscripts() : null
- },
- I.parseExport = function (e) {
- if (this.next(), this.eat(b.star)) return this.expectContextual('from'),
- e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected(),
- this.semicolon(),
- this.finishNode(e, 'ExportAllDeclaration');
- if (this.eat(b._default)) {
- var t = this.type == b.parenL,
- n = this.parseMaybeAssign(),
- r = !0;
- return t || 'FunctionExpression' != n.type && 'ClassExpression' != n.type || (r = !1, n.id && (n.type = 'FunctionExpression' == n.type ? 'FunctionDeclaration' : 'ClassDeclaration')),
- e.declaration = n,
- r && this.semicolon(),
- this.finishNode(e, 'ExportDefaultDeclaration')
- }
- if (this.shouldParseExportStatement()) e.declaration = this.parseStatement(!0),
- e.specifiers = [
- ],
- e.source = null;
- else {
- if (e.declaration = null, e.specifiers = this.parseExportSpecifiers(), this.eatContextual('from')) e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected();
- else {
- for (var i = 0; i < e.specifiers.length; i++) (this.keywords.test(e.specifiers[i].local.name) || this.reservedWords.test(e.specifiers[i].local.name)) && this.unexpected(e.specifiers[i].local.start);
- e.source = null
- }
- this.semicolon()
- }
- return this.finishNode(e, 'ExportNamedDeclaration')
- },
- I.shouldParseExportStatement = function () {
- return this.type.keyword || this.isLet()
- },
- I.parseExportSpecifiers = function () {
- var e = [
- ],
- t = !0;
- for (this.expect(b.braceL); !this.eat(b.braceR); ) {
- if (t) t = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var n = this.startNode();
- n.local = this.parseIdent(this.type === b._default),
- n.exported = this.eatContextual('as') ? this.parseIdent(!0) : n.local,
- e.push(this.finishNode(n, 'ExportSpecifier'))
- }
- return e
- },
- I.parseImport = function (e) {
- return this.next(),
- this.type === b.string ? (e.specifiers = U, e.source = this.parseExprAtom()) : (e.specifiers = this.parseImportSpecifiers(), this.expectContextual('from'), e.source = this.type === b.string ? this.parseExprAtom() : this.unexpected()),
- this.semicolon(),
- this.finishNode(e, 'ImportDeclaration')
- },
- I.parseImportSpecifiers = function () {
- var e = [
- ],
- t = !0;
- if (this.type === b.name) {
- var n = this.startNode();
- if (n.local = this.parseIdent(), this.checkLVal(n.local, !0), e.push(this.finishNode(n, 'ImportDefaultSpecifier')), !this.eat(b.comma)) return e
- }
- if (this.type === b.star) {
- var r = this.startNode();
- return this.next(),
- this.expectContextual('as'),
- r.local = this.parseIdent(),
- this.checkLVal(r.local, !0),
- e.push(this.finishNode(r, 'ImportNamespaceSpecifier')),
- e
- }
- for (this.expect(b.braceL); !this.eat(b.braceR); ) {
- if (t) t = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var i = this.startNode();
- i.imported = this.parseIdent(!0),
- this.eatContextual('as') ? i.local = this.parseIdent() : (i.local = i.imported, this.isKeyword(i.local.name) && this.unexpected(i.local.start), this.reservedWordsStrict.test(i.local.name) && this.raise(i.local.start, 'The keyword \'' + i.local.name + '\' is reserved')),
- this.checkLVal(i.local, !0),
- e.push(this.finishNode(i, 'ImportSpecifier'))
- }
- return e
- };
- var V = N.prototype;
- V.toAssignable = function (e, t) {
- if (this.options.ecmaVersion >= 6 && e) switch (e.type) {
- case 'Identifier':
- case 'ObjectPattern':
- case 'ArrayPattern':
- break;
- case 'ObjectExpression':
- e.type = 'ObjectPattern';
- for (var n = 0; n < e.properties.length; n++) {
- var r = e.properties[n];
- 'init' !== r.kind && this.raise(r.key.start, 'Object pattern can\'t contain getter or setter'),
- this.toAssignable(r.value, t)
- }
- break;
- case 'ArrayExpression':
- e.type = 'ArrayPattern',
- this.toAssignableList(e.elements, t);
- break;
- case 'AssignmentExpression':
- if ('=' !== e.operator) {
- this.raise(e.left.end, 'Only \'=\' operator can be used for specifying default value.');
- break
- }
- e.type = 'AssignmentPattern',
- delete e.operator;
- case 'AssignmentPattern':
- 'YieldExpression' === e.right.type && this.raise(e.right.start, 'Yield expression cannot be a default value');
- break;
- case 'ParenthesizedExpression':
- e.expression = this.toAssignable(e.expression, t);
- break;
- case 'MemberExpression':
- if (!t) break;
- default:
- this.raise(e.start, 'Assigning to rvalue')
- }
- return e
- },
- V.toAssignableList = function (e, t) {
- var n = e.length;
- if (n) {
- var r = e[n - 1];
- if (r && 'RestElement' == r.type) --n;
- else if (r && 'SpreadElement' == r.type) {
- r.type = 'RestElement';
- var i = r.argument;
- this.toAssignable(i, t),
- 'Identifier' !== i.type && 'MemberExpression' !== i.type && 'ArrayPattern' !== i.type && this.unexpected(i.start),
- --n
- }
- t && r && 'RestElement' === r.type && 'Identifier' !== r.argument.type && this.unexpected(r.argument.start)
- }
- for (var s = 0; s < n; s++) {
- var o = e[s];
- o && this.toAssignable(o, t)
- }
- return e
- },
- V.parseSpread = function (e) {
- var t = this.startNode();
- return this.next(),
- t.argument = this.parseMaybeAssign(!1, e),
- this.finishNode(t, 'SpreadElement')
- },
- V.parseRest = function (e) {
- var t = this.startNode();
- return this.next(),
- t.argument = e ? this.type === b.name ? this.parseIdent() : this.unexpected() : this.type === b.name || this.type === b.bracketL ? this.parseBindingAtom() : this.unexpected(),
- this.finishNode(t, 'RestElement')
- },
- V.parseBindingAtom = function () {
- if (this.options.ecmaVersion < 6) return this.parseIdent();
- switch (this.type) {
- case b.name:
- return this.parseIdent();
- case b.bracketL:
- var e = this.startNode();
- return this.next(),
- e.elements = this.parseBindingList(b.bracketR, !0, !0),
- this.finishNode(e, 'ArrayPattern');
- case b.braceL:
- return this.parseObj(!0);
- default:
- this.unexpected()
- }
- },
- V.parseBindingList = function (e, t, n, r) {
- for (var i = [
- ], s = !0; !this.eat(e); ) if (s ? s = !1 : this.expect(b.comma), t && this.type === b.comma) i.push(null);
- else {
- if (n && this.afterTrailingComma(e)) break;
- if (this.type === b.ellipsis) {
- var o = this.parseRest(r);
- this.parseBindingListItem(o),
- i.push(o),
- this.type === b.comma && this.raise(this.start, 'Comma is not permitted after the rest element'),
- this.expect(e);
- break
- }
- var a = this.parseMaybeDefault(this.start, this.startLoc);
- this.parseBindingListItem(a),
- i.push(a)
- }
- return i
- },
- V.parseBindingListItem = function (e) {
- return e
- },
- V.parseMaybeDefault = function (e, t, n) {
- if (n = n || this.parseBindingAtom(), this.options.ecmaVersion < 6 || !this.eat(b.eq)) return n;
- var r = this.startNodeAt(e, t);
- return r.left = n,
- r.right = this.parseMaybeAssign(),
- this.finishNode(r, 'AssignmentPattern')
- },
- V.checkLVal = function (e, t, n) {
- switch (e.type) {
- case 'Identifier':
- this.strict && this.reservedWordsStrictBind.test(e.name) && this.raiseRecoverable(e.start, (t ? 'Binding ' : 'Assigning to ') + e.name + ' in strict mode'),
- n && (D(n, e.name) && this.raiseRecoverable(e.start, 'Argument name clash'), n[e.name] = !0);
- break;
- case 'MemberExpression':
- t && this.raiseRecoverable(e.start, (t ? 'Binding' : 'Assigning to') + ' member expression');
- break;
- case 'ObjectPattern':
- for (var r = 0; r < e.properties.length; r++) this.checkLVal(e.properties[r].value, t, n);
- break;
- case 'ArrayPattern':
- for (var i = 0; i < e.elements.length; i++) {
- var s = e.elements[i];
- s && this.checkLVal(s, t, n)
- }
- break;
- case 'AssignmentPattern':
- this.checkLVal(e.left, t, n);
- break;
- case 'RestElement':
- this.checkLVal(e.argument, t, n);
- break;
- case 'ParenthesizedExpression':
- this.checkLVal(e.expression, t, n);
- break;
- default:
- this.raise(e.start, (t ? 'Binding' : 'Assigning to') + ' rvalue')
- }
- };
- var z = N.prototype;
- z.checkPropClash = function (e, t) {
- if (!(this.options.ecmaVersion >= 6 && (e.computed || e.method || e.shorthand))) {
- var n,
- r = e.key;
- switch (r.type) {
- case 'Identifier':
- n = r.name;
- break;
- case 'Literal':
- n = String(r.value);
- break;
- default:
- return
- }
- var i = e.kind;
- if (this.options.ecmaVersion >= 6) '__proto__' === n && 'init' === i && (t.proto && this.raiseRecoverable(r.start, 'Redefinition of __proto__ property'), t.proto = !0);
- else {
- var s = t[n = '$' + n];
- if (s) {
- var o = 'init' !== i;
- (!this.strict && !o || !s[i]) && o ^ s.init || this.raiseRecoverable(r.start, 'Redefinition of property')
- } else s = t[n] = {
- init: !1,
- get: !1,
- set: !1
- };
- s[i] = !0
- }
- }
- },
- z.parseExpression = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseMaybeAssign(e, t);
- if (this.type === b.comma) {
- var s = this.startNodeAt(n, r);
- for (s.expressions = [
- i
- ]; this.eat(b.comma); ) s.expressions.push(this.parseMaybeAssign(e, t));
- return this.finishNode(s, 'SequenceExpression')
- }
- return i
- },
- z.parseMaybeAssign = function (e, t, n) {
- if (this.inGenerator && this.isContextual('yield')) return this.parseYield();
- var r = !1;
- t || (t = new L, r = !0);
- var i = this.start,
- s = this.startLoc;
- this.type != b.parenL && this.type != b.name || (this.potentialArrowAt = this.start);
- var o = this.parseMaybeConditional(e, t);
- if (n && (o = n.call(this, o, i, s)), this.type.isAssign) {
- this.checkPatternErrors(t, !0),
- r || L.call(t);
- var a = this.startNodeAt(i, s);
- return a.operator = this.value,
- a.left = this.type === b.eq ? this.toAssignable(o) : o,
- t.shorthandAssign = 0,
- this.checkLVal(o),
- this.next(),
- a.right = this.parseMaybeAssign(e),
- this.finishNode(a, 'AssignmentExpression')
- }
- return r && this.checkExpressionErrors(t, !0),
- o
- },
- z.parseMaybeConditional = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseExprOps(e, t);
- if (this.checkExpressionErrors(t)) return i;
- if (this.eat(b.question)) {
- var s = this.startNodeAt(n, r);
- return s.test = i,
- s.consequent = this.parseMaybeAssign(),
- this.expect(b.colon),
- s.alternate = this.parseMaybeAssign(e),
- this.finishNode(s, 'ConditionalExpression')
- }
- return i
- },
- z.parseExprOps = function (e, t) {
- var n = this.start,
- r = this.startLoc,
- i = this.parseMaybeUnary(t, !1);
- return this.checkExpressionErrors(t) ? i : this.parseExprOp(i, n, r, - 1, e)
- },
- z.parseExprOp = function (e, t, n, r, i) {
- var s = this.type.binop;
- if (null != s && (!i || this.type !== b._in) && s > r) {
- var o = this.type === b.logicalOR || this.type === b.logicalAND,
- a = this.value;
- this.next();
- var u = this.start,
- l = this.startLoc,
- c = this.parseExprOp(this.parseMaybeUnary(null, !1), u, l, s, i),
- p = this.buildBinary(t, n, e, c, a, o);
- return this.parseExprOp(p, t, n, r, i)
- }
- return e
- },
- z.buildBinary = function (e, t, n, r, i, s) {
- var o = this.startNodeAt(e, t);
- return o.left = n,
- o.operator = i,
- o.right = r,
- this.finishNode(o, s ? 'LogicalExpression' : 'BinaryExpression')
- },
- z.parseMaybeUnary = function (e, t) {
- var n,
- r = this.start,
- i = this.startLoc;
- if (this.type.prefix) {
- var s = this.startNode(),
- o = this.type === b.incDec;
- s.operator = this.value,
- s.prefix = !0,
- this.next(),
- s.argument = this.parseMaybeUnary(null, !0),
- this.checkExpressionErrors(e, !0),
- o ? this.checkLVal(s.argument) : this.strict && 'delete' === s.operator && 'Identifier' === s.argument.type ? this.raiseRecoverable(s.start, 'Deleting local variable in strict mode') : t = !0,
- n = this.finishNode(s, o ? 'UpdateExpression' : 'UnaryExpression')
- } else {
- if (n = this.parseExprSubscripts(e), this.checkExpressionErrors(e)) return n;
- for (; this.type.postfix && !this.canInsertSemicolon(); ) {
- var a = this.startNodeAt(r, i);
- a.operator = this.value,
- a.prefix = !1,
- a.argument = n,
- this.checkLVal(n),
- this.next(),
- n = this.finishNode(a, 'UpdateExpression')
- }
- }
- return !t && this.eat(b.starstar) ? this.buildBinary(r, i, n, this.parseMaybeUnary(null, !1), '**', !1) : n
- },
- z.parseExprSubscripts = function (e) {
- var t = this.start,
- n = this.startLoc,
- r = this.parseExprAtom(e),
- i = 'ArrowFunctionExpression' === r.type && ')' !== this.input.slice(this.lastTokStart, this.lastTokEnd);
- return this.checkExpressionErrors(e) || i ? r : this.parseSubscripts(r, t, n)
- },
- z.parseSubscripts = function (e, t, n, r) {
- for (; ; ) if (this.eat(b.dot)) {
- var i = this.startNodeAt(t, n);
- i.object = e,
- i.property = this.parseIdent(!0),
- i.computed = !1,
- e = this.finishNode(i, 'MemberExpression')
- } else if (this.eat(b.bracketL)) {
- var s = this.startNodeAt(t, n);
- s.object = e,
- s.property = this.parseExpression(),
- s.computed = !0,
- this.expect(b.bracketR),
- e = this.finishNode(s, 'MemberExpression')
- } else if (!r && this.eat(b.parenL)) {
- var o = this.startNodeAt(t, n);
- o.callee = e,
- o.arguments = this.parseExprList(b.parenR, !1),
- e = this.finishNode(o, 'CallExpression')
- } else {
- if (this.type !== b.backQuote) return e;
- var a = this.startNodeAt(t, n);
- a.tag = e,
- a.quasi = this.parseTemplate(),
- e = this.finishNode(a, 'TaggedTemplateExpression')
- }
- },
- z.parseExprAtom = function (e) {
- var t,
- n = this.potentialArrowAt == this.start;
- switch (this.type) {
- case b._super:
- this.inFunction || this.raise(this.start, '\'super\' outside of function or class');
- case b._this:
- var r = this.type === b._this ? 'ThisExpression' : 'Super';
- return t = this.startNode(),
- this.next(),
- this.finishNode(t, r);
- case b.name:
- var i = this.start,
- s = this.startLoc,
- o = this.parseIdent(this.type !== b.name);
- return n && !this.canInsertSemicolon() && this.eat(b.arrow) ? this.parseArrowExpression(this.startNodeAt(i, s), [
- o
- ]) : o;
- case b.regexp:
- var a = this.value;
- return (t = this.parseLiteral(a.value)).regex = {
- pattern: a.pattern,
- flags: a.flags
- },
- t;
- case b.num:
- case b.string:
- return this.parseLiteral(this.value);
- case b._null:
- case b._true:
- case b._false:
- return (t = this.startNode()).value = this.type === b._null ? null : this.type === b._true,
- t.raw = this.type.keyword,
- this.next(),
- this.finishNode(t, 'Literal');
- case b.parenL:
- return this.parseParenAndDistinguishExpression(n);
- case b.bracketL:
- return t = this.startNode(),
- this.next(),
- t.elements = this.parseExprList(b.bracketR, !0, !0, e),
- this.finishNode(t, 'ArrayExpression');
- case b.braceL:
- return this.parseObj(!1, e);
- case b._function:
- return t = this.startNode(),
- this.next(),
- this.parseFunction(t, !1);
- case b._class:
- return this.parseClass(this.startNode(), !1);
- case b._new:
- return this.parseNew();
- case b.backQuote:
- return this.parseTemplate();
- default:
- this.unexpected()
- }
- },
- z.parseLiteral = function (e) {
- var t = this.startNode();
- return t.value = e,
- t.raw = this.input.slice(this.start, this.end),
- this.next(),
- this.finishNode(t, 'Literal')
- },
- z.parseParenExpression = function () {
- this.expect(b.parenL);
- var e = this.parseExpression();
- return this.expect(b.parenR),
- e
- },
- z.parseParenAndDistinguishExpression = function (e) {
- var t,
- n = this.start,
- r = this.startLoc;
- if (this.options.ecmaVersion >= 6) {
- this.next();
- for (var i, s, o = this.start, a = this.startLoc, u = [
- ], l = !0, c = new L; this.type !== b.parenR; ) {
- if (l ? l = !1 : this.expect(b.comma), this.type === b.ellipsis) {
- i = this.start,
- u.push(this.parseParenItem(this.parseRest()));
- break
- }
- this.type !== b.parenL || s || (s = this.start),
- u.push(this.parseMaybeAssign(!1, c, this.parseParenItem))
- }
- var p = this.start,
- h = this.startLoc;
- if (this.expect(b.parenR), e && !this.canInsertSemicolon() && this.eat(b.arrow)) return this.checkPatternErrors(c, !0),
- s && this.unexpected(s),
- this.parseParenArrowList(n, r, u);
- u.length || this.unexpected(this.lastTokStart),
- i && this.unexpected(i),
- this.checkExpressionErrors(c, !0),
- u.length > 1 ? ((t = this.startNodeAt(o, a)).expressions = u, this.finishNodeAt(t, 'SequenceExpression', p, h)) : t = u[0]
- } else t = this.parseParenExpression();
- if (this.options.preserveParens) {
- var f = this.startNodeAt(n, r);
- return f.expression = t,
- this.finishNode(f, 'ParenthesizedExpression')
- }
- return t
- },
- z.parseParenItem = function (e) {
- return e
- },
- z.parseParenArrowList = function (e, t, n) {
- return this.parseArrowExpression(this.startNodeAt(e, t), n)
- };
- var q = [
- ];
- z.parseNew = function () {
- var e = this.startNode(),
- t = this.parseIdent(!0);
- if (this.options.ecmaVersion >= 6 && this.eat(b.dot)) return e.meta = t,
- e.property = this.parseIdent(!0),
- 'target' !== e.property.name && this.raiseRecoverable(e.property.start, 'The only valid meta property for new is new.target'),
- this.inFunction || this.raiseRecoverable(e.start, 'new.target can only be used in functions'),
- this.finishNode(e, 'MetaProperty');
- var n = this.start,
- r = this.startLoc;
- return e.callee = this.parseSubscripts(this.parseExprAtom(), n, r, !0),
- this.eat(b.parenL) ? e.arguments = this.parseExprList(b.parenR, !1) : e.arguments = q,
- this.finishNode(e, 'NewExpression')
- },
- z.parseTemplateElement = function () {
- var e = this.startNode();
- return e.value = {
- raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'),
- cooked: this.value
- },
- this.next(),
- e.tail = this.type === b.backQuote,
- this.finishNode(e, 'TemplateElement')
- },
- z.parseTemplate = function () {
- var e = this.startNode();
- this.next(),
- e.expressions = [
- ];
- var t = this.parseTemplateElement();
- for (e.quasis = [
- t
- ]; !t.tail; ) this.expect(b.dollarBraceL),
- e.expressions.push(this.parseExpression()),
- this.expect(b.braceR),
- e.quasis.push(t = this.parseTemplateElement());
- return this.next(),
- this.finishNode(e, 'TemplateLiteral')
- },
- z.parseObj = function (e, t) {
- var n = this.startNode(),
- r = !0,
- i = {
- };
- for (n.properties = [
- ], this.next(); !this.eat(b.braceR); ) {
- if (r) r = !1;
- else if (this.expect(b.comma), this.afterTrailingComma(b.braceR)) break;
- var s,
- o,
- a,
- u = this.startNode();
- this.options.ecmaVersion >= 6 && (u.method = !1, u.shorthand = !1, (e || t) && (o = this.start, a = this.startLoc), e || (s = this.eat(b.star))),
- this.parsePropertyName(u),
- this.parsePropertyValue(u, e, s, o, a, t),
- this.checkPropClash(u, i),
- n.properties.push(this.finishNode(u, 'Property'))
- }
- return this.finishNode(n, e ? 'ObjectPattern' : 'ObjectExpression')
- },
- z.parsePropertyValue = function (e, t, n, r, i, s) {
- if (this.eat(b.colon)) e.value = t ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(!1, s),
- e.kind = 'init';
- else if (this.options.ecmaVersion >= 6 && this.type === b.parenL) t && this.unexpected(),
- e.kind = 'init',
- e.method = !0,
- e.value = this.parseMethod(n);
- else if (this.options.ecmaVersion >= 5 && !e.computed && 'Identifier' === e.key.type && ('get' === e.key.name || 'set' === e.key.name) && this.type != b.comma && this.type != b.braceR) {
- (n || t) && this.unexpected(),
- e.kind = e.key.name,
- this.parsePropertyName(e),
- e.value = this.parseMethod(!1);
- var o = 'get' === e.kind ? 0 : 1;
- if (e.value.params.length !== o) {
- var a = e.value.start;
- 'get' === e.kind ? this.raiseRecoverable(a, 'getter should have no params') : this.raiseRecoverable(a, 'setter should have exactly one param')
- }
- 'set' === e.kind && 'RestElement' === e.value.params[0].type && this.raiseRecoverable(e.value.params[0].start, 'Setter cannot use rest params')
- } else this.options.ecmaVersion >= 6 && !e.computed && 'Identifier' === e.key.type ? ((this.keywords.test(e.key.name) || (this.strict ? this.reservedWordsStrictBind : this.reservedWords).test(e.key.name) || this.inGenerator && 'yield' == e.key.name) && this.raiseRecoverable(e.key.start, '\'' + e.key.name + '\' can not be used as shorthand property'), e.kind = 'init', t ? e.value = this.parseMaybeDefault(r, i, e.key) : this.type === b.eq && s ? (s.shorthandAssign || (s.shorthandAssign = this.start), e.value = this.parseMaybeDefault(r, i, e.key)) : e.value = e.key, e.shorthand = !0) : this.unexpected()
- },
- z.parsePropertyName = function (e) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(b.bracketL)) return e.computed = !0,
- e.key = this.parseMaybeAssign(),
- this.expect(b.bracketR),
- e.key;
- e.computed = !1
- }
- return e.key = this.type === b.num || this.type === b.string ? this.parseExprAtom() : this.parseIdent(!0)
- },
- z.initFunction = function (e) {
- e.id = null,
- this.options.ecmaVersion >= 6 && (e.generator = !1, e.expression = !1)
- },
- z.parseMethod = function (e) {
- var t = this.startNode(),
- n = this.inGenerator;
- return this.inGenerator = e,
- this.initFunction(t),
- this.expect(b.parenL),
- t.params = this.parseBindingList(b.parenR, !1, !1),
- this.options.ecmaVersion >= 6 && (t.generator = e),
- this.parseFunctionBody(t, !1),
- this.inGenerator = n,
- this.finishNode(t, 'FunctionExpression')
- },
- z.parseArrowExpression = function (e, t) {
- var n = this.inGenerator;
- return this.inGenerator = !1,
- this.initFunction(e),
- e.params = this.toAssignableList(t, !0),
- this.parseFunctionBody(e, !0),
- this.inGenerator = n,
- this.finishNode(e, 'ArrowFunctionExpression')
- },
- z.parseFunctionBody = function (e, t) {
- var n = t && this.type !== b.braceL;
- if (n) e.body = this.parseMaybeAssign(),
- e.expression = !0;
- else {
- var r = this.inFunction,
- i = this.labels;
- this.inFunction = !0,
- this.labels = [
- ],
- e.body = this.parseBlock(!0),
- e.expression = !1,
- this.inFunction = r,
- this.labels = i
- }
- var s = !n && e.body.body.length && this.isUseStrict(e.body.body[0]) ? e.body.body[0] : null;
- if (this.strict || s) {
- var o = this.strict;
- this.strict = !0,
- e.id && this.checkLVal(e.id, !0),
- this.checkParams(e, s),
- this.strict = o
- } else t && this.checkParams(e, s)
- },
- z.checkParams = function (e, t) {
- for (var n = {
- }, r = 0; r < e.params.length; r++) t && this.options.ecmaVersion >= 7 && 'Identifier' !== e.params[r].type && this.raiseRecoverable(t.start, 'Illegal \'use strict\' directive in function with non-simple parameter list'),
- this.checkLVal(e.params[r], !0, n)
- },
- z.parseExprList = function (e, t, n, r) {
- for (var i = [
- ], s = !0; !this.eat(e); ) {
- if (s) s = !1;
- else if (this.expect(b.comma), t && this.afterTrailingComma(e)) break;
- var o;
- n && this.type === b.comma ? o = null : this.type === b.ellipsis ? (o = this.parseSpread(r), this.type === b.comma && r && !r.trailingComma && (r.trailingComma = this.lastTokStart)) : o = this.parseMaybeAssign(!1, r),
- i.push(o)
- }
- return i
- },
- z.parseIdent = function (e) {
- var t = this.startNode();
- return e && 'never' == this.options.allowReserved && (e = !1),
- this.type === b.name ? (!e && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && (this.options.ecmaVersion >= 6 || - 1 == this.input.slice(this.start, this.end).indexOf('\\')) && this.raiseRecoverable(this.start, 'The keyword \'' + this.value + '\' is reserved'), !e && this.inGenerator && 'yield' === this.value && this.raiseRecoverable(this.start, 'Can not use \'yield\' as identifier inside a generator'), t.name = this.value) : e && this.type.keyword ? t.name = this.type.keyword : this.unexpected(),
- this.next(),
- this.finishNode(t, 'Identifier')
- },
- z.parseYield = function () {
- var e = this.startNode();
- return this.next(),
- this.type == b.semi || this.canInsertSemicolon() || this.type != b.star && !this.type.startsExpr ? (e.delegate = !1, e.argument = null) : (e.delegate = this.eat(b.star), e.argument = this.parseMaybeAssign()),
- this.finishNode(e, 'YieldExpression')
- };
- var K = N.prototype;
- K.raise = function (e, t) {
- var n = T(this.input, e);
- t += ' (' + n.line + ':' + n.column + ')';
- var r = new SyntaxError(t);
- throw r.pos = e,
- r.loc = n,
- r.raisedAt = this.pos,
- r
- },
- K.raiseRecoverable = K.raise,
- K.curPosition = function () {
- if (this.options.locations) return new k(this.curLine, this.pos - this.lineStart)
- };
- var $ = function (e, t, n) {
- this.type = '',
- this.start = t,
- this.end = 0,
- e.options.locations && (this.loc = new S(e, n)),
- e.options.directSourceFile && (this.sourceFile = e.options.directSourceFile),
- e.options.ranges && (this.range = [
- t,
- 0
- ])
- },
- Y = N.prototype;
- function W(e, t, n, r) {
- return e.type = t,
- e.end = n,
- this.options.locations && (e.loc.end = r),
- this.options.ranges && (e.range[1] = n),
- e
- }
- Y.startNode = function () {
- return new $(this, this.start, this.startLoc)
- },
- Y.startNodeAt = function (e, t) {
- return new $(this, e, t)
- },
- Y.finishNode = function (e, t) {
- return W.call(this, e, t, this.lastTokEnd, this.lastTokEndLoc)
- },
- Y.finishNodeAt = function (e, t, n, r) {
- return W.call(this, e, t, n, r)
- };
- var G = function (e, t, n, r) {
- this.token = e,
- this.isExpr = !!t,
- this.preserveSpace = !!n,
- this.override = r
- },
- H = {
- b_stat: new G('{', !1),
- b_expr: new G('{', !0),
- b_tmpl: new G('${', !0),
- p_stat: new G('(', !1),
- p_expr: new G('(', !0),
- q_tmpl: new G('`', !0, !0, function (e) {
- return e.readTmplToken()
- }),
- f_expr: new G('function', !0)
- },
- X = N.prototype;
- X.initialContext = function () {
- return [H.b_stat]
- },
- X.braceIsBlock = function (e) {
- if (e === b.colon) {
- var t = this.curContext();
- if (t === H.b_stat || t === H.b_expr) return !t.isExpr
- }
- return e === b._return ? x.test(this.input.slice(this.lastTokEnd, this.start)) : e === b._else || e === b.semi || e === b.eof || e === b.parenR || (e == b.braceL ? this.curContext() === H.b_stat : !this.exprAllowed)
- },
- X.updateContext = function (e) {
- var t,
- n = this.type;
- n.keyword && e == b.dot ? this.exprAllowed = !1 : (t = n.updateContext) ? t.call(this, e) : this.exprAllowed = n.beforeExpr
- },
- b.parenR.updateContext = b.braceR.updateContext = function () {
- if (1 != this.context.length) {
- var e = this.context.pop();
- e === H.b_stat && this.curContext() === H.f_expr ? (this.context.pop(), this.exprAllowed = !1) : this.exprAllowed = e === H.b_tmpl || !e.isExpr
- } else this.exprAllowed = !0
- },
- b.braceL.updateContext = function (e) {
- this.context.push(this.braceIsBlock(e) ? H.b_stat : H.b_expr),
- this.exprAllowed = !0
- },
- b.dollarBraceL.updateContext = function () {
- this.context.push(H.b_tmpl),
- this.exprAllowed = !0
- },
- b.parenL.updateContext = function (e) {
- var t = e === b._if || e === b._for || e === b._with || e === b._while;
- this.context.push(t ? H.p_stat : H.p_expr),
- this.exprAllowed = !0
- },
- b.incDec.updateContext = function () {
- },
- b._function.updateContext = function (e) {
- e.beforeExpr && e !== b.semi && e !== b._else && (e !== b.colon && e !== b.braceL || this.curContext() !== H.b_stat) && this.context.push(H.f_expr),
- this.exprAllowed = !1
- },
- b.backQuote.updateContext = function () {
- this.curContext() === H.q_tmpl ? this.context.pop() : this.context.push(H.q_tmpl),
- this.exprAllowed = !1
- };
- var J = function (e) {
- this.type = e.type,
- this.value = e.value,
- this.start = e.start,
- this.end = e.end,
- e.options.locations && (this.loc = new S(e, e.startLoc, e.endLoc)),
- e.options.ranges && (this.range = [
- e.start,
- e.end
- ])
- },
- Q = N.prototype,
- Z = 'object' == typeof Packages && '[object JavaPackage]' == Object.prototype.toString.call(Packages);
- function ee(e, t, n, r) {
- try {
- return new RegExp(e, t)
- } catch (e) {
- if (void 0 !== n) throw e instanceof SyntaxError && r.raise(n, 'Error parsing regular expression: ' + e.message),
- e
- }
- }
- Q.next = function () {
- this.options.onToken && this.options.onToken(new J(this)),
- this.lastTokEnd = this.end,
- this.lastTokStart = this.start,
- this.lastTokEndLoc = this.endLoc,
- this.lastTokStartLoc = this.startLoc,
- this.nextToken()
- },
- Q.getToken = function () {
- return this.next(),
- new J(this)
- },
- 'undefined' != typeof Symbol && (Q[Symbol.iterator] = function () {
- var e = this;
- return {
- next: function () {
- var t = e.getToken();
- return {
- done: t.type === b.eof,
- value: t
- }
- }
- }
- }),
- Q.setStrict = function (e) {
- if (this.strict = e, this.type === b.num || this.type === b.string) {
- if (this.pos = this.start, this.options.locations) for (; this.pos < this.lineStart; ) this.lineStart = this.input.lastIndexOf('\n', this.lineStart - 2) + 1,
- --this.curLine;
- this.nextToken()
- }
- },
- Q.curContext = function () {
- return this.context[this.context.length - 1]
- },
- Q.nextToken = function () {
- var e = this.curContext();
- return e && e.preserveSpace || this.skipSpace(),
- this.start = this.pos,
- this.options.locations && (this.startLoc = this.curPosition()),
- this.pos >= this.input.length ? this.finishToken(b.eof) : e.override ? e.override(this) : void this.readToken(this.fullCharCodeAtPos())
- },
- Q.readToken = function (e) {
- return p(e, this.options.ecmaVersion >= 6) || 92 === e ? this.readWord() : this.getTokenFromCode(e)
- },
- Q.fullCharCodeAtPos = function () {
- var e = this.input.charCodeAt(this.pos);
- return e <= 55295 || e >= 57344 ? e : (e << 10) + this.input.charCodeAt(this.pos + 1) - 56613888
- },
- Q.skipBlockComment = function () {
- var e,
- t = this.options.onComment && this.curPosition(),
- n = this.pos,
- r = this.input.indexOf('*/', this.pos += 2);
- if ( - 1 === r && this.raise(this.pos - 2, 'Unterminated comment'), this.pos = r + 2, this.options.locations) for (A.lastIndex = n; (e = A.exec(this.input)) && e.index < this.pos; ) ++this.curLine,
- this.lineStart = e.index + e[0].length;
- this.options.onComment && this.options.onComment(!0, this.input.slice(n + 2, r), n, this.pos, t, this.curPosition())
- },
- Q.skipLineComment = function (e) {
- for (var t = this.pos, n = this.options.onComment && this.curPosition(), r = this.input.charCodeAt(this.pos += e); this.pos < this.input.length && 10 !== r && 13 !== r && 8232 !== r && 8233 !== r; ) ++this.pos,
- r = this.input.charCodeAt(this.pos);
- this.options.onComment && this.options.onComment(!1, this.input.slice(t + e, this.pos), t, this.pos, n, this.curPosition())
- },
- Q.skipSpace = function () {
- e: for (; this.pos < this.input.length; ) {
- var e = this.input.charCodeAt(this.pos);
- switch (e) {
- case 32:
- case 160:
- ++this.pos;
- break;
- case 13:
- 10 === this.input.charCodeAt(this.pos + 1) && ++this.pos;
- case 10:
- case 8232:
- case 8233:
- ++this.pos,
- this.options.locations && (++this.curLine, this.lineStart = this.pos);
- break;
- case 47:
- switch (this.input.charCodeAt(this.pos + 1)) {
- case 42:
- this.skipBlockComment();
- break;
- case 47:
- this.skipLineComment(2);
- break;
- default:
- break e
- }
- break;
- default:
- if (!(e > 8 && e < 14 || e >= 5760 && _.test(String.fromCharCode(e)))) break e;
- ++this.pos
- }
- }
- },
- Q.finishToken = function (e, t) {
- this.end = this.pos,
- this.options.locations && (this.endLoc = this.curPosition());
- var n = this.type;
- this.type = e,
- this.value = t,
- this.updateContext(n)
- },
- Q.readToken_dot = function () {
- var e = this.input.charCodeAt(this.pos + 1);
- if (e >= 48 && e <= 57) return this.readNumber(!0);
- var t = this.input.charCodeAt(this.pos + 2);
- return this.options.ecmaVersion >= 6 && 46 === e && 46 === t ? (this.pos += 3, this.finishToken(b.ellipsis)) : (++this.pos, this.finishToken(b.dot))
- },
- Q.readToken_slash = function () {
- var e = this.input.charCodeAt(this.pos + 1);
- return this.exprAllowed ? (++this.pos, this.readRegexp()) : 61 === e ? this.finishOp(b.assign, 2) : this.finishOp(b.slash, 1)
- },
- Q.readToken_mult_modulo_exp = function (e) {
- var t = this.input.charCodeAt(this.pos + 1),
- n = 1,
- r = 42 === e ? b.star : b.modulo;
- return this.options.ecmaVersion >= 7 && 42 === t && (++n, r = b.starstar, t = this.input.charCodeAt(this.pos + 2)),
- 61 === t ? this.finishOp(b.assign, n + 1) : this.finishOp(r, n)
- },
- Q.readToken_pipe_amp = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return t === e ? this.finishOp(124 === e ? b.logicalOR : b.logicalAND, 2) : 61 === t ? this.finishOp(b.assign, 2) : this.finishOp(124 === e ? b.bitwiseOR : b.bitwiseAND, 1)
- },
- Q.readToken_caret = function () {
- return 61 === this.input.charCodeAt(this.pos + 1) ? this.finishOp(b.assign, 2) : this.finishOp(b.bitwiseXOR, 1)
- },
- Q.readToken_plus_min = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return t === e ? 45 == t && 62 == this.input.charCodeAt(this.pos + 2) && x.test(this.input.slice(this.lastTokEnd, this.pos)) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(b.incDec, 2) : 61 === t ? this.finishOp(b.assign, 2) : this.finishOp(b.plusMin, 1)
- },
- Q.readToken_lt_gt = function (e) {
- var t = this.input.charCodeAt(this.pos + 1),
- n = 1;
- return t === e ? (n = 62 === e && 62 === this.input.charCodeAt(this.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.pos + n) ? this.finishOp(b.assign, n + 1) : this.finishOp(b.bitShift, n)) : 33 == t && 60 == e && 45 == this.input.charCodeAt(this.pos + 2) && 45 == this.input.charCodeAt(this.pos + 3) ? (this.inModule && this.unexpected(), this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (61 === t && (n = 2), this.finishOp(b.relational, n))
- },
- Q.readToken_eq_excl = function (e) {
- var t = this.input.charCodeAt(this.pos + 1);
- return 61 === t ? this.finishOp(b.equality, 61 === this.input.charCodeAt(this.pos + 2) ? 3 : 2) : 61 === e && 62 === t && this.options.ecmaVersion >= 6 ? (this.pos += 2, this.finishToken(b.arrow)) : this.finishOp(61 === e ? b.eq : b.prefix, 1)
- },
- Q.getTokenFromCode = function (e) {
- switch (e) {
- case 46:
- return this.readToken_dot();
- case 40:
- return ++this.pos,
- this.finishToken(b.parenL);
- case 41:
- return ++this.pos,
- this.finishToken(b.parenR);
- case 59:
- return ++this.pos,
- this.finishToken(b.semi);
- case 44:
- return ++this.pos,
- this.finishToken(b.comma);
- case 91:
- return ++this.pos,
- this.finishToken(b.bracketL);
- case 93:
- return ++this.pos,
- this.finishToken(b.bracketR);
- case 123:
- return ++this.pos,
- this.finishToken(b.braceL);
- case 125:
- return ++this.pos,
- this.finishToken(b.braceR);
- case 58:
- return ++this.pos,
- this.finishToken(b.colon);
- case 63:
- return ++this.pos,
- this.finishToken(b.question);
- case 96:
- if (this.options.ecmaVersion < 6) break;
- return ++this.pos,
- this.finishToken(b.backQuote);
- case 48:
- var t = this.input.charCodeAt(this.pos + 1);
- if (120 === t || 88 === t) return this.readRadixNumber(16);
- if (this.options.ecmaVersion >= 6) {
- if (111 === t || 79 === t) return this.readRadixNumber(8);
- if (98 === t || 66 === t) return this.readRadixNumber(2)
- }
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- return this.readNumber(!1);
- case 34:
- case 39:
- return this.readString(e);
- case 47:
- return this.readToken_slash();
- case 37:
- case 42:
- return this.readToken_mult_modulo_exp(e);
- case 124:
- case 38:
- return this.readToken_pipe_amp(e);
- case 94:
- return this.readToken_caret();
- case 43:
- case 45:
- return this.readToken_plus_min(e);
- case 60:
- case 62:
- return this.readToken_lt_gt(e);
- case 61:
- case 33:
- return this.readToken_eq_excl(e);
- case 126:
- return this.finishOp(b.prefix, 1)
- }
- this.raise(this.pos, 'Unexpected character \'' + ne(e) + '\'')
- },
- Q.finishOp = function (e, t) {
- var n = this.input.slice(this.pos, this.pos + t);
- return this.pos += t,
- this.finishToken(e, n)
- };
- var te = !!ee('￿', 'u');
- function ne(e) {
- return e <= 65535 ? String.fromCharCode(e) : (e -= 65536, String.fromCharCode(55296 + (e >> 10), 56320 + (1023 & e)))
- }
- Q.readRegexp = function () {
- for (var e, t, n = this, r = this.pos; ; ) {
- n.pos >= n.input.length && n.raise(r, 'Unterminated regular expression');
- var i = n.input.charAt(n.pos);
- if (x.test(i) && n.raise(r, 'Unterminated regular expression'), e) e = !1;
- else {
- if ('[' === i) t = !0;
- else if (']' === i && t) t = !1;
- else if ('/' === i && !t) break;
- e = '\\' === i
- }
- ++n.pos
- }
- var s = this.input.slice(r, this.pos);
- ++this.pos;
- var o = this.readWord1(),
- a = s,
- u = '';
- if (o) {
- var l = /^[gim]*$/;
- this.options.ecmaVersion >= 6 && (l = /^[gimuy]*$/),
- l.test(o) || this.raise(r, 'Invalid regular expression flag'),
- o.indexOf('u') >= 0 && (te ? u = 'u' : (a = (a = a.replace(/\\u\{([0-9a-fA-F]+)\}/g, function (e, t, i) {
- return (t = Number('0x' + t)) > 1114111 && n.raise(r + i + 3, 'Code point out of bounds'),
- 'x'
- })).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x'), u = u.replace('u', '')))
- }
- var c = null;
- return Z || (ee(a, u, r, this), c = ee(s, o)),
- this.finishToken(b.regexp, {
- pattern: s,
- flags: o,
- value: c
- })
- },
- Q.readInt = function (e, t) {
- for (var n = this.pos, r = 0, i = 0, s = null == t ? 1 / 0 : t; i < s; ++i) {
- var o,
- a = this.input.charCodeAt(this.pos);
- if ((o = a >= 97 ? a - 97 + 10 : a >= 65 ? a - 65 + 10 : a >= 48 && a <= 57 ? a - 48 : 1 / 0) >= e) break;
- ++this.pos,
- r = r * e + o
- }
- return this.pos === n || null != t && this.pos - n !== t ? null : r
- },
- Q.readRadixNumber = function (e) {
- this.pos += 2;
- var t = this.readInt(e);
- return null == t && this.raise(this.start + 2, 'Expected number in radix ' + e),
- p(this.fullCharCodeAtPos()) && this.raise(this.pos, 'Identifier directly after number'),
- this.finishToken(b.num, t)
- },
- Q.readNumber = function (e) {
- var t = this.pos,
- n = !1,
- r = 48 === this.input.charCodeAt(this.pos);
- e || null !== this.readInt(10) || this.raise(t, 'Invalid number');
- var i = this.input.charCodeAt(this.pos);
- 46 === i && (++this.pos, this.readInt(10), n = !0, i = this.input.charCodeAt(this.pos)),
- 69 !== i && 101 !== i || (43 !== (i = this.input.charCodeAt(++this.pos)) && 45 !== i || ++this.pos, null === this.readInt(10) && this.raise(t, 'Invalid number'), n = !0),
- p(this.fullCharCodeAtPos()) && this.raise(this.pos, 'Identifier directly after number');
- var s,
- o = this.input.slice(t, this.pos);
- return n ? s = parseFloat(o) : r && 1 !== o.length ? /[89]/.test(o) || this.strict ? this.raise(t, 'Invalid number') : s = parseInt(o, 8) : s = parseInt(o, 10),
- this.finishToken(b.num, s)
- },
- Q.readCodePoint = function () {
- var e;
- if (123 === this.input.charCodeAt(this.pos)) {
- this.options.ecmaVersion < 6 && this.unexpected();
- var t = ++this.pos;
- e = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos),
- ++this.pos,
- e > 1114111 && this.raise(t, 'Code point out of bounds')
- } else e = this.readHexChar(4);
- return e
- },
- Q.readString = function (e) {
- for (var t = '', n = ++this.pos; ; ) {
- this.pos >= this.input.length && this.raise(this.start, 'Unterminated string constant');
- var r = this.input.charCodeAt(this.pos);
- if (r === e) break;
- 92 === r ? (t += this.input.slice(n, this.pos), t += this.readEscapedChar(!1), n = this.pos) : (E(r) && this.raise(this.start, 'Unterminated string constant'), ++this.pos)
- }
- return t += this.input.slice(n, this.pos++),
- this.finishToken(b.string, t)
- },
- Q.readTmplToken = function () {
- for (var e = '', t = this.pos; ; ) {
- this.pos >= this.input.length && this.raise(this.start, 'Unterminated template');
- var n = this.input.charCodeAt(this.pos);
- if (96 === n || 36 === n && 123 === this.input.charCodeAt(this.pos + 1)) return this.pos === this.start && this.type === b.template ? 36 === n ? (this.pos += 2, this.finishToken(b.dollarBraceL)) : (++this.pos, this.finishToken(b.backQuote)) : (e += this.input.slice(t, this.pos), this.finishToken(b.template, e));
- if (92 === n) e += this.input.slice(t, this.pos),
- e += this.readEscapedChar(!0),
- t = this.pos;
- else if (E(n)) {
- switch (e += this.input.slice(t, this.pos), ++this.pos, n) {
- case 13:
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
- case 10:
- e += '\n';
- break;
- default:
- e += String.fromCharCode(n)
- }
- this.options.locations && (++this.curLine, this.lineStart = this.pos),
- t = this.pos
- } else ++this.pos
- }
- },
- Q.readEscapedChar = function (e) {
- var t = this.input.charCodeAt(++this.pos);
- switch (++this.pos, t) {
- case 110:
- return '\n';
- case 114:
- return '\r';
- case 120:
- return String.fromCharCode(this.readHexChar(2));
- case 117:
- return ne(this.readCodePoint());
- case 116:
- return '\t';
- case 98:
- return '';
- case 118:
- return '\v';
- case 102:
- return '\f';
- case 13:
- 10 === this.input.charCodeAt(this.pos) && ++this.pos;
- case 10:
- return this.options.locations && (this.lineStart = this.pos, ++this.curLine),
- '';
- default:
- if (t >= 48 && t <= 55) {
- var n = this.input.substr(this.pos - 1, 3).match(/^[0-7]+/) [0],
- r = parseInt(n, 8);
- return r > 255 && (n = n.slice(0, - 1), r = parseInt(n, 8)),
- '0' !== n && (this.strict || e) && this.raise(this.pos - 2, 'Octal literal in strict mode'),
- this.pos += n.length - 1,
- String.fromCharCode(r)
- }
- return String.fromCharCode(t)
- }
- },
- Q.readHexChar = function (e) {
- var t = this.pos,
- n = this.readInt(16, e);
- return null === n && this.raise(t, 'Bad character escape sequence'),
- n
- },
- Q.readWord1 = function () {
- this.containsEsc = !1;
- for (var e = '', t = !0, n = this.pos, r = this.options.ecmaVersion >= 6; this.pos < this.input.length; ) {
- var i = this.fullCharCodeAtPos();
- if (h(i, r)) this.pos += i <= 65535 ? 1 : 2;
- else {
- if (92 !== i) break;
- this.containsEsc = !0,
- e += this.input.slice(n, this.pos);
- var s = this.pos;
- 117 != this.input.charCodeAt(++this.pos) && this.raise(this.pos, 'Expecting Unicode escape sequence \\uXXXX'),
- ++this.pos;
- var o = this.readCodePoint();
- (t ? p : h) (o, r) || this.raise(s, 'Invalid Unicode escape'),
- e += ne(o),
- n = this.pos
- }
- t = !1
- }
- return e + this.input.slice(n, this.pos)
- },
- Q.readWord = function () {
- var e = this.readWord1(),
- t = b.name;
- return (this.options.ecmaVersion >= 6 || !this.containsEsc) && this.keywords.test(e) && (t = y[e]),
- this.finishToken(t, e)
- };
- e.version = '3.3.0',
- e.parse = function (e, t) {
- return new N(t, e).parse()
- },
- e.parseExpressionAt = function (e, t, n) {
- var r = new N(n, e, t);
- return r.nextToken(),
- r.parseExpression()
- },
- e.tokenizer = function (e, t) {
- return new N(t, e)
- },
- e.Parser = N,
- e.plugins = B,
- e.defaultOptions = F,
- e.Position = k,
- e.SourceLocation = S,
- e.getLineInfo = T,
- e.Node = $,
- e.TokenType = f,
- e.tokTypes = b,
- e.TokContext = G,
- e.tokContexts = H,
- e.isIdentifierChar = h,
- e.isIdentifierStart = p,
- e.Token = J,
- e.isNewLine = E,
- e.lineBreak = x,
- e.lineBreakG = A,
- Object.defineProperty(e, '__esModule', {
- value: !0
- })
- },
- 'object' == typeof n && void 0 !== t ? i(n) : 'function' == typeof define && define.amd ? define(['exports'], i) : i(r.acorn = r.acorn || {
- })
- },
- {
- }
- ],
- 5: [
- function (e, t, n) {
- var r,
- i;
- r = this,
- i = function (e) {
- 'use strict';
- function t(e) {
- return 'string' == typeof e ? function (t) {
- return t == e
- }
- : e || function () {
- return !0
- }
- }
- var n = function (e, t) {
- this.node = e,
- this.state = t
- };
- var r = Object.create || function (e) {
- function t() {
- }
- return t.prototype = e,
- new t
- };
- function i(e, t, n) {
- n(e, t)
- }
- function s(e, t, n) {
- }
- var o = {
- };
- o.Program = o.BlockStatement = function (e, t, n) {
- for (var r = 0; r < e.body.length; ++r) n(e.body[r], t, 'Statement')
- },
- o.Statement = i,
- o.EmptyStatement = s,
- o.ExpressionStatement = o.ParenthesizedExpression = function (e, t, n) {
- return n(e.expression, t, 'Expression')
- },
- o.IfStatement = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.consequent, t, 'Statement'),
- e.alternate && n(e.alternate, t, 'Statement')
- },
- o.LabeledStatement = function (e, t, n) {
- return n(e.body, t, 'Statement')
- },
- o.BreakStatement = o.ContinueStatement = s,
- o.WithStatement = function (e, t, n) {
- n(e.object, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.SwitchStatement = function (e, t, n) {
- n(e.discriminant, t, 'Expression');
- for (var r = 0; r < e.cases.length; ++r) {
- var i = e.cases[r];
- i.test && n(i.test, t, 'Expression');
- for (var s = 0; s < i.consequent.length; ++s) n(i.consequent[s], t, 'Statement')
- }
- },
- o.ReturnStatement = o.YieldExpression = function (e, t, n) {
- e.argument && n(e.argument, t, 'Expression')
- },
- o.ThrowStatement = o.SpreadElement = function (e, t, n) {
- return n(e.argument, t, 'Expression')
- },
- o.TryStatement = function (e, t, n) {
- n(e.block, t, 'Statement'),
- e.handler && n(e.handler, t),
- e.finalizer && n(e.finalizer, t, 'Statement')
- },
- o.CatchClause = function (e, t, n) {
- n(e.param, t, 'Pattern'),
- n(e.body, t, 'ScopeBody')
- },
- o.WhileStatement = o.DoWhileStatement = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForStatement = function (e, t, n) {
- e.init && n(e.init, t, 'ForInit'),
- e.test && n(e.test, t, 'Expression'),
- e.update && n(e.update, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForInStatement = o.ForOfStatement = function (e, t, n) {
- n(e.left, t, 'ForInit'),
- n(e.right, t, 'Expression'),
- n(e.body, t, 'Statement')
- },
- o.ForInit = function (e, t, n) {
- 'VariableDeclaration' == e.type ? n(e, t) : n(e, t, 'Expression')
- },
- o.DebuggerStatement = s,
- o.FunctionDeclaration = function (e, t, n) {
- return n(e, t, 'Function')
- },
- o.VariableDeclaration = function (e, t, n) {
- for (var r = 0; r < e.declarations.length; ++r) n(e.declarations[r], t)
- },
- o.VariableDeclarator = function (e, t, n) {
- n(e.id, t, 'Pattern'),
- e.init && n(e.init, t, 'Expression')
- },
- o.Function = function (e, t, n) {
- e.id && n(e.id, t, 'Pattern');
- for (var r = 0; r < e.params.length; r++) n(e.params[r], t, 'Pattern');
- n(e.body, t, e.expression ? 'ScopeExpression' : 'ScopeBody')
- },
- o.ScopeBody = function (e, t, n) {
- return n(e, t, 'Statement')
- },
- o.ScopeExpression = function (e, t, n) {
- return n(e, t, 'Expression')
- },
- o.Pattern = function (e, t, n) {
- 'Identifier' == e.type ? n(e, t, 'VariablePattern') : 'MemberExpression' == e.type ? n(e, t, 'MemberPattern') : n(e, t)
- },
- o.VariablePattern = s,
- o.MemberPattern = i,
- o.RestElement = function (e, t, n) {
- return n(e.argument, t, 'Pattern')
- },
- o.ArrayPattern = function (e, t, n) {
- for (var r = 0; r < e.elements.length; ++r) {
- var i = e.elements[r];
- i && n(i, t, 'Pattern')
- }
- },
- o.ObjectPattern = function (e, t, n) {
- for (var r = 0; r < e.properties.length; ++r) n(e.properties[r].value, t, 'Pattern')
- },
- o.Expression = i,
- o.ThisExpression = o.Super = o.MetaProperty = s,
- o.ArrayExpression = function (e, t, n) {
- for (var r = 0; r < e.elements.length; ++r) {
- var i = e.elements[r];
- i && n(i, t, 'Expression')
- }
- },
- o.ObjectExpression = function (e, t, n) {
- for (var r = 0; r < e.properties.length; ++r) n(e.properties[r], t)
- },
- o.FunctionExpression = o.ArrowFunctionExpression = o.FunctionDeclaration,
- o.SequenceExpression = o.TemplateLiteral = function (e, t, n) {
- for (var r = 0; r < e.expressions.length; ++r) n(e.expressions[r], t, 'Expression')
- },
- o.UnaryExpression = o.UpdateExpression = function (e, t, n) {
- n(e.argument, t, 'Expression')
- },
- o.BinaryExpression = o.LogicalExpression = function (e, t, n) {
- n(e.left, t, 'Expression'),
- n(e.right, t, 'Expression')
- },
- o.AssignmentExpression = o.AssignmentPattern = function (e, t, n) {
- n(e.left, t, 'Pattern'),
- n(e.right, t, 'Expression')
- },
- o.ConditionalExpression = function (e, t, n) {
- n(e.test, t, 'Expression'),
- n(e.consequent, t, 'Expression'),
- n(e.alternate, t, 'Expression')
- },
- o.NewExpression = o.CallExpression = function (e, t, n) {
- if (n(e.callee, t, 'Expression'), e.arguments) for (var r = 0; r < e.arguments.length; ++r) n(e.arguments[r], t, 'Expression')
- },
- o.MemberExpression = function (e, t, n) {
- n(e.object, t, 'Expression'),
- e.computed && n(e.property, t, 'Expression')
- },
- o.ExportNamedDeclaration = o.ExportDefaultDeclaration = function (e, t, n) {
- e.declaration && n(e.declaration, t, 'ExportNamedDeclaration' == e.type || e.declaration.id ? 'Statement' : 'Expression'),
- e.source && n(e.source, t, 'Expression')
- },
- o.ExportAllDeclaration = function (e, t, n) {
- n(e.source, t, 'Expression')
- },
- o.ImportDeclaration = function (e, t, n) {
- for (var r = 0; r < e.specifiers.length; r++) n(e.specifiers[r], t);
- n(e.source, t, 'Expression')
- },
- o.ImportSpecifier = o.ImportDefaultSpecifier = o.ImportNamespaceSpecifier = o.Identifier = o.Literal = s,
- o.TaggedTemplateExpression = function (e, t, n) {
- n(e.tag, t, 'Expression'),
- n(e.quasi, t)
- },
- o.ClassDeclaration = o.ClassExpression = function (e, t, n) {
- return n(e, t, 'Class')
- },
- o.Class = function (e, t, n) {
- e.id && n(e.id, t, 'Pattern'),
- e.superClass && n(e.superClass, t, 'Expression');
- for (var r = 0; r < e.body.body.length; r++) n(e.body.body[r], t)
- },
- o.MethodDefinition = o.Property = function (e, t, n) {
- e.computed && n(e.key, t, 'Expression'),
- n(e.value, t, 'Expression')
- },
- e.simple = function (t, n, r, i, s) {
- r || (r = e.base),
- function e(t, i, s) {
- var o = s || t.type,
- a = n[o];
- r[o](t, i, e),
- a && a(t, i)
- }(t, i, s)
- },
- e.ancestor = function (t, n, r, i) {
- r || (r = e.base);
- var s = [
- ];
- !function e(t, i, o) {
- var a = o || t.type,
- u = n[a],
- l = t != s[s.length - 1];
- l && s.push(t),
- r[a](t, i, e),
- u && u(t, i || s, s),
- l && s.pop()
- }(t, i)
- },
- e.recursive = function (t, n, r, i, s) {
- var o = r ? e.make(r, i) : i;
- !function e(t, n, r) {
- o[r || t.type](t, n, e)
- }(t, n, s)
- },
- e.findNodeAt = function (r, i, s, o, a, u) {
- o = t(o),
- a || (a = e.base);
- try {
- !function e(t, r, u) {
- var l = u || t.type;
- if ((null == i || t.start <= i) && (null == s || t.end >= s) && a[l](t, r, e), (null == i || t.start == i) && (null == s || t.end == s) && o(l, t)) throw new n(t, r)
- }(r, u)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeAround = function (r, i, s, o, a) {
- s = t(s),
- o || (o = e.base);
- try {
- !function e(t, r, a) {
- var u = a || t.type;
- if (!(t.start > i || t.end < i) && (o[u](t, r, e), s(u, t))) throw new n(t, r)
- }(r, a)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeAfter = function (r, i, s, o, a) {
- s = t(s),
- o || (o = e.base);
- try {
- !function e(t, r, a) {
- if (!(t.end < i)) {
- var u = a || t.type;
- if (t.start >= i && s(u, t)) throw new n(t, r);
- o[u](t, r, e)
- }
- }(r, a)
- } catch (e) {
- if (e instanceof n) return e;
- throw e
- }
- },
- e.findNodeBefore = function (r, i, s, o, a) {
- var u;
- return s = t(s),
- o || (o = e.base),
- function e(t, r, a) {
- if (!(t.start > i)) {
- var l = a || t.type;
- t.end <= i && (!u || u.node.end < t.end) && s(l, t) && (u = new n(t, r)),
- o[l](t, r, e)
- }
- }(r, a),
- u
- },
- e.make = function (t, n) {
- n || (n = e.base);
- var i = r(n);
- for (var s in t) i[s] = t[s];
- return i
- },
- e.base = o,
- Object.defineProperty(e, '__esModule', {
- value: !0
- })
- },
- 'object' == typeof n && void 0 !== t ? i(n) : 'function' == typeof define && define.amd ? define(['exports'], i) : i((r.acorn = r.acorn || {
- }, r.acorn.walk = r.acorn.walk || {
- }))
- },
- {
- }
- ],
- 6: [
- function (e, t, n) {
- 'use strict';
- var r = e('./raw'),
- i = [
- ],
- s = [
- ],
- o = r.makeRequestCallFromTimer(function () {
- if (s.length) throw s.shift()
- });
- function a(e) {
- var t;
- (t = i.length ? i.pop() : new u).task = e,
- r(t)
- }
- function u() {
- this.task = null
- }
- t.exports = a,
- u.prototype.call = function () {
- try {
- this.task.call()
- } catch (e) {
- a.onerror ? a.onerror(e) : (s.push(e), o())
- } finally {
- this.task = null,
- i[i.length] = this
- }
- }
- },
- {
- './raw': 7
- }
- ],
- 7: [
- function (e, t, n) {
- (function (e) {
- 'use strict';
- function n(e) {
- i.length || (r(), !0),
- i[i.length] = e
- }
- t.exports = n;
- var r,
- i = [
- ],
- s = 0,
- o = 1024;
- function a() {
- for (; s < i.length; ) {
- var e = s;
- if (s += 1, i[e].call(), s > o) {
- for (var t = 0, n = i.length - s; t < n; t++) i[t] = i[t + s];
- i.length -= s,
- s = 0
- }
- }
- i.length = 0,
- s = 0,
- !1
- }
- var u,
- l,
- c,
- p = void 0 !== e ? e : self,
- h = p.MutationObserver || p.WebKitMutationObserver;
- function f(e) {
- return function () {
- var t = setTimeout(r, 0),
- n = setInterval(r, 50);
- function r() {
- clearTimeout(t),
- clearInterval(n),
- e()
- }
- }
- }
- 'function' == typeof h ? (u = 1, l = new h(a), c = document.createTextNode(''), l.observe(c, {
- characterData: !0
- }), r = function () {
- u = - u,
- c.data = u
- }) : r = f(a),
- n.requestFlush = r,
- n.makeRequestCallFromTimer = f
- }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- })
- },
- {
- }
- ],
- 8: [
- function (e, t, n) {
- (function (n) {
- 'use strict';
- var r = e('object-assign');
- function i(e, t) {
- if (e === t) return 0;
- for (var n = e.length, r = t.length, i = 0, s = Math.min(n, r); i < s; ++i) if (e[i] !== t[i]) {
- n = e[i],
- r = t[i];
- break
- }
- return n < r ? - 1 : r < n ? 1 : 0
- }
- function s(e) {
- return n.Buffer && 'function' == typeof n.Buffer.isBuffer ? n.Buffer.isBuffer(e) : !(null == e || !e._isBuffer)
- }
- var o = e('util/'),
- a = Object.prototype.hasOwnProperty,
- u = Array.prototype.slice,
- l = 'foo' === function () {
- }.name;
- function c(e) {
- return Object.prototype.toString.call(e)
- }
- function p(e) {
- return !s(e) && ('function' == typeof n.ArrayBuffer && ('function' == typeof ArrayBuffer.isView ? ArrayBuffer.isView(e) : !!e && (e instanceof DataView || !!(e.buffer && e.buffer instanceof ArrayBuffer))))
- }
- var h = t.exports = v,
- f = /\s*function\s+([^\(\s]*)\s*/;
- function d(e) {
- if (o.isFunction(e)) {
- if (l) return e.name;
- var t = e.toString().match(f);
- return t && t[1]
- }
- }
- function m(e, t) {
- return 'string' == typeof e ? e.length < t ? e : e.slice(0, t) : e
- }
- function g(e) {
- if (l || !o.isFunction(e)) return o.inspect(e);
- var t = d(e);
- return '[Function' + (t ? ': ' + t : '') + ']'
- }
- function y(e, t, n, r, i) {
- throw new h.AssertionError({
- message: n,
- actual: e,
- expected: t,
- operator: r,
- stackStartFunction: i
- })
- }
- function v(e, t) {
- e || y(e, !0, t, '==', h.ok)
- }
- function b(e, t, n, r) {
- if (e === t) return !0;
- if (s(e) && s(t)) return 0 === i(e, t);
- if (o.isDate(e) && o.isDate(t)) return e.getTime() === t.getTime();
- if (o.isRegExp(e) && o.isRegExp(t)) return e.source === t.source && e.global === t.global && e.multiline === t.multiline && e.lastIndex === t.lastIndex && e.ignoreCase === t.ignoreCase;
- if (null !== e && 'object' == typeof e || null !== t && 'object' == typeof t) {
- if (p(e) && p(t) && c(e) === c(t) && !(e instanceof Float32Array || e instanceof Float64Array)) return 0 === i(new Uint8Array(e.buffer), new Uint8Array(t.buffer));
- if (s(e) !== s(t)) return !1;
- var a = (r = r || {
- actual: [
- ],
- expected: [
- ]
- }).actual.indexOf(e);
- return - 1 !== a && a === r.expected.indexOf(t) || (r.actual.push(e), r.expected.push(t), function (e, t, n, r) {
- if (null === e || void 0 === e || null === t || void 0 === t) return !1;
- if (o.isPrimitive(e) || o.isPrimitive(t)) return e === t;
- if (n && Object.getPrototypeOf(e) !== Object.getPrototypeOf(t)) return !1;
- var i = x(e),
- s = x(t);
- if (i && !s || !i && s) return !1;
- if (i) return e = u.call(e),
- t = u.call(t),
- b(e, t, n);
- var a,
- l,
- c = _(e),
- p = _(t);
- if (c.length !== p.length) return !1;
- for (c.sort(), p.sort(), l = c.length - 1; l >= 0; l--) if (c[l] !== p[l]) return !1;
- for (l = c.length - 1; l >= 0; l--) if (a = c[l], !b(e[a], t[a], n, r)) return !1;
- return !0
- }(e, t, n, r))
- }
- return n ? e === t : e == t
- }
- function x(e) {
- return '[object Arguments]' == Object.prototype.toString.call(e)
- }
- function A(e, t) {
- if (!e || !t) return !1;
- if ('[object RegExp]' == Object.prototype.toString.call(t)) return t.test(e);
- try {
- if (e instanceof t) return !0
- } catch (e) {
- }
- return !Error.isPrototypeOf(t) && !0 === t.call({
- }, e)
- }
- function E(e, t, n, r) {
- var i;
- if ('function' != typeof t) throw new TypeError('"block" argument must be a function');
- 'string' == typeof n && (r = n, n = null),
- i = function (e) {
- var t;
- try {
- e()
- } catch (e) {
- t = e
- }
- return t
- }(t),
- r = (n && n.name ? ' (' + n.name + ').' : '.') + (r ? ' ' + r : '.'),
- e && !i && y(i, n, 'Missing expected exception' + r);
- var s = 'string' == typeof r,
- a = !e && o.isError(i),
- u = !e && i && !n;
- if ((a && s && A(i, n) || u) && y(i, n, 'Got unwanted exception' + r), e && i && n && !A(i, n) || !e && i) throw i
- }
- h.AssertionError = function (e) {
- var t;
- this.name = 'AssertionError',
- this.actual = e.actual,
- this.expected = e.expected,
- this.operator = e.operator,
- e.message ? (this.message = e.message, this.generatedMessage = !1) : (this.message = m(g((t = this).actual), 128) + ' ' + t.operator + ' ' + m(g(t.expected), 128), this.generatedMessage = !0);
- var n = e.stackStartFunction || y;
- if (Error.captureStackTrace) Error.captureStackTrace(this, n);
- else {
- var r = new Error;
- if (r.stack) {
- var i = r.stack,
- s = d(n),
- o = i.indexOf('\n' + s);
- if (o >= 0) {
- var a = i.indexOf('\n', o + 1);
- i = i.substring(a + 1)
- }
- this.stack = i
- }
- }
- },
- o.inherits(h.AssertionError, Error),
- h.fail = y,
- h.ok = v,
- h.equal = function (e, t, n) {
- e != t && y(e, t, n, '==', h.equal)
- },
- h.notEqual = function (e, t, n) {
- e == t && y(e, t, n, '!=', h.notEqual)
- },
- h.deepEqual = function (e, t, n) {
- b(e, t, !1) || y(e, t, n, 'deepEqual', h.deepEqual)
- },
- h.deepStrictEqual = function (e, t, n) {
- b(e, t, !0) || y(e, t, n, 'deepStrictEqual', h.deepStrictEqual)
- },
- h.notDeepEqual = function (e, t, n) {
- b(e, t, !1) && y(e, t, n, 'notDeepEqual', h.notDeepEqual)
- },
- h.notDeepStrictEqual = function e(t, n, r) {
- b(t, n, !0) && y(t, n, r, 'notDeepStrictEqual', e)
- },
- h.strictEqual = function (e, t, n) {
- e !== t && y(e, t, n, '===', h.strictEqual)
- },
- h.notStrictEqual = function (e, t, n) {
- e === t && y(e, t, n, '!==', h.notStrictEqual)
- },
- h.throws = function (e, t, n) {
- E(!0, e, t, n)
- },
- h.doesNotThrow = function (e, t, n) {
- E(!1, e, t, n)
- },
- h.ifError = function (e) {
- if (e) throw e
- },
- h.strict = r(function e(t, n) {
- t || y(t, !0, n, '==', e)
- }, h, {
- equal: h.strictEqual,
- deepEqual: h.deepStrictEqual,
- notEqual: h.notStrictEqual,
- notDeepEqual: h.notDeepStrictEqual
- }),
- h.strict.strict = h.strict;
- var _ = Object.keys || function (e) {
- var t = [
- ];
- for (var n in e) a.call(e, n) && t.push(n);
- return t
- }
- }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- })
- },
- {
- 'object-assign': 370,
- 'util/': 11
- }
- ],
- 9: [
- function (e, t, n) {
- 'function' == typeof Object.create ? t.exports = function (e, t) {
- e.super_ = t,
- e.prototype = Object.create(t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- })
- }
- : t.exports = function (e, t) {
- e.super_ = t;
- var n = function () {
- };
- n.prototype = t.prototype,
- e.prototype = new n,
- e.prototype.constructor = e
- }
- },
- {
- }
- ],
- 10: [
- function (e, t, n) {
- t.exports = function (e) {
- return e && 'object' == typeof e && 'function' == typeof e.copy && 'function' == typeof e.fill && 'function' == typeof e.readUInt8
- }
- },
- {
- }
- ],
- 11: [
- function (e, t, n) {
- (function (t, r) {
- var i = /%[sdj%]/g;
- n.format = function (e) {
- if (!y(e)) {
- for (var t = [
- ], n = 0; n < arguments.length; n++) t.push(a(arguments[n]));
- return t.join(' ')
- }
- n = 1;
- for (var r = arguments, s = r.length, o = String(e).replace(i, function (e) {
- if ('%%' === e) return '%';
- if (n >= s) return e;
- switch (e) {
- case '%s':
- return String(r[n++]);
- case '%d':
- return Number(r[n++]);
- case '%j':
- try {
- return JSON.stringify(r[n++])
- } catch (e) {
- return '[Circular]'
- }
- default:
- return e
- }
- }), u = r[n]; n < s; u = r[++n]) m(u) || !x(u) ? o += ' ' + u : o += ' ' + a(u);
- return o
- },
- n.deprecate = function (e, i) {
- if (v(r.process)) return function () {
- return n.deprecate(e, i).apply(this, arguments)
- };
- if (!0 === t.noDeprecation) return e;
- var s = !1;
- return function () {
- if (!s) {
- if (t.throwDeprecation) throw new Error(i);
- t.traceDeprecation ? console.trace(i) : console.error(i),
- s = !0
- }
- return e.apply(this, arguments)
- }
- };
- var s,
- o = {
- };
- function a(e, t) {
- var r = {
- seen: [
- ],
- stylize: l
- };
- return arguments.length >= 3 && (r.depth = arguments[2]),
- arguments.length >= 4 && (r.colors = arguments[3]),
- d(t) ? r.showHidden = t : t && n._extend(r, t),
- v(r.showHidden) && (r.showHidden = !1),
- v(r.depth) && (r.depth = 2),
- v(r.colors) && (r.colors = !1),
- v(r.customInspect) && (r.customInspect = !0),
- r.colors && (r.stylize = u),
- c(r, e, r.depth)
- }
- function u(e, t) {
- var n = a.styles[t];
- return n ? '[' + a.colors[n][0] + 'm' + e + '[' + a.colors[n][1] + 'm' : e
- }
- function l(e, t) {
- return e
- }
- function c(e, t, r) {
- if (e.customInspect && t && _(t.inspect) && t.inspect !== n.inspect && (!t.constructor || t.constructor.prototype !== t)) {
- var i = t.inspect(r, e);
- return y(i) || (i = c(e, i, r)),
- i
- }
- var s = function (e, t) {
- if (v(t)) return e.stylize('undefined', 'undefined');
- if (y(t)) {
- var n = '\'' + JSON.stringify(t).replace(/^"|"$/g, '').replace(/'/g, '\\\'').replace(/\\"/g, '"') + '\'';
- return e.stylize(n, 'string')
- }
- if (g(t)) return e.stylize('' + t, 'number');
- if (d(t)) return e.stylize('' + t, 'boolean');
- if (m(t)) return e.stylize('null', 'null')
- }(e, t);
- if (s) return s;
- var o = Object.keys(t),
- a = function (e) {
- var t = {
- };
- return e.forEach(function (e, n) {
- t[e] = !0
- }),
- t
- }(o);
- if (e.showHidden && (o = Object.getOwnPropertyNames(t)), E(t) && (o.indexOf('message') >= 0 || o.indexOf('description') >= 0)) return p(t);
- if (0 === o.length) {
- if (_(t)) {
- var u = t.name ? ': ' + t.name : '';
- return e.stylize('[Function' + u + ']', 'special')
- }
- if (b(t)) return e.stylize(RegExp.prototype.toString.call(t), 'regexp');
- if (A(t)) return e.stylize(Date.prototype.toString.call(t), 'date');
- if (E(t)) return p(t)
- }
- var l,
- x = '',
- C = !1,
- w = [
- '{',
- '}'
- ];
- (f(t) && (C = !0, w = [
- '[',
- ']'
- ]), _(t)) && (x = ' [Function' + (t.name ? ': ' + t.name : '') + ']');
- return b(t) && (x = ' ' + RegExp.prototype.toString.call(t)),
- A(t) && (x = ' ' + Date.prototype.toUTCString.call(t)),
- E(t) && (x = ' ' + p(t)),
- 0 !== o.length || C && 0 != t.length ? r < 0 ? b(t) ? e.stylize(RegExp.prototype.toString.call(t), 'regexp') : e.stylize('[Object]', 'special') : (e.seen.push(t), l = C ? function (e, t, n, r, i) {
- for (var s = [
- ], o = 0, a = t.length; o < a; ++o) k(t, String(o)) ? s.push(h(e, t, n, r, String(o), !0)) : s.push('');
- return i.forEach(function (i) {
- i.match(/^\d+$/) || s.push(h(e, t, n, r, i, !0))
- }),
- s
- }(e, t, r, a, o) : o.map(function (n) {
- return h(e, t, r, a, n, C)
- }), e.seen.pop(), function (e, t, n) {
- if (e.reduce(function (e, t) {
- return 0,
- t.indexOf('\n') >= 0 && 0,
- e + t.replace(/\u001b\[\d\d?m/g, '').length + 1
- }, 0) > 60) return n[0] + ('' === t ? '' : t + '\n ') + ' ' + e.join(',\n ') + ' ' + n[1];
- return n[0] + t + ' ' + e.join(', ') + ' ' + n[1]
- }(l, x, w)) : w[0] + x + w[1]
- }
- function p(e) {
- return '[' + Error.prototype.toString.call(e) + ']'
- }
- function h(e, t, n, r, i, s) {
- var o,
- a,
- u;
- if ((u = Object.getOwnPropertyDescriptor(t, i) || {
- value: t[i]
- }).get ? a = u.set ? e.stylize('[Getter/Setter]', 'special') : e.stylize('[Getter]', 'special') : u.set && (a = e.stylize('[Setter]', 'special')), k(r, i) || (o = '[' + i + ']'), a || (e.seen.indexOf(u.value) < 0 ? (a = m(n) ? c(e, u.value, null) : c(e, u.value, n - 1)).indexOf('\n') > - 1 && (a = s ? a.split('\n').map(function (e) {
- return ' ' + e
- }).join('\n').substr(2) : '\n' + a.split('\n').map(function (e) {
- return ' ' + e
- }).join('\n')) : a = e.stylize('[Circular]', 'special')), v(o)) {
- if (s && i.match(/^\d+$/)) return a;
- (o = JSON.stringify('' + i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (o = o.substr(1, o.length - 2), o = e.stylize(o, 'name')) : (o = o.replace(/'/g, '\\\'').replace(/\\"/g, '"').replace(/(^"|"$)/g, '\''), o = e.stylize(o, 'string'))
- }
- return o + ': ' + a
- }
- function f(e) {
- return Array.isArray(e)
- }
- function d(e) {
- return 'boolean' == typeof e
- }
- function m(e) {
- return null === e
- }
- function g(e) {
- return 'number' == typeof e
- }
- function y(e) {
- return 'string' == typeof e
- }
- function v(e) {
- return void 0 === e
- }
- function b(e) {
- return x(e) && '[object RegExp]' === C(e)
- }
- function x(e) {
- return 'object' == typeof e && null !== e
- }
- function A(e) {
- return x(e) && '[object Date]' === C(e)
- }
- function E(e) {
- return x(e) && ('[object Error]' === C(e) || e instanceof Error)
- }
- function _(e) {
- return 'function' == typeof e
- }
- function C(e) {
- return Object.prototype.toString.call(e)
- }
- function w(e) {
- return e < 10 ? '0' + e.toString(10) : e.toString(10)
- }
- n.debuglog = function (e) {
- if (v(s) && (s = t.env.NODE_DEBUG || ''), e = e.toUpperCase(), !o[e]) if (new RegExp('\\b' + e + '\\b', 'i').test(s)) {
- var r = t.pid;
- o[e] = function () {
- var t = n.format.apply(n, arguments);
- console.error('%s %d: %s', e, r, t)
- }
- } else o[e] = function () {
- };
- return o[e]
- },
- n.inspect = a,
- a.colors = {
- bold: [
- 1,
- 22
- ],
- italic: [
- 3,
- 23
- ],
- underline: [
- 4,
- 24
- ],
- inverse: [
- 7,
- 27
- ],
- white: [
- 37,
- 39
- ],
- grey: [
- 90,
- 39
- ],
- black: [
- 30,
- 39
- ],
- blue: [
- 34,
- 39
- ],
- cyan: [
- 36,
- 39
- ],
- green: [
- 32,
- 39
- ],
- magenta: [
- 35,
- 39
- ],
- red: [
- 31,
- 39
- ],
- yellow: [
- 33,
- 39
- ]
- },
- a.styles = {
- special: 'cyan',
- number: 'yellow',
- boolean: 'yellow',
- undefined: 'grey',
- null: 'bold',
- string: 'green',
- date: 'magenta',
- regexp: 'red'
- },
- n.isArray = f,
- n.isBoolean = d,
- n.isNull = m,
- n.isNullOrUndefined = function (e) {
- return null == e
- },
- n.isNumber = g,
- n.isString = y,
- n.isSymbol = function (e) {
- return 'symbol' == typeof e
- },
- n.isUndefined = v,
- n.isRegExp = b,
- n.isObject = x,
- n.isDate = A,
- n.isError = E,
- n.isFunction = _,
- n.isPrimitive = function (e) {
- return null === e || 'boolean' == typeof e || 'number' == typeof e || 'string' == typeof e || 'symbol' == typeof e || void 0 === e
- },
- n.isBuffer = e('./support/isBuffer');
- var D = [
- 'Jan',
- 'Feb',
- 'Mar',
- 'Apr',
- 'May',
- 'Jun',
- 'Jul',
- 'Aug',
- 'Sep',
- 'Oct',
- 'Nov',
- 'Dec'
- ];
- function k(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- n.log = function () {
- var e,
- t;
- console.log('%s - %s', (e = new Date, t = [
- w(e.getHours()),
- w(e.getMinutes()),
- w(e.getSeconds())
- ].join(':'), [
- e.getDate(),
- D[e.getMonth()],
- t
- ].join(' ')), n.format.apply(n, arguments))
- },
- n.inherits = e('inherits'),
- n._extend = function (e, t) {
- if (!t || !x(t)) return e;
- for (var n = Object.keys(t), r = n.length; r--; ) e[n[r]] = t[n[r]];
- return e
- }
- }).call(this, e('_process'), 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- })
- },
- {
- './support/isBuffer': 10,
- _process: 373,
- inherits: 9
- }
- ],
- 12: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/get-iterator'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/get-iterator': 150
- }
- ],
- 13: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/json/stringify'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/json/stringify': 151
- }
- ],
- 14: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/number/max-safe-integer'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/number/max-safe-integer': 152
- }
- ],
- 15: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/object/create'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/object/create': 153
- }
- ],
- 16: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/object/get-own-property-symbols'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/object/get-own-property-symbols': 154
- }
- ],
- 17: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/object/keys'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/object/keys': 155
- }
- ],
- 18: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/symbol'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/symbol': 157
- }
- ],
- 19: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/symbol/for'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/symbol/for': 156
- }
- ],
- 20: [
- function (e, t, n) {
- t.exports = {
- default:
- e('core-js/library/fn/symbol/iterator'),
- __esModule: !0
- }
- },
- {
- 'core-js/library/fn/symbol/iterator': 158
- }
- ],
- 21: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0;
- var r = o(e('../core-js/symbol/iterator')),
- i = o(e('../core-js/symbol')),
- s = 'function' == typeof i.default && 'symbol' == typeof r.default ? function (e) {
- return typeof e
- }
- : function (e) {
- return e && 'function' == typeof i.default && e.constructor === i.default && e !== i.default.prototype ? 'symbol' : typeof e
- };
- function o(e) {
- return e && e.__esModule ? e : {
- default:
- e
- }
- }
- n.default = 'function' == typeof i.default && 'symbol' === s(r.default) ? function (e) {
- return void 0 === e ? 'undefined' : s(e)
- }
- : function (e) {
- return e && 'function' == typeof i.default && e.constructor === i.default && e !== i.default.prototype ? 'symbol' : void 0 === e ? 'undefined' : s(e)
- }
- },
- {
- '../core-js/symbol': 18,
- '../core-js/symbol/iterator': 20
- }
- ],
- 22: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.NOT_LOCAL_BINDING = n.BLOCK_SCOPED_SYMBOL = n.INHERIT_KEYS = n.UNARY_OPERATORS = n.STRING_UNARY_OPERATORS = n.NUMBER_UNARY_OPERATORS = n.BOOLEAN_UNARY_OPERATORS = n.BINARY_OPERATORS = n.NUMBER_BINARY_OPERATORS = n.BOOLEAN_BINARY_OPERATORS = n.COMPARISON_BINARY_OPERATORS = n.EQUALITY_BINARY_OPERATORS = n.BOOLEAN_NUMBER_BINARY_OPERATORS = n.UPDATE_OPERATORS = n.LOGICAL_OPERATORS = n.COMMENT_KEYS = n.FOR_INIT_KEYS = n.FLATTENABLE_KEYS = n.STATEMENT_OR_BLOCK_KEYS = void 0;
- var r,
- i = e('babel-runtime/core-js/symbol/for'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- n.STATEMENT_OR_BLOCK_KEYS = [
- 'consequent',
- 'body',
- 'alternate'
- ],
- n.FLATTENABLE_KEYS = [
- 'body',
- 'expressions'
- ],
- n.FOR_INIT_KEYS = [
- 'left',
- 'init'
- ],
- n.COMMENT_KEYS = [
- 'leadingComments',
- 'trailingComments',
- 'innerComments'
- ],
- n.LOGICAL_OPERATORS = [
- '||',
- '&&'
- ],
- n.UPDATE_OPERATORS = [
- '++',
- '--'
- ];
- var o = n.BOOLEAN_NUMBER_BINARY_OPERATORS = [
- '>',
- '<',
- '>=',
- '<='
- ],
- a = n.EQUALITY_BINARY_OPERATORS = [
- '==',
- '===',
- '!=',
- '!=='
- ],
- u = n.COMPARISON_BINARY_OPERATORS = [
- ].concat(a, [
- 'in',
- 'instanceof'
- ]),
- l = n.BOOLEAN_BINARY_OPERATORS = [
- ].concat(u, o),
- c = n.NUMBER_BINARY_OPERATORS = [
- '-',
- '/',
- '%',
- '*',
- '**',
- '&',
- '|',
- '>>',
- '>>>',
- '<<',
- '^'
- ],
- p = (n.BINARY_OPERATORS = [
- '+'
- ].concat(c, l), n.BOOLEAN_UNARY_OPERATORS = [
- 'delete',
- '!'
- ]),
- h = n.NUMBER_UNARY_OPERATORS = [
- '+',
- '-',
- '++',
- '--',
- '~'
- ],
- f = n.STRING_UNARY_OPERATORS = [
- 'typeof'
- ];
- n.UNARY_OPERATORS = [
- 'void'
- ].concat(p, h, f),
- n.INHERIT_KEYS = {
- optional: [
- 'typeAnnotation',
- 'typeParameters',
- 'returnType'
- ],
- force: [
- 'start',
- 'loc',
- 'end'
- ]
- },
- n.BLOCK_SCOPED_SYMBOL = (0, s.default) ('var used to be block scoped'),
- n.NOT_LOCAL_BINDING = (0, s.default) ('should not be considered a local binding')
- },
- {
- 'babel-runtime/core-js/symbol/for': 19
- }
- ],
- 23: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0;
- var r = l(e('babel-runtime/core-js/number/max-safe-integer')),
- i = l(e('babel-runtime/core-js/json/stringify')),
- s = l(e('babel-runtime/core-js/get-iterator'));
- n.toComputedKey = function (e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e.key || e.property;
- e.computed || u.isIdentifier(t) && (t = u.stringLiteral(t.name));
- return t
- },
- n.toSequenceExpression = function (e, t) {
- if (!e || !e.length) return;
- var n = [
- ],
- r = function e(t, n, r) {
- var i = [
- ];
- var o = !0;
- for (var a = t, l = Array.isArray(a), c = 0, a = l ? a : (0, s.default) (a); ; ) {
- var p;
- if (l) {
- if (c >= a.length) break;
- p = a[c++]
- } else {
- if ((c = a.next()).done) break;
- p = c.value
- }
- var h = p;
- if (o = !1, u.isExpression(h)) i.push(h);
- else if (u.isExpressionStatement(h)) i.push(h.expression);
- else if (u.isVariableDeclaration(h)) {
- if ('var' !== h.kind) return;
- for (var f = h.declarations, d = Array.isArray(f), m = 0, f = d ? f : (0, s.default) (f); ; ) {
- var g;
- if (d) {
- if (m >= f.length) break;
- g = f[m++]
- } else {
- if ((m = f.next()).done) break;
- g = m.value
- }
- var y = g,
- v = u.getBindingIdentifiers(y);
- for (var b in v) r.push({
- kind: h.kind,
- id: v[b]
- });
- y.init && i.push(u.assignmentExpression('=', y.id, y.init))
- }
- o = !0
- } else if (u.isIfStatement(h)) {
- var x = h.consequent ? e([h.consequent], n, r) : n.buildUndefinedNode(),
- A = h.alternate ? e([h.alternate], n, r) : n.buildUndefinedNode();
- if (!x || !A) return;
- i.push(u.conditionalExpression(h.test, x, A))
- } else if (u.isBlockStatement(h)) {
- var E = e(h.body, n, r);
- if (!E) return;
- i.push(E)
- } else {
- if (!u.isEmptyStatement(h)) return;
- o = !0
- }
- }
- o && i.push(n.buildUndefinedNode());
- return 1 === i.length ? i[0] : u.sequenceExpression(i)
- }(e, t, n);
- if (!r) return;
- for (var i = n, o = Array.isArray(i), a = 0, i = o ? i : (0, s.default) (i); ; ) {
- var l;
- if (o) {
- if (a >= i.length) break;
- l = i[a++]
- } else {
- if ((a = i.next()).done) break;
- l = a.value
- }
- var c = l;
- t.push(c)
- }
- return r
- },
- n.toKeyAlias = c,
- n.toIdentifier = p,
- n.toBindingIdentifierName = function (e) {
- 'eval' !== (e = p(e)) && 'arguments' !== e || (e = '_' + e);
- return e
- },
- n.toStatement = function (e, t) {
- if (u.isStatement(e)) return e;
- var n = !1,
- r = void 0;
- if (u.isClass(e)) n = !0,
- r = 'ClassDeclaration';
- else if (u.isFunction(e)) n = !0,
- r = 'FunctionDeclaration';
- else if (u.isAssignmentExpression(e)) return u.expressionStatement(e);
- n && !e.id && (r = !1);
- if (!r) {
- if (t) return !1;
- throw new Error('cannot turn ' + e.type + ' to a statement')
- }
- return e.type = r,
- e
- },
- n.toExpression = function (e) {
- u.isExpressionStatement(e) && (e = e.expression);
- if (u.isExpression(e)) return e;
- u.isClass(e) ? e.type = 'ClassExpression' : u.isFunction(e) && (e.type = 'FunctionExpression');
- if (!u.isExpression(e)) throw new Error('cannot turn ' + e.type + ' to an expression');
- return e
- },
- n.toBlock = function (e, t) {
- if (u.isBlockStatement(e)) return e;
- u.isEmptyStatement(e) && (e = [
- ]);
- Array.isArray(e) || (u.isStatement(e) || (e = u.isFunction(t) ? u.returnStatement(e) : u.expressionStatement(e)), e = [
- e
- ]);
- return u.blockStatement(e)
- },
- n.valueToNode = function (e) {
- if (void 0 === e) return u.identifier('undefined');
- if (!0 === e || !1 === e) return u.booleanLiteral(e);
- if (null === e) return u.nullLiteral();
- if ('string' == typeof e) return u.stringLiteral(e);
- if ('number' == typeof e) return u.numericLiteral(e);
- if ((0, a.default) (e)) {
- var t = e.source,
- n = e.toString().match(/\/([a-z]+|)$/) [1];
- return u.regExpLiteral(t, n)
- }
- if (Array.isArray(e)) return u.arrayExpression(e.map(u.valueToNode));
- if ((0, o.default) (e)) {
- var r = [
- ];
- for (var i in e) {
- var s = void 0;
- s = u.isValidIdentifier(i) ? u.identifier(i) : u.stringLiteral(i),
- r.push(u.objectProperty(s, u.valueToNode(e[i])))
- }
- return u.objectExpression(r)
- }
- throw new Error('don\'t know how to turn this value into a node')
- };
- var o = l(e('lodash/isPlainObject')),
- a = l(e('lodash/isRegExp')),
- u = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./index'));
- function l(e) {
- return e && e.__esModule ? e : {
- default:
- e
- }
- }
- function c(e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : e.key,
- n = void 0;
- return 'method' === e.kind ? c.increment() + '' : (n = u.isIdentifier(t) ? t.name : u.isStringLiteral(t) ? (0, i.default) (t.value) : (0, i.default) (u.removePropertiesDeep(u.cloneDeep(t))), e.computed && (n = '[' + n + ']'), e.static && (n = 'static:' + n), n)
- }
- function p(e) {
- return e = (e = (e = (e += '').replace(/[^a-zA-Z0-9$_]/g, '-')).replace(/^[-0-9]+/, '')).replace(/[-\s]+(.)?/g, function (e, t) {
- return t ? t.toUpperCase() : ''
- }),
- u.isValidIdentifier(e) || (e = '_' + e),
- e || '_'
- }
- c.uid = 0,
- c.increment = function () {
- return c.uid >= r.default ? c.uid = 0 : c.uid++
- }
- },
- {
- './index': 33,
- 'babel-runtime/core-js/get-iterator': 12,
- 'babel-runtime/core-js/json/stringify': 13,
- 'babel-runtime/core-js/number/max-safe-integer': 14,
- 'lodash/isPlainObject': 360,
- 'lodash/isRegExp': 361
- }
- ],
- 24: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('../index')),
- s = e('../constants'),
- o = e('./index'),
- a = (r = o) && r.__esModule ? r : {
- default:
- r
- };
- (0, a.default) ('ArrayExpression', {
- fields: {
- elements: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeOrValueType) ('null', 'Expression', 'SpreadElement'))),
- default:
- [
- ]
- }
- },
- visitor: [
- 'elements'
- ],
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('AssignmentExpression', {
- fields: {
- operator: {
- validate: (0, o.assertValueType) ('string')
- },
- left: {
- validate: (0, o.assertNodeType) ('LVal')
- },
- right: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- },
- builder: [
- 'operator',
- 'left',
- 'right'
- ],
- visitor: [
- 'left',
- 'right'
- ],
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('BinaryExpression', {
- builder: [
- 'operator',
- 'left',
- 'right'
- ],
- fields: {
- operator: {
- validate: o.assertOneOf.apply(void 0, s.BINARY_OPERATORS)
- },
- left: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- right: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- },
- visitor: [
- 'left',
- 'right'
- ],
- aliases: [
- 'Binary',
- 'Expression'
- ]
- }),
- (0, a.default) ('Directive', {
- visitor: [
- 'value'
- ],
- fields: {
- value: {
- validate: (0, o.assertNodeType) ('DirectiveLiteral')
- }
- }
- }),
- (0, a.default) ('DirectiveLiteral', {
- builder: [
- 'value'
- ],
- fields: {
- value: {
- validate: (0, o.assertValueType) ('string')
- }
- }
- }),
- (0, a.default) ('BlockStatement', {
- builder: [
- 'body',
- 'directives'
- ],
- visitor: [
- 'directives',
- 'body'
- ],
- fields: {
- directives: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Directive'))),
- default:
- [
- ]
- },
- body: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Statement')))
- }
- },
- aliases: [
- 'Scopable',
- 'BlockParent',
- 'Block',
- 'Statement'
- ]
- }),
- (0, a.default) ('BreakStatement', {
- visitor: [
- 'label'
- ],
- fields: {
- label: {
- validate: (0, o.assertNodeType) ('Identifier'),
- optional: !0
- }
- },
- aliases: [
- 'Statement',
- 'Terminatorless',
- 'CompletionStatement'
- ]
- }),
- (0, a.default) ('CallExpression', {
- visitor: [
- 'callee',
- 'arguments'
- ],
- fields: {
- callee: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- arguments: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Expression', 'SpreadElement')))
- }
- },
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('CatchClause', {
- visitor: [
- 'param',
- 'body'
- ],
- fields: {
- param: {
- validate: (0, o.assertNodeType) ('Identifier')
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement')
- }
- },
- aliases: [
- 'Scopable'
- ]
- }),
- (0, a.default) ('ConditionalExpression', {
- visitor: [
- 'test',
- 'consequent',
- 'alternate'
- ],
- fields: {
- test: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- consequent: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- alternate: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- },
- aliases: [
- 'Expression',
- 'Conditional'
- ]
- }),
- (0, a.default) ('ContinueStatement', {
- visitor: [
- 'label'
- ],
- fields: {
- label: {
- validate: (0, o.assertNodeType) ('Identifier'),
- optional: !0
- }
- },
- aliases: [
- 'Statement',
- 'Terminatorless',
- 'CompletionStatement'
- ]
- }),
- (0, a.default) ('DebuggerStatement', {
- aliases: [
- 'Statement'
- ]
- }),
- (0, a.default) ('DoWhileStatement', {
- visitor: [
- 'test',
- 'body'
- ],
- fields: {
- test: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, o.assertNodeType) ('Statement')
- }
- },
- aliases: [
- 'Statement',
- 'BlockParent',
- 'Loop',
- 'While',
- 'Scopable'
- ]
- }),
- (0, a.default) ('EmptyStatement', {
- aliases: [
- 'Statement'
- ]
- }),
- (0, a.default) ('ExpressionStatement', {
- visitor: [
- 'expression'
- ],
- fields: {
- expression: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- },
- aliases: [
- 'Statement',
- 'ExpressionWrapper'
- ]
- }),
- (0, a.default) ('File', {
- builder: [
- 'program',
- 'comments',
- 'tokens'
- ],
- visitor: [
- 'program'
- ],
- fields: {
- program: {
- validate: (0, o.assertNodeType) ('Program')
- }
- }
- }),
- (0, a.default) ('ForInStatement', {
- visitor: [
- 'left',
- 'right',
- 'body'
- ],
- aliases: [
- 'Scopable',
- 'Statement',
- 'For',
- 'BlockParent',
- 'Loop',
- 'ForXStatement'
- ],
- fields: {
- left: {
- validate: (0, o.assertNodeType) ('VariableDeclaration', 'LVal')
- },
- right: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, o.assertNodeType) ('Statement')
- }
- }
- }),
- (0, a.default) ('ForStatement', {
- visitor: [
- 'init',
- 'test',
- 'update',
- 'body'
- ],
- aliases: [
- 'Scopable',
- 'Statement',
- 'For',
- 'BlockParent',
- 'Loop'
- ],
- fields: {
- init: {
- validate: (0, o.assertNodeType) ('VariableDeclaration', 'Expression'),
- optional: !0
- },
- test: {
- validate: (0, o.assertNodeType) ('Expression'),
- optional: !0
- },
- update: {
- validate: (0, o.assertNodeType) ('Expression'),
- optional: !0
- },
- body: {
- validate: (0, o.assertNodeType) ('Statement')
- }
- }
- }),
- (0, a.default) ('FunctionDeclaration', {
- builder: [
- 'id',
- 'params',
- 'body',
- 'generator',
- 'async'
- ],
- visitor: [
- 'id',
- 'params',
- 'body',
- 'returnType',
- 'typeParameters'
- ],
- fields: {
- id: {
- validate: (0, o.assertNodeType) ('Identifier')
- },
- params: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('LVal')))
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement')
- },
- generator: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- },
- async: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- }
- },
- aliases: [
- 'Scopable',
- 'Function',
- 'BlockParent',
- 'FunctionParent',
- 'Statement',
- 'Pureish',
- 'Declaration'
- ]
- }),
- (0, a.default) ('FunctionExpression', {
- inherits: 'FunctionDeclaration',
- aliases: [
- 'Scopable',
- 'Function',
- 'BlockParent',
- 'FunctionParent',
- 'Expression',
- 'Pureish'
- ],
- fields: {
- id: {
- validate: (0, o.assertNodeType) ('Identifier'),
- optional: !0
- },
- params: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('LVal')))
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement')
- },
- generator: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- },
- async: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- }
- }
- }),
- (0, a.default) ('Identifier', {
- builder: [
- 'name'
- ],
- visitor: [
- 'typeAnnotation'
- ],
- aliases: [
- 'Expression',
- 'LVal'
- ],
- fields: {
- name: {
- validate: function (e, t, n) {
- i.isValidIdentifier(n)
- }
- },
- decorators: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, a.default) ('IfStatement', {
- visitor: [
- 'test',
- 'consequent',
- 'alternate'
- ],
- aliases: [
- 'Statement',
- 'Conditional'
- ],
- fields: {
- test: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- consequent: {
- validate: (0, o.assertNodeType) ('Statement')
- },
- alternate: {
- optional: !0,
- validate: (0, o.assertNodeType) ('Statement')
- }
- }
- }),
- (0, a.default) ('LabeledStatement', {
- visitor: [
- 'label',
- 'body'
- ],
- aliases: [
- 'Statement'
- ],
- fields: {
- label: {
- validate: (0, o.assertNodeType) ('Identifier')
- },
- body: {
- validate: (0, o.assertNodeType) ('Statement')
- }
- }
- }),
- (0, a.default) ('StringLiteral', {
- builder: [
- 'value'
- ],
- fields: {
- value: {
- validate: (0, o.assertValueType) ('string')
- }
- },
- aliases: [
- 'Expression',
- 'Pureish',
- 'Literal',
- 'Immutable'
- ]
- }),
- (0, a.default) ('NumericLiteral', {
- builder: [
- 'value'
- ],
- deprecatedAlias: 'NumberLiteral',
- fields: {
- value: {
- validate: (0, o.assertValueType) ('number')
- }
- },
- aliases: [
- 'Expression',
- 'Pureish',
- 'Literal',
- 'Immutable'
- ]
- }),
- (0, a.default) ('NullLiteral', {
- aliases: [
- 'Expression',
- 'Pureish',
- 'Literal',
- 'Immutable'
- ]
- }),
- (0, a.default) ('BooleanLiteral', {
- builder: [
- 'value'
- ],
- fields: {
- value: {
- validate: (0, o.assertValueType) ('boolean')
- }
- },
- aliases: [
- 'Expression',
- 'Pureish',
- 'Literal',
- 'Immutable'
- ]
- }),
- (0, a.default) ('RegExpLiteral', {
- builder: [
- 'pattern',
- 'flags'
- ],
- deprecatedAlias: 'RegexLiteral',
- aliases: [
- 'Expression',
- 'Literal'
- ],
- fields: {
- pattern: {
- validate: (0, o.assertValueType) ('string')
- },
- flags: {
- validate: (0, o.assertValueType) ('string'),
- default:
- ''
- }
- }
- }),
- (0, a.default) ('LogicalExpression', {
- builder: [
- 'operator',
- 'left',
- 'right'
- ],
- visitor: [
- 'left',
- 'right'
- ],
- aliases: [
- 'Binary',
- 'Expression'
- ],
- fields: {
- operator: {
- validate: o.assertOneOf.apply(void 0, s.LOGICAL_OPERATORS)
- },
- left: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- right: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- }
- }),
- (0, a.default) ('MemberExpression', {
- builder: [
- 'object',
- 'property',
- 'computed'
- ],
- visitor: [
- 'object',
- 'property'
- ],
- aliases: [
- 'Expression',
- 'LVal'
- ],
- fields: {
- object: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- property: {
- validate: function (e, t, n) {
- var r = e.computed ? 'Expression' : 'Identifier';
- (0, o.assertNodeType) (r) (e, t, n)
- }
- },
- computed: {
- default:
- !1
- }
- }
- }),
- (0, a.default) ('NewExpression', {
- visitor: [
- 'callee',
- 'arguments'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- callee: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- arguments: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Expression', 'SpreadElement')))
- }
- }
- }),
- (0, a.default) ('Program', {
- visitor: [
- 'directives',
- 'body'
- ],
- builder: [
- 'body',
- 'directives'
- ],
- fields: {
- directives: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Directive'))),
- default:
- [
- ]
- },
- body: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Statement')))
- }
- },
- aliases: [
- 'Scopable',
- 'BlockParent',
- 'Block',
- 'FunctionParent'
- ]
- }),
- (0, a.default) ('ObjectExpression', {
- visitor: [
- 'properties'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- properties: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('ObjectMethod', 'ObjectProperty', 'SpreadProperty')))
- }
- }
- }),
- (0, a.default) ('ObjectMethod', {
- builder: [
- 'kind',
- 'key',
- 'params',
- 'body',
- 'computed'
- ],
- fields: {
- kind: {
- validate: (0, o.chain) ((0, o.assertValueType) ('string'), (0, o.assertOneOf) ('method', 'get', 'set')),
- default:
- 'method'
- },
- computed: {
- validate: (0, o.assertValueType) ('boolean'),
- default:
- !1
- },
- key: {
- validate: function (e, t, n) {
- var r = e.computed ? [
- 'Expression'
- ] : [
- 'Identifier',
- 'StringLiteral',
- 'NumericLiteral'
- ];
- o.assertNodeType.apply(void 0, r) (e, t, n)
- }
- },
- decorators: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Decorator')))
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement')
- },
- generator: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- },
- async: {
- default:
- !1,
- validate: (0, o.assertValueType) ('boolean')
- }
- },
- visitor: [
- 'key',
- 'params',
- 'body',
- 'decorators',
- 'returnType',
- 'typeParameters'
- ],
- aliases: [
- 'UserWhitespacable',
- 'Function',
- 'Scopable',
- 'BlockParent',
- 'FunctionParent',
- 'Method',
- 'ObjectMember'
- ]
- }),
- (0, a.default) ('ObjectProperty', {
- builder: [
- 'key',
- 'value',
- 'computed',
- 'shorthand',
- 'decorators'
- ],
- fields: {
- computed: {
- validate: (0, o.assertValueType) ('boolean'),
- default:
- !1
- },
- key: {
- validate: function (e, t, n) {
- var r = e.computed ? [
- 'Expression'
- ] : [
- 'Identifier',
- 'StringLiteral',
- 'NumericLiteral'
- ];
- o.assertNodeType.apply(void 0, r) (e, t, n)
- }
- },
- value: {
- validate: (0, o.assertNodeType) ('Expression', 'Pattern', 'RestElement')
- },
- shorthand: {
- validate: (0, o.assertValueType) ('boolean'),
- default:
- !1
- },
- decorators: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Decorator'))),
- optional: !0
- }
- },
- visitor: [
- 'key',
- 'value',
- 'decorators'
- ],
- aliases: [
- 'UserWhitespacable',
- 'Property',
- 'ObjectMember'
- ]
- }),
- (0, a.default) ('RestElement', {
- visitor: [
- 'argument',
- 'typeAnnotation'
- ],
- aliases: [
- 'LVal'
- ],
- fields: {
- argument: {
- validate: (0, o.assertNodeType) ('LVal')
- },
- decorators: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, a.default) ('ReturnStatement', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Statement',
- 'Terminatorless',
- 'CompletionStatement'
- ],
- fields: {
- argument: {
- validate: (0, o.assertNodeType) ('Expression'),
- optional: !0
- }
- }
- }),
- (0, a.default) ('SequenceExpression', {
- visitor: [
- 'expressions'
- ],
- fields: {
- expressions: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Expression')))
- }
- },
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('SwitchCase', {
- visitor: [
- 'test',
- 'consequent'
- ],
- fields: {
- test: {
- validate: (0, o.assertNodeType) ('Expression'),
- optional: !0
- },
- consequent: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('Statement')))
- }
- }
- }),
- (0, a.default) ('SwitchStatement', {
- visitor: [
- 'discriminant',
- 'cases'
- ],
- aliases: [
- 'Statement',
- 'BlockParent',
- 'Scopable'
- ],
- fields: {
- discriminant: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- cases: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('SwitchCase')))
- }
- }
- }),
- (0, a.default) ('ThisExpression', {
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('ThrowStatement', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Statement',
- 'Terminatorless',
- 'CompletionStatement'
- ],
- fields: {
- argument: {
- validate: (0, o.assertNodeType) ('Expression')
- }
- }
- }),
- (0, a.default) ('TryStatement', {
- visitor: [
- 'block',
- 'handler',
- 'finalizer'
- ],
- aliases: [
- 'Statement'
- ],
- fields: {
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement')
- },
- handler: {
- optional: !0,
- handler: (0, o.assertNodeType) ('BlockStatement')
- },
- finalizer: {
- optional: !0,
- validate: (0, o.assertNodeType) ('BlockStatement')
- }
- }
- }),
- (0, a.default) ('UnaryExpression', {
- builder: [
- 'operator',
- 'argument',
- 'prefix'
- ],
- fields: {
- prefix: {
- default:
- !0
- },
- argument: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- operator: {
- validate: o.assertOneOf.apply(void 0, s.UNARY_OPERATORS)
- }
- },
- visitor: [
- 'argument'
- ],
- aliases: [
- 'UnaryLike',
- 'Expression'
- ]
- }),
- (0, a.default) ('UpdateExpression', {
- builder: [
- 'operator',
- 'argument',
- 'prefix'
- ],
- fields: {
- prefix: {
- default:
- !1
- },
- argument: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- operator: {
- validate: o.assertOneOf.apply(void 0, s.UPDATE_OPERATORS)
- }
- },
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Expression'
- ]
- }),
- (0, a.default) ('VariableDeclaration', {
- builder: [
- 'kind',
- 'declarations'
- ],
- visitor: [
- 'declarations'
- ],
- aliases: [
- 'Statement',
- 'Declaration'
- ],
- fields: {
- kind: {
- validate: (0, o.chain) ((0, o.assertValueType) ('string'), (0, o.assertOneOf) ('var', 'let', 'const'))
- },
- declarations: {
- validate: (0, o.chain) ((0, o.assertValueType) ('array'), (0, o.assertEach) ((0, o.assertNodeType) ('VariableDeclarator')))
- }
- }
- }),
- (0, a.default) ('VariableDeclarator', {
- visitor: [
- 'id',
- 'init'
- ],
- fields: {
- id: {
- validate: (0, o.assertNodeType) ('LVal')
- },
- init: {
- optional: !0,
- validate: (0, o.assertNodeType) ('Expression')
- }
- }
- }),
- (0, a.default) ('WhileStatement', {
- visitor: [
- 'test',
- 'body'
- ],
- aliases: [
- 'Statement',
- 'BlockParent',
- 'Loop',
- 'While',
- 'Scopable'
- ],
- fields: {
- test: {
- validate: (0, o.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement', 'Statement')
- }
- }
- }),
- (0, a.default) ('WithStatement', {
- visitor: [
- 'object',
- 'body'
- ],
- aliases: [
- 'Statement'
- ],
- fields: {
- object: {
- object: (0, o.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, o.assertNodeType) ('BlockStatement', 'Statement')
- }
- }
- })
- },
- {
- '../constants': 22,
- '../index': 33,
- './index': 28
- }
- ],
- 25: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = e('./index'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- (0, s.default) ('AssignmentPattern', {
- visitor: [
- 'left',
- 'right'
- ],
- aliases: [
- 'Pattern',
- 'LVal'
- ],
- fields: {
- left: {
- validate: (0, i.assertNodeType) ('Identifier')
- },
- right: {
- validate: (0, i.assertNodeType) ('Expression')
- },
- decorators: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, s.default) ('ArrayPattern', {
- visitor: [
- 'elements',
- 'typeAnnotation'
- ],
- aliases: [
- 'Pattern',
- 'LVal'
- ],
- fields: {
- elements: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Identifier', 'Pattern', 'RestElement')))
- },
- decorators: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, s.default) ('ArrowFunctionExpression', {
- builder: [
- 'params',
- 'body',
- 'async'
- ],
- visitor: [
- 'params',
- 'body',
- 'returnType',
- 'typeParameters'
- ],
- aliases: [
- 'Scopable',
- 'Function',
- 'BlockParent',
- 'FunctionParent',
- 'Expression',
- 'Pureish'
- ],
- fields: {
- params: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('LVal')))
- },
- body: {
- validate: (0, i.assertNodeType) ('BlockStatement', 'Expression')
- },
- async: {
- validate: (0, i.assertValueType) ('boolean'),
- default:
- !1
- }
- }
- }),
- (0, s.default) ('ClassBody', {
- visitor: [
- 'body'
- ],
- fields: {
- body: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('ClassMethod', 'ClassProperty')))
- }
- }
- }),
- (0, s.default) ('ClassDeclaration', {
- builder: [
- 'id',
- 'superClass',
- 'body',
- 'decorators'
- ],
- visitor: [
- 'id',
- 'body',
- 'superClass',
- 'mixins',
- 'typeParameters',
- 'superTypeParameters',
- 'implements',
- 'decorators'
- ],
- aliases: [
- 'Scopable',
- 'Class',
- 'Statement',
- 'Declaration',
- 'Pureish'
- ],
- fields: {
- id: {
- validate: (0, i.assertNodeType) ('Identifier')
- },
- body: {
- validate: (0, i.assertNodeType) ('ClassBody')
- },
- superClass: {
- optional: !0,
- validate: (0, i.assertNodeType) ('Expression')
- },
- decorators: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, s.default) ('ClassExpression', {
- inherits: 'ClassDeclaration',
- aliases: [
- 'Scopable',
- 'Class',
- 'Expression',
- 'Pureish'
- ],
- fields: {
- id: {
- optional: !0,
- validate: (0, i.assertNodeType) ('Identifier')
- },
- body: {
- validate: (0, i.assertNodeType) ('ClassBody')
- },
- superClass: {
- optional: !0,
- validate: (0, i.assertNodeType) ('Expression')
- },
- decorators: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, s.default) ('ExportAllDeclaration', {
- visitor: [
- 'source'
- ],
- aliases: [
- 'Statement',
- 'Declaration',
- 'ModuleDeclaration',
- 'ExportDeclaration'
- ],
- fields: {
- source: {
- validate: (0, i.assertNodeType) ('StringLiteral')
- }
- }
- }),
- (0, s.default) ('ExportDefaultDeclaration', {
- visitor: [
- 'declaration'
- ],
- aliases: [
- 'Statement',
- 'Declaration',
- 'ModuleDeclaration',
- 'ExportDeclaration'
- ],
- fields: {
- declaration: {
- validate: (0, i.assertNodeType) ('FunctionDeclaration', 'ClassDeclaration', 'Expression')
- }
- }
- }),
- (0, s.default) ('ExportNamedDeclaration', {
- visitor: [
- 'declaration',
- 'specifiers',
- 'source'
- ],
- aliases: [
- 'Statement',
- 'Declaration',
- 'ModuleDeclaration',
- 'ExportDeclaration'
- ],
- fields: {
- declaration: {
- validate: (0, i.assertNodeType) ('Declaration'),
- optional: !0
- },
- specifiers: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('ExportSpecifier')))
- },
- source: {
- validate: (0, i.assertNodeType) ('StringLiteral'),
- optional: !0
- }
- }
- }),
- (0, s.default) ('ExportSpecifier', {
- visitor: [
- 'local',
- 'exported'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- local: {
- validate: (0, i.assertNodeType) ('Identifier')
- },
- exported: {
- validate: (0, i.assertNodeType) ('Identifier')
- }
- }
- }),
- (0, s.default) ('ForOfStatement', {
- visitor: [
- 'left',
- 'right',
- 'body'
- ],
- aliases: [
- 'Scopable',
- 'Statement',
- 'For',
- 'BlockParent',
- 'Loop',
- 'ForXStatement'
- ],
- fields: {
- left: {
- validate: (0, i.assertNodeType) ('VariableDeclaration', 'LVal')
- },
- right: {
- validate: (0, i.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, i.assertNodeType) ('Statement')
- }
- }
- }),
- (0, s.default) ('ImportDeclaration', {
- visitor: [
- 'specifiers',
- 'source'
- ],
- aliases: [
- 'Statement',
- 'Declaration',
- 'ModuleDeclaration'
- ],
- fields: {
- specifiers: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('ImportSpecifier', 'ImportDefaultSpecifier', 'ImportNamespaceSpecifier')))
- },
- source: {
- validate: (0, i.assertNodeType) ('StringLiteral')
- }
- }
- }),
- (0, s.default) ('ImportDefaultSpecifier', {
- visitor: [
- 'local'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- local: {
- validate: (0, i.assertNodeType) ('Identifier')
- }
- }
- }),
- (0, s.default) ('ImportNamespaceSpecifier', {
- visitor: [
- 'local'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- local: {
- validate: (0, i.assertNodeType) ('Identifier')
- }
- }
- }),
- (0, s.default) ('ImportSpecifier', {
- visitor: [
- 'local',
- 'imported'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- local: {
- validate: (0, i.assertNodeType) ('Identifier')
- },
- imported: {
- validate: (0, i.assertNodeType) ('Identifier')
- },
- importKind: {
- validate: (0, i.assertOneOf) (null, 'type', 'typeof')
- }
- }
- }),
- (0, s.default) ('MetaProperty', {
- visitor: [
- 'meta',
- 'property'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- meta: {
- validate: (0, i.assertValueType) ('string')
- },
- property: {
- validate: (0, i.assertValueType) ('string')
- }
- }
- }),
- (0, s.default) ('ClassMethod', {
- aliases: [
- 'Function',
- 'Scopable',
- 'BlockParent',
- 'FunctionParent',
- 'Method'
- ],
- builder: [
- 'kind',
- 'key',
- 'params',
- 'body',
- 'computed',
- 'static'
- ],
- visitor: [
- 'key',
- 'params',
- 'body',
- 'decorators',
- 'returnType',
- 'typeParameters'
- ],
- fields: {
- kind: {
- validate: (0, i.chain) ((0, i.assertValueType) ('string'), (0, i.assertOneOf) ('get', 'set', 'method', 'constructor')),
- default:
- 'method'
- },
- computed: {
- default:
- !1,
- validate: (0, i.assertValueType) ('boolean')
- },
- static: {
- default:
- !1,
- validate: (0, i.assertValueType) ('boolean')
- },
- key: {
- validate: function (e, t, n) {
- var r = e.computed ? [
- 'Expression'
- ] : [
- 'Identifier',
- 'StringLiteral',
- 'NumericLiteral'
- ];
- i.assertNodeType.apply(void 0, r) (e, t, n)
- }
- },
- params: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('LVal')))
- },
- body: {
- validate: (0, i.assertNodeType) ('BlockStatement')
- },
- generator: {
- default:
- !1,
- validate: (0, i.assertValueType) ('boolean')
- },
- async: {
- default:
- !1,
- validate: (0, i.assertValueType) ('boolean')
- }
- }
- }),
- (0, s.default) ('ObjectPattern', {
- visitor: [
- 'properties',
- 'typeAnnotation'
- ],
- aliases: [
- 'Pattern',
- 'LVal'
- ],
- fields: {
- properties: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('RestProperty', 'Property')))
- },
- decorators: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Decorator')))
- }
- }
- }),
- (0, s.default) ('SpreadElement', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'UnaryLike'
- ],
- fields: {
- argument: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('Super', {
- aliases: [
- 'Expression'
- ]
- }),
- (0, s.default) ('TaggedTemplateExpression', {
- visitor: [
- 'tag',
- 'quasi'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- tag: {
- validate: (0, i.assertNodeType) ('Expression')
- },
- quasi: {
- validate: (0, i.assertNodeType) ('TemplateLiteral')
- }
- }
- }),
- (0, s.default) ('TemplateElement', {
- builder: [
- 'value',
- 'tail'
- ],
- fields: {
- value: {
- },
- tail: {
- validate: (0, i.assertValueType) ('boolean'),
- default:
- !1
- }
- }
- }),
- (0, s.default) ('TemplateLiteral', {
- visitor: [
- 'quasis',
- 'expressions'
- ],
- aliases: [
- 'Expression',
- 'Literal'
- ],
- fields: {
- quasis: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('TemplateElement')))
- },
- expressions: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('Expression')))
- }
- }
- }),
- (0, s.default) ('YieldExpression', {
- builder: [
- 'argument',
- 'delegate'
- ],
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Expression',
- 'Terminatorless'
- ],
- fields: {
- delegate: {
- validate: (0, i.assertValueType) ('boolean'),
- default:
- !1
- },
- argument: {
- optional: !0,
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- })
- },
- {
- './index': 28
- }
- ],
- 26: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = e('./index'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- (0, s.default) ('AwaitExpression', {
- builder: [
- 'argument'
- ],
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Expression',
- 'Terminatorless'
- ],
- fields: {
- argument: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('ForAwaitStatement', {
- visitor: [
- 'left',
- 'right',
- 'body'
- ],
- aliases: [
- 'Scopable',
- 'Statement',
- 'For',
- 'BlockParent',
- 'Loop',
- 'ForXStatement'
- ],
- fields: {
- left: {
- validate: (0, i.assertNodeType) ('VariableDeclaration', 'LVal')
- },
- right: {
- validate: (0, i.assertNodeType) ('Expression')
- },
- body: {
- validate: (0, i.assertNodeType) ('Statement')
- }
- }
- }),
- (0, s.default) ('BindExpression', {
- visitor: [
- 'object',
- 'callee'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- }
- }),
- (0, s.default) ('Import', {
- aliases: [
- 'Expression'
- ]
- }),
- (0, s.default) ('Decorator', {
- visitor: [
- 'expression'
- ],
- fields: {
- expression: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('DoExpression', {
- visitor: [
- 'body'
- ],
- aliases: [
- 'Expression'
- ],
- fields: {
- body: {
- validate: (0, i.assertNodeType) ('BlockStatement')
- }
- }
- }),
- (0, s.default) ('ExportDefaultSpecifier', {
- visitor: [
- 'exported'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- exported: {
- validate: (0, i.assertNodeType) ('Identifier')
- }
- }
- }),
- (0, s.default) ('ExportNamespaceSpecifier', {
- visitor: [
- 'exported'
- ],
- aliases: [
- 'ModuleSpecifier'
- ],
- fields: {
- exported: {
- validate: (0, i.assertNodeType) ('Identifier')
- }
- }
- }),
- (0, s.default) ('RestProperty', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'UnaryLike'
- ],
- fields: {
- argument: {
- validate: (0, i.assertNodeType) ('LVal')
- }
- }
- }),
- (0, s.default) ('SpreadProperty', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'UnaryLike'
- ],
- fields: {
- argument: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- })
- },
- {
- './index': 28
- }
- ],
- 27: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = e('./index'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- (0, s.default) ('AnyTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ArrayTypeAnnotation', {
- visitor: [
- 'elementType'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('BooleanTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('BooleanLiteralTypeAnnotation', {
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('NullLiteralTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ClassImplements', {
- visitor: [
- 'id',
- 'typeParameters'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ClassProperty', {
- visitor: [
- 'key',
- 'value',
- 'typeAnnotation',
- 'decorators'
- ],
- builder: [
- 'key',
- 'value',
- 'typeAnnotation',
- 'decorators',
- 'computed'
- ],
- aliases: [
- 'Property'
- ],
- fields: {
- computed: {
- validate: (0, i.assertValueType) ('boolean'),
- default:
- !1
- }
- }
- }),
- (0, s.default) ('DeclareClass', {
- visitor: [
- 'id',
- 'typeParameters',
- 'extends',
- 'body'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareFunction', {
- visitor: [
- 'id'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareInterface', {
- visitor: [
- 'id',
- 'typeParameters',
- 'extends',
- 'body'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareModule', {
- visitor: [
- 'id',
- 'body'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareModuleExports', {
- visitor: [
- 'typeAnnotation'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareTypeAlias', {
- visitor: [
- 'id',
- 'typeParameters',
- 'right'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareOpaqueType', {
- visitor: [
- 'id',
- 'typeParameters',
- 'supertype'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareVariable', {
- visitor: [
- 'id'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('DeclareExportDeclaration', {
- visitor: [
- 'declaration',
- 'specifiers',
- 'source'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ExistentialTypeParam', {
- aliases: [
- 'Flow'
- ]
- }),
- (0, s.default) ('FunctionTypeAnnotation', {
- visitor: [
- 'typeParameters',
- 'params',
- 'rest',
- 'returnType'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('FunctionTypeParam', {
- visitor: [
- 'name',
- 'typeAnnotation'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('GenericTypeAnnotation', {
- visitor: [
- 'id',
- 'typeParameters'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('InterfaceExtends', {
- visitor: [
- 'id',
- 'typeParameters'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('InterfaceDeclaration', {
- visitor: [
- 'id',
- 'typeParameters',
- 'extends',
- 'body'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('IntersectionTypeAnnotation', {
- visitor: [
- 'types'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('MixedTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ]
- }),
- (0, s.default) ('EmptyTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ]
- }),
- (0, s.default) ('NullableTypeAnnotation', {
- visitor: [
- 'typeAnnotation'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('NumericLiteralTypeAnnotation', {
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('NumberTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('StringLiteralTypeAnnotation', {
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('StringTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ThisTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TupleTypeAnnotation', {
- visitor: [
- 'types'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeofTypeAnnotation', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeAlias', {
- visitor: [
- 'id',
- 'typeParameters',
- 'right'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('OpaqueType', {
- visitor: [
- 'id',
- 'typeParameters',
- 'impltype',
- 'supertype'
- ],
- aliases: [
- 'Flow',
- 'FlowDeclaration',
- 'Statement',
- 'Declaration'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeAnnotation', {
- visitor: [
- 'typeAnnotation'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeCastExpression', {
- visitor: [
- 'expression',
- 'typeAnnotation'
- ],
- aliases: [
- 'Flow',
- 'ExpressionWrapper',
- 'Expression'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeParameter', {
- visitor: [
- 'bound'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeParameterDeclaration', {
- visitor: [
- 'params'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('TypeParameterInstantiation', {
- visitor: [
- 'params'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ObjectTypeAnnotation', {
- visitor: [
- 'properties',
- 'indexers',
- 'callProperties'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ObjectTypeCallProperty', {
- visitor: [
- 'value'
- ],
- aliases: [
- 'Flow',
- 'UserWhitespacable'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ObjectTypeIndexer', {
- visitor: [
- 'id',
- 'key',
- 'value'
- ],
- aliases: [
- 'Flow',
- 'UserWhitespacable'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ObjectTypeProperty', {
- visitor: [
- 'key',
- 'value'
- ],
- aliases: [
- 'Flow',
- 'UserWhitespacable'
- ],
- fields: {
- }
- }),
- (0, s.default) ('ObjectTypeSpreadProperty', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'Flow',
- 'UserWhitespacable'
- ],
- fields: {
- }
- }),
- (0, s.default) ('QualifiedTypeIdentifier', {
- visitor: [
- 'id',
- 'qualification'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('UnionTypeAnnotation', {
- visitor: [
- 'types'
- ],
- aliases: [
- 'Flow'
- ],
- fields: {
- }
- }),
- (0, s.default) ('VoidTypeAnnotation', {
- aliases: [
- 'Flow',
- 'FlowBaseAnnotation'
- ],
- fields: {
- }
- })
- },
- {
- './index': 28
- }
- ],
- 28: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.DEPRECATED_KEYS = n.BUILDER_KEYS = n.NODE_FIELDS = n.ALIAS_KEYS = n.VISITOR_KEYS = void 0;
- var r = a(e('babel-runtime/core-js/get-iterator')),
- i = a(e('babel-runtime/core-js/json/stringify')),
- s = a(e('babel-runtime/helpers/typeof'));
- n.assertEach = function (e) {
- function t(t, n, r) {
- if (Array.isArray(r)) for (var i = 0; i < r.length; i++) e(t, n + '[' + i + ']', r[i])
- }
- return t.each = e,
- t
- },
- n.assertOneOf = function () {
- for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- function r(e, n, r) {
- if (t.indexOf(r) < 0) throw new TypeError('Property ' + n + ' expected value to be one of ' + (0, i.default) (t) + ' but got ' + (0, i.default) (r))
- }
- return r.oneOf = t,
- r
- },
- n.assertNodeType = function () {
- for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- function s(e, n, s) {
- for (var a = !1, u = t, l = Array.isArray(u), c = 0, u = l ? u : (0, r.default) (u); ; ) {
- var p;
- if (l) {
- if (c >= u.length) break;
- p = u[c++]
- } else {
- if ((c = u.next()).done) break;
- p = c.value
- }
- var h = p;
- if (o.is(h, s)) {
- a = !0;
- break
- }
- }
- if (!a) throw new TypeError('Property ' + n + ' of ' + e.type + ' expected node to be of a type ' + (0, i.default) (t) + ' but instead got ' + (0, i.default) (s && s.type))
- }
- return s.oneOfNodeTypes = t,
- s
- },
- n.assertNodeOrValueType = function () {
- for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- function s(e, n, s) {
- for (var a = !1, u = t, l = Array.isArray(u), c = 0, u = l ? u : (0, r.default) (u); ; ) {
- var p;
- if (l) {
- if (c >= u.length) break;
- p = u[c++]
- } else {
- if ((c = u.next()).done) break;
- p = c.value
- }
- var h = p;
- if (f(s) === h || o.is(h, s)) {
- a = !0;
- break
- }
- }
- if (!a) throw new TypeError('Property ' + n + ' of ' + e.type + ' expected node to be of a type ' + (0, i.default) (t) + ' but instead got ' + (0, i.default) (s && s.type))
- }
- return s.oneOfNodeOrValueTypes = t,
- s
- },
- n.assertValueType = d,
- n.chain = function () {
- for (var e = arguments.length, t = Array(e), n = 0; n < e; n++) t[n] = arguments[n];
- function i() {
- for (var e = t, n = Array.isArray(e), i = 0, e = n ? e : (0, r.default) (e); ; ) {
- var s;
- if (n) {
- if (i >= e.length) break;
- s = e[i++]
- } else {
- if ((i = e.next()).done) break;
- s = i.value
- }
- var o = s;
- o.apply(void 0, arguments)
- }
- }
- return i.chainOf = t,
- i
- },
- n.default = function (e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
- },
- n = t.inherits && m[t.inherits] || {
- };
- t.fields = t.fields || n.fields || {
- },
- t.visitor = t.visitor || n.visitor || [
- ],
- t.aliases = t.aliases || n.aliases || [
- ],
- t.builder = t.builder || n.builder || t.visitor || [
- ],
- t.deprecatedAlias && (h[t.deprecatedAlias] = e);
- for (var i = t.visitor.concat(t.builder), s = Array.isArray(i), o = 0, i = s ? i : (0, r.default) (i); ; ) {
- var a;
- if (s) {
- if (o >= i.length) break;
- a = i[o++]
- } else {
- if ((o = i.next()).done) break;
- a = o.value
- }
- var g = a;
- t.fields[g] = t.fields[g] || {
- }
- }
- for (var y in t.fields) {
- var v = t.fields[y];
- - 1 === t.builder.indexOf(y) && (v.optional = !0),
- void 0 === v.default ? v.default = null : v.validate || (v.validate = d(f(v.default)))
- }
- u[e] = t.visitor,
- p[e] = t.builder,
- c[e] = t.fields,
- l[e] = t.aliases,
- m[e] = t
- };
- var o = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('../index'));
- function a(e) {
- return e && e.__esModule ? e : {
- default:
- e
- }
- }
- var u = n.VISITOR_KEYS = {
- },
- l = n.ALIAS_KEYS = {
- },
- c = n.NODE_FIELDS = {
- },
- p = n.BUILDER_KEYS = {
- },
- h = n.DEPRECATED_KEYS = {
- };
- function f(e) {
- return Array.isArray(e) ? 'array' : null === e ? 'null' : void 0 === e ? 'undefined' : void 0 === e ? 'undefined' : (0, s.default) (e)
- }
- function d(e) {
- function t(t, n, r) {
- if (!(f(r) === e)) throw new TypeError('Property ' + n + ' expected type of ' + e + ' but got ' + f(r))
- }
- return t.type = e,
- t
- }
- var m = {
- }
- },
- {
- '../index': 33,
- 'babel-runtime/core-js/get-iterator': 12,
- 'babel-runtime/core-js/json/stringify': 13,
- 'babel-runtime/helpers/typeof': 21
- }
- ],
- 29: [
- function (e, t, n) {
- 'use strict';
- e('./index'),
- e('./core'),
- e('./es2015'),
- e('./flow'),
- e('./jsx'),
- e('./misc'),
- e('./experimental')
- },
- {
- './core': 24,
- './es2015': 25,
- './experimental': 26,
- './flow': 27,
- './index': 28,
- './jsx': 30,
- './misc': 31
- }
- ],
- 30: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = e('./index'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- (0, s.default) ('JSXAttribute', {
- visitor: [
- 'name',
- 'value'
- ],
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- fields: {
- name: {
- validate: (0, i.assertNodeType) ('JSXIdentifier', 'JSXNamespacedName')
- },
- value: {
- optional: !0,
- validate: (0, i.assertNodeType) ('JSXElement', 'StringLiteral', 'JSXExpressionContainer')
- }
- }
- }),
- (0, s.default) ('JSXClosingElement', {
- visitor: [
- 'name'
- ],
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- fields: {
- name: {
- validate: (0, i.assertNodeType) ('JSXIdentifier', 'JSXMemberExpression')
- }
- }
- }),
- (0, s.default) ('JSXElement', {
- builder: [
- 'openingElement',
- 'closingElement',
- 'children',
- 'selfClosing'
- ],
- visitor: [
- 'openingElement',
- 'children',
- 'closingElement'
- ],
- aliases: [
- 'JSX',
- 'Immutable',
- 'Expression'
- ],
- fields: {
- openingElement: {
- validate: (0, i.assertNodeType) ('JSXOpeningElement')
- },
- closingElement: {
- optional: !0,
- validate: (0, i.assertNodeType) ('JSXClosingElement')
- },
- children: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('JSXText', 'JSXExpressionContainer', 'JSXSpreadChild', 'JSXElement')))
- }
- }
- }),
- (0, s.default) ('JSXEmptyExpression', {
- aliases: [
- 'JSX',
- 'Expression'
- ]
- }),
- (0, s.default) ('JSXExpressionContainer', {
- visitor: [
- 'expression'
- ],
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- fields: {
- expression: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('JSXSpreadChild', {
- visitor: [
- 'expression'
- ],
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- fields: {
- expression: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('JSXIdentifier', {
- builder: [
- 'name'
- ],
- aliases: [
- 'JSX',
- 'Expression'
- ],
- fields: {
- name: {
- validate: (0, i.assertValueType) ('string')
- }
- }
- }),
- (0, s.default) ('JSXMemberExpression', {
- visitor: [
- 'object',
- 'property'
- ],
- aliases: [
- 'JSX',
- 'Expression'
- ],
- fields: {
- object: {
- validate: (0, i.assertNodeType) ('JSXMemberExpression', 'JSXIdentifier')
- },
- property: {
- validate: (0, i.assertNodeType) ('JSXIdentifier')
- }
- }
- }),
- (0, s.default) ('JSXNamespacedName', {
- visitor: [
- 'namespace',
- 'name'
- ],
- aliases: [
- 'JSX'
- ],
- fields: {
- namespace: {
- validate: (0, i.assertNodeType) ('JSXIdentifier')
- },
- name: {
- validate: (0, i.assertNodeType) ('JSXIdentifier')
- }
- }
- }),
- (0, s.default) ('JSXOpeningElement', {
- builder: [
- 'name',
- 'attributes',
- 'selfClosing'
- ],
- visitor: [
- 'name',
- 'attributes'
- ],
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- fields: {
- name: {
- validate: (0, i.assertNodeType) ('JSXIdentifier', 'JSXMemberExpression')
- },
- selfClosing: {
- default:
- !1,
- validate: (0, i.assertValueType) ('boolean')
- },
- attributes: {
- validate: (0, i.chain) ((0, i.assertValueType) ('array'), (0, i.assertEach) ((0, i.assertNodeType) ('JSXAttribute', 'JSXSpreadAttribute')))
- }
- }
- }),
- (0, s.default) ('JSXSpreadAttribute', {
- visitor: [
- 'argument'
- ],
- aliases: [
- 'JSX'
- ],
- fields: {
- argument: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- }),
- (0, s.default) ('JSXText', {
- aliases: [
- 'JSX',
- 'Immutable'
- ],
- builder: [
- 'value'
- ],
- fields: {
- value: {
- validate: (0, i.assertValueType) ('string')
- }
- }
- })
- },
- {
- './index': 28
- }
- ],
- 31: [
- function (e, t, n) {
- 'use strict';
- var r,
- i = e('./index'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- (0, s.default) ('Noop', {
- visitor: [
- ]
- }),
- (0, s.default) ('ParenthesizedExpression', {
- visitor: [
- 'expression'
- ],
- aliases: [
- 'Expression',
- 'ExpressionWrapper'
- ],
- fields: {
- expression: {
- validate: (0, i.assertNodeType) ('Expression')
- }
- }
- })
- },
- {
- './index': 28
- }
- ],
- 32: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.createUnionTypeAnnotation = function (e) {
- var t = i(e);
- return 1 === t.length ? t[0] : r.unionTypeAnnotation(t)
- },
- n.removeTypeDuplicates = i,
- n.createTypeAnnotationBasedOnTypeof = function (e) {
- if ('string' === e) return r.stringTypeAnnotation();
- if ('number' === e) return r.numberTypeAnnotation();
- if ('undefined' === e) return r.voidTypeAnnotation();
- if ('boolean' === e) return r.booleanTypeAnnotation();
- if ('function' === e) return r.genericTypeAnnotation(r.identifier('Function'));
- if ('object' === e) return r.genericTypeAnnotation(r.identifier('Object'));
- if ('symbol' === e) return r.genericTypeAnnotation(r.identifier('Symbol'));
- throw new Error('Invalid typeof value')
- };
- var r = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./index'));
- function i(e) {
- for (var t = {
- }, n = {
- }, s = [
- ], o = [
- ], a = 0; a < e.length; a++) {
- var u = e[a];
- if (u && !(o.indexOf(u) >= 0)) {
- if (r.isAnyTypeAnnotation(u)) return [u];
- if (r.isFlowBaseAnnotation(u)) n[u.type] = u;
- else if (r.isUnionTypeAnnotation(u)) s.indexOf(u.types) < 0 && (e = e.concat(u.types), s.push(u.types));
- else if (r.isGenericTypeAnnotation(u)) {
- var l = u.id.name;
- if (t[l]) {
- var c = t[l];
- c.typeParameters ? u.typeParameters && (c.typeParameters.params = i(c.typeParameters.params.concat(u.typeParameters.params))) : c = u.typeParameters
- } else t[l] = u
- } else o.push(u)
- }
- }
- for (var p in n) o.push(n[p]);
- for (var h in t) o.push(t[h]);
- return o
- }
- },
- {
- './index': 33
- }
- ],
- 33: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.createTypeAnnotationBasedOnTypeof = n.removeTypeDuplicates = n.createUnionTypeAnnotation = n.valueToNode = n.toBlock = n.toExpression = n.toStatement = n.toBindingIdentifierName = n.toIdentifier = n.toKeyAlias = n.toSequenceExpression = n.toComputedKey = n.isNodesEquivalent = n.isImmutable = n.isScope = n.isSpecifierDefault = n.isVar = n.isBlockScoped = n.isLet = n.isValidIdentifier = n.isReferenced = n.isBinding = n.getOuterBindingIdentifiers = n.getBindingIdentifiers = n.TYPES = n.react = n.DEPRECATED_KEYS = n.BUILDER_KEYS = n.NODE_FIELDS = n.ALIAS_KEYS = n.VISITOR_KEYS = n.NOT_LOCAL_BINDING = n.BLOCK_SCOPED_SYMBOL = n.INHERIT_KEYS = n.UNARY_OPERATORS = n.STRING_UNARY_OPERATORS = n.NUMBER_UNARY_OPERATORS = n.BOOLEAN_UNARY_OPERATORS = n.BINARY_OPERATORS = n.NUMBER_BINARY_OPERATORS = n.BOOLEAN_BINARY_OPERATORS = n.COMPARISON_BINARY_OPERATORS = n.EQUALITY_BINARY_OPERATORS = n.BOOLEAN_NUMBER_BINARY_OPERATORS = n.UPDATE_OPERATORS = n.LOGICAL_OPERATORS = n.COMMENT_KEYS = n.FOR_INIT_KEYS = n.FLATTENABLE_KEYS = n.STATEMENT_OR_BLOCK_KEYS = void 0;
- var r = y(e('babel-runtime/core-js/object/get-own-property-symbols')),
- i = y(e('babel-runtime/core-js/get-iterator')),
- s = y(e('babel-runtime/core-js/object/keys')),
- o = y(e('babel-runtime/core-js/json/stringify')),
- a = e('./constants');
- Object.defineProperty(n, 'STATEMENT_OR_BLOCK_KEYS', {
- enumerable: !0,
- get: function () {
- return a.STATEMENT_OR_BLOCK_KEYS
- }
- }),
- Object.defineProperty(n, 'FLATTENABLE_KEYS', {
- enumerable: !0,
- get: function () {
- return a.FLATTENABLE_KEYS
- }
- }),
- Object.defineProperty(n, 'FOR_INIT_KEYS', {
- enumerable: !0,
- get: function () {
- return a.FOR_INIT_KEYS
- }
- }),
- Object.defineProperty(n, 'COMMENT_KEYS', {
- enumerable: !0,
- get: function () {
- return a.COMMENT_KEYS
- }
- }),
- Object.defineProperty(n, 'LOGICAL_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.LOGICAL_OPERATORS
- }
- }),
- Object.defineProperty(n, 'UPDATE_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.UPDATE_OPERATORS
- }
- }),
- Object.defineProperty(n, 'BOOLEAN_NUMBER_BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.BOOLEAN_NUMBER_BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'EQUALITY_BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.EQUALITY_BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'COMPARISON_BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.COMPARISON_BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'BOOLEAN_BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.BOOLEAN_BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'NUMBER_BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.NUMBER_BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'BINARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.BINARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'BOOLEAN_UNARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.BOOLEAN_UNARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'NUMBER_UNARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.NUMBER_UNARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'STRING_UNARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.STRING_UNARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'UNARY_OPERATORS', {
- enumerable: !0,
- get: function () {
- return a.UNARY_OPERATORS
- }
- }),
- Object.defineProperty(n, 'INHERIT_KEYS', {
- enumerable: !0,
- get: function () {
- return a.INHERIT_KEYS
- }
- }),
- Object.defineProperty(n, 'BLOCK_SCOPED_SYMBOL', {
- enumerable: !0,
- get: function () {
- return a.BLOCK_SCOPED_SYMBOL
- }
- }),
- Object.defineProperty(n, 'NOT_LOCAL_BINDING', {
- enumerable: !0,
- get: function () {
- return a.NOT_LOCAL_BINDING
- }
- }),
- n.is = function (e, t, n) {
- if (!t) return !1;
- if (!A(t.type, e)) return !1;
- return void 0 === n || v.shallowEqual(t, n)
- },
- n.isType = A,
- n.validate = C,
- n.shallowEqual = function (e, t) {
- for (var n = (0, s.default) (t), r = Array.isArray(n), o = 0, n = r ? n : (0, i.default) (n); ; ) {
- var a;
- if (r) {
- if (o >= n.length) break;
- a = n[o++]
- } else {
- if ((o = n.next()).done) break;
- a = o.value
- }
- var u = a;
- if (e[u] !== t[u]) return !1
- }
- return !0
- },
- n.appendToMemberExpression = function (e, t, n) {
- return e.object = v.memberExpression(e.object, e.property, e.computed),
- e.property = t,
- e.computed = !!n,
- e
- },
- n.prependToMemberExpression = function (e, t) {
- return e.object = v.memberExpression(t, e.object),
- e
- },
- n.ensureBlock = function (e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 'body';
- return e[t] = v.toBlock(e[t], e)
- },
- n.clone = w,
- n.cloneWithoutLoc = function (e) {
- var t = w(e);
- return delete t.loc,
- t
- },
- n.cloneDeep = function (e) {
- if (!e) return e;
- var t = {
- };
- for (var n in e) if ('_' !== n[0]) {
- var r = e[n];
- r && (r.type ? r = v.cloneDeep(r) : Array.isArray(r) && (r = r.map(v.cloneDeep))),
- t[n] = r
- }
- return t
- },
- n.buildMatchMemberExpression = function (e, t) {
- var n = e.split('.');
- return function (e) {
- if (!v.isMemberExpression(e)) return !1;
- for (var r = [
- e
- ], i = 0; r.length; ) {
- var s = r.shift();
- if (t && i === n.length) return !0;
- if (v.isIdentifier(s)) {
- if (n[i] !== s.name) return !1
- } else {
- if (!v.isStringLiteral(s)) {
- if (v.isMemberExpression(s)) {
- if (s.computed && !v.isStringLiteral(s.property)) return !1;
- r.push(s.object),
- r.push(s.property);
- continue
- }
- return !1
- }
- if (n[i] !== s.value) return !1
- }
- if (++i > n.length) return !1
- }
- return !0
- }
- },
- n.removeComments = function (e) {
- for (var t = v.COMMENT_KEYS, n = Array.isArray(t), r = 0, t = n ? t : (0, i.default) (t); ; ) {
- var s;
- if (n) {
- if (r >= t.length) break;
- s = t[r++]
- } else {
- if ((r = t.next()).done) break;
- s = r.value
- }
- var o = s;
- delete e[o]
- }
- return e
- },
- n.inheritsComments = function (e, t) {
- return D(e, t),
- k(e, t),
- S(e, t),
- e
- },
- n.inheritTrailingComments = D,
- n.inheritLeadingComments = k,
- n.inheritInnerComments = S,
- n.inherits = function (e, t) {
- if (!e || !t) return e;
- for (var n = v.INHERIT_KEYS.optional, r = Array.isArray(n), s = 0, n = r ? n : (0, i.default) (n); ; ) {
- var o;
- if (r) {
- if (s >= n.length) break;
- o = n[s++]
- } else {
- if ((s = n.next()).done) break;
- o = s.value
- }
- var a = o;
- null == e[a] && (e[a] = t[a])
- }
- for (var u in t) '_' === u[0] && (e[u] = t[u]);
- for (var l = v.INHERIT_KEYS.force, c = Array.isArray(l), p = 0, l = c ? l : (0, i.default) (l); ; ) {
- var h;
- if (c) {
- if (p >= l.length) break;
- h = l[p++]
- } else {
- if ((p = l.next()).done) break;
- h = p.value
- }
- var f = h;
- e[f] = t[f]
- }
- return v.inheritsComments(e, t),
- e
- },
- n.assertNode = function (e) {
- if (!F(e)) throw new TypeError('Not a valid node ' + (e && e.type))
- },
- n.isNode = F,
- n.traverseFast = O,
- n.removeProperties = N,
- n.removePropertiesDeep = function (e, t) {
- return O(e, N, t),
- e
- };
- var u = e('./retrievers');
- Object.defineProperty(n, 'getBindingIdentifiers', {
- enumerable: !0,
- get: function () {
- return u.getBindingIdentifiers
- }
- }),
- Object.defineProperty(n, 'getOuterBindingIdentifiers', {
- enumerable: !0,
- get: function () {
- return u.getOuterBindingIdentifiers
- }
- });
- var l = e('./validators');
- Object.defineProperty(n, 'isBinding', {
- enumerable: !0,
- get: function () {
- return l.isBinding
- }
- }),
- Object.defineProperty(n, 'isReferenced', {
- enumerable: !0,
- get: function () {
- return l.isReferenced
- }
- }),
- Object.defineProperty(n, 'isValidIdentifier', {
- enumerable: !0,
- get: function () {
- return l.isValidIdentifier
- }
- }),
- Object.defineProperty(n, 'isLet', {
- enumerable: !0,
- get: function () {
- return l.isLet
- }
- }),
- Object.defineProperty(n, 'isBlockScoped', {
- enumerable: !0,
- get: function () {
- return l.isBlockScoped
- }
- }),
- Object.defineProperty(n, 'isVar', {
- enumerable: !0,
- get: function () {
- return l.isVar
- }
- }),
- Object.defineProperty(n, 'isSpecifierDefault', {
- enumerable: !0,
- get: function () {
- return l.isSpecifierDefault
- }
- }),
- Object.defineProperty(n, 'isScope', {
- enumerable: !0,
- get: function () {
- return l.isScope
- }
- }),
- Object.defineProperty(n, 'isImmutable', {
- enumerable: !0,
- get: function () {
- return l.isImmutable
- }
- }),
- Object.defineProperty(n, 'isNodesEquivalent', {
- enumerable: !0,
- get: function () {
- return l.isNodesEquivalent
- }
- });
- var c = e('./converters');
- Object.defineProperty(n, 'toComputedKey', {
- enumerable: !0,
- get: function () {
- return c.toComputedKey
- }
- }),
- Object.defineProperty(n, 'toSequenceExpression', {
- enumerable: !0,
- get: function () {
- return c.toSequenceExpression
- }
- }),
- Object.defineProperty(n, 'toKeyAlias', {
- enumerable: !0,
- get: function () {
- return c.toKeyAlias
- }
- }),
- Object.defineProperty(n, 'toIdentifier', {
- enumerable: !0,
- get: function () {
- return c.toIdentifier
- }
- }),
- Object.defineProperty(n, 'toBindingIdentifierName', {
- enumerable: !0,
- get: function () {
- return c.toBindingIdentifierName
- }
- }),
- Object.defineProperty(n, 'toStatement', {
- enumerable: !0,
- get: function () {
- return c.toStatement
- }
- }),
- Object.defineProperty(n, 'toExpression', {
- enumerable: !0,
- get: function () {
- return c.toExpression
- }
- }),
- Object.defineProperty(n, 'toBlock', {
- enumerable: !0,
- get: function () {
- return c.toBlock
- }
- }),
- Object.defineProperty(n, 'valueToNode', {
- enumerable: !0,
- get: function () {
- return c.valueToNode
- }
- });
- var p = e('./flow');
- Object.defineProperty(n, 'createUnionTypeAnnotation', {
- enumerable: !0,
- get: function () {
- return p.createUnionTypeAnnotation
- }
- }),
- Object.defineProperty(n, 'removeTypeDuplicates', {
- enumerable: !0,
- get: function () {
- return p.removeTypeDuplicates
- }
- }),
- Object.defineProperty(n, 'createTypeAnnotationBasedOnTypeof', {
- enumerable: !0,
- get: function () {
- return p.createTypeAnnotationBasedOnTypeof
- }
- });
- var h = y(e('to-fast-properties')),
- f = y(e('lodash/clone')),
- d = y(e('lodash/uniq'));
- e('./definitions/init');
- var m = e('./definitions'),
- g = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./react'));
- function y(e) {
- return e && e.__esModule ? e : {
- default:
- e
- }
- }
- var v = n;
- function b(e) {
- var t = v['is' + e];
- t || (t = v['is' + e] = function (t, n) {
- return v.is(e, t, n)
- }),
- v['assert' + e] = function (n, r) {
- if (!t(n, r = r || {
- })) throw new Error('Expected type ' + (0, o.default) (e) + ' with option ' + (0, o.default) (r))
- }
- }
- for (var x in n.VISITOR_KEYS = m.VISITOR_KEYS, n.ALIAS_KEYS = m.ALIAS_KEYS, n.NODE_FIELDS = m.NODE_FIELDS, n.BUILDER_KEYS = m.BUILDER_KEYS, n.DEPRECATED_KEYS = m.DEPRECATED_KEYS, n.react = g, v.VISITOR_KEYS) b(x);
- v.FLIPPED_ALIAS_KEYS = {
- },
- (0, s.default) (v.ALIAS_KEYS).forEach(function (e) {
- v.ALIAS_KEYS[e].forEach(function (t) {
- (v.FLIPPED_ALIAS_KEYS[t] = v.FLIPPED_ALIAS_KEYS[t] || [
- ]).push(e)
- })
- }),
- (0, s.default) (v.FLIPPED_ALIAS_KEYS).forEach(function (e) {
- v[e.toUpperCase() + '_TYPES'] = v.FLIPPED_ALIAS_KEYS[e],
- b(e)
- });
- n.TYPES = (0, s.default) (v.VISITOR_KEYS).concat((0, s.default) (v.FLIPPED_ALIAS_KEYS)).concat((0, s.default) (v.DEPRECATED_KEYS));
- function A(e, t) {
- if (e === t) return !0;
- if (v.ALIAS_KEYS[t]) return !1;
- var n = v.FLIPPED_ALIAS_KEYS[t];
- if (n) {
- if (n[0] === e) return !0;
- var r = n,
- s = Array.isArray(r),
- o = 0;
- for (r = s ? r : (0, i.default) (r); ; ) {
- var a;
- if (s) {
- if (o >= r.length) break;
- a = r[o++]
- } else {
- if ((o = r.next()).done) break;
- a = o.value
- }
- if (e === a) return !0
- }
- }
- return !1
- }(0, s.default) (v.BUILDER_KEYS).forEach(function (e) {
- var t = v.BUILDER_KEYS[e];
- function n() {
- if (arguments.length > t.length) throw new Error('t.' + e + ': Too many arguments passed. Received ' + arguments.length + ' but can receive no more than ' + t.length);
- var n = {
- };
- n.type = e;
- var r = 0,
- s = t,
- o = Array.isArray(s),
- a = 0;
- for (s = o ? s : (0, i.default) (s); ; ) {
- var u;
- if (o) {
- if (a >= s.length) break;
- u = s[a++]
- } else {
- if ((a = s.next()).done) break;
- u = a.value
- }
- var l = u,
- c = v.NODE_FIELDS[e][l],
- p = arguments[r++];
- void 0 === p && (p = (0, f.default) (c.default)),
- n[l] = p
- }
- for (var h in n) C(n, h, n[h]);
- return n
- }
- v[e] = n,
- v[e[0].toLowerCase() + e.slice(1)] = n
- });
- var E = function (e) {
- var t = v.DEPRECATED_KEYS[e];
- function n(n) {
- return function () {
- return console.trace('The node type ' + e + ' has been renamed to ' + t),
- n.apply(this, arguments)
- }
- }
- v[e] = v[e[0].toLowerCase() + e.slice(1)] = n(v[t]),
- v['is' + e] = n(v['is' + t]),
- v['assert' + e] = n(v['assert' + t])
- };
- for (var _ in v.DEPRECATED_KEYS) E(_);
- function C(e, t, n) {
- if (e) {
- var r = v.NODE_FIELDS[e.type];
- if (r) {
- var i = r[t];
- i && i.validate && (i.optional && null == n || i.validate(e, t, n))
- }
- }
- }
- function w(e) {
- if (!e) return e;
- var t = {
- };
- for (var n in e) '_' !== n[0] && (t[n] = e[n]);
- return t
- }
- function D(e, t) {
- T('trailingComments', e, t)
- }
- function k(e, t) {
- T('leadingComments', e, t)
- }
- function S(e, t) {
- T('innerComments', e, t)
- }
- function T(e, t, n) {
- t && n && (t[e] = (0, d.default) ([].concat(t[e], n[e]).filter(Boolean)))
- }
- function F(e) {
- return !(!e || !m.VISITOR_KEYS[e.type])
- }
- function O(e, t, n) {
- if (e) {
- var r = v.VISITOR_KEYS[e.type];
- if (r) {
- t(e, n = n || {
- });
- var s = r,
- o = Array.isArray(s),
- a = 0;
- for (s = o ? s : (0, i.default) (s); ; ) {
- var u;
- if (o) {
- if (a >= s.length) break;
- u = s[a++]
- } else {
- if ((a = s.next()).done) break;
- u = a.value
- }
- var l = e[u];
- if (Array.isArray(l)) {
- var c = l,
- p = Array.isArray(c),
- h = 0;
- for (c = p ? c : (0, i.default) (c); ; ) {
- var f;
- if (p) {
- if (h >= c.length) break;
- f = c[h++]
- } else {
- if ((h = c.next()).done) break;
- f = h.value
- }
- O(f, t, n)
- }
- } else O(l, t, n)
- }
- }
- }
- }(0, h.default) (v),
- (0, h.default) (v.VISITOR_KEYS);
- var B = [
- 'tokens',
- 'start',
- 'end',
- 'loc',
- 'raw',
- 'rawValue'
- ],
- P = v.COMMENT_KEYS.concat(['comments']).concat(B);
- function N(e, t) {
- var n = (t = t || {
- }).preserveComments ? B : P,
- s = Array.isArray(n),
- o = 0;
- for (n = s ? n : (0, i.default) (n); ; ) {
- var a;
- if (s) {
- if (o >= n.length) break;
- a = n[o++]
- } else {
- if ((o = n.next()).done) break;
- a = o.value
- }
- var u = a;
- null != e[u] && (e[u] = void 0)
- }
- for (var l in e) '_' === l[0] && null != e[l] && (e[l] = void 0);
- var c = (0, r.default) (e),
- p = Array.isArray(c),
- h = 0;
- for (c = p ? c : (0, i.default) (c); ; ) {
- var f;
- if (p) {
- if (h >= c.length) break;
- f = c[h++]
- } else {
- if ((h = c.next()).done) break;
- f = h.value
- }
- e[f] = null
- }
- }
- },
- {
- './constants': 22,
- './converters': 23,
- './definitions': 28,
- './definitions/init': 29,
- './flow': 32,
- './react': 34,
- './retrievers': 35,
- './validators': 36,
- 'babel-runtime/core-js/get-iterator': 12,
- 'babel-runtime/core-js/json/stringify': 13,
- 'babel-runtime/core-js/object/get-own-property-symbols': 16,
- 'babel-runtime/core-js/object/keys': 17,
- 'lodash/clone': 349,
- 'lodash/uniq': 369,
- 'to-fast-properties': 37
- }
- ],
- 34: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.isReactComponent = void 0,
- n.isCompatTag = function (e) {
- return !!e && /^[a-z]|\-/.test(e)
- },
- n.buildChildren = function (e) {
- for (var t = [
- ], n = 0; n < e.children.length; n++) {
- var s = e.children[n];
- r.isJSXText(s) ? i(s, t) : (r.isJSXExpressionContainer(s) && (s = s.expression), r.isJSXEmptyExpression(s) || t.push(s))
- }
- return t
- };
- var r = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./index'));
- n.isReactComponent = r.buildMatchMemberExpression('React.Component');
- function i(e, t) {
- for (var n = e.value.split(/\r\n|\n|\r/), i = 0, s = 0; s < n.length; s++) n[s].match(/[^ \t]/) && (i = s);
- for (var o = '', a = 0; a < n.length; a++) {
- var u = n[a],
- l = 0 === a,
- c = a === n.length - 1,
- p = a === i,
- h = u.replace(/\t/g, ' ');
- l || (h = h.replace(/^[ ]+/, '')),
- c || (h = h.replace(/[ ]+$/, '')),
- h && (p || (h += ' '), o += h)
- }
- o && t.push(r.stringLiteral(o))
- }
- },
- {
- './index': 33
- }
- ],
- 35: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0;
- var r,
- i = e('babel-runtime/core-js/object/create'),
- s = (r = i) && r.__esModule ? r : {
- default:
- r
- };
- n.getBindingIdentifiers = a,
- n.getOuterBindingIdentifiers = function (e, t) {
- return a(e, t, !0)
- };
- var o = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./index'));
- function a(e, t, n) {
- for (var r = [
- ].concat(e), i = (0, s.default) (null); r.length; ) {
- var a = r.shift();
- if (a) {
- var u = o.getBindingIdentifiers.keys[a.type];
- if (o.isIdentifier(a)) t ? (i[a.name] = i[a.name] || [
- ]).push(a) : i[a.name] = a;
- else if (o.isExportDeclaration(a)) o.isDeclaration(a.declaration) && r.push(a.declaration);
- else {
- if (n) {
- if (o.isFunctionDeclaration(a)) {
- r.push(a.id);
- continue
- }
- if (o.isFunctionExpression(a)) continue
- }
- if (u) for (var l = 0; l < u.length; l++) {
- var c = u[l];
- a[c] && (r = r.concat(a[c]))
- }
- }
- }
- }
- return i
- }
- a.keys = {
- DeclareClass: [
- 'id'
- ],
- DeclareFunction: [
- 'id'
- ],
- DeclareModule: [
- 'id'
- ],
- DeclareVariable: [
- 'id'
- ],
- InterfaceDeclaration: [
- 'id'
- ],
- TypeAlias: [
- 'id'
- ],
- OpaqueType: [
- 'id'
- ],
- CatchClause: [
- 'param'
- ],
- LabeledStatement: [
- 'label'
- ],
- UnaryExpression: [
- 'argument'
- ],
- AssignmentExpression: [
- 'left'
- ],
- ImportSpecifier: [
- 'local'
- ],
- ImportNamespaceSpecifier: [
- 'local'
- ],
- ImportDefaultSpecifier: [
- 'local'
- ],
- ImportDeclaration: [
- 'specifiers'
- ],
- ExportSpecifier: [
- 'exported'
- ],
- ExportNamespaceSpecifier: [
- 'exported'
- ],
- ExportDefaultSpecifier: [
- 'exported'
- ],
- FunctionDeclaration: [
- 'id',
- 'params'
- ],
- FunctionExpression: [
- 'id',
- 'params'
- ],
- ClassDeclaration: [
- 'id'
- ],
- ClassExpression: [
- 'id'
- ],
- RestElement: [
- 'argument'
- ],
- UpdateExpression: [
- 'argument'
- ],
- RestProperty: [
- 'argument'
- ],
- ObjectProperty: [
- 'value'
- ],
- AssignmentPattern: [
- 'left'
- ],
- ArrayPattern: [
- 'elements'
- ],
- ObjectPattern: [
- 'properties'
- ],
- VariableDeclaration: [
- 'declarations'
- ],
- VariableDeclarator: [
- 'id'
- ]
- }
- },
- {
- './index': 33,
- 'babel-runtime/core-js/object/create': 15
- }
- ],
- 36: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0;
- var r = c(e('babel-runtime/core-js/object/keys')),
- i = c(e('babel-runtime/helpers/typeof')),
- s = c(e('babel-runtime/core-js/get-iterator'));
- n.isBinding = function (e, t) {
- var n = o.getBindingIdentifiers.keys[t.type];
- if (n) for (var r = 0; r < n.length; r++) {
- var i = n[r],
- s = t[i];
- if (Array.isArray(s)) {
- if (s.indexOf(e) >= 0) return !0
- } else if (s === e) return !0
- }
- return !1
- },
- n.isReferenced = function (e, t) {
- switch (t.type) {
- case 'BindExpression':
- return t.object === e || t.callee === e;
- case 'MemberExpression':
- case 'JSXMemberExpression':
- return !(t.property !== e || !t.computed) || t.object === e;
- case 'MetaProperty':
- return !1;
- case 'ObjectProperty':
- if (t.key === e) return t.computed;
- case 'VariableDeclarator':
- return t.id !== e;
- case 'ArrowFunctionExpression':
- case 'FunctionDeclaration':
- case 'FunctionExpression':
- for (var n = t.params, r = Array.isArray(n), i = 0, n = r ? n : (0, s.default) (n); ; ) {
- var o;
- if (r) {
- if (i >= n.length) break;
- o = n[i++]
- } else {
- if ((i = n.next()).done) break;
- o = i.value
- }
- var a = o;
- if (a === e) return !1
- }
- return t.id !== e;
- case 'ExportSpecifier':
- return !t.source && t.local === e;
- case 'ExportNamespaceSpecifier':
- case 'ExportDefaultSpecifier':
- return !1;
- case 'JSXAttribute':
- return t.name !== e;
- case 'ClassProperty':
- return t.key === e ? t.computed : t.value === e;
- case 'ImportDefaultSpecifier':
- case 'ImportNamespaceSpecifier':
- case 'ImportSpecifier':
- return !1;
- case 'ClassDeclaration':
- case 'ClassExpression':
- return t.id !== e;
- case 'ClassMethod':
- case 'ObjectMethod':
- return t.key === e && t.computed;
- case 'LabeledStatement':
- return !1;
- case 'CatchClause':
- return t.param !== e;
- case 'RestElement':
- return !1;
- case 'AssignmentExpression':
- case 'AssignmentPattern':
- return t.right === e;
- case 'ObjectPattern':
- case 'ArrayPattern':
- return !1
- }
- return !0
- },
- n.isValidIdentifier = function (e) {
- return 'string' == typeof e && !a.default.keyword.isReservedWordES6(e, !0) && ('await' !== e && a.default.keyword.isIdentifierNameES6(e))
- },
- n.isLet = function (e) {
- return u.isVariableDeclaration(e) && ('var' !== e.kind || e[l.BLOCK_SCOPED_SYMBOL])
- },
- n.isBlockScoped = function (e) {
- return u.isFunctionDeclaration(e) || u.isClassDeclaration(e) || u.isLet(e)
- },
- n.isVar = function (e) {
- return u.isVariableDeclaration(e, {
- kind: 'var'
- }) && !e[l.BLOCK_SCOPED_SYMBOL]
- },
- n.isSpecifierDefault = function (e) {
- return u.isImportDefaultSpecifier(e) || u.isIdentifier(e.imported || e.exported, {
- name: 'default'
- })
- },
- n.isScope = function (e, t) {
- if (u.isBlockStatement(e) && u.isFunction(t, {
- body: e
- })) return !1;
- return u.isScopable(e)
- },
- n.isImmutable = function (e) {
- if (u.isType(e.type, 'Immutable')) return !0;
- if (u.isIdentifier(e)) return 'undefined' === e.name;
- return !1
- },
- n.isNodesEquivalent = function e(t, n) {
- if ('object' !== (void 0 === t ? 'undefined' : (0, i.default) (t)) || 'object' !== (void 0 === t ? 'undefined' : (0, i.default) (t)) || null == t || null == n) return t === n;
- if (t.type !== n.type) return !1;
- var o = (0, r.default) (u.NODE_FIELDS[t.type] || t.type);
- for (var a = o, l = Array.isArray(a), c = 0, a = l ? a : (0, s.default) (a); ; ) {
- var p;
- if (l) {
- if (c >= a.length) break;
- p = a[c++]
- } else {
- if ((c = a.next()).done) break;
- p = c.value
- }
- var h = p;
- if ((0, i.default) (t[h]) !== (0, i.default) (n[h])) return !1;
- if (Array.isArray(t[h])) {
- if (!Array.isArray(n[h])) return !1;
- if (t[h].length !== n[h].length) return !1;
- for (var f = 0; f < t[h].length; f++) if (!e(t[h][f], n[h][f])) return !1
- } else if (!e(t[h], n[h])) return !1
- }
- return !0
- };
- var o = e('./retrievers'),
- a = c(e('esutils')),
- u = function (e) {
- if (e && e.__esModule) return e;
- var t = {
- };
- if (null != e) for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
- return t.default = e,
- t
- }(e('./index')),
- l = e('./constants');
- function c(e) {
- return e && e.__esModule ? e : {
- default:
- e
- }
- }
- },
- {
- './constants': 22,
- './index': 33,
- './retrievers': 35,
- 'babel-runtime/core-js/get-iterator': 12,
- 'babel-runtime/core-js/object/keys': 17,
- 'babel-runtime/helpers/typeof': 21,
- esutils: 232
- }
- ],
- 37: [
- function (e, t, n) {
- 'use strict';
- t.exports = function e(t) {
- function n() {
- }
- n.prototype = t;
- var r = new n;
- function i() {
- return typeof r.foo
- }
- return i(),
- i(),
- t
- }
- },
- {
- }
- ],
- 38: [
- function (e, t, n) {
- 'use strict';
- function r(e) {
- return e = e.split(' '),
- function (t) {
- return e.indexOf(t) >= 0
- }
- }
- Object.defineProperty(n, '__esModule', {
- value: !0
- });
- var i = {
- 6: r('enum await'),
- strict: r('implements interface let package private protected public static yield'),
- strictBind: r('eval arguments')
- },
- s = r('break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super'),
- o = 'ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ',
- a = '‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_',
- u = new RegExp('[' + o + ']'),
- l = new RegExp('[' + o + a + ']');
- o = a = null;
- var c = [
- 0,
- 11,
- 2,
- 25,
- 2,
- 18,
- 2,
- 1,
- 2,
- 14,
- 3,
- 13,
- 35,
- 122,
- 70,
- 52,
- 268,
- 28,
- 4,
- 48,
- 48,
- 31,
- 17,
- 26,
- 6,
- 37,
- 11,
- 29,
- 3,
- 35,
- 5,
- 7,
- 2,
- 4,
- 43,
- 157,
- 19,
- 35,
- 5,
- 35,
- 5,
- 39,
- 9,
- 51,
- 157,
- 310,
- 10,
- 21,
- 11,
- 7,
- 153,
- 5,
- 3,
- 0,
- 2,
- 43,
- 2,
- 1,
- 4,
- 0,
- 3,
- 22,
- 11,
- 22,
- 10,
- 30,
- 66,
- 18,
- 2,
- 1,
- 11,
- 21,
- 11,
- 25,
- 71,
- 55,
- 7,
- 1,
- 65,
- 0,
- 16,
- 3,
- 2,
- 2,
- 2,
- 26,
- 45,
- 28,
- 4,
- 28,
- 36,
- 7,
- 2,
- 27,
- 28,
- 53,
- 11,
- 21,
- 11,
- 18,
- 14,
- 17,
- 111,
- 72,
- 56,
- 50,
- 14,
- 50,
- 785,
- 52,
- 76,
- 44,
- 33,
- 24,
- 27,
- 35,
- 42,
- 34,
- 4,
- 0,
- 13,
- 47,
- 15,
- 3,
- 22,
- 0,
- 2,
- 0,
- 36,
- 17,
- 2,
- 24,
- 85,
- 6,
- 2,
- 0,
- 2,
- 3,
- 2,
- 14,
- 2,
- 9,
- 8,
- 46,
- 39,
- 7,
- 3,
- 1,
- 3,
- 21,
- 2,
- 6,
- 2,
- 1,
- 2,
- 4,
- 4,
- 0,
- 19,
- 0,
- 13,
- 4,
- 159,
- 52,
- 19,
- 3,
- 54,
- 47,
- 21,
- 1,
- 2,
- 0,
- 185,
- 46,
- 42,
- 3,
- 37,
- 47,
- 21,
- 0,
- 60,
- 42,
- 86,
- 25,
- 391,
- 63,
- 32,
- 0,
- 449,
- 56,
- 264,
- 8,
- 2,
- 36,
- 18,
- 0,
- 50,
- 29,
- 881,
- 921,
- 103,
- 110,
- 18,
- 195,
- 2749,
- 1070,
- 4050,
- 582,
- 8634,
- 568,
- 8,
- 30,
- 114,
- 29,
- 19,
- 47,
- 17,
- 3,
- 32,
- 20,
- 6,
- 18,
- 881,
- 68,
- 12,
- 0,
- 67,
- 12,
- 65,
- 0,
- 32,
- 6124,
- 20,
- 754,
- 9486,
- 1,
- 3071,
- 106,
- 6,
- 12,
- 4,
- 8,
- 8,
- 9,
- 5991,
- 84,
- 2,
- 70,
- 2,
- 1,
- 3,
- 0,
- 3,
- 1,
- 3,
- 3,
- 2,
- 11,
- 2,
- 0,
- 2,
- 6,
- 2,
- 64,
- 2,
- 3,
- 3,
- 7,
- 2,
- 6,
- 2,
- 27,
- 2,
- 3,
- 2,
- 4,
- 2,
- 0,
- 4,
- 6,
- 2,
- 339,
- 3,
- 24,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 30,
- 2,
- 24,
- 2,
- 7,
- 4149,
- 196,
- 60,
- 67,
- 1213,
- 3,
- 2,
- 26,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 9,
- 2,
- 3,
- 2,
- 0,
- 2,
- 0,
- 7,
- 0,
- 5,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 2,
- 2,
- 1,
- 2,
- 0,
- 3,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 0,
- 2,
- 1,
- 2,
- 0,
- 3,
- 3,
- 2,
- 6,
- 2,
- 3,
- 2,
- 3,
- 2,
- 0,
- 2,
- 9,
- 2,
- 16,
- 6,
- 2,
- 2,
- 4,
- 2,
- 16,
- 4421,
- 42710,
- 42,
- 4148,
- 12,
- 221,
- 3,
- 5761,
- 10591,
- 541
- ],
- p = [
- 509,
- 0,
- 227,
- 0,
- 150,
- 4,
- 294,
- 9,
- 1368,
- 2,
- 2,
- 1,
- 6,
- 3,
- 41,
- 2,
- 5,
- 0,
- 166,
- 1,
- 1306,
- 2,
- 54,
- 14,
- 32,
- 9,
- 16,
- 3,
- 46,
- 10,
- 54,
- 9,
- 7,
- 2,
- 37,
- 13,
- 2,
- 9,
- 52,
- 0,
- 13,
- 2,
- 49,
- 13,
- 10,
- 2,
- 4,
- 9,
- 83,
- 11,
- 7,
- 0,
- 161,
- 11,
- 6,
- 9,
- 7,
- 3,
- 57,
- 0,
- 2,
- 6,
- 3,
- 1,
- 3,
- 2,
- 10,
- 0,
- 11,
- 1,
- 3,
- 6,
- 4,
- 4,
- 193,
- 17,
- 10,
- 9,
- 87,
- 19,
- 13,
- 9,
- 214,
- 6,
- 3,
- 8,
- 28,
- 1,
- 83,
- 16,
- 16,
- 9,
- 82,
- 12,
- 9,
- 9,
- 84,
- 14,
- 5,
- 9,
- 423,
- 9,
- 838,
- 7,
- 2,
- 7,
- 17,
- 9,
- 57,
- 21,
- 2,
- 13,
- 19882,
- 9,
- 135,
- 4,
- 60,
- 6,
- 26,
- 9,
- 1016,
- 45,
- 17,
- 3,
- 19723,
- 1,
- 5319,
- 4,
- 4,
- 5,
- 9,
- 7,
- 3,
- 6,
- 31,
- 3,
- 149,
- 2,
- 1418,
- 49,
- 513,
- 54,
- 5,
- 49,
- 9,
- 0,
- 15,
- 0,
- 23,
- 4,
- 2,
- 14,
- 1361,
- 6,
- 2,
- 16,
- 3,
- 6,
- 2,
- 1,
- 2,
- 4,
- 2214,
- 6,
- 110,
- 6,
- 6,
- 9,
- 792487,
- 239
- ];
- function h(e, t) {
- for (var n = 65536, r = 0; r < t.length; r += 2) {
- if ((n += t[r]) > e) return !1;
- if ((n += t[r + 1]) >= e) return !0
- }
- }
- function f(e) {
- return e < 65 ? 36 === e : e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && u.test(String.fromCharCode(e)) : h(e, c)))
- }
- function d(e) {
- return e < 48 ? 36 === e : e < 58 || !(e < 65) && (e < 91 || (e < 97 ? 95 === e : e < 123 || (e <= 65535 ? e >= 170 && l.test(String.fromCharCode(e)) : h(e, c) || h(e, p))))
- }
- var m = {
- sourceType: 'script',
- sourceFilename: void 0,
- startLine: 1,
- allowReturnOutsideFunction: !1,
- allowImportExportEverywhere: !1,
- allowSuperOutsideMethod: !1,
- plugins: [
- ],
- strictMode: null
- };
- var g = 'function' == typeof Symbol && 'symbol' == typeof Symbol.iterator ? function (e) {
- return typeof e
- }
- : function (e) {
- return e && 'function' == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? 'symbol' : typeof e
- },
- y = function (e, t) {
- if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function')
- },
- v = function (e, t) {
- if ('function' != typeof t && null !== t) throw new TypeError('Super expression must either be null or a function, not ' + typeof t);
- e.prototype = Object.create(t && t.prototype, {
- constructor: {
- value: e,
- enumerable: !1,
- writable: !0,
- configurable: !0
- }
- }),
- t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t)
- },
- b = function (e, t) {
- if (!e) throw new ReferenceError('this hasn\'t been initialised - super() hasn\'t been called');
- return !t || 'object' != typeof t && 'function' != typeof t ? e : t
- },
- x = !0,
- A = function e(t) {
- var n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
- };
- y(this, e),
- this.label = t,
- this.keyword = n.keyword,
- this.beforeExpr = !!n.beforeExpr,
- this.startsExpr = !!n.startsExpr,
- this.rightAssociative = !!n.rightAssociative,
- this.isLoop = !!n.isLoop,
- this.isAssign = !!n.isAssign,
- this.prefix = !!n.prefix,
- this.postfix = !!n.postfix,
- this.binop = n.binop || null,
- this.updateContext = null
- },
- E = function (e) {
- function t(n) {
- var r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {
- };
- return y(this, t),
- r.keyword = n,
- b(this, e.call(this, n, r))
- }
- return v(t, e),
- t
- }(A),
- _ = function (e) {
- function t(n, r) {
- return y(this, t),
- b(this, e.call(this, n, {
- beforeExpr: x,
- binop: r
- }))
- }
- return v(t, e),
- t
- }(A),
- C = {
- num: new A('num', {
- startsExpr: !0
- }),
- regexp: new A('regexp', {
- startsExpr: !0
- }),
- string: new A('string', {
- startsExpr: !0
- }),
- name: new A('name', {
- startsExpr: !0
- }),
- eof: new A('eof'),
- bracketL: new A('[', {
- beforeExpr: x,
- startsExpr: !0
- }),
- bracketR: new A(']'),
- braceL: new A('{', {
- beforeExpr: x,
- startsExpr: !0
- }),
- braceBarL: new A('{|', {
- beforeExpr: x,
- startsExpr: !0
- }),
- braceR: new A('}'),
- braceBarR: new A('|}'),
- parenL: new A('(', {
- beforeExpr: x,
- startsExpr: !0
- }),
- parenR: new A(')'),
- comma: new A(',', {
- beforeExpr: x
- }),
- semi: new A(';', {
- beforeExpr: x
- }),
- colon: new A(':', {
- beforeExpr: x
- }),
- doubleColon: new A('::', {
- beforeExpr: x
- }),
- dot: new A('.'),
- question: new A('?', {
- beforeExpr: x
- }),
- arrow: new A('=>', {
- beforeExpr: x
- }),
- template: new A('template'),
- ellipsis: new A('...', {
- beforeExpr: x
- }),
- backQuote: new A('`', {
- startsExpr: !0
- }),
- dollarBraceL: new A('${', {
- beforeExpr: x,
- startsExpr: !0
- }),
- at: new A('@'),
- eq: new A('=', {
- beforeExpr: x,
- isAssign: !0
- }),
- assign: new A('_=', {
- beforeExpr: x,
- isAssign: !0
- }),
- incDec: new A('++/--', {
- prefix: !0,
- postfix: !0,
- startsExpr: !0
- }),
- prefix: new A('prefix', {
- beforeExpr: x,
- prefix: !0,
- startsExpr: !0
- }),
- logicalOR: new _('||', 1),
- logicalAND: new _('&&', 2),
- bitwiseOR: new _('|', 3),
- bitwiseXOR: new _('^', 4),
- bitwiseAND: new _('&', 5),
- equality: new _('==/!=', 6),
- relational: new _('</>', 7),
- bitShift: new _('<</>>', 8),
- plusMin: new A('+/-', {
- beforeExpr: x,
- binop: 9,
- prefix: !0,
- startsExpr: !0
- }),
- modulo: new _('%', 10),
- star: new _('*', 10),
- slash: new _('/', 10),
- exponent: new A('**', {
- beforeExpr: x,
- binop: 11,
- rightAssociative: !0
- })
- },
- w = {
- break : new E('break'),
- case :
- new E('case', {
- beforeExpr: x
- }),
- catch : new E('catch'),
- continue : new E('continue'),
- debugger: new E('debugger'),
- default:
- new E('default', {
- beforeExpr: x
- }),
- do : new E('do', {
- isLoop: !0,
- beforeExpr: x
- }),
- else : new E('else', {
- beforeExpr: x
- }),
- finally : new E('finally'),
- for : new E('for', {
- isLoop: !0
- }),
- function : new E('function', {
- startsExpr: !0
- }),
- if : new E('if'),
- return : new E('return', {
- beforeExpr: x
- }),
- switch : new E('switch'),
- throw : new E('throw', {
- beforeExpr: x
- }),
- try : new E('try'),
- var : new E('var'),
- let: new E('let'),
- const : new E('const'),
- while : new E('while', {
- isLoop: !0
- }),
- with : new E('with'),
- new : new E('new', {
- beforeExpr: x,
- startsExpr: !0
- }),
- this: new E('this', {
- startsExpr: !0
- }),
- super : new E('super', {
- startsExpr: !0
- }),
- class : new E('class'),
- extends : new E('extends', {
- beforeExpr: x
- }),
- export : new E('export'),
- import : new E('import', {
- startsExpr: !0
- }),
- yield: new E('yield', {
- beforeExpr: x,
- startsExpr: !0
- }),
- null: new E('null', {
- startsExpr: !0
- }),
- true: new E('true', {
- startsExpr: !0
- }),
- false: new E('false', {
- startsExpr: !0
- }),
- in : new E('in', {
- beforeExpr: x,
- binop: 7
- }),
- instanceof : new E('instanceof', {
- beforeExpr: x,
- binop: 7
- }),
- typeof : new E('typeof', {
- beforeExpr: x,
- prefix: !0,
- startsExpr: !0
- }),
- void : new E('void', {
- beforeExpr: x,
- prefix: !0,
- startsExpr: !0
- }),
- delete : new E('delete', {
- beforeExpr: x,
- prefix: !0,
- startsExpr: !0
- })
- };
- Object.keys(w).forEach(function (e) {
- C['_' + e] = w[e]
- });
- var D = /\r\n?|\n|\u2028|\u2029/,
- k = new RegExp(D.source, 'g');
- function S(e) {
- return 10 === e || 13 === e || 8232 === e || 8233 === e
- }
- var T = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,
- F = function e(t, n, r, i) {
- y(this, e),
- this.token = t,
- this.isExpr = !!n,
- this.preserveSpace = !!r,
- this.override = i
- },
- O = {
- braceStatement: new F('{', !1),
- braceExpression: new F('{', !0),
- templateQuasi: new F('${', !0),
- parenStatement: new F('(', !1),
- parenExpression: new F('(', !0),
- template: new F('`', !0, !0, function (e) {
- return e.readTmplToken()
- }),
- functionExpression: new F('function', !0)
- };
- C.parenR.updateContext = C.braceR.updateContext = function () {
- if (1 !== this.state.context.length) {
- var e = this.state.context.pop();
- e === O.braceStatement && this.curContext() === O.functionExpression ? (this.state.context.pop(), this.state.exprAllowed = !1) : e === O.templateQuasi ? this.state.exprAllowed = !0 : this.state.exprAllowed = !e.isExpr
- } else this.state.exprAllowed = !0
- },
- C.name.updateContext = function (e) {
- this.state.exprAllowed = !1,
- e !== C._let && e !== C._const && e !== C._var || D.test(this.input.slice(this.state.end)) && (this.state.exprAllowed = !0)
- },
- C.braceL.updateContext = function (e) {
- this.state.context.push(this.braceIsBlock(e) ? O.braceStatement : O.braceExpression),
- this.state.exprAllowed = !0
- },
- C.dollarBraceL.updateContext = function () {
- this.state.context.push(O.templateQuasi),
- this.state.exprAllowed = !0
- },
- C.parenL.updateContext = function (e) {
- var t = e === C._if || e === C._for || e === C._with || e === C._while;
- this.state.context.push(t ? O.parenStatement : O.parenExpression),
- this.state.exprAllowed = !0
- },
- C.incDec.updateContext = function () {
- },
- C._function.updateContext = function () {
- this.curContext() !== O.braceStatement && this.state.context.push(O.functionExpression),
- this.state.exprAllowed = !1
- },
- C.backQuote.updateContext = function () {
- this.curContext() === O.template ? this.state.context.pop() : this.state.context.push(O.template),
- this.state.exprAllowed = !1
- };
- var B = function e(t, n) {
- y(this, e),
- this.line = t,
- this.column = n
- },
- P = function e(t, n) {
- y(this, e),
- this.start = t,
- this.end = n
- };
- var N = function () {
- function e() {
- y(this, e)
- }
- return e.prototype.init = function (e, t) {
- return this.strict = !1 !== e.strictMode && 'module' === e.sourceType,
- this.input = t,
- this.potentialArrowAt = - 1,
- this.inMethod = this.inFunction = this.inGenerator = this.inAsync = this.inPropertyName = this.inType = this.inClassProperty = this.noAnonFunctionType = !1,
- this.labels = [
- ],
- this.decorators = [
- ],
- this.tokens = [
- ],
- this.comments = [
- ],
- this.trailingComments = [
- ],
- this.leadingComments = [
- ],
- this.commentStack = [
- ],
- this.pos = this.lineStart = 0,
- this.curLine = e.startLine,
- this.type = C.eof,
- this.value = null,
- this.start = this.end = this.pos,
- this.startLoc = this.endLoc = this.curPosition(),
- this.lastTokEndLoc = this.lastTokStartLoc = null,
- this.lastTokStart = this.lastTokEnd = this.pos,
- this.context = [
- O.braceStatement
- ],
- this.exprAllowed = !0,
- this.containsEsc = this.containsOctal = !1,
- this.octalPosition = null,
- this.invalidTemplateEscapePosition = null,
- this.exportedIdentifiers = [
- ],
- this
- },
- e.prototype.curPosition = function () {
- return new B(this.curLine, this.pos - this.lineStart)
- },
- e.prototype.clone = function (t) {
- var n = new e;
- for (var r in this) {
- var i = this[r];
- t && 'context' !== r || !Array.isArray(i) || (i = i.slice()),
- n[r] = i
- }
- return n
- },
- e
- }();
- function R(e) {
- return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(55296 + (e - 65536 >> 10), 56320 + (e - 65536 & 1023))
- }
- var L = {
- },
- I = [
- 'jsx',
- 'doExpressions',
- 'objectRestSpread',
- 'decorators',
- 'classProperties',
- 'exportExtensions',
- 'asyncGenerators',
- 'functionBind',
- 'functionSent',
- 'dynamicImport',
- 'flow'
- ],
- j = function (e) {
- function t(n, r) {
- y(this, t),
- n = function (e) {
- var t = {
- };
- for (var n in m) t[n] = e && n in e ? e[n] : m[n];
- return t
- }(n);
- var i = b(this, e.call(this, n, r));
- return i.options = n,
- i.inModule = 'module' === i.options.sourceType,
- i.input = r,
- i.plugins = i.loadPlugins(i.options.plugins),
- i.filename = n.sourceFilename,
- 0 === i.state.pos && '#' === i.input[0] && '!' === i.input[1] && i.skipLineComment(2),
- i
- }
- return v(t, e),
- t.prototype.isReservedWord = function (e) {
- return 'await' === e ? this.inModule : i[6](e)
- },
- t.prototype.hasPlugin = function (e) {
- return !!(this.plugins['*'] && I.indexOf(e) > - 1) || !!this.plugins[e]
- },
- t.prototype.extend = function (e, t) {
- this[e] = t(this[e])
- },
- t.prototype.loadAllPlugins = function () {
- var e = this,
- t = Object.keys(L).filter(function (e) {
- return 'flow' !== e && 'estree' !== e
- });
- t.push('flow'),
- t.forEach(function (t) {
- var n = L[t];
- n && n(e)
- })
- },
- t.prototype.loadPlugins = function (e) {
- if (e.indexOf('*') >= 0) return this.loadAllPlugins(),
- {
- '*': !0
- };
- var t = {
- };
- e.indexOf('flow') >= 0 && (e = e.filter(function (e) {
- return 'flow' !== e
- })).push('flow'),
- e.indexOf('estree') >= 0 && (e = e.filter(function (e) {
- return 'estree' !== e
- })).unshift('estree');
- var n = e,
- r = Array.isArray(n),
- i = 0;
- for (n = r ? n : n[Symbol.iterator](); ; ) {
- var s;
- if (r) {
- if (i >= n.length) break;
- s = n[i++]
- } else {
- if ((i = n.next()).done) break;
- s = i.value
- }
- var o = s;
- if (!t[o]) {
- t[o] = !0;
- var a = L[o];
- a && a(this)
- }
- }
- return t
- },
- t.prototype.parse = function () {
- var e = this.startNode(),
- t = this.startNode();
- return this.nextToken(),
- this.parseTopLevel(e, t)
- },
- t
- }(function () {
- function e(t, n) {
- y(this, e),
- this.state = new N,
- this.state.init(t, n)
- }
- return e.prototype.next = function () {
- this.isLookahead || this.state.tokens.push(new function e(t) {
- y(this, e),
- this.type = t.type,
- this.value = t.value,
- this.start = t.start,
- this.end = t.end,
- this.loc = new P(t.startLoc, t.endLoc)
- }(this.state)),
- this.state.lastTokEnd = this.state.end,
- this.state.lastTokStart = this.state.start,
- this.state.lastTokEndLoc = this.state.endLoc,
- this.state.lastTokStartLoc = this.state.startLoc,
- this.nextToken()
- },
- e.prototype.eat = function (e) {
- return !!this.match(e) && (this.next(), !0)
- },
- e.prototype.match = function (e) {
- return this.state.type === e
- },
- e.prototype.isKeyword = function (e) {
- return s(e)
- },
- e.prototype.lookahead = function () {
- var e = this.state;
- this.state = e.clone(!0),
- this.isLookahead = !0,
- this.next(),
- this.isLookahead = !1;
- var t = this.state.clone(!0);
- return this.state = e,
- t
- },
- e.prototype.setStrict = function (e) {
- if (this.state.strict = e, this.match(C.num) || this.match(C.string)) {
- for (this.state.pos = this.state.start; this.state.pos < this.state.lineStart; ) this.state.lineStart = this.input.lastIndexOf('\n', this.state.lineStart - 2) + 1,
- --this.state.curLine;
- this.nextToken()
- }
- },
- e.prototype.curContext = function () {
- return this.state.context[this.state.context.length - 1]
- },
- e.prototype.nextToken = function () {
- var e = this.curContext();
- return e && e.preserveSpace || this.skipSpace(),
- this.state.containsOctal = !1,
- this.state.octalPosition = null,
- this.state.start = this.state.pos,
- this.state.startLoc = this.state.curPosition(),
- this.state.pos >= this.input.length ? this.finishToken(C.eof) : e.override ? e.override(this) : this.readToken(this.fullCharCodeAtPos())
- },
- e.prototype.readToken = function (e) {
- return f(e) || 92 === e ? this.readWord() : this.getTokenFromCode(e)
- },
- e.prototype.fullCharCodeAtPos = function () {
- var e = this.input.charCodeAt(this.state.pos);
- return e <= 55295 || e >= 57344 ? e : (e << 10) + this.input.charCodeAt(this.state.pos + 1) - 56613888
- },
- e.prototype.pushComment = function (e, t, n, r, i, s) {
- var o = {
- type: e ? 'CommentBlock' : 'CommentLine',
- value: t,
- start: n,
- end: r,
- loc: new P(i, s)
- };
- this.isLookahead || (this.state.tokens.push(o), this.state.comments.push(o), this.addComment(o))
- },
- e.prototype.skipBlockComment = function () {
- var e = this.state.curPosition(),
- t = this.state.pos,
- n = this.input.indexOf('*/', this.state.pos += 2);
- - 1 === n && this.raise(this.state.pos - 2, 'Unterminated comment'),
- this.state.pos = n + 2,
- k.lastIndex = t;
- for (var r = void 0; (r = k.exec(this.input)) && r.index < this.state.pos; ) ++this.state.curLine,
- this.state.lineStart = r.index + r[0].length;
- this.pushComment(!0, this.input.slice(t + 2, n), t, this.state.pos, e, this.state.curPosition())
- },
- e.prototype.skipLineComment = function (e) {
- for (var t = this.state.pos, n = this.state.curPosition(), r = this.input.charCodeAt(this.state.pos += e); this.state.pos < this.input.length && 10 !== r && 13 !== r && 8232 !== r && 8233 !== r; ) ++this.state.pos,
- r = this.input.charCodeAt(this.state.pos);
- this.pushComment(!1, this.input.slice(t + e, this.state.pos), t, this.state.pos, n, this.state.curPosition())
- },
- e.prototype.skipSpace = function () {
- e: for (; this.state.pos < this.input.length; ) {
- var e = this.input.charCodeAt(this.state.pos);
- switch (e) {
- case 32:
- case 160:
- ++this.state.pos;
- break;
- case 13:
- 10 === this.input.charCodeAt(this.state.pos + 1) && ++this.state.pos;
- case 10:
- case 8232:
- case 8233:
- ++this.state.pos,
- ++this.state.curLine,
- this.state.lineStart = this.state.pos;
- break;
- case 47:
- switch (this.input.charCodeAt(this.state.pos + 1)) {
- case 42:
- this.skipBlockComment();
- break;
- case 47:
- this.skipLineComment(2);
- break;
- default:
- break e
- }
- break;
- default:
- if (!(e > 8 && e < 14 || e >= 5760 && T.test(String.fromCharCode(e)))) break e;
- ++this.state.pos
- }
- }
- },
- e.prototype.finishToken = function (e, t) {
- this.state.end = this.state.pos,
- this.state.endLoc = this.state.curPosition();
- var n = this.state.type;
- this.state.type = e,
- this.state.value = t,
- this.updateContext(n)
- },
- e.prototype.readToken_dot = function () {
- var e = this.input.charCodeAt(this.state.pos + 1);
- if (e >= 48 && e <= 57) return this.readNumber(!0);
- var t = this.input.charCodeAt(this.state.pos + 2);
- return 46 === e && 46 === t ? (this.state.pos += 3, this.finishToken(C.ellipsis)) : (++this.state.pos, this.finishToken(C.dot))
- },
- e.prototype.readToken_slash = function () {
- return this.state.exprAllowed ? (++this.state.pos, this.readRegexp()) : 61 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(C.assign, 2) : this.finishOp(C.slash, 1)
- },
- e.prototype.readToken_mult_modulo = function (e) {
- var t = 42 === e ? C.star : C.modulo,
- n = 1,
- r = this.input.charCodeAt(this.state.pos + 1);
- return 42 === r && (n++, r = this.input.charCodeAt(this.state.pos + 2), t = C.exponent),
- 61 === r && (n++, t = C.assign),
- this.finishOp(t, n)
- },
- e.prototype.readToken_pipe_amp = function (e) {
- var t = this.input.charCodeAt(this.state.pos + 1);
- return t === e ? this.finishOp(124 === e ? C.logicalOR : C.logicalAND, 2) : 61 === t ? this.finishOp(C.assign, 2) : 124 === e && 125 === t && this.hasPlugin('flow') ? this.finishOp(C.braceBarR, 2) : this.finishOp(124 === e ? C.bitwiseOR : C.bitwiseAND, 1)
- },
- e.prototype.readToken_caret = function () {
- return 61 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(C.assign, 2) : this.finishOp(C.bitwiseXOR, 1)
- },
- e.prototype.readToken_plus_min = function (e) {
- var t = this.input.charCodeAt(this.state.pos + 1);
- return t === e ? 45 === t && 62 === this.input.charCodeAt(this.state.pos + 2) && D.test(this.input.slice(this.state.lastTokEnd, this.state.pos)) ? (this.skipLineComment(3), this.skipSpace(), this.nextToken()) : this.finishOp(C.incDec, 2) : 61 === t ? this.finishOp(C.assign, 2) : this.finishOp(C.plusMin, 1)
- },
- e.prototype.readToken_lt_gt = function (e) {
- var t = this.input.charCodeAt(this.state.pos + 1),
- n = 1;
- return t === e ? (n = 62 === e && 62 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2, 61 === this.input.charCodeAt(this.state.pos + n) ? this.finishOp(C.assign, n + 1) : this.finishOp(C.bitShift, n)) : 33 === t && 60 === e && 45 === this.input.charCodeAt(this.state.pos + 2) && 45 === this.input.charCodeAt(this.state.pos + 3) ? (this.inModule && this.unexpected(), this.skipLineComment(4), this.skipSpace(), this.nextToken()) : (61 === t && (n = 2), this.finishOp(C.relational, n))
- },
- e.prototype.readToken_eq_excl = function (e) {
- var t = this.input.charCodeAt(this.state.pos + 1);
- return 61 === t ? this.finishOp(C.equality, 61 === this.input.charCodeAt(this.state.pos + 2) ? 3 : 2) : 61 === e && 62 === t ? (this.state.pos += 2, this.finishToken(C.arrow)) : this.finishOp(61 === e ? C.eq : C.prefix, 1)
- },
- e.prototype.getTokenFromCode = function (e) {
- switch (e) {
- case 46:
- return this.readToken_dot();
- case 40:
- return ++this.state.pos,
- this.finishToken(C.parenL);
- case 41:
- return ++this.state.pos,
- this.finishToken(C.parenR);
- case 59:
- return ++this.state.pos,
- this.finishToken(C.semi);
- case 44:
- return ++this.state.pos,
- this.finishToken(C.comma);
- case 91:
- return ++this.state.pos,
- this.finishToken(C.bracketL);
- case 93:
- return ++this.state.pos,
- this.finishToken(C.bracketR);
- case 123:
- return this.hasPlugin('flow') && 124 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(C.braceBarL, 2) : (++this.state.pos, this.finishToken(C.braceL));
- case 125:
- return ++this.state.pos,
- this.finishToken(C.braceR);
- case 58:
- return this.hasPlugin('functionBind') && 58 === this.input.charCodeAt(this.state.pos + 1) ? this.finishOp(C.doubleColon, 2) : (++this.state.pos, this.finishToken(C.colon));
- case 63:
- return ++this.state.pos,
- this.finishToken(C.question);
- case 64:
- return ++this.state.pos,
- this.finishToken(C.at);
- case 96:
- return ++this.state.pos,
- this.finishToken(C.backQuote);
- case 48:
- var t = this.input.charCodeAt(this.state.pos + 1);
- if (120 === t || 88 === t) return this.readRadixNumber(16);
- if (111 === t || 79 === t) return this.readRadixNumber(8);
- if (98 === t || 66 === t) return this.readRadixNumber(2);
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- return this.readNumber(!1);
- case 34:
- case 39:
- return this.readString(e);
- case 47:
- return this.readToken_slash();
- case 37:
- case 42:
- return this.readToken_mult_modulo(e);
- case 124:
- case 38:
- return this.readToken_pipe_amp(e);
- case 94:
- return this.readToken_caret();
- case 43:
- case 45:
- return this.readToken_plus_min(e);
- case 60:
- case 62:
- return this.readToken_lt_gt(e);
- case 61:
- case 33:
- return this.readToken_eq_excl(e);
- case 126:
- return this.finishOp(C.prefix, 1)
- }
- this.raise(this.state.pos, 'Unexpected character \'' + R(e) + '\'')
- },
- e.prototype.finishOp = function (e, t) {
- var n = this.input.slice(this.state.pos, this.state.pos + t);
- return this.state.pos += t,
- this.finishToken(e, n)
- },
- e.prototype.readRegexp = function () {
- for (var e = this.state.pos, t = void 0, n = void 0; ; ) {
- this.state.pos >= this.input.length && this.raise(e, 'Unterminated regular expression');
- var r = this.input.charAt(this.state.pos);
- if (D.test(r) && this.raise(e, 'Unterminated regular expression'), t) t = !1;
- else {
- if ('[' === r) n = !0;
- else if (']' === r && n) n = !1;
- else if ('/' === r && !n) break;
- t = '\\' === r
- }
- ++this.state.pos
- }
- var i = this.input.slice(e, this.state.pos);
- ++this.state.pos;
- var s = this.readWord1();
- if (s) {
- /^[gmsiyu]*$/.test(s) || this.raise(e, 'Invalid regular expression flag')
- }
- return this.finishToken(C.regexp, {
- pattern: i,
- flags: s
- })
- },
- e.prototype.readInt = function (e, t) {
- for (var n = this.state.pos, r = 0, i = 0, s = null == t ? 1 / 0 : t; i < s; ++i) {
- var o = this.input.charCodeAt(this.state.pos),
- a = void 0;
- if ((a = o >= 97 ? o - 97 + 10 : o >= 65 ? o - 65 + 10 : o >= 48 && o <= 57 ? o - 48 : 1 / 0) >= e) break;
- ++this.state.pos,
- r = r * e + a
- }
- return this.state.pos === n || null != t && this.state.pos - n !== t ? null : r
- },
- e.prototype.readRadixNumber = function (e) {
- this.state.pos += 2;
- var t = this.readInt(e);
- return null == t && this.raise(this.state.start + 2, 'Expected number in radix ' + e),
- f(this.fullCharCodeAtPos()) && this.raise(this.state.pos, 'Identifier directly after number'),
- this.finishToken(C.num, t)
- },
- e.prototype.readNumber = function (e) {
- var t = this.state.pos,
- n = 48 === this.input.charCodeAt(t),
- r = !1;
- e || null !== this.readInt(10) || this.raise(t, 'Invalid number'),
- n && this.state.pos == t + 1 && (n = !1);
- var i = this.input.charCodeAt(this.state.pos);
- 46 !== i || n || (++this.state.pos, this.readInt(10), r = !0, i = this.input.charCodeAt(this.state.pos)),
- 69 !== i && 101 !== i || n || (43 !== (i = this.input.charCodeAt(++this.state.pos)) && 45 !== i || ++this.state.pos, null === this.readInt(10) && this.raise(t, 'Invalid number'), r = !0),
- f(this.fullCharCodeAtPos()) && this.raise(this.state.pos, 'Identifier directly after number');
- var s = this.input.slice(t, this.state.pos),
- o = void 0;
- return r ? o = parseFloat(s) : n && 1 !== s.length ? this.state.strict ? this.raise(t, 'Invalid number') : o = /[89]/.test(s) ? parseInt(s, 10) : parseInt(s, 8) : o = parseInt(s, 10),
- this.finishToken(C.num, o)
- },
- e.prototype.readCodePoint = function (e) {
- var t = void 0;
- if (123 === this.input.charCodeAt(this.state.pos)) {
- var n = ++this.state.pos;
- if (t = this.readHexChar(this.input.indexOf('}', this.state.pos) - this.state.pos, e), ++this.state.pos, null === t) --this.state.invalidTemplateEscapePosition;
- else if (t > 1114111) {
- if (!e) return this.state.invalidTemplateEscapePosition = n - 2,
- null;
- this.raise(n, 'Code point out of bounds')
- }
- } else t = this.readHexChar(4, e);
- return t
- },
- e.prototype.readString = function (e) {
- for (var t = '', n = ++this.state.pos; ; ) {
- this.state.pos >= this.input.length && this.raise(this.state.start, 'Unterminated string constant');
- var r = this.input.charCodeAt(this.state.pos);
- if (r === e) break;
- 92 === r ? (t += this.input.slice(n, this.state.pos), t += this.readEscapedChar(!1), n = this.state.pos) : (S(r) && this.raise(this.state.start, 'Unterminated string constant'), ++this.state.pos)
- }
- return t += this.input.slice(n, this.state.pos++),
- this.finishToken(C.string, t)
- },
- e.prototype.readTmplToken = function () {
- for (var e = '', t = this.state.pos, n = !1; ; ) {
- this.state.pos >= this.input.length && this.raise(this.state.start, 'Unterminated template');
- var r = this.input.charCodeAt(this.state.pos);
- if (96 === r || 36 === r && 123 === this.input.charCodeAt(this.state.pos + 1)) return this.state.pos === this.state.start && this.match(C.template) ? 36 === r ? (this.state.pos += 2, this.finishToken(C.dollarBraceL)) : (++this.state.pos, this.finishToken(C.backQuote)) : (e += this.input.slice(t, this.state.pos), this.finishToken(C.template, n ? null : e));
- if (92 === r) {
- e += this.input.slice(t, this.state.pos);
- var i = this.readEscapedChar(!0);
- null === i ? n = !0 : e += i,
- t = this.state.pos
- } else if (S(r)) {
- switch (e += this.input.slice(t, this.state.pos), ++this.state.pos, r) {
- case 13:
- 10 === this.input.charCodeAt(this.state.pos) && ++this.state.pos;
- case 10:
- e += '\n';
- break;
- default:
- e += String.fromCharCode(r)
- }
- ++this.state.curLine,
- this.state.lineStart = this.state.pos,
- t = this.state.pos
- } else ++this.state.pos
- }
- },
- e.prototype.readEscapedChar = function (e) {
- var t = !e,
- n = this.input.charCodeAt(++this.state.pos);
- switch (++this.state.pos, n) {
- case 110:
- return '\n';
- case 114:
- return '\r';
- case 120:
- var r = this.readHexChar(2, t);
- return null === r ? null : String.fromCharCode(r);
- case 117:
- var i = this.readCodePoint(t);
- return null === i ? null : R(i);
- case 116:
- return '\t';
- case 98:
- return '';
- case 118:
- return '\v';
- case 102:
- return '\f';
- case 13:
- 10 === this.input.charCodeAt(this.state.pos) && ++this.state.pos;
- case 10:
- return this.state.lineStart = this.state.pos,
- ++this.state.curLine,
- '';
- default:
- if (n >= 48 && n <= 55) {
- var s = this.state.pos - 1,
- o = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/) [0],
- a = parseInt(o, 8);
- if (a > 255 && (o = o.slice(0, - 1), a = parseInt(o, 8)), a > 0) {
- if (e) return this.state.invalidTemplateEscapePosition = s,
- null;
- this.state.strict ? this.raise(s, 'Octal literal in strict mode') : this.state.containsOctal || (this.state.containsOctal = !0, this.state.octalPosition = s)
- }
- return this.state.pos += o.length - 1,
- String.fromCharCode(a)
- }
- return String.fromCharCode(n)
- }
- },
- e.prototype.readHexChar = function (e, t) {
- var n = this.state.pos,
- r = this.readInt(16, e);
- return null === r && (t ? this.raise(n, 'Bad character escape sequence') : (this.state.pos = n - 1, this.state.invalidTemplateEscapePosition = n - 1)),
- r
- },
- e.prototype.readWord1 = function () {
- this.state.containsEsc = !1;
- for (var e = '', t = !0, n = this.state.pos; this.state.pos < this.input.length; ) {
- var r = this.fullCharCodeAtPos();
- if (d(r)) this.state.pos += r <= 65535 ? 1 : 2;
- else {
- if (92 !== r) break;
- this.state.containsEsc = !0,
- e += this.input.slice(n, this.state.pos);
- var i = this.state.pos;
- 117 !== this.input.charCodeAt(++this.state.pos) && this.raise(this.state.pos, 'Expecting Unicode escape sequence \\uXXXX'),
- ++this.state.pos;
- var s = this.readCodePoint(!0);
- (t ? f : d) (s, !0) || this.raise(i, 'Invalid Unicode escape'),
- e += R(s),
- n = this.state.pos
- }
- t = !1
- }
- return e + this.input.slice(n, this.state.pos)
- },
- e.prototype.readWord = function () {
- var e = this.readWord1(),
- t = C.name;
- return !this.state.containsEsc && this.isKeyword(e) && (t = w[e]),
- this.finishToken(t, e)
- },
- e.prototype.braceIsBlock = function (e) {
- if (e === C.colon) {
- var t = this.curContext();
- if (t === O.braceStatement || t === O.braceExpression) return !t.isExpr
- }
- return e === C._return ? D.test(this.input.slice(this.state.lastTokEnd, this.state.start)) : e === C._else || e === C.semi || e === C.eof || e === C.parenR || (e === C.braceL ? this.curContext() === O.braceStatement : !this.state.exprAllowed)
- },
- e.prototype.updateContext = function (e) {
- var t = this.state.type,
- n = void 0;
- t.keyword && e === C.dot ? this.state.exprAllowed = !1 : (n = t.updateContext) ? n.call(this, e) : this.state.exprAllowed = t.beforeExpr
- },
- e
- }()),
- M = j.prototype;
- M.addExtra = function (e, t, n) {
- e && ((e.extra = e.extra || {
- }) [t] = n)
- },
- M.isRelational = function (e) {
- return this.match(C.relational) && this.state.value === e
- },
- M.expectRelational = function (e) {
- this.isRelational(e) ? this.next() : this.unexpected(null, C.relational)
- },
- M.isContextual = function (e) {
- return this.match(C.name) && this.state.value === e
- },
- M.eatContextual = function (e) {
- return this.state.value === e && this.eat(C.name)
- },
- M.expectContextual = function (e, t) {
- this.eatContextual(e) || this.unexpected(null, t)
- },
- M.canInsertSemicolon = function () {
- return this.match(C.eof) || this.match(C.braceR) || D.test(this.input.slice(this.state.lastTokEnd, this.state.start))
- },
- M.isLineTerminator = function () {
- return this.eat(C.semi) || this.canInsertSemicolon()
- },
- M.semicolon = function () {
- this.isLineTerminator() || this.unexpected(null, C.semi)
- },
- M.expect = function (e, t) {
- return this.eat(e) || this.unexpected(t, e)
- },
- M.unexpected = function (e) {
- var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 'Unexpected token';
- t && 'object' === (void 0 === t ? 'undefined' : g(t)) && t.label && (t = 'Unexpected token, expected ' + t.label),
- this.raise(null != e ? e : this.state.start, t)
- };
- var U = j.prototype;
- U.parseTopLevel = function (e, t) {
- return t.sourceType = this.options.sourceType,
- this.parseBlockBody(t, !0, !0, C.eof),
- e.program = this.finishNode(t, 'Program'),
- e.comments = this.state.comments,
- e.tokens = this.state.tokens,
- this.finishNode(e, 'File')
- };
- var V = {
- kind: 'loop'
- },
- z = {
- kind: 'switch'
- };
- U.stmtToDirective = function (e) {
- var t = e.expression,
- n = this.startNodeAt(t.start, t.loc.start),
- r = this.startNodeAt(e.start, e.loc.start),
- i = this.input.slice(t.start, t.end),
- s = n.value = i.slice(1, - 1);
- return this.addExtra(n, 'raw', i),
- this.addExtra(n, 'rawValue', s),
- r.value = this.finishNodeAt(n, 'DirectiveLiteral', t.end, t.loc.end),
- this.finishNodeAt(r, 'Directive', e.end, e.loc.end)
- },
- U.parseStatement = function (e, t) {
- this.match(C.at) && this.parseDecorators(!0);
- var n = this.state.type,
- r = this.startNode();
- switch (n) {
- case C._break:
- case C._continue:
- return this.parseBreakContinueStatement(r, n.keyword);
- case C._debugger:
- return this.parseDebuggerStatement(r);
- case C._do:
- return this.parseDoStatement(r);
- case C._for:
- return this.parseForStatement(r);
- case C._function:
- return e || this.unexpected(),
- this.parseFunctionStatement(r);
- case C._class:
- return e || this.unexpected(),
- this.parseClass(r, !0);
- case C._if:
- return this.parseIfStatement(r);
- case C._return:
- return this.parseReturnStatement(r);
- case C._switch:
- return this.parseSwitchStatement(r);
- case C._throw:
- return this.parseThrowStatement(r);
- case C._try:
- return this.parseTryStatement(r);
- case C._let:
- case C._const:
- e || this.unexpected();
- case C._var:
- return this.parseVarStatement(r, n);
- case C._while:
- return this.parseWhileStatement(r);
- case C._with:
- return this.parseWithStatement(r);
- case C.braceL:
- return this.parseBlock();
- case C.semi:
- return this.parseEmptyStatement(r);
- case C._export:
- case C._import:
- if (this.hasPlugin('dynamicImport') && this.lookahead().type === C.parenL) break;
- return this.options.allowImportExportEverywhere || (t || this.raise(this.state.start, '\'import\' and \'export\' may only appear at the top level'), this.inModule || this.raise(this.state.start, '\'import\' and \'export\' may appear only with \'sourceType: "module"\'')),
- n === C._import ? this.parseImport(r) : this.parseExport(r);
- case C.name:
- if ('async' === this.state.value) {
- var i = this.state.clone();
- if (this.next(), this.match(C._function) && !this.canInsertSemicolon()) return this.expect(C._function),
- this.parseFunction(r, !0, !1, !0);
- this.state = i
- }
- }
- var s = this.state.value,
- o = this.parseExpression();
- return n === C.name && 'Identifier' === o.type && this.eat(C.colon) ? this.parseLabeledStatement(r, s, o) : this.parseExpressionStatement(r, o)
- },
- U.takeDecorators = function (e) {
- this.state.decorators.length && (e.decorators = this.state.decorators, this.state.decorators = [
- ])
- },
- U.parseDecorators = function (e) {
- for (; this.match(C.at); ) {
- var t = this.parseDecorator();
- this.state.decorators.push(t)
- }
- e && this.match(C._export) || this.match(C._class) || this.raise(this.state.start, 'Leading decorators must be attached to a class declaration')
- },
- U.parseDecorator = function () {
- this.hasPlugin('decorators') || this.unexpected();
- var e = this.startNode();
- return this.next(),
- e.expression = this.parseMaybeAssign(),
- this.finishNode(e, 'Decorator')
- },
- U.parseBreakContinueStatement = function (e, t) {
- var n = 'break' === t;
- this.next(),
- this.isLineTerminator() ? e.label = null : this.match(C.name) ? (e.label = this.parseIdentifier(), this.semicolon()) : this.unexpected();
- var r = void 0;
- for (r = 0; r < this.state.labels.length; ++r) {
- var i = this.state.labels[r];
- if (null == e.label || i.name === e.label.name) {
- if (null != i.kind && (n || 'loop' === i.kind)) break;
- if (e.label && n) break
- }
- }
- return r === this.state.labels.length && this.raise(e.start, 'Unsyntactic ' + t),
- this.finishNode(e, n ? 'BreakStatement' : 'ContinueStatement')
- },
- U.parseDebuggerStatement = function (e) {
- return this.next(),
- this.semicolon(),
- this.finishNode(e, 'DebuggerStatement')
- },
- U.parseDoStatement = function (e) {
- return this.next(),
- this.state.labels.push(V),
- e.body = this.parseStatement(!1),
- this.state.labels.pop(),
- this.expect(C._while),
- e.test = this.parseParenExpression(),
- this.eat(C.semi),
- this.finishNode(e, 'DoWhileStatement')
- },
- U.parseForStatement = function (e) {
- this.next(),
- this.state.labels.push(V);
- var t = !1;
- if (this.hasPlugin('asyncGenerators') && this.state.inAsync && this.isContextual('await') && (t = !0, this.next()), this.expect(C.parenL), this.match(C.semi)) return t && this.unexpected(),
- this.parseFor(e, null);
- if (this.match(C._var) || this.match(C._let) || this.match(C._const)) {
- var n = this.startNode(),
- r = this.state.type;
- return this.next(),
- this.parseVar(n, !0, r),
- this.finishNode(n, 'VariableDeclaration'),
- !this.match(C._in) && !this.isContextual('of') || 1 !== n.declarations.length || n.declarations[0].init ? (t && this.unexpected(), this.parseFor(e, n)) : this.parseForIn(e, n, t)
- }
- var i = {
- start: 0
- },
- s = this.parseExpression(!0, i);
- if (this.match(C._in) || this.isContextual('of')) {
- var o = this.isContextual('of') ? 'for-of statement' : 'for-in statement';
- return this.toAssignable(s, void 0, o),
- this.checkLVal(s, void 0, void 0, o),
- this.parseForIn(e, s, t)
- }
- return i.start && this.unexpected(i.start),
- t && this.unexpected(),
- this.parseFor(e, s)
- },
- U.parseFunctionStatement = function (e) {
- return this.next(),
- this.parseFunction(e, !0)
- },
- U.parseIfStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- e.consequent = this.parseStatement(!1),
- e.alternate = this.eat(C._else) ? this.parseStatement(!1) : null,
- this.finishNode(e, 'IfStatement')
- },
- U.parseReturnStatement = function (e) {
- return this.state.inFunction || this.options.allowReturnOutsideFunction || this.raise(this.state.start, '\'return\' outside of function'),
- this.next(),
- this.isLineTerminator() ? e.argument = null : (e.argument = this.parseExpression(), this.semicolon()),
- this.finishNode(e, 'ReturnStatement')
- },
- U.parseSwitchStatement = function (e) {
- this.next(),
- e.discriminant = this.parseParenExpression(),
- e.cases = [
- ],
- this.expect(C.braceL),
- this.state.labels.push(z);
- for (var t, n = void 0; !this.match(C.braceR); ) if (this.match(C._case) || this.match(C._default)) {
- var r = this.match(C._case);
- n && this.finishNode(n, 'SwitchCase'),
- e.cases.push(n = this.startNode()),
- n.consequent = [
- ],
- this.next(),
- r ? n.test = this.parseExpression() : (t && this.raise(this.state.lastTokStart, 'Multiple default clauses'), t = !0, n.test = null),
- this.expect(C.colon)
- } else n ? n.consequent.push(this.parseStatement(!0)) : this.unexpected();
- return n && this.finishNode(n, 'SwitchCase'),
- this.next(),
- this.state.labels.pop(),
- this.finishNode(e, 'SwitchStatement')
- },
- U.parseThrowStatement = function (e) {
- return this.next(),
- D.test(this.input.slice(this.state.lastTokEnd, this.state.start)) && this.raise(this.state.lastTokEnd, 'Illegal newline after throw'),
- e.argument = this.parseExpression(),
- this.semicolon(),
- this.finishNode(e, 'ThrowStatement')
- };
- var q = [
- ];
- U.parseTryStatement = function (e) {
- if (this.next(), e.block = this.parseBlock(), e.handler = null, this.match(C._catch)) {
- var t = this.startNode();
- this.next(),
- this.expect(C.parenL),
- t.param = this.parseBindingAtom(),
- this.checkLVal(t.param, !0, Object.create(null), 'catch clause'),
- this.expect(C.parenR),
- t.body = this.parseBlock(),
- e.handler = this.finishNode(t, 'CatchClause')
- }
- return e.guardedHandlers = q,
- e.finalizer = this.eat(C._finally) ? this.parseBlock() : null,
- e.handler || e.finalizer || this.raise(e.start, 'Missing catch or finally clause'),
- this.finishNode(e, 'TryStatement')
- },
- U.parseVarStatement = function (e, t) {
- return this.next(),
- this.parseVar(e, !1, t),
- this.semicolon(),
- this.finishNode(e, 'VariableDeclaration')
- },
- U.parseWhileStatement = function (e) {
- return this.next(),
- e.test = this.parseParenExpression(),
- this.state.labels.push(V),
- e.body = this.parseStatement(!1),
- this.state.labels.pop(),
- this.finishNode(e, 'WhileStatement')
- },
- U.parseWithStatement = function (e) {
- return this.state.strict && this.raise(this.state.start, '\'with\' in strict mode'),
- this.next(),
- e.object = this.parseParenExpression(),
- e.body = this.parseStatement(!1),
- this.finishNode(e, 'WithStatement')
- },
- U.parseEmptyStatement = function (e) {
- return this.next(),
- this.finishNode(e, 'EmptyStatement')
- },
- U.parseLabeledStatement = function (e, t, n) {
- var r = this.state.labels,
- i = Array.isArray(r),
- s = 0;
- for (r = i ? r : r[Symbol.iterator](); ; ) {
- var o;
- if (i) {
- if (s >= r.length) break;
- o = r[s++]
- } else {
- if ((s = r.next()).done) break;
- o = s.value
- }
- o.name === t && this.raise(n.start, 'Label \'' + t + '\' is already declared')
- }
- for (var a = this.state.type.isLoop ? 'loop' : this.match(C._switch) ? 'switch' : null, u = this.state.labels.length - 1; u >= 0; u--) {
- var l = this.state.labels[u];
- if (l.statementStart !== e.start) break;
- l.statementStart = this.state.start,
- l.kind = a
- }
- return this.state.labels.push({
- name: t,
- kind: a,
- statementStart: this.state.start
- }),
- e.body = this.parseStatement(!0),
- this.state.labels.pop(),
- e.label = n,
- this.finishNode(e, 'LabeledStatement')
- },
- U.parseExpressionStatement = function (e, t) {
- return e.expression = t,
- this.semicolon(),
- this.finishNode(e, 'ExpressionStatement')
- },
- U.parseBlock = function (e) {
- var t = this.startNode();
- return this.expect(C.braceL),
- this.parseBlockBody(t, e, !1, C.braceR),
- this.finishNode(t, 'BlockStatement')
- },
- U.isValidDirective = function (e) {
- return 'ExpressionStatement' === e.type && 'StringLiteral' === e.expression.type && !e.expression.extra.parenthesized
- },
- U.parseBlockBody = function (e, t, n, r) {
- e.body = [
- ],
- e.directives = [
- ];
- for (var i = !1, s = void 0, o = void 0; !this.eat(r); ) {
- i || !this.state.containsOctal || o || (o = this.state.octalPosition);
- var a = this.parseStatement(!0, n);
- if (t && !i && this.isValidDirective(a)) {
- var u = this.stmtToDirective(a);
- e.directives.push(u),
- void 0 === s && 'use strict' === u.value.value && (s = this.state.strict, this.setStrict(!0), o && this.raise(o, 'Octal literal in strict mode'))
- } else i = !0,
- e.body.push(a)
- }
- !1 === s && this.setStrict(!1)
- },
- U.parseFor = function (e, t) {
- return e.init = t,
- this.expect(C.semi),
- e.test = this.match(C.semi) ? null : this.parseExpression(),
- this.expect(C.semi),
- e.update = this.match(C.parenR) ? null : this.parseExpression(),
- this.expect(C.parenR),
- e.body = this.parseStatement(!1),
- this.state.labels.pop(),
- this.finishNode(e, 'ForStatement')
- },
- U.parseForIn = function (e, t, n) {
- var r = void 0;
- return n ? (this.eatContextual('of'), r = 'ForAwaitStatement') : (r = this.match(C._in) ? 'ForInStatement' : 'ForOfStatement', this.next()),
- e.left = t,
- e.right = this.parseExpression(),
- this.expect(C.parenR),
- e.body = this.parseStatement(!1),
- this.state.labels.pop(),
- this.finishNode(e, r)
- },
- U.parseVar = function (e, t, n) {
- for (e.declarations = [
- ], e.kind = n.keyword; ; ) {
- var r = this.startNode();
- if (this.parseVarHead(r), this.eat(C.eq) ? r.init = this.parseMaybeAssign(t) : n !== C._const || this.match(C._in) || this.isContextual('of') ? 'Identifier' === r.id.type || t && (this.match(C._in) || this.isContextual('of')) ? r.init = null : this.raise(this.state.lastTokEnd, 'Complex binding patterns require an initialization value') : this.unexpected(), e.declarations.push(this.finishNode(r, 'VariableDeclarator')), !this.eat(C.comma)) break
- }
- return e
- },
- U.parseVarHead = function (e) {
- e.id = this.parseBindingAtom(),
- this.checkLVal(e.id, !0, void 0, 'variable declaration')
- },
- U.parseFunction = function (e, t, n, r, i) {
- var s = this.state.inMethod;
- return this.state.inMethod = !1,
- this.initFunction(e, r),
- this.match(C.star) && (e.async && !this.hasPlugin('asyncGenerators') ? this.unexpected() : (e.generator = !0, this.next())),
- !t || i || this.match(C.name) || this.match(C._yield) || this.unexpected(),
- (this.match(C.name) || this.match(C._yield)) && (e.id = this.parseBindingIdentifier()),
- this.parseFunctionParams(e),
- this.parseFunctionBody(e, n),
- this.state.inMethod = s,
- this.finishNode(e, t ? 'FunctionDeclaration' : 'FunctionExpression')
- },
- U.parseFunctionParams = function (e) {
- this.expect(C.parenL),
- e.params = this.parseBindingList(C.parenR)
- },
- U.parseClass = function (e, t, n) {
- return this.next(),
- this.takeDecorators(e),
- this.parseClassId(e, t, n),
- this.parseClassSuper(e),
- this.parseClassBody(e),
- this.finishNode(e, t ? 'ClassDeclaration' : 'ClassExpression')
- },
- U.isClassProperty = function () {
- return this.match(C.eq) || this.match(C.semi) || this.match(C.braceR)
- },
- U.isClassMethod = function () {
- return this.match(C.parenL)
- },
- U.isNonstaticConstructor = function (e) {
- return !(e.computed || e.static || 'constructor' !== e.key.name && 'constructor' !== e.key.value)
- },
- U.parseClassBody = function (e) {
- var t = this.state.strict;
- this.state.strict = !0;
- var n = !1,
- r = !1,
- i = [
- ],
- s = this.startNode();
- for (s.body = [
- ], this.expect(C.braceL); !this.eat(C.braceR); ) if (this.eat(C.semi)) i.length > 0 && this.raise(this.state.lastTokEnd, 'Decorators must not be followed by a semicolon');
- else if (this.match(C.at)) i.push(this.parseDecorator());
- else {
- var o = this.startNode();
- if (i.length && (o.decorators = i, i = [
- ]), o.static = !1, this.match(C.name) && 'static' === this.state.value) {
- var a = this.parseIdentifier(!0);
- if (this.isClassMethod()) {
- o.kind = 'method',
- o.computed = !1,
- o.key = a,
- this.parseClassMethod(s, o, !1, !1);
- continue
- }
- if (this.isClassProperty()) {
- o.computed = !1,
- o.key = a,
- s.body.push(this.parseClassProperty(o));
- continue
- }
- o.static = !0
- }
- if (this.eat(C.star)) o.kind = 'method',
- this.parsePropertyName(o),
- this.isNonstaticConstructor(o) && this.raise(o.key.start, 'Constructor can\'t be a generator'),
- o.computed || !o.static || 'prototype' !== o.key.name && 'prototype' !== o.key.value || this.raise(o.key.start, 'Classes may not have static property named prototype'),
- this.parseClassMethod(s, o, !0, !1);
- else {
- var u = this.match(C.name),
- l = this.parsePropertyName(o);
- if (o.computed || !o.static || 'prototype' !== o.key.name && 'prototype' !== o.key.value || this.raise(o.key.start, 'Classes may not have static property named prototype'), this.isClassMethod()) this.isNonstaticConstructor(o) ? (r ? this.raise(l.start, 'Duplicate constructor in the same class') : o.decorators && this.raise(o.start, 'You can\'t attach decorators to a class constructor'), r = !0, o.kind = 'constructor') : o.kind = 'method',
- this.parseClassMethod(s, o, !1, !1);
- else if (this.isClassProperty()) this.isNonstaticConstructor(o) && this.raise(o.key.start, 'Classes may not have a non-static field named \'constructor\''),
- s.body.push(this.parseClassProperty(o));
- else if (u && 'async' === l.name && !this.isLineTerminator()) {
- var c = this.hasPlugin('asyncGenerators') && this.eat(C.star);
- o.kind = 'method',
- this.parsePropertyName(o),
- this.isNonstaticConstructor(o) && this.raise(o.key.start, 'Constructor can\'t be an async function'),
- this.parseClassMethod(s, o, c, !0)
- } else !u || 'get' !== l.name && 'set' !== l.name || this.isLineTerminator() && this.match(C.star) ? this.hasPlugin('classConstructorCall') && u && 'call' === l.name && this.match(C.name) && 'constructor' === this.state.value ? (n ? this.raise(o.start, 'Duplicate constructor call in the same class') : o.decorators && this.raise(o.start, 'You can\'t attach decorators to a class constructor'), n = !0, o.kind = 'constructorCall', this.parsePropertyName(o), this.parseClassMethod(s, o, !1, !1)) : this.isLineTerminator() ? (this.isNonstaticConstructor(o) && this.raise(o.key.start, 'Classes may not have a non-static field named \'constructor\''), s.body.push(this.parseClassProperty(o))) : this.unexpected() : (o.kind = l.name, this.parsePropertyName(o), this.isNonstaticConstructor(o) && this.raise(o.key.start, 'Constructor can\'t have get/set modifier'), this.parseClassMethod(s, o, !1, !1), this.checkGetterSetterParamCount(o))
- }
- }
- i.length && this.raise(this.state.start, 'You have trailing decorators with no method'),
- e.body = this.finishNode(s, 'ClassBody'),
- this.state.strict = t
- },
- U.parseClassProperty = function (e) {
- return this.state.inClassProperty = !0,
- this.match(C.eq) ? (this.hasPlugin('classProperties') || this.unexpected(), this.next(), e.value = this.parseMaybeAssign()) : e.value = null,
- this.semicolon(),
- this.state.inClassProperty = !1,
- this.finishNode(e, 'ClassProperty')
- },
- U.parseClassMethod = function (e, t, n, r) {
- this.parseMethod(t, n, r),
- e.body.push(this.finishNode(t, 'ClassMethod'))
- },
- U.parseClassId = function (e, t, n) {
- this.match(C.name) ? e.id = this.parseIdentifier() : n || !t ? e.id = null : this.unexpected()
- },
- U.parseClassSuper = function (e) {
- e.superClass = this.eat(C._extends) ? this.parseExprSubscripts() : null
- },
- U.parseExport = function (e) {
- if (this.next(), this.match(C.star)) {
- var t = this.startNode();
- if (this.next(), !this.hasPlugin('exportExtensions') || !this.eatContextual('as')) return this.parseExportFrom(e, !0),
- this.finishNode(e, 'ExportAllDeclaration');
- t.exported = this.parseIdentifier(),
- e.specifiers = [
- this.finishNode(t, 'ExportNamespaceSpecifier')
- ],
- this.parseExportSpecifiersMaybe(e),
- this.parseExportFrom(e, !0)
- } else if (this.hasPlugin('exportExtensions') && this.isExportDefaultSpecifier()) {
- var n = this.startNode();
- if (n.exported = this.parseIdentifier(!0), e.specifiers = [
- this.finishNode(n, 'ExportDefaultSpecifier')
- ], this.match(C.comma) && this.lookahead().type === C.star) {
- this.expect(C.comma);
- var r = this.startNode();
- this.expect(C.star),
- this.expectContextual('as'),
- r.exported = this.parseIdentifier(),
- e.specifiers.push(this.finishNode(r, 'ExportNamespaceSpecifier'))
- } else this.parseExportSpecifiersMaybe(e);
- this.parseExportFrom(e, !0)
- } else {
- if (this.eat(C._default)) {
- var i = this.startNode(),
- s = !1;
- return this.eat(C._function) ? i = this.parseFunction(i, !0, !1, !1, !0) : this.match(C._class) ? i = this.parseClass(i, !0, !0) : (s = !0, i = this.parseMaybeAssign()),
- e.declaration = i,
- s && this.semicolon(),
- this.checkExport(e, !0, !0),
- this.finishNode(e, 'ExportDefaultDeclaration')
- }
- this.shouldParseExportDeclaration() ? (e.specifiers = [
- ], e.source = null, e.declaration = this.parseExportDeclaration(e)) : (e.declaration = null, e.specifiers = this.parseExportSpecifiers(), this.parseExportFrom(e))
- }
- return this.checkExport(e, !0),
- this.finishNode(e, 'ExportNamedDeclaration')
- },
- U.parseExportDeclaration = function () {
- return this.parseStatement(!0)
- },
- U.isExportDefaultSpecifier = function () {
- if (this.match(C.name)) return 'async' !== this.state.value;
- if (!this.match(C._default)) return !1;
- var e = this.lookahead();
- return e.type === C.comma || e.type === C.name && 'from' === e.value
- },
- U.parseExportSpecifiersMaybe = function (e) {
- this.eat(C.comma) && (e.specifiers = e.specifiers.concat(this.parseExportSpecifiers()))
- },
- U.parseExportFrom = function (e, t) {
- this.eatContextual('from') ? (e.source = this.match(C.string) ? this.parseExprAtom() : this.unexpected(), this.checkExport(e)) : t ? this.unexpected() : e.source = null,
- this.semicolon()
- },
- U.shouldParseExportDeclaration = function () {
- return 'var' === this.state.type.keyword || 'const' === this.state.type.keyword || 'let' === this.state.type.keyword || 'function' === this.state.type.keyword || 'class' === this.state.type.keyword || this.isContextual('async')
- },
- U.checkExport = function (e, t, n) {
- if (t) if (n) this.checkDuplicateExports(e, 'default');
- else if (e.specifiers && e.specifiers.length) {
- var r = e.specifiers,
- i = Array.isArray(r),
- s = 0;
- for (r = i ? r : r[Symbol.iterator](); ; ) {
- var o;
- if (i) {
- if (s >= r.length) break;
- o = r[s++]
- } else {
- if ((s = r.next()).done) break;
- o = s.value
- }
- var a = o;
- this.checkDuplicateExports(a, a.exported.name)
- }
- } else if (e.declaration) if ('FunctionDeclaration' === e.declaration.type || 'ClassDeclaration' === e.declaration.type) this.checkDuplicateExports(e, e.declaration.id.name);
- else if ('VariableDeclaration' === e.declaration.type) {
- var u = e.declaration.declarations,
- l = Array.isArray(u),
- c = 0;
- for (u = l ? u : u[Symbol.iterator](); ; ) {
- var p;
- if (l) {
- if (c >= u.length) break;
- p = u[c++]
- } else {
- if ((c = u.next()).done) break;
- p = c.value
- }
- var h = p;
- this.checkDeclaration(h.id)
- }
- }
- if (this.state.decorators.length) {
- var f = e.declaration && ('ClassDeclaration' === e.declaration.type || 'ClassExpression' === e.declaration.type);
- e.declaration && f || this.raise(e.start, 'You can only use decorators on an export when exporting a class'),
- this.takeDecorators(e.declaration)
- }
- },
- U.checkDeclaration = function (e) {
- if ('ObjectPattern' === e.type) {
- var t = e.properties,
- n = Array.isArray(t),
- r = 0;
- for (t = n ? t : t[Symbol.iterator](); ; ) {
- var i;
- if (n) {
- if (r >= t.length) break;
- i = t[r++]
- } else {
- if ((r = t.next()).done) break;
- i = r.value
- }
- var s = i;
- this.checkDeclaration(s)
- }
- } else if ('ArrayPattern' === e.type) {
- var o = e.elements,
- a = Array.isArray(o),
- u = 0;
- for (o = a ? o : o[Symbol.iterator](); ; ) {
- var l;
- if (a) {
- if (u >= o.length) break;
- l = o[u++]
- } else {
- if ((u = o.next()).done) break;
- l = u.value
- }
- var c = l;
- c && this.checkDeclaration(c)
- }
- } else 'ObjectProperty' === e.type ? this.checkDeclaration(e.value) : 'RestElement' === e.type || 'RestProperty' === e.type ? this.checkDeclaration(e.argument) : 'Identifier' === e.type && this.checkDuplicateExports(e, e.name)
- },
- U.checkDuplicateExports = function (e, t) {
- this.state.exportedIdentifiers.indexOf(t) > - 1 && this.raiseDuplicateExportError(e, t),
- this.state.exportedIdentifiers.push(t)
- },
- U.raiseDuplicateExportError = function (e, t) {
- this.raise(e.start, 'default' === t ? 'Only one default export allowed per module.' : '`' + t + '` has already been exported. Exported identifiers must be unique.')
- },
- U.parseExportSpecifiers = function () {
- var e = [
- ],
- t = !0,
- n = void 0;
- for (this.expect(C.braceL); !this.eat(C.braceR); ) {
- if (t) t = !1;
- else if (this.expect(C.comma), this.eat(C.braceR)) break;
- var r = this.match(C._default);
- r && !n && (n = !0);
- var i = this.startNode();
- i.local = this.parseIdentifier(r),
- i.exported = this.eatContextual('as') ? this.parseIdentifier(!0) : i.local.__clone(),
- e.push(this.finishNode(i, 'ExportSpecifier'))
- }
- return n && !this.isContextual('from') && this.unexpected(),
- e
- },
- U.parseImport = function (e) {
- return this.eat(C._import),
- this.match(C.string) ? (e.specifiers = [
- ], e.source = this.parseExprAtom()) : (e.specifiers = [
- ], this.parseImportSpecifiers(e), this.expectContextual('from'), e.source = this.match(C.string) ? this.parseExprAtom() : this.unexpected()),
- this.semicolon(),
- this.finishNode(e, 'ImportDeclaration')
- },
- U.parseImportSpecifiers = function (e) {
- var t = !0;
- if (this.match(C.name)) {
- var n = this.state.start,
- r = this.state.startLoc;
- if (e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(), n, r)), !this.eat(C.comma)) return
- }
- if (this.match(C.star)) {
- var i = this.startNode();
- return this.next(),
- this.expectContextual('as'),
- i.local = this.parseIdentifier(),
- this.checkLVal(i.local, !0, void 0, 'import namespace specifier'),
- void e.specifiers.push(this.finishNode(i, 'ImportNamespaceSpecifier'))
- }
- for (this.expect(C.braceL); !this.eat(C.braceR); ) {
- if (t) t = !1;
- else if (this.eat(C.colon) && this.unexpected(null, 'ES2015 named imports do not destructure. Use another statement for destructuring after the import.'), this.expect(C.comma), this.eat(C.braceR)) break;
- this.parseImportSpecifier(e)
- }
- },
- U.parseImportSpecifier = function (e) {
- var t = this.startNode();
- t.imported = this.parseIdentifier(!0),
- this.eatContextual('as') ? t.local = this.parseIdentifier() : (this.checkReservedWord(t.imported.name, t.start, !0, !0), t.local = t.imported.__clone()),
- this.checkLVal(t.local, !0, void 0, 'import specifier'),
- e.specifiers.push(this.finishNode(t, 'ImportSpecifier'))
- },
- U.parseImportSpecifierDefault = function (e, t, n) {
- var r = this.startNodeAt(t, n);
- return r.local = e,
- this.checkLVal(r.local, !0, void 0, 'default import specifier'),
- this.finishNode(r, 'ImportDefaultSpecifier')
- };
- var K = j.prototype;
- K.toAssignable = function (e, t, n) {
- if (e) switch (e.type) {
- case 'Identifier':
- case 'ObjectPattern':
- case 'ArrayPattern':
- case 'AssignmentPattern':
- break;
- case 'ObjectExpression':
- e.type = 'ObjectPattern';
- var r = e.properties,
- i = Array.isArray(r),
- s = 0;
- for (r = i ? r : r[Symbol.iterator](); ; ) {
- var o;
- if (i) {
- if (s >= r.length) break;
- o = r[s++]
- } else {
- if ((s = r.next()).done) break;
- o = s.value
- }
- var a = o;
- 'ObjectMethod' === a.type ? 'get' === a.kind || 'set' === a.kind ? this.raise(a.key.start, 'Object pattern can\'t contain getter or setter') : this.raise(a.key.start, 'Object pattern can\'t contain methods') : this.toAssignable(a, t, 'object destructuring pattern')
- }
- break;
- case 'ObjectProperty':
- this.toAssignable(e.value, t, n);
- break;
- case 'SpreadProperty':
- e.type = 'RestProperty';
- var u = e.argument;
- this.toAssignable(u, t, n);
- break;
- case 'ArrayExpression':
- e.type = 'ArrayPattern',
- this.toAssignableList(e.elements, t, n);
- break;
- case 'AssignmentExpression':
- '=' === e.operator ? (e.type = 'AssignmentPattern', delete e.operator) : this.raise(e.left.end, 'Only \'=\' operator can be used for specifying default value.');
- break;
- case 'MemberExpression':
- if (!t) break;
- default:
- var l = 'Invalid left-hand side' + (n ? ' in ' + n : 'expression');
- this.raise(e.start, l)
- }
- return e
- },
- K.toAssignableList = function (e, t, n) {
- var r = e.length;
- if (r) {
- var i = e[r - 1];
- if (i && 'RestElement' === i.type) --r;
- else if (i && 'SpreadElement' === i.type) {
- i.type = 'RestElement';
- var s = i.argument;
- this.toAssignable(s, t, n),
- 'Identifier' !== s.type && 'MemberExpression' !== s.type && 'ArrayPattern' !== s.type && this.unexpected(s.start),
- --r
- }
- }
- for (var o = 0; o < r; o++) {
- var a = e[o];
- a && this.toAssignable(a, t, n)
- }
- return e
- },
- K.toReferencedList = function (e) {
- return e
- },
- K.parseSpread = function (e) {
- var t = this.startNode();
- return this.next(),
- t.argument = this.parseMaybeAssign(!1, e),
- this.finishNode(t, 'SpreadElement')
- },
- K.parseRest = function () {
- var e = this.startNode();
- return this.next(),
- e.argument = this.parseBindingIdentifier(),
- this.finishNode(e, 'RestElement')
- },
- K.shouldAllowYieldIdentifier = function () {
- return this.match(C._yield) && !this.state.strict && !this.state.inGenerator
- },
- K.parseBindingIdentifier = function () {
- return this.parseIdentifier(this.shouldAllowYieldIdentifier())
- },
- K.parseBindingAtom = function () {
- switch (this.state.type) {
- case C._yield:
- (this.state.strict || this.state.inGenerator) && this.unexpected();
- case C.name:
- return this.parseIdentifier(!0);
- case C.bracketL:
- var e = this.startNode();
- return this.next(),
- e.elements = this.parseBindingList(C.bracketR, !0),
- this.finishNode(e, 'ArrayPattern');
- case C.braceL:
- return this.parseObj(!0);
- default:
- this.unexpected()
- }
- },
- K.parseBindingList = function (e, t) {
- for (var n = [
- ], r = !0; !this.eat(e); ) if (r ? r = !1 : this.expect(C.comma), t && this.match(C.comma)) n.push(null);
- else {
- if (this.eat(e)) break;
- if (this.match(C.ellipsis)) {
- n.push(this.parseAssignableListItemTypes(this.parseRest())),
- this.expect(e);
- break
- }
- for (var i = [
- ]; this.match(C.at); ) i.push(this.parseDecorator());
- var s = this.parseMaybeDefault();
- i.length && (s.decorators = i),
- this.parseAssignableListItemTypes(s),
- n.push(this.parseMaybeDefault(s.start, s.loc.start, s))
- }
- return n
- },
- K.parseAssignableListItemTypes = function (e) {
- return e
- },
- K.parseMaybeDefault = function (e, t, n) {
- if (t = t || this.state.startLoc, e = e || this.state.start, n = n || this.parseBindingAtom(), !this.eat(C.eq)) return n;
- var r = this.startNodeAt(e, t);
- return r.left = n,
- r.right = this.parseMaybeAssign(),
- this.finishNode(r, 'AssignmentPattern')
- },
- K.checkLVal = function (e, t, n, r) {
- switch (e.type) {
- case 'Identifier':
- if (this.checkReservedWord(e.name, e.start, !1, !0), n) {
- var i = '_' + e.name;
- n[i] ? this.raise(e.start, 'Argument name clash in strict mode') : n[i] = !0
- }
- break;
- case 'MemberExpression':
- t && this.raise(e.start, (t ? 'Binding' : 'Assigning to') + ' member expression');
- break;
- case 'ObjectPattern':
- var s = e.properties,
- o = Array.isArray(s),
- a = 0;
- for (s = o ? s : s[Symbol.iterator](); ; ) {
- var u;
- if (o) {
- if (a >= s.length) break;
- u = s[a++]
- } else {
- if ((a = s.next()).done) break;
- u = a.value
- }
- var l = u;
- 'ObjectProperty' === l.type && (l = l.value),
- this.checkLVal(l, t, n, 'object destructuring pattern')
- }
- break;
- case 'ArrayPattern':
- var c = e.elements,
- p = Array.isArray(c),
- h = 0;
- for (c = p ? c : c[Symbol.iterator](); ; ) {
- var f;
- if (p) {
- if (h >= c.length) break;
- f = c[h++]
- } else {
- if ((h = c.next()).done) break;
- f = h.value
- }
- var d = f;
- d && this.checkLVal(d, t, n, 'array destructuring pattern')
- }
- break;
- case 'AssignmentPattern':
- this.checkLVal(e.left, t, n, 'assignment pattern');
- break;
- case 'RestProperty':
- this.checkLVal(e.argument, t, n, 'rest property');
- break;
- case 'RestElement':
- this.checkLVal(e.argument, t, n, 'rest element');
- break;
- default:
- var m = (t ? 'Binding invalid' : 'Invalid') + ' left-hand side' + (r ? ' in ' + r : 'expression');
- this.raise(e.start, m)
- }
- };
- var $ = j.prototype;
- $.checkPropClash = function (e, t) {
- if (!e.computed && !e.kind) {
- var n = e.key;
- '__proto__' === ('Identifier' === n.type ? n.name : String(n.value)) && (t.proto && this.raise(n.start, 'Redefinition of __proto__ property'), t.proto = !0)
- }
- },
- $.getExpression = function () {
- this.nextToken();
- var e = this.parseExpression();
- return this.match(C.eof) || this.unexpected(),
- e
- },
- $.parseExpression = function (e, t) {
- var n = this.state.start,
- r = this.state.startLoc,
- i = this.parseMaybeAssign(e, t);
- if (this.match(C.comma)) {
- var s = this.startNodeAt(n, r);
- for (s.expressions = [
- i
- ]; this.eat(C.comma); ) s.expressions.push(this.parseMaybeAssign(e, t));
- return this.toReferencedList(s.expressions),
- this.finishNode(s, 'SequenceExpression')
- }
- return i
- },
- $.parseMaybeAssign = function (e, t, n, r) {
- var i = this.state.start,
- s = this.state.startLoc;
- if (this.match(C._yield) && this.state.inGenerator) {
- var o = this.parseYield();
- return n && (o = n.call(this, o, i, s)),
- o
- }
- var a = void 0;
- t ? a = !1 : (t = {
- start: 0
- }, a = !0),
- (this.match(C.parenL) || this.match(C.name)) && (this.state.potentialArrowAt = this.state.start);
- var u = this.parseMaybeConditional(e, t, r);
- if (n && (u = n.call(this, u, i, s)), this.state.type.isAssign) {
- var l = this.startNodeAt(i, s);
- if (l.operator = this.state.value, l.left = this.match(C.eq) ? this.toAssignable(u, void 0, 'assignment expression') : u, t.start = 0, this.checkLVal(u, void 0, void 0, 'assignment expression'), u.extra && u.extra.parenthesized) {
- var c = void 0;
- 'ObjectPattern' === u.type ? c = '`({a}) = 0` use `({a} = 0)`' : 'ArrayPattern' === u.type && (c = '`([a]) = 0` use `([a] = 0)`'),
- c && this.raise(u.start, 'You\'re trying to assign to a parenthesized expression, eg. instead of ' + c)
- }
- return this.next(),
- l.right = this.parseMaybeAssign(e),
- this.finishNode(l, 'AssignmentExpression')
- }
- return a && t.start && this.unexpected(t.start),
- u
- },
- $.parseMaybeConditional = function (e, t, n) {
- var r = this.state.start,
- i = this.state.startLoc,
- s = this.parseExprOps(e, t);
- return t && t.start ? s : this.parseConditional(s, e, r, i, n)
- },
- $.parseConditional = function (e, t, n, r) {
- if (this.eat(C.question)) {
- var i = this.startNodeAt(n, r);
- return i.test = e,
- i.consequent = this.parseMaybeAssign(),
- this.expect(C.colon),
- i.alternate = this.parseMaybeAssign(t),
- this.finishNode(i, 'ConditionalExpression')
- }
- return e
- },
- $.parseExprOps = function (e, t) {
- var n = this.state.start,
- r = this.state.startLoc,
- i = this.parseMaybeUnary(t);
- return t && t.start ? i : this.parseExprOp(i, n, r, - 1, e)
- },
- $.parseExprOp = function (e, t, n, r, i) {
- var s = this.state.type.binop;
- if (!(null == s || i && this.match(C._in)) && s > r) {
- var o = this.startNodeAt(t, n);
- o.left = e,
- o.operator = this.state.value,
- '**' !== o.operator || 'UnaryExpression' !== e.type || !e.extra || e.extra.parenthesizedArgument || e.extra.parenthesized || this.raise(e.argument.start, 'Illegal expression. Wrap left hand side or entire exponentiation in parentheses.');
- var a = this.state.type;
- this.next();
- var u = this.state.start,
- l = this.state.startLoc;
- return o.right = this.parseExprOp(this.parseMaybeUnary(), u, l, a.rightAssociative ? s - 1 : s, i),
- this.finishNode(o, a === C.logicalOR || a === C.logicalAND ? 'LogicalExpression' : 'BinaryExpression'),
- this.parseExprOp(o, t, n, r, i)
- }
- return e
- },
- $.parseMaybeUnary = function (e) {
- if (this.state.type.prefix) {
- var t = this.startNode(),
- n = this.match(C.incDec);
- t.operator = this.state.value,
- t.prefix = !0,
- this.next();
- var r = this.state.type;
- return t.argument = this.parseMaybeUnary(),
- this.addExtra(t, 'parenthesizedArgument', !(r !== C.parenL || t.argument.extra && t.argument.extra.parenthesized)),
- e && e.start && this.unexpected(e.start),
- n ? this.checkLVal(t.argument, void 0, void 0, 'prefix operation') : this.state.strict && 'delete' === t.operator && 'Identifier' === t.argument.type && this.raise(t.start, 'Deleting local variable in strict mode'),
- this.finishNode(t, n ? 'UpdateExpression' : 'UnaryExpression')
- }
- var i = this.state.start,
- s = this.state.startLoc,
- o = this.parseExprSubscripts(e);
- if (e && e.start) return o;
- for (; this.state.type.postfix && !this.canInsertSemicolon(); ) {
- var a = this.startNodeAt(i, s);
- a.operator = this.state.value,
- a.prefix = !1,
- a.argument = o,
- this.checkLVal(o, void 0, void 0, 'postfix operation'),
- this.next(),
- o = this.finishNode(a, 'UpdateExpression')
- }
- return o
- },
- $.parseExprSubscripts = function (e) {
- var t = this.state.start,
- n = this.state.startLoc,
- r = this.state.potentialArrowAt,
- i = this.parseExprAtom(e);
- return 'ArrowFunctionExpression' === i.type && i.start === r ? i : e && e.start ? i : this.parseSubscripts(i, t, n)
- },
- $.parseSubscripts = function (e, t, n, r) {
- for (; ; ) {
- if (!r && this.eat(C.doubleColon)) {
- var i = this.startNodeAt(t, n);
- return i.object = e,
- i.callee = this.parseNoCallExpr(),
- this.parseSubscripts(this.finishNode(i, 'BindExpression'), t, n, r)
- }
- if (this.eat(C.dot)) {
- var s = this.startNodeAt(t, n);
- s.object = e,
- s.property = this.parseIdentifier(!0),
- s.computed = !1,
- e = this.finishNode(s, 'MemberExpression')
- } else if (this.eat(C.bracketL)) {
- var o = this.startNodeAt(t, n);
- o.object = e,
- o.property = this.parseExpression(),
- o.computed = !0,
- this.expect(C.bracketR),
- e = this.finishNode(o, 'MemberExpression')
- } else if (!r && this.match(C.parenL)) {
- var a = this.state.potentialArrowAt === e.start && 'Identifier' === e.type && 'async' === e.name && !this.canInsertSemicolon();
- this.next();
- var u = this.startNodeAt(t, n);
- if (u.callee = e, u.arguments = this.parseCallExpressionArguments(C.parenR, a), 'Import' === u.callee.type && 1 !== u.arguments.length && this.raise(u.start, 'import() requires exactly one argument'), e = this.finishNode(u, 'CallExpression'), a && this.shouldParseAsyncArrow()) return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t, n), u);
- this.toReferencedList(u.arguments)
- } else {
- if (!this.match(C.backQuote)) return e;
- var l = this.startNodeAt(t, n);
- l.tag = e,
- l.quasi = this.parseTemplate(!0),
- e = this.finishNode(l, 'TaggedTemplateExpression')
- }
- }
- },
- $.parseCallExpressionArguments = function (e, t) {
- for (var n = [
- ], r = void 0, i = !0; !this.eat(e); ) {
- if (i) i = !1;
- else if (this.expect(C.comma), this.eat(e)) break;
- this.match(C.parenL) && !r && (r = this.state.start),
- n.push(this.parseExprListItem(!1, t ? {
- start: 0
- }
- : void 0, t ? {
- start: 0
- }
- : void 0))
- }
- return t && r && this.shouldParseAsyncArrow() && this.unexpected(),
- n
- },
- $.shouldParseAsyncArrow = function () {
- return this.match(C.arrow)
- },
- $.parseAsyncArrowFromCallExpression = function (e, t) {
- return this.expect(C.arrow),
- this.parseArrowExpression(e, t.arguments, !0)
- },
- $.parseNoCallExpr = function () {
- var e = this.state.start,
- t = this.state.startLoc;
- return this.parseSubscripts(this.parseExprAtom(), e, t, !0)
- },
- $.parseExprAtom = function (e) {
- var t = this.state.potentialArrowAt === this.state.start,
- n = void 0;
- switch (this.state.type) {
- case C._super:
- return this.state.inMethod || this.state.inClassProperty || this.options.allowSuperOutsideMethod || this.raise(this.state.start, '\'super\' outside of function or class'),
- n = this.startNode(),
- this.next(),
- this.match(C.parenL) || this.match(C.bracketL) || this.match(C.dot) || this.unexpected(),
- this.match(C.parenL) && 'constructor' !== this.state.inMethod && !this.options.allowSuperOutsideMethod && this.raise(n.start, 'super() outside of class constructor'),
- this.finishNode(n, 'Super');
- case C._import:
- return this.hasPlugin('dynamicImport') || this.unexpected(),
- n = this.startNode(),
- this.next(),
- this.match(C.parenL) || this.unexpected(null, C.parenL),
- this.finishNode(n, 'Import');
- case C._this:
- return n = this.startNode(),
- this.next(),
- this.finishNode(n, 'ThisExpression');
- case C._yield:
- this.state.inGenerator && this.unexpected();
- case C.name:
- n = this.startNode();
- var r = 'await' === this.state.value && this.state.inAsync,
- i = this.shouldAllowYieldIdentifier(),
- s = this.parseIdentifier(r || i);
- if ('await' === s.name) {
- if (this.state.inAsync || this.inModule) return this.parseAwait(n)
- } else {
- if ('async' === s.name && this.match(C._function) && !this.canInsertSemicolon()) return this.next(),
- this.parseFunction(n, !1, !1, !0);
- if (t && 'async' === s.name && this.match(C.name)) {
- var o = [
- this.parseIdentifier()
- ];
- return this.expect(C.arrow),
- this.parseArrowExpression(n, o, !0)
- }
- }
- return t && !this.canInsertSemicolon() && this.eat(C.arrow) ? this.parseArrowExpression(n, [
- s
- ]) : s;
- case C._do:
- if (this.hasPlugin('doExpressions')) {
- var a = this.startNode();
- this.next();
- var u = this.state.inFunction,
- l = this.state.labels;
- return this.state.labels = [
- ],
- this.state.inFunction = !1,
- a.body = this.parseBlock(!1, !0),
- this.state.inFunction = u,
- this.state.labels = l,
- this.finishNode(a, 'DoExpression')
- }
- case C.regexp:
- var c = this.state.value;
- return (n = this.parseLiteral(c.value, 'RegExpLiteral')).pattern = c.pattern,
- n.flags = c.flags,
- n;
- case C.num:
- return this.parseLiteral(this.state.value, 'NumericLiteral');
- case C.string:
- return this.parseLiteral(this.state.value, 'StringLiteral');
- case C._null:
- return n = this.startNode(),
- this.next(),
- this.finishNode(n, 'NullLiteral');
- case C._true:
- case C._false:
- return (n = this.startNode()).value = this.match(C._true),
- this.next(),
- this.finishNode(n, 'BooleanLiteral');
- case C.parenL:
- return this.parseParenAndDistinguishExpression(null, null, t);
- case C.bracketL:
- return n = this.startNode(),
- this.next(),
- n.elements = this.parseExprList(C.bracketR, !0, e),
- this.toReferencedList(n.elements),
- this.finishNode(n, 'ArrayExpression');
- case C.braceL:
- return this.parseObj(!1, e);
- case C._function:
- return this.parseFunctionExpression();
- case C.at:
- this.parseDecorators();
- case C._class:
- return n = this.startNode(),
- this.takeDecorators(n),
- this.parseClass(n, !1);
- case C._new:
- return this.parseNew();
- case C.backQuote:
- return this.parseTemplate(!1);
- case C.doubleColon:
- n = this.startNode(),
- this.next(),
- n.object = null;
- var p = n.callee = this.parseNoCallExpr();
- if ('MemberExpression' === p.type) return this.finishNode(n, 'BindExpression');
- this.raise(p.start, 'Binding should be performed on object property.');
- default:
- this.unexpected()
- }
- },
- $.parseFunctionExpression = function () {
- var e = this.startNode(),
- t = this.parseIdentifier(!0);
- return this.state.inGenerator && this.eat(C.dot) && this.hasPlugin('functionSent') ? this.parseMetaProperty(e, t, 'sent') : this.parseFunction(e, !1)
- },
- $.parseMetaProperty = function (e, t, n) {
- return e.meta = t,
- e.property = this.parseIdentifier(!0),
- e.property.name !== n && this.raise(e.property.start, 'The only valid meta property for new is ' + t.name + '.' + n),
- this.finishNode(e, 'MetaProperty')
- },
- $.parseLiteral = function (e, t, n, r) {
- n = n || this.state.start,
- r = r || this.state.startLoc;
- var i = this.startNodeAt(n, r);
- return this.addExtra(i, 'rawValue', e),
- this.addExtra(i, 'raw', this.input.slice(n, this.state.end)),
- i.value = e,
- this.next(),
- this.finishNode(i, t)
- },
- $.parseParenExpression = function () {
- this.expect(C.parenL);
- var e = this.parseExpression();
- return this.expect(C.parenR),
- e
- },
- $.parseParenAndDistinguishExpression = function (e, t, n) {
- e = e || this.state.start,
- t = t || this.state.startLoc;
- var r = void 0;
- this.expect(C.parenL);
- for (var i = this.state.start, s = this.state.startLoc, o = [
- ], a = {
- start: 0
- }, u = {
- start: 0
- }, l = !0, c = void 0, p = void 0; !this.match(C.parenR); ) {
- if (l) l = !1;
- else if (this.expect(C.comma, u.start || null), this.match(C.parenR)) {
- p = this.state.start;
- break
- }
- if (this.match(C.ellipsis)) {
- var h = this.state.start,
- f = this.state.startLoc;
- c = this.state.start,
- o.push(this.parseParenItem(this.parseRest(), h, f));
- break
- }
- o.push(this.parseMaybeAssign(!1, a, this.parseParenItem, u))
- }
- var d = this.state.start,
- m = this.state.startLoc;
- this.expect(C.parenR);
- var g = this.startNodeAt(e, t);
- if (n && this.shouldParseArrow() && (g = this.parseArrow(g))) {
- var y = o,
- v = Array.isArray(y),
- b = 0;
- for (y = v ? y : y[Symbol.iterator](); ; ) {
- var x;
- if (v) {
- if (b >= y.length) break;
- x = y[b++]
- } else {
- if ((b = y.next()).done) break;
- x = b.value
- }
- var A = x;
- A.extra && A.extra.parenthesized && this.unexpected(A.extra.parenStart)
- }
- return this.parseArrowExpression(g, o)
- }
- return o.length || this.unexpected(this.state.lastTokStart),
- p && this.unexpected(p),
- c && this.unexpected(c),
- a.start && this.unexpected(a.start),
- u.start && this.unexpected(u.start),
- o.length > 1 ? ((r = this.startNodeAt(i, s)).expressions = o, this.toReferencedList(r.expressions), this.finishNodeAt(r, 'SequenceExpression', d, m)) : r = o[0],
- this.addExtra(r, 'parenthesized', !0),
- this.addExtra(r, 'parenStart', e),
- r
- },
- $.shouldParseArrow = function () {
- return !this.canInsertSemicolon()
- },
- $.parseArrow = function (e) {
- if (this.eat(C.arrow)) return e
- },
- $.parseParenItem = function (e) {
- return e
- },
- $.parseNew = function () {
- var e = this.startNode(),
- t = this.parseIdentifier(!0);
- if (this.eat(C.dot)) {
- var n = this.parseMetaProperty(e, t, 'target');
- return this.state.inFunction || this.raise(n.property.start, 'new.target can only be used in functions'),
- n
- }
- return e.callee = this.parseNoCallExpr(),
- this.eat(C.parenL) ? (e.arguments = this.parseExprList(C.parenR), this.toReferencedList(e.arguments)) : e.arguments = [
- ],
- this.finishNode(e, 'NewExpression')
- },
- $.parseTemplateElement = function (e) {
- var t = this.startNode();
- return null === this.state.value && (e && this.hasPlugin('templateInvalidEscapes') ? this.state.invalidTemplateEscapePosition = null : this.raise(this.state.invalidTemplateEscapePosition, 'Invalid escape sequence in template')),
- t.value = {
- raw: this.input.slice(this.state.start, this.state.end).replace(/\r\n?/g, '\n'),
- cooked: this.state.value
- },
- this.next(),
- t.tail = this.match(C.backQuote),
- this.finishNode(t, 'TemplateElement')
- },
- $.parseTemplate = function (e) {
- var t = this.startNode();
- this.next(),
- t.expressions = [
- ];
- var n = this.parseTemplateElement(e);
- for (t.quasis = [
- n
- ]; !n.tail; ) this.expect(C.dollarBraceL),
- t.expressions.push(this.parseExpression()),
- this.expect(C.braceR),
- t.quasis.push(n = this.parseTemplateElement(e));
- return this.next(),
- this.finishNode(t, 'TemplateLiteral')
- },
- $.parseObj = function (e, t) {
- var n = [
- ],
- r = Object.create(null),
- i = !0,
- s = this.startNode();
- s.properties = [
- ],
- this.next();
- for (var o = null; !this.eat(C.braceR); ) {
- if (i) i = !1;
- else if (this.expect(C.comma), this.eat(C.braceR)) break;
- for (; this.match(C.at); ) n.push(this.parseDecorator());
- var a = this.startNode(),
- u = !1,
- l = !1,
- c = void 0,
- p = void 0;
- if (n.length && (a.decorators = n, n = [
- ]), this.hasPlugin('objectRestSpread') && this.match(C.ellipsis)) {
- if ((a = this.parseSpread(e ? {
- start: 0
- }
- : void 0)).type = e ? 'RestProperty' : 'SpreadProperty', e && this.toAssignable(a.argument, !0, 'object pattern'), s.properties.push(a), !e) continue;
- var h = this.state.start;
- if (null === o) {
- if (this.eat(C.braceR)) break;
- if (this.match(C.comma) && this.lookahead().type === C.braceR) continue;
- o = h;
- continue
- }
- this.unexpected(o, 'Cannot have multiple rest elements when destructuring')
- }
- if (a.method = !1, a.shorthand = !1, (e || t) && (c = this.state.start, p = this.state.startLoc), e || (u = this.eat(C.star)), !e && this.isContextual('async')) {
- u && this.unexpected();
- var f = this.parseIdentifier();
- this.match(C.colon) || this.match(C.parenL) || this.match(C.braceR) || this.match(C.eq) || this.match(C.comma) ? (a.key = f, a.computed = !1) : (l = !0, this.hasPlugin('asyncGenerators') && (u = this.eat(C.star)), this.parsePropertyName(a))
- } else this.parsePropertyName(a);
- this.parseObjPropValue(a, c, p, u, l, e, t),
- this.checkPropClash(a, r),
- a.shorthand && this.addExtra(a, 'shorthand', !0),
- s.properties.push(a)
- }
- return null !== o && this.unexpected(o, 'The rest element has to be the last element when destructuring'),
- n.length && this.raise(this.state.start, 'You have trailing decorators with no property'),
- this.finishNode(s, e ? 'ObjectPattern' : 'ObjectExpression')
- },
- $.isGetterOrSetterMethod = function (e, t) {
- return !t && !e.computed && 'Identifier' === e.key.type && ('get' === e.key.name || 'set' === e.key.name) && (this.match(C.string) || this.match(C.num) || this.match(C.bracketL) || this.match(C.name) || this.state.type.keyword)
- },
- $.checkGetterSetterParamCount = function (e) {
- var t = 'get' === e.kind ? 0 : 1;
- if (e.params.length !== t) {
- var n = e.start;
- 'get' === e.kind ? this.raise(n, 'getter should have no params') : this.raise(n, 'setter should have exactly one param')
- }
- },
- $.parseObjectMethod = function (e, t, n, r) {
- return n || t || this.match(C.parenL) ? (r && this.unexpected(), e.kind = 'method', e.method = !0, this.parseMethod(e, t, n), this.finishNode(e, 'ObjectMethod')) : this.isGetterOrSetterMethod(e, r) ? ((t || n) && this.unexpected(), e.kind = e.key.name, this.parsePropertyName(e), this.parseMethod(e), this.checkGetterSetterParamCount(e), this.finishNode(e, 'ObjectMethod')) : void 0
- },
- $.parseObjectProperty = function (e, t, n, r, i) {
- return this.eat(C.colon) ? (e.value = r ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssign(!1, i), this.finishNode(e, 'ObjectProperty')) : e.computed || 'Identifier' !== e.key.type ? void 0 : (this.checkReservedWord(e.key.name, e.key.start, !0, !0), r ? e.value = this.parseMaybeDefault(t, n, e.key.__clone()) : this.match(C.eq) && i ? (i.start || (i.start = this.state.start), e.value = this.parseMaybeDefault(t, n, e.key.__clone())) : e.value = e.key.__clone(), e.shorthand = !0, this.finishNode(e, 'ObjectProperty'))
- },
- $.parseObjPropValue = function (e, t, n, r, i, s, o) {
- var a = this.parseObjectMethod(e, r, i, s) || this.parseObjectProperty(e, t, n, s, o);
- return a || this.unexpected(),
- a
- },
- $.parsePropertyName = function (e) {
- if (this.eat(C.bracketL)) e.computed = !0,
- e.key = this.parseMaybeAssign(),
- this.expect(C.bracketR);
- else {
- e.computed = !1;
- var t = this.state.inPropertyName;
- this.state.inPropertyName = !0,
- e.key = this.match(C.num) || this.match(C.string) ? this.parseExprAtom() : this.parseIdentifier(!0),
- this.state.inPropertyName = t
- }
- return e.key
- },
- $.initFunction = function (e, t) {
- e.id = null,
- e.generator = !1,
- e.expression = !1,
- e.async = !!t
- },
- $.parseMethod = function (e, t, n) {
- var r = this.state.inMethod;
- return this.state.inMethod = e.kind || !0,
- this.initFunction(e, n),
- this.expect(C.parenL),
- e.params = this.parseBindingList(C.parenR),
- e.generator = !!t,
- this.parseFunctionBody(e),
- this.state.inMethod = r,
- e
- },
- $.parseArrowExpression = function (e, t, n) {
- return this.initFunction(e, n),
- e.params = this.toAssignableList(t, !0, 'arrow function parameters'),
- this.parseFunctionBody(e, !0),
- this.finishNode(e, 'ArrowFunctionExpression')
- },
- $.isStrictBody = function (e, t) {
- if (!t && e.body.directives.length) {
- var n = e.body.directives,
- r = Array.isArray(n),
- i = 0;
- for (n = r ? n : n[Symbol.iterator](); ; ) {
- var s;
- if (r) {
- if (i >= n.length) break;
- s = n[i++]
- } else {
- if ((i = n.next()).done) break;
- s = i.value
- }
- if ('use strict' === s.value.value) return !0
- }
- }
- return !1
- },
- $.parseFunctionBody = function (e, t) {
- var n = t && !this.match(C.braceL),
- r = this.state.inAsync;
- if (this.state.inAsync = e.async, n) e.body = this.parseMaybeAssign(),
- e.expression = !0;
- else {
- var i = this.state.inFunction,
- s = this.state.inGenerator,
- o = this.state.labels;
- this.state.inFunction = !0,
- this.state.inGenerator = e.generator,
- this.state.labels = [
- ],
- e.body = this.parseBlock(!0),
- e.expression = !1,
- this.state.inFunction = i,
- this.state.inGenerator = s,
- this.state.labels = o
- }
- this.state.inAsync = r;
- var a = this.isStrictBody(e, n),
- u = this.state.strict || t || a;
- if (a && e.id && 'Identifier' === e.id.type && 'yield' === e.id.name && this.raise(e.id.start, 'Binding yield in strict mode'), u) {
- var l = Object.create(null),
- c = this.state.strict;
- a && (this.state.strict = !0),
- e.id && this.checkLVal(e.id, !0, void 0, 'function name');
- var p = e.params,
- h = Array.isArray(p),
- f = 0;
- for (p = h ? p : p[Symbol.iterator](); ; ) {
- var d;
- if (h) {
- if (f >= p.length) break;
- d = p[f++]
- } else {
- if ((f = p.next()).done) break;
- d = f.value
- }
- var m = d;
- a && 'Identifier' !== m.type && this.raise(m.start, 'Non-simple parameter in strict mode'),
- this.checkLVal(m, !0, l, 'function parameter list')
- }
- this.state.strict = c
- }
- },
- $.parseExprList = function (e, t, n) {
- for (var r = [
- ], i = !0; !this.eat(e); ) {
- if (i) i = !1;
- else if (this.expect(C.comma), this.eat(e)) break;
- r.push(this.parseExprListItem(t, n))
- }
- return r
- },
- $.parseExprListItem = function (e, t, n) {
- return e && this.match(C.comma) ? null : this.match(C.ellipsis) ? this.parseSpread(t) : this.parseMaybeAssign(!1, t, this.parseParenItem, n)
- },
- $.parseIdentifier = function (e) {
- var t = this.startNode();
- return e || this.checkReservedWord(this.state.value, this.state.start, !!this.state.type.keyword, !1),
- this.match(C.name) ? t.name = this.state.value : this.state.type.keyword ? t.name = this.state.type.keyword : this.unexpected(),
- !e && 'await' === t.name && this.state.inAsync && this.raise(t.start, 'invalid use of await inside of an async function'),
- t.loc.identifierName = t.name,
- this.next(),
- this.finishNode(t, 'Identifier')
- },
- $.checkReservedWord = function (e, t, n, r) {
- (this.isReservedWord(e) || n && this.isKeyword(e)) && this.raise(t, e + ' is a reserved word'),
- this.state.strict && (i.strict(e) || r && i.strictBind(e)) && this.raise(t, e + ' is a reserved word in strict mode')
- },
- $.parseAwait = function (e) {
- return this.state.inAsync || this.unexpected(),
- this.match(C.star) && this.raise(e.start, 'await* has been removed from the async functions proposal. Use Promise.all() instead.'),
- e.argument = this.parseMaybeUnary(),
- this.finishNode(e, 'AwaitExpression')
- },
- $.parseYield = function () {
- var e = this.startNode();
- return this.next(),
- this.match(C.semi) || this.canInsertSemicolon() || !this.match(C.star) && !this.state.type.startsExpr ? (e.delegate = !1, e.argument = null) : (e.delegate = this.eat(C.star), e.argument = this.parseMaybeAssign()),
- this.finishNode(e, 'YieldExpression')
- };
- var Y = j.prototype,
- W = [
- 'leadingComments',
- 'trailingComments',
- 'innerComments'
- ],
- G = function () {
- function e(t, n, r) {
- y(this, e),
- this.type = '',
- this.start = t,
- this.end = 0,
- this.loc = new P(n),
- r && (this.loc.filename = r)
- }
- return e.prototype.__clone = function () {
- var t = new e;
- for (var n in this) W.indexOf(n) < 0 && (t[n] = this[n]);
- return t
- },
- e
- }();
- function H(e, t, n, r) {
- return e.type = t,
- e.end = n,
- e.loc.end = r,
- this.processComment(e),
- e
- }
- function X(e) {
- return e[e.length - 1]
- }
- Y.startNode = function () {
- return new G(this.state.start, this.state.startLoc, this.filename)
- },
- Y.startNodeAt = function (e, t) {
- return new G(e, t, this.filename)
- },
- Y.finishNode = function (e, t) {
- return H.call(this, e, t, this.state.lastTokEnd, this.state.lastTokEndLoc)
- },
- Y.finishNodeAt = function (e, t, n, r) {
- return H.call(this, e, t, n, r)
- },
- j.prototype.raise = function (e, t) {
- var n = function (e, t) {
- for (var n = 1, r = 0; ; ) {
- k.lastIndex = r;
- var i = k.exec(e);
- if (!(i && i.index < t)) return new B(n, t - r);
- ++n,
- r = i.index + i[0].length
- }
- }(this.input, e);
- t += ' (' + n.line + ':' + n.column + ')';
- var r = new SyntaxError(t);
- throw r.pos = e,
- r.loc = n,
- r
- };
- var J = j.prototype;
- J.addComment = function (e) {
- this.filename && (e.loc.filename = this.filename),
- this.state.trailingComments.push(e),
- this.state.leadingComments.push(e)
- },
- J.processComment = function (e) {
- if (!('Program' === e.type && e.body.length > 0)) {
- var t = this.state.commentStack,
- n = void 0,
- r = void 0,
- i = void 0,
- s = void 0,
- o = void 0;
- if (this.state.trailingComments.length > 0) this.state.trailingComments[0].start >= e.end ? (i = this.state.trailingComments, this.state.trailingComments = [
- ]) : this.state.trailingComments.length = 0;
- else {
- var a = X(t);
- t.length > 0 && a.trailingComments && a.trailingComments[0].start >= e.end && (i = a.trailingComments, a.trailingComments = null)
- }
- for (t.length > 0 && X(t).start >= e.start && (n = t.pop()); t.length > 0 && X(t).start >= e.start; ) r = t.pop();
- if (!r && n && (r = n), n && this.state.leadingComments.length > 0) {
- var u = X(this.state.leadingComments);
- if ('ObjectProperty' === n.type) {
- if (u.start >= e.start && this.state.commentPreviousNode) {
- for (o = 0; o < this.state.leadingComments.length; o++) this.state.leadingComments[o].end < this.state.commentPreviousNode.end && (this.state.leadingComments.splice(o, 1), o--);
- this.state.leadingComments.length > 0 && (n.trailingComments = this.state.leadingComments, this.state.leadingComments = [
- ])
- }
- } else if ('CallExpression' === e.type && e.arguments && e.arguments.length) {
- var l = X(e.arguments);
- l && u.start >= l.start && u.end <= e.end && this.state.commentPreviousNode && this.state.leadingComments.length > 0 && (l.trailingComments = this.state.leadingComments, this.state.leadingComments = [
- ])
- }
- }
- if (r) {
- if (r.leadingComments) if (r !== e && X(r.leadingComments).end <= e.start) e.leadingComments = r.leadingComments,
- r.leadingComments = null;
- else for (s = r.leadingComments.length - 2; s >= 0; --s) if (r.leadingComments[s].end <= e.start) {
- e.leadingComments = r.leadingComments.splice(0, s + 1);
- break
- }
- } else if (this.state.leadingComments.length > 0) if (X(this.state.leadingComments).end <= e.start) {
- if (this.state.commentPreviousNode) for (o = 0; o < this.state.leadingComments.length; o++) this.state.leadingComments[o].end < this.state.commentPreviousNode.end && (this.state.leadingComments.splice(o, 1), o--);
- this.state.leadingComments.length > 0 && (e.leadingComments = this.state.leadingComments, this.state.leadingComments = [
- ])
- } else {
- for (s = 0; s < this.state.leadingComments.length && !(this.state.leadingComments[s].end > e.start); s++);
- e.leadingComments = this.state.leadingComments.slice(0, s),
- 0 === e.leadingComments.length && (e.leadingComments = null),
- 0 === (i = this.state.leadingComments.slice(s)).length && (i = null)
- }
- this.state.commentPreviousNode = e,
- i && (i.length && i[0].start >= e.start && X(i).end <= e.end ? e.innerComments = i : e.trailingComments = i),
- t.push(e)
- }
- };
- var Q = j.prototype;
- function Z(e) {
- return e && 'Property' === e.type && 'init' === e.kind && !1 === e.method
- }
- Q.estreeParseRegExpLiteral = function (e) {
- var t = e.pattern,
- n = e.flags,
- r = null;
- try {
- r = new RegExp(t, n)
- } catch (e) {
- }
- var i = this.estreeParseLiteral(r);
- return i.regex = {
- pattern: t,
- flags: n
- },
- i
- },
- Q.estreeParseLiteral = function (e) {
- return this.parseLiteral(e, 'Literal')
- },
- Q.directiveToStmt = function (e) {
- var t = e.value,
- n = this.startNodeAt(e.start, e.loc.start),
- r = this.startNodeAt(t.start, t.loc.start);
- return r.value = t.value,
- r.raw = t.extra.raw,
- n.expression = this.finishNodeAt(r, 'Literal', t.end, t.loc.end),
- n.directive = t.extra.raw.slice(1, - 1),
- this.finishNodeAt(n, 'ExpressionStatement', e.end, e.loc.end)
- };
- var ee = [
- 'any',
- 'mixed',
- 'empty',
- 'bool',
- 'boolean',
- 'number',
- 'string',
- 'void',
- 'null'
- ],
- te = j.prototype;
- te.flowParseTypeInitialiser = function (e) {
- var t = this.state.inType;
- this.state.inType = !0,
- this.expect(e || C.colon);
- var n = this.flowParseType();
- return this.state.inType = t,
- n
- },
- te.flowParsePredicate = function () {
- var e = this.startNode(),
- t = this.state.startLoc,
- n = this.state.start;
- this.expect(C.modulo);
- var r = this.state.startLoc;
- return this.expectContextual('checks'),
- t.line === r.line && t.column === r.column - 1 || this.raise(n, 'Spaces between ´%´ and ´checks´ are not allowed here.'),
- this.eat(C.parenL) ? (e.expression = this.parseExpression(), this.expect(C.parenR), this.finishNode(e, 'DeclaredPredicate')) : this.finishNode(e, 'InferredPredicate')
- },
- te.flowParseTypeAndPredicateInitialiser = function () {
- var e = this.state.inType;
- this.state.inType = !0,
- this.expect(C.colon);
- var t = null,
- n = null;
- return this.match(C.modulo) ? (this.state.inType = e, n = this.flowParsePredicate()) : (t = this.flowParseType(), this.state.inType = e, this.match(C.modulo) && (n = this.flowParsePredicate())),
- [
- t,
- n
- ]
- },
- te.flowParseDeclareClass = function (e) {
- return this.next(),
- this.flowParseInterfaceish(e, !0),
- this.finishNode(e, 'DeclareClass')
- },
- te.flowParseDeclareFunction = function (e) {
- this.next();
- var t = e.id = this.parseIdentifier(),
- n = this.startNode(),
- r = this.startNode();
- this.isRelational('<') ? n.typeParameters = this.flowParseTypeParameterDeclaration() : n.typeParameters = null,
- this.expect(C.parenL);
- var i = this.flowParseFunctionTypeParams();
- n.params = i.params,
- n.rest = i.rest,
- this.expect(C.parenR);
- var s,
- o = this.flowParseTypeAndPredicateInitialiser();
- return n.returnType = o[0],
- s = o[1],
- r.typeAnnotation = this.finishNode(n, 'FunctionTypeAnnotation'),
- r.predicate = s,
- t.typeAnnotation = this.finishNode(r, 'TypeAnnotation'),
- this.finishNode(t, t.type),
- this.semicolon(),
- this.finishNode(e, 'DeclareFunction')
- },
- te.flowParseDeclare = function (e) {
- return this.match(C._class) ? this.flowParseDeclareClass(e) : this.match(C._function) ? this.flowParseDeclareFunction(e) : this.match(C._var) ? this.flowParseDeclareVariable(e) : this.isContextual('module') ? this.lookahead().type === C.dot ? this.flowParseDeclareModuleExports(e) : this.flowParseDeclareModule(e) : this.isContextual('type') ? this.flowParseDeclareTypeAlias(e) : this.isContextual('opaque') ? this.flowParseDeclareOpaqueType(e) : this.isContextual('interface') ? this.flowParseDeclareInterface(e) : this.match(C._export) ? this.flowParseDeclareExportDeclaration(e) : void this.unexpected()
- },
- te.flowParseDeclareExportDeclaration = function (e) {
- if (this.expect(C._export), this.isContextual('opaque')) return e.declaration = this.flowParseDeclare(this.startNode()),
- e.default = !1,
- this.finishNode(e, 'DeclareExportDeclaration');
- throw this.unexpected()
- },
- te.flowParseDeclareVariable = function (e) {
- return this.next(),
- e.id = this.flowParseTypeAnnotatableIdentifier(),
- this.semicolon(),
- this.finishNode(e, 'DeclareVariable')
- },
- te.flowParseDeclareModule = function (e) {
- this.next(),
- this.match(C.string) ? e.id = this.parseExprAtom() : e.id = this.parseIdentifier();
- var t = e.body = this.startNode(),
- n = t.body = [
- ];
- for (this.expect(C.braceL); !this.match(C.braceR); ) {
- var r = this.startNode();
- if (this.match(C._import)) {
- var i = this.lookahead();
- 'type' !== i.value && 'typeof' !== i.value && this.unexpected(null, 'Imports within a `declare module` body must always be `import type` or `import typeof`'),
- this.parseImport(r)
- } else this.expectContextual('declare', 'Only declares and type imports are allowed inside declare module'),
- r = this.flowParseDeclare(r, !0);
- n.push(r)
- }
- return this.expect(C.braceR),
- this.finishNode(t, 'BlockStatement'),
- this.finishNode(e, 'DeclareModule')
- },
- te.flowParseDeclareModuleExports = function (e) {
- return this.expectContextual('module'),
- this.expect(C.dot),
- this.expectContextual('exports'),
- e.typeAnnotation = this.flowParseTypeAnnotation(),
- this.semicolon(),
- this.finishNode(e, 'DeclareModuleExports')
- },
- te.flowParseDeclareTypeAlias = function (e) {
- return this.next(),
- this.flowParseTypeAlias(e),
- this.finishNode(e, 'DeclareTypeAlias')
- },
- te.flowParseDeclareOpaqueType = function (e) {
- return this.next(),
- this.flowParseOpaqueType(e, !0),
- this.finishNode(e, 'DeclareOpaqueType')
- },
- te.flowParseDeclareInterface = function (e) {
- return this.next(),
- this.flowParseInterfaceish(e),
- this.finishNode(e, 'DeclareInterface')
- },
- te.flowParseInterfaceish = function (e) {
- if (e.id = this.parseIdentifier(), this.isRelational('<') ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null, e.extends = [
- ], e.mixins = [
- ], this.eat(C._extends)) do {
- e.extends.push(this.flowParseInterfaceExtends())
- } while (this.eat(C.comma));
- if (this.isContextual('mixins')) {
- this.next();
- do {
- e.mixins.push(this.flowParseInterfaceExtends())
- } while (this.eat(C.comma))
- }
- e.body = this.flowParseObjectType(!0, !1, !1)
- },
- te.flowParseInterfaceExtends = function () {
- var e = this.startNode();
- return e.id = this.flowParseQualifiedTypeIdentifier(),
- this.isRelational('<') ? e.typeParameters = this.flowParseTypeParameterInstantiation() : e.typeParameters = null,
- this.finishNode(e, 'InterfaceExtends')
- },
- te.flowParseInterface = function (e) {
- return this.flowParseInterfaceish(e, !1),
- this.finishNode(e, 'InterfaceDeclaration')
- },
- te.flowParseRestrictedIdentifier = function (e) {
- return ee.indexOf(this.state.value) > - 1 && this.raise(this.state.start, 'Cannot overwrite primitive type ' + this.state.value),
- this.parseIdentifier(e)
- },
- te.flowParseTypeAlias = function (e) {
- return e.id = this.flowParseRestrictedIdentifier(),
- this.isRelational('<') ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null,
- e.right = this.flowParseTypeInitialiser(C.eq),
- this.semicolon(),
- this.finishNode(e, 'TypeAlias')
- },
- te.flowParseOpaqueType = function (e, t) {
- return this.expectContextual('type'),
- e.id = this.flowParseRestrictedIdentifier(),
- this.isRelational('<') ? e.typeParameters = this.flowParseTypeParameterDeclaration() : e.typeParameters = null,
- e.supertype = null,
- this.match(C.colon) && (e.supertype = this.flowParseTypeInitialiser(C.colon)),
- e.impltype = null,
- t || (e.impltype = this.flowParseTypeInitialiser(C.eq)),
- this.semicolon(),
- this.finishNode(e, 'OpaqueType')
- },
- te.flowParseTypeParameter = function () {
- var e = this.startNode(),
- t = this.flowParseVariance(),
- n = this.flowParseTypeAnnotatableIdentifier();
- return e.name = n.name,
- e.variance = t,
- e.bound = n.typeAnnotation,
- this.match(C.eq) && (this.eat(C.eq), e.default = this.flowParseType()),
- this.finishNode(e, 'TypeParameter')
- },
- te.flowParseTypeParameterDeclaration = function () {
- var e = this.state.inType,
- t = this.startNode();
- t.params = [
- ],
- this.state.inType = !0,
- this.isRelational('<') || this.match(C.jsxTagStart) ? this.next() : this.unexpected();
- do {
- t.params.push(this.flowParseTypeParameter()),
- this.isRelational('>') || this.expect(C.comma)
- } while (!this.isRelational('>'));
- return this.expectRelational('>'),
- this.state.inType = e,
- this.finishNode(t, 'TypeParameterDeclaration')
- },
- te.flowParseTypeParameterInstantiation = function () {
- var e = this.startNode(),
- t = this.state.inType;
- for (e.params = [
- ], this.state.inType = !0, this.expectRelational('<'); !this.isRelational('>'); ) e.params.push(this.flowParseType()),
- this.isRelational('>') || this.expect(C.comma);
- return this.expectRelational('>'),
- this.state.inType = t,
- this.finishNode(e, 'TypeParameterInstantiation')
- },
- te.flowParseObjectPropertyKey = function () {
- return this.match(C.num) || this.match(C.string) ? this.parseExprAtom() : this.parseIdentifier(!0)
- },
- te.flowParseObjectTypeIndexer = function (e, t, n) {
- return e.static = t,
- this.expect(C.bracketL),
- this.lookahead().type === C.colon ? (e.id = this.flowParseObjectPropertyKey(), e.key = this.flowParseTypeInitialiser()) : (e.id = null, e.key = this.flowParseType()),
- this.expect(C.bracketR),
- e.value = this.flowParseTypeInitialiser(),
- e.variance = n,
- this.flowObjectTypeSemicolon(),
- this.finishNode(e, 'ObjectTypeIndexer')
- },
- te.flowParseObjectTypeMethodish = function (e) {
- for (e.params = [
- ], e.rest = null, e.typeParameters = null, this.isRelational('<') && (e.typeParameters = this.flowParseTypeParameterDeclaration()), this.expect(C.parenL); !this.match(C.parenR) && !this.match(C.ellipsis); ) e.params.push(this.flowParseFunctionTypeParam()),
- this.match(C.parenR) || this.expect(C.comma);
- return this.eat(C.ellipsis) && (e.rest = this.flowParseFunctionTypeParam()),
- this.expect(C.parenR),
- e.returnType = this.flowParseTypeInitialiser(),
- this.finishNode(e, 'FunctionTypeAnnotation')
- },
- te.flowParseObjectTypeMethod = function (e, t, n, r) {
- var i = this.startNodeAt(e, t);
- return i.value = this.flowParseObjectTypeMethodish(this.startNodeAt(e, t)),
- i.static = n,
- i.key = r,
- i.optional = !1,
- this.flowObjectTypeSemicolon(),
- this.finishNode(i, 'ObjectTypeProperty')
- },
- te.flowParseObjectTypeCallProperty = function (e, t) {
- var n = this.startNode();
- return e.static = t,
- e.value = this.flowParseObjectTypeMethodish(n),
- this.flowObjectTypeSemicolon(),
- this.finishNode(e, 'ObjectTypeCallProperty')
- },
- te.flowParseObjectType = function (e, t, n) {
- var r = this.state.inType;
- this.state.inType = !0;
- var i = this.startNode(),
- s = void 0,
- o = void 0,
- a = !1;
- i.callProperties = [
- ],
- i.properties = [
- ],
- i.indexers = [
- ];
- var u = void 0,
- l = void 0;
- for (t && this.match(C.braceBarL) ? (this.expect(C.braceBarL), u = C.braceBarR, l = !0) : (this.expect(C.braceL), u = C.braceR, l = !1), i.exact = l; !this.match(u); ) {
- var c = !1,
- p = this.state.start,
- h = this.state.startLoc;
- s = this.startNode(),
- e && this.isContextual('static') && this.lookahead().type !== C.colon && (this.next(), a = !0);
- var f = this.state.start,
- d = this.flowParseVariance();
- this.match(C.bracketL) ? i.indexers.push(this.flowParseObjectTypeIndexer(s, a, d)) : this.match(C.parenL) || this.isRelational('<') ? (d && this.unexpected(f), i.callProperties.push(this.flowParseObjectTypeCallProperty(s, a))) : this.match(C.ellipsis) ? (n || this.unexpected(null, 'Spread operator cannot appear in class or interface definitions'), d && this.unexpected(d.start, 'Spread properties cannot have variance'), this.expect(C.ellipsis), s.argument = this.flowParseType(), this.flowObjectTypeSemicolon(), i.properties.push(this.finishNode(s, 'ObjectTypeSpreadProperty'))) : (o = this.flowParseObjectPropertyKey(), this.isRelational('<') || this.match(C.parenL) ? (d && this.unexpected(d.start), i.properties.push(this.flowParseObjectTypeMethod(p, h, a, o))) : (this.eat(C.question) && (c = !0), s.key = o, s.value = this.flowParseTypeInitialiser(), s.optional = c, s.static = a, s.variance = d, this.flowObjectTypeSemicolon(), i.properties.push(this.finishNode(s, 'ObjectTypeProperty')))),
- a = !1
- }
- this.expect(u);
- var m = this.finishNode(i, 'ObjectTypeAnnotation');
- return this.state.inType = r,
- m
- },
- te.flowObjectTypeSemicolon = function () {
- this.eat(C.semi) || this.eat(C.comma) || this.match(C.braceR) || this.match(C.braceBarR) || this.unexpected()
- },
- te.flowParseQualifiedTypeIdentifier = function (e, t, n) {
- e = e || this.state.start,
- t = t || this.state.startLoc;
- for (var r = n || this.parseIdentifier(); this.eat(C.dot); ) {
- var i = this.startNodeAt(e, t);
- i.qualification = r,
- i.id = this.parseIdentifier(),
- r = this.finishNode(i, 'QualifiedTypeIdentifier')
- }
- return r
- },
- te.flowParseGenericType = function (e, t, n) {
- var r = this.startNodeAt(e, t);
- return r.typeParameters = null,
- r.id = this.flowParseQualifiedTypeIdentifier(e, t, n),
- this.isRelational('<') && (r.typeParameters = this.flowParseTypeParameterInstantiation()),
- this.finishNode(r, 'GenericTypeAnnotation')
- },
- te.flowParseTypeofType = function () {
- var e = this.startNode();
- return this.expect(C._typeof),
- e.argument = this.flowParsePrimaryType(),
- this.finishNode(e, 'TypeofTypeAnnotation')
- },
- te.flowParseTupleType = function () {
- var e = this.startNode();
- for (e.types = [
- ], this.expect(C.bracketL); this.state.pos < this.input.length && !this.match(C.bracketR) && (e.types.push(this.flowParseType()), !this.match(C.bracketR)); ) this.expect(C.comma);
- return this.expect(C.bracketR),
- this.finishNode(e, 'TupleTypeAnnotation')
- },
- te.flowParseFunctionTypeParam = function () {
- var e = null,
- t = !1,
- n = null,
- r = this.startNode(),
- i = this.lookahead();
- return i.type === C.colon || i.type === C.question ? (e = this.parseIdentifier(), this.eat(C.question) && (t = !0), n = this.flowParseTypeInitialiser()) : n = this.flowParseType(),
- r.name = e,
- r.optional = t,
- r.typeAnnotation = n,
- this.finishNode(r, 'FunctionTypeParam')
- },
- te.reinterpretTypeAsFunctionTypeParam = function (e) {
- var t = this.startNodeAt(e.start, e.loc.start);
- return t.name = null,
- t.optional = !1,
- t.typeAnnotation = e,
- this.finishNode(t, 'FunctionTypeParam')
- },
- te.flowParseFunctionTypeParams = function () {
- for (var e = {
- params: arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [
- ],
- rest: null
- }; !this.match(C.parenR) && !this.match(C.ellipsis); ) e.params.push(this.flowParseFunctionTypeParam()),
- this.match(C.parenR) || this.expect(C.comma);
- return this.eat(C.ellipsis) && (e.rest = this.flowParseFunctionTypeParam()),
- e
- },
- te.flowIdentToTypeAnnotation = function (e, t, n, r) {
- switch (r.name) {
- case 'any':
- return this.finishNode(n, 'AnyTypeAnnotation');
- case 'void':
- return this.finishNode(n, 'VoidTypeAnnotation');
- case 'bool':
- case 'boolean':
- return this.finishNode(n, 'BooleanTypeAnnotation');
- case 'mixed':
- return this.finishNode(n, 'MixedTypeAnnotation');
- case 'empty':
- return this.finishNode(n, 'EmptyTypeAnnotation');
- case 'number':
- return this.finishNode(n, 'NumberTypeAnnotation');
- case 'string':
- return this.finishNode(n, 'StringTypeAnnotation');
- default:
- return this.flowParseGenericType(e, t, r)
- }
- },
- te.flowParsePrimaryType = function () {
- var e = this.state.start,
- t = this.state.startLoc,
- n = this.startNode(),
- r = void 0,
- i = void 0,
- s = !1,
- o = this.state.noAnonFunctionType;
- switch (this.state.type) {
- case C.name:
- return this.flowIdentToTypeAnnotation(e, t, n, this.parseIdentifier());
- case C.braceL:
- return this.flowParseObjectType(!1, !1, !0);
- case C.braceBarL:
- return this.flowParseObjectType(!1, !0, !0);
- case C.bracketL:
- return this.flowParseTupleType();
- case C.relational:
- if ('<' === this.state.value) return n.typeParameters = this.flowParseTypeParameterDeclaration(),
- this.expect(C.parenL),
- r = this.flowParseFunctionTypeParams(),
- n.params = r.params,
- n.rest = r.rest,
- this.expect(C.parenR),
- this.expect(C.arrow),
- n.returnType = this.flowParseType(),
- this.finishNode(n, 'FunctionTypeAnnotation');
- break;
- case C.parenL:
- if (this.next(), !this.match(C.parenR) && !this.match(C.ellipsis)) if (this.match(C.name)) {
- var a = this.lookahead().type;
- s = a !== C.question && a !== C.colon
- } else s = !0;
- if (s) {
- if (this.state.noAnonFunctionType = !1, i = this.flowParseType(), this.state.noAnonFunctionType = o, this.state.noAnonFunctionType || !(this.match(C.comma) || this.match(C.parenR) && this.lookahead().type === C.arrow)) return this.expect(C.parenR),
- i;
- this.eat(C.comma)
- }
- return r = i ? this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]) : this.flowParseFunctionTypeParams(),
- n.params = r.params,
- n.rest = r.rest,
- this.expect(C.parenR),
- this.expect(C.arrow),
- n.returnType = this.flowParseType(),
- n.typeParameters = null,
- this.finishNode(n, 'FunctionTypeAnnotation');
- case C.string:
- return this.parseLiteral(this.state.value, 'StringLiteralTypeAnnotation');
- case C._true:
- case C._false:
- return n.value = this.match(C._true),
- this.next(),
- this.finishNode(n, 'BooleanLiteralTypeAnnotation');
- case C.plusMin:
- if ('-' === this.state.value) return this.next(),
- this.match(C.num) || this.unexpected(null, 'Unexpected token, expected number'),
- this.parseLiteral( - this.state.value, 'NumericLiteralTypeAnnotation', n.start, n.loc.start);
- this.unexpected();
- case C.num:
- return this.parseLiteral(this.state.value, 'NumericLiteralTypeAnnotation');
- case C._null:
- return n.value = this.match(C._null),
- this.next(),
- this.finishNode(n, 'NullLiteralTypeAnnotation');
- case C._this:
- return n.value = this.match(C._this),
- this.next(),
- this.finishNode(n, 'ThisTypeAnnotation');
- case C.star:
- return this.next(),
- this.finishNode(n, 'ExistentialTypeParam');
- default:
- if ('typeof' === this.state.type.keyword) return this.flowParseTypeofType()
- }
- this.unexpected()
- },
- te.flowParsePostfixType = function () {
- for (var e = this.state.start, t = this.state.startLoc, n = this.flowParsePrimaryType(); !this.canInsertSemicolon() && this.match(C.bracketL); ) {
- var r = this.startNodeAt(e, t);
- r.elementType = n,
- this.expect(C.bracketL),
- this.expect(C.bracketR),
- n = this.finishNode(r, 'ArrayTypeAnnotation')
- }
- return n
- },
- te.flowParsePrefixType = function () {
- var e = this.startNode();
- return this.eat(C.question) ? (e.typeAnnotation = this.flowParsePrefixType(), this.finishNode(e, 'NullableTypeAnnotation')) : this.flowParsePostfixType()
- },
- te.flowParseAnonFunctionWithoutParens = function () {
- var e = this.flowParsePrefixType();
- if (!this.state.noAnonFunctionType && this.eat(C.arrow)) {
- var t = this.startNodeAt(e.start, e.loc.start);
- return t.params = [
- this.reinterpretTypeAsFunctionTypeParam(e)
- ],
- t.rest = null,
- t.returnType = this.flowParseType(),
- t.typeParameters = null,
- this.finishNode(t, 'FunctionTypeAnnotation')
- }
- return e
- },
- te.flowParseIntersectionType = function () {
- var e = this.startNode();
- this.eat(C.bitwiseAND);
- var t = this.flowParseAnonFunctionWithoutParens();
- for (e.types = [
- t
- ]; this.eat(C.bitwiseAND); ) e.types.push(this.flowParseAnonFunctionWithoutParens());
- return 1 === e.types.length ? t : this.finishNode(e, 'IntersectionTypeAnnotation')
- },
- te.flowParseUnionType = function () {
- var e = this.startNode();
- this.eat(C.bitwiseOR);
- var t = this.flowParseIntersectionType();
- for (e.types = [
- t
- ]; this.eat(C.bitwiseOR); ) e.types.push(this.flowParseIntersectionType());
- return 1 === e.types.length ? t : this.finishNode(e, 'UnionTypeAnnotation')
- },
- te.flowParseType = function () {
- var e = this.state.inType;
- this.state.inType = !0;
- var t = this.flowParseUnionType();
- return this.state.inType = e,
- t
- },
- te.flowParseTypeAnnotation = function () {
- var e = this.startNode();
- return e.typeAnnotation = this.flowParseTypeInitialiser(),
- this.finishNode(e, 'TypeAnnotation')
- },
- te.flowParseTypeAndPredicateAnnotation = function () {
- var e = this.startNode(),
- t = this.flowParseTypeAndPredicateInitialiser();
- return e.typeAnnotation = t[0],
- e.predicate = t[1],
- this.finishNode(e, 'TypeAnnotation')
- },
- te.flowParseTypeAnnotatableIdentifier = function () {
- var e = this.flowParseRestrictedIdentifier();
- return this.match(C.colon) && (e.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(e, e.type)),
- e
- },
- te.typeCastToParameter = function (e) {
- return e.expression.typeAnnotation = e.typeAnnotation,
- this.finishNodeAt(e.expression, e.expression.type, e.typeAnnotation.end, e.typeAnnotation.loc.end)
- },
- te.flowParseVariance = function () {
- var e = null;
- return this.match(C.plusMin) && ('+' === this.state.value ? e = 'plus' : '-' === this.state.value && (e = 'minus'), this.next()),
- e
- };
- var ne = String.fromCodePoint;
- if (!ne) {
- var re = String.fromCharCode,
- ie = Math.floor;
- ne = function () {
- var e = [
- ],
- t = void 0,
- n = void 0,
- r = - 1,
- i = arguments.length;
- if (!i) return '';
- for (var s = ''; ++r < i; ) {
- var o = Number(arguments[r]);
- if (!isFinite(o) || o < 0 || o > 1114111 || ie(o) != o) throw RangeError('Invalid code point: ' + o);
- o <= 65535 ? e.push(o) : (t = 55296 + ((o -= 65536) >> 10), n = o % 1024 + 56320, e.push(t, n)),
- (r + 1 == i || e.length > 16384) && (s += re.apply(null, e), e.length = 0)
- }
- return s
- }
- }
- var se = ne,
- oe = {
- quot: '"',
- amp: '&',
- apos: '\'',
- lt: '<',
- gt: '>',
- nbsp: ' ',
- iexcl: '¡',
- cent: '¢',
- pound: '£',
- curren: '¤',
- yen: '¥',
- brvbar: '¦',
- sect: '§',
- uml: '¨',
- copy: '©',
- ordf: 'ª',
- laquo: '«',
- not: '¬',
- shy: '­',
- reg: '®',
- macr: '¯',
- deg: '°',
- plusmn: '±',
- sup2: '²',
- sup3: '³',
- acute: '´',
- micro: 'µ',
- para: '¶',
- middot: '·',
- cedil: '¸',
- sup1: '¹',
- ordm: 'º',
- raquo: '»',
- frac14: '¼',
- frac12: '½',
- frac34: '¾',
- iquest: '¿',
- Agrave: 'À',
- Aacute: 'Á',
- Acirc: 'Â',
- Atilde: 'Ã',
- Auml: 'Ä',
- Aring: 'Å',
- AElig: 'Æ',
- Ccedil: 'Ç',
- Egrave: 'È',
- Eacute: 'É',
- Ecirc: 'Ê',
- Euml: 'Ë',
- Igrave: 'Ì',
- Iacute: 'Í',
- Icirc: 'Î',
- Iuml: 'Ï',
- ETH: 'Ð',
- Ntilde: 'Ñ',
- Ograve: 'Ò',
- Oacute: 'Ó',
- Ocirc: 'Ô',
- Otilde: 'Õ',
- Ouml: 'Ö',
- times: '×',
- Oslash: 'Ø',
- Ugrave: 'Ù',
- Uacute: 'Ú',
- Ucirc: 'Û',
- Uuml: 'Ü',
- Yacute: 'Ý',
- THORN: 'Þ',
- szlig: 'ß',
- agrave: 'à',
- aacute: 'á',
- acirc: 'â',
- atilde: 'ã',
- auml: 'ä',
- aring: 'å',
- aelig: 'æ',
- ccedil: 'ç',
- egrave: 'è',
- eacute: 'é',
- ecirc: 'ê',
- euml: 'ë',
- igrave: 'ì',
- iacute: 'í',
- icirc: 'î',
- iuml: 'ï',
- eth: 'ð',
- ntilde: 'ñ',
- ograve: 'ò',
- oacute: 'ó',
- ocirc: 'ô',
- otilde: 'õ',
- ouml: 'ö',
- divide: '÷',
- oslash: 'ø',
- ugrave: 'ù',
- uacute: 'ú',
- ucirc: 'û',
- uuml: 'ü',
- yacute: 'ý',
- thorn: 'þ',
- yuml: 'ÿ',
- OElig: 'Œ',
- oelig: 'œ',
- Scaron: 'Š',
- scaron: 'š',
- Yuml: 'Ÿ',
- fnof: 'ƒ',
- circ: 'ˆ',
- tilde: '˜',
- Alpha: 'Α',
- Beta: 'Β',
- Gamma: 'Γ',
- Delta: 'Δ',
- Epsilon: 'Ε',
- Zeta: 'Ζ',
- Eta: 'Η',
- Theta: 'Θ',
- Iota: 'Ι',
- Kappa: 'Κ',
- Lambda: 'Λ',
- Mu: 'Μ',
- Nu: 'Ν',
- Xi: 'Ξ',
- Omicron: 'Ο',
- Pi: 'Π',
- Rho: 'Ρ',
- Sigma: 'Σ',
- Tau: 'Τ',
- Upsilon: 'Υ',
- Phi: 'Φ',
- Chi: 'Χ',
- Psi: 'Ψ',
- Omega: 'Ω',
- alpha: 'α',
- beta: 'β',
- gamma: 'γ',
- delta: 'δ',
- epsilon: 'ε',
- zeta: 'ζ',
- eta: 'η',
- theta: 'θ',
- iota: 'ι',
- kappa: 'κ',
- lambda: 'λ',
- mu: 'μ',
- nu: 'ν',
- xi: 'ξ',
- omicron: 'ο',
- pi: 'π',
- rho: 'ρ',
- sigmaf: 'ς',
- sigma: 'σ',
- tau: 'τ',
- upsilon: 'υ',
- phi: 'φ',
- chi: 'χ',
- psi: 'ψ',
- omega: 'ω',
- thetasym: 'ϑ',
- upsih: 'ϒ',
- piv: 'ϖ',
- ensp: ' ',
- emsp: ' ',
- thinsp: ' ',
- zwnj: '‌',
- zwj: '‍',
- lrm: '‎',
- rlm: '‏',
- ndash: '–',
- mdash: '—',
- lsquo: '‘',
- rsquo: '’',
- sbquo: '‚',
- ldquo: '“',
- rdquo: '”',
- bdquo: '„',
- dagger: '†',
- Dagger: '‡',
- bull: '•',
- hellip: '…',
- permil: '‰',
- prime: '′',
- Prime: '″',
- lsaquo: '‹',
- rsaquo: '›',
- oline: '‾',
- frasl: '⁄',
- euro: '€',
- image: 'ℑ',
- weierp: '℘',
- real: 'ℜ',
- trade: '™',
- alefsym: 'ℵ',
- larr: '←',
- uarr: '↑',
- rarr: '→',
- darr: '↓',
- harr: '↔',
- crarr: '↵',
- lArr: '⇐',
- uArr: '⇑',
- rArr: '⇒',
- dArr: '⇓',
- hArr: '⇔',
- forall: '∀',
- part: '∂',
- exist: '∃',
- empty: '∅',
- nabla: '∇',
- isin: '∈',
- notin: '∉',
- ni: '∋',
- prod: '∏',
- sum: '∑',
- minus: '−',
- lowast: '∗',
- radic: '√',
- prop: '∝',
- infin: '∞',
- ang: '∠',
- and: '∧',
- or: '∨',
- cap: '∩',
- cup: '∪',
- int: '∫',
- there4: '∴',
- sim: '∼',
- cong: '≅',
- asymp: '≈',
- ne: '≠',
- equiv: '≡',
- le: '≤',
- ge: '≥',
- sub: '⊂',
- sup: '⊃',
- nsub: '⊄',
- sube: '⊆',
- supe: '⊇',
- oplus: '⊕',
- otimes: '⊗',
- perp: '⊥',
- sdot: '⋅',
- lceil: '⌈',
- rceil: '⌉',
- lfloor: '⌊',
- rfloor: '⌋',
- lang: '〈',
- rang: '〉',
- loz: '◊',
- spades: '♠',
- clubs: '♣',
- hearts: '♥',
- diams: '♦'
- },
- ae = /^[\da-fA-F]+$/,
- ue = /^\d+$/;
- O.j_oTag = new F('<tag', !1),
- O.j_cTag = new F('</tag', !1),
- O.j_expr = new F('<tag>...</tag>', !0, !0),
- C.jsxName = new A('jsxName'),
- C.jsxText = new A('jsxText', {
- beforeExpr: !0
- }),
- C.jsxTagStart = new A('jsxTagStart', {
- startsExpr: !0
- }),
- C.jsxTagEnd = new A('jsxTagEnd'),
- C.jsxTagStart.updateContext = function () {
- this.state.context.push(O.j_expr),
- this.state.context.push(O.j_oTag),
- this.state.exprAllowed = !1
- },
- C.jsxTagEnd.updateContext = function (e) {
- var t = this.state.context.pop();
- t === O.j_oTag && e === C.slash || t === O.j_cTag ? (this.state.context.pop(), this.state.exprAllowed = this.curContext() === O.j_expr) : this.state.exprAllowed = !0
- };
- var le = j.prototype;
- function ce(e) {
- return 'JSXIdentifier' === e.type ? e.name : 'JSXNamespacedName' === e.type ? e.namespace.name + ':' + e.name.name : 'JSXMemberExpression' === e.type ? ce(e.object) + '.' + ce(e.property) : void 0
- }
- le.jsxReadToken = function () {
- for (var e = '', t = this.state.pos; ; ) {
- this.state.pos >= this.input.length && this.raise(this.state.start, 'Unterminated JSX contents');
- var n = this.input.charCodeAt(this.state.pos);
- switch (n) {
- case 60:
- case 123:
- return this.state.pos === this.state.start ? 60 === n && this.state.exprAllowed ? (++this.state.pos, this.finishToken(C.jsxTagStart)) : this.getTokenFromCode(n) : (e += this.input.slice(t, this.state.pos), this.finishToken(C.jsxText, e));
- case 38:
- e += this.input.slice(t, this.state.pos),
- e += this.jsxReadEntity(),
- t = this.state.pos;
- break;
- default:
- S(n) ? (e += this.input.slice(t, this.state.pos), e += this.jsxReadNewLine(!0), t = this.state.pos) : ++this.state.pos
- }
- }
- },
- le.jsxReadNewLine = function (e) {
- var t = this.input.charCodeAt(this.state.pos),
- n = void 0;
- return ++this.state.pos,
- 13 === t && 10 === this.input.charCodeAt(this.state.pos) ? (++this.state.pos, n = e ? '\n' : '\r\n') : n = String.fromCharCode(t),
- ++this.state.curLine,
- this.state.lineStart = this.state.pos,
- n
- },
- le.jsxReadString = function (e) {
- for (var t = '', n = ++this.state.pos; ; ) {
- this.state.pos >= this.input.length && this.raise(this.state.start, 'Unterminated string constant');
- var r = this.input.charCodeAt(this.state.pos);
- if (r === e) break;
- 38 === r ? (t += this.input.slice(n, this.state.pos), t += this.jsxReadEntity(), n = this.state.pos) : S(r) ? (t += this.input.slice(n, this.state.pos), t += this.jsxReadNewLine(!1), n = this.state.pos) : ++this.state.pos
- }
- return t += this.input.slice(n, this.state.pos++),
- this.finishToken(C.string, t)
- },
- le.jsxReadEntity = function () {
- for (var e = '', t = 0, n = void 0, r = this.input[this.state.pos], i = ++this.state.pos; this.state.pos < this.input.length && t++ < 10; ) {
- if (';' === (r = this.input[this.state.pos++])) {
- '#' === e[0] ? 'x' === e[1] ? (e = e.substr(2), ae.test(e) && (n = se(parseInt(e, 16)))) : (e = e.substr(1), ue.test(e) && (n = se(parseInt(e, 10)))) : n = oe[e];
- break
- }
- e += r
- }
- return n || (this.state.pos = i, '&')
- },
- le.jsxReadWord = function () {
- var e = void 0,
- t = this.state.pos;
- do {
- e = this.input.charCodeAt(++this.state.pos)
- } while (d(e) || 45 === e);
- return this.finishToken(C.jsxName, this.input.slice(t, this.state.pos))
- },
- le.jsxParseIdentifier = function () {
- var e = this.startNode();
- return this.match(C.jsxName) ? e.name = this.state.value : this.state.type.keyword ? e.name = this.state.type.keyword : this.unexpected(),
- this.next(),
- this.finishNode(e, 'JSXIdentifier')
- },
- le.jsxParseNamespacedName = function () {
- var e = this.state.start,
- t = this.state.startLoc,
- n = this.jsxParseIdentifier();
- if (!this.eat(C.colon)) return n;
- var r = this.startNodeAt(e, t);
- return r.namespace = n,
- r.name = this.jsxParseIdentifier(),
- this.finishNode(r, 'JSXNamespacedName')
- },
- le.jsxParseElementName = function () {
- for (var e = this.state.start, t = this.state.startLoc, n = this.jsxParseNamespacedName(); this.eat(C.dot); ) {
- var r = this.startNodeAt(e, t);
- r.object = n,
- r.property = this.jsxParseIdentifier(),
- n = this.finishNode(r, 'JSXMemberExpression')
- }
- return n
- },
- le.jsxParseAttributeValue = function () {
- var e = void 0;
- switch (this.state.type) {
- case C.braceL:
- if ('JSXEmptyExpression' !== (e = this.jsxParseExpressionContainer()).expression.type) return e;
- this.raise(e.start, 'JSX attributes must only be assigned a non-empty expression');
- case C.jsxTagStart:
- case C.string:
- return (e = this.parseExprAtom()).extra = null,
- e;
- default:
- this.raise(this.state.start, 'JSX value should be either an expression or a quoted JSX text')
- }
- },
- le.jsxParseEmptyExpression = function () {
- var e = this.startNodeAt(this.state.lastTokEnd, this.state.lastTokEndLoc);
- return this.finishNodeAt(e, 'JSXEmptyExpression', this.state.start, this.state.startLoc)
- },
- le.jsxParseSpreadChild = function () {
- var e = this.startNode();
- return this.expect(C.braceL),
- this.expect(C.ellipsis),
- e.expression = this.parseExpression(),
- this.expect(C.braceR),
- this.finishNode(e, 'JSXSpreadChild')
- },
- le.jsxParseExpressionContainer = function () {
- var e = this.startNode();
- return this.next(),
- this.match(C.braceR) ? e.expression = this.jsxParseEmptyExpression() : e.expression = this.parseExpression(),
- this.expect(C.braceR),
- this.finishNode(e, 'JSXExpressionContainer')
- },
- le.jsxParseAttribute = function () {
- var e = this.startNode();
- return this.eat(C.braceL) ? (this.expect(C.ellipsis), e.argument = this.parseMaybeAssign(), this.expect(C.braceR), this.finishNode(e, 'JSXSpreadAttribute')) : (e.name = this.jsxParseNamespacedName(), e.value = this.eat(C.eq) ? this.jsxParseAttributeValue() : null, this.finishNode(e, 'JSXAttribute'))
- },
- le.jsxParseOpeningElementAt = function (e, t) {
- var n = this.startNodeAt(e, t);
- for (n.attributes = [
- ], n.name = this.jsxParseElementName(); !this.match(C.slash) && !this.match(C.jsxTagEnd); ) n.attributes.push(this.jsxParseAttribute());
- return n.selfClosing = this.eat(C.slash),
- this.expect(C.jsxTagEnd),
- this.finishNode(n, 'JSXOpeningElement')
- },
- le.jsxParseClosingElementAt = function (e, t) {
- var n = this.startNodeAt(e, t);
- return n.name = this.jsxParseElementName(),
- this.expect(C.jsxTagEnd),
- this.finishNode(n, 'JSXClosingElement')
- },
- le.jsxParseElementAt = function (e, t) {
- var n = this.startNodeAt(e, t),
- r = [
- ],
- i = this.jsxParseOpeningElementAt(e, t),
- s = null;
- if (!i.selfClosing) {
- e: for (; ; ) switch (this.state.type) {
- case C.jsxTagStart:
- if (e = this.state.start, t = this.state.startLoc, this.next(), this.eat(C.slash)) {
- s = this.jsxParseClosingElementAt(e, t);
- break e
- }
- r.push(this.jsxParseElementAt(e, t));
- break;
- case C.jsxText:
- r.push(this.parseExprAtom());
- break;
- case C.braceL:
- this.lookahead().type === C.ellipsis ? r.push(this.jsxParseSpreadChild()) : r.push(this.jsxParseExpressionContainer());
- break;
- default:
- this.unexpected()
- }
- ce(s.name) !== ce(i.name) && this.raise(s.start, 'Expected corresponding JSX closing tag for <' + ce(i.name) + '>')
- }
- return n.openingElement = i,
- n.closingElement = s,
- n.children = r,
- this.match(C.relational) && '<' === this.state.value && this.raise(this.state.start, 'Adjacent JSX elements must be wrapped in an enclosing tag'),
- this.finishNode(n, 'JSXElement')
- },
- le.jsxParseElement = function () {
- var e = this.state.start,
- t = this.state.startLoc;
- return this.next(),
- this.jsxParseElementAt(e, t)
- };
- L.estree = function (e) {
- e.extend('checkDeclaration', function (e) {
- return function (t) {
- Z(t) ? this.checkDeclaration(t.value) : e.call(this, t)
- }
- }),
- e.extend('checkGetterSetterParamCount', function () {
- return function (e) {
- var t = 'get' === e.kind ? 0 : 1;
- if (e.value.params.length !== t) {
- var n = e.start;
- 'get' === e.kind ? this.raise(n, 'getter should have no params') : this.raise(n, 'setter should have exactly one param')
- }
- }
- }),
- e.extend('checkLVal', function (e) {
- return function (t, n, r) {
- var i = this;
- switch (t.type) {
- case 'ObjectPattern':
- t.properties.forEach(function (e) {
- i.checkLVal('Property' === e.type ? e.value : e, n, r, 'object destructuring pattern')
- });
- break;
- default:
- for (var s = arguments.length, o = Array(s > 3 ? s - 3 : 0), a = 3; a < s; a++) o[a - 3] = arguments[a];
- e.call.apply(e, [
- this,
- t,
- n,
- r
- ].concat(o))
- }
- }
- }),
- e.extend('checkPropClash', function () {
- return function (e, t) {
- if (!e.computed && Z(e)) {
- var n = e.key;
- '__proto__' === ('Identifier' === n.type ? n.name : String(n.value)) && (t.proto && this.raise(n.start, 'Redefinition of __proto__ property'), t.proto = !0)
- }
- }
- }),
- e.extend('isStrictBody', function () {
- return function (e, t) {
- if (!t && e.body.body.length > 0) {
- var n = e.body.body,
- r = Array.isArray(n),
- i = 0;
- for (n = r ? n : n[Symbol.iterator](); ; ) {
- var s;
- if (r) {
- if (i >= n.length) break;
- s = n[i++]
- } else {
- if ((i = n.next()).done) break;
- s = i.value
- }
- var o = s;
- if ('ExpressionStatement' !== o.type || 'Literal' !== o.expression.type) break;
- if ('use strict' === o.expression.value) return !0
- }
- }
- return !1
- }
- }),
- e.extend('isValidDirective', function () {
- return function (e) {
- return !('ExpressionStatement' !== e.type || 'Literal' !== e.expression.type || 'string' != typeof e.expression.value || e.expression.extra && e.expression.extra.parenthesized)
- }
- }),
- e.extend('stmtToDirective', function (e) {
- return function (t) {
- var n = e.call(this, t),
- r = t.expression.value;
- return n.value.value = r,
- n
- }
- }),
- e.extend('parseBlockBody', function (e) {
- return function (t) {
- for (var n = this, r = arguments.length, i = Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++) i[s - 1] = arguments[s];
- e.call.apply(e, [
- this,
- t
- ].concat(i)),
- t.directives.reverse().forEach(function (e) {
- t.body.unshift(n.directiveToStmt(e))
- }),
- delete t.directives
- }
- }),
- e.extend('parseClassMethod', function () {
- return function (e, t, n, r) {
- this.parseMethod(t, n, r),
- t.typeParameters && (t.value.typeParameters = t.typeParameters, delete t.typeParameters),
- e.body.push(this.finishNode(t, 'MethodDefinition'))
- }
- }),
- e.extend('parseExprAtom', function (e) {
- return function () {
- switch (this.state.type) {
- case C.regexp:
- return this.estreeParseRegExpLiteral(this.state.value);
- case C.num:
- case C.string:
- return this.estreeParseLiteral(this.state.value);
- case C._null:
- return this.estreeParseLiteral(null);
- case C._true:
- return this.estreeParseLiteral(!0);
- case C._false:
- return this.estreeParseLiteral(!1);
- default:
- for (var t = arguments.length, n = Array(t), r = 0; r < t; r++) n[r] = arguments[r];
- return e.call.apply(e, [
- this
- ].concat(n))
- }
- }
- }),
- e.extend('parseLiteral', function (e) {
- return function () {
- for (var t = arguments.length, n = Array(t), r = 0; r < t; r++) n[r] = arguments[r];
- var i = e.call.apply(e, [
- this
- ].concat(n));
- return i.raw = i.extra.raw,
- delete i.extra,
- i
- }
- }),
- e.extend('parseMethod', function (e) {
- return function (t) {
- var n = this.startNode();
- n.kind = t.kind;
- for (var r = arguments.length, i = Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++) i[s - 1] = arguments[s];
- return delete (n = e.call.apply(e, [
- this,
- n
- ].concat(i))).kind,
- t.value = this.finishNode(n, 'FunctionExpression'),
- t
- }
- }),
- e.extend('parseObjectMethod', function (e) {
- return function () {
- for (var t = arguments.length, n = Array(t), r = 0; r < t; r++) n[r] = arguments[r];
- var i = e.call.apply(e, [
- this
- ].concat(n));
- return i && ('method' === i.kind && (i.kind = 'init'), i.type = 'Property'),
- i
- }
- }),
- e.extend('parseObjectProperty', function (e) {
- return function () {
- for (var t = arguments.length, n = Array(t), r = 0; r < t; r++) n[r] = arguments[r];
- var i = e.call.apply(e, [
- this
- ].concat(n));
- return i && (i.kind = 'init', i.type = 'Property'),
- i
- }
- }),
- e.extend('toAssignable', function (e) {
- return function (t, n) {
- for (var r = arguments.length, i = Array(r > 2 ? r - 2 : 0), s = 2; s < r; s++) i[s - 2] = arguments[s];
- if (Z(t)) return this.toAssignable.apply(this, [
- t.value,
- n
- ].concat(i)),
- t;
- if ('ObjectExpression' === t.type) {
- t.type = 'ObjectPattern';
- var o = t.properties,
- a = Array.isArray(o),
- u = 0;
- for (o = a ? o : o[Symbol.iterator](); ; ) {
- var l;
- if (a) {
- if (u >= o.length) break;
- l = o[u++]
- } else {
- if ((u = o.next()).done) break;
- l = u.value
- }
- var c = l;
- 'get' === c.kind || 'set' === c.kind ? this.raise(c.key.start, 'Object pattern can\'t contain getter or setter') : c.method ? this.raise(c.key.start, 'Object pattern can\'t contain methods') : this.toAssignable(c, n, 'object destructuring pattern')
- }
- return t
- }
- return e.call.apply(e, [
- this,
- t,
- n
- ].concat(i))
- }
- })
- },
- L.flow = function (e) {
- e.extend('parseFunctionBody', function (e) {
- return function (t, n) {
- return this.match(C.colon) && !n && (t.returnType = this.flowParseTypeAndPredicateAnnotation()),
- e.call(this, t, n)
- }
- }),
- e.extend('parseStatement', function (e) {
- return function (t, n) {
- if (this.state.strict && this.match(C.name) && 'interface' === this.state.value) {
- var r = this.startNode();
- return this.next(),
- this.flowParseInterface(r)
- }
- return e.call(this, t, n)
- }
- }),
- e.extend('parseExpressionStatement', function (e) {
- return function (t, n) {
- if ('Identifier' === n.type) if ('declare' === n.name) {
- if (this.match(C._class) || this.match(C.name) || this.match(C._function) || this.match(C._var) || this.match(C._export)) return this.flowParseDeclare(t)
- } else if (this.match(C.name)) {
- if ('interface' === n.name) return this.flowParseInterface(t);
- if ('type' === n.name) return this.flowParseTypeAlias(t);
- if ('opaque' === n.name) return this.flowParseOpaqueType(t, !1)
- }
- return e.call(this, t, n)
- }
- }),
- e.extend('shouldParseExportDeclaration', function (e) {
- return function () {
- return this.isContextual('type') || this.isContextual('interface') || this.isContextual('opaque') || e.call(this)
- }
- }),
- e.extend('isExportDefaultSpecifier', function (e) {
- return function () {
- return (!this.match(C.name) || 'type' !== this.state.value && 'interface' !== this.state.value && 'opaque' !== this.state.value) && e.call(this)
- }
- }),
- e.extend('parseConditional', function (e) {
- return function (t, n, r, i, s) {
- if (s && this.match(C.question)) {
- var o = this.state.clone();
- try {
- return e.call(this, t, n, r, i)
- } catch (e) {
- if (e instanceof SyntaxError) return this.state = o,
- s.start = e.pos || this.state.start,
- t;
- throw e
- }
- }
- return e.call(this, t, n, r, i)
- }
- }),
- e.extend('parseParenItem', function (e) {
- return function (t, n, r) {
- if (t = e.call(this, t, n, r), this.eat(C.question) && (t.optional = !0), this.match(C.colon)) {
- var i = this.startNodeAt(n, r);
- return i.expression = t,
- i.typeAnnotation = this.flowParseTypeAnnotation(),
- this.finishNode(i, 'TypeCastExpression')
- }
- return t
- }
- }),
- e.extend('parseExport', function (e) {
- return function (t) {
- return 'ExportNamedDeclaration' === (t = e.call(this, t)).type && (t.exportKind = t.exportKind || 'value'),
- t
- }
- }),
- e.extend('parseExportDeclaration', function (e) {
- return function (t) {
- if (this.isContextual('type')) {
- t.exportKind = 'type';
- var n = this.startNode();
- return this.next(),
- this.match(C.braceL) ? (t.specifiers = this.parseExportSpecifiers(), this.parseExportFrom(t), null) : this.flowParseTypeAlias(n)
- }
- if (this.isContextual('opaque')) {
- t.exportKind = 'type';
- var r = this.startNode();
- return this.next(),
- this.flowParseOpaqueType(r, !1)
- }
- if (this.isContextual('interface')) {
- t.exportKind = 'type';
- var i = this.startNode();
- return this.next(),
- this.flowParseInterface(i)
- }
- return e.call(this, t)
- }
- }),
- e.extend('parseClassId', function (e) {
- return function (t) {
- e.apply(this, arguments),
- this.isRelational('<') && (t.typeParameters = this.flowParseTypeParameterDeclaration())
- }
- }),
- e.extend('isKeyword', function (e) {
- return function (t) {
- return (!this.state.inType || 'void' !== t) && e.call(this, t)
- }
- }),
- e.extend('readToken', function (e) {
- return function (t) {
- return !this.state.inType || 62 !== t && 60 !== t ? e.call(this, t) : this.finishOp(C.relational, 1)
- }
- }),
- e.extend('jsx_readToken', function (e) {
- return function () {
- if (!this.state.inType) return e.call(this)
- }
- }),
- e.extend('toAssignable', function (e) {
- return function (t, n, r) {
- return 'TypeCastExpression' === t.type ? e.call(this, this.typeCastToParameter(t), n, r) : e.call(this, t, n, r)
- }
- }),
- e.extend('toAssignableList', function (e) {
- return function (t, n, r) {
- for (var i = 0; i < t.length; i++) {
- var s = t[i];
- s && 'TypeCastExpression' === s.type && (t[i] = this.typeCastToParameter(s))
- }
- return e.call(this, t, n, r)
- }
- }),
- e.extend('toReferencedList', function () {
- return function (e) {
- for (var t = 0; t < e.length; t++) {
- var n = e[t];
- n && n._exprListItem && 'TypeCastExpression' === n.type && this.raise(n.start, 'Unexpected type cast')
- }
- return e
- }
- }),
- e.extend('parseExprListItem', function (e) {
- return function () {
- for (var t = this.startNode(), n = arguments.length, r = Array(n), i = 0; i < n; i++) r[i] = arguments[i];
- var s = e.call.apply(e, [
- this
- ].concat(r));
- return this.match(C.colon) ? (t._exprListItem = !0, t.expression = s, t.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(t, 'TypeCastExpression')) : s
- }
- }),
- e.extend('checkLVal', function (e) {
- return function (t) {
- if ('TypeCastExpression' !== t.type) return e.apply(this, arguments)
- }
- }),
- e.extend('parseClassProperty', function (e) {
- return function (t) {
- return delete t.variancePos,
- this.match(C.colon) && (t.typeAnnotation = this.flowParseTypeAnnotation()),
- e.call(this, t)
- }
- }),
- e.extend('isClassMethod', function (e) {
- return function () {
- return this.isRelational('<') || e.call(this)
- }
- }),
- e.extend('isClassProperty', function (e) {
- return function () {
- return this.match(C.colon) || e.call(this)
- }
- }),
- e.extend('isNonstaticConstructor', function (e) {
- return function (t) {
- return !this.match(C.colon) && e.call(this, t)
- }
- }),
- e.extend('parseClassMethod', function (e) {
- return function (t, n) {
- n.variance && this.unexpected(n.variancePos),
- delete n.variance,
- delete n.variancePos,
- this.isRelational('<') && (n.typeParameters = this.flowParseTypeParameterDeclaration());
- for (var r = arguments.length, i = Array(r > 2 ? r - 2 : 0), s = 2; s < r; s++) i[s - 2] = arguments[s];
- e.call.apply(e, [
- this,
- t,
- n
- ].concat(i))
- }
- }),
- e.extend('parseClassSuper', function (e) {
- return function (t, n) {
- if (e.call(this, t, n), t.superClass && this.isRelational('<') && (t.superTypeParameters = this.flowParseTypeParameterInstantiation()), this.isContextual('implements')) {
- this.next();
- var r = t.implements = [
- ];
- do {
- var i = this.startNode();
- i.id = this.parseIdentifier(),
- this.isRelational('<') ? i.typeParameters = this.flowParseTypeParameterInstantiation() : i.typeParameters = null,
- r.push(this.finishNode(i, 'ClassImplements'))
- } while (this.eat(C.comma))
- }
- }
- }),
- e.extend('parsePropertyName', function (e) {
- return function (t) {
- var n = this.state.start,
- r = this.flowParseVariance(),
- i = e.call(this, t);
- return t.variance = r,
- t.variancePos = n,
- i
- }
- }),
- e.extend('parseObjPropValue', function (e) {
- return function (t) {
- t.variance && this.unexpected(t.variancePos),
- delete t.variance,
- delete t.variancePos;
- var n = void 0;
- this.isRelational('<') && (n = this.flowParseTypeParameterDeclaration(), this.match(C.parenL) || this.unexpected()),
- e.apply(this, arguments),
- n && ((t.value || t).typeParameters = n)
- }
- }),
- e.extend('parseAssignableListItemTypes', function () {
- return function (e) {
- return this.eat(C.question) && (e.optional = !0),
- this.match(C.colon) && (e.typeAnnotation = this.flowParseTypeAnnotation()),
- this.finishNode(e, e.type),
- e
- }
- }),
- e.extend('parseMaybeDefault', function (e) {
- return function () {
- for (var t = arguments.length, n = Array(t), r = 0; r < t; r++) n[r] = arguments[r];
- var i = e.apply(this, n);
- return 'AssignmentPattern' === i.type && i.typeAnnotation && i.right.start < i.typeAnnotation.start && this.raise(i.typeAnnotation.start, 'Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`'),
- i
- }
- }),
- e.extend('parseImportSpecifiers', function (e) {
- return function (t) {
- t.importKind = 'value';
- var n = null;
- if (this.match(C._typeof) ? n = 'typeof' : this.isContextual('type') && (n = 'type'), n) {
- var r = this.lookahead();
- (r.type === C.name && 'from' !== r.value || r.type === C.braceL || r.type === C.star) && (this.next(), t.importKind = n)
- }
- e.call(this, t)
- }
- }),
- e.extend('parseImportSpecifier', function () {
- return function (e) {
- var t = this.startNode(),
- n = this.state.start,
- r = this.parseIdentifier(!0),
- i = null;
- 'type' === r.name ? i = 'type' : 'typeof' === r.name && (i = 'typeof');
- var s = !1;
- if (this.isContextual('as')) {
- var o = this.parseIdentifier(!0);
- null === i || this.match(C.name) || this.state.type.keyword ? (t.imported = r, t.importKind = null, t.local = this.parseIdentifier()) : (t.imported = o, t.importKind = i, t.local = o.__clone())
- } else null !== i && (this.match(C.name) || this.state.type.keyword) ? (t.imported = this.parseIdentifier(!0), t.importKind = i, this.eatContextual('as') ? t.local = this.parseIdentifier() : (s = !0, t.local = t.imported.__clone())) : (s = !0, t.imported = r, t.importKind = null, t.local = t.imported.__clone());
- 'type' !== e.importKind && 'typeof' !== e.importKind || 'type' !== t.importKind && 'typeof' !== t.importKind || this.raise(n, '`The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements`'),
- s && this.checkReservedWord(t.local.name, t.start, !0, !0),
- this.checkLVal(t.local, !0, void 0, 'import specifier'),
- e.specifiers.push(this.finishNode(t, 'ImportSpecifier'))
- }
- }),
- e.extend('parseFunctionParams', function (e) {
- return function (t) {
- this.isRelational('<') && (t.typeParameters = this.flowParseTypeParameterDeclaration()),
- e.call(this, t)
- }
- }),
- e.extend('parseVarHead', function (e) {
- return function (t) {
- e.call(this, t),
- this.match(C.colon) && (t.id.typeAnnotation = this.flowParseTypeAnnotation(), this.finishNode(t.id, t.id.type))
- }
- }),
- e.extend('parseAsyncArrowFromCallExpression', function (e) {
- return function (t, n) {
- if (this.match(C.colon)) {
- var r = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = !0,
- t.returnType = this.flowParseTypeAnnotation(),
- this.state.noAnonFunctionType = r
- }
- return e.call(this, t, n)
- }
- }),
- e.extend('shouldParseAsyncArrow', function (e) {
- return function () {
- return this.match(C.colon) || e.call(this)
- }
- }),
- e.extend('parseMaybeAssign', function (e) {
- return function () {
- for (var t = null, n = arguments.length, r = Array(n), i = 0; i < n; i++) r[i] = arguments[i];
- if (C.jsxTagStart && this.match(C.jsxTagStart)) {
- var s = this.state.clone();
- try {
- return e.apply(this, r)
- } catch (e) {
- if (!(e instanceof SyntaxError)) throw e;
- this.state = s,
- this.state.context.length -= 2,
- t = e
- }
- }
- if (null != t || this.isRelational('<')) {
- var o = void 0,
- a = void 0;
- try {
- a = this.flowParseTypeParameterDeclaration(),
- (o = e.apply(this, r)).typeParameters = a,
- o.start = a.start,
- o.loc.start = a.loc.start
- } catch (e) {
- throw t || e
- }
- if ('ArrowFunctionExpression' === o.type) return o;
- if (null != t) throw t;
- this.raise(a.start, 'Expected an arrow function after this type parameter declaration')
- }
- return e.apply(this, r)
- }
- }),
- e.extend('parseArrow', function (e) {
- return function (t) {
- if (this.match(C.colon)) {
- var n = this.state.clone();
- try {
- var r = this.state.noAnonFunctionType;
- this.state.noAnonFunctionType = !0;
- var i = this.flowParseTypeAndPredicateAnnotation();
- this.state.noAnonFunctionType = r,
- this.canInsertSemicolon() && this.unexpected(),
- this.match(C.arrow) || this.unexpected(),
- t.returnType = i
- } catch (e) {
- if (!(e instanceof SyntaxError)) throw e;
- this.state = n
- }
- }
- return e.call(this, t)
- }
- }),
- e.extend('shouldParseArrow', function (e) {
- return function () {
- return this.match(C.colon) || e.call(this)
- }
- })
- },
- L.jsx = function (e) {
- e.extend('parseExprAtom', function (e) {
- return function (t) {
- if (this.match(C.jsxText)) {
- var n = this.parseLiteral(this.state.value, 'JSXText');
- return n.extra = null,
- n
- }
- return this.match(C.jsxTagStart) ? this.jsxParseElement() : e.call(this, t)
- }
- }),
- e.extend('readToken', function (e) {
- return function (t) {
- if (this.state.inPropertyName) return e.call(this, t);
- var n = this.curContext();
- if (n === O.j_expr) return this.jsxReadToken();
- if (n === O.j_oTag || n === O.j_cTag) {
- if (f(t)) return this.jsxReadWord();
- if (62 === t) return ++this.state.pos,
- this.finishToken(C.jsxTagEnd);
- if ((34 === t || 39 === t) && n === O.j_oTag) return this.jsxReadString(t)
- }
- return 60 === t && this.state.exprAllowed ? (++this.state.pos, this.finishToken(C.jsxTagStart)) : e.call(this, t)
- }
- }),
- e.extend('updateContext', function (e) {
- return function (t) {
- if (this.match(C.braceL)) {
- var n = this.curContext();
- n === O.j_oTag ? this.state.context.push(O.braceExpression) : n === O.j_expr ? this.state.context.push(O.templateQuasi) : e.call(this, t),
- this.state.exprAllowed = !0
- } else {
- if (!this.match(C.slash) || t !== C.jsxTagStart) return e.call(this, t);
- this.state.context.length -= 2,
- this.state.context.push(O.j_cTag),
- this.state.exprAllowed = !1
- }
- }
- })
- },
- n.parse = function (e, t) {
- return new j(t, e).parse()
- },
- n.parseExpression = function (e, t) {
- var n = new j(t, e);
- return n.options.strictMode && (n.state.strict = !0),
- n.getExpression()
- },
- n.tokTypes = C
- },
- {
- }
- ],
- 39: [
- function (e, t, n) {
- 'use strict';
- n.byteLength = function (e) {
- var t = l(e),
- n = t[0],
- r = t[1];
- return 3 * (n + r) / 4 - r
- },
- n.toByteArray = function (e) {
- var t,
- n,
- r = l(e),
- o = r[0],
- a = r[1],
- u = new s(function (e, t, n) {
- return 3 * (t + n) / 4 - n
- }(0, o, a)),
- c = 0,
- p = a > 0 ? o - 4 : o;
- for (n = 0; n < p; n += 4) t = i[e.charCodeAt(n)] << 18 | i[e.charCodeAt(n + 1)] << 12 | i[e.charCodeAt(n + 2)] << 6 | i[e.charCodeAt(n + 3)],
- u[c++] = t >> 16 & 255,
- u[c++] = t >> 8 & 255,
- u[c++] = 255 & t;
- 2 === a && (t = i[e.charCodeAt(n)] << 2 | i[e.charCodeAt(n + 1)] >> 4, u[c++] = 255 & t);
- 1 === a && (t = i[e.charCodeAt(n)] << 10 | i[e.charCodeAt(n + 1)] << 4 | i[e.charCodeAt(n + 2)] >> 2, u[c++] = t >> 8 & 255, u[c++] = 255 & t);
- return u
- },
- n.fromByteArray = function (e) {
- for (var t, n = e.length, i = n % 3, s = [
- ], o = 0, a = n - i; o < a; o += 16383) s.push(c(e, o, o + 16383 > a ? a : o + 16383));
- 1 === i ? (t = e[n - 1], s.push(r[t >> 2] + r[t << 4 & 63] + '==')) : 2 === i && (t = (e[n - 2] << 8) + e[n - 1], s.push(r[t >> 10] + r[t >> 4 & 63] + r[t << 2 & 63] + '='));
- return s.join('')
- };
- for (var r = [
- ], i = [
- ], s = 'undefined' != typeof Uint8Array ? Uint8Array : Array, o = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', a = 0, u = o.length; a < u; ++a) r[a] = o[a],
- i[o.charCodeAt(a)] = a;
- function l(e) {
- var t = e.length;
- if (t % 4 > 0) throw new Error('Invalid string. Length must be a multiple of 4');
- var n = e.indexOf('=');
- return - 1 === n && (n = t),
- [
- n,
- n === t ? 0 : 4 - n % 4
- ]
- }
- function c(e, t, n) {
- for (var i, s, o = [
- ], a = t; a < n; a += 3) i = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (255 & e[a + 2]),
- o.push(r[(s = i) >> 18 & 63] + r[s >> 12 & 63] + r[s >> 6 & 63] + r[63 & s]);
- return o.join('')
- }
- i['-'.charCodeAt(0)] = 62,
- i['_'.charCodeAt(0)] = 63
- },
- {
- }
- ],
- 40: [
- function (e, t, n) {
- },
- {
- }
- ],
- 41: [
- function (e, t, n) {
- arguments[4][40][0].apply(n, arguments)
- },
- {
- dup: 40
- }
- ],
- 42: [
- function (e, t, n) {
- (function (t) {
- 'use strict';
- var r = e('base64-js'),
- i = e('ieee754'),
- s = 'function' == typeof Symbol && 'function' == typeof Symbol.for ? Symbol.for('nodejs.util.inspect.custom') : null;
- n.Buffer = t,
- n.SlowBuffer = function (e) {
- + e != e && (e = 0);
- return t.alloc( + e)
- },
- n.INSPECT_MAX_BYTES = 50;
- var o = 2147483647;
- function a(e) {
- if (e > o) throw new RangeError('The value "' + e + '" is invalid for option "size"');
- var n = new Uint8Array(e);
- return Object.setPrototypeOf(n, t.prototype),
- n
- }
- function t(e, t, n) {
- if ('number' == typeof e) {
- if ('string' == typeof t) throw new TypeError('The "string" argument must be of type string. Received type number');
- return c(e)
- }
- return u(e, t, n)
- }
- function u(e, n, r) {
- if ('string' == typeof e) return function (e, n) {
- 'string' == typeof n && '' !== n || (n = 'utf8');
- if (!t.isEncoding(n)) throw new TypeError('Unknown encoding: ' + n);
- var r = 0 | f(e, n),
- i = a(r),
- s = i.write(e, n);
- s !== r && (i = i.slice(0, s));
- return i
- }(e, n);
- if (ArrayBuffer.isView(e)) return p(e);
- if (null == e) throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof e);
- if (M(e, ArrayBuffer) || e && M(e.buffer, ArrayBuffer)) return function (e, n, r) {
- if (n < 0 || e.byteLength < n) throw new RangeError('"offset" is outside of buffer bounds');
- if (e.byteLength < n + (r || 0)) throw new RangeError('"length" is outside of buffer bounds');
- var i;
- i = void 0 === n && void 0 === r ? new Uint8Array(e) : void 0 === r ? new Uint8Array(e, n) : new Uint8Array(e, n, r);
- return Object.setPrototypeOf(i, t.prototype),
- i
- }(e, n, r);
- if ('number' == typeof e) throw new TypeError('The "value" argument must not be of type number. Received type number');
- var i = e.valueOf && e.valueOf();
- if (null != i && i !== e) return t.from(i, n, r);
- var s = function (e) {
- if (t.isBuffer(e)) {
- var n = 0 | h(e.length),
- r = a(n);
- return 0 === r.length ? r : (e.copy(r, 0, 0, n), r)
- }
- if (void 0 !== e.length) return 'number' != typeof e.length || U(e.length) ? a(0) : p(e);
- if ('Buffer' === e.type && Array.isArray(e.data)) return p(e.data)
- }(e);
- if (s) return s;
- if ('undefined' != typeof Symbol && null != Symbol.toPrimitive && 'function' == typeof e[Symbol.toPrimitive]) return t.from(e[Symbol.toPrimitive]('string'), n, r);
- throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof e)
- }
- function l(e) {
- if ('number' != typeof e) throw new TypeError('"size" argument must be of type number');
- if (e < 0) throw new RangeError('The value "' + e + '" is invalid for option "size"')
- }
- function c(e) {
- return l(e),
- a(e < 0 ? 0 : 0 | h(e))
- }
- function p(e) {
- for (var t = e.length < 0 ? 0 : 0 | h(e.length), n = a(t), r = 0; r < t; r += 1) n[r] = 255 & e[r];
- return n
- }
- function h(e) {
- if (e >= o) throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + o.toString(16) + ' bytes');
- return 0 | e
- }
- function f(e, n) {
- if (t.isBuffer(e)) return e.length;
- if (ArrayBuffer.isView(e) || M(e, ArrayBuffer)) return e.byteLength;
- if ('string' != typeof e) throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof e);
- var r = e.length,
- i = arguments.length > 2 && !0 === arguments[2];
- if (!i && 0 === r) return 0;
- for (var s = !1; ; ) switch (n) {
- case 'ascii':
- case 'latin1':
- case 'binary':
- return r;
- case 'utf8':
- case 'utf-8':
- return L(e).length;
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return 2 * r;
- case 'hex':
- return r >>> 1;
- case 'base64':
- return I(e).length;
- default:
- if (s) return i ? - 1 : L(e).length;
- n = ('' + n).toLowerCase(),
- s = !0
- }
- }
- function d(e, t, n) {
- var r = e[t];
- e[t] = e[n],
- e[n] = r
- }
- function m(e, n, r, i, s) {
- if (0 === e.length) return - 1;
- if ('string' == typeof r ? (i = r, r = 0) : r > 2147483647 ? r = 2147483647 : r < - 2147483648 && (r = - 2147483648), U(r = + r) && (r = s ? 0 : e.length - 1), r < 0 && (r = e.length + r), r >= e.length) {
- if (s) return - 1;
- r = e.length - 1
- } else if (r < 0) {
- if (!s) return - 1;
- r = 0
- }
- if ('string' == typeof n && (n = t.from(n, i)), t.isBuffer(n)) return 0 === n.length ? - 1 : g(e, n, r, i, s);
- if ('number' == typeof n) return n &= 255,
- 'function' == typeof Uint8Array.prototype.indexOf ? s ? Uint8Array.prototype.indexOf.call(e, n, r) : Uint8Array.prototype.lastIndexOf.call(e, n, r) : g(e, [
- n
- ], r, i, s);
- throw new TypeError('val must be string, number or Buffer')
- }
- function g(e, t, n, r, i) {
- var s,
- o = 1,
- a = e.length,
- u = t.length;
- if (void 0 !== r && ('ucs2' === (r = String(r).toLowerCase()) || 'ucs-2' === r || 'utf16le' === r || 'utf-16le' === r)) {
- if (e.length < 2 || t.length < 2) return - 1;
- o = 2,
- a /= 2,
- u /= 2,
- n /= 2
- }
- function l(e, t) {
- return 1 === o ? e[t] : e.readUInt16BE(t * o)
- }
- if (i) {
- var c = - 1;
- for (s = n; s < a; s++) if (l(e, s) === l(t, - 1 === c ? 0 : s - c)) {
- if ( - 1 === c && (c = s), s - c + 1 === u) return c * o
- } else - 1 !== c && (s -= s - c),
- c = - 1
- } else for (n + u > a && (n = a - u), s = n; s >= 0; s--) {
- for (var p = !0, h = 0; h < u; h++) if (l(e, s + h) !== l(t, h)) {
- p = !1;
- break
- }
- if (p) return s
- }
- return - 1
- }
- function y(e, t, n, r) {
- n = Number(n) || 0;
- var i = e.length - n;
- r ? (r = Number(r)) > i && (r = i) : r = i;
- var s = t.length;
- r > s / 2 && (r = s / 2);
- for (var o = 0; o < r; ++o) {
- var a = parseInt(t.substr(2 * o, 2), 16);
- if (U(a)) return o;
- e[n + o] = a
- }
- return o
- }
- function v(e, t, n, r) {
- return j(L(t, e.length - n), e, n, r)
- }
- function b(e, t, n, r) {
- return j(function (e) {
- for (var t = [
- ], n = 0; n < e.length; ++n) t.push(255 & e.charCodeAt(n));
- return t
- }(t), e, n, r)
- }
- function x(e, t, n, r) {
- return b(e, t, n, r)
- }
- function A(e, t, n, r) {
- return j(I(t), e, n, r)
- }
- function E(e, t, n, r) {
- return j(function (e, t) {
- for (var n, r, i, s = [
- ], o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o),
- r = n >> 8,
- i = n % 256,
- s.push(i),
- s.push(r);
- return s
- }(t, e.length - n), e, n, r)
- }
- function _(e, t, n) {
- return 0 === t && n === e.length ? r.fromByteArray(e) : r.fromByteArray(e.slice(t, n))
- }
- function C(e, t, n) {
- n = Math.min(e.length, n);
- for (var r = [
- ], i = t; i < n; ) {
- var s,
- o,
- a,
- u,
- l = e[i],
- c = null,
- p = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
- if (i + p <= n) switch (p) {
- case 1:
- l < 128 && (c = l);
- break;
- case 2:
- 128 == (192 & (s = e[i + 1])) && (u = (31 & l) << 6 | 63 & s) > 127 && (c = u);
- break;
- case 3:
- s = e[i + 1],
- o = e[i + 2],
- 128 == (192 & s) && 128 == (192 & o) && (u = (15 & l) << 12 | (63 & s) << 6 | 63 & o) > 2047 && (u < 55296 || u > 57343) && (c = u);
- break;
- case 4:
- s = e[i + 1],
- o = e[i + 2],
- a = e[i + 3],
- 128 == (192 & s) && 128 == (192 & o) && 128 == (192 & a) && (u = (15 & l) << 18 | (63 & s) << 12 | (63 & o) << 6 | 63 & a) > 65535 && u < 1114112 && (c = u)
- }
- null === c ? (c = 65533, p = 1) : c > 65535 && (c -= 65536, r.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c),
- r.push(c),
- i += p
- }
- return function (e) {
- var t = e.length;
- if (t <= w) return String.fromCharCode.apply(String, e);
- var n = '',
- r = 0;
- for (; r < t; ) n += String.fromCharCode.apply(String, e.slice(r, r += w));
- return n
- }(r)
- }
- n.kMaxLength = o,
- t.TYPED_ARRAY_SUPPORT = function () {
- try {
- var e = new Uint8Array(1),
- t = {
- foo: function () {
- return 42
- }
- };
- return Object.setPrototypeOf(t, Uint8Array.prototype),
- Object.setPrototypeOf(e, t),
- 42 === e.foo()
- } catch (e) {
- return !1
- }
- }(),
- t.TYPED_ARRAY_SUPPORT || 'undefined' == typeof console || 'function' != typeof console.error || console.error('This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.'),
- Object.defineProperty(t.prototype, 'parent', {
- enumerable: !0,
- get: function () {
- if (t.isBuffer(this)) return this.buffer
- }
- }),
- Object.defineProperty(t.prototype, 'offset', {
- enumerable: !0,
- get: function () {
- if (t.isBuffer(this)) return this.byteOffset
- }
- }),
- 'undefined' != typeof Symbol && null != Symbol.species && t[Symbol.species] === t && Object.defineProperty(t, Symbol.species, {
- value: null,
- configurable: !0,
- enumerable: !1,
- writable: !1
- }),
- t.poolSize = 8192,
- t.from = function (e, t, n) {
- return u(e, t, n)
- },
- Object.setPrototypeOf(t.prototype, Uint8Array.prototype),
- Object.setPrototypeOf(t, Uint8Array),
- t.alloc = function (e, t, n) {
- return function (e, t, n) {
- return l(e),
- e <= 0 ? a(e) : void 0 !== t ? 'string' == typeof n ? a(e).fill(t, n) : a(e).fill(t) : a(e)
- }(e, t, n)
- },
- t.allocUnsafe = function (e) {
- return c(e)
- },
- t.allocUnsafeSlow = function (e) {
- return c(e)
- },
- t.isBuffer = function (e) {
- return null != e && !0 === e._isBuffer && e !== t.prototype
- },
- t.compare = function (e, n) {
- if (M(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), M(n, Uint8Array) && (n = t.from(n, n.offset, n.byteLength)), !t.isBuffer(e) || !t.isBuffer(n)) throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
- if (e === n) return 0;
- for (var r = e.length, i = n.length, s = 0, o = Math.min(r, i); s < o; ++s) if (e[s] !== n[s]) {
- r = e[s],
- i = n[s];
- break
- }
- return r < i ? - 1 : i < r ? 1 : 0
- },
- t.isEncoding = function (e) {
- switch (String(e).toLowerCase()) {
- case 'hex':
- case 'utf8':
- case 'utf-8':
- case 'ascii':
- case 'latin1':
- case 'binary':
- case 'base64':
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return !0;
- default:
- return !1
- }
- },
- t.concat = function (e, n) {
- if (!Array.isArray(e)) throw new TypeError('"list" argument must be an Array of Buffers');
- if (0 === e.length) return t.alloc(0);
- var r;
- if (void 0 === n) for (n = 0, r = 0; r < e.length; ++r) n += e[r].length;
- var i = t.allocUnsafe(n),
- s = 0;
- for (r = 0; r < e.length; ++r) {
- var o = e[r];
- if (M(o, Uint8Array) && (o = t.from(o)), !t.isBuffer(o)) throw new TypeError('"list" argument must be an Array of Buffers');
- o.copy(i, s),
- s += o.length
- }
- return i
- },
- t.byteLength = f,
- t.prototype._isBuffer = !0,
- t.prototype.swap16 = function () {
- var e = this.length;
- if (e % 2 != 0) throw new RangeError('Buffer size must be a multiple of 16-bits');
- for (var t = 0; t < e; t += 2) d(this, t, t + 1);
- return this
- },
- t.prototype.swap32 = function () {
- var e = this.length;
- if (e % 4 != 0) throw new RangeError('Buffer size must be a multiple of 32-bits');
- for (var t = 0; t < e; t += 4) d(this, t, t + 3),
- d(this, t + 1, t + 2);
- return this
- },
- t.prototype.swap64 = function () {
- var e = this.length;
- if (e % 8 != 0) throw new RangeError('Buffer size must be a multiple of 64-bits');
- for (var t = 0; t < e; t += 8) d(this, t, t + 7),
- d(this, t + 1, t + 6),
- d(this, t + 2, t + 5),
- d(this, t + 3, t + 4);
- return this
- },
- t.prototype.toString = function () {
- var e = this.length;
- return 0 === e ? '' : 0 === arguments.length ? C(this, 0, e) : function (e, t, n) {
- var r = !1;
- if ((void 0 === t || t < 0) && (t = 0), t > this.length) return '';
- if ((void 0 === n || n > this.length) && (n = this.length), n <= 0) return '';
- if ((n >>>= 0) <= (t >>>= 0)) return '';
- for (e || (e = 'utf8'); ; ) switch (e) {
- case 'hex':
- return S(this, t, n);
- case 'utf8':
- case 'utf-8':
- return C(this, t, n);
- case 'ascii':
- return D(this, t, n);
- case 'latin1':
- case 'binary':
- return k(this, t, n);
- case 'base64':
- return _(this, t, n);
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return T(this, t, n);
- default:
- if (r) throw new TypeError('Unknown encoding: ' + e);
- e = (e + '').toLowerCase(),
- r = !0
- }
- }.apply(this, arguments)
- },
- t.prototype.toLocaleString = t.prototype.toString,
- t.prototype.equals = function (e) {
- if (!t.isBuffer(e)) throw new TypeError('Argument must be a Buffer');
- return this === e || 0 === t.compare(this, e)
- },
- t.prototype.inspect = function () {
- var e = '',
- t = n.INSPECT_MAX_BYTES;
- return e = this.toString('hex', 0, t).replace(/(.{2})/g, '$1 ').trim(),
- this.length > t && (e += ' ... '),
- '<Buffer ' + e + '>'
- },
- s && (t.prototype[s] = t.prototype.inspect),
- t.prototype.compare = function (e, n, r, i, s) {
- if (M(e, Uint8Array) && (e = t.from(e, e.offset, e.byteLength)), !t.isBuffer(e)) throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof e);
- if (void 0 === n && (n = 0), void 0 === r && (r = e ? e.length : 0), void 0 === i && (i = 0), void 0 === s && (s = this.length), n < 0 || r > e.length || i < 0 || s > this.length) throw new RangeError('out of range index');
- if (i >= s && n >= r) return 0;
- if (i >= s) return - 1;
- if (n >= r) return 1;
- if (n >>>= 0, r >>>= 0, i >>>= 0, s >>>= 0, this === e) return 0;
- for (var o = s - i, a = r - n, u = Math.min(o, a), l = this.slice(i, s), c = e.slice(n, r), p = 0; p < u; ++p) if (l[p] !== c[p]) {
- o = l[p],
- a = c[p];
- break
- }
- return o < a ? - 1 : a < o ? 1 : 0
- },
- t.prototype.includes = function (e, t, n) {
- return - 1 !== this.indexOf(e, t, n)
- },
- t.prototype.indexOf = function (e, t, n) {
- return m(this, e, t, n, !0)
- },
- t.prototype.lastIndexOf = function (e, t, n) {
- return m(this, e, t, n, !1)
- },
- t.prototype.write = function (e, t, n, r) {
- if (void 0 === t) r = 'utf8',
- n = this.length,
- t = 0;
- else if (void 0 === n && 'string' == typeof t) r = t,
- n = this.length,
- t = 0;
- else {
- if (!isFinite(t)) throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
- t >>>= 0,
- isFinite(n) ? (n >>>= 0, void 0 === r && (r = 'utf8')) : (r = n, n = void 0)
- }
- var i = this.length - t;
- if ((void 0 === n || n > i) && (n = i), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw new RangeError('Attempt to write outside buffer bounds');
- r || (r = 'utf8');
- for (var s = !1; ; ) switch (r) {
- case 'hex':
- return y(this, e, t, n);
- case 'utf8':
- case 'utf-8':
- return v(this, e, t, n);
- case 'ascii':
- return b(this, e, t, n);
- case 'latin1':
- case 'binary':
- return x(this, e, t, n);
- case 'base64':
- return A(this, e, t, n);
- case 'ucs2':
- case 'ucs-2':
- case 'utf16le':
- case 'utf-16le':
- return E(this, e, t, n);
- default:
- if (s) throw new TypeError('Unknown encoding: ' + r);
- r = ('' + r).toLowerCase(),
- s = !0
- }
- },
- t.prototype.toJSON = function () {
- return {
- type: 'Buffer',
- data: Array.prototype.slice.call(this._arr || this, 0)
- }
- };
- var w = 4096;
- function D(e, t, n) {
- var r = '';
- n = Math.min(e.length, n);
- for (var i = t; i < n; ++i) r += String.fromCharCode(127 & e[i]);
- return r
- }
- function k(e, t, n) {
- var r = '';
- n = Math.min(e.length, n);
- for (var i = t; i < n; ++i) r += String.fromCharCode(e[i]);
- return r
- }
- function S(e, t, n) {
- var r = e.length;
- (!t || t < 0) && (t = 0),
- (!n || n < 0 || n > r) && (n = r);
- for (var i = '', s = t; s < n; ++s) i += V[e[s]];
- return i
- }
- function T(e, t, n) {
- for (var r = e.slice(t, n), i = '', s = 0; s < r.length; s += 2) i += String.fromCharCode(r[s] + 256 * r[s + 1]);
- return i
- }
- function F(e, t, n) {
- if (e % 1 != 0 || e < 0) throw new RangeError('offset is not uint');
- if (e + t > n) throw new RangeError('Trying to access beyond buffer length')
- }
- function O(e, n, r, i, s, o) {
- if (!t.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');
- if (n > s || n < o) throw new RangeError('"value" argument is out of bounds');
- if (r + i > e.length) throw new RangeError('Index out of range')
- }
- function B(e, t, n, r, i, s) {
- if (n + r > e.length) throw new RangeError('Index out of range');
- if (n < 0) throw new RangeError('Index out of range')
- }
- function P(e, t, n, r, s) {
- return t = + t,
- n >>>= 0,
- s || B(e, 0, n, 4),
- i.write(e, t, n, r, 23, 4),
- n + 4
- }
- function N(e, t, n, r, s) {
- return t = + t,
- n >>>= 0,
- s || B(e, 0, n, 8),
- i.write(e, t, n, r, 52, 8),
- n + 8
- }
- t.prototype.slice = function (e, n) {
- var r = this.length;
- e = ~~e,
- n = void 0 === n ? r : ~~n,
- e < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r),
- n < 0 ? (n += r) < 0 && (n = 0) : n > r && (n = r),
- n < e && (n = e);
- var i = this.subarray(e, n);
- return Object.setPrototypeOf(i, t.prototype),
- i
- },
- t.prototype.readUIntLE = function (e, t, n) {
- e >>>= 0,
- t >>>= 0,
- n || F(e, t, this.length);
- for (var r = this[e], i = 1, s = 0; ++s < t && (i *= 256); ) r += this[e + s] * i;
- return r
- },
- t.prototype.readUIntBE = function (e, t, n) {
- e >>>= 0,
- t >>>= 0,
- n || F(e, t, this.length);
- for (var r = this[e + --t], i = 1; t > 0 && (i *= 256); ) r += this[e + --t] * i;
- return r
- },
- t.prototype.readUInt8 = function (e, t) {
- return e >>>= 0,
- t || F(e, 1, this.length),
- this[e]
- },
- t.prototype.readUInt16LE = function (e, t) {
- return e >>>= 0,
- t || F(e, 2, this.length),
- this[e] | this[e + 1] << 8
- },
- t.prototype.readUInt16BE = function (e, t) {
- return e >>>= 0,
- t || F(e, 2, this.length),
- this[e] << 8 | this[e + 1]
- },
- t.prototype.readUInt32LE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
- },
- t.prototype.readUInt32BE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
- },
- t.prototype.readIntLE = function (e, t, n) {
- e >>>= 0,
- t >>>= 0,
- n || F(e, t, this.length);
- for (var r = this[e], i = 1, s = 0; ++s < t && (i *= 256); ) r += this[e + s] * i;
- return r >= (i *= 128) && (r -= Math.pow(2, 8 * t)),
- r
- },
- t.prototype.readIntBE = function (e, t, n) {
- e >>>= 0,
- t >>>= 0,
- n || F(e, t, this.length);
- for (var r = t, i = 1, s = this[e + --r]; r > 0 && (i *= 256); ) s += this[e + --r] * i;
- return s >= (i *= 128) && (s -= Math.pow(2, 8 * t)),
- s
- },
- t.prototype.readInt8 = function (e, t) {
- return e >>>= 0,
- t || F(e, 1, this.length),
- 128 & this[e] ? - 1 * (255 - this[e] + 1) : this[e]
- },
- t.prototype.readInt16LE = function (e, t) {
- e >>>= 0,
- t || F(e, 2, this.length);
- var n = this[e] | this[e + 1] << 8;
- return 32768 & n ? 4294901760 | n : n
- },
- t.prototype.readInt16BE = function (e, t) {
- e >>>= 0,
- t || F(e, 2, this.length);
- var n = this[e + 1] | this[e] << 8;
- return 32768 & n ? 4294901760 | n : n
- },
- t.prototype.readInt32LE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
- },
- t.prototype.readInt32BE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
- },
- t.prototype.readFloatLE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- i.read(this, e, !0, 23, 4)
- },
- t.prototype.readFloatBE = function (e, t) {
- return e >>>= 0,
- t || F(e, 4, this.length),
- i.read(this, e, !1, 23, 4)
- },
- t.prototype.readDoubleLE = function (e, t) {
- return e >>>= 0,
- t || F(e, 8, this.length),
- i.read(this, e, !0, 52, 8)
- },
- t.prototype.readDoubleBE = function (e, t) {
- return e >>>= 0,
- t || F(e, 8, this.length),
- i.read(this, e, !1, 52, 8)
- },
- t.prototype.writeUIntLE = function (e, t, n, r) {
- (e = + e, t >>>= 0, n >>>= 0, r) || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
- var i = 1,
- s = 0;
- for (this[t] = 255 & e; ++s < n && (i *= 256); ) this[t + s] = e / i & 255;
- return t + n
- },
- t.prototype.writeUIntBE = function (e, t, n, r) {
- (e = + e, t >>>= 0, n >>>= 0, r) || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
- var i = n - 1,
- s = 1;
- for (this[t + i] = 255 & e; --i >= 0 && (s *= 256); ) this[t + i] = e / s & 255;
- return t + n
- },
- t.prototype.writeUInt8 = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 1, 255, 0),
- this[t] = 255 & e,
- t + 1
- },
- t.prototype.writeUInt16LE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 2, 65535, 0),
- this[t] = 255 & e,
- this[t + 1] = e >>> 8,
- t + 2
- },
- t.prototype.writeUInt16BE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 2, 65535, 0),
- this[t] = e >>> 8,
- this[t + 1] = 255 & e,
- t + 2
- },
- t.prototype.writeUInt32LE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 4, 4294967295, 0),
- this[t + 3] = e >>> 24,
- this[t + 2] = e >>> 16,
- this[t + 1] = e >>> 8,
- this[t] = 255 & e,
- t + 4
- },
- t.prototype.writeUInt32BE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 4, 4294967295, 0),
- this[t] = e >>> 24,
- this[t + 1] = e >>> 16,
- this[t + 2] = e >>> 8,
- this[t + 3] = 255 & e,
- t + 4
- },
- t.prototype.writeIntLE = function (e, t, n, r) {
- if (e = + e, t >>>= 0, !r) {
- var i = Math.pow(2, 8 * n - 1);
- O(this, e, t, n, i - 1, - i)
- }
- var s = 0,
- o = 1,
- a = 0;
- for (this[t] = 255 & e; ++s < n && (o *= 256); ) e < 0 && 0 === a && 0 !== this[t + s - 1] && (a = 1),
- this[t + s] = (e / o >> 0) - a & 255;
- return t + n
- },
- t.prototype.writeIntBE = function (e, t, n, r) {
- if (e = + e, t >>>= 0, !r) {
- var i = Math.pow(2, 8 * n - 1);
- O(this, e, t, n, i - 1, - i)
- }
- var s = n - 1,
- o = 1,
- a = 0;
- for (this[t + s] = 255 & e; --s >= 0 && (o *= 256); ) e < 0 && 0 === a && 0 !== this[t + s + 1] && (a = 1),
- this[t + s] = (e / o >> 0) - a & 255;
- return t + n
- },
- t.prototype.writeInt8 = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 1, 127, - 128),
- e < 0 && (e = 255 + e + 1),
- this[t] = 255 & e,
- t + 1
- },
- t.prototype.writeInt16LE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 2, 32767, - 32768),
- this[t] = 255 & e,
- this[t + 1] = e >>> 8,
- t + 2
- },
- t.prototype.writeInt16BE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 2, 32767, - 32768),
- this[t] = e >>> 8,
- this[t + 1] = 255 & e,
- t + 2
- },
- t.prototype.writeInt32LE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 4, 2147483647, - 2147483648),
- this[t] = 255 & e,
- this[t + 1] = e >>> 8,
- this[t + 2] = e >>> 16,
- this[t + 3] = e >>> 24,
- t + 4
- },
- t.prototype.writeInt32BE = function (e, t, n) {
- return e = + e,
- t >>>= 0,
- n || O(this, e, t, 4, 2147483647, - 2147483648),
- e < 0 && (e = 4294967295 + e + 1),
- this[t] = e >>> 24,
- this[t + 1] = e >>> 16,
- this[t + 2] = e >>> 8,
- this[t + 3] = 255 & e,
- t + 4
- },
- t.prototype.writeFloatLE = function (e, t, n) {
- return P(this, e, t, !0, n)
- },
- t.prototype.writeFloatBE = function (e, t, n) {
- return P(this, e, t, !1, n)
- },
- t.prototype.writeDoubleLE = function (e, t, n) {
- return N(this, e, t, !0, n)
- },
- t.prototype.writeDoubleBE = function (e, t, n) {
- return N(this, e, t, !1, n)
- },
- t.prototype.copy = function (e, n, r, i) {
- if (!t.isBuffer(e)) throw new TypeError('argument should be a Buffer');
- if (r || (r = 0), i || 0 === i || (i = this.length), n >= e.length && (n = e.length), n || (n = 0), i > 0 && i < r && (i = r), i === r) return 0;
- if (0 === e.length || 0 === this.length) return 0;
- if (n < 0) throw new RangeError('targetStart out of bounds');
- if (r < 0 || r >= this.length) throw new RangeError('Index out of range');
- if (i < 0) throw new RangeError('sourceEnd out of bounds');
- i > this.length && (i = this.length),
- e.length - n < i - r && (i = e.length - n + r);
- var s = i - r;
- if (this === e && 'function' == typeof Uint8Array.prototype.copyWithin) this.copyWithin(n, r, i);
- else if (this === e && r < n && n < i) for (var o = s - 1; o >= 0; --o) e[o + n] = this[o + r];
- else Uint8Array.prototype.set.call(e, this.subarray(r, i), n);
- return s
- },
- t.prototype.fill = function (e, n, r, i) {
- if ('string' == typeof e) {
- if ('string' == typeof n ? (i = n, n = 0, r = this.length) : 'string' == typeof r && (i = r, r = this.length), void 0 !== i && 'string' != typeof i) throw new TypeError('encoding must be a string');
- if ('string' == typeof i && !t.isEncoding(i)) throw new TypeError('Unknown encoding: ' + i);
- if (1 === e.length) {
- var s = e.charCodeAt(0);
- ('utf8' === i && s < 128 || 'latin1' === i) && (e = s)
- }
- } else 'number' == typeof e ? e &= 255 : 'boolean' == typeof e && (e = Number(e));
- if (n < 0 || this.length < n || this.length < r) throw new RangeError('Out of range index');
- if (r <= n) return this;
- var o;
- if (n >>>= 0, r = void 0 === r ? this.length : r >>> 0, e || (e = 0), 'number' == typeof e) for (o = n; o < r; ++o) this[o] = e;
- else {
- var a = t.isBuffer(e) ? e : t.from(e, i),
- u = a.length;
- if (0 === u) throw new TypeError('The value "' + e + '" is invalid for argument "value"');
- for (o = 0; o < r - n; ++o) this[o + n] = a[o % u]
- }
- return this
- };
- var R = /[^+/0-9A-Za-z-_]/g;
- function L(e, t) {
- var n;
- t = t || 1 / 0;
- for (var r = e.length, i = null, s = [
- ], o = 0; o < r; ++o) {
- if ((n = e.charCodeAt(o)) > 55295 && n < 57344) {
- if (!i) {
- if (n > 56319) {
- (t -= 3) > - 1 && s.push(239, 191, 189);
- continue
- }
- if (o + 1 === r) {
- (t -= 3) > - 1 && s.push(239, 191, 189);
- continue
- }
- i = n;
- continue
- }
- if (n < 56320) {
- (t -= 3) > - 1 && s.push(239, 191, 189),
- i = n;
- continue
- }
- n = 65536 + (i - 55296 << 10 | n - 56320)
- } else i && (t -= 3) > - 1 && s.push(239, 191, 189);
- if (i = null, n < 128) {
- if ((t -= 1) < 0) break;
- s.push(n)
- } else if (n < 2048) {
- if ((t -= 2) < 0) break;
- s.push(n >> 6 | 192, 63 & n | 128)
- } else if (n < 65536) {
- if ((t -= 3) < 0) break;
- s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
- } else {
- if (!(n < 1114112)) throw new Error('Invalid code point');
- if ((t -= 4) < 0) break;
- s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
- }
- }
- return s
- }
- function I(e) {
- return r.toByteArray(function (e) {
- if ((e = (e = e.split('=') [0]).trim().replace(R, '')).length < 2) return '';
- for (; e.length % 4 != 0; ) e += '=';
- return e
- }(e))
- }
- function j(e, t, n, r) {
- for (var i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
- return i
- }
- function M(e, t) {
- return e instanceof t || null != e && null != e.constructor && null != e.constructor.name && e.constructor.name === t.name
- }
- function U(e) {
- return e != e
- }
- var V = function () {
- for (var e = new Array(256), t = 0; t < 16; ++t) for (var n = 16 * t, r = 0; r < 16; ++r) e[n + r] = '0123456789abcdef'[t] + '0123456789abcdef'[r];
- return e
- }()
- }).call(this, e('buffer').Buffer)
- },
- {
- 'base64-js': 39,
- buffer: 42,
- ieee754: 236
- }
- ],
- 43: [
- function (e, t, n) {
- 'use strict';
- var r = e('is-regex'),
- i = (n = t.exports = a).TOKEN_TYPES = {
- LINE_COMMENT: '//',
- BLOCK_COMMENT: '/**/',
- SINGLE_QUOTE: '\'',
- DOUBLE_QUOTE: '"',
- TEMPLATE_QUOTE: '`',
- REGEXP: '//g'
- },
- s = n.BRACKETS = {
- '(': ')',
- '{': '}',
- '[': ']'
- },
- o = {
- ')': '(',
- '}': '{',
- ']': '['
- };
- function a(e, t, r) {
- r = r || {
- },
- t = t || n.defaultState();
- for (var i = r.start || 0, s = r.end || e.length, o = i; o < s; ) {
- try {
- u(e[o], t)
- } catch (e) {
- throw e.index = o,
- e
- }
- o++
- }
- return t
- }
- function u(e, t) {
- if (1 !== e.length) throw (l = new Error('Character must be a string of length 1')).name = 'InvalidArgumentError',
- l.code = 'CHARACTER_PARSER:CHAR_LENGTH_NOT_ONE',
- l;
- (t = t || n.defaultState()).src += e;
- var r,
- a = t.isComment(),
- u = t.history ? t.history[0] : '';
- switch (t.regexpStart && ('/' !== e && '*' != e || t.stack.pop(), t.regexpStart = !1), t.current()) {
- case i.LINE_COMMENT:
- '\n' === e && t.stack.pop();
- break;
- case i.BLOCK_COMMENT:
- '*' === t.lastChar && '/' === e && t.stack.pop();
- break;
- case i.SINGLE_QUOTE:
- '\'' !== e || t.escaped ? '\\' !== e || t.escaped ? t.escaped = !1 : t.escaped = !0 : t.stack.pop();
- break;
- case i.DOUBLE_QUOTE:
- '"' !== e || t.escaped ? '\\' !== e || t.escaped ? t.escaped = !1 : t.escaped = !0 : t.stack.pop();
- break;
- case i.TEMPLATE_QUOTE:
- '`' !== e || t.escaped ? '\\' !== e || t.escaped ? '$' !== e || t.escaped ? '{' === e && t.hasDollar ? t.stack.push(s[e]) : (t.escaped = !1, t.hasDollar = !1) : t.hasDollar = !0 : (t.escaped = !0, t.hasDollar = !1) : (t.stack.pop(), t.hasDollar = !1);
- break;
- case i.REGEXP:
- '/' !== e || t.escaped ? '\\' !== e || t.escaped ? t.escaped = !1 : t.escaped = !0 : t.stack.pop();
- break;
- default:
- if (e in s) t.stack.push(s[e]);
- else if (e in o) {
- var l;
- if (t.current() !== e) throw (l = new SyntaxError('Mismatched Bracket: ' + e)).code = 'CHARACTER_PARSER:MISMATCHED_BRACKET',
- l;
- t.stack.pop()
- } else '/' === u && '/' === e ? (t.history = t.history.substr(1), t.stack.push(i.LINE_COMMENT)) : '/' === u && '*' === e ? (t.history = t.history.substr(1), t.stack.push(i.BLOCK_COMMENT)) : '/' === e && (')' !== (r = (r = t.history).replace(/^\s*/, '')) [0] && ('}' === r[0] || p(r[0]) || /^\w+\b/.test(r) && h(/^\w+\b/.exec(r) [0].split('').reverse().join('')))) ? (t.stack.push(i.REGEXP), t.regexpStart = !0) : '\'' === e ? t.stack.push(i.SINGLE_QUOTE) : '"' === e ? t.stack.push(i.DOUBLE_QUOTE) : '`' === e && t.stack.push(i.TEMPLATE_QUOTE)
- }
- return t.isComment() || a || (t.history = e + t.history),
- t.lastChar = e,
- t
- }
- function l() {
- this.stack = [
- ],
- this.regexpStart = !1,
- this.escaped = !1,
- this.hasDollar = !1,
- this.src = '',
- this.history = '',
- this.lastChar = ''
- }
- function c(e, t, n) {
- return r(t) ? t.test(e.substr(n || 0)) : e.substr(n || 0, t.length) === t
- }
- function p(e) {
- if (!e) return !0;
- switch (e.charCodeAt(0)) {
- case 46:
- case 40:
- case 41:
- case 59:
- case 44:
- case 123:
- case 125:
- case 91:
- case 93:
- case 58:
- case 63:
- case 126:
- case 37:
- case 38:
- case 42:
- case 43:
- case 45:
- case 47:
- case 60:
- case 62:
- case 94:
- case 124:
- case 33:
- case 61:
- return !0;
- default:
- return !1
- }
- }
- function h(e) {
- return 'if' === e || 'in' === e || 'do' === e || 'var' === e || 'for' === e || 'new' === e || 'try' === e || 'let' === e || 'this' === e || 'else' === e || 'case' === e || 'void' === e || 'with' === e || 'enum' === e || 'while' === e || 'break' === e || 'catch' === e || 'throw' === e || 'const' === e || 'yield' === e || 'class' === e || 'super' === e || 'return' === e || 'typeof' === e || 'delete' === e || 'switch' === e || 'export' === e || 'import' === e || 'default' === e || 'finally' === e || 'extends' === e || 'function' === e || 'continue' === e || 'debugger' === e || 'package' === e || 'private' === e || 'interface' === e || 'instanceof' === e || 'implements' === e || 'protected' === e || 'public' === e || 'static' === e
- }
- n.parse = a,
- n.parseUntil = function (e, t, r) {
- var i = (r = r || {
- }).start || 0,
- s = i,
- o = n.defaultState();
- for (; s < e.length; ) {
- if ((r.ignoreNesting || !o.isNesting(r)) && c(e, t, s)) {
- var a = s;
- return {
- start: i,
- end: a,
- src: e.substring(i, a)
- }
- }
- try {
- u(e[s], o)
- } catch (e) {
- throw e.index = s,
- e
- }
- s++
- }
- var l = new Error('The end of the string was reached with no closing bracket found.');
- throw l.code = 'CHARACTER_PARSER:END_OF_STRING_REACHED',
- l.index = s,
- l
- },
- n.parseChar = u,
- n.defaultState = function () {
- return new l
- },
- l.prototype.current = function () {
- return this.stack[this.stack.length - 1]
- },
- l.prototype.isString = function () {
- return this.current() === i.SINGLE_QUOTE || this.current() === i.DOUBLE_QUOTE || this.current() === i.TEMPLATE_QUOTE
- },
- l.prototype.isComment = function () {
- return this.current() === i.LINE_COMMENT || this.current() === i.BLOCK_COMMENT
- },
- l.prototype.isNesting = function (e) {
- return (!e || !e.ignoreLineComment || 1 !== this.stack.length || this.stack[0] !== i.LINE_COMMENT) && !!this.stack.length
- },
- n.isPunctuator = p,
- n.isKeyword = h
- },
- {
- 'is-regex': 241
- }
- ],
- 44: [
- function (e, t, n) {
- t.exports = e('./lib/clean')
- },
- {
- './lib/clean': 45
- }
- ],
- 45: [
- function (e, t, n) {
- (function (n) {
- var r = e('./optimizer/level-0/optimize'),
- i = e('./optimizer/level-1/optimize'),
- s = e('./optimizer/level-2/optimize'),
- o = e('./optimizer/validator'),
- a = e('./options/compatibility'),
- u = e('./options/fetch'),
- l = e('./options/format').formatFrom,
- c = e('./options/inline'),
- p = e('./options/inline-request'),
- h = e('./options/inline-timeout'),
- f = e('./options/optimization-level').OptimizationLevel,
- d = e('./options/optimization-level').optimizationLevelFrom,
- m = e('./options/rebase'),
- g = e('./options/rebase-to'),
- y = e('./reader/input-source-map-tracker'),
- v = e('./reader/read-sources'),
- b = e('./writer/simple'),
- x = e('./writer/source-maps'),
- A = t.exports = function (e) {
- e = e || {
- },
- this.options = {
- compatibility: a(e.compatibility),
- fetch: u(e.fetch),
- format: l(e.format),
- inline: c(e.inline),
- inlineRequest: p(e.inlineRequest),
- inlineTimeout: h(e.inlineTimeout),
- level: d(e.level),
- rebase: m(e.rebase),
- rebaseTo: g(e.rebaseTo),
- returnPromise: !!e.returnPromise,
- sourceMap: !!e.sourceMap,
- sourceMapInlineSources: !!e.sourceMapInlineSources
- }
- };
- function E(e, t, a, u) {
- var l = 'function' != typeof a ? a : null,
- c = 'function' == typeof u ? u : 'function' == typeof a ? a : null,
- p = {
- stats: {
- efficiency: 0,
- minifiedSize: 0,
- originalSize: 0,
- startedAt: Date.now(),
- timeSpent: 0
- },
- cache: {
- specificity: {
- }
- },
- errors: [
- ],
- inlinedStylesheets: [
- ],
- inputSourceMapTracker: y(),
- localOnly: !c,
- options: t,
- source: null,
- sourcesContent: {
- },
- validator: o(t.compatibility),
- warnings: [
- ]
- };
- return l && p.inputSourceMapTracker.track(void 0, l),
- (p.localOnly ? function (e) {
- return e()
- }
- : n.nextTick) (function () {
- return v(e, p, function (e) {
- var t = function (e, t) {
- return e.stats = function (e, t) {
- var n = Date.now() - t.stats.startedAt;
- return delete t.stats.startedAt,
- t.stats.timeSpent = n,
- t.stats.efficiency = 1 - e.length / t.stats.originalSize,
- t.stats.minifiedSize = e.length,
- t.stats
- }(e.styles, t),
- e.errors = t.errors,
- e.inlinedStylesheets = t.inlinedStylesheets,
- e.warnings = t.warnings,
- e
- }((p.options.sourceMap ? x : b) (function (e, t) {
- var n;
- return n = r(e, t),
- n = f.One in t.options.level ? i(e, t) : e,
- n = f.Two in t.options.level ? s(e, t, !0) : n
- }(e, p), p), p);
- return c ? c(p.errors.length > 0 ? p.errors : null, t) : t
- })
- })
- }
- A.process = function (e, t) {
- var n = t.to;
- return delete t.to,
- new A(Object.assign({
- returnPromise: !0,
- rebaseTo: n
- }, t)).minify(e).then(function (e) {
- return {
- css: e.styles
- }
- })
- },
- A.prototype.minify = function (e, t, n) {
- var r = this.options;
- return r.returnPromise ? new Promise(function (n, i) {
- E(e, r, t, function (e, t) {
- return e ? i(e) : n(t)
- })
- }) : E(e, r, t, n)
- }
- }).call(this, e('_process'))
- },
- {
- './optimizer/level-0/optimize': 47,
- './optimizer/level-1/optimize': 48,
- './optimizer/level-2/optimize': 67,
- './optimizer/validator': 95,
- './options/compatibility': 97,
- './options/fetch': 98,
- './options/format': 99,
- './options/inline': 102,
- './options/inline-request': 100,
- './options/inline-timeout': 101,
- './options/optimization-level': 103,
- './options/rebase': 105,
- './options/rebase-to': 104,
- './reader/input-source-map-tracker': 109,
- './reader/read-sources': 115,
- './writer/simple': 137,
- './writer/source-maps': 138,
- _process: 373
- }
- ],
- 46: [
- function (e, t, n) {
- t.exports = {
- ASTERISK: 'asterisk',
- BANG: 'bang',
- BACKSLASH: 'backslash',
- UNDERSCORE: 'underscore'
- }
- },
- {
- }
- ],
- 47: [
- function (e, t, n) {
- t.exports = function (e) {
- return e
- }
- },
- {
- }
- ],
- 48: [
- function (e, t, n) {
- var r = e('./shorten-hex'),
- i = e('./shorten-hsl'),
- s = e('./shorten-rgb'),
- o = e('./sort-selectors'),
- a = e('./tidy-rules'),
- u = e('./tidy-block'),
- l = e('./tidy-at-rule'),
- c = e('../hack'),
- p = e('../remove-unused'),
- h = e('../restore-from-optimizing'),
- f = e('../wrap-for-optimizing').all,
- d = e('../../options/optimization-level').OptimizationLevel,
- m = e('../../tokenizer/token'),
- g = e('../../tokenizer/marker'),
- y = e('../../utils/format-position'),
- v = e('../../utils/split'),
- b = e('../../writer/one-time').rules,
- x = 'ignore-property',
- A = '@charset',
- E = new RegExp('^' + A, 'i'),
- _ = e('../../options/rounding-precision').DEFAULT,
- C = /(?:^|\s|\()(-?\d+)px/,
- w = /^(\-?[\d\.]+)(m?s)$/,
- D = /[0-9a-f]/i,
- k = /^(?:\-chrome\-|\-[\w\-]+\w|\w[\w\-]+\w|\-\-\S+)$/,
- S = /^@import/i,
- T = /^('.*'|".*")$/,
- F = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/,
- O = /^url\(/i,
- B = /^--\S+$/;
- function P(e) {
- return e && '-' == e[1][0] && parseFloat(e[1]) < 0
- }
- function N(e) {
- return T.test(e)
- }
- function R(e) {
- return O.test(e)
- }
- function L(e) {
- return e.replace(O, 'url(').replace(/\\?\n|\\?\r\n/g, '')
- }
- function I(e) {
- var t = e.value;
- 1 == t.length && 'none' == t[0][1] && (t[0][1] = '0 0'),
- 1 == t.length && 'transparent' == t[0][1] && (t[0][1] = '0 0')
- }
- function j(e) {
- var t,
- n = e.value;
- 3 == n.length && '/' == n[1][1] && n[0][1] == n[2][1] ? t = 1 : 5 == n.length && '/' == n[2][1] && n[0][1] == n[3][1] && n[1][1] == n[4][1] ? t = 2 : 7 == n.length && '/' == n[3][1] && n[0][1] == n[4][1] && n[1][1] == n[5][1] && n[2][1] == n[6][1] ? t = 3 : 9 == n.length && '/' == n[4][1] && n[0][1] == n[5][1] && n[1][1] == n[6][1] && n[2][1] == n[7][1] && n[3][1] == n[8][1] && (t = 4),
- t && (e.value.splice(t), e.dirty = !0)
- }
- function M(e, t, n) {
- return - 1 === t.indexOf('#') && - 1 == t.indexOf('rgb') && - 1 == t.indexOf('hsl') ? r(t) : (t = t.replace(/rgb\((\-?\d+),(\-?\d+),(\-?\d+)\)/g, function (e, t, n, r) {
- return s(t, n, r)
- }).replace(/hsl\((-?\d+),(-?\d+)%?,(-?\d+)%?\)/g, function (e, t, n, r) {
- return i(t, n, r)
- }).replace(/(^|[^='"])#([0-9a-f]{6})/gi, function (e, t, n, r, i) {
- var s = i[r + e.length];
- return s && D.test(s) ? e : n[0] == n[1] && n[2] == n[3] && n[4] == n[5] ? (t + '#' + n[0] + n[2] + n[4]).toLowerCase() : (t + '#' + n).toLowerCase()
- }).replace(/(^|[^='"])#([0-9a-f]{3})/gi, function (e, t, n) {
- return t + '#' + n.toLowerCase()
- }).replace(/(rgb|rgba|hsl|hsla)\(([^\)]+)\)/g, function (e, t, n) {
- var r = n.split(',');
- return 'hsl' == t && 3 == r.length || 'hsla' == t && 4 == r.length || 'rgb' == t && 3 == r.length && n.indexOf('%') > 0 || 'rgba' == t && 4 == r.length && n.indexOf('%') > 0 ? ( - 1 == r[1].indexOf('%') && (r[1] += '%'), - 1 == r[2].indexOf('%') && (r[2] += '%'), t + '(' + r.join(',') + ')') : e
- }), n.colors.opacity && - 1 == e.indexOf('background') && (t = t.replace(/(?:rgba|hsla)\(0,0%?,0%?,0\)/g, function (e) {
- return v(t, ',').pop().indexOf('gradient(') > - 1 ? e : 'transparent'
- })), r(t))
- }
- function U(e) {
- 1 == e.value.length && (e.value[0][1] = e.value[0][1].replace(/progid:DXImageTransform\.Microsoft\.(Alpha|Chroma)(\W)/, function (e, t, n) {
- return t.toLowerCase() + n
- })),
- e.value[0][1] = e.value[0][1].replace(/,(\S)/g, ', $1').replace(/ ?= ?/g, '=')
- }
- function V(e, t) {
- var n = e.value[t][1];
- 'normal' == n ? n = '400' : 'bold' == n && (n = '700'),
- e.value[t][1] = n
- }
- function z(e) {
- var t,
- n = e.value;
- 4 == n.length && '0' === n[0][1] && '0' === n[1][1] && '0' === n[2][1] && '0' === n[3][1] && (t = e.name.indexOf('box-shadow') > - 1 ? 2 : 1),
- t && (e.value.splice(t), e.dirty = !0)
- }
- function q(e) {
- var t = e.value;
- 1 == t.length && 'none' == t[0][1] && (t[0][1] = '0')
- }
- function K(e, t, n) {
- return C.test(t) ? t.replace(C, function (e, t) {
- var r,
- i = parseInt(t);
- return 0 === i ? e : (n.properties.shorterLengthUnits && n.units.pt && 3 * i % 4 == 0 && (r = 3 * i / 4 + 'pt'), n.properties.shorterLengthUnits && n.units.pc && i % 16 == 0 && (r = i / 16 + 'pc'), n.properties.shorterLengthUnits && n.units.in && i % 96 == 0 && (r = i / 96 + 'in'), r && (r = e.substring(0, e.indexOf(t)) + r), r && r.length < e.length ? r : e)
- }) : t
- }
- function $(e, t, n) {
- return n.enabled && - 1 !== t.indexOf('.') ? t.replace(n.decimalPointMatcher, '$1$2$3').replace(n.zeroMatcher, function (e, t, r, i) {
- var s = n.units[i].multiplier,
- o = parseInt(t),
- a = isNaN(o) ? 0 : o,
- u = parseFloat(r);
- return Math.round((a + u) * s) / s + i
- }) : t
- }
- function Y(e, t) {
- return w.test(t) ? t.replace(w, function (e, t, n) {
- var r;
- return 'ms' == n ? r = parseInt(t) / 1000 + 's' : 's' == n && (r = 1000 * parseFloat(t) + 'ms'),
- r.length < e.length ? r : e
- }) : t
- }
- function W(e, t, n) {
- return /^(?:\-moz\-calc|\-webkit\-calc|calc|rgb|hsl|rgba|hsla)\(/.test(t) ? t : 'flex' == e || '-ms-flex' == e || '-webkit-flex' == e || 'flex-basis' == e || '-webkit-flex-basis' == e ? t : t.indexOf('%') > 0 && ('height' == e || 'max-height' == e || 'width' == e || 'max-width' == e) ? t : t.replace(n, '$10$2').replace(n, '$10$2')
- }
- function G(e, t) {
- return e.indexOf('filter') > - 1 || - 1 == t.indexOf(' ') || 0 === t.indexOf('expression') ? t : t.indexOf(g.SINGLE_QUOTE) > - 1 || t.indexOf(g.DOUBLE_QUOTE) > - 1 ? t : ((t = t.replace(/\s+/g, ' ')).indexOf('calc') > - 1 && (t = t.replace(/\) ?\/ ?/g, ')/ ')), t.replace(/(\(;?)\s+/g, '$1').replace(/\s+(;?\))/g, '$1').replace(/, /g, ','))
- }
- function H(e, t) {
- return - 1 == t.indexOf('0deg') ? t : t.replace(/\(0deg\)/g, '(0)')
- }
- function X(e, t) {
- return - 1 == t.indexOf('0') ? t : (t.indexOf('-') > - 1 && (t = t.replace(/([^\w\d\-]|^)\-0([^\.]|$)/g, '$10$2').replace(/([^\w\d\-]|^)\-0([^\.]|$)/g, '$10$2')), t.replace(/(^|\s)0+([1-9])/g, '$1$2').replace(/(^|\D)\.0+(\D|$)/g, '$10$2').replace(/(^|\D)\.0+(\D|$)/g, '$10$2').replace(/\.([1-9]*)0+(\D|$)/g, function (e, t, n) {
- return (t.length > 0 ? '.' : '') + t + n
- }).replace(/(^|\D)0\.(\d)/g, '$1.$2'))
- }
- function J(e, t) {
- return 'content' == e || e.indexOf('font-variation-settings') > - 1 || e.indexOf('font-feature-settings') > - 1 || e.indexOf('grid-') > - 1 ? t : F.test(t) ? t.substring(1, t.length - 1) : t
- }
- function Q(e) {
- return !/^url\(['"].+['"]\)$/.test(e) || /^url\(['"].*[\*\s\(\)'"].*['"]\)$/.test(e) || /^url\(['"]data:[^;]+;charset/.test(e) ? e : e.replace(/["']/g, '')
- }
- function Z(e, t, n, r) {
- var i = r(e, t, b(n));
- return void 0 === i ? t : !1 === i ? x : i
- }
- function ee(e, t, n) {
- var r,
- i,
- s,
- o,
- a,
- u,
- l = n.options,
- g = l.level[d.One],
- v = f(t, !0);
- e: for (var b = 0, A = v.length; b < A; b++) if (i = (r = v[b]).name, k.test(i) || (u = r.all[r.position], n.warnings.push('Invalid property name \'' + i + '\' at ' + y(u[1][2][0]) + '. Ignoring.'), r.unused = !0), 0 === r.value.length && (u = r.all[r.position], n.warnings.push('Empty property \'' + i + '\' at ' + y(u[1][2][0]) + '. Ignoring.'), r.unused = !0), r.hack && ((r.hack[0] == c.ASTERISK || r.hack[0] == c.UNDERSCORE) && !l.compatibility.properties.iePrefixHack || r.hack[0] == c.BACKSLASH && !l.compatibility.properties.ieSuffixHack || r.hack[0] == c.BANG && !l.compatibility.properties.ieBangHack) && (r.unused = !0), g.removeNegativePaddings && 0 === i.indexOf('padding') && (P(r.value[0]) || P(r.value[1]) || P(r.value[2]) || P(r.value[3])) && (r.unused = !0), !l.compatibility.properties.ieFilters && re(r) && (r.unused = !0), !r.unused) if (r.block) ee(e, r.value[0][1], n);
- else if (!B.test(i)) {
- for (var E = 0, _ = r.value.length; E < _; E++) {
- if (s = r.value[E][0], a = R(o = r.value[E][1]), s == m.PROPERTY_BLOCK) {
- r.unused = !0,
- n.warnings.push('Invalid value token at ' + y(o[0][1][2][0]) + '. Ignoring.');
- break
- }
- if (a && !n.validator.isUrl(o)) {
- r.unused = !0,
- n.warnings.push('Broken URL \'' + o + '\' at ' + y(r.value[E][2][0]) + '. Ignoring.');
- break
- }
- if (a ? (o = g.normalizeUrls ? L(o) : o, o = l.compatibility.properties.urlQuotes ? o : Q(o)) : N(o) ? o = g.removeQuotes ? J(i, o) : o : (o = K(0, o = $(0, o = g.removeWhitespace ? G(i, o) : o, l.precision), l.compatibility), o = g.replaceTimeUnits ? Y(0, o) : o, o = g.replaceZeroUnits ? X(0, o) : o, l.compatibility.properties.zeroUnits && (o = W(i, o = H(0, o), l.unitsRegexp)), l.compatibility.properties.colors && (o = M(i, o, l.compatibility))), (o = Z(i, o, e, g.transform)) === x) {
- r.unused = !0;
- continue e
- }
- r.value[E][1] = o
- }
- g.replaceMultipleZeros && z(r),
- 'background' == i && g.optimizeBackground ? I(r) : 0 === i.indexOf('border') && i.indexOf('radius') > 0 && g.optimizeBorderRadius ? j(r) : 'filter' == i && g.optimizeFilter && l.compatibility.properties.ieFilters ? U(r) : 'font-weight' == i && g.optimizeFontWeight ? V(r, 0) : 'outline' == i && g.optimizeOutline && q(r)
- }
- h(v),
- p(v),
- function (e, t) {
- var n,
- r;
- for (r = 0; r < e.length; r++) (n = e[r]) [0] == m.COMMENT && (te(n, t), 0 === n[1].length && (e.splice(r, 1), r--))
- }(t, l)
- }
- function te(e, t) {
- e[1][2] == g.EXCLAMATION && ('all' == t.level[d.One].specialComments || t.commentsKept < t.level[d.One].specialComments) ? t.commentsKept++ : e[1] = [
- ]
- }
- function ne(e) {
- return S.test(e[1])
- }
- function re(e) {
- var t;
- return ('filter' == e.name || '-ms-filter' == e.name) && ((t = e.value[0][1]).indexOf('progid') > - 1 || 0 === t.indexOf('alpha') || 0 === t.indexOf('chroma'))
- }
- t.exports = function e(t, n) {
- var r = n.options,
- i = r.level[d.One],
- s = r.compatibility.selectors.ie7Hack,
- c = r.compatibility.selectors.adjacentSpace,
- p = r.compatibility.properties.spaceAfterClosingBrace,
- h = r.format,
- f = !1,
- g = !1;
- r.unitsRegexp = r.unitsRegexp || function (e) {
- var t = [
- 'px',
- 'em',
- 'ex',
- 'cm',
- 'mm',
- 'in',
- 'pt',
- 'pc',
- '%'
- ];
- return ['ch',
- 'rem',
- 'vh',
- 'vm',
- 'vmax',
- 'vmin',
- 'vw'].forEach(function (n) {
- e.compatibility.units[n] && t.push(n)
- }),
- new RegExp('(^|\\s|\\(|,)0(?:' + t.join('|') + ')(\\W|$)', 'g')
- }(r),
- r.precision = r.precision || function (e) {
- var t,
- n,
- r = {
- matcher: null,
- units: {
- }
- },
- i = [
- ];
- for (t in e) (n = e[t]) != _ && (r.units[t] = {
- }, r.units[t].value = n, r.units[t].multiplier = Math.pow(10, n), i.push(t));
- return i.length > 0 && (r.enabled = !0, r.decimalPointMatcher = new RegExp('(\\d)\\.($|' + i.join('|') + ')($|W)', 'g'), r.zeroMatcher = new RegExp('(\\d*)(\\.\\d+)(' + i.join('|') + ')', 'g')),
- r
- }(i.roundingPrecision),
- r.commentsKept = r.commentsKept || 0;
- for (var y = 0, v = t.length; y < v; y++) {
- var b = t[y];
- switch (b[0]) {
- case m.AT_RULE:
- b[1] = ne(b) && g ? '' : b[1],
- b[1] = i.tidyAtRules ? l(b[1]) : b[1],
- f = !0;
- break;
- case m.AT_RULE_BLOCK:
- ee(b[1], b[2], n),
- g = !0;
- break;
- case m.NESTED_BLOCK:
- b[1] = i.tidyBlockScopes ? u(b[1], p) : b[1],
- e(b[2], n),
- g = !0;
- break;
- case m.COMMENT:
- te(b, r);
- break;
- case m.RULE:
- b[1] = i.tidySelectors ? a(b[1], !s, c, h, n.warnings) : b[1],
- b[1] = b[1].length > 1 ? o(b[1], i.selectorsSortingMethod) : b[1],
- ee(b[1], b[2], n),
- g = !0
- }(b[0] == m.COMMENT && 0 === b[1].length || i.removeEmpty && (0 === b[1].length || b[2] && 0 === b[2].length)) && (t.splice(y, 1), y--, v--)
- }
- return i.cleanupCharsets && f && function (e) {
- for (var t = !1, n = 0, r = e.length; n < r; n++) {
- var i = e[n];
- i[0] == m.AT_RULE && E.test(i[1]) && (t || - 1 == i[1].indexOf(A) ? (e.splice(n, 1), n--, r--) : (t = !0, e.splice(n, 1), e.unshift([m.AT_RULE,
- i[1].replace(E, A)])))
- }
- }(t),
- t
- }
- },
- {
- '../../options/optimization-level': 103,
- '../../options/rounding-precision': 106,
- '../../tokenizer/marker': 121,
- '../../tokenizer/token': 122,
- '../../utils/format-position': 125,
- '../../utils/split': 134,
- '../../writer/one-time': 136,
- '../hack': 46,
- '../remove-unused': 93,
- '../restore-from-optimizing': 94,
- '../wrap-for-optimizing': 96,
- './shorten-hex': 49,
- './shorten-hsl': 50,
- './shorten-rgb': 51,
- './sort-selectors': 52,
- './tidy-at-rule': 53,
- './tidy-block': 54,
- './tidy-rules': 55
- }
- ],
- 49: [
- function (e, t, n) {
- var r = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#0ff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000',
- blanchedalmond: '#ffebcd',
- blue: '#00f',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#0ff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkgrey: '#a9a9a9',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkslategrey: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dimgrey: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#f0f',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- grey: '#808080',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- indianred: '#cd5c5c',
- indigo: '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgray: '#d3d3d3',
- lightgreen: '#90ee90',
- lightgrey: '#d3d3d3',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightslategrey: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#0f0',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370db',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#db7093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- rebeccapurple: '#663399',
- red: '#f00',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- slategrey: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#fff',
- whitesmoke: '#f5f5f5',
- yellow: '#ff0',
- yellowgreen: '#9acd32'
- },
- i = {
- },
- s = {
- };
- for (var o in r) {
- var a = r[o];
- o.length < a.length ? s[a] = o : i[o] = a
- }
- var u = new RegExp('(^| |,|\\))(' + Object.keys(i).join('|') + ')( |,|\\)|$)', 'ig'),
- l = new RegExp('(' + Object.keys(s).join('|') + ')([^a-f0-9]|$)', 'ig');
- function c(e, t, n, r) {
- return t + i[n.toLowerCase()] + r
- }
- function p(e, t, n) {
- return s[t.toLowerCase()] + n
- }
- t.exports = function (e) {
- var t = e.indexOf('#') > - 1,
- n = e.replace(u, c);
- return n != e && (n = n.replace(u, c)),
- t ? n.replace(l, p) : n
- }
- },
- {
- }
- ],
- 50: [
- function (e, t, n) {
- function r(e, t, n) {
- return n < 0 && (n += 1),
- n > 1 && (n -= 1),
- n < 1 / 6 ? e + 6 * (t - e) * n : n < 0.5 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e
- }
- t.exports = function (e, t, n) {
- var i = function (e, t, n) {
- var i,
- s,
- o;
- if ((e %= 360) < 0 && (e += 360), e = ~~e / 360, t < 0 ? t = 0 : t > 100 && (t = 100), t = ~~t / 100, n < 0 ? n = 0 : n > 100 && (n = 100), n = ~~n / 100, 0 === t) i = s = o = n;
- else {
- var a = n < 0.5 ? n * (1 + t) : n + t - n * t,
- u = 2 * n - a;
- i = r(u, a, e + 1 / 3),
- s = r(u, a, e),
- o = r(u, a, e - 1 / 3)
- }
- return [~~(255 * i),
- ~~(255 * s),
- ~~(255 * o)]
- }(e, t, n),
- s = i[0].toString(16),
- o = i[1].toString(16),
- a = i[2].toString(16);
- return '#' + (1 == s.length ? '0' : '') + s + (1 == o.length ? '0' : '') + o + (1 == a.length ? '0' : '') + a
- }
- },
- {
- }
- ],
- 51: [
- function (e, t, n) {
- t.exports = function (e, t, n) {
- return '#' + ('00000' + (Math.max(0, Math.min(parseInt(e), 255)) << 16 | Math.max(0, Math.min(parseInt(t), 255)) << 8 | Math.max(0, Math.min(parseInt(n), 255))).toString(16)).slice( - 6)
- }
- },
- {
- }
- ],
- 52: [
- function (e, t, n) {
- var r = e('../../utils/natural-compare');
- function i(e, t) {
- return r(e[1], t[1])
- }
- function s(e, t) {
- return e[1] > t[1] ? 1 : - 1
- }
- t.exports = function (e, t) {
- switch (t) {
- case 'natural':
- return e.sort(i);
- case 'standard':
- return e.sort(s);
- case 'none':
- case !1:
- return e
- }
- }
- },
- {
- '../../utils/natural-compare': 132
- }
- ],
- 53: [
- function (e, t, n) {
- t.exports = function (e) {
- return e.replace(/\s+/g, ' ').replace(/url\(\s+/g, 'url(').replace(/\s+\)/g, ')').trim()
- }
- },
- {
- }
- ],
- 54: [
- function (e, t, n) {
- var r = /^@media\W/;
- t.exports = function (e, t) {
- var n,
- i;
- for (i = e.length - 1; i >= 0; i--) n = !t && r.test(e[i][1]),
- e[i][1] = e[i][1].replace(/\n|\r\n/g, ' ').replace(/\s+/g, ' ').replace(/(,|:|\() /g, '$1').replace(/ \)/g, ')').replace(/'([a-zA-Z][a-zA-Z\d\-_]+)'/, '$1').replace(/"([a-zA-Z][a-zA-Z\d\-_]+)"/, '$1').replace(n ? /\) /g : null, ')');
- return e
- }
- },
- {
- }
- ],
- 55: [
- function (e, t, n) {
- var r = e('../../options/format').Spaces,
- i = e('../../tokenizer/marker'),
- s = e('../../utils/format-position'),
- o = /[\s"'][iI]\s*\]/,
- a = /([\d\w])([iI])\]/g,
- u = /="([a-zA-Z][a-zA-Z\d\-_]+)"([iI])/g,
- l = /="([a-zA-Z][a-zA-Z\d\-_]+)"(\s|\])/g,
- c = /^(?:(?:<!--|-->)\s*)+/,
- p = /='([a-zA-Z][a-zA-Z\d\-_]+)'([iI])/g,
- h = /='([a-zA-Z][a-zA-Z\d\-_]+)'(\s|\])/g,
- f = /[>\+~]/,
- d = /\s/,
- m = '*+html ',
- g = '*:first-child+html ',
- y = '<';
- function v(e) {
- var t,
- n,
- r,
- s,
- o = !1,
- a = !1;
- for (r = 0, s = e.length; r < s; r++) {
- if (n = e[r], t);
- else if (n == i.SINGLE_QUOTE || n == i.DOUBLE_QUOTE) a = !a;
- else {
- if (!(a || n != i.CLOSE_CURLY_BRACKET && n != i.EXCLAMATION && n != y && n != i.SEMICOLON)) {
- o = !0;
- break
- }
- if (!a && 0 === r && f.test(n)) {
- o = !0;
- break
- }
- }
- t = n == i.BACK_SLASH
- }
- return o
- }
- function b(e, t) {
- var n,
- s,
- u,
- l,
- c,
- p,
- h,
- m,
- g,
- y,
- v,
- b,
- x,
- A = [
- ],
- E = 0,
- _ = !1,
- C = !1,
- w = o.test(e),
- D = t && t.spaces[r.AroundSelectorRelation];
- for (b = 0, x = e.length; b < x; b++) {
- if (s = (n = e[b]) == i.NEW_LINE_NIX, u = n == i.NEW_LINE_NIX && e[b - 1] == i.CARRIAGE_RETURN, p = h || m, y = !g && !l && 0 === E && f.test(n), v = d.test(n), c && p && u) A.pop(),
- A.pop();
- else if (l && p && s) A.pop();
- else if (l) A.push(n);
- else if (n != i.OPEN_SQUARE_BRACKET || p) if (n != i.CLOSE_SQUARE_BRACKET || p) if (n != i.OPEN_ROUND_BRACKET || p) if (n != i.CLOSE_ROUND_BRACKET || p) if (n != i.SINGLE_QUOTE || p) if (n != i.DOUBLE_QUOTE || p) if (n == i.SINGLE_QUOTE && p) A.push(n),
- h = !1;
- else if (n == i.DOUBLE_QUOTE && p) A.push(n),
- m = !1;
- else {
- if (v && _ && !D) continue;
- !v && _ && D ? (A.push(i.SPACE), A.push(n)) : v && (g || E > 0) && !p || v && C && !p || (u || s) && (g || E > 0) && p || (y && C && !D ? (A.pop(), A.push(n)) : y && !C && D ? (A.push(i.SPACE), A.push(n)) : v ? A.push(i.SPACE) : A.push(n))
- } else A.push(n),
- m = !0;
- else A.push(n),
- h = !0;
- else A.push(n),
- E--;
- else A.push(n),
- E++;
- else A.push(n),
- g = !1;
- else A.push(n),
- g = !0;
- c = l,
- l = n == i.BACK_SLASH,
- _ = y,
- C = v
- }
- return w ? A.join('').replace(a, '$1 $2]') : A.join('')
- }
- t.exports = function (e, t, n, r, i) {
- var o,
- a = [
- ],
- f = [
- ];
- function d(e, t) {
- return i.push('HTML comment \'' + t + '\' at ' + s(e[2][0]) + '. Removing.'),
- ''
- }
- for (var y = 0, x = e.length; y < x; y++) {
- var A = e[y],
- E = A[1];
- v(E = E.replace(c, d.bind(null, A))) ? i.push('Invalid selector \'' + A[1] + '\' at ' + s(A[2][0]) + '. Ignoring.') : (E = b(E, r), E = - 1 == (o = E).indexOf('\'') && - 1 == o.indexOf('"') ? o : o.replace(p, '=$1 $2').replace(h, '=$1$2').replace(u, '=$1 $2').replace(l, '=$1$2'), n && E.indexOf('nav') > 0 && (E = E.replace(/\+nav(\S|$)/, '+ nav$1')), t && E.indexOf(m) > - 1 || t && E.indexOf(g) > - 1 || (E.indexOf('*') > - 1 && (E = E.replace(/\*([:#\.\[])/g, '$1').replace(/^(\:first\-child)?\+html/, '*$1+html')), f.indexOf(E) > - 1 || (A[1] = E, f.push(E), a.push(A))))
- }
- return 1 == a.length && 0 === a[0][1].length && (i.push('Empty selector \'' + a[0][1] + '\' at ' + s(a[0][2][0]) + '. Ignoring.'), a = [
- ]),
- a
- }
- },
- {
- '../../options/format': 99,
- '../../tokenizer/marker': 121,
- '../../utils/format-position': 125
- }
- ],
- 56: [
- function (e, t, n) {
- var r = e('./invalid-property-error'),
- i = e('../wrap-for-optimizing').single,
- s = e('../../tokenizer/token'),
- o = e('../../tokenizer/marker'),
- a = e('../../utils/format-position');
- function u(e) {
- var t,
- n;
- for (t = 0, n = e.length; t < n; t++) if ('inherit' == e[t][1]) return !0;
- return !1
- }
- function l(e, t, n) {
- var r = n[e];
- return r.doubleValues && 2 == r.defaultValue.length ? i([s.PROPERTY,
- [
- s.PROPERTY_NAME,
- e
- ],
- [
- s.PROPERTY_VALUE,
- r.defaultValue[0]
- ],
- [
- s.PROPERTY_VALUE,
- r.defaultValue[1]
- ]]) : r.doubleValues && 1 == r.defaultValue.length ? i([s.PROPERTY,
- [
- s.PROPERTY_NAME,
- e
- ],
- [
- s.PROPERTY_VALUE,
- r.defaultValue[0]
- ]]) : i([s.PROPERTY,
- [
- s.PROPERTY_NAME,
- e
- ],
- [
- s.PROPERTY_VALUE,
- r.defaultValue
- ]])
- }
- function c(e, t) {
- var n = t[e.name].components,
- r = [
- ],
- o = e.value;
- if (o.length < 1) return [];
- o.length < 2 && (o[1] = o[0].slice(0)),
- o.length < 3 && (o[2] = o[0].slice(0)),
- o.length < 4 && (o[3] = o[1].slice(0));
- for (var a = n.length - 1; a >= 0; a--) {
- var u = i([s.PROPERTY,
- [
- s.PROPERTY_NAME,
- n[a]
- ]]);
- u.value = [
- o[a]
- ],
- r.unshift(u)
- }
- return r
- }
- function p(e, t, n) {
- for (var r, i, s, o = t[e.name], a = [
- l(o.components[0], 0, t),
- l(o.components[1], 0, t),
- l(o.components[2], 0, t)
- ], u = 0; u < 3; u++) {
- var c = a[u];
- c.name.indexOf('color') > 0 ? r = c : c.name.indexOf('style') > 0 ? i = c : s = c
- }
- if (1 == e.value.length && 'inherit' == e.value[0][1] || 3 == e.value.length && 'inherit' == e.value[0][1] && 'inherit' == e.value[1][1] && 'inherit' == e.value[2][1]) return r.value = i.value = s.value = [
- e.value[0]
- ],
- a;
- var p,
- h,
- f = e.value.slice(0);
- return f.length > 0 && (p = (h = f.filter(function (e) {
- return function (t) {
- return 'inherit' != t[1] && (e.isWidth(t[1]) || e.isUnit(t[1]) && !e.isDynamicUnit(t[1])) && !e.isStyleKeyword(t[1]) && !e.isColorFunction(t[1])
- }
- }(n))).length > 1 && ('none' == h[0][1] || 'auto' == h[0][1]) ? h[1] : h[0]) && (s.value = [
- p
- ], f.splice(f.indexOf(p), 1)),
- f.length > 0 && (p = f.filter(function (e) {
- return function (t) {
- return 'inherit' != t[1] && e.isStyleKeyword(t[1]) && !e.isColorFunction(t[1])
- }
- }(n)) [0]) && (i.value = [
- p
- ], f.splice(f.indexOf(p), 1)),
- f.length > 0 && (p = f.filter(function (e) {
- return function (t) {
- return 'invert' == t[1] || e.isColor(t[1]) || e.isPrefixed(t[1])
- }
- }(n)) [0]) && (r.value = [
- p
- ], f.splice(f.indexOf(p), 1)),
- a
- }
- t.exports = {
- animation: function (e, t, n) {
- var i,
- s,
- o,
- c = l(e.name + '-duration', 0, t),
- p = l(e.name + '-timing-function', 0, t),
- h = l(e.name + '-delay', 0, t),
- f = l(e.name + '-iteration-count', 0, t),
- d = l(e.name + '-direction', 0, t),
- m = l(e.name + '-fill-mode', 0, t),
- g = l(e.name + '-play-state', 0, t),
- y = l(e.name + '-name', 0, t),
- v = [
- c,
- p,
- h,
- f,
- d,
- m,
- g,
- y
- ],
- b = e.value,
- x = !1,
- A = !1,
- E = !1,
- _ = !1,
- C = !1,
- w = !1,
- D = !1,
- k = !1;
- if (1 == e.value.length && 'inherit' == e.value[0][1]) return c.value = p.value = h.value = f.value = d.value = m.value = g.value = y.value = e.value,
- v;
- if (b.length > 1 && u(b)) throw new r('Invalid animation values at ' + a(b[0][2][0]) + '. Ignoring.');
- for (s = 0, o = b.length; s < o; s++) if (i = b[s], n.isTime(i[1]) && !x) c.value = [
- i
- ],
- x = !0;
- else if (n.isTime(i[1]) && !E) h.value = [
- i
- ],
- E = !0;
- else if (!n.isGlobal(i[1]) && !n.isTimingFunction(i[1]) || A) if (!n.isAnimationIterationCountKeyword(i[1]) && !n.isPositiveNumber(i[1]) || _) if (n.isAnimationDirectionKeyword(i[1]) && !C) d.value = [
- i
- ],
- C = !0;
- else if (n.isAnimationFillModeKeyword(i[1]) && !w) m.value = [
- i
- ],
- w = !0;
- else if (n.isAnimationPlayStateKeyword(i[1]) && !D) g.value = [
- i
- ],
- D = !0;
- else {
- if (!n.isAnimationNameKeyword(i[1]) && !n.isIdentifier(i[1]) || k) throw new r('Invalid animation value at ' + a(i[2][0]) + '. Ignoring.');
- y.value = [
- i
- ],
- k = !0
- } else f.value = [
- i
- ],
- _ = !0;
- else p.value = [
- i
- ],
- A = !0;
- return v
- },
- background: function (e, t, n) {
- var i = l('background-image', 0, t),
- s = l('background-position', 0, t),
- u = l('background-size', 0, t),
- c = l('background-repeat', 0, t),
- p = l('background-attachment', 0, t),
- h = l('background-origin', 0, t),
- f = l('background-clip', 0, t),
- d = l('background-color', 0, t),
- m = [
- i,
- s,
- u,
- c,
- p,
- h,
- f,
- d
- ],
- g = e.value,
- y = !1,
- v = !1,
- b = !1,
- x = !1,
- A = !1;
- if (1 == e.value.length && 'inherit' == e.value[0][1]) return d.value = i.value = c.value = s.value = u.value = h.value = f.value = e.value,
- m;
- if (1 == e.value.length && '0 0' == e.value[0][1]) return m;
- for (var E = g.length - 1; E >= 0; E--) {
- var _ = g[E];
- if (n.isBackgroundAttachmentKeyword(_[1])) p.value = [
- _
- ],
- A = !0;
- else if (n.isBackgroundClipKeyword(_[1]) || n.isBackgroundOriginKeyword(_[1])) v ? (h.value = [
- _
- ], b = !0) : (f.value = [
- _
- ], v = !0),
- A = !0;
- else if (n.isBackgroundRepeatKeyword(_[1])) x ? c.value.unshift(_) : (c.value = [
- _
- ], x = !0),
- A = !0;
- else if (n.isBackgroundPositionKeyword(_[1]) || n.isBackgroundSizeKeyword(_[1]) || n.isUnit(_[1]) || n.isDynamicUnit(_[1])) {
- if (E > 0) {
- var C = g[E - 1];
- C[1] == o.FORWARD_SLASH ? u.value = [
- _
- ] : E > 1 && g[E - 2][1] == o.FORWARD_SLASH ? (u.value = [
- C,
- _
- ], E -= 2) : (y || (s.value = [
- ]), s.value.unshift(_), y = !0)
- } else y || (s.value = [
- ]),
- s.value.unshift(_),
- y = !0;
- A = !0
- } else d.value[0][1] != t[d.name].defaultValue && 'none' != d.value[0][1] || !n.isColor(_[1]) && !n.isPrefixed(_[1]) ? (n.isUrl(_[1]) || n.isFunction(_[1])) && (i.value = [
- _
- ], A = !0) : (d.value = [
- _
- ], A = !0)
- }
- if (v && !b && (h.value = f.value.slice(0)), !A) throw new r('Invalid background value at ' + a(g[0][2][0]) + '. Ignoring.');
- return m
- },
- border: p,
- borderRadius: function (e, t) {
- for (var n = e.value, i = - 1, s = 0, u = n.length; s < u; s++) if (n[s][1] == o.FORWARD_SLASH) {
- i = s;
- break
- }
- if (0 === i || i === n.length - 1) throw new r('Invalid border-radius value at ' + a(n[0][2][0]) + '. Ignoring.');
- var p = l(e.name, 0, t);
- p.value = i > - 1 ? n.slice(0, i) : n.slice(0),
- p.components = c(p, t);
- var h = l(e.name, 0, t);
- h.value = i > - 1 ? n.slice(i + 1) : n.slice(0),
- h.components = c(h, t);
- for (var f = 0; f < 4; f++) p.components[f].multiplex = !0,
- p.components[f].value = p.components[f].value.concat(h.components[f].value);
- return p.components
- },
- font: function (e, t, n) {
- var i,
- s,
- c,
- p,
- h = l('font-style', 0, t),
- f = l('font-variant', 0, t),
- d = l('font-weight', 0, t),
- m = l('font-stretch', 0, t),
- g = l('font-size', 0, t),
- y = l('line-height', 0, t),
- v = l('font-family', 0, t),
- b = [
- h,
- f,
- d,
- m,
- g,
- y,
- v
- ],
- x = e.value,
- A = 0,
- E = !1,
- _ = !1,
- C = !1,
- w = !1,
- D = !1,
- k = !1;
- if (!x[A]) throw new r('Missing font values at ' + a(e.all[e.position][1][2][0]) + '. Ignoring.');
- if (1 == x.length && 'inherit' == x[0][1]) return h.value = f.value = d.value = m.value = g.value = y.value = v.value = x,
- b;
- if (1 == x.length && (n.isFontKeyword(x[0][1]) || n.isGlobal(x[0][1]) || n.isPrefixed(x[0][1]))) return x[0][1] = o.INTERNAL + x[0][1],
- h.value = f.value = d.value = m.value = g.value = y.value = v.value = x,
- b;
- if (x.length < 2 || !function (e, t) {
- var n,
- r,
- i;
- for (r = 0, i = e.length; r < i; r++) if (n = e[r], t.isFontSizeKeyword(n[1]) || t.isUnit(n[1]) && !t.isDynamicUnit(n[1]) || t.isFunction(n[1])) return !0;
- return !1
- }(x, n) || !function (e, t) {
- var n,
- r,
- i;
- for (r = 0, i = e.length; r < i; r++) if (n = e[r], t.isIdentifier(n[1])) return !0;
- return !1
- }(x, n)) throw new r('Invalid font values at ' + a(e.all[e.position][1][2][0]) + '. Ignoring.');
- if (x.length > 1 && u(x)) throw new r('Invalid font values at ' + a(x[0][2][0]) + '. Ignoring.');
- for (; A < 4; ) {
- if (i = n.isFontStretchKeyword(x[A][1]) || n.isGlobal(x[A][1]), s = n.isFontStyleKeyword(x[A][1]) || n.isGlobal(x[A][1]), c = n.isFontVariantKeyword(x[A][1]) || n.isGlobal(x[A][1]), p = n.isFontWeightKeyword(x[A][1]) || n.isGlobal(x[A][1]), s && !_) h.value = [
- x[A]
- ],
- _ = !0;
- else if (c && !C) f.value = [
- x[A]
- ],
- C = !0;
- else if (p && !w) d.value = [
- x[A]
- ],
- w = !0;
- else {
- if (!i || E) {
- if (s && _ || c && C || p && w || i && E) throw new r('Invalid font style / variant / weight / stretch value at ' + a(x[0][2][0]) + '. Ignoring.');
- break
- }
- m.value = [
- x[A]
- ],
- E = !0
- }
- A++
- }
- if (!(n.isFontSizeKeyword(x[A][1]) || n.isUnit(x[A][1]) && !n.isDynamicUnit(x[A][1]))) throw new r('Missing font size at ' + a(x[0][2][0]) + '. Ignoring.');
- if (g.value = [
- x[A]
- ], D = !0, !x[++A]) throw new r('Missing font family at ' + a(x[0][2][0]) + '. Ignoring.');
- for (D && x[A] && x[A][1] == o.FORWARD_SLASH && x[A + 1] && (n.isLineHeightKeyword(x[A + 1][1]) || n.isUnit(x[A + 1][1]) || n.isNumber(x[A + 1][1])) && (y.value = [
- x[A + 1]
- ], A++, A++), v.value = [
- ]; x[A]; ) x[A][1] == o.COMMA ? k = !1 : (k ? v.value[v.value.length - 1][1] += o.SPACE + x[A][1] : v.value.push(x[A]), k = !0),
- A++;
- if (0 === v.value.length) throw new r('Missing font family at ' + a(x[0][2][0]) + '. Ignoring.');
- return b
- },
- fourValues: c,
- listStyle: function (e, t, n) {
- var r = l('list-style-type', 0, t),
- i = l('list-style-position', 0, t),
- s = l('list-style-image', 0, t),
- o = [
- r,
- i,
- s
- ];
- if (1 == e.value.length && 'inherit' == e.value[0][1]) return r.value = i.value = s.value = [
- e.value[0]
- ],
- o;
- var a = e.value.slice(0),
- u = a.length,
- c = 0;
- for (c = 0, u = a.length; c < u; c++) if (n.isUrl(a[c][1]) || '0' == a[c][1]) {
- s.value = [
- a[c]
- ],
- a.splice(c, 1);
- break
- }
- for (c = 0, u = a.length; c < u; c++) if (n.isListStylePositionKeyword(a[c][1])) {
- i.value = [
- a[c]
- ],
- a.splice(c, 1);
- break
- }
- return a.length > 0 && (n.isListStyleTypeKeyword(a[0][1]) || n.isIdentifier(a[0][1])) && (r.value = [
- a[0]
- ]),
- o
- },
- multiplex: function (e) {
- return function (t, n, r) {
- var i,
- a,
- u,
- c,
- p = [
- ],
- h = t.value;
- for (i = 0, u = h.length; i < u; i++) ',' == h[i][1] && p.push(i);
- if (0 === p.length) return e(t, n, r);
- var f = [
- ];
- for (i = 0, u = p.length; i <= u; i++) {
- var d = 0 === i ? 0 : p[i - 1] + 1,
- m = i < u ? p[i] : h.length,
- g = l(t.name, 0, n);
- g.value = h.slice(d, m),
- f.push(e(g, n, r))
- }
- var y = f[0];
- for (i = 0, u = y.length; i < u; i++) for (y[i].multiplex = !0, a = 1, c = f.length; a < c; a++) y[i].value.push([s.PROPERTY_VALUE,
- o.COMMA]),
- Array.prototype.push.apply(y[i].value, f[a][i].value);
- return y
- }
- },
- outline: p,
- transition: function (e, t, n) {
- var i,
- s,
- o,
- c = l(e.name + '-property', 0, t),
- p = l(e.name + '-duration', 0, t),
- h = l(e.name + '-timing-function', 0, t),
- f = l(e.name + '-delay', 0, t),
- d = [
- c,
- p,
- h,
- f
- ],
- m = e.value,
- g = !1,
- y = !1,
- v = !1,
- b = !1;
- if (1 == e.value.length && 'inherit' == e.value[0][1]) return c.value = p.value = h.value = f.value = e.value,
- d;
- if (m.length > 1 && u(m)) throw new r('Invalid animation values at ' + a(m[0][2][0]) + '. Ignoring.');
- for (s = 0, o = m.length; s < o; s++) if (i = m[s], n.isTime(i[1]) && !g) p.value = [
- i
- ],
- g = !0;
- else if (n.isTime(i[1]) && !y) f.value = [
- i
- ],
- y = !0;
- else if (!n.isGlobal(i[1]) && !n.isTimingFunction(i[1]) || b) {
- if (!n.isIdentifier(i[1]) || v) throw new r('Invalid animation value at ' + a(i[2][0]) + '. Ignoring.');
- c.value = [
- i
- ],
- v = !0
- } else h.value = [
- i
- ],
- b = !0;
- return d
- }
- }
- },
- {
- '../../tokenizer/marker': 121,
- '../../tokenizer/token': 122,
- '../../utils/format-position': 125,
- '../wrap-for-optimizing': 96,
- './invalid-property-error': 61
- }
- ],
- 57: [
- function (e, t, n) {
- var r = e('./properties/understandable');
- function i(e) {
- return function (t, n, i) {
- return !(!r(t, n, i, 0, !0) && !t.isKeyword(e) (i)) && (!(!t.isVariable(n) || !t.isVariable(i)) || t.isKeyword(e) (i))
- }
- }
- function s(e) {
- return function (t, n, i) {
- return !!(r(t, n, i, 0, !0) || t.isKeyword(e) (i) || t.isGlobal(i)) && (!(!t.isVariable(n) || !t.isVariable(i)) || (t.isKeyword(e) (i) || t.isGlobal(i)))
- }
- }
- function o(e, t, n) {
- return !!function (e, t, n) {
- return !(!e.isFunction(t) || !e.isFunction(n)) && t.substring(0, t.indexOf('(')) === n.substring(0, n.indexOf('('))
- }(e, t, n) || t === n
- }
- function a(e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isUnit(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !(e.isUnit(t) && !e.isUnit(n)) && (!!e.isUnit(n) || !e.isUnit(t) && (!(!e.isFunction(t) || e.isPrefixed(t) || !e.isFunction(n) || e.isPrefixed(n)) || o(e, t, n))))
- }
- function u(e) {
- var t = s(e);
- return function (e, n, r) {
- return a(e, n, r) || t(e, n, r)
- }
- }
- t.exports = {
- generic: {
- color: function (e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isColor(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !(!e.colorOpacity && (e.isRgbColor(t) || e.isHslColor(t))) && !(!e.colorOpacity && (e.isRgbColor(n) || e.isHslColor(n))) && (!(!e.isColor(t) || !e.isColor(n)) || o(e, t, n)))
- },
- components: function (e) {
- return function (t, n, r, i) {
- return e[i](t, n, r)
- }
- },
- image: function (e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isImage(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !!e.isImage(n) || !e.isImage(t) && o(e, t, n))
- },
- propertyName: function (e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isIdentifier(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isIdentifier(n))
- },
- time: function (e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isTime(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !(e.isTime(t) && !e.isTime(n)) && (!!e.isTime(n) || !e.isTime(t) && (!(!e.isFunction(t) || e.isPrefixed(t) || !e.isFunction(n) || e.isPrefixed(n)) || o(e, t, n))))
- },
- timingFunction: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isTimingFunction(n) || e.isGlobal(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isTimingFunction(n) || e.isGlobal(n))
- },
- unit: a,
- unitOrNumber: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isUnit(n) || e.isNumber(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !((e.isUnit(t) || e.isNumber(t)) && !e.isUnit(n) && !e.isNumber(n)) && (!(!e.isUnit(n) && !e.isNumber(n)) || !e.isUnit(t) && !e.isNumber(t) && (!(!e.isFunction(t) || e.isPrefixed(t) || !e.isFunction(n) || e.isPrefixed(n)) || o(e, t, n))))
- }
- },
- property: {
- animationDirection: s('animation-direction'),
- animationFillMode: i('animation-fill-mode'),
- animationIterationCount: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isAnimationIterationCountKeyword(n) || e.isPositiveNumber(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isAnimationIterationCountKeyword(n) || e.isPositiveNumber(n))
- },
- animationName: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isAnimationNameKeyword(n) || e.isIdentifier(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isAnimationNameKeyword(n) || e.isIdentifier(n))
- },
- animationPlayState: s('animation-play-state'),
- backgroundAttachment: i('background-attachment'),
- backgroundClip: s('background-clip'),
- backgroundOrigin: i('background-origin'),
- backgroundPosition: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isBackgroundPositionKeyword(n) || e.isGlobal(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !(!e.isBackgroundPositionKeyword(n) && !e.isGlobal(n)) || a(e, t, n))
- },
- backgroundRepeat: i('background-repeat'),
- backgroundSize: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isBackgroundSizeKeyword(n) || e.isGlobal(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || !(!e.isBackgroundSizeKeyword(n) && !e.isGlobal(n)) || a(e, t, n))
- },
- bottom: u('bottom'),
- borderCollapse: i('border-collapse'),
- borderStyle: s('*-style'),
- clear: s('clear'),
- cursor: s('cursor'),
- display: s('display'),
- float: s('float'),
- left: u('left'),
- fontFamily: function (e, t, n) {
- return r(e, t, n, 0, !0)
- },
- fontStretch: s('font-stretch'),
- fontStyle: s('font-style'),
- fontVariant: s('font-variant'),
- fontWeight: s('font-weight'),
- listStyleType: s('list-style-type'),
- listStylePosition: s('list-style-position'),
- outlineStyle: s('*-style'),
- overflow: s('overflow'),
- position: s('position'),
- right: u('right'),
- textAlign: s('text-align'),
- textDecoration: s('text-decoration'),
- textOverflow: s('text-overflow'),
- textShadow: function (e, t, n) {
- return !!(r(e, t, n, 0, !0) || e.isUnit(n) || e.isColor(n) || e.isGlobal(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isUnit(n) || e.isColor(n) || e.isGlobal(n))
- },
- top: u('top'),
- transform: o,
- verticalAlign: u('vertical-align'),
- visibility: s('visibility'),
- whiteSpace: s('white-space'),
- zIndex: function (e, t, n) {
- return !(!r(e, t, n, 0, !0) && !e.isZIndex(n)) && (!(!e.isVariable(t) || !e.isVariable(n)) || e.isZIndex(n))
- }
- }
- }
- },
- {
- './properties/understandable': 78
- }
- ],
- 58: [
- function (e, t, n) {
- var r = e('../wrap-for-optimizing').single,
- i = e('../../tokenizer/token');
- function s(e) {
- var t = r([i.PROPERTY,
- [
- i.PROPERTY_NAME,
- e.name
- ]]);
- return t.important = e.important,
- t.hack = e.hack,
- t.unused = !1,
- t
- }
- t.exports = {
- deep: function (e) {
- for (var t = s(e), n = e.components.length - 1; n >= 0; n--) {
- var r = s(e.components[n]);
- r.value = e.components[n].value.slice(0),
- t.components.unshift(r)
- }
- return t.dirty = !0,
- t.value = e.value.slice(0),
- t
- },
- shallow: s
- }
- },
- {
- '../../tokenizer/token': 122,
- '../wrap-for-optimizing': 96
- }
- ],
- 59: [
- function (e, t, n) {
- var r = e('./break-up'),
- i = e('./can-override'),
- s = e('./restore'),
- o = e('../../utils/override'),
- a = {
- animation: {
- canOverride: i.generic.components([i.generic.time,
- i.generic.timingFunction,
- i.generic.time,
- i.property.animationIterationCount,
- i.property.animationDirection,
- i.property.animationFillMode,
- i.property.animationPlayState,
- i.property.animationName]),
- components: [
- 'animation-duration',
- 'animation-timing-function',
- 'animation-delay',
- 'animation-iteration-count',
- 'animation-direction',
- 'animation-fill-mode',
- 'animation-play-state',
- 'animation-name'
- ],
- breakUp: r.multiplex(r.animation),
- defaultValue: 'none',
- restore: s.multiplex(s.withoutDefaults),
- shorthand: !0,
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-delay': {
- canOverride: i.generic.time,
- componentOf: [
- 'animation'
- ],
- defaultValue: '0s',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-direction': {
- canOverride: i.property.animationDirection,
- componentOf: [
- 'animation'
- ],
- defaultValue: 'normal',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-duration': {
- canOverride: i.generic.time,
- componentOf: [
- 'animation'
- ],
- defaultValue: '0s',
- intoMultiplexMode: 'real',
- keepUnlessDefault: 'animation-delay',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-fill-mode': {
- canOverride: i.property.animationFillMode,
- componentOf: [
- 'animation'
- ],
- defaultValue: 'none',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-iteration-count': {
- canOverride: i.property.animationIterationCount,
- componentOf: [
- 'animation'
- ],
- defaultValue: '1',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-name': {
- canOverride: i.property.animationName,
- componentOf: [
- 'animation'
- ],
- defaultValue: 'none',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-play-state': {
- canOverride: i.property.animationPlayState,
- componentOf: [
- 'animation'
- ],
- defaultValue: 'running',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'animation-timing-function': {
- canOverride: i.generic.timingFunction,
- componentOf: [
- 'animation'
- ],
- defaultValue: 'ease',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- background: {
- canOverride: i.generic.components([i.generic.image,
- i.property.backgroundPosition,
- i.property.backgroundSize,
- i.property.backgroundRepeat,
- i.property.backgroundAttachment,
- i.property.backgroundOrigin,
- i.property.backgroundClip,
- i.generic.color]),
- components: [
- 'background-image',
- 'background-position',
- 'background-size',
- 'background-repeat',
- 'background-attachment',
- 'background-origin',
- 'background-clip',
- 'background-color'
- ],
- breakUp: r.multiplex(r.background),
- defaultValue: '0 0',
- restore: s.multiplex(s.background),
- shortestValue: '0',
- shorthand: !0
- },
- 'background-attachment': {
- canOverride: i.property.backgroundAttachment,
- componentOf: [
- 'background'
- ],
- defaultValue: 'scroll',
- intoMultiplexMode: 'real'
- },
- 'background-clip': {
- canOverride: i.property.backgroundClip,
- componentOf: [
- 'background'
- ],
- defaultValue: 'border-box',
- intoMultiplexMode: 'real',
- shortestValue: 'border-box'
- },
- 'background-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'background'
- ],
- defaultValue: 'transparent',
- intoMultiplexMode: 'real',
- multiplexLastOnly: !0,
- nonMergeableValue: 'none',
- shortestValue: 'red'
- },
- 'background-image': {
- canOverride: i.generic.image,
- componentOf: [
- 'background'
- ],
- defaultValue: 'none',
- intoMultiplexMode: 'default'
- },
- 'background-origin': {
- canOverride: i.property.backgroundOrigin,
- componentOf: [
- 'background'
- ],
- defaultValue: 'padding-box',
- intoMultiplexMode: 'real',
- shortestValue: 'border-box'
- },
- 'background-position': {
- canOverride: i.property.backgroundPosition,
- componentOf: [
- 'background'
- ],
- defaultValue: [
- '0',
- '0'
- ],
- doubleValues: !0,
- intoMultiplexMode: 'real',
- shortestValue: '0'
- },
- 'background-repeat': {
- canOverride: i.property.backgroundRepeat,
- componentOf: [
- 'background'
- ],
- defaultValue: [
- 'repeat'
- ],
- doubleValues: !0,
- intoMultiplexMode: 'real'
- },
- 'background-size': {
- canOverride: i.property.backgroundSize,
- componentOf: [
- 'background'
- ],
- defaultValue: [
- 'auto'
- ],
- doubleValues: !0,
- intoMultiplexMode: 'real',
- shortestValue: '0 0'
- },
- bottom: {
- canOverride: i.property.bottom,
- defaultValue: 'auto'
- },
- border: {
- breakUp: r.border,
- canOverride: i.generic.components([i.generic.unit,
- i.property.borderStyle,
- i.generic.color]),
- components: [
- 'border-width',
- 'border-style',
- 'border-color'
- ],
- defaultValue: 'none',
- overridesShorthands: [
- 'border-bottom',
- 'border-left',
- 'border-right',
- 'border-top'
- ],
- restore: s.withoutDefaults,
- shorthand: !0,
- shorthandComponents: !0
- },
- 'border-bottom': {
- breakUp: r.border,
- canOverride: i.generic.components([i.generic.unit,
- i.property.borderStyle,
- i.generic.color]),
- components: [
- 'border-bottom-width',
- 'border-bottom-style',
- 'border-bottom-color'
- ],
- defaultValue: 'none',
- restore: s.withoutDefaults,
- shorthand: !0
- },
- 'border-bottom-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'border-bottom',
- 'border-color'
- ],
- defaultValue: 'none'
- },
- 'border-bottom-left-radius': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-radius'
- ],
- defaultValue: '0',
- vendorPrefixes: [
- '-moz-',
- '-o-'
- ]
- },
- 'border-bottom-right-radius': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-radius'
- ],
- defaultValue: '0',
- vendorPrefixes: [
- '-moz-',
- '-o-'
- ]
- },
- 'border-bottom-style': {
- canOverride: i.property.borderStyle,
- componentOf: [
- 'border-bottom',
- 'border-style'
- ],
- defaultValue: 'none'
- },
- 'border-bottom-width': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-bottom',
- 'border-width'
- ],
- defaultValue: 'medium',
- oppositeTo: 'border-top-width',
- shortestValue: '0'
- },
- 'border-collapse': {
- canOverride: i.property.borderCollapse,
- defaultValue: 'separate'
- },
- 'border-color': {
- breakUp: r.fourValues,
- canOverride: i.generic.components([i.generic.color,
- i.generic.color,
- i.generic.color,
- i.generic.color]),
- componentOf: [
- 'border'
- ],
- components: [
- 'border-top-color',
- 'border-right-color',
- 'border-bottom-color',
- 'border-left-color'
- ],
- defaultValue: 'none',
- restore: s.fourValues,
- shortestValue: 'red',
- shorthand: !0
- },
- 'border-left': {
- breakUp: r.border,
- canOverride: i.generic.components([i.generic.unit,
- i.property.borderStyle,
- i.generic.color]),
- components: [
- 'border-left-width',
- 'border-left-style',
- 'border-left-color'
- ],
- defaultValue: 'none',
- restore: s.withoutDefaults,
- shorthand: !0
- },
- 'border-left-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'border-color',
- 'border-left'
- ],
- defaultValue: 'none'
- },
- 'border-left-style': {
- canOverride: i.property.borderStyle,
- componentOf: [
- 'border-left',
- 'border-style'
- ],
- defaultValue: 'none'
- },
- 'border-left-width': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-left',
- 'border-width'
- ],
- defaultValue: 'medium',
- oppositeTo: 'border-right-width',
- shortestValue: '0'
- },
- 'border-radius': {
- breakUp: r.borderRadius,
- canOverride: i.generic.components([i.generic.unit,
- i.generic.unit,
- i.generic.unit,
- i.generic.unit]),
- components: [
- 'border-top-left-radius',
- 'border-top-right-radius',
- 'border-bottom-right-radius',
- 'border-bottom-left-radius'
- ],
- defaultValue: '0',
- restore: s.borderRadius,
- shorthand: !0,
- vendorPrefixes: [
- '-moz-',
- '-o-'
- ]
- },
- 'border-right': {
- breakUp: r.border,
- canOverride: i.generic.components([i.generic.unit,
- i.property.borderStyle,
- i.generic.color]),
- components: [
- 'border-right-width',
- 'border-right-style',
- 'border-right-color'
- ],
- defaultValue: 'none',
- restore: s.withoutDefaults,
- shorthand: !0
- },
- 'border-right-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'border-color',
- 'border-right'
- ],
- defaultValue: 'none'
- },
- 'border-right-style': {
- canOverride: i.property.borderStyle,
- componentOf: [
- 'border-right',
- 'border-style'
- ],
- defaultValue: 'none'
- },
- 'border-right-width': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-right',
- 'border-width'
- ],
- defaultValue: 'medium',
- oppositeTo: 'border-left-width',
- shortestValue: '0'
- },
- 'border-style': {
- breakUp: r.fourValues,
- canOverride: i.generic.components([i.property.borderStyle,
- i.property.borderStyle,
- i.property.borderStyle,
- i.property.borderStyle]),
- componentOf: [
- 'border'
- ],
- components: [
- 'border-top-style',
- 'border-right-style',
- 'border-bottom-style',
- 'border-left-style'
- ],
- defaultValue: 'none',
- restore: s.fourValues,
- shorthand: !0
- },
- 'border-top': {
- breakUp: r.border,
- canOverride: i.generic.components([i.generic.unit,
- i.property.borderStyle,
- i.generic.color]),
- components: [
- 'border-top-width',
- 'border-top-style',
- 'border-top-color'
- ],
- defaultValue: 'none',
- restore: s.withoutDefaults,
- shorthand: !0
- },
- 'border-top-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'border-color',
- 'border-top'
- ],
- defaultValue: 'none'
- },
- 'border-top-left-radius': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-radius'
- ],
- defaultValue: '0',
- vendorPrefixes: [
- '-moz-',
- '-o-'
- ]
- },
- 'border-top-right-radius': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-radius'
- ],
- defaultValue: '0',
- vendorPrefixes: [
- '-moz-',
- '-o-'
- ]
- },
- 'border-top-style': {
- canOverride: i.property.borderStyle,
- componentOf: [
- 'border-style',
- 'border-top'
- ],
- defaultValue: 'none'
- },
- 'border-top-width': {
- canOverride: i.generic.unit,
- componentOf: [
- 'border-top',
- 'border-width'
- ],
- defaultValue: 'medium',
- oppositeTo: 'border-bottom-width',
- shortestValue: '0'
- },
- 'border-width': {
- breakUp: r.fourValues,
- canOverride: i.generic.components([i.generic.unit,
- i.generic.unit,
- i.generic.unit,
- i.generic.unit]),
- componentOf: [
- 'border'
- ],
- components: [
- 'border-top-width',
- 'border-right-width',
- 'border-bottom-width',
- 'border-left-width'
- ],
- defaultValue: 'medium',
- restore: s.fourValues,
- shortestValue: '0',
- shorthand: !0
- },
- clear: {
- canOverride: i.property.clear,
- defaultValue: 'none'
- },
- color: {
- canOverride: i.generic.color,
- defaultValue: 'transparent',
- shortestValue: 'red'
- },
- cursor: {
- canOverride: i.property.cursor,
- defaultValue: 'auto'
- },
- display: {
- canOverride: i.property.display
- },
- float: {
- canOverride: i.property.float,
- defaultValue: 'none'
- },
- font: {
- breakUp: r.font,
- canOverride: i.generic.components([i.property.fontStyle,
- i.property.fontVariant,
- i.property.fontWeight,
- i.property.fontStretch,
- i.generic.unit,
- i.generic.unit,
- i.property.fontFamily]),
- components: [
- 'font-style',
- 'font-variant',
- 'font-weight',
- 'font-stretch',
- 'font-size',
- 'line-height',
- 'font-family'
- ],
- restore: s.font,
- shorthand: !0
- },
- 'font-family': {
- canOverride: i.property.fontFamily,
- defaultValue: 'user|agent|specific'
- },
- 'font-size': {
- canOverride: i.generic.unit,
- defaultValue: 'medium',
- shortestValue: '0'
- },
- 'font-stretch': {
- canOverride: i.property.fontStretch,
- defaultValue: 'normal'
- },
- 'font-style': {
- canOverride: i.property.fontStyle,
- defaultValue: 'normal'
- },
- 'font-variant': {
- canOverride: i.property.fontVariant,
- defaultValue: 'normal'
- },
- 'font-weight': {
- canOverride: i.property.fontWeight,
- defaultValue: 'normal',
- shortestValue: '400'
- },
- height: {
- canOverride: i.generic.unit,
- defaultValue: 'auto',
- shortestValue: '0'
- },
- left: {
- canOverride: i.property.left,
- defaultValue: 'auto'
- },
- 'line-height': {
- canOverride: i.generic.unitOrNumber,
- defaultValue: 'normal',
- shortestValue: '0'
- },
- 'list-style': {
- canOverride: i.generic.components([i.property.listStyleType,
- i.property.listStylePosition,
- i.property.listStyleImage]),
- components: [
- 'list-style-type',
- 'list-style-position',
- 'list-style-image'
- ],
- breakUp: r.listStyle,
- restore: s.withoutDefaults,
- defaultValue: 'outside',
- shortestValue: 'none',
- shorthand: !0
- },
- 'list-style-image': {
- canOverride: i.generic.image,
- componentOf: [
- 'list-style'
- ],
- defaultValue: 'none'
- },
- 'list-style-position': {
- canOverride: i.property.listStylePosition,
- componentOf: [
- 'list-style'
- ],
- defaultValue: 'outside',
- shortestValue: 'inside'
- },
- 'list-style-type': {
- canOverride: i.property.listStyleType,
- componentOf: [
- 'list-style'
- ],
- defaultValue: 'decimal|disc',
- shortestValue: 'none'
- },
- margin: {
- breakUp: r.fourValues,
- canOverride: i.generic.components([i.generic.unit,
- i.generic.unit,
- i.generic.unit,
- i.generic.unit]),
- components: [
- 'margin-top',
- 'margin-right',
- 'margin-bottom',
- 'margin-left'
- ],
- defaultValue: '0',
- restore: s.fourValues,
- shorthand: !0
- },
- 'margin-bottom': {
- canOverride: i.generic.unit,
- componentOf: [
- 'margin'
- ],
- defaultValue: '0',
- oppositeTo: 'margin-top'
- },
- 'margin-left': {
- canOverride: i.generic.unit,
- componentOf: [
- 'margin'
- ],
- defaultValue: '0',
- oppositeTo: 'margin-right'
- },
- 'margin-right': {
- canOverride: i.generic.unit,
- componentOf: [
- 'margin'
- ],
- defaultValue: '0',
- oppositeTo: 'margin-left'
- },
- 'margin-top': {
- canOverride: i.generic.unit,
- componentOf: [
- 'margin'
- ],
- defaultValue: '0',
- oppositeTo: 'margin-bottom'
- },
- outline: {
- canOverride: i.generic.components([i.generic.color,
- i.property.outlineStyle,
- i.generic.unit]),
- components: [
- 'outline-color',
- 'outline-style',
- 'outline-width'
- ],
- breakUp: r.outline,
- restore: s.withoutDefaults,
- defaultValue: '0',
- shorthand: !0
- },
- 'outline-color': {
- canOverride: i.generic.color,
- componentOf: [
- 'outline'
- ],
- defaultValue: 'invert',
- shortestValue: 'red'
- },
- 'outline-style': {
- canOverride: i.property.outlineStyle,
- componentOf: [
- 'outline'
- ],
- defaultValue: 'none'
- },
- 'outline-width': {
- canOverride: i.generic.unit,
- componentOf: [
- 'outline'
- ],
- defaultValue: 'medium',
- shortestValue: '0'
- },
- overflow: {
- canOverride: i.property.overflow,
- defaultValue: 'visible'
- },
- 'overflow-x': {
- canOverride: i.property.overflow,
- defaultValue: 'visible'
- },
- 'overflow-y': {
- canOverride: i.property.overflow,
- defaultValue: 'visible'
- },
- padding: {
- breakUp: r.fourValues,
- canOverride: i.generic.components([i.generic.unit,
- i.generic.unit,
- i.generic.unit,
- i.generic.unit]),
- components: [
- 'padding-top',
- 'padding-right',
- 'padding-bottom',
- 'padding-left'
- ],
- defaultValue: '0',
- restore: s.fourValues,
- shorthand: !0
- },
- 'padding-bottom': {
- canOverride: i.generic.unit,
- componentOf: [
- 'padding'
- ],
- defaultValue: '0',
- oppositeTo: 'padding-top'
- },
- 'padding-left': {
- canOverride: i.generic.unit,
- componentOf: [
- 'padding'
- ],
- defaultValue: '0',
- oppositeTo: 'padding-right'
- },
- 'padding-right': {
- canOverride: i.generic.unit,
- componentOf: [
- 'padding'
- ],
- defaultValue: '0',
- oppositeTo: 'padding-left'
- },
- 'padding-top': {
- canOverride: i.generic.unit,
- componentOf: [
- 'padding'
- ],
- defaultValue: '0',
- oppositeTo: 'padding-bottom'
- },
- position: {
- canOverride: i.property.position,
- defaultValue: 'static'
- },
- right: {
- canOverride: i.property.right,
- defaultValue: 'auto'
- },
- 'text-align': {
- canOverride: i.property.textAlign,
- defaultValue: 'left|right'
- },
- 'text-decoration': {
- canOverride: i.property.textDecoration,
- defaultValue: 'none'
- },
- 'text-overflow': {
- canOverride: i.property.textOverflow,
- defaultValue: 'none'
- },
- 'text-shadow': {
- canOverride: i.property.textShadow,
- defaultValue: 'none'
- },
- top: {
- canOverride: i.property.top,
- defaultValue: 'auto'
- },
- transform: {
- canOverride: i.property.transform,
- vendorPrefixes: [
- '-moz-',
- '-ms-',
- '-webkit-'
- ]
- },
- transition: {
- breakUp: r.multiplex(r.transition),
- canOverride: i.generic.components([i.property.transitionProperty,
- i.generic.time,
- i.generic.timingFunction,
- i.generic.time]),
- components: [
- 'transition-property',
- 'transition-duration',
- 'transition-timing-function',
- 'transition-delay'
- ],
- defaultValue: 'none',
- restore: s.multiplex(s.withoutDefaults),
- shorthand: !0,
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'transition-delay': {
- canOverride: i.generic.time,
- componentOf: [
- 'transition'
- ],
- defaultValue: '0s',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'transition-duration': {
- canOverride: i.generic.time,
- componentOf: [
- 'transition'
- ],
- defaultValue: '0s',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'transition-property': {
- canOverride: i.generic.propertyName,
- componentOf: [
- 'transition'
- ],
- defaultValue: 'all',
- intoMultiplexMode: 'placeholder',
- placeholderValue: '_',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'transition-timing-function': {
- canOverride: i.generic.timingFunction,
- componentOf: [
- 'transition'
- ],
- defaultValue: 'ease',
- intoMultiplexMode: 'real',
- vendorPrefixes: [
- '-moz-',
- '-o-',
- '-webkit-'
- ]
- },
- 'vertical-align': {
- canOverride: i.property.verticalAlign,
- defaultValue: 'baseline'
- },
- visibility: {
- canOverride: i.property.visibility,
- defaultValue: 'visible'
- },
- 'white-space': {
- canOverride: i.property.whiteSpace,
- defaultValue: 'normal'
- },
- width: {
- canOverride: i.generic.unit,
- defaultValue: 'auto',
- shortestValue: '0'
- },
- 'z-index': {
- canOverride: i.property.zIndex,
- defaultValue: 'auto'
- }
- };
- function u(e, t) {
- var n = o(a[e], {
- });
- return 'componentOf' in n && (n.componentOf = n.componentOf.map(function (e) {
- return t + e
- })),
- 'components' in n && (n.components = n.components.map(function (e) {
- return t + e
- })),
- 'keepUnlessDefault' in n && (n.keepUnlessDefault = t + n.keepUnlessDefault),
- n
- }
- var l = {
- };
- for (var c in a) {
- var p = a[c];
- if ('vendorPrefixes' in p) {
- for (var h = 0; h < p.vendorPrefixes.length; h++) {
- var f = p.vendorPrefixes[h],
- d = u(c, f);
- delete d.vendorPrefixes,
- l[f + c] = d
- }
- delete p.vendorPrefixes
- }
- }
- t.exports = o(a, l)
- },
- {
- '../../utils/override': 133,
- './break-up': 56,
- './can-override': 57,
- './restore': 87
- }
- ],
- 60: [
- function (e, t, n) {
- var r = e('../../tokenizer/token'),
- i = e('../../writer/one-time').rules,
- s = e('../../writer/one-time').value;
- function o(e) {
- return 'list-style' == e ? e : e.indexOf('-radius') > 0 ? 'border-radius' : 'border-collapse' == e || 'border-spacing' == e || 'border-image' == e ? e : 0 === e.indexOf('border-') && /^border\-\w+\-\w+$/.test(e) ? e.match(/border\-\w+/) [0] : 0 === e.indexOf('border-') && /^border\-\w+$/.test(e) ? 'border' : 0 === e.indexOf('text-') ? e : '-chrome-' == e ? e : e.replace(/^\-\w+\-/, '').match(/([a-zA-Z]+)/) [0].toLowerCase()
- }
- t.exports = function e(t) {
- var n,
- a,
- u,
- l,
- c,
- p,
- h = [
- ];
- if (t[0] == r.RULE) for (n = !/[\.\+>~]/.test(i(t[1])), c = 0, p = t[2].length; c < p; c++) (a = t[2][c]) [0] == r.PROPERTY && 0 !== (u = a[1][1]).length && 0 !== u.indexOf('--') && (l = s(a, c), h.push([u,
- l,
- o(u),
- t[2][c],
- u + ':' + l,
- t[1],
- n]));
- else if (t[0] == r.NESTED_BLOCK) for (c = 0, p = t[2].length; c < p; c++) h = h.concat(e(t[2][c]));
- return h
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136
- }
- ],
- 61: [
- function (e, t, n) {
- function r(e) {
- this.name = 'InvalidPropertyError',
- this.message = e,
- this.stack = (new Error).stack
- }
- r.prototype = Object.create(Error.prototype),
- r.prototype.constructor = r,
- t.exports = r
- },
- {
- }
- ],
- 62: [
- function (e, t, n) {
- var r = e('../../tokenizer/marker'),
- i = e('../../utils/split'),
- s = /\/deep\//,
- o = /^::/,
- a = ':not',
- u = [
- ':dir',
- ':lang',
- ':not',
- ':nth-child',
- ':nth-last-child',
- ':nth-last-of-type',
- ':nth-of-type'
- ],
- l = /[>\+~]/,
- c = [
- ':after',
- ':before',
- ':first-letter',
- ':first-line',
- ':lang'
- ],
- p = [
- '::after',
- '::before',
- '::first-letter',
- '::first-line'
- ],
- h = {
- DOUBLE_QUOTE: 'double-quote',
- SINGLE_QUOTE: 'single-quote',
- ROOT: 'root'
- };
- function f(e) {
- return s.test(e)
- }
- function d(e) {
- var t,
- n,
- i,
- s,
- o,
- a,
- u = [
- ],
- c = [
- ],
- p = h.ROOT,
- f = 0,
- d = !1,
- m = !1;
- for (o = 0, a = e.length; o < a; o++) t = e[o],
- s = !i && l.test(t),
- n = p == h.DOUBLE_QUOTE || p == h.SINGLE_QUOTE,
- i ? c.push(t) : t == r.DOUBLE_QUOTE && p == h.ROOT ? (c.push(t), p = h.DOUBLE_QUOTE) : t == r.DOUBLE_QUOTE && p == h.DOUBLE_QUOTE ? (c.push(t), p = h.ROOT) : t == r.SINGLE_QUOTE && p == h.ROOT ? (c.push(t), p = h.SINGLE_QUOTE) : t == r.SINGLE_QUOTE && p == h.SINGLE_QUOTE ? (c.push(t), p = h.ROOT) : n ? c.push(t) : t == r.OPEN_ROUND_BRACKET ? (c.push(t), f++) : t == r.CLOSE_ROUND_BRACKET && 1 == f && d ? (c.push(t), u.push(c.join('')), f--, c = [
- ], d = !1) : t == r.CLOSE_ROUND_BRACKET ? (c.push(t), f--) : t == r.COLON && 0 === f && d && !m ? (u.push(c.join('')), (c = [
- ]).push(t)) : t != r.COLON || 0 !== f || m ? t == r.SPACE && 0 === f && d ? (u.push(c.join('')), c = [
- ], d = !1) : s && 0 === f && d ? (u.push(c.join('')), c = [
- ], d = !1) : c.push(t) : ((c = [
- ]).push(t), d = !0),
- i = t == r.BACK_SLASH,
- m = t == r.COLON;
- return c.length > 0 && d && u.push(c.join('')),
- u
- }
- function m(e, t, n, i, s) {
- return function (e, t, n) {
- var i,
- s,
- o,
- a;
- for (o = 0, a = e.length; o < a; o++) if (i = e[o], s = i.indexOf(r.OPEN_ROUND_BRACKET) > - 1 ? i.substring(0, i.indexOf(r.OPEN_ROUND_BRACKET)) : i, - 1 === t.indexOf(s) && - 1 === n.indexOf(s)) return !1;
- return !0
- }(t, n, i) && function (e) {
- var t,
- n,
- i,
- s,
- o,
- a;
- for (o = 0, a = e.length; o < a; o++) {
- if (t = e[o], i = t.indexOf(r.OPEN_ROUND_BRACKET), n = (s = i > - 1) ? t.substring(0, i) : t, s && - 1 == u.indexOf(n)) return !1;
- if (!s && u.indexOf(n) > - 1) return !1
- }
- return !0
- }(t) && (t.length < 2 || !function (e, t) {
- var n,
- i,
- s,
- o,
- u,
- l,
- c,
- p,
- h = 0;
- for (c = 0, p = t.length; c < p && (n = t[c], s = t[c + 1]); c++) if (i = e.indexOf(n, h), o = e.indexOf(n, i + 1), h = o, i + n.length == o && (u = n.indexOf(r.OPEN_ROUND_BRACKET) > - 1 ? n.substring(0, n.indexOf(r.OPEN_ROUND_BRACKET)) : n, l = s.indexOf(r.OPEN_ROUND_BRACKET) > - 1 ? s.substring(0, s.indexOf(r.OPEN_ROUND_BRACKET)) : s, u != a || l != a)) return !0;
- return !1
- }(e, t)) && (t.length < 2 || s && function (e) {
- var t,
- n,
- r,
- i = 0;
- for (n = 0, r = e.length; n < r; n++) if (t = e[n], s = t, o.test(s) ? i += p.indexOf(t) > - 1 ? 1 : 0 : i += c.indexOf(t) > - 1 ? 1 : 0, i > 1) return !1;
- var s;
- return !0
- }(t))
- }
- t.exports = function (e, t, n, s) {
- var o,
- a,
- u,
- l = i(e, r.COMMA);
- for (a = 0, u = l.length; a < u; a++) if (0 === (o = l[a]).length || f(o) || o.indexOf(r.COLON) > - 1 && !m(o, d(o), t, n, s)) return !1;
- return !0
- }
- },
- {
- '../../tokenizer/marker': 121,
- '../../utils/split': 134
- }
- ],
- 63: [
- function (e, t, n) {
- var r = e('./is-mergeable'),
- i = e('./properties/optimize'),
- s = e('../level-1/sort-selectors'),
- o = e('../level-1/tidy-rules'),
- a = e('../../options/optimization-level').OptimizationLevel,
- u = e('../../writer/one-time').body,
- l = e('../../writer/one-time').rules,
- c = e('../../tokenizer/token');
- t.exports = function (e, t) {
- for (var n = [
- null,
- [
- ],
- [
- ]
- ], p = t.options, h = p.compatibility.selectors.adjacentSpace, f = p.level[a.One].selectorsSortingMethod, d = p.compatibility.selectors.mergeablePseudoClasses, m = p.compatibility.selectors.mergeablePseudoElements, g = p.compatibility.selectors.mergeLimit, y = p.compatibility.selectors.multiplePseudoMerging, v = 0, b = e.length; v < b; v++) {
- var x = e[v];
- x[0] == c.RULE ? n[0] == c.RULE && l(x[1]) == l(n[1]) ? (Array.prototype.push.apply(n[2], x[2]), i(n[2], !0, !0, t), x[2] = [
- ]) : n[0] == c.RULE && u(x[2]) == u(n[2]) && r(l(x[1]), d, m, y) && r(l(n[1]), d, m, y) && n[1].length < g ? (n[1] = o(n[1].concat(x[1]), !1, h, !1, t.warnings), n[1] = n.length > 1 ? s(n[1], f) : n[1], x[2] = [
- ]) : n = x : n = [
- null,
- [
- ],
- [
- ]
- ]
- }
- }
- },
- {
- '../../options/optimization-level': 103,
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136,
- '../level-1/sort-selectors': 52,
- '../level-1/tidy-rules': 55,
- './is-mergeable': 62,
- './properties/optimize': 74
- }
- ],
- 64: [
- function (e, t, n) {
- var r = e('./reorderable').canReorder,
- i = e('./reorderable').canReorderSingle,
- s = e('./extract-properties'),
- o = e('./rules-overlap'),
- a = e('../../writer/one-time').rules,
- u = e('../../options/optimization-level').OptimizationLevel,
- l = e('../../tokenizer/token');
- function c(e, t, n) {
- var r,
- s,
- a,
- u,
- l,
- c,
- p,
- h;
- for (l = 0, c = e.length; l < c; l++) for (s = (r = e[l]) [5], p = 0, h = t.length; p < h; p++) if (u = (a = t[p]) [5], o(s, u, !0) && !i(r, a, n)) return !1;
- return !0
- }
- t.exports = function (e, t) {
- for (var n = t.options.level[u.Two].mergeSemantically, i = t.cache.specificity, o = {
- }, p = [
- ], h = e.length - 1; h >= 0; h--) {
- var f = e[h];
- if (f[0] == l.NESTED_BLOCK) {
- var d = a(f[1]),
- m = o[d];
- m || (m = [
- ], o[d] = m),
- m.push(h)
- }
- }
- for (var g in o) {
- var y = o[g];
- e: for (var v = y.length - 1; v > 0; v--) {
- var b = y[v],
- x = e[b],
- A = y[v - 1],
- E = e[A];
- t: for (var _ = 1; _ >= - 1; _ -= 2) {
- for (var C = 1 == _, w = C ? b + 1 : A - 1, D = C ? A : b, k = C ? 1 : - 1, S = C ? x : E, T = C ? E : x, F = s(S); w != D; ) {
- var O = s(e[w]);
- if (w += k, !(n && c(F, O, i) || r(F, O, i))) continue t
- }
- T[2] = C ? S[2].concat(T[2]) : T[2].concat(S[2]),
- S[2] = [
- ],
- p.push(T);
- continue e
- }
- }
- }
- return p
- }
- },
- {
- '../../options/optimization-level': 103,
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136,
- './extract-properties': 60,
- './reorderable': 85,
- './rules-overlap': 89
- }
- ],
- 65: [
- function (e, t, n) {
- var r = e('./is-mergeable'),
- i = e('../level-1/sort-selectors'),
- s = e('../level-1/tidy-rules'),
- o = e('../../options/optimization-level').OptimizationLevel,
- a = e('../../writer/one-time').body,
- u = e('../../writer/one-time').rules,
- l = e('../../tokenizer/token');
- function c(e) {
- var t = u(e[1]);
- return t.indexOf('__') > - 1 || t.indexOf('--') > - 1
- }
- function p(e) {
- return e.replace(/--[^ ,>\+~:]+/g, '')
- }
- function h(e, t) {
- var n = p(u(e[1]));
- for (var r in t) {
- var i = t[r],
- s = p(u(i[1]));
- (s.indexOf(n) > - 1 || n.indexOf(s) > - 1) && delete t[r]
- }
- }
- t.exports = function (e, t) {
- for (var n, p = t.options, f = p.level[o.Two].mergeSemantically, d = p.compatibility.selectors.adjacentSpace, m = p.level[o.One].selectorsSortingMethod, g = p.compatibility.selectors.mergeablePseudoClasses, y = p.compatibility.selectors.mergeablePseudoElements, v = p.compatibility.selectors.multiplePseudoMerging, b = {
- }, x = e.length - 1; x >= 0; x--) {
- var A = e[x];
- if (A[0] == l.RULE) {
- A[2].length > 0 && !f && (n = u(A[1]), /\.|\*| :/.test(n)) && (b = {
- }),
- A[2].length > 0 && f && c(A) && h(A, b);
- var E = a(A[2]),
- _ = b[E];
- _ && r(u(A[1]), g, y, v) && r(u(_[1]), g, y, v) && (A[2].length > 0 ? (A[1] = s(_[1].concat(A[1]), !1, d, !1, t.warnings), A[1] = A[1].length > 1 ? i(A[1], m) : A[1]) : A[1] = _[1].concat(A[1]), _[2] = [
- ], b[E] = null),
- b[a(A[2])] = A
- }
- }
- }
- },
- {
- '../../options/optimization-level': 103,
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136,
- '../level-1/sort-selectors': 52,
- '../level-1/tidy-rules': 55,
- './is-mergeable': 62
- }
- ],
- 66: [
- function (e, t, n) {
- var r = e('./reorderable').canReorder,
- i = e('./extract-properties'),
- s = e('./properties/optimize'),
- o = e('../../writer/one-time').rules,
- a = e('../../tokenizer/token');
- t.exports = function (e, t) {
- var n,
- u = t.cache.specificity,
- l = {
- },
- c = [
- ];
- for (n = e.length - 1; n >= 0; n--) if (e[n][0] == a.RULE && 0 !== e[n][2].length) {
- var p = o(e[n][1]);
- l[p] = [
- n
- ].concat(l[p] || [
- ]),
- 2 == l[p].length && c.push(p)
- }
- for (n = c.length - 1; n >= 0; n--) {
- var h = l[c[n]];
- e: for (var f = h.length - 1; f > 0; f--) {
- var d = h[f - 1],
- m = e[d],
- g = h[f],
- y = e[g];
- t: for (var v = 1; v >= - 1; v -= 2) {
- for (var b = 1 == v, x = b ? d + 1 : g - 1, A = b ? g : d, E = b ? 1 : - 1, _ = b ? m : y, C = b ? y : m, w = i(_); x != A; ) {
- var D = i(e[x]);
- x += E;
- var k = b ? r(w, D, u) : r(D, w, u);
- if (!k && !b) continue e;
- if (!k && b) continue t
- }
- b ? (Array.prototype.push.apply(_[2], C[2]), C[2] = _[2]) : Array.prototype.push.apply(C[2], _[2]),
- s(C[2], !0, !0, t),
- _[2] = [
- ]
- }
- }
- }
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136,
- './extract-properties': 60,
- './properties/optimize': 74,
- './reorderable': 85
- }
- ],
- 67: [
- function (e, t, n) {
- var r = e('./merge-adjacent'),
- i = e('./merge-media-queries'),
- s = e('./merge-non-adjacent-by-body'),
- o = e('./merge-non-adjacent-by-selector'),
- a = e('./reduce-non-adjacent'),
- u = e('./remove-duplicate-font-at-rules'),
- l = e('./remove-duplicate-media-queries'),
- c = e('./remove-duplicates'),
- p = e('./remove-unused-at-rules'),
- h = e('./restructure'),
- f = e('./properties/optimize'),
- d = e('../../options/optimization-level').OptimizationLevel,
- m = e('../../tokenizer/token');
- function g(e, t, n) {
- var y,
- v,
- b = t.options.level[d.Two];
- if (function (e, t) {
- for (var n = 0, r = e.length; n < r; n++) {
- var i = e[n];
- if (i[0] == m.NESTED_BLOCK) {
- var s = /@(-moz-|-o-|-webkit-)?keyframes/.test(i[1][0][1]);
- g(i[2], t, !s)
- }
- }
- }(e, t), function e(t, n) {
- for (var r = 0, i = t.length; r < i; r++) {
- var s = t[r];
- switch (s[0]) {
- case m.RULE:
- f(s[2], !0, !0, n);
- break;
- case m.NESTED_BLOCK:
- e(s[2], n)
- }
- }
- }(e, t), b.removeDuplicateRules && c(e, t), b.mergeAdjacentRules && r(e, t), b.reduceNonAdjacentRules && a(e, t), b.mergeNonAdjacentRules && 'body' != b.mergeNonAdjacentRules && o(e, t), b.mergeNonAdjacentRules && 'selector' != b.mergeNonAdjacentRules && s(e, t), b.restructureRules && b.mergeAdjacentRules && n && (h(e, t), r(e, t)), b.restructureRules && !b.mergeAdjacentRules && n && h(e, t), b.removeDuplicateFontRules && u(e, t), b.removeDuplicateMediaBlocks && l(e, t), b.removeUnusedAtRules && p(e, t), b.mergeMedia) for (v = (y = i(e, t)).length - 1; v >= 0; v--) g(y[v][2], t, !1);
- return b.removeEmpty && function e(t) {
- for (var n = 0, r = t.length; n < r; n++) {
- var i = t[n],
- s = !1;
- switch (i[0]) {
- case m.RULE:
- s = 0 === i[1].length || 0 === i[2].length;
- break;
- case m.NESTED_BLOCK:
- e(i[2]),
- s = 0 === i[2].length;
- break;
- case m.AT_RULE:
- s = 0 === i[1].length;
- break;
- case m.AT_RULE_BLOCK:
- s = 0 === i[2].length
- }
- s && (t.splice(n, 1), n--, r--)
- }
- }(e),
- e
- }
- t.exports = g
- },
- {
- '../../options/optimization-level': 103,
- '../../tokenizer/token': 122,
- './merge-adjacent': 63,
- './merge-media-queries': 64,
- './merge-non-adjacent-by-body': 65,
- './merge-non-adjacent-by-selector': 66,
- './properties/optimize': 74,
- './reduce-non-adjacent': 80,
- './remove-duplicate-font-at-rules': 81,
- './remove-duplicate-media-queries': 82,
- './remove-duplicates': 83,
- './remove-unused-at-rules': 84,
- './restructure': 88
- }
- ],
- 68: [
- function (e, t, n) {
- var r = e('../../../tokenizer/marker');
- t.exports = function (e, t, n) {
- var i,
- s,
- o,
- a = t.value.length,
- u = n.value.length,
- l = Math.max(a, u),
- c = Math.min(a, u) - 1;
- for (o = 0; o < l; o++) if (i = t.value[o] && t.value[o][1] || i, s = n.value[o] && n.value[o][1] || s, i != r.COMMA && s != r.COMMA && !e(i, s, o, o <= c)) return !1;
- return !0
- }
- },
- {
- '../../../tokenizer/marker': 121
- }
- ],
- 69: [
- function (e, t, n) {
- var r = e('../compactable');
- function i(e, t) {
- return e.components.filter(t) [0]
- }
- t.exports = function (e, t) {
- var n,
- s = (n = t, function (e) {
- return n.name === e.name
- });
- return i(e, s) || function (e, t) {
- var n,
- s,
- o,
- a;
- if (r[e.name].shorthandComponents) for (o = 0, a = e.components.length; o < a; o++) if (n = e.components[o], s = i(n, t)) return s
- }(e, s)
- }
- },
- {
- '../compactable': 59
- }
- ],
- 70: [
- function (e, t, n) {
- t.exports = function (e) {
- for (var t = e.value.length - 1; t >= 0; t--) if ('inherit' == e.value[t][1]) return !0;
- return !1
- }
- },
- {
- }
- ],
- 71: [
- function (e, t, n) {
- var r = e('../compactable');
- function i(e, t) {
- var n = r[e.name];
- return 'components' in n && n.components.indexOf(t.name) > - 1
- }
- t.exports = function (e, t, n) {
- return i(e, t) || !n && !!r[e.name].shorthandComponents && function (e, t) {
- return e.components.some(function (e) {
- return i(e, t)
- })
- }(e, t)
- }
- },
- {
- '../compactable': 59
- }
- ],
- 72: [
- function (e, t, n) {
- var r = e('../../../tokenizer/marker');
- t.exports = function (e) {
- return 'font' != e.name || - 1 == e.value[0][1].indexOf(r.INTERNAL)
- }
- },
- {
- '../../../tokenizer/marker': 121
- }
- ],
- 73: [
- function (e, t, n) {
- var r = e('./every-values-pair'),
- i = e('./has-inherit'),
- s = e('./populate-components'),
- o = e('../compactable'),
- a = e('../clone').deep,
- u = e('../restore-with-components'),
- l = e('../../restore-from-optimizing'),
- c = e('../../wrap-for-optimizing').single,
- p = e('../../../writer/one-time').body,
- h = e('../../../tokenizer/token');
- function f(e, t, n, r) {
- var i,
- s,
- a,
- u = e[t];
- for (i in n) void 0 !== u && i == u.name || (s = o[i], a = n[i], u && d(n, i, u) ? delete n[i] : s.components.length > Object.keys(a).length || m(a) || g(a, i, r) && y(a) && (v(a) ? b(e, a, i, r) : C(e, a, i, r)))
- }
- function d(e, t, n) {
- var r,
- i = o[t],
- s = o[n.name];
- if ('overridesShorthands' in i && i.overridesShorthands.indexOf(n.name) > - 1) return !0;
- if (s && 'componentOf' in s) for (r in e[t]) if (s.componentOf.indexOf(r) > - 1) return !0;
- return !1
- }
- function m(e) {
- var t,
- n;
- for (n in e) {
- if (void 0 !== t && e[n].important != t) return !0;
- t = e[n].important
- }
- return !1
- }
- function g(e, t, n) {
- var i,
- a,
- u,
- l,
- p = o[t],
- f = [
- h.PROPERTY,
- [
- h.PROPERTY_NAME,
- t
- ],
- [
- h.PROPERTY_VALUE,
- p.defaultValue
- ]
- ],
- d = c(f);
- for (s([d], n, [
- ]), u = 0, l = p.components.length; u < l; u++) if (i = e[p.components[u]], a = o[i.name].canOverride, !r(a.bind(null, n), d.components[u], i)) return !1;
- return !0
- }
- function y(e) {
- var t,
- n,
- r,
- i,
- s = null;
- for (n in e) if (r = e[n], 'restore' in (i = o[n])) {
- if (l([r.all[r.position]], u), t = i.restore(r, o).length, null !== s && t !== s) return !1;
- s = t
- }
- return !0
- }
- function v(e) {
- var t,
- n,
- r = null;
- for (t in e) {
- if (n = i(e[t]), null !== r && r !== n) return !0;
- r = n
- }
- return !1
- }
- function b(e, t, n, r) {
- var f,
- d,
- m,
- g,
- y = function (e, t, n) {
- var r,
- p,
- f,
- d,
- m,
- g,
- y = [
- ],
- v = {
- },
- b = {
- },
- E = o[t],
- _ = [
- h.PROPERTY,
- [
- h.PROPERTY_NAME,
- t
- ],
- [
- h.PROPERTY_VALUE,
- E.defaultValue
- ]
- ],
- C = c(_);
- for (s([C], n, [
- ]), m = 0, g = E.components.length; m < g; m++) r = e[E.components[m]],
- i(r) ? (p = r.all[r.position].slice(0, 2), Array.prototype.push.apply(p, r.value), y.push(p), (f = a(r)).value = x(e, f.name), C.components[m] = f, v[r.name] = a(r)) : ((f = a(r)).all = r.all, C.components[m] = f, b[r.name] = r);
- return d = A(b, 1),
- _[1].push(d),
- l([C], u),
- _ = _.slice(0, 2),
- Array.prototype.push.apply(_, C.value),
- y.unshift(_),
- [
- y,
- C,
- v
- ]
- }(t, n, r),
- v = function (e, t, n) {
- var r,
- u,
- l,
- p,
- f,
- d,
- m = [
- ],
- g = {
- },
- y = {
- },
- v = o[t],
- b = [
- h.PROPERTY,
- [
- h.PROPERTY_NAME,
- t
- ],
- [
- h.PROPERTY_VALUE,
- 'inherit'
- ]
- ],
- x = c(b);
- for (s([x], n, [
- ]), f = 0, d = v.components.length; f < d; f++) r = e[v.components[f]],
- i(r) ? g[r.name] = r : (u = r.all[r.position].slice(0, 2), Array.prototype.push.apply(u, r.value), m.push(u), y[r.name] = a(r));
- return l = A(g, 1),
- b[1].push(l),
- p = A(g, 2),
- b[2].push(p),
- m.unshift(b),
- [
- m,
- x,
- y
- ]
- }(t, n, r),
- b = y[0],
- E = v[0],
- C = p(b).length < p(E).length,
- w = C ? b : E,
- D = C ? y[1] : v[1],
- k = C ? y[2] : v[2],
- S = t[Object.keys(t) [0]].all;
- for (f in D.position = S.length, D.shorthand = !0, D.dirty = !0, D.all = S, D.all.push(w[0]), e.push(D), t) (d = t[f]).unused = !0,
- d.name in k && (m = k[d.name], g = _(w, f), m.position = S.length, m.all = S, m.all.push(g), e.push(m))
- }
- function x(e, t) {
- var n = o[t];
- return 'oppositeTo' in n ? e[n.oppositeTo].value : [
- [h.PROPERTY_VALUE,
- n.defaultValue]
- ]
- }
- function A(e, t) {
- var n,
- r,
- i,
- s,
- o = [
- ];
- for (s in e) i = (r = (n = e[s]).all[n.position]) [t][r[t].length - 1],
- Array.prototype.push.apply(o, i);
- return o.sort(E)
- }
- function E(e, t) {
- var n = e[0],
- r = t[0],
- i = e[1],
- s = t[1];
- return n < r ? - 1 : n === r && i < s ? - 1 : 1
- }
- function _(e, t) {
- var n,
- r;
- for (n = 0, r = e.length; n < r; n++) if (e[n][1][1] == t) return e[n]
- }
- function C(e, t, n, r) {
- var i,
- u,
- l,
- p = o[n],
- f = [
- h.PROPERTY,
- [
- h.PROPERTY_NAME,
- n
- ],
- [
- h.PROPERTY_VALUE,
- p.defaultValue
- ]
- ],
- d = c(f);
- d.shorthand = !0,
- d.dirty = !0,
- s([d], r, [
- ]);
- for (var m = 0, g = p.components.length; m < g; m++) {
- var y = t[p.components[m]];
- d.components[m] = a(y),
- d.important = y.important,
- l = y.all
- }
- for (var v in t) t[v].unused = !0;
- i = A(t, 1),
- f[1].push(i),
- u = A(t, 2),
- f[2].push(u),
- d.position = l.length,
- d.all = l,
- d.all.push(f),
- e.push(d)
- }
- t.exports = function (e, t) {
- var n,
- r,
- i,
- s,
- a,
- u,
- l,
- c = {
- };
- if (!(e.length < 3)) {
- for (s = 0, a = e.length; s < a; s++) if (i = e[s], n = o[i.name], !i.unused && !i.hack && !i.block && (f(e, s, c, t), n && n.componentOf)) for (u = 0, l = n.componentOf.length; u < l; u++) c[r = n.componentOf[u]] = c[r] || {
- },
- c[r][i.name] = i;
- f(e, s, c, t)
- }
- }
- },
- {
- '../../../tokenizer/token': 122,
- '../../../writer/one-time': 136,
- '../../restore-from-optimizing': 94,
- '../../wrap-for-optimizing': 96,
- '../clone': 58,
- '../compactable': 59,
- '../restore-with-components': 86,
- './every-values-pair': 68,
- './has-inherit': 70,
- './populate-components': 77
- }
- ],
- 74: [
- function (e, t, n) {
- var r = e('./merge-into-shorthands'),
- i = e('./override-properties'),
- s = e('./populate-components'),
- o = e('../restore-with-components'),
- a = e('../../wrap-for-optimizing').all,
- u = e('../../remove-unused'),
- l = e('../../restore-from-optimizing'),
- c = e('../../../options/optimization-level').OptimizationLevel;
- t.exports = function e(t, n, p, h) {
- var f,
- d,
- m,
- g = h.options.level[c.Two],
- y = a(t, !1, g.skipProperties);
- for (s(y, h.validator, h.warnings), d = 0, m = y.length; d < m; d++) (f = y[d]).block && e(f.value[0][1], n, p, h);
- p && g.mergeIntoShorthands && r(y, h.validator),
- n && g.overrideProperties && i(y, p, h.options.compatibility, h.validator),
- l(y, o),
- u(y)
- }
- },
- {
- '../../../options/optimization-level': 103,
- '../../remove-unused': 93,
- '../../restore-from-optimizing': 94,
- '../../wrap-for-optimizing': 96,
- '../restore-with-components': 86,
- './merge-into-shorthands': 73,
- './override-properties': 75,
- './populate-components': 77
- }
- ],
- 75: [
- function (e, t, n) {
- var r = e('./has-inherit'),
- i = e('./every-values-pair'),
- s = e('./find-component-in'),
- o = e('./is-component-of'),
- a = e('./is-mergeable-shorthand'),
- u = e('./overrides-non-component-shorthand'),
- l = e('./vendor-prefixes').same,
- c = e('../compactable'),
- p = e('../clone').deep,
- h = e('../restore-with-components'),
- f = e('../clone').shallow,
- d = e('../../restore-from-optimizing'),
- m = e('../../../tokenizer/token'),
- g = e('../../../tokenizer/marker'),
- y = e('../../../writer/one-time').property;
- function v(e, t) {
- for (var n = 0; n < e.components.length; n++) {
- var r = e.components[n],
- s = c[r.name],
- o = s && s.canOverride || o.sameValue,
- a = f(r);
- if (a.value = [
- [m.PROPERTY_VALUE,
- s.defaultValue]
- ], !i(o.bind(null, t), a, r)) return !0
- }
- return !1
- }
- function b(e, t) {
- t.unused = !0,
- _(t, w(e)),
- e.value = t.value
- }
- function x(e, t) {
- t.unused = !0,
- e.multiplex = !0,
- e.value = t.value
- }
- function A(e, t) {
- t.multiplex ? x(e, t) : e.multiplex ? b(e, t) : function (e, t) {
- t.unused = !0,
- e.value = t.value
- }(e, t)
- }
- function E(e, t) {
- t.unused = !0;
- for (var n = 0, r = e.components.length; n < r; n++) A(e.components[n], t.components[n], e.multiplex)
- }
- function _(e, t) {
- e.multiplex = !0,
- c[e.name].shorthand ? function (e, t) {
- var n,
- r,
- i;
- for (r = 0, i = e.components.length; r < i; r++) (n = e.components[r]).multiplex || C(n, t)
- }(e, t) : C(e, t)
- }
- function C(e, t) {
- for (var n, r = c[e.name], i = 'real' == r.intoMultiplexMode, s = 'real' == r.intoMultiplexMode ? e.value.slice(0) : 'placeholder' == r.intoMultiplexMode ? r.placeholderValue : r.defaultValue, o = w(e), a = s.length; o < t; o++) if (e.value.push([m.PROPERTY_VALUE,
- g.COMMA]), Array.isArray(s)) for (n = 0; n < a; n++) e.value.push(i ? s[n] : [
- m.PROPERTY_VALUE,
- s[n]
- ]);
- else e.value.push(i ? s : [
- m.PROPERTY_VALUE,
- s
- ])
- }
- function w(e) {
- for (var t = 0, n = 0, r = e.value.length; n < r; n++) e.value[n][1] == g.COMMA && t++;
- return t + 1
- }
- function D(e) {
- var t = [
- m.PROPERTY,
- [
- m.PROPERTY_NAME,
- e.name
- ]
- ].concat(e.value);
- return y([t], 0).length
- }
- function k(e, t, n) {
- for (var r = 0, i = t; i >= 0 && (e[i].name != n || e[i].unused || r++, !(r > 1)); i--);
- return r > 1
- }
- function S(e, t) {
- for (var n = 0, r = e.components.length; n < r; n++) if (!T(t.isUrl, e.components[n]) && T(t.isFunction, e.components[n])) return !0;
- return !1
- }
- function T(e, t) {
- for (var n = 0, r = t.value.length; n < r; n++) if (t.value[n][1] != g.COMMA && e(t.value[n][1])) return !0;
- return !1
- }
- function F(e, t) {
- if (!e.multiplex && !t.multiplex || e.multiplex && t.multiplex) return !1;
- var n,
- r = e.multiplex ? e : t,
- i = e.multiplex ? t : e,
- o = p(r);
- d([o], h);
- var a = p(i);
- d([a], h);
- var u = D(o) + 1 + D(a);
- return e.multiplex ? b(n = s(o, a), a) : (n = s(a, o), _(a, w(o)), x(n, o)),
- d([a], h),
- u <= D(a)
- }
- function O(e) {
- return e.name in c
- }
- function B(e, t) {
- return !e.multiplex && ('background' == e.name || 'background-image' == e.name) && t.multiplex && ('background' == t.name || 'background-image' == t.name) && function (e) {
- for (var t = function (e) {
- for (var t = [
- ], n = 0, r = [
- ], i = e.length; n < i; n++) {
- var s = e[n];
- s[1] == g.COMMA ? (t.push(r), r = [
- ]) : r.push(s)
- }
- return t.push(r),
- t
- }(e), n = 0, r = t.length; n < r; n++) if (1 == t[n].length && 'none' == t[n][0][1]) return !0;
- return !1
- }(t.value)
- }
- t.exports = function (e, t, n, p) {
- var h,
- f,
- d,
- m,
- g,
- y,
- b,
- x,
- C,
- D,
- P;
- e: for (C = e.length - 1; C >= 0; C--) if (O(f = e[C]) && !f.block) {
- h = c[f.name].canOverride;
- t: for (D = C - 1; D >= 0; D--) if (O(d = e[D]) && !d.block && !d.unused && !f.unused && (!d.hack || f.hack || f.important) && (d.hack || d.important || !f.hack) && (d.important != f.important || d.hack[0] == f.hack[0]) && !(d.important == f.important && (d.hack[0] != f.hack[0] || d.hack[1] && d.hack[1] != f.hack[1]) || r(f) || B(d, f))) if (f.shorthand && o(f, d)) {
- if (!f.important && d.important) continue;
- if (!l([d], f.components)) continue;
- if (!T(p.isFunction, d) && S(f, p)) continue;
- if (!a(f)) {
- d.unused = !0;
- continue
- }
- m = s(f, d),
- h = c[d.name].canOverride,
- i(h.bind(null, p), d, m) && (d.unused = !0)
- } else if (f.shorthand && u(f, d)) {
- if (!f.important && d.important) continue;
- if (!l([d], f.components)) continue;
- if (!T(p.isFunction, d) && S(f, p)) continue;
- for (P = (g = d.shorthand ? d.components : [
- d
- ]).length - 1; P >= 0; P--) if (y = g[P], b = s(f, y), h = c[y.name].canOverride, !i(h.bind(null, p), d, b)) continue t;
- d.unused = !0
- } else if (t && d.shorthand && !f.shorthand && o(d, f, !0)) {
- if (f.important && !d.important) continue;
- if (!f.important && d.important) {
- f.unused = !0;
- continue
- }
- if (k(e, C - 1, d.name)) continue;
- if (S(d, p)) continue;
- if (!a(d)) continue;
- if (m = s(d, f), i(h.bind(null, p), m, f)) {
- var N = !n.properties.backgroundClipMerging && m.name.indexOf('background-clip') > - 1 || !n.properties.backgroundOriginMerging && m.name.indexOf('background-origin') > - 1 || !n.properties.backgroundSizeMerging && m.name.indexOf('background-size') > - 1,
- R = c[f.name].nonMergeableValue === f.value[0][1];
- if (N || R) continue;
- if (!n.properties.merging && v(d, p)) continue;
- if (m.value[0][1] != f.value[0][1] && (r(d) || r(f))) continue;
- if (F(d, f)) continue;
- !d.multiplex && f.multiplex && _(d, w(f)),
- A(m, f),
- d.dirty = !0
- }
- } else if (t && d.shorthand && f.shorthand && d.name == f.name) {
- if (!d.multiplex && f.multiplex) continue;
- if (!f.important && d.important) {
- f.unused = !0;
- continue e
- }
- if (f.important && !d.important) {
- d.unused = !0;
- continue
- }
- if (!a(f)) {
- d.unused = !0;
- continue
- }
- for (P = d.components.length - 1; P >= 0; P--) {
- var L = d.components[P],
- I = f.components[P];
- if (h = c[L.name].canOverride, !i(h.bind(null, p), L, I)) continue e
- }
- E(d, f),
- d.dirty = !0
- } else if (t && d.shorthand && f.shorthand && o(d, f)) {
- if (!d.important && f.important) continue;
- if (m = s(d, f), h = c[f.name].canOverride, !i(h.bind(null, p), m, f)) continue;
- if (d.important && !f.important) {
- f.unused = !0;
- continue
- }
- if (c[f.name].restore(f, c).length > 1) continue;
- A(m = s(d, f), f),
- f.dirty = !0
- } else if (d.name == f.name) {
- if (x = !0, f.shorthand) for (P = f.components.length - 1; P >= 0 && x; P--) y = d.components[P],
- b = f.components[P],
- h = c[b.name].canOverride,
- x = x && i(h.bind(null, p), y, b);
- else h = c[f.name].canOverride,
- x = i(h.bind(null, p), d, f);
- if (d.important && !f.important && x) {
- f.unused = !0;
- continue
- }
- if (!d.important && f.important && x) {
- d.unused = !0;
- continue
- }
- if (!x) continue;
- d.unused = !0
- }
- }
- }
- },
- {
- '../../../tokenizer/marker': 121,
- '../../../tokenizer/token': 122,
- '../../../writer/one-time': 136,
- '../../restore-from-optimizing': 94,
- '../clone': 58,
- '../compactable': 59,
- '../restore-with-components': 86,
- './every-values-pair': 68,
- './find-component-in': 69,
- './has-inherit': 70,
- './is-component-of': 71,
- './is-mergeable-shorthand': 72,
- './overrides-non-component-shorthand': 76,
- './vendor-prefixes': 79
- }
- ],
- 76: [
- function (e, t, n) {
- var r = e('../compactable');
- t.exports = function (e, t) {
- return e.name in r && 'overridesShorthands' in r[e.name] && r[e.name].overridesShorthands.indexOf(t.name) > - 1
- }
- },
- {
- '../compactable': 59
- }
- ],
- 77: [
- function (e, t, n) {
- var r = e('../compactable'),
- i = e('../invalid-property-error');
- t.exports = function (e, t, n) {
- for (var s, o, a, u = e.length - 1; u >= 0; u--) {
- var l = e[u],
- c = r[l.name];
- if (c && c.shorthand) {
- l.shorthand = !0,
- l.dirty = !0;
- try {
- if (l.components = c.breakUp(l, r, t), c.shorthandComponents) for (o = 0, a = l.components.length; o < a; o++) (s = l.components[o]).components = r[s.name].breakUp(s, r, t)
- } catch (e) {
- if (!(e instanceof i)) throw e;
- l.components = [
- ],
- n.push(e.message)
- }
- l.components.length > 0 ? l.multiplex = l.components[0].multiplex : l.unused = !0
- }
- }
- }
- },
- {
- '../compactable': 59,
- '../invalid-property-error': 61
- }
- ],
- 78: [
- function (e, t, n) {
- var r = e('./vendor-prefixes').same;
- t.exports = function (e, t, n, i, s) {
- return !(!r(t, n) || s && e.isVariable(t) !== e.isVariable(n))
- }
- },
- {
- './vendor-prefixes': 79
- }
- ],
- 79: [
- function (e, t, n) {
- var r = /(?:^|\W)(\-\w+\-)/g;
- function i(e) {
- for (var t, n = [
- ]; null !== (t = r.exec(e)); ) - 1 == n.indexOf(t[0]) && n.push(t[0]);
- return n
- }
- t.exports = {
- unique: i,
- same: function (e, t) {
- return i(e).sort().join(',') == i(t).sort().join(',')
- }
- }
- },
- {
- }
- ],
- 80: [
- function (e, t, n) {
- var r = e('./is-mergeable'),
- i = e('./properties/optimize'),
- s = e('../../utils/clone-array'),
- o = e('../../tokenizer/token'),
- a = e('../../writer/one-time').body,
- u = e('../../writer/one-time').rules;
- function l(e) {
- for (var t = [
- ], n = 0; n < e.length; n++) t.push([e[n][1]]);
- return t
- }
- function c(e, t, n, r, o) {
- for (var a = [
- ], u = [
- ], l = [
- ], c = t.length - 1; c >= 0; c--) if (!n.filterOut(c, a)) {
- var p = t[c].where,
- h = e[p],
- f = s(h[2]);
- a = a.concat(f),
- u.push(f),
- l.push(p)
- }
- i(a, !0, !1, o);
- for (var d = l.length, m = a.length - 1, g = d - 1; g >= 0; ) if ((0 === g || a[m] && u[g].indexOf(a[m]) > - 1) && m > - 1) m--;
- else {
- var y = a.splice(m + 1);
- n.callback(e[l[g]], y, d, g),
- g--
- }
- }
- t.exports = function (e, t) {
- for (var n = t.options, i = n.compatibility.selectors.mergeablePseudoClasses, s = n.compatibility.selectors.mergeablePseudoElements, p = n.compatibility.selectors.multiplePseudoMerging, h = {
- }, f = [
- ], d = e.length - 1; d >= 0; d--) {
- var m = e[d];
- if (m[0] == o.RULE && 0 !== m[2].length) for (var g = u(m[1]), y = m[1].length > 1 && r(g, i, s, p), v = l(m[1]), b = y ? [
- g
- ].concat(v) : [
- g
- ], x = 0, A = b.length; x < A; x++) {
- var E = b[x];
- h[E] ? f.push(E) : h[E] = [
- ],
- h[E].push({
- where: d,
- list: v,
- isPartial: y && x > 0,
- isComplex: y && 0 === x
- })
- }
- }
- !function (e, t, n, r, i) {
- function s(e, t) {
- return p[e].isPartial && 0 === t.length
- }
- function o(e, t, n, r) {
- p[n - r - 1].isPartial || (e[2] = t)
- }
- for (var a = 0, u = t.length; a < u; a++) {
- var l = t[a],
- p = n[l];
- c(e, p, {
- filterOut: s,
- callback: o
- }, 0, i)
- }
- }(e, f, h, 0, t),
- function (e, t, n, i) {
- var s = n.compatibility.selectors.mergeablePseudoClasses,
- o = n.compatibility.selectors.mergeablePseudoElements,
- u = n.compatibility.selectors.multiplePseudoMerging,
- l = {
- };
- function p(e) {
- return l.data[e].where < l.intoPosition
- }
- function h(e, t, n, r) {
- 0 === r && l.reducedBodies.push(t)
- }
- e: for (var f in t) {
- var d = t[f];
- if (d[0].isComplex) {
- var m = d[d.length - 1].where,
- g = e[m],
- y = [
- ],
- v = r(f, s, o, u) ? d[0].list : [
- f
- ];
- l.intoPosition = m,
- l.reducedBodies = y;
- for (var b = 0, x = v.length; b < x; b++) {
- var A = v[b],
- E = t[A];
- if (E.length < 2) continue e;
- if (l.data = E, c(e, E, {
- filterOut: p,
- callback: h
- }, 0, i), a(y[y.length - 1]) != a(y[0])) continue e
- }
- g[2] = y[0]
- }
- }
- }(e, h, n, t)
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../utils/clone-array': 124,
- '../../writer/one-time': 136,
- './is-mergeable': 62,
- './properties/optimize': 74
- }
- ],
- 81: [
- function (e, t, n) {
- var r = e('../../tokenizer/token'),
- i = e('../../writer/one-time').all,
- s = '@font-face';
- t.exports = function (e) {
- var t,
- n,
- o,
- a,
- u = [
- ];
- for (o = 0, a = e.length; o < a; o++) (t = e[o]) [0] != r.AT_RULE_BLOCK && t[1][0][1] != s || (n = i([t]), u.indexOf(n) > - 1 ? t[2] = [
- ] : u.push(n))
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136
- }
- ],
- 82: [
- function (e, t, n) {
- var r = e('../../tokenizer/token'),
- i = e('../../writer/one-time').all,
- s = e('../../writer/one-time').rules;
- t.exports = function (e) {
- var t,
- n,
- o,
- a,
- u,
- l = {
- };
- for (a = 0, u = e.length; a < u; a++) (n = e[a]) [0] == r.NESTED_BLOCK && ((t = l[o = s(n[1]) + '%' + i(n[2])]) && (t[2] = [
- ]), l[o] = n)
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136
- }
- ],
- 83: [
- function (e, t, n) {
- var r = e('../../tokenizer/token'),
- i = e('../../writer/one-time').body,
- s = e('../../writer/one-time').rules;
- t.exports = function (e) {
- for (var t, n, o, a, u = {
- }, l = [
- ], c = 0, p = e.length; c < p; c++) (n = e[c]) [0] == r.RULE && (u[t = s(n[1])] && 1 == u[t].length ? l.push(t) : u[t] = u[t] || [
- ], u[t].push(c));
- for (c = 0, p = l.length; c < p; c++) {
- a = [
- ];
- for (var h = u[t = l[c]].length - 1; h >= 0; h--) n = e[u[t][h]],
- o = i(n[2]),
- a.indexOf(o) > - 1 ? n[2] = [
- ] : a.push(o)
- }
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../writer/one-time': 136
- }
- ],
- 84: [
- function (e, t, n) {
- var r = e('./properties/populate-components'),
- i = e('../wrap-for-optimizing').single,
- s = e('../restore-from-optimizing'),
- o = e('../../tokenizer/token'),
- a = /^(\-moz\-|\-o\-|\-webkit\-)?animation-name$/,
- u = /^(\-moz\-|\-o\-|\-webkit\-)?animation$/,
- l = /^@(\-moz\-|\-o\-|\-webkit\-)?keyframes /,
- c = /\s{0,31}!important$/,
- p = /^(['"]?)(.*)\1$/;
- function h(e) {
- return e.replace(p, '$2').replace(c, '')
- }
- function f(e, t, n, r) {
- var i,
- s,
- a,
- u,
- l,
- c = {
- };
- for (u = 0, l = e.length; u < l; u++) t(e[u], c);
- if (0 !== Object.keys(c).length) for (i in function e(t, n, r, i) {
- var s = n(r);
- var a,
- u;
- for (a = 0, u = t.length; a < u; a++) switch (t[a][0]) {
- case o.RULE:
- s(t[a], i);
- break;
- case o.NESTED_BLOCK:
- e(t[a][2], n, r, i)
- }
- }(e, n, c, r), c) for (u = 0, l = (s = c[i]).length; u < l; u++) (a = s[u]) [a[0] == o.AT_RULE ? 1 : 2] = [
- ]
- }
- function d(e, t) {
- var n;
- e[0] == o.AT_RULE_BLOCK && 0 === e[1][0][1].indexOf('@counter-style') && (t[n = e[1][0][1].split(' ') [1]] = t[n] || [
- ], t[n].push(e))
- }
- function m(e) {
- return function (t, n) {
- var o,
- a,
- u,
- l;
- for (u = 0, l = t[2].length; u < l; u++) 'list-style' == (o = t[2][u]) [1][1] && (a = i(o), r([a], n.validator, n.warnings), a.components[0].value[0][1] in e && delete e[o[2][1]], s([a])),
- 'list-style-type' == o[1][1] && o[2][1] in e && delete e[o[2][1]]
- }
- }
- function g(e, t) {
- var n,
- r,
- i,
- s;
- if (e[0] == o.AT_RULE_BLOCK && '@font-face' == e[1][0][1]) for (i = 0, s = e[2].length; i < s; i++) if ('font-family' == (n = e[2][i]) [1][1]) {
- t[r = h(n[2][1].toLowerCase())] = t[r] || [
- ],
- t[r].push(e);
- break
- }
- }
- function y(e) {
- return function (t, n) {
- var o,
- a,
- u,
- l,
- c,
- p,
- f,
- d;
- for (c = 0, p = t[2].length; c < p; c++) {
- if ('font' == (o = t[2][c]) [1][1]) {
- for (a = i(o), r([a], n.validator, n.warnings), f = 0, d = (u = a.components[6]).value.length; f < d; f++) (l = h(u.value[f][1].toLowerCase())) in e && delete e[l];
- s([a])
- }
- if ('font-family' == o[1][1]) for (f = 2, d = o.length; f < d; f++) (l = h(o[f][1].toLowerCase())) in e && delete e[l]
- }
- }
- }
- function v(e, t) {
- var n;
- e[0] == o.NESTED_BLOCK && l.test(e[1][0][1]) && (t[n = e[1][0][1].split(' ') [1]] = t[n] || [
- ], t[n].push(e))
- }
- function b(e) {
- return function (t, n) {
- var o,
- l,
- c,
- p,
- h,
- f,
- d;
- for (p = 0, h = t[2].length; p < h; p++) {
- if (o = t[2][p], u.test(o[1][1])) {
- for (l = i(o), r([l], n.validator, n.warnings), f = 0, d = (c = l.components[7]).value.length; f < d; f++) c.value[f][1] in e && delete e[c.value[f][1]];
- s([l])
- }
- if (a.test(o[1][1])) for (f = 2, d = o.length; f < d; f++) o[f][1] in e && delete e[o[f][1]]
- }
- }
- }
- function x(e, t) {
- var n;
- e[0] == o.AT_RULE && 0 === e[1].indexOf('@namespace') && (t[n = e[1].split(' ') [1]] = t[n] || [
- ], t[n].push(e))
- }
- function A(e) {
- var t = new RegExp(Object.keys(e).join('\\||') + '\\|', 'g');
- return function (n) {
- var r,
- i,
- s,
- o,
- a,
- u;
- for (s = 0, o = n[1].length; s < o; s++) for (a = 0, u = (r = n[1][s][1].match(t)).length; a < u; a++) (i = r[a].substring(0, r[a].length - 1)) in e && delete e[i]
- }
- }
- t.exports = function (e, t) {
- f(e, d, m, t),
- f(e, g, y, t),
- f(e, v, b, t),
- f(e, x, A, t)
- }
- },
- {
- '../../tokenizer/token': 122,
- '../restore-from-optimizing': 94,
- '../wrap-for-optimizing': 96,
- './properties/populate-components': 77
- }
- ],
- 85: [
- function (e, t, n) {
- var r = e('./rules-overlap'),
- i = e('./specificities-overlap'),
- s = /align\-items|box\-align|box\-pack|flex|justify/,
- o = /^border\-(top|right|bottom|left|color|style|width|radius)/;
- function a(e, t, n) {
- var a,
- d,
- m = e[0],
- g = e[1],
- y = e[2],
- v = e[5],
- b = e[6],
- x = t[0],
- A = t[1],
- E = t[2],
- _ = t[5],
- C = t[6];
- return !('font' == m && 'line-height' == x || 'font' == x && 'line-height' == m) && ((!s.test(m) || !s.test(x)) && (!(y == E && l(m) == l(x) && u(m) ^ u(x)) && (('border' != y || !o.test(E) || !('border' == m || m == E || g != A && c(m, x))) && (('border' != E || !o.test(y) || !('border' == x || x == y || g != A && c(m, x))) && (('border' != y || 'border' != E || m == x || !(p(m) && h(x) || h(m) && p(x))) && (y != E || (!(m != x || y != E || g != A && (a = g, d = A, !u(a) || !u(d) || a.split('-') [1] == d.split('-') [2])) || (m != x && y == E && m != y && x != E || (m != x && y == E && g == A || (!(!C || !b || f(y) || f(E) || r(_, v, !1)) || !i(v, _, n)))))))))))
- }
- function u(e) {
- return /^\-(?:moz|webkit|ms|o)\-/.test(e)
- }
- function l(e) {
- return e.replace(/^\-(?:moz|webkit|ms|o)\-/, '')
- }
- function c(e, t) {
- return e.split('-').pop() == t.split('-').pop()
- }
- function p(e) {
- return 'border-top' == e || 'border-right' == e || 'border-bottom' == e || 'border-left' == e
- }
- function h(e) {
- return 'border-color' == e || 'border-style' == e || 'border-width' == e
- }
- function f(e) {
- return 'font' == e || 'line-height' == e || 'list-style' == e
- }
- t.exports = {
- canReorder: function (e, t, n) {
- for (var r = t.length - 1; r >= 0; r--) for (var i = e.length - 1; i >= 0; i--) if (!a(e[i], t[r], n)) return !1;
- return !0
- },
- canReorderSingle: a
- }
- },
- {
- './rules-overlap': 89,
- './specificities-overlap': 90
- }
- ],
- 86: [
- function (e, t, n) {
- var r = e('./compactable');
- t.exports = function (e) {
- var t = r[e.name];
- return t && t.shorthand ? t.restore(e, r) : e.value
- }
- },
- {
- './compactable': 59
- }
- ],
- 87: [
- function (e, t, n) {
- var r = e('./clone').shallow,
- i = e('../../tokenizer/token'),
- s = e('../../tokenizer/marker');
- function o(e) {
- for (var t = 0, n = e.length; t < n; t++) {
- var r = e[t][1];
- if ('inherit' != r && r != s.COMMA && r != s.FORWARD_SLASH) return !1
- }
- return !0
- }
- function a(e) {
- var t = e.components,
- n = t[0].value[0],
- r = t[1].value[0],
- i = t[2].value[0],
- s = t[3].value[0];
- return n[1] == r[1] && n[1] == i[1] && n[1] == s[1] ? [
- n
- ] : n[1] == i[1] && r[1] == s[1] ? [
- n,
- r
- ] : r[1] == s[1] ? [
- n,
- r,
- i
- ] : [
- n,
- r,
- i,
- s
- ]
- }
- function u(e, t, n) {
- var r,
- i,
- s;
- for (i = 0, s = e.length; i < s; i++) if ((r = e[i]).name == n && r.value[0][1] == t[n].defaultValue) return !0;
- return !1
- }
- t.exports = {
- background: function (e, t, n) {
- var r,
- a,
- u = e.components,
- l = [
- ];
- function c(e) {
- Array.prototype.unshift.apply(l, e.value)
- }
- function p(e) {
- var n = t[e.name];
- return n.doubleValues && 1 == n.defaultValue.length ? e.value[0][1] == n.defaultValue[0] && (!e.value[1] || e.value[1][1] == n.defaultValue[0]) : n.doubleValues && 1 != n.defaultValue.length ? e.value[0][1] == n.defaultValue[0] && (e.value[1] ? e.value[1][1] : e.value[0][1]) == n.defaultValue[1] : e.value[0][1] == n.defaultValue
- }
- for (var h = u.length - 1; h >= 0; h--) {
- var f = u[h],
- d = p(f);
- if ('background-clip' == f.name) {
- var m = u[h - 1],
- g = p(m);
- a = !(r = f.value[0][1] == m.value[0][1]) && (g && !d || !g && !d || !g && d && f.value[0][1] != m.value[0][1]),
- r ? c(m) : a && (c(f), c(m)),
- h--
- } else if ('background-size' == f.name) {
- var y = u[h - 1],
- v = p(y);
- a = !(r = !v && d) && (v && !d || !v && !d),
- r ? c(y) : a ? (c(f), l.unshift([i.PROPERTY_VALUE,
- s.FORWARD_SLASH]), c(y)) : 1 == y.value.length && c(y),
- h--
- } else {
- if (d || t[f.name].multiplexLastOnly && !n) continue;
- c(f)
- }
- }
- return 0 === l.length && 1 == e.value.length && '0' == e.value[0][1] && l.push(e.value[0]),
- 0 === l.length && l.push([i.PROPERTY_VALUE,
- t[e.name].defaultValue]),
- o(l) ? [
- l[0]
- ] : l
- },
- borderRadius: function (e, t) {
- if (e.multiplex) {
- for (var n = r(e), o = r(e), u = 0; u < 4; u++) {
- var l = e.components[u],
- c = r(e);
- c.value = [
- l.value[0]
- ],
- n.components.push(c);
- var p = r(e);
- p.value = [
- l.value[1] || l.value[0]
- ],
- o.components.push(p)
- }
- var h = a(n),
- f = a(o);
- return h.length != f.length || h[0][1] != f[0][1] || h.length > 1 && h[1][1] != f[1][1] || h.length > 2 && h[2][1] != f[2][1] || h.length > 3 && h[3][1] != f[3][1] ? h.concat([[i.PROPERTY_VALUE,
- s.FORWARD_SLASH]]).concat(f) : h
- }
- return a(e)
- },
- font: function (e, t) {
- var n,
- r = e.components,
- a = [
- ],
- u = 0,
- l = 0;
- if (0 === e.value[0][1].indexOf(s.INTERNAL)) return e.value[0][1] = e.value[0][1].substring(s.INTERNAL.length),
- e.value;
- for (; u < 4; ) (n = r[u]).value[0][1] != t[n.name].defaultValue && Array.prototype.push.apply(a, n.value),
- u++;
- for (Array.prototype.push.apply(a, r[u].value), r[++u].value[0][1] != t[r[u].name].defaultValue && (Array.prototype.push.apply(a, [
- [i.PROPERTY_VALUE,
- s.FORWARD_SLASH]
- ]), Array.prototype.push.apply(a, r[u].value)), u++; r[u].value[l]; ) a.push(r[u].value[l]),
- r[u].value[l + 1] && a.push([i.PROPERTY_VALUE,
- s.COMMA]),
- l++;
- return o(a) ? [
- a[0]
- ] : a
- },
- fourValues: a,
- multiplex: function (e) {
- return function (t, n) {
- if (!t.multiplex) return e(t, n, !0);
- var o,
- a,
- u = 0,
- l = [
- ],
- c = {
- };
- for (o = 0, a = t.components[0].value.length; o < a; o++) t.components[0].value[o][1] == s.COMMA && u++;
- for (o = 0; o <= u; o++) {
- for (var p = r(t), h = 0, f = t.components.length; h < f; h++) {
- var d = t.components[h],
- m = r(d);
- p.components.push(m);
- for (var g = c[m.name] || 0, y = d.value.length; g < y; g++) {
- if (d.value[g][1] == s.COMMA) {
- c[m.name] = g + 1;
- break
- }
- m.value.push(d.value[g])
- }
- }
- var v = e(p, n, o == u);
- Array.prototype.push.apply(l, v),
- o < u && l.push([i.PROPERTY_VALUE,
- s.COMMA])
- }
- return l
- }
- },
- withoutDefaults: function (e, t) {
- for (var n = e.components, r = [
- ], s = n.length - 1; s >= 0; s--) {
- var a = n[s],
- l = t[a.name];
- (a.value[0][1] != l.defaultValue || 'keepUnlessDefault' in l && !u(n, t, l.keepUnlessDefault)) && r.unshift(a.value[0])
- }
- return 0 === r.length && r.push([i.PROPERTY_VALUE,
- t[e.name].defaultValue]),
- o(r) ? [
- r[0]
- ] : r
- }
- }
- },
- {
- '../../tokenizer/marker': 121,
- '../../tokenizer/token': 122,
- './clone': 58
- }
- ],
- 88: [
- function (e, t, n) {
- var r = e('./reorderable').canReorderSingle,
- i = e('./extract-properties'),
- s = e('./is-mergeable'),
- o = e('./tidy-rule-duplicates'),
- a = e('../../tokenizer/token'),
- u = e('../../utils/clone-array'),
- l = e('../../writer/one-time').body,
- c = e('../../writer/one-time').rules;
- function p(e, t) {
- return e > t ? 1 : - 1
- }
- t.exports = function (e, t) {
- var n,
- h,
- f,
- d = t.options,
- m = d.compatibility.selectors.mergeablePseudoClasses,
- g = d.compatibility.selectors.mergeablePseudoElements,
- y = d.compatibility.selectors.mergeLimit,
- v = d.compatibility.selectors.multiplePseudoMerging,
- b = t.cache.specificity,
- x = {
- },
- A = [
- ],
- E = {
- },
- _ = [
- ],
- C = 2,
- w = '%';
- function D(e, t) {
- var n = function (e) {
- for (var t = [
- ], n = 0, r = e.length; n < r; n++) t.push(c(e[n][1]));
- return t.join(w)
- }(t);
- return E[n] = E[n] || [
- ],
- E[n].push([e,
- t]),
- n
- }
- function k(e) {
- var t,
- n = e.split(w),
- r = [
- ];
- for (var i in E) {
- var s = i.split(w);
- for (t = s.length - 1; t >= 0; t--) if (n.indexOf(s[t]) > - 1) {
- r.push(i);
- break
- }
- }
- for (t = r.length - 1; t >= 0; t--) delete E[r[t]]
- }
- function S(e) {
- for (var t = [
- ], n = [
- ], r = e.length - 1; r >= 0; r--) s(c(e[r][1]), m, g, v) && (n.unshift(e[r]), e[r][2].length > 0 && - 1 == t.indexOf(e[r]) && t.push(e[r]));
- return t.length > 1 ? n : [
- ]
- }
- function T(e, t) {
- var n = t[0],
- r = t[1],
- i = t[4],
- s = n.length + r.length + 1,
- a = [
- ],
- u = [
- ],
- l = S(x[i]);
- if (!(l.length < 2)) {
- var c = O(l, s, 1),
- p = c[0];
- if (p[1] > 0) return function (e, t, n) {
- for (var r = n.length - 1; r >= 0; r--) {
- var i = D(t, n[r][0]);
- if (E[i].length > 1 && N(e, E[i])) {
- k(i);
- break
- }
- }
- }(e, t, c);
- for (var h = p[0].length - 1; h >= 0; h--) a = p[0][h][1].concat(a),
- u.unshift(p[0][h]);
- B(e, [
- t
- ], a = o(a), u)
- }
- }
- function F(e, t) {
- return e[1] > t[1] ? 1 : e[1] == t[1] ? 0 : - 1
- }
- function O(e, t, n) {
- return function e(t, n, r, i) {
- var s = [
- [t,
- function (e, t, n) {
- for (var r = 0, i = e.length - 1; i >= 0; i--) r += e[i][2].length > n ? c(e[i][1]).length : - 1;
- return r - (e.length - 1) * t + 1
- }(t, n, r)]
- ];
- if (t.length > 2 && i > 0) for (var o = t.length - 1; o >= 0; o--) {
- var a = Array.prototype.slice.call(t, 0);
- a.splice(o, 1),
- s = s.concat(e(a, n, r, i - 1))
- }
- return s
- }(e, t, n, C - 1).sort(F)
- }
- function B(t, n, r, i) {
- var s,
- o,
- u,
- c,
- p = [
- ];
- for (s = i.length - 1; s >= 0; s--) {
- var h = i[s];
- for (o = h[2].length - 1; o >= 0; o--) {
- var f = h[2][o];
- for (u = 0, c = n.length; u < c; u++) {
- var d = n[u],
- m = f[1][1],
- g = d[0],
- y = d[4];
- if (m == g && l([f]) == y) {
- h[2].splice(o, 1);
- break
- }
- }
- }
- }
- for (s = n.length - 1; s >= 0; s--) p.unshift(n[s][3]);
- var v = [
- a.RULE,
- r,
- p
- ];
- e.splice(t, 0, v)
- }
- function P(e, t) {
- var n = t[4],
- r = x[n];
- r && r.length > 1 && (function (e, t) {
- var n,
- r,
- i = [
- ],
- s = [
- ],
- o = t[4],
- a = S(x[o]);
- if (!(a.length < 2)) {
- e: for (var u in x) {
- var l = x[u];
- for (n = a.length - 1; n >= 0; n--) if ( - 1 == l.indexOf(a[n])) continue e;
- i.push(u)
- }
- if (i.length < 2) return !1;
- for (n = i.length - 1; n >= 0; n--) for (r = A.length - 1; r >= 0; r--) if (A[r][4] == i[n]) {
- s.unshift([A[r],
- a]);
- break
- }
- return N(e, s)
- }
- }(e, t) || T(e, t))
- }
- function N(e, t) {
- for (var n, r = 0, i = [
- ], s = t.length - 1; s >= 0; s--) r += (n = t[s][0]) [4].length + (s > 0 ? 1 : 0),
- i.push(n);
- var a = O(t[0][1], r, i.length) [0];
- if (a[1] > 0) return !1;
- var u = [
- ],
- l = [
- ];
- for (s = a[0].length - 1; s >= 0; s--) u = a[0][s][1].concat(u),
- l.unshift(a[0][s]);
- for (B(e, i, u = o(u), l), s = i.length - 1; s >= 0; s--) {
- n = i[s];
- var c = A.indexOf(n);
- delete x[n[4]],
- c > - 1 && - 1 == _.indexOf(c) && _.push(c)
- }
- return !0
- }
- function R(e, t, n) {
- if (e[0] != t[0]) return !1;
- var r = t[4],
- i = x[r];
- return i && i.indexOf(n) > - 1
- }
- for (var L = e.length - 1; L >= 0; L--) {
- var I,
- j,
- M,
- U,
- V,
- z = e[L];
- if (z[0] == a.RULE) I = !0;
- else {
- if (z[0] != a.NESTED_BLOCK) continue;
- I = !1
- }
- var q = A.length,
- K = i(z);
- _ = [
- ];
- var $ = [
- ];
- for (j = K.length - 1; j >= 0; j--) for (M = j - 1; M >= 0; M--) if (!r(K[j], K[M], b)) {
- $.push(j);
- break
- }
- for (j = K.length - 1; j >= 0; j--) {
- var Y = K[j],
- W = !1;
- for (M = 0; M < q; M++) {
- var G = A[M];
- - 1 == _.indexOf(M) && (!r(Y, G, b) && !R(Y, G, z) || x[G[4]] && x[G[4]].length === y) && (P(L + 1, G), - 1 == _.indexOf(M) && (_.push(M), delete x[G[4]])),
- W || (W = Y[0] == G[0] && Y[1] == G[1]) && (V = M)
- }
- if (I && !($.indexOf(j) > - 1)) {
- var H = Y[4];
- W && A[V][5].length + Y[5].length > y ? (P(L + 1, A[V]), A.splice(V, 1), x[H] = [
- z
- ], W = !1) : (x[H] = x[H] || [
- ], x[H].push(z)),
- W ? A[V] = (n = A[V], h = Y, f = void 0, (f = u(n)) [5] = f[5].concat(h[5]), f) : A.push(Y)
- }
- }
- for (j = 0, U = (_ = _.sort(p)).length; j < U; j++) {
- var X = _[j] - j;
- A.splice(X, 1)
- }
- }
- for (var J = e[0] && e[0][0] == a.AT_RULE && 0 === e[0][1].indexOf('@charset') ? 1 : 0; J < e.length - 1; J++) {
- var Q = e[J][0] === a.AT_RULE && 0 === e[J][1].indexOf('@import'),
- Z = e[J][0] === a.COMMENT;
- if (!Q && !Z) break
- }
- for (L = 0; L < A.length; L++) P(J, A[L])
- }
- },
- {
- '../../tokenizer/token': 122,
- '../../utils/clone-array': 124,
- '../../writer/one-time': 136,
- './extract-properties': 60,
- './is-mergeable': 62,
- './reorderable': 85,
- './tidy-rule-duplicates': 92
- }
- ],
- 89: [
- function (e, t, n) {
- var r = /\-\-.+$/;
- function i(e) {
- return e.replace(r, '')
- }
- t.exports = function (e, t, n) {
- var r,
- s,
- o,
- a,
- u,
- l;
- for (o = 0, a = e.length; o < a; o++) for (r = e[o][1], u = 0, l = t.length; u < l; u++) {
- if (r == (s = t[u][1])) return !0;
- if (n && i(r) == i(s)) return !0
- }
- return !1
- }
- },
- {
- }
- ],
- 90: [
- function (e, t, n) {
- var r = e('./specificity');
- function i(e, t) {
- var n;
- return e in t || (t[e] = n = r(e)),
- n || t[e]
- }
- t.exports = function (e, t, n) {
- var r,
- s,
- o,
- a,
- u,
- l;
- for (o = 0, a = e.length; o < a; o++) for (r = i(e[o][1], n), u = 0, l = t.length; u < l; u++) if (s = i(t[u][1], n), r[0] === s[0] && r[1] === s[1] && r[2] === s[2]) return !0;
- return !1
- }
- },
- {
- './specificity': 91
- }
- ],
- 91: [
- function (e, t, n) {
- var r = e('../../tokenizer/marker'),
- i = {
- ADJACENT_SIBLING: '+',
- DESCENDANT: '>',
- DOT: '.',
- HASH: '#',
- NON_ADJACENT_SIBLING: '~',
- PSEUDO: ':'
- },
- s = /[a-zA-Z]/,
- o = ':not(',
- a = /[\s,\(>~\+]/;
- function u(e, t) {
- return e.indexOf(o, t) === t
- }
- t.exports = function (e) {
- var t,
- n,
- o,
- l,
- c,
- p,
- h,
- f = [
- 0,
- 0,
- 0
- ],
- d = 0,
- m = !1,
- g = !1;
- for (p = 0, h = e.length; p < h; p++) {
- if (t = e[p], n);
- else if (t != r.SINGLE_QUOTE || l || o) if (t == r.SINGLE_QUOTE && !l && o) o = !1;
- else if (t != r.DOUBLE_QUOTE || l || o) if (t == r.DOUBLE_QUOTE && l && !o) l = !1;
- else {
- if (o || l) continue;
- d > 0 && !m || (t == r.OPEN_ROUND_BRACKET ? d++ : t == r.CLOSE_ROUND_BRACKET && 1 == d ? (d--, m = !1) : t == r.CLOSE_ROUND_BRACKET ? d-- : t == i.HASH ? f[0]++ : t == i.DOT || t == r.OPEN_SQUARE_BRACKET ? f[1]++ : t != i.PSEUDO || g || u(e, p) ? t == i.PSEUDO ? m = !0 : (0 === p || c) && s.test(t) && f[2]++ : (f[1]++, m = !1))
- } else l = !0;
- else o = !0;
- n = t == r.BACK_SLASH,
- g = t == i.PSEUDO,
- c = !n && a.test(t)
- }
- return f
- }
- },
- {
- '../../tokenizer/marker': 121
- }
- ],
- 92: [
- function (e, t, n) {
- function r(e, t) {
- return e[1] > t[1] ? 1 : - 1
- }
- t.exports = function (e) {
- for (var t = [
- ], n = [
- ], i = 0, s = e.length; i < s; i++) {
- var o = e[i];
- - 1 == n.indexOf(o[1]) && (n.push(o[1]), t.push(o))
- }
- return t.sort(r)
- }
- },
- {
- }
- ],
- 93: [
- function (e, t, n) {
- t.exports = function (e) {
- for (var t = e.length - 1; t >= 0; t--) {
- var n = e[t];
- n.unused && n.all.splice(n.position, 1)
- }
- }
- },
- {
- }
- ],
- 94: [
- function (e, t, n) {
- var r = e('./hack'),
- i = e('../tokenizer/marker'),
- s = '*',
- o = '\\',
- a = '!important',
- u = '_',
- l = '!ie';
- function c(e) {
- e.value[e.value.length - 1][1] += a
- }
- function p(e) {
- e.hack[0] == r.UNDERSCORE ? e.name = u + e.name : e.hack[0] == r.ASTERISK ? e.name = s + e.name : e.hack[0] == r.BACKSLASH ? e.value[e.value.length - 1][1] += o + e.hack[1] : e.hack[0] == r.BANG && (e.value[e.value.length - 1][1] += i.SPACE + l)
- }
- t.exports = function (e, t) {
- var n,
- r,
- i,
- s;
- for (s = e.length - 1; s >= 0; s--) (n = e[s]).unused || (n.dirty || n.important || n.hack) && (t ? (r = t(n), n.value = r) : r = n.value, n.important && c(n), n.hack && p(n), 'all' in n && ((i = n.all[n.position]) [1][1] = n.name, i.splice(2, i.length - 1), Array.prototype.push.apply(i, r)))
- }
- },
- {
- '../tokenizer/marker': 121,
- './hack': 46
- }
- ],
- 95: [
- function (e, t, n) {
- var r = new RegExp('^(\\-moz\\-|\\-webkit\\-)?calc\\([^\\)]+\\)$', 'i'),
- i = /[0-9]/,
- s = new RegExp('^(var\\(\\-\\-[^\\)]+\\)|[A-Z]+(\\-|[A-Z]|[0-9])+\\(.*?\\)|\\-(\\-|[A-Z]|[0-9])+\\(.*?\\))$', 'i'),
- o = /^hsl\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31}\)|hsla\(\s{0,31}[\-\.]?\d+\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+%\s{0,31},\s{0,31}\.?\d+\s{0,31}\)$/,
- a = /^(\-[a-z0-9_][a-z0-9\-_]*|[a-z][a-z0-9\-_]*)$/i,
- u = /^[a-z]+$/i,
- l = /^-([a-z0-9]|-)*$/i,
- c = /^rgb\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31}\)|rgba\(\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\d]{1,3}\s{0,31},\s{0,31}[\.\d]+\s{0,31}\)$/,
- p = /^(cubic\-bezier|steps)\([^\)]+\)$/,
- h = [
- 'ms',
- 's'
- ],
- f = /^url\([\s\S]+\)$/i,
- d = new RegExp('^var\\(\\-\\-[^\\)]+\\)$', 'i'),
- m = /^#[0-9a-f]{8}$/i,
- g = /^#[0-9a-f]{4}$/i,
- y = /^#[0-9a-f]{6}$/i,
- v = /^#[0-9a-f]{3}$/i,
- b = '.',
- x = '-',
- A = '+',
- E = {
- '^': [
- 'inherit',
- 'initial',
- 'unset'
- ],
- '*-style': [
- 'auto',
- 'dashed',
- 'dotted',
- 'double',
- 'groove',
- 'hidden',
- 'inset',
- 'none',
- 'outset',
- 'ridge',
- 'solid'
- ],
- '*-timing-function': [
- 'ease',
- 'ease-in',
- 'ease-in-out',
- 'ease-out',
- 'linear',
- 'step-end',
- 'step-start'
- ],
- 'animation-direction': [
- 'alternate',
- 'alternate-reverse',
- 'normal',
- 'reverse'
- ],
- 'animation-fill-mode': [
- 'backwards',
- 'both',
- 'forwards',
- 'none'
- ],
- 'animation-iteration-count': [
- 'infinite'
- ],
- 'animation-name': [
- 'none'
- ],
- 'animation-play-state': [
- 'paused',
- 'running'
- ],
- 'background-attachment': [
- 'fixed',
- 'inherit',
- 'local',
- 'scroll'
- ],
- 'background-clip': [
- 'border-box',
- 'content-box',
- 'inherit',
- 'padding-box',
- 'text'
- ],
- 'background-origin': [
- 'border-box',
- 'content-box',
- 'inherit',
- 'padding-box'
- ],
- 'background-position': [
- 'bottom',
- 'center',
- 'left',
- 'right',
- 'top'
- ],
- 'background-repeat': [
- 'no-repeat',
- 'inherit',
- 'repeat',
- 'repeat-x',
- 'repeat-y',
- 'round',
- 'space'
- ],
- 'background-size': [
- 'auto',
- 'cover',
- 'contain'
- ],
- 'border-collapse': [
- 'collapse',
- 'inherit',
- 'separate'
- ],
- bottom: [
- 'auto'
- ],
- clear: [
- 'both',
- 'left',
- 'none',
- 'right'
- ],
- color: [
- 'transparent'
- ],
- cursor: [
- 'all-scroll',
- 'auto',
- 'col-resize',
- 'crosshair',
- 'default',
- 'e-resize',
- 'help',
- 'move',
- 'n-resize',
- 'ne-resize',
- 'no-drop',
- 'not-allowed',
- 'nw-resize',
- 'pointer',
- 'progress',
- 'row-resize',
- 's-resize',
- 'se-resize',
- 'sw-resize',
- 'text',
- 'vertical-text',
- 'w-resize',
- 'wait'
- ],
- display: [
- 'block',
- 'inline',
- 'inline-block',
- 'inline-table',
- 'list-item',
- 'none',
- 'table',
- 'table-caption',
- 'table-cell',
- 'table-column',
- 'table-column-group',
- 'table-footer-group',
- 'table-header-group',
- 'table-row',
- 'table-row-group'
- ],
- float: [
- 'left',
- 'none',
- 'right'
- ],
- left: [
- 'auto'
- ],
- font: [
- 'caption',
- 'icon',
- 'menu',
- 'message-box',
- 'small-caption',
- 'status-bar',
- 'unset'
- ],
- 'font-size': [
- 'large',
- 'larger',
- 'medium',
- 'small',
- 'smaller',
- 'x-large',
- 'x-small',
- 'xx-large',
- 'xx-small'
- ],
- 'font-stretch': [
- 'condensed',
- 'expanded',
- 'extra-condensed',
- 'extra-expanded',
- 'normal',
- 'semi-condensed',
- 'semi-expanded',
- 'ultra-condensed',
- 'ultra-expanded'
- ],
- 'font-style': [
- 'italic',
- 'normal',
- 'oblique'
- ],
- 'font-variant': [
- 'normal',
- 'small-caps'
- ],
- 'font-weight': [
- '100',
- '200',
- '300',
- '400',
- '500',
- '600',
- '700',
- '800',
- '900',
- 'bold',
- 'bolder',
- 'lighter',
- 'normal'
- ],
- 'line-height': [
- 'normal'
- ],
- 'list-style-position': [
- 'inside',
- 'outside'
- ],
- 'list-style-type': [
- 'armenian',
- 'circle',
- 'decimal',
- 'decimal-leading-zero',
- 'disc',
- 'decimal|disc',
- 'georgian',
- 'lower-alpha',
- 'lower-greek',
- 'lower-latin',
- 'lower-roman',
- 'none',
- 'square',
- 'upper-alpha',
- 'upper-latin',
- 'upper-roman'
- ],
- overflow: [
- 'auto',
- 'hidden',
- 'scroll',
- 'visible'
- ],
- position: [
- 'absolute',
- 'fixed',
- 'relative',
- 'static'
- ],
- right: [
- 'auto'
- ],
- 'text-align': [
- 'center',
- 'justify',
- 'left',
- 'left|right',
- 'right'
- ],
- 'text-decoration': [
- 'line-through',
- 'none',
- 'overline',
- 'underline'
- ],
- 'text-overflow': [
- 'clip',
- 'ellipsis'
- ],
- top: [
- 'auto'
- ],
- 'vertical-align': [
- 'baseline',
- 'bottom',
- 'middle',
- 'sub',
- 'super',
- 'text-bottom',
- 'text-top',
- 'top'
- ],
- visibility: [
- 'collapse',
- 'hidden',
- 'visible'
- ],
- 'white-space': [
- 'normal',
- 'nowrap',
- 'pre'
- ],
- width: [
- 'inherit',
- 'initial',
- 'medium',
- 'thick',
- 'thin'
- ]
- },
- _ = [
- '%',
- 'ch',
- 'cm',
- 'em',
- 'ex',
- 'in',
- 'mm',
- 'pc',
- 'pt',
- 'px',
- 'rem',
- 'vh',
- 'vm',
- 'vmax',
- 'vmin',
- 'vw'
- ];
- function C(e) {
- return 'auto' != e && (O('color') (e) || function (e) {
- return v.test(e) || g.test(e) || y.test(e) || m.test(e)
- }(e) || w(e) || function (e) {
- return u.test(e)
- }(e))
- }
- function w(e) {
- return P(e) || S(e)
- }
- function D(e) {
- return r.test(e)
- }
- function k(e) {
- return s.test(e)
- }
- function S(e) {
- return o.test(e)
- }
- function T(e) {
- return a.test(e)
- }
- function F(e) {
- return 'none' == e || 'inherit' == e || j(e)
- }
- function O(e) {
- return function (t) {
- return E[e].indexOf(t) > - 1
- }
- }
- function B(e) {
- return U(e) == e.length
- }
- function P(e) {
- return c.test(e)
- }
- function N(e) {
- return l.test(e)
- }
- function R(e) {
- return B(e) && parseFloat(e) >= 0
- }
- function L(e) {
- return d.test(e)
- }
- function I(e) {
- var t = U(e);
- return t == e.length && 0 === parseInt(e) || t > - 1 && h.indexOf(e.slice(t + 1)) > - 1
- }
- function j(e) {
- return f.test(e)
- }
- function M(e) {
- return 'auto' == e || B(e) || O('^') (e)
- }
- function U(e) {
- var t,
- n,
- r,
- s = !1,
- o = !1;
- for (n = 0, r = e.length; n < r; n++) if (t = e[n], 0 !== n || t != A && t != x) {
- if (n > 0 && o && (t == A || t == x)) return n - 1;
- if (t != b || s) {
- if (t == b && s) return n - 1;
- if (i.test(t)) continue;
- return n - 1
- }
- s = !0
- } else o = !0;
- return n
- }
- t.exports = function (e) {
- var t,
- n = _.slice(0).filter(function (t) {
- return !(t in e.units) || !0 === e.units[t]
- });
- return {
- colorOpacity: e.colors.opacity,
- isAnimationDirectionKeyword: O('animation-direction'),
- isAnimationFillModeKeyword: O('animation-fill-mode'),
- isAnimationIterationCountKeyword: O('animation-iteration-count'),
- isAnimationNameKeyword: O('animation-name'),
- isAnimationPlayStateKeyword: O('animation-play-state'),
- isTimingFunction: (t = O('*-timing-function'), function (e) {
- return t(e) || p.test(e)
- }),
- isBackgroundAttachmentKeyword: O('background-attachment'),
- isBackgroundClipKeyword: O('background-clip'),
- isBackgroundOriginKeyword: O('background-origin'),
- isBackgroundPositionKeyword: O('background-position'),
- isBackgroundRepeatKeyword: O('background-repeat'),
- isBackgroundSizeKeyword: O('background-size'),
- isColor: C,
- isColorFunction: w,
- isDynamicUnit: D,
- isFontKeyword: O('font'),
- isFontSizeKeyword: O('font-size'),
- isFontStretchKeyword: O('font-stretch'),
- isFontStyleKeyword: O('font-style'),
- isFontVariantKeyword: O('font-variant'),
- isFontWeightKeyword: O('font-weight'),
- isFunction: k,
- isGlobal: O('^'),
- isHslColor: S,
- isIdentifier: T,
- isImage: F,
- isKeyword: O,
- isLineHeightKeyword: O('line-height'),
- isListStylePositionKeyword: O('list-style-position'),
- isListStyleTypeKeyword: O('list-style-type'),
- isNumber: B,
- isPrefixed: N,
- isPositiveNumber: R,
- isRgbColor: P,
- isStyleKeyword: O('*-style'),
- isTime: I,
- isUnit: function (e, t) {
- var n = U(t);
- return n == t.length && 0 === parseInt(t) || n > - 1 && e.indexOf(t.slice(n + 1)) > - 1 || 'auto' == t || 'inherit' == t
- }.bind(null, n),
- isUrl: j,
- isVariable: L,
- isWidth: O('width'),
- isZIndex: M
- }
- }
- },
- {
- }
- ],
- 96: [
- function (e, t, n) {
- var r = e('./hack'),
- i = e('../tokenizer/marker'),
- s = e('../tokenizer/token'),
- o = {
- ASTERISK: '*',
- BACKSLASH: '\\',
- BANG: '!',
- BANG_SUFFIX_PATTERN: /!\w+$/,
- IMPORTANT_TOKEN: '!important',
- IMPORTANT_TOKEN_PATTERN: new RegExp('!important$', 'i'),
- IMPORTANT_WORD: 'important',
- IMPORTANT_WORD_PATTERN: new RegExp('important$', 'i'),
- SUFFIX_BANG_PATTERN: /!$/,
- UNDERSCORE: '_',
- VARIABLE_REFERENCE_PATTERN: /var\(--.+\)$/
- };
- function a(e) {
- var t,
- n,
- r;
- for (t = 2, n = e.length; t < n; t++) if ((r = e[t]) [0] == s.PROPERTY_VALUE && u(r[1])) return !0;
- return !1
- }
- function u(e) {
- return o.VARIABLE_REFERENCE_PATTERN.test(e)
- }
- function l(e) {
- var t = function (e) {
- if (e.length < 3) return !1;
- var t = e[e.length - 1];
- return !!o.IMPORTANT_TOKEN_PATTERN.test(t[1]) || !(!o.IMPORTANT_WORD_PATTERN.test(t[1]) || !o.SUFFIX_BANG_PATTERN.test(e[e.length - 2][1]))
- }(e);
- t && function (e) {
- var t = e[e.length - 1],
- n = e[e.length - 2];
- o.IMPORTANT_TOKEN_PATTERN.test(t[1]) ? t[1] = t[1].replace(o.IMPORTANT_TOKEN_PATTERN, '') : (t[1] = t[1].replace(o.IMPORTANT_WORD_PATTERN, ''), n[1] = n[1].replace(o.SUFFIX_BANG_PATTERN, '')),
- 0 === t[1].length && e.pop(),
- 0 === n[1].length && e.pop()
- }(e);
- var n = function (e) {
- var t = !1,
- n = e[1][1],
- i = e[e.length - 1];
- return n[0] == o.UNDERSCORE ? t = [
- r.UNDERSCORE
- ] : n[0] == o.ASTERISK ? t = [
- r.ASTERISK
- ] : i[1][0] != o.BANG || i[1].match(o.IMPORTANT_WORD_PATTERN) ? i[1].indexOf(o.BANG) > 0 && !i[1].match(o.IMPORTANT_WORD_PATTERN) && o.BANG_SUFFIX_PATTERN.test(i[1]) ? t = [
- r.BANG
- ] : i[1].indexOf(o.BACKSLASH) > 0 && i[1].indexOf(o.BACKSLASH) == i[1].length - o.BACKSLASH.length - 1 ? t = [
- r.BACKSLASH,
- i[1].substring(i[1].indexOf(o.BACKSLASH) + 1)
- ] : 0 === i[1].indexOf(o.BACKSLASH) && 2 == i[1].length && (t = [
- r.BACKSLASH,
- i[1].substring(1)
- ]) : t = [
- r.BANG
- ],
- t
- }(e);
- return n[0] == r.ASTERISK || n[0] == r.UNDERSCORE ? function (e) {
- e[1][1] = e[1][1].substring(1)
- }(e) : n[0] != r.BACKSLASH && n[0] != r.BANG || function (e, t) {
- var n = e[e.length - 1];
- n[1] = n[1].substring(0, n[1].indexOf(t[0] == r.BACKSLASH ? o.BACKSLASH : o.BANG)).trim(),
- 0 === n[1].length && e.pop()
- }(e, n),
- {
- block: e[2] && e[2][0] == s.PROPERTY_BLOCK,
- components: [
- ],
- dirty: !1,
- hack: n,
- important: t,
- name: e[1][1],
- multiplex: e.length > 3 && function (e) {
- var t,
- n,
- r;
- for (n = 3, r = e.length; n < r; n++) if ((t = e[n]) [0] == s.PROPERTY_VALUE && (t[1] == i.COMMA || t[1] == i.FORWARD_SLASH)) return !0;
- return !1
- }(e),
- position: 0,
- shorthand: !1,
- unused: !1,
- value: e.slice(2)
- }
- }
- t.exports = {
- all: function (e, t, n) {
- var r,
- i,
- o,
- u = [
- ];
- for (o = e.length - 1; o >= 0; o--) (i = e[o]) [0] == s.PROPERTY && (!t && a(i) || n && n.indexOf(i[1][1]) > - 1 || ((r = l(i)).all = e, r.position = o, u.unshift(r)));
- return u
- },
- single: l
- }
- },
- {
- '../tokenizer/marker': 121,
- '../tokenizer/token': 122,
- './hack': 46
- }
- ],
- 97: [
- function (e, t, n) {
- var r = {
- '*': {
- colors: {
- opacity: !0
- },
- properties: {
- backgroundClipMerging: !0,
- backgroundOriginMerging: !0,
- backgroundSizeMerging: !0,
- colors: !0,
- ieBangHack: !1,
- ieFilters: !1,
- iePrefixHack: !1,
- ieSuffixHack: !1,
- merging: !0,
- shorterLengthUnits: !1,
- spaceAfterClosingBrace: !0,
- urlQuotes: !1,
- zeroUnits: !0
- },
- selectors: {
- adjacentSpace: !1,
- ie7Hack: !1,
- mergeablePseudoClasses: [
- ':active',
- ':after',
- ':before',
- ':empty',
- ':checked',
- ':disabled',
- ':empty',
- ':enabled',
- ':first-child',
- ':first-letter',
- ':first-line',
- ':first-of-type',
- ':focus',
- ':hover',
- ':lang',
- ':last-child',
- ':last-of-type',
- ':link',
- ':not',
- ':nth-child',
- ':nth-last-child',
- ':nth-last-of-type',
- ':nth-of-type',
- ':only-child',
- ':only-of-type',
- ':root',
- ':target',
- ':visited'
- ],
- mergeablePseudoElements: [
- '::after',
- '::before',
- '::first-letter',
- '::first-line'
- ],
- mergeLimit: 8191,
- multiplePseudoMerging: !0
- },
- units: {
- ch: !0,
- in : !0,
- pc: !0,
- pt: !0,
- rem: !0,
- vh: !0,
- vm: !0,
- vmax: !0,
- vmin: !0,
- vw: !0
- }
- }
- };
- function i(e, t) {
- for (var n in e) {
- var r = e[n];
- 'object' != typeof r || Array.isArray(r) ? t[n] = n in t ? t[n] : r : t[n] = i(r, t[n] || {
- })
- }
- return t
- }
- r.ie11 = r['*'],
- r.ie10 = r['*'],
- r.ie9 = i(r['*'], {
- properties: {
- ieFilters: !0,
- ieSuffixHack: !0
- }
- }),
- r.ie8 = i(r.ie9, {
- colors: {
- opacity: !1
- },
- properties: {
- backgroundClipMerging: !1,
- backgroundOriginMerging: !1,
- backgroundSizeMerging: !1,
- iePrefixHack: !0,
- merging: !1
- },
- selectors: {
- mergeablePseudoClasses: [
- ':after',
- ':before',
- ':first-child',
- ':first-letter',
- ':focus',
- ':hover',
- ':visited'
- ],
- mergeablePseudoElements: [
- ]
- },
- units: {
- ch: !1,
- rem: !1,
- vh: !1,
- vm: !1,
- vmax: !1,
- vmin: !1,
- vw: !1
- }
- }),
- r.ie7 = i(r.ie8, {
- properties: {
- ieBangHack: !0
- },
- selectors: {
- ie7Hack: !0,
- mergeablePseudoClasses: [
- ':first-child',
- ':first-letter',
- ':hover',
- ':visited'
- ]
- }
- }),
- t.exports = function (e) {
- return i(r['*'], function (e) {
- if ('object' == typeof e) return e;
- if (!/[,\+\-]/.test(e)) return r[e] || r['*'];
- var t = e.split(','),
- n = t[0] in r ? r[t.shift()] : r['*'];
- return e = {
- },
- t.forEach(function (t) {
- var n = '+' == t[0],
- r = t.substring(1).split('.'),
- i = r[0],
- s = r[1];
- e[i] = e[i] || {
- },
- e[i][s] = n
- }),
- i(n, e)
- }(e))
- }
- },
- {
- }
- ],
- 98: [
- function (e, t, n) {
- var r = e('../reader/load-remote-resource');
- t.exports = function (e) {
- return e || r
- }
- },
- {
- '../reader/load-remote-resource': 112
- }
- ],
- 99: [
- function (e, t, n) {
- var r = e('os').EOL,
- i = e('../utils/override'),
- s = {
- AfterAtRule: 'afterAtRule',
- AfterBlockBegins: 'afterBlockBegins',
- AfterBlockEnds: 'afterBlockEnds',
- AfterComment: 'afterComment',
- AfterProperty: 'afterProperty',
- AfterRuleBegins: 'afterRuleBegins',
- AfterRuleEnds: 'afterRuleEnds',
- BeforeBlockEnds: 'beforeBlockEnds',
- BetweenSelectors: 'betweenSelectors'
- },
- o = {
- CarriageReturnLineFeed: '\r\n',
- LineFeed: '\n',
- System: r
- },
- a = {
- Space: ' ',
- Tab: '\t'
- },
- u = {
- AroundSelectorRelation: 'aroundSelectorRelation',
- BeforeBlockBegins: 'beforeBlockBegins',
- BeforeValue: 'beforeValue'
- },
- l = {
- breaks: x(!1),
- breakWith: o.System,
- indentBy: 0,
- indentWith: a.Space,
- spaces: A(!1),
- wrapAt: !1,
- semicolonAfterLastProperty: !1
- },
- c = 'beautify',
- p = 'keep-breaks',
- h = ';',
- f = ':',
- d = ',',
- m = '=',
- g = 'false',
- y = 'off',
- v = 'true',
- b = 'on';
- function x(e) {
- var t = {
- };
- return t[s.AfterAtRule] = e,
- t[s.AfterBlockBegins] = e,
- t[s.AfterBlockEnds] = e,
- t[s.AfterComment] = e,
- t[s.AfterProperty] = e,
- t[s.AfterRuleBegins] = e,
- t[s.AfterRuleEnds] = e,
- t[s.BeforeBlockEnds] = e,
- t[s.BetweenSelectors] = e,
- t
- }
- function A(e) {
- var t = {
- };
- return t[u.AroundSelectorRelation] = e,
- t[u.BeforeBlockBegins] = e,
- t[u.BeforeValue] = e,
- t
- }
- function E(e) {
- switch (e) {
- case 'windows':
- case 'crlf':
- case o.CarriageReturnLineFeed:
- return o.CarriageReturnLineFeed;
- case 'unix':
- case 'lf':
- case o.LineFeed:
- return o.LineFeed;
- default:
- return r
- }
- }
- function _(e) {
- switch (e) {
- case 'space':
- return a.Space;
- case 'tab':
- return a.Tab;
- default:
- return e
- }
- }
- t.exports = {
- Breaks: s,
- Spaces: u,
- formatFrom: function (e) {
- return void 0 !== e && !1 !== e && ('object' == typeof e && 'breakWith' in e && (e = i(e, {
- breakWith: E(e.breakWith)
- })), 'object' == typeof e && 'indentBy' in e && (e = i(e, {
- indentBy: parseInt(e.indentBy)
- })), 'object' == typeof e && 'indentWith' in e && (e = i(e, {
- indentWith: _(e.indentWith)
- })), 'object' == typeof e ? i(l, e) : 'object' == typeof e ? i(l, e) : 'string' == typeof e && e == c ? i(l, {
- breaks: x(!0),
- indentBy: 2,
- spaces: A(!0)
- }) : 'string' == typeof e && e == p ? i(l, {
- breaks: {
- afterAtRule: !0,
- afterBlockBegins: !0,
- afterBlockEnds: !0,
- afterComment: !0,
- afterRuleEnds: !0,
- beforeBlockEnds: !0
- }
- }) : 'string' == typeof e ? i(l, e.split(h).reduce(function (e, t) {
- var n = t.split(f),
- r = n[0],
- i = n[1];
- return 'breaks' == r || 'spaces' == r ? e[r] = i.split(d).reduce(function (e, t) {
- var n = t.split(m),
- r = n[0],
- i = n[1];
- return e[r] = function (e) {
- switch (e) {
- case g:
- case y:
- return !1;
- case v:
- case b:
- return !0;
- default:
- return e
- }
- }(i),
- e
- }, {
- }) : 'indentBy' == r || 'wrapAt' == r ? e[r] = parseInt(i) : 'indentWith' == r ? e[r] = _(i) : 'breakWith' == r && (e[r] = E(i)),
- e
- }, {
- })) : l)
- }
- }
- },
- {
- '../utils/override': 133,
- os: 371
- }
- ],
- 100: [
- function (e, t, n) {
- (function (n) {
- var r = e('url'),
- i = e('../utils/override');
- t.exports = function (e) {
- return i((t = n.env.HTTP_PROXY || n.env.http_proxy) ? {
- hostname: r.parse(t).hostname,
- port: parseInt(r.parse(t).port)
- }
- : {
- }, e || {
- });
- var t
- }
- }).call(this, e('_process'))
- },
- {
- '../utils/override': 133,
- _process: 373,
- url: 424
- }
- ],
- 101: [
- function (e, t, n) {
- var r = 5000;
- t.exports = function (e) {
- return e || r
- }
- },
- {
- }
- ],
- 102: [
- function (e, t, n) {
- t.exports = function (e) {
- return Array.isArray(e) ? e : !1 === e ? [
- 'none'
- ] : void 0 === e ? [
- 'local'
- ] : e.split(',')
- }
- },
- {
- }
- ],
- 103: [
- function (e, t, n) {
- var r = e('./rounding-precision').roundingPrecisionFrom,
- i = e('../utils/override'),
- s = {
- Zero: '0',
- One: '1',
- Two: '2'
- },
- o = {
- };
- o[s.Zero] = {
- },
- o[s.One] = {
- cleanupCharsets: !0,
- normalizeUrls: !0,
- optimizeBackground: !0,
- optimizeBorderRadius: !0,
- optimizeFilter: !0,
- optimizeFontWeight: !0,
- optimizeOutline: !0,
- removeEmpty: !0,
- removeNegativePaddings: !0,
- removeQuotes: !0,
- removeWhitespace: !0,
- replaceMultipleZeros: !0,
- replaceTimeUnits: !0,
- replaceZeroUnits: !0,
- roundingPrecision: r(void 0),
- selectorsSortingMethod: 'standard',
- specialComments: 'all',
- tidyAtRules: !0,
- tidyBlockScopes: !0,
- tidySelectors: !0,
- transform: function () {
- }
- },
- o[s.Two] = {
- mergeAdjacentRules: !0,
- mergeIntoShorthands: !0,
- mergeMedia: !0,
- mergeNonAdjacentRules: !0,
- mergeSemantically: !1,
- overrideProperties: !0,
- removeEmpty: !0,
- reduceNonAdjacentRules: !0,
- removeDuplicateFontRules: !0,
- removeDuplicateMediaBlocks: !0,
- removeDuplicateRules: !0,
- removeUnusedAtRules: !1,
- restructureRules: !1,
- skipProperties: [
- ]
- };
- var a = '*',
- u = 'all',
- l = 'false',
- c = 'off',
- p = 'true',
- h = 'on',
- f = ',',
- d = ';',
- m = ':';
- function g(e, t) {
- var n,
- r = i(o[e], {
- });
- for (n in r) 'boolean' == typeof r[n] && (r[n] = t);
- return r
- }
- function y(e) {
- switch (e) {
- case l:
- case c:
- return !1;
- case p:
- case h:
- return !0;
- default:
- return e
- }
- }
- function v(e, t) {
- return e.split(d).reduce(function (e, n) {
- var r = n.split(m),
- s = r[0],
- o = y(r[1]);
- return a == s || u == s ? e = i(e, g(t, o)) : e[s] = o,
- e
- }, {
- })
- }
- t.exports = {
- OptimizationLevel: s,
- optimizationLevelFrom: function (e) {
- var t = i(o, {
- }),
- n = s.Zero,
- l = s.One,
- c = s.Two;
- return void 0 === e ? (delete t[c], t) : ('string' == typeof e && (e = parseInt(e)), 'number' == typeof e && e === parseInt(c) ? t : 'number' == typeof e && e === parseInt(l) ? (delete t[c], t) : 'number' == typeof e && e === parseInt(n) ? (delete t[c], delete t[l], t) : ('object' == typeof e && (e = function (e) {
- var t,
- n,
- r = i(e, {
- });
- for (n = 0; n <= 2; n++) (t = '' + n) in r && (void 0 === r[t] || !1 === r[t]) && delete r[t],
- t in r && !0 === r[t] && (r[t] = {
- }),
- t in r && 'string' == typeof r[t] && (r[t] = v(r[t], t));
- return r
- }(e)), l in e && 'roundingPrecision' in e[l] && (e[l].roundingPrecision = r(e[l].roundingPrecision)), c in e && 'skipProperties' in e[c] && 'string' == typeof e[c].skipProperties && (e[c].skipProperties = e[c].skipProperties.split(f)), (n in e || l in e || c in e) && (t[n] = i(t[n], e[n])), l in e && a in e[l] && (t[l] = i(t[l], g(l, y(e[l][a]))), delete e[l][a]), l in e && u in e[l] && (t[l] = i(t[l], g(l, y(e[l][u]))), delete e[l][u]), l in e || c in e ? t[l] = i(t[l], e[l]) : delete t[l], c in e && a in e[c] && (t[c] = i(t[c], g(c, y(e[c][a]))), delete e[c][a]), c in e && u in e[c] && (t[c] = i(t[c], g(c, y(e[c][u]))), delete e[c][u]), c in e ? t[c] = i(t[c], e[c]) : delete t[c], t))
- }
- }
- },
- {
- '../utils/override': 133,
- './rounding-precision': 106
- }
- ],
- 104: [
- function (e, t, n) {
- (function (n) {
- var r = e('path');
- t.exports = function (e) {
- return e ? r.resolve(e) : n.cwd()
- }
- }).call(this, e('_process'))
- },
- {
- _process: 373,
- path: 372
- }
- ],
- 105: [
- function (e, t, n) {
- t.exports = function (e) {
- return void 0 === e || !!e
- }
- },
- {
- }
- ],
- 106: [
- function (e, t, n) {
- var r = e('../utils/override'),
- i = /^\d+$/,
- s = [
- '*',
- 'all'
- ],
- o = 'off',
- a = ',',
- u = '=';
- function l(e) {
- return {
- ch: e,
- cm: e,
- em: e,
- ex: e,
- in : e,
- mm: e,
- pc: e,
- pt: e,
- px: e,
- q: e,
- rem: e,
- vh: e,
- vmax: e,
- vmin: e,
- vw: e,
- '%': e
- }
- }
- t.exports = {
- DEFAULT: o,
- roundingPrecisionFrom: function (e) {
- return r(l(o), function (e) {
- return null === e || void 0 === e ? {
- }
- : 'boolean' == typeof e ? {
- }
- : 'number' == typeof e && - 1 == e ? l(o) : 'number' == typeof e ? l(e) : 'string' == typeof e && i.test(e) ? l(parseInt(e)) : 'string' == typeof e && e == o ? l(o) : 'object' == typeof e ? e : e.split(a).reduce(function (e, t) {
- var n = t.split(u),
- i = n[0],
- a = parseInt(n[1]);
- return (isNaN(a) || - 1 == a) && (a = o),
- s.indexOf(i) > - 1 ? e = r(e, l(a)) : e[i] = a,
- e
- }, {
- })
- }(e))
- }
- }
- },
- {
- '../utils/override': 133
- }
- ],
- 107: [
- function (e, t, n) {
- (function (n, r) {
- var i = e('fs'),
- s = e('path'),
- o = e('./is-allowed-resource'),
- a = e('./match-data-uri'),
- u = e('./rebase-local-map'),
- l = e('./rebase-remote-map'),
- c = e('../tokenizer/token'),
- p = e('../utils/has-protocol'),
- h = e('../utils/is-data-uri-resource'),
- f = e('../utils/is-remote-resource'),
- d = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
- function m(e) {
- var t,
- n,
- r,
- i = [
- ],
- s = g(e.sourceTokens[0]);
- for (r = e.sourceTokens.length; e.index < r; e.index++) if ((t = g(n = e.sourceTokens[e.index])) != s && (i = [
- ], s = t), i.push(n), e.processedTokens.push(n), n[0] == c.COMMENT && d.test(n[1])) return y(n[1], t, i, e);
- return e.callback(e.processedTokens)
- }
- function g(e) {
- return (e[0] == c.AT_RULE || e[0] == c.COMMENT ? e[2][0] : e[1][0][2][0]) [2]
- }
- function y(e, t, g, y) {
- return function (e, t, c) {
- var m,
- g,
- y,
- v = d.exec(e) [1];
- return h(v) ? (g = function (e) {
- var t = a(e),
- i = t[2] ? t[2].split(/[=;]/) [2] : 'us-ascii',
- s = t[3] ? t[3].split(';') [1] : 'utf8',
- o = 'utf8' == s ? n.unescape(t[4]) : t[4],
- u = new r(o, s);
- return u.charset = i,
- JSON.parse(u.toString())
- }(v), c(g)) : f(v) ? function (e, t, n) {
- var r = o(e, !0, t.inline),
- i = !p(e);
- if (t.localOnly) return t.warnings.push('Cannot fetch remote resource from "' + e + '" as no callback given.'),
- n(null);
- if (i) return t.warnings.push('Cannot fetch "' + e + '" as no protocol given.'),
- n(null);
- if (!r) return t.warnings.push('Cannot fetch "' + e + '" as resource is not allowed.'),
- n(null);
- t.fetch(e, t.inlineRequest, t.inlineTimeout, function (r, i) {
- if (r) return t.warnings.push('Missing source map at "' + e + '" - ' + r),
- n(null);
- n(i)
- })
- }(v, t, function (e) {
- var t;
- e ? (t = JSON.parse(e), y = l(t, v), c(y)) : c(null)
- }) : (m = s.resolve(t.rebaseTo, v), (g = function (e, t) {
- var n,
- r = o(e, !1, t.inline);
- if (!i.existsSync(e) || !i.statSync(e).isFile()) return t.warnings.push('Ignoring local source map at "' + e + '" as resource is missing.'),
- null;
- if (!r) return t.warnings.push('Cannot fetch "' + e + '" as resource is not allowed.'),
- null;
- return n = i.readFileSync(e, 'utf-8'),
- JSON.parse(n)
- }(m, t)) ? (y = u(g, m, t.rebaseTo), c(y)) : c(null))
- }(e, y, function (e) {
- return e && (y.inputSourceMapTracker.track(t, e), function e(t, n) {
- var r;
- var i,
- s;
- for (i = 0, s = t.length; i < s; i++) switch ((r = t[i]) [0]) {
- case c.AT_RULE:
- v(r, n);
- break;
- case c.AT_RULE_BLOCK:
- e(r[1], n),
- e(r[2], n);
- break;
- case c.AT_RULE_BLOCK_SCOPE:
- v(r, n);
- break;
- case c.NESTED_BLOCK:
- e(r[1], n),
- e(r[2], n);
- break;
- case c.NESTED_BLOCK_SCOPE:
- case c.COMMENT:
- v(r, n);
- break;
- case c.PROPERTY:
- e(r, n);
- break;
- case c.PROPERTY_BLOCK:
- e(r[1], n);
- break;
- case c.PROPERTY_NAME:
- case c.PROPERTY_VALUE:
- v(r, n);
- break;
- case c.RULE:
- e(r[1], n),
- e(r[2], n);
- break;
- case c.RULE_SCOPE:
- v(r, n)
- }
- return t
- }(g, y.inputSourceMapTracker)),
- y.index++,
- m(y)
- })
- }
- function v(e, t) {
- var n,
- r,
- i = e[1],
- s = e[2],
- o = [
- ];
- for (n = 0, r = s.length; n < r; n++) o.push(t.originalPositionFor(s[n], i.length));
- e[2] = o
- }
- t.exports = function (e, t, n) {
- var r = {
- callback: n,
- fetch: t.options.fetch,
- index: 0,
- inline: t.options.inline,
- inlineRequest: t.options.inlineRequest,
- inlineTimeout: t.options.inlineTimeout,
- inputSourceMapTracker: t.inputSourceMapTracker,
- localOnly: t.localOnly,
- processedTokens: [
- ],
- rebaseTo: t.options.rebaseTo,
- sourceTokens: e,
- warnings: t.warnings
- };
- return t.options.sourceMap && e.length > 0 ? m(r) : n(e)
- }
- }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- }, e('buffer').Buffer)
- },
- {
- '../tokenizer/token': 122,
- '../utils/has-protocol': 126,
- '../utils/is-data-uri-resource': 127,
- '../utils/is-remote-resource': 131,
- './is-allowed-resource': 110,
- './match-data-uri': 113,
- './rebase-local-map': 116,
- './rebase-remote-map': 117,
- buffer: 42,
- fs: 41,
- path: 372
- }
- ],
- 108: [
- function (e, t, n) {
- var r = e('../utils/split'),
- i = /^\(/,
- s = /\)$/,
- o = /^@import/i,
- a = /['"]\s*/,
- u = /\s*['"]/,
- l = /^url\(\s*/i,
- c = /\s*\)/i;
- t.exports = function (e) {
- var t,
- n;
- return t = e.replace(o, '').trim().replace(l, '(').replace(c, ')').replace(a, '').replace(u, ''),
- [
- (n = r(t, ' ')) [0].replace(i, '').replace(s, ''),
- n.slice(1).join(' ')
- ]
- }
- },
- {
- '../utils/split': 134
- }
- ],
- 109: [
- function (e, t, n) {
- var r = e('source-map').SourceMapConsumer;
- t.exports = function () {
- var e = {
- };
- return {
- all: function (e) {
- return e
- }.bind(null, e),
- isTracking: function (e, t) {
- return t in e
- }.bind(null, e),
- originalPositionFor: function e(t, n, r, i) {
- for (var s, o, a = n[0], u = n[1], l = n[2], c = {
- line: a,
- column: u + r
- }; !s && c.column > u; ) c.column--,
- s = t[l].originalPositionFor(c);
- return !s || s.column < 0 ? n : null === s.line && a > 1 && i > 0 ? e(t, [
- a - 1,
- u,
- l
- ], r, i - 1) : null !== s.line ? [
- (o = s).line,
- o.column,
- o.source
- ] : n
- }.bind(null, e),
- track: function (e, t, n) {
- e[t] = new r(n)
- }.bind(null, e)
- }
- }
- },
- {
- 'source-map': 149
- }
- ],
- 110: [
- function (e, t, n) {
- var r = e('path'),
- i = e('url'),
- s = e('../utils/is-remote-resource'),
- o = e('../utils/has-protocol'),
- a = 'http:';
- function u(e) {
- return s(e) || i.parse(a + '//' + e).host == e
- }
- t.exports = function e(t, n, s) {
- var l,
- c,
- p,
- h,
- f,
- d,
- m = !n;
- if (0 === s.length) return !1;
- for (n && !o(t) && (t = a + t), l = n ? i.parse(t).host : t, c = n ? t : r.resolve(t), d = 0; d < s.length; d++) h = '!' == (p = s[d]) [0],
- f = p.substring(1),
- m = h && n && u(f) ? m && !e(t, !0, [
- f
- ]) : !h || n || u(f) ? h ? m && !0 : 'all' == p || (n && 'local' == p ? m || !1 : !(!n || 'remote' != p) || !(!n && 'remote' == p) && (!n && 'local' == p || p === l || p === t || !(!n || 0 !== c.indexOf(p)) || !n && 0 === c.indexOf(r.resolve(p)) || n != u(f) && m && !0)) : m && !e(t, !1, [
- f
- ]);
- return m
- }
- },
- {
- '../utils/has-protocol': 126,
- '../utils/is-remote-resource': 131,
- path: 372,
- url: 424
- }
- ],
- 111: [
- function (e, t, n) {
- var r = e('fs'),
- i = e('path'),
- s = e('./is-allowed-resource'),
- o = e('../utils/has-protocol'),
- a = e('../utils/is-remote-resource');
- function u(e) {
- var t,
- n,
- r,
- i = Object.keys(e.uriToSource);
- for (r = i.length; e.index < r; e.index++) {
- if (t = i[e.index], !(n = e.uriToSource[t])) return l(t, e);
- e.sourcesContent[t] = n
- }
- return e.callback()
- }
- function l(e, t) {
- var n;
- return a(e) ? function (e, t, n) {
- var r = s(e, !0, t.inline),
- i = !o(e);
- if (t.localOnly) return t.warnings.push('Cannot fetch remote resource from "' + e + '" as no callback given.'),
- n(null);
- if (i) return t.warnings.push('Cannot fetch "' + e + '" as no protocol given.'),
- n(null);
- if (!r) return t.warnings.push('Cannot fetch "' + e + '" as resource is not allowed.'),
- n(null);
- t.fetch(e, t.inlineRequest, t.inlineTimeout, function (r, i) {
- r && t.warnings.push('Missing original source at "' + e + '" - ' + r),
- n(i)
- })
- }(e, t, function (n) {
- return t.index++,
- t.sourcesContent[e] = n,
- u(t)
- }) : (n = function (e, t) {
- var n = s(e, !1, t.inline),
- o = i.resolve(t.rebaseTo, e);
- if (!r.existsSync(o) || !r.statSync(o).isFile()) return t.warnings.push('Ignoring local source map at "' + o + '" as resource is missing.'),
- null;
- if (!n) return t.warnings.push('Cannot fetch "' + o + '" as resource is not allowed.'),
- null;
- return r.readFileSync(o, 'utf8')
- }(e, t), t.index++, t.sourcesContent[e] = n, u(t))
- }
- t.exports = function (e, t) {
- var n = {
- callback: t,
- fetch: e.options.fetch,
- index: 0,
- inline: e.options.inline,
- inlineRequest: e.options.inlineRequest,
- inlineTimeout: e.options.inlineTimeout,
- localOnly: e.localOnly,
- rebaseTo: e.options.rebaseTo,
- sourcesContent: e.sourcesContent,
- uriToSource: function (e) {
- var t,
- n,
- r,
- i,
- s,
- o = {
- };
- for (r in e) for (t = e[r], i = 0, s = t.sources.length; i < s; i++) n = t.sources[i],
- r = t.sourceContentFor(n, !0),
- o[n] = r;
- return o
- }(e.inputSourceMapTracker.all()),
- warnings: e.warnings
- };
- return e.options.sourceMap && e.options.sourceMapInlineSources ? u(n) : t()
- }
- },
- {
- '../utils/has-protocol': 126,
- '../utils/is-remote-resource': 131,
- './is-allowed-resource': 110,
- fs: 41,
- path: 372
- }
- ],
- 112: [
- function (e, t, n) {
- var r = e('http'),
- i = e('https'),
- s = e('url'),
- o = e('../utils/is-http-resource'),
- a = e('../utils/is-https-resource'),
- u = e('../utils/override'),
- l = 'http:';
- t.exports = function e(t, n, c, p) {
- var h,
- f = n.protocol || n.hostname,
- d = !1;
- h = u(s.parse(t), n || {
- }),
- void 0 !== n.hostname && (h.protocol = n.protocol || l, h.path = h.href),
- (f && !a(f) || o(t) ? r.get : i.get) (h, function (r) {
- var i = [
- ];
- if (!d) {
- if (r.statusCode < 200 || r.statusCode > 399) return p(r.statusCode, null);
- if (r.statusCode > 299) return e(s.resolve(t, r.headers.location), n, c, p);
- r.on('data', function (e) {
- i.push(e.toString())
- }),
- r.on('end', function () {
- var e = i.join('');
- p(null, e)
- })
- }
- }).on('error', function (e) {
- d || (d = !0, p(e.message, null))
- }).on('timeout', function () {
- d || (d = !0, p('timeout', null))
- }).setTimeout(c)
- }
- },
- {
- '../utils/is-http-resource': 128,
- '../utils/is-https-resource': 129,
- '../utils/override': 133,
- http: 41,
- https: 41,
- url: 424
- }
- ],
- 113: [
- function (e, t, n) {
- var r = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
- t.exports = function (e) {
- return r.exec(e)
- }
- },
- {
- }
- ],
- 114: [
- function (e, t, n) {
- var r = '/',
- i = /\\/g;
- t.exports = function (e) {
- return e.replace(i, r)
- }
- },
- {
- }
- ],
- 115: [
- function (e, t, n) {
- (function (n, r) {
- var i = e('fs'),
- s = e('path'),
- o = e('./apply-source-maps'),
- a = e('./extract-import-url-and-media'),
- u = e('./is-allowed-resource'),
- l = e('./load-original-sources'),
- c = e('./normalize-path'),
- p = e('./rebase'),
- h = e('./rebase-local-map'),
- f = e('./rebase-remote-map'),
- d = e('./restore-import'),
- m = e('../tokenizer/tokenize'),
- g = e('../tokenizer/token'),
- y = e('../tokenizer/marker'),
- v = e('../utils/has-protocol'),
- b = e('../utils/is-import'),
- x = e('../utils/is-remote-resource'),
- A = 'uri:unknown';
- function E(e, t, n) {
- return t.source = void 0,
- t.sourcesContent[void 0] = e,
- t.stats.originalSize += e.length,
- k(e, t, {
- inline: t.options.inline
- }, n)
- }
- function _(e, t, n) {
- var r,
- i,
- s;
- for (r in e) s = e[r],
- i = C(r),
- n.push(D(i)),
- t.sourcesContent[i] = s.styles,
- s.sourceMap && w(s.sourceMap, i, t);
- return n
- }
- function C(e) {
- var t,
- n,
- r = s.resolve('');
- return x(e) ? e : (t = s.isAbsolute(e) ? e : s.resolve(e), n = s.relative(r, t), c(n))
- }
- function w(e, t, n) {
- var r = 'string' == typeof e ? JSON.parse(e) : e,
- i = x(t) ? f(r, t) : h(r, t || A, n.options.rebaseTo);
- n.inputSourceMapTracker.track(t, i)
- }
- function D(e) {
- return d('url(' + e + ')', '') + y.SEMICOLON
- }
- function k(e, t, n, r) {
- var i,
- o = {
- };
- return t.source ? x(t.source) ? (o.fromBase = t.source, o.toBase = t.source) : s.isAbsolute(t.source) ? (o.fromBase = s.dirname(t.source), o.toBase = t.options.rebaseTo) : (o.fromBase = s.dirname(s.resolve(t.source)), o.toBase = t.options.rebaseTo) : (o.fromBase = s.resolve(''), o.toBase = t.options.rebaseTo),
- i = m(e, t),
- i = p(i, t.options.rebase, t.validator, o),
- function (e) {
- return !(1 == e.length && 'none' == e[0])
- }(n.inline) ? function (e, t, n, r) {
- return S({
- afterContent: !1,
- callback: r,
- errors: t.errors,
- externalContext: t,
- fetch: t.options.fetch,
- inlinedStylesheets: n.inlinedStylesheets || t.inlinedStylesheets,
- inline: n.inline,
- inlineRequest: t.options.inlineRequest,
- inlineTimeout: t.options.inlineTimeout,
- isRemote: n.isRemote || !1,
- localOnly: t.localOnly,
- outputTokens: [
- ],
- rebaseTo: t.options.rebaseTo,
- sourceTokens: e,
- warnings: t.warnings
- })
- }(i, t, n, r) : r(i)
- }
- function S(e) {
- var t,
- n,
- r;
- for (n = 0, r = e.sourceTokens.length; n < r; n++) {
- if ((t = e.sourceTokens[n]) [0] == g.AT_RULE && b(t[1])) return e.sourceTokens.splice(0, n),
- T(t, e);
- t[0] == g.AT_RULE || t[0] == g.COMMENT ? e.outputTokens.push(t) : (e.outputTokens.push(t), e.afterContent = !0)
- }
- return e.sourceTokens = [
- ],
- e.callback(e.outputTokens)
- }
- function T(e, t) {
- var n = a(e[1]),
- o = n[0],
- l = n[1],
- p = e[2];
- return x(o) ? function (e, t, n, i) {
- var s = u(e, !0, i.inline),
- o = e,
- a = e in i.externalContext.sourcesContent,
- l = !v(e);
- if (i.inlinedStylesheets.indexOf(e) > - 1) return i.warnings.push('Ignoring remote @import of "' + e + '" as it has already been imported.'),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- if (i.localOnly && i.afterContent) return i.warnings.push('Ignoring remote @import of "' + e + '" as no callback given and after other content.'),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- if (l) return i.warnings.push('Skipping remote @import of "' + e + '" as no protocol given.'),
- i.outputTokens = i.outputTokens.concat(i.sourceTokens.slice(0, 1)),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- if (i.localOnly && !a) return i.warnings.push('Skipping remote @import of "' + e + '" as no callback given.'),
- i.outputTokens = i.outputTokens.concat(i.sourceTokens.slice(0, 1)),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- if (!s && i.afterContent) return i.warnings.push('Ignoring remote @import of "' + e + '" as resource is not allowed and after other content.'),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- if (!s) return i.warnings.push('Skipping remote @import of "' + e + '" as resource is not allowed.'),
- i.outputTokens = i.outputTokens.concat(i.sourceTokens.slice(0, 1)),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i);
- function c(s, a) {
- return s ? (i.errors.push('Broken @import declaration of "' + e + '" - ' + s), r.nextTick(function () {
- i.outputTokens = i.outputTokens.concat(i.sourceTokens.slice(0, 1)),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i)
- })) : (i.inline = i.externalContext.options.inline, i.isRemote = !0, i.externalContext.source = o, i.externalContext.sourcesContent[e] = a, i.externalContext.stats.originalSize += a.length, k(a, i.externalContext, i, function (e) {
- return e = F(e, t, n),
- i.outputTokens = i.outputTokens.concat(e),
- i.sourceTokens = i.sourceTokens.slice(1),
- S(i)
- }))
- }
- return i.inlinedStylesheets.push(e),
- a ? c(null, i.externalContext.sourcesContent[e]) : i.fetch(e, i.inlineRequest, i.inlineTimeout, c)
- }(o, l, p, t) : function (e, t, n, r) {
- var o,
- a = s.resolve(''),
- l = s.isAbsolute(e) ? s.resolve(a, '/' == e[0] ? e.substring(1) : e) : s.resolve(r.rebaseTo, e),
- p = s.relative(a, l),
- h = u(e, !1, r.inline),
- f = c(p),
- d = f in r.externalContext.sourcesContent;
- if (r.inlinedStylesheets.indexOf(l) > - 1) r.warnings.push('Ignoring local @import of "' + e + '" as it has already been imported.');
- else if (d || i.existsSync(l) && i.statSync(l).isFile()) if (!h && r.afterContent) r.warnings.push('Ignoring local @import of "' + e + '" as resource is not allowed and after other content.');
- else if (r.afterContent) r.warnings.push('Ignoring local @import of "' + e + '" as after other content.');
- else {
- if (h) return o = d ? r.externalContext.sourcesContent[f] : i.readFileSync(l, 'utf-8'),
- r.inlinedStylesheets.push(l),
- r.inline = r.externalContext.options.inline,
- r.externalContext.source = f,
- r.externalContext.sourcesContent[f] = o,
- r.externalContext.stats.originalSize += o.length,
- k(o, r.externalContext, r, function (e) {
- return e = F(e, t, n),
- r.outputTokens = r.outputTokens.concat(e),
- r.sourceTokens = r.sourceTokens.slice(1),
- S(r)
- });
- r.warnings.push('Skipping local @import of "' + e + '" as resource is not allowed.'),
- r.outputTokens = r.outputTokens.concat(r.sourceTokens.slice(0, 1))
- } else r.errors.push('Ignoring local @import of "' + e + '" as resource is missing.');
- return r.sourceTokens = r.sourceTokens.slice(1),
- S(r)
- }(o, l, p, t)
- }
- function F(e, t, n) {
- return t ? [
- [g.NESTED_BLOCK,
- [
- [g.NESTED_BLOCK_SCOPE,
- '@media ' + t,
- n]
- ],
- e]
- ] : e
- }
- t.exports = function (e, t, r) {
- return function (e, t, r) {
- return 'string' == typeof e ? E(e, t, r) : n.isBuffer(e) ? E(e.toString(), t, r) : Array.isArray(e) ? function (e, t, n) {
- return k(e.reduce(function (e, n) {
- return 'string' == typeof n ? (r = n, (i = e).push(D(C(r))), i) : _(n, t, e);
- var r,
- i
- }, [
- ]).join(''), t, {
- inline: [
- 'all'
- ]
- }, n)
- }(e, t, r) : 'object' == typeof e ? function (e, t, n) {
- return k(_(e, t, [
- ]).join(''), t, {
- inline: [
- 'all'
- ]
- }, n)
- }(e, t, r) : void 0
- }(e, t, function (e) {
- return o(e, t, function () {
- return l(t, function () {
- return r(e)
- })
- })
- })
- }
- }).call(this, {
- isBuffer: e('../../../is-buffer/index.js')
- }, e('_process'))
- },
- {
- '../../../is-buffer/index.js': 237,
- '../tokenizer/marker': 121,
- '../tokenizer/token': 122,
- '../tokenizer/tokenize': 123,
- '../utils/has-protocol': 126,
- '../utils/is-import': 130,
- '../utils/is-remote-resource': 131,
- './apply-source-maps': 107,
- './extract-import-url-and-media': 108,
- './is-allowed-resource': 110,
- './load-original-sources': 111,
- './normalize-path': 114,
- './rebase': 118,
- './rebase-local-map': 116,
- './rebase-remote-map': 117,
- './restore-import': 119,
- _process: 373,
- fs: 41,
- path: 372
- }
- ],
- 116: [
- function (e, t, n) {
- var r = e('path');
- t.exports = function (e, t, n) {
- var i = r.resolve(''),
- s = r.resolve(i, t),
- o = r.dirname(s);
- return e.sources = e.sources.map(function (e) {
- return r.relative(n, r.resolve(o, e))
- }),
- e
- }
- },
- {
- path: 372
- }
- ],
- 117: [
- function (e, t, n) {
- var r = e('path'),
- i = e('url');
- t.exports = function (e, t) {
- var n = r.dirname(t);
- return e.sources = e.sources.map(function (e) {
- return i.resolve(n, e)
- }),
- e
- }
- },
- {
- path: 372,
- url: 424
- }
- ],
- 118: [
- function (e, t, n) {
- var r = e('./extract-import-url-and-media'),
- i = e('./restore-import'),
- s = e('./rewrite-url'),
- o = e('../tokenizer/token'),
- a = e('../utils/is-import'),
- u = /^\/\*# sourceMappingURL=(\S+) \*\/$/;
- function l(e, t, n) {
- if (a(e[1])) {
- var o = r(e[1]),
- u = s(o[0], n),
- l = o[1];
- e[1] = i(u, l)
- }
- }
- function c(e, t) {
- var n = u.exec(e[1]);
- n && - 1 === n[1].indexOf('data:') && (e[1] = e[1].replace(n[1], s(n[1], t, !0)))
- }
- function p(e, t, n) {
- var r,
- i,
- o,
- a,
- u,
- l;
- for (o = 0, a = e.length; o < a; o++) for (u = 2, l = (r = e[o]).length; u < l; u++) i = r[u][1],
- t.isUrl(i) && (r[u][1] = s(i, n))
- }
- t.exports = function (e, t, n, r) {
- return t ? function e(t, n, r) {
- var i,
- s,
- a;
- for (s = 0, a = t.length; s < a; s++) switch ((i = t[s]) [0]) {
- case o.AT_RULE:
- l(i, 0, r);
- break;
- case o.AT_RULE_BLOCK:
- p(i[2], n, r);
- break;
- case o.COMMENT:
- c(i, r);
- break;
- case o.NESTED_BLOCK:
- e(i[2], n, r);
- break;
- case o.RULE:
- p(i[2], n, r)
- }
- return t
- }(e, n, r) : function (e, t, n) {
- var r,
- i,
- s;
- for (i = 0, s = e.length; i < s; i++) switch ((r = e[i]) [0]) {
- case o.AT_RULE:
- l(r, 0, n)
- }
- return e
- }(e, 0, r)
- }
- },
- {
- '../tokenizer/token': 122,
- '../utils/is-import': 130,
- './extract-import-url-and-media': 108,
- './restore-import': 119,
- './rewrite-url': 120
- }
- ],
- 119: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return ('@import ' + e + ' ' + t).trim()
- }
- },
- {
- }
- ],
- 120: [
- function (e, t, n) {
- (function (n) {
- var r = e('path'),
- i = e('url'),
- s = '"',
- o = '\'',
- a = 'url(',
- u = ')',
- l = /^["']/,
- c = /["']$/,
- p = /[\(\)]/,
- h = /^url\(/i,
- f = /\)$/,
- d = /\s/,
- m = 'win32' == n.platform;
- function g(e, t) {
- return t ? function (e) {
- return r.isAbsolute(e)
- }(e) && !y(t.toBase) ? e : y(e) || function (e) {
- return '#' == e[0]
- }(e) || function (e) {
- return /^\w+:\w+/.test(e)
- }(e) ? e : function (e) {
- return 0 === e.indexOf('data:')
- }(e) ? '\'' + e + '\'' : y(t.toBase) ? i.resolve(t.toBase, e) : t.absolute ? v(function (e, t) {
- return r.resolve(r.join(t.fromBase || '', e)).replace(t.toBase, '')
- }(e, t)) : v(function (e, t) {
- return r.relative(t.toBase, r.join(t.fromBase || '', e))
- }(e, t)) : e
- }
- function y(e) {
- return /^[^:]+?:\/\//.test(e) || 0 === e.indexOf('//')
- }
- function v(e) {
- return m ? e.replace(/\\/g, '/') : e
- }
- function b(e) {
- return e.indexOf(o) > - 1 ? s : e.indexOf(s) > - 1 ? o : (t = e, d.test(t) || function (e) {
- return p.test(e)
- }(e) ? o : '');
- var t
- }
- t.exports = function (e, t, n) {
- var r = e.replace(h, '').replace(f, '').trim(),
- i = r.replace(l, '').replace(c, '').trim(),
- p = r[0] == o || r[0] == s ? r[0] : b(i);
- return n ? g(i, t) : a + p + g(i, t) + p + u
- }
- }).call(this, e('_process'))
- },
- {
- _process: 373,
- path: 372,
- url: 424
- }
- ],
- 121: [
- function (e, t, n) {
- t.exports = {
- ASTERISK: '*',
- AT: '@',
- BACK_SLASH: '\\',
- CARRIAGE_RETURN: '\r',
- CLOSE_CURLY_BRACKET: '}',
- CLOSE_ROUND_BRACKET: ')',
- CLOSE_SQUARE_BRACKET: ']',
- COLON: ':',
- COMMA: ',',
- DOUBLE_QUOTE: '"',
- EXCLAMATION: '!',
- FORWARD_SLASH: '/',
- INTERNAL: '-clean-css-',
- NEW_LINE_NIX: '\n',
- OPEN_CURLY_BRACKET: '{',
- OPEN_ROUND_BRACKET: '(',
- OPEN_SQUARE_BRACKET: '[',
- SEMICOLON: ';',
- SINGLE_QUOTE: '\'',
- SPACE: ' ',
- TAB: '\t',
- UNDERSCORE: '_'
- }
- },
- {
- }
- ],
- 122: [
- function (e, t, n) {
- t.exports = {
- AT_RULE: 'at-rule',
- AT_RULE_BLOCK: 'at-rule-block',
- AT_RULE_BLOCK_SCOPE: 'at-rule-block-scope',
- COMMENT: 'comment',
- NESTED_BLOCK: 'nested-block',
- NESTED_BLOCK_SCOPE: 'nested-block-scope',
- PROPERTY: 'property',
- PROPERTY_BLOCK: 'property-block',
- PROPERTY_NAME: 'property-name',
- PROPERTY_VALUE: 'property-value',
- RAW: 'raw',
- RULE: 'rule',
- RULE_SCOPE: 'rule-scope'
- }
- },
- {
- }
- ],
- 123: [
- function (e, t, n) {
- var r = e('./marker'),
- i = e('./token'),
- s = e('../utils/format-position'),
- o = {
- BLOCK: 'block',
- COMMENT: 'comment',
- DOUBLE_QUOTE: 'double-quote',
- RULE: 'rule',
- SINGLE_QUOTE: 'single-quote'
- },
- a = [
- '@charset',
- '@import'
- ],
- u = [
- '@-moz-document',
- '@document',
- '@-moz-keyframes',
- '@-ms-keyframes',
- '@-o-keyframes',
- '@-webkit-keyframes',
- '@keyframes',
- '@media',
- '@supports'
- ],
- l = /\/\* clean\-css ignore:end \*\/$/,
- c = /^\/\* clean\-css ignore:start \*\//,
- p = [
- '@bottom-center',
- '@bottom-left',
- '@bottom-left-corner',
- '@bottom-right',
- '@bottom-right-corner',
- '@left-bottom',
- '@left-middle',
- '@left-top',
- '@right-bottom',
- '@right-middle',
- '@right-top',
- '@top-center',
- '@top-left',
- '@top-left-corner',
- '@top-right',
- '@top-right-corner'
- ],
- h = [
- '@footnote',
- '@footnotes',
- '@left',
- '@page-float-bottom',
- '@page-float-top',
- '@right'
- ],
- f = /^\[\s{0,31}\d+\s{0,31}\]$/,
- d = /[\s\(]/,
- m = /[\s|\}]*$/;
- function g(e) {
- return c.test(e.join('') + r.FORWARD_SLASH)
- }
- function y(e) {
- return l.test(e.join('') + r.FORWARD_SLASH)
- }
- function v(e, t, n, r) {
- var i = e[2];
- return n.inputSourceMapTracker.isTracking(i) ? n.inputSourceMapTracker.originalPositionFor(e, t.length, r) : e
- }
- function b(e) {
- var t = e[0] == r.AT || e[0] == r.UNDERSCORE,
- n = e.join('').split(d) [0];
- return t && u.indexOf(n) > - 1 ? i.NESTED_BLOCK : t && a.indexOf(n) > - 1 ? i.AT_RULE : t ? i.AT_RULE_BLOCK : i.RULE
- }
- function x(e) {
- return e == i.RULE ? i.RULE_SCOPE : e == i.NESTED_BLOCK ? i.NESTED_BLOCK_SCOPE : e == i.AT_RULE_BLOCK ? i.AT_RULE_BLOCK_SCOPE : void 0
- }
- function A(e) {
- var t = e.join('').trim();
- return p.indexOf(t) > - 1 || h.indexOf(t) > - 1
- }
- function E(e) {
- return f.test(e.join('') + r.CLOSE_SQUARE_BRACKET)
- }
- t.exports = function (e, t) {
- return function e(t, n, a, u) {
- for (var l, c, p, h, f, d, _, C, w, D, k, S, T, F, O, B, P = [
- ], N = P, R = [
- ], L = [
- ], I = a.level, j = [
- ], M = [
- ], U = [
- ], V = 0, z = !1, q = !1, K = !1, $ = !1, Y = !1, W = a.position; W.index < t.length; W.index++) {
- var G = t[W.index];
- if (_ = I == o.SINGLE_QUOTE || I == o.DOUBLE_QUOTE, C = G == r.SPACE || G == r.TAB, w = G == r.NEW_LINE_NIX, D = G == r.NEW_LINE_NIX && t[W.index - 1] == r.CARRIAGE_RETURN, k = G == r.CARRIAGE_RETURN && t[W.index + 1] && t[W.index + 1] != r.NEW_LINE_NIX, S = !q && I != o.COMMENT && !_ && G == r.ASTERISK && t[W.index - 1] == r.FORWARD_SLASH, F = !z && !_ && G == r.FORWARD_SLASH && t[W.index - 1] == r.ASTERISK, T = I == o.COMMENT && F, V = Math.max(V, 0), h = 0 === M.length ? [
- W.line,
- W.column,
- W.source
- ] : h, O) M.push(G);
- else if (T || I != o.COMMENT) if (S || T || !K) if (S && (I == o.BLOCK || I == o.RULE) && M.length > 1) L.push(h),
- M.push(G),
- U.push(M.slice(0, M.length - 2)),
- M = M.slice(M.length - 2),
- h = [
- W.line,
- W.column - 1,
- W.source
- ],
- j.push(I),
- I = o.COMMENT;
- else if (S) j.push(I),
- I = o.COMMENT,
- M.push(G);
- else if (T && g(M)) f = M.join('').trim() + G,
- l = [
- i.COMMENT,
- f,
- [
- v(h, f, n)
- ]
- ],
- N.push(l),
- K = !0,
- h = L.pop() || null,
- M = U.pop() || [
- ];
- else if (T && y(M)) f = M.join('') + G,
- B = f.lastIndexOf(r.FORWARD_SLASH + r.ASTERISK),
- d = f.substring(0, B),
- l = [
- i.RAW,
- d,
- [
- v(h, d, n)
- ]
- ],
- N.push(l),
- d = f.substring(B),
- h = [
- W.line,
- W.column - d.length + 1,
- W.source
- ],
- l = [
- i.COMMENT,
- d,
- [
- v(h, d, n)
- ]
- ],
- N.push(l),
- K = !1,
- I = j.pop(),
- h = L.pop() || null,
- M = U.pop() || [
- ];
- else if (T) f = M.join('').trim() + G,
- l = [
- i.COMMENT,
- f,
- [
- v(h, f, n)
- ]
- ],
- N.push(l),
- I = j.pop(),
- h = L.pop() || null,
- M = U.pop() || [
- ];
- else if (F && t[W.index + 1] != r.ASTERISK) n.warnings.push('Unexpected \'*/\' at ' + s([W.line,
- W.column,
- W.source]) + '.'),
- M = [
- ];
- else if (G != r.SINGLE_QUOTE || _) if (G == r.SINGLE_QUOTE && I == o.SINGLE_QUOTE) I = j.pop(),
- M.push(G);
- else if (G != r.DOUBLE_QUOTE || _) if (G == r.DOUBLE_QUOTE && I == o.DOUBLE_QUOTE) I = j.pop(),
- M.push(G);
- else if (!S && !T && G != r.CLOSE_ROUND_BRACKET && G != r.OPEN_ROUND_BRACKET && I != o.COMMENT && !_ && V > 0) M.push(G);
- else if (G != r.OPEN_ROUND_BRACKET || _ || I == o.COMMENT || $) if (G != r.CLOSE_ROUND_BRACKET || _ || I == o.COMMENT || $) if (G == r.SEMICOLON && I == o.BLOCK && M[0] == r.AT) f = M.join('').trim(),
- P.push([i.AT_RULE,
- f,
- [
- v(h, f, n)
- ]]),
- M = [
- ];
- else if (G == r.COMMA && I == o.BLOCK && c) f = M.join('').trim(),
- c[1].push([x(c[0]),
- f,
- [
- v(h, f, n, c[1].length)
- ]]),
- M = [
- ];
- else if (G == r.COMMA && I == o.BLOCK && b(M) == i.AT_RULE) M.push(G);
- else if (G == r.COMMA && I == o.BLOCK) c = [
- b(M),
- [
- ],
- [
- ]
- ],
- f = M.join('').trim(),
- c[1].push([x(c[0]),
- f,
- [
- v(h, f, n, 0)
- ]]),
- M = [
- ];
- else if (G == r.OPEN_CURLY_BRACKET && I == o.BLOCK && c && c[0] == i.NESTED_BLOCK) f = M.join('').trim(),
- c[1].push([i.NESTED_BLOCK_SCOPE,
- f,
- [
- v(h, f, n)
- ]]),
- P.push(c),
- j.push(I),
- W.column++,
- W.index++,
- M = [
- ],
- c[2] = e(t, n, a, !0),
- c = null;
- else if (G == r.OPEN_CURLY_BRACKET && I == o.BLOCK && b(M) == i.NESTED_BLOCK) f = M.join('').trim(),
- (c = c || [
- i.NESTED_BLOCK,
- [
- ],
- [
- ]
- ]) [1].push([i.NESTED_BLOCK_SCOPE,
- f,
- [
- v(h, f, n)
- ]]),
- P.push(c),
- j.push(I),
- W.column++,
- W.index++,
- M = [
- ],
- c[2] = e(t, n, a, !0),
- c = null;
- else if (G == r.OPEN_CURLY_BRACKET && I == o.BLOCK) f = M.join('').trim(),
- (c = c || [
- b(M),
- [
- ],
- [
- ]
- ]) [1].push([x(c[0]),
- f,
- [
- v(h, f, n, c[1].length)
- ]]),
- N = c[2],
- P.push(c),
- j.push(I),
- I = o.RULE,
- M = [
- ];
- else if (G == r.OPEN_CURLY_BRACKET && I == o.RULE && $) R.push(c),
- c = [
- i.PROPERTY_BLOCK,
- [
- ]
- ],
- p.push(c),
- N = c[1],
- j.push(I),
- I = o.RULE,
- $ = !1;
- else if (G == r.OPEN_CURLY_BRACKET && I == o.RULE && A(M)) f = M.join('').trim(),
- R.push(c),
- (c = [
- i.AT_RULE_BLOCK,
- [
- ],
- [
- ]
- ]) [1].push([i.AT_RULE_BLOCK_SCOPE,
- f,
- [
- v(h, f, n)
- ]]),
- N.push(c),
- N = c[2],
- j.push(I),
- I = o.RULE,
- M = [
- ];
- else if (G != r.COLON || I != o.RULE || $) if (G == r.SEMICOLON && I == o.RULE && p && R.length > 0 && M.length > 0 && M[0] == r.AT) f = M.join('').trim(),
- c[1].push([i.AT_RULE,
- f,
- [
- v(h, f, n)
- ]]),
- M = [
- ];
- else if (G == r.SEMICOLON && I == o.RULE && p && M.length > 0) f = M.join('').trim(),
- p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]),
- p = null,
- $ = !1,
- M = [
- ];
- else if (G == r.SEMICOLON && I == o.RULE && p && 0 === M.length) p = null,
- $ = !1;
- else if (G == r.SEMICOLON && I == o.RULE && M.length > 0 && M[0] == r.AT) f = M.join(''),
- N.push([i.AT_RULE,
- f,
- [
- v(h, f, n)
- ]]),
- $ = !1,
- M = [
- ];
- else if (G == r.SEMICOLON && I == o.RULE && Y) Y = !1,
- M = [
- ];
- else if (G == r.SEMICOLON && I == o.RULE && 0 === M.length);
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && p && $ && M.length > 0 && R.length > 0) f = M.join(''),
- p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]),
- p = null,
- c = R.pop(),
- N = c[2],
- I = j.pop(),
- $ = !1,
- M = [
- ];
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && p && M.length > 0 && M[0] == r.AT && R.length > 0) f = M.join(''),
- c[1].push([i.AT_RULE,
- f,
- [
- v(h, f, n)
- ]]),
- p = null,
- c = R.pop(),
- N = c[2],
- I = j.pop(),
- $ = !1,
- M = [
- ];
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && p && R.length > 0) p = null,
- c = R.pop(),
- N = c[2],
- I = j.pop(),
- $ = !1;
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && p && M.length > 0) f = M.join(''),
- p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]),
- p = null,
- c = R.pop(),
- N = P,
- I = j.pop(),
- $ = !1,
- M = [
- ];
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && M.length > 0 && M[0] == r.AT) p = null,
- c = null,
- f = M.join('').trim(),
- N.push([i.AT_RULE,
- f,
- [
- v(h, f, n)
- ]]),
- N = P,
- I = j.pop(),
- $ = !1,
- M = [
- ];
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE && j[j.length - 1] == o.RULE) p = null,
- c = R.pop(),
- N = c[2],
- I = j.pop(),
- $ = !1,
- Y = !0,
- M = [
- ];
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.RULE) p = null,
- c = null,
- N = P,
- I = j.pop(),
- $ = !1;
- else if (G == r.CLOSE_CURLY_BRACKET && I == o.BLOCK && !u && W.index <= t.length - 1) n.warnings.push('Unexpected \'}\' at ' + s([W.line,
- W.column,
- W.source]) + '.'),
- M.push(G);
- else {
- if (G == r.CLOSE_CURLY_BRACKET && I == o.BLOCK) break;
- G == r.OPEN_ROUND_BRACKET && I == o.RULE && $ ? (M.push(G), V++) : G == r.CLOSE_ROUND_BRACKET && I == o.RULE && $ && 1 == V ? (M.push(G), f = M.join('').trim(), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), V--, M = [
- ]) : G == r.CLOSE_ROUND_BRACKET && I == o.RULE && $ ? (M.push(G), V--) : G == r.FORWARD_SLASH && t[W.index + 1] != r.ASTERISK && I == o.RULE && $ && M.length > 0 ? (f = M.join('').trim(), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), p.push([i.PROPERTY_VALUE,
- G,
- [
- [W.line,
- W.column,
- W.source]
- ]]), M = [
- ]) : G == r.FORWARD_SLASH && t[W.index + 1] != r.ASTERISK && I == o.RULE && $ ? (p.push([i.PROPERTY_VALUE,
- G,
- [
- [W.line,
- W.column,
- W.source]
- ]]), M = [
- ]) : G == r.COMMA && I == o.RULE && $ && M.length > 0 ? (f = M.join('').trim(), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), p.push([i.PROPERTY_VALUE,
- G,
- [
- [W.line,
- W.column,
- W.source]
- ]]), M = [
- ]) : G == r.COMMA && I == o.RULE && $ ? (p.push([i.PROPERTY_VALUE,
- G,
- [
- [W.line,
- W.column,
- W.source]
- ]]), M = [
- ]) : G == r.CLOSE_SQUARE_BRACKET && p && p.length > 1 && M.length > 0 && E(M) ? (M.push(G), f = M.join('').trim(), p[p.length - 1][1] += f, M = [
- ]) : (C || w && !D) && I == o.RULE && $ && p && M.length > 0 ? (f = M.join('').trim(), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), M = [
- ]) : D && I == o.RULE && $ && p && M.length > 1 ? (f = M.join('').trim(), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), M = [
- ]) : D && I == o.RULE && $ ? M = [
- ] : 1 == M.length && D ? M.pop() : (M.length > 0 || !C && !w && !D && !k) && M.push(G)
- } else f = M.join('').trim(),
- p = [
- i.PROPERTY,
- [
- i.PROPERTY_NAME,
- f,
- [
- v(h, f, n)
- ]
- ]
- ],
- N.push(p),
- $ = !0,
- M = [
- ];
- else M.push(G),
- V--;
- else M.push(G),
- V++;
- else j.push(I),
- I = o.DOUBLE_QUOTE,
- M.push(G);
- else j.push(I),
- I = o.SINGLE_QUOTE,
- M.push(G);
- else M.push(G);
- else M.push(G);
- O = !O && G == r.BACK_SLASH,
- z = S,
- q = T,
- W.line = D || w || k ? W.line + 1 : W.line,
- W.column = D || w || k ? 0 : W.column + 1
- }
- return $ && n.warnings.push('Missing \'}\' at ' + s([W.line,
- W.column,
- W.source]) + '.'),
- $ && M.length > 0 && (f = M.join('').replace(m, ''), p.push([i.PROPERTY_VALUE,
- f,
- [
- v(h, f, n)
- ]]), M = [
- ]),
- M.length > 0 && n.warnings.push('Invalid character(s) \'' + M.join('') + '\' at ' + s(h) + '. Ignoring.'),
- P
- }(e, t, {
- level: o.BLOCK,
- position: {
- source: t.source || void 0,
- line: 1,
- column: 0,
- index: 0
- }
- }, !1)
- }
- },
- {
- '../utils/format-position': 125,
- './marker': 121,
- './token': 122
- }
- ],
- 124: [
- function (e, t, n) {
- t.exports = function e(t) {
- for (var n = t.slice(0), r = 0, i = n.length; r < i; r++) Array.isArray(n[r]) && (n[r] = e(n[r]));
- return n
- }
- },
- {
- }
- ],
- 125: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = e[0],
- n = e[1],
- r = e[2];
- return r ? r + ':' + t + ':' + n : t + ':' + n
- }
- },
- {
- }
- ],
- 126: [
- function (e, t, n) {
- var r = /^\/\//;
- t.exports = function (e) {
- return !r.test(e)
- }
- },
- {
- }
- ],
- 127: [
- function (e, t, n) {
- var r = /^data:(\S*?)?(;charset=[^;]+)?(;[^,]+?)?,(.+)/;
- t.exports = function (e) {
- return r.test(e)
- }
- },
- {
- }
- ],
- 128: [
- function (e, t, n) {
- var r = /^http:\/\//;
- t.exports = function (e) {
- return r.test(e)
- }
- },
- {
- }
- ],
- 129: [
- function (e, t, n) {
- var r = /^https:\/\//;
- t.exports = function (e) {
- return r.test(e)
- }
- },
- {
- }
- ],
- 130: [
- function (e, t, n) {
- var r = /^@import/i;
- t.exports = function (e) {
- return r.test(e)
- }
- },
- {
- }
- ],
- 131: [
- function (e, t, n) {
- var r = /^(\w+:\/\/|\/\/)/;
- t.exports = function (e) {
- return r.test(e)
- }
- },
- {
- }
- ],
- 132: [
- function (e, t, n) {
- var r = /([0-9]+)/;
- function i(e) {
- return '' + parseInt(e) == e ? parseInt(e) : e
- }
- t.exports = function (e, t) {
- var n,
- s,
- o,
- a,
- u = ('' + e).split(r).map(i),
- l = ('' + t).split(r).map(i);
- for (o = 0, a = Math.min(u.length, l.length); o < a; o++) if ((n = u[o]) != (s = l[o])) return n > s ? 1 : - 1;
- return u.length > l.length ? 1 : u.length == l.length ? 0 : - 1
- }
- },
- {
- }
- ],
- 133: [
- function (e, t, n) {
- t.exports = function e(t, n) {
- var r,
- i,
- s,
- o = {
- };
- for (r in t) s = t[r],
- Array.isArray(s) ? o[r] = s.slice(0) : o[r] = 'object' == typeof s && null !== s ? e(s, {
- }) : s;
- for (i in n) s = n[i],
- i in o && Array.isArray(s) ? o[i] = s.slice(0) : o[i] = i in o && 'object' == typeof s && null !== s ? e(o[i], s) : s;
- return o
- }
- },
- {
- }
- ],
- 134: [
- function (e, t, n) {
- var r = e('../tokenizer/marker');
- t.exports = function (e, t) {
- var n,
- i = r.OPEN_ROUND_BRACKET,
- s = r.CLOSE_ROUND_BRACKET,
- o = 0,
- a = 0,
- u = 0,
- l = e.length,
- c = [
- ];
- if ( - 1 == e.indexOf(t)) return [e];
- if ( - 1 == e.indexOf(i)) return e.split(t);
- for (; a < l; ) e[a] == i ? o++ : e[a] == s && o--,
- 0 === o && a > 0 && a + 1 < l && e[a] == t && (c.push(e.substring(u, a)), u = a + 1),
- a++;
- return u < a + 1 && ((n = e.substring(u)) [n.length - 1] == t && (n = n.substring(0, n.length - 1)), c.push(n)),
- c
- }
- },
- {
- '../tokenizer/marker': 121
- }
- ],
- 135: [
- function (e, t, n) {
- var r = '',
- i = e('../options/format').Breaks,
- s = e('../options/format').Spaces,
- o = e('../tokenizer/marker'),
- a = e('../tokenizer/token');
- function u(e) {
- return 'filter' == e[1][1] || '-ms-filter' == e[1][1]
- }
- function l(e, t, n) {
- return !e.spaceAfterClosingBrace && function (e) {
- return 'background' == e[1][1] || 'transform' == e[1][1] || 'src' == e[1][1]
- }(t) && function (e, t) {
- return e[t][1][e[t][1].length - 1] == o.CLOSE_ROUND_BRACKET
- }(t, n) || function (e, t) {
- return e[t + 1] && e[t + 1][1] == o.FORWARD_SLASH
- }(t, n) || function (e, t) {
- return e[t][1] == o.FORWARD_SLASH
- }(t, n) || function (e, t) {
- return e[t + 1] && e[t + 1][1] == o.COMMA
- }(t, n) || function (e, t) {
- return e[t][1] == o.COMMA
- }(t, n)
- }
- function c(e, t) {
- for (var n = e.store, r = 0, i = t.length; r < i; r++) n(e, t[r]),
- r < i - 1 && n(e, b(e))
- }
- function p(e, t) {
- for (var n = function (e) {
- for (var t = e.length - 1; t >= 0 && e[t][0] == a.COMMENT; t--);
- return t
- }(t), r = 0, i = t.length; r < i; r++) h(e, t, r, n)
- }
- function h(e, t, n, u) {
- var l,
- h = e.store,
- d = t[n],
- b = d[2][0] == a.PROPERTY_BLOCK;
- l = e.format ? !(!e.format.semicolonAfterLastProperty && !b) || n < u : n < u || b;
- var x = n === u;
- switch (d[0]) {
- case a.AT_RULE:
- h(e, d),
- h(e, v(e, i.AfterProperty, !1));
- break;
- case a.AT_RULE_BLOCK:
- c(e, d[1]),
- h(e, g(e, i.AfterRuleBegins, !0)),
- p(e, d[2]),
- h(e, y(e, i.AfterRuleEnds, !1, x));
- break;
- case a.COMMENT:
- h(e, d);
- break;
- case a.PROPERTY:
- h(e, d[1]),
- h(e, function (e) {
- return e.format ? o.COLON + (m(e, s.BeforeValue) ? o.SPACE : r) : o.COLON
- }(e)),
- f(e, d),
- h(e, l ? v(e, i.AfterProperty, x) : r);
- break;
- case a.RAW:
- h(e, d)
- }
- }
- function f(e, t) {
- var n,
- r,
- s = e.store;
- if (t[2][0] == a.PROPERTY_BLOCK) s(e, g(e, i.AfterBlockBegins, !1)),
- p(e, t[2][1]),
- s(e, y(e, i.AfterBlockEnds, !1, !0));
- else for (n = 2, r = t.length; n < r; n++) s(e, t[n]),
- n < r - 1 && (u(t) || !l(e, t, n)) && s(e, o.SPACE)
- }
- function d(e, t) {
- return e.format && e.format.breaks[t]
- }
- function m(e, t) {
- return e.format && e.format.spaces[t]
- }
- function g(e, t, n) {
- return e.format ? (e.indentBy += e.format.indentBy, e.indentWith = e.format.indentWith.repeat(e.indentBy), (n && m(e, s.BeforeBlockBegins) ? o.SPACE : r) + o.OPEN_CURLY_BRACKET + (d(e, t) ? e.format.breakWith : r) + e.indentWith) : o.OPEN_CURLY_BRACKET
- }
- function y(e, t, n, s) {
- return e.format ? (e.indentBy -= e.format.indentBy, e.indentWith = e.format.indentWith.repeat(e.indentBy), (d(e, i.AfterProperty) || n && d(e, i.BeforeBlockEnds) ? e.format.breakWith : r) + e.indentWith + o.CLOSE_CURLY_BRACKET + (s ? r : (d(e, t) ? e.format.breakWith : r) + e.indentWith)) : o.CLOSE_CURLY_BRACKET
- }
- function v(e, t, n) {
- return e.format ? o.SEMICOLON + (n || !d(e, t) ? r : e.format.breakWith + e.indentWith) : o.SEMICOLON
- }
- function b(e) {
- return e.format ? o.COMMA + (d(e, i.BetweenSelectors) ? e.format.breakWith : r) + e.indentWith : o.COMMA
- }
- t.exports = {
- all: function e(t, n) {
- var s,
- o,
- u,
- l,
- h = t.store;
- for (u = 0, l = n.length; u < l; u++) switch (o = u == l - 1, (s = n[u]) [0]) {
- case a.AT_RULE:
- h(t, s),
- h(t, v(t, i.AfterAtRule, o));
- break;
- case a.AT_RULE_BLOCK:
- c(t, s[1]),
- h(t, g(t, i.AfterRuleBegins, !0)),
- p(t, s[2]),
- h(t, y(t, i.AfterRuleEnds, !1, o));
- break;
- case a.NESTED_BLOCK:
- c(t, s[1]),
- h(t, g(t, i.AfterBlockBegins, !0)),
- e(t, s[2]),
- h(t, y(t, i.AfterBlockEnds, !0, o));
- break;
- case a.COMMENT:
- h(t, s),
- h(t, d(t, i.AfterComment) ? t.format.breakWith : r);
- break;
- case a.RAW:
- h(t, s);
- break;
- case a.RULE:
- c(t, s[1]),
- h(t, g(t, i.AfterRuleBegins, !0)),
- p(t, s[2]),
- h(t, y(t, i.AfterRuleEnds, !1, o))
- }
- },
- body: p,
- property: h,
- rules: c,
- value: f
- }
- },
- {
- '../options/format': 99,
- '../tokenizer/marker': 121,
- '../tokenizer/token': 122
- }
- ],
- 136: [
- function (e, t, n) {
- var r = e('./helpers');
- function i(e, t) {
- e.output.push('string' == typeof t ? t : t[1])
- }
- function s() {
- return {
- output: [
- ],
- store: i
- }
- }
- t.exports = {
- all: function (e) {
- var t = s();
- return r.all(t, e),
- t.output.join('')
- },
- body: function (e) {
- var t = s();
- return r.body(t, e),
- t.output.join('')
- },
- property: function (e, t) {
- var n = s();
- return r.property(n, e, t, !0),
- n.output.join('')
- },
- rules: function (e) {
- var t = s();
- return r.rules(t, e),
- t.output.join('')
- },
- value: function (e) {
- var t = s();
- return r.value(t, e),
- t.output.join('')
- }
- }
- },
- {
- './helpers': 135
- }
- ],
- 137: [
- function (e, t, n) {
- var r = e('./helpers').all;
- function i(e, t) {
- var n = 'string' == typeof t ? t : t[1];
- (0, e.wrap) (e, n),
- o(e, n),
- e.output.push(n)
- }
- function s(e, t) {
- e.column + t.length > e.format.wrapAt && (o(e, e.format.breakWith), e.output.push(e.format.breakWith))
- }
- function o(e, t) {
- var n = t.split('\n');
- e.line += n.length - 1,
- e.column = n.length > 1 ? 0 : e.column + n.pop().length
- }
- t.exports = function (e, t) {
- var n = {
- column: 0,
- format: t.options.format,
- indentBy: 0,
- indentWith: '',
- line: 1,
- output: [
- ],
- spaceAfterClosingBrace: t.options.compatibility.properties.spaceAfterClosingBrace,
- store: i,
- wrap: t.options.format.wrapAt ? s : function () {
- }
- };
- return r(n, e),
- {
- styles: n.output.join('')
- }
- }
- },
- {
- './helpers': 135
- }
- ],
- 138: [
- function (e, t, n) {
- (function (n) {
- var r = e('source-map').SourceMapGenerator,
- i = e('./helpers').all,
- s = e('../utils/is-remote-resource'),
- o = 'win32' == n.platform,
- a = /\//g,
- u = '$stdin',
- l = '\\';
- function c(e, t) {
- var n = 'string' == typeof t,
- r = n ? t : t[1],
- i = n ? null : t[2];
- (0, e.wrap) (e, r),
- h(e, r, i),
- e.output.push(r)
- }
- function p(e, t) {
- e.column + t.length > e.format.wrapAt && (h(e, e.format.breakWith, !1), e.output.push(e.format.breakWith))
- }
- function h(e, t, n) {
- var r = t.split('\n');
- n && function (e, t) {
- for (var n = 0, r = t.length; n < r; n++) f(e, t[n])
- }(e, n),
- e.line += r.length - 1,
- e.column = r.length > 1 ? 0 : e.column + r.pop().length
- }
- function f(e, t) {
- var n = t[0],
- r = t[1],
- i = t[2],
- c = i,
- p = c || u;
- o && c && !s(c) && (p = c.replace(a, l)),
- e.outputMap.addMapping({
- generated: {
- line: e.line,
- column: e.column
- },
- source: p,
- original: {
- line: n,
- column: r
- }
- }),
- e.inlineSources && i in e.sourcesContent && e.outputMap.setSourceContent(p, e.sourcesContent[i])
- }
- t.exports = function (e, t) {
- var n = {
- column: 0,
- format: t.options.format,
- indentBy: 0,
- indentWith: '',
- inlineSources: t.options.sourceMapInlineSources,
- line: 1,
- output: [
- ],
- outputMap: new r,
- sourcesContent: t.sourcesContent,
- spaceAfterClosingBrace: t.options.compatibility.properties.spaceAfterClosingBrace,
- store: c,
- wrap: t.options.format.wrapAt ? p : function () {
- }
- };
- return i(n, e),
- {
- sourceMap: n.outputMap,
- styles: n.output.join('')
- }
- }
- }).call(this, e('_process'))
- },
- {
- '../utils/is-remote-resource': 131,
- './helpers': 135,
- _process: 373,
- 'source-map': 149
- }
- ],
- 139: [
- function (e, t, n) {
- var r = e('./util'),
- i = Object.prototype.hasOwnProperty,
- s = 'undefined' != typeof Map;
- function o() {
- this._array = [
- ],
- this._set = s ? new Map : Object.create(null)
- }
- o.fromArray = function (e, t) {
- for (var n = new o, r = 0, i = e.length; r < i; r++) n.add(e[r], t);
- return n
- },
- o.prototype.size = function () {
- return s ? this._set.size : Object.getOwnPropertyNames(this._set).length
- },
- o.prototype.add = function (e, t) {
- var n = s ? e : r.toSetString(e),
- o = s ? this.has(e) : i.call(this._set, n),
- a = this._array.length;
- o && !t || this._array.push(e),
- o || (s ? this._set.set(e, a) : this._set[n] = a)
- },
- o.prototype.has = function (e) {
- if (s) return this._set.has(e);
- var t = r.toSetString(e);
- return i.call(this._set, t)
- },
- o.prototype.indexOf = function (e) {
- if (s) {
- var t = this._set.get(e);
- if (t >= 0) return t
- } else {
- var n = r.toSetString(e);
- if (i.call(this._set, n)) return this._set[n]
- }
- throw new Error('"' + e + '" is not in the set.')
- },
- o.prototype.at = function (e) {
- if (e >= 0 && e < this._array.length) return this._array[e];
- throw new Error('No element indexed by ' + e)
- },
- o.prototype.toArray = function () {
- return this._array.slice()
- },
- n.ArraySet = o
- },
- {
- './util': 148
- }
- ],
- 140: [
- function (e, t, n) {
- var r = e('./base64');
- n.encode = function (e) {
- var t,
- n = '',
- i = function (e) {
- return e < 0 ? 1 + ( - e << 1) : 0 + (e << 1)
- }(e);
- do {
- t = 31 & i,
- (i >>>= 5) > 0 && (t |= 32),
- n += r.encode(t)
- } while (i > 0);
- return n
- },
- n.decode = function (e, t, n) {
- var i,
- s,
- o,
- a,
- u = e.length,
- l = 0,
- c = 0;
- do {
- if (t >= u) throw new Error('Expected more digits in base 64 VLQ value.');
- if ( - 1 === (s = r.decode(e.charCodeAt(t++)))) throw new Error('Invalid base64 digit: ' + e.charAt(t - 1));
- i = !!(32 & s),
- l += (s &= 31) << c,
- c += 5
- } while (i);
- n.value = (a = (o = l) >> 1, 1 == (1 & o) ? - a : a),
- n.rest = t
- }
- },
- {
- './base64': 141
- }
- ],
- 141: [
- function (e, t, n) {
- var r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
- n.encode = function (e) {
- if (0 <= e && e < r.length) return r[e];
- throw new TypeError('Must be between 0 and 63: ' + e)
- },
- n.decode = function (e) {
- return 65 <= e && e <= 90 ? e - 65 : 97 <= e && e <= 122 ? e - 97 + 26 : 48 <= e && e <= 57 ? e - 48 + 52 : 43 == e ? 62 : 47 == e ? 63 : - 1
- }
- },
- {
- }
- ],
- 142: [
- function (e, t, n) {
- n.GREATEST_LOWER_BOUND = 1,
- n.LEAST_UPPER_BOUND = 2,
- n.search = function (e, t, r, i) {
- if (0 === t.length) return - 1;
- var s = function e(t, r, i, s, o, a) {
- var u = Math.floor((r - t) / 2) + t,
- l = o(i, s[u], !0);
- return 0 === l ? u : l > 0 ? r - u > 1 ? e(u, r, i, s, o, a) : a == n.LEAST_UPPER_BOUND ? r < s.length ? r : - 1 : u : u - t > 1 ? e(t, u, i, s, o, a) : a == n.LEAST_UPPER_BOUND ? u : t < 0 ? - 1 : t
- }( - 1, t.length, e, t, r, i || n.GREATEST_LOWER_BOUND);
- if (s < 0) return - 1;
- for (; s - 1 >= 0 && 0 === r(t[s], t[s - 1], !0); ) --s;
- return s
- }
- },
- {
- }
- ],
- 143: [
- function (e, t, n) {
- var r = e('./util');
- function i() {
- this._array = [
- ],
- this._sorted = !0,
- this._last = {
- generatedLine: - 1,
- generatedColumn: 0
- }
- }
- i.prototype.unsortedForEach = function (e, t) {
- this._array.forEach(e, t)
- },
- i.prototype.add = function (e) {
- var t,
- n,
- i,
- s,
- o,
- a;
- t = this._last,
- n = e,
- i = t.generatedLine,
- s = n.generatedLine,
- o = t.generatedColumn,
- a = n.generatedColumn,
- s > i || s == i && a >= o || r.compareByGeneratedPositionsInflated(t, n) <= 0 ? (this._last = e, this._array.push(e)) : (this._sorted = !1, this._array.push(e))
- },
- i.prototype.toArray = function () {
- return this._sorted || (this._array.sort(r.compareByGeneratedPositionsInflated), this._sorted = !0),
- this._array
- },
- n.MappingList = i
- },
- {
- './util': 148
- }
- ],
- 144: [
- function (e, t, n) {
- function r(e, t, n) {
- var r = e[t];
- e[t] = e[n],
- e[n] = r
- }
- function i(e, t, n, s) {
- if (n < s) {
- var o = n - 1;
- r(e, (c = n, p = s, Math.round(c + Math.random() * (p - c))), s);
- for (var a = e[s], u = n; u < s; u++) t(e[u], a) <= 0 && r(e, o += 1, u);
- r(e, o + 1, u);
- var l = o + 1;
- i(e, t, n, l - 1),
- i(e, t, l + 1, s)
- }
- var c,
- p
- }
- n.quickSort = function (e, t) {
- i(e, t, 0, e.length - 1)
- }
- },
- {
- }
- ],
- 145: [
- function (e, t, n) {
- var r = e('./util'),
- i = e('./binary-search'),
- s = e('./array-set').ArraySet,
- o = e('./base64-vlq'),
- a = e('./quick-sort').quickSort;
- function u(e, t) {
- var n = e;
- return 'string' == typeof e && (n = r.parseSourceMapInput(e)),
- null != n.sections ? new p(n, t) : new l(n, t)
- }
- function l(e, t) {
- var n = e;
- 'string' == typeof e && (n = r.parseSourceMapInput(e));
- var i = r.getArg(n, 'version'),
- o = r.getArg(n, 'sources'),
- a = r.getArg(n, 'names', [
- ]),
- u = r.getArg(n, 'sourceRoot', null),
- l = r.getArg(n, 'sourcesContent', null),
- c = r.getArg(n, 'mappings'),
- p = r.getArg(n, 'file', null);
- if (i != this._version) throw new Error('Unsupported version: ' + i);
- u && (u = r.normalize(u)),
- o = o.map(String).map(r.normalize).map(function (e) {
- return u && r.isAbsolute(u) && r.isAbsolute(e) ? r.relative(u, e) : e
- }),
- this._names = s.fromArray(a.map(String), !0),
- this._sources = s.fromArray(o, !0),
- this._absoluteSources = this._sources.toArray().map(function (e) {
- return r.computeSourceURL(u, e, t)
- }),
- this.sourceRoot = u,
- this.sourcesContent = l,
- this._mappings = c,
- this._sourceMapURL = t,
- this.file = p
- }
- function c() {
- this.generatedLine = 0,
- this.generatedColumn = 0,
- this.source = null,
- this.originalLine = null,
- this.originalColumn = null,
- this.name = null
- }
- function p(e, t) {
- var n = e;
- 'string' == typeof e && (n = r.parseSourceMapInput(e));
- var i = r.getArg(n, 'version'),
- o = r.getArg(n, 'sections');
- if (i != this._version) throw new Error('Unsupported version: ' + i);
- this._sources = new s,
- this._names = new s;
- var a = {
- line: - 1,
- column: 0
- };
- this._sections = o.map(function (e) {
- if (e.url) throw new Error('Support for url field in sections not implemented.');
- var n = r.getArg(e, 'offset'),
- i = r.getArg(n, 'line'),
- s = r.getArg(n, 'column');
- if (i < a.line || i === a.line && s < a.column) throw new Error('Section offsets must be ordered and non-overlapping.');
- return a = n,
- {
- generatedOffset: {
- generatedLine: i + 1,
- generatedColumn: s + 1
- },
- consumer: new u(r.getArg(e, 'map'), t)
- }
- })
- }
- u.fromSourceMap = function (e, t) {
- return l.fromSourceMap(e, t)
- },
- u.prototype._version = 3,
- u.prototype.__generatedMappings = null,
- Object.defineProperty(u.prototype, '_generatedMappings', {
- configurable: !0,
- enumerable: !0,
- get: function () {
- return this.__generatedMappings || this._parseMappings(this._mappings, this.sourceRoot),
- this.__generatedMappings
- }
- }),
- u.prototype.__originalMappings = null,
- Object.defineProperty(u.prototype, '_originalMappings', {
- configurable: !0,
- enumerable: !0,
- get: function () {
- return this.__originalMappings || this._parseMappings(this._mappings, this.sourceRoot),
- this.__originalMappings
- }
- }),
- u.prototype._charIsMappingSeparator = function (e, t) {
- var n = e.charAt(t);
- return ';' === n || ',' === n
- },
- u.prototype._parseMappings = function (e, t) {
- throw new Error('Subclasses must implement _parseMappings')
- },
- u.GENERATED_ORDER = 1,
- u.ORIGINAL_ORDER = 2,
- u.GREATEST_LOWER_BOUND = 1,
- u.LEAST_UPPER_BOUND = 2,
- u.prototype.eachMapping = function (e, t, n) {
- var i,
- s = t || null;
- switch (n || u.GENERATED_ORDER) {
- case u.GENERATED_ORDER:
- i = this._generatedMappings;
- break;
- case u.ORIGINAL_ORDER:
- i = this._originalMappings;
- break;
- default:
- throw new Error('Unknown order of iteration.')
- }
- var o = this.sourceRoot;
- i.map(function (e) {
- var t = null === e.source ? null : this._sources.at(e.source);
- return {
- source: t = r.computeSourceURL(o, t, this._sourceMapURL),
- generatedLine: e.generatedLine,
- generatedColumn: e.generatedColumn,
- originalLine: e.originalLine,
- originalColumn: e.originalColumn,
- name: null === e.name ? null : this._names.at(e.name)
- }
- }, this).forEach(e, s)
- },
- u.prototype.allGeneratedPositionsFor = function (e) {
- var t = r.getArg(e, 'line'),
- n = {
- source: r.getArg(e, 'source'),
- originalLine: t,
- originalColumn: r.getArg(e, 'column', 0)
- };
- if (n.source = this._findSourceIndex(n.source), n.source < 0) return [];
- var s = [
- ],
- o = this._findMapping(n, this._originalMappings, 'originalLine', 'originalColumn', r.compareByOriginalPositions, i.LEAST_UPPER_BOUND);
- if (o >= 0) {
- var a = this._originalMappings[o];
- if (void 0 === e.column) for (var u = a.originalLine; a && a.originalLine === u; ) s.push({
- line: r.getArg(a, 'generatedLine', null),
- column: r.getArg(a, 'generatedColumn', null),
- lastColumn: r.getArg(a, 'lastGeneratedColumn', null)
- }),
- a = this._originalMappings[++o];
- else for (var l = a.originalColumn; a && a.originalLine === t && a.originalColumn == l; ) s.push({
- line: r.getArg(a, 'generatedLine', null),
- column: r.getArg(a, 'generatedColumn', null),
- lastColumn: r.getArg(a, 'lastGeneratedColumn', null)
- }),
- a = this._originalMappings[++o]
- }
- return s
- },
- n.SourceMapConsumer = u,
- l.prototype = Object.create(u.prototype),
- l.prototype.consumer = u,
- l.prototype._findSourceIndex = function (e) {
- var t,
- n = e;
- if (null != this.sourceRoot && (n = r.relative(this.sourceRoot, n)), this._sources.has(n)) return this._sources.indexOf(n);
- for (t = 0; t < this._absoluteSources.length; ++t) if (this._absoluteSources[t] == e) return t;
- return - 1
- },
- l.fromSourceMap = function (e, t) {
- var n = Object.create(l.prototype),
- i = n._names = s.fromArray(e._names.toArray(), !0),
- o = n._sources = s.fromArray(e._sources.toArray(), !0);
- n.sourceRoot = e._sourceRoot,
- n.sourcesContent = e._generateSourcesContent(n._sources.toArray(), n.sourceRoot),
- n.file = e._file,
- n._sourceMapURL = t,
- n._absoluteSources = n._sources.toArray().map(function (e) {
- return r.computeSourceURL(n.sourceRoot, e, t)
- });
- for (var u = e._mappings.toArray().slice(), p = n.__generatedMappings = [
- ], h = n.__originalMappings = [
- ], f = 0, d = u.length; f < d; f++) {
- var m = u[f],
- g = new c;
- g.generatedLine = m.generatedLine,
- g.generatedColumn = m.generatedColumn,
- m.source && (g.source = o.indexOf(m.source), g.originalLine = m.originalLine, g.originalColumn = m.originalColumn, m.name && (g.name = i.indexOf(m.name)), h.push(g)),
- p.push(g)
- }
- return a(n.__originalMappings, r.compareByOriginalPositions),
- n
- },
- l.prototype._version = 3,
- Object.defineProperty(l.prototype, 'sources', {
- get: function () {
- return this._absoluteSources.slice()
- }
- }),
- l.prototype._parseMappings = function (e, t) {
- for (var n, i, s, u, l, p = 1, h = 0, f = 0, d = 0, m = 0, g = 0, y = e.length, v = 0, b = {
- }, x = {
- }, A = [
- ], E = [
- ]; v < y; ) if (';' === e.charAt(v)) p++,
- v++,
- h = 0;
- else if (',' === e.charAt(v)) v++;
- else {
- for ((n = new c).generatedLine = p, u = v; u < y && !this._charIsMappingSeparator(e, u); u++);
- if (s = b[i = e.slice(v, u)]) v += i.length;
- else {
- for (s = [
- ]; v < u; ) o.decode(e, v, x),
- l = x.value,
- v = x.rest,
- s.push(l);
- if (2 === s.length) throw new Error('Found a source, but no line and column');
- if (3 === s.length) throw new Error('Found a source and line, but no column');
- b[i] = s
- }
- n.generatedColumn = h + s[0],
- h = n.generatedColumn,
- s.length > 1 && (n.source = m + s[1], m += s[1], n.originalLine = f + s[2], f = n.originalLine, n.originalLine += 1, n.originalColumn = d + s[3], d = n.originalColumn, s.length > 4 && (n.name = g + s[4], g += s[4])),
- E.push(n),
- 'number' == typeof n.originalLine && A.push(n)
- }
- a(E, r.compareByGeneratedPositionsDeflated),
- this.__generatedMappings = E,
- a(A, r.compareByOriginalPositions),
- this.__originalMappings = A
- },
- l.prototype._findMapping = function (e, t, n, r, s, o) {
- if (e[n] <= 0) throw new TypeError('Line must be greater than or equal to 1, got ' + e[n]);
- if (e[r] < 0) throw new TypeError('Column must be greater than or equal to 0, got ' + e[r]);
- return i.search(e, t, s, o)
- },
- l.prototype.computeColumnSpans = function () {
- for (var e = 0; e < this._generatedMappings.length; ++e) {
- var t = this._generatedMappings[e];
- if (e + 1 < this._generatedMappings.length) {
- var n = this._generatedMappings[e + 1];
- if (t.generatedLine === n.generatedLine) {
- t.lastGeneratedColumn = n.generatedColumn - 1;
- continue
- }
- }
- t.lastGeneratedColumn = 1 / 0
- }
- },
- l.prototype.originalPositionFor = function (e) {
- var t = {
- generatedLine: r.getArg(e, 'line'),
- generatedColumn: r.getArg(e, 'column')
- },
- n = this._findMapping(t, this._generatedMappings, 'generatedLine', 'generatedColumn', r.compareByGeneratedPositionsDeflated, r.getArg(e, 'bias', u.GREATEST_LOWER_BOUND));
- if (n >= 0) {
- var i = this._generatedMappings[n];
- if (i.generatedLine === t.generatedLine) {
- var s = r.getArg(i, 'source', null);
- null !== s && (s = this._sources.at(s), s = r.computeSourceURL(this.sourceRoot, s, this._sourceMapURL));
- var o = r.getArg(i, 'name', null);
- return null !== o && (o = this._names.at(o)),
- {
- source: s,
- line: r.getArg(i, 'originalLine', null),
- column: r.getArg(i, 'originalColumn', null),
- name: o
- }
- }
- }
- return {
- source: null,
- line: null,
- column: null,
- name: null
- }
- },
- l.prototype.hasContentsOfAllSources = function () {
- return !!this.sourcesContent && (this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (e) {
- return null == e
- }))
- },
- l.prototype.sourceContentFor = function (e, t) {
- if (!this.sourcesContent) return null;
- var n = this._findSourceIndex(e);
- if (n >= 0) return this.sourcesContent[n];
- var i,
- s = e;
- if (null != this.sourceRoot && (s = r.relative(this.sourceRoot, s)), null != this.sourceRoot && (i = r.urlParse(this.sourceRoot))) {
- var o = s.replace(/^file:\/\//, '');
- if ('file' == i.scheme && this._sources.has(o)) return this.sourcesContent[this._sources.indexOf(o)];
- if ((!i.path || '/' == i.path) && this._sources.has('/' + s)) return this.sourcesContent[this._sources.indexOf('/' + s)]
- }
- if (t) return null;
- throw new Error('"' + s + '" is not in the SourceMap.')
- },
- l.prototype.generatedPositionFor = function (e) {
- var t = r.getArg(e, 'source');
- if ((t = this._findSourceIndex(t)) < 0) return {
- line: null,
- column: null,
- lastColumn: null
- };
- var n = {
- source: t,
- originalLine: r.getArg(e, 'line'),
- originalColumn: r.getArg(e, 'column')
- },
- i = this._findMapping(n, this._originalMappings, 'originalLine', 'originalColumn', r.compareByOriginalPositions, r.getArg(e, 'bias', u.GREATEST_LOWER_BOUND));
- if (i >= 0) {
- var s = this._originalMappings[i];
- if (s.source === n.source) return {
- line: r.getArg(s, 'generatedLine', null),
- column: r.getArg(s, 'generatedColumn', null),
- lastColumn: r.getArg(s, 'lastGeneratedColumn', null)
- }
- }
- return {
- line: null,
- column: null,
- lastColumn: null
- }
- },
- n.BasicSourceMapConsumer = l,
- p.prototype = Object.create(u.prototype),
- p.prototype.constructor = u,
- p.prototype._version = 3,
- Object.defineProperty(p.prototype, 'sources', {
- get: function () {
- for (var e = [
- ], t = 0; t < this._sections.length; t++) for (var n = 0; n < this._sections[t].consumer.sources.length; n++) e.push(this._sections[t].consumer.sources[n]);
- return e
- }
- }),
- p.prototype.originalPositionFor = function (e) {
- var t = {
- generatedLine: r.getArg(e, 'line'),
- generatedColumn: r.getArg(e, 'column')
- },
- n = i.search(t, this._sections, function (e, t) {
- var n = e.generatedLine - t.generatedOffset.generatedLine;
- return n || e.generatedColumn - t.generatedOffset.generatedColumn
- }),
- s = this._sections[n];
- return s ? s.consumer.originalPositionFor({
- line: t.generatedLine - (s.generatedOffset.generatedLine - 1),
- column: t.generatedColumn - (s.generatedOffset.generatedLine === t.generatedLine ? s.generatedOffset.generatedColumn - 1 : 0),
- bias: e.bias
- }) : {
- source: null,
- line: null,
- column: null,
- name: null
- }
- },
- p.prototype.hasContentsOfAllSources = function () {
- return this._sections.every(function (e) {
- return e.consumer.hasContentsOfAllSources()
- })
- },
- p.prototype.sourceContentFor = function (e, t) {
- for (var n = 0; n < this._sections.length; n++) {
- var r = this._sections[n].consumer.sourceContentFor(e, !0);
- if (r) return r
- }
- if (t) return null;
- throw new Error('"' + e + '" is not in the SourceMap.')
- },
- p.prototype.generatedPositionFor = function (e) {
- for (var t = 0; t < this._sections.length; t++) {
- var n = this._sections[t];
- if ( - 1 !== n.consumer._findSourceIndex(r.getArg(e, 'source'))) {
- var i = n.consumer.generatedPositionFor(e);
- if (i) return {
- line: i.line + (n.generatedOffset.generatedLine - 1),
- column: i.column + (n.generatedOffset.generatedLine === i.line ? n.generatedOffset.generatedColumn - 1 : 0)
- }
- }
- }
- return {
- line: null,
- column: null
- }
- },
- p.prototype._parseMappings = function (e, t) {
- this.__generatedMappings = [
- ],
- this.__originalMappings = [
- ];
- for (var n = 0; n < this._sections.length; n++) for (var i = this._sections[n], s = i.consumer._generatedMappings, o = 0; o < s.length; o++) {
- var u = s[o],
- l = i.consumer._sources.at(u.source);
- l = r.computeSourceURL(i.consumer.sourceRoot, l, this._sourceMapURL),
- this._sources.add(l),
- l = this._sources.indexOf(l);
- var c = null;
- u.name && (c = i.consumer._names.at(u.name), this._names.add(c), c = this._names.indexOf(c));
- var p = {
- source: l,
- generatedLine: u.generatedLine + (i.generatedOffset.generatedLine - 1),
- generatedColumn: u.generatedColumn + (i.generatedOffset.generatedLine === u.generatedLine ? i.generatedOffset.generatedColumn - 1 : 0),
- originalLine: u.originalLine,
- originalColumn: u.originalColumn,
- name: c
- };
- this.__generatedMappings.push(p),
- 'number' == typeof p.originalLine && this.__originalMappings.push(p)
- }
- a(this.__generatedMappings, r.compareByGeneratedPositionsDeflated),
- a(this.__originalMappings, r.compareByOriginalPositions)
- },
- n.IndexedSourceMapConsumer = p
- },
- {
- './array-set': 139,
- './base64-vlq': 140,
- './binary-search': 142,
- './quick-sort': 144,
- './util': 148
- }
- ],
- 146: [
- function (e, t, n) {
- var r = e('./base64-vlq'),
- i = e('./util'),
- s = e('./array-set').ArraySet,
- o = e('./mapping-list').MappingList;
- function a(e) {
- e || (e = {
- }),
- this._file = i.getArg(e, 'file', null),
- this._sourceRoot = i.getArg(e, 'sourceRoot', null),
- this._skipValidation = i.getArg(e, 'skipValidation', !1),
- this._sources = new s,
- this._names = new s,
- this._mappings = new o,
- this._sourcesContents = null
- }
- a.prototype._version = 3,
- a.fromSourceMap = function (e) {
- var t = e.sourceRoot,
- n = new a({
- file: e.file,
- sourceRoot: t
- });
- return e.eachMapping(function (e) {
- var r = {
- generated: {
- line: e.generatedLine,
- column: e.generatedColumn
- }
- };
- null != e.source && (r.source = e.source, null != t && (r.source = i.relative(t, r.source)), r.original = {
- line: e.originalLine,
- column: e.originalColumn
- }, null != e.name && (r.name = e.name)),
- n.addMapping(r)
- }),
- e.sources.forEach(function (r) {
- var s = r;
- null !== t && (s = i.relative(t, r)),
- n._sources.has(s) || n._sources.add(s);
- var o = e.sourceContentFor(r);
- null != o && n.setSourceContent(r, o)
- }),
- n
- },
- a.prototype.addMapping = function (e) {
- var t = i.getArg(e, 'generated'),
- n = i.getArg(e, 'original', null),
- r = i.getArg(e, 'source', null),
- s = i.getArg(e, 'name', null);
- this._skipValidation || this._validateMapping(t, n, r, s),
- null != r && (r = String(r), this._sources.has(r) || this._sources.add(r)),
- null != s && (s = String(s), this._names.has(s) || this._names.add(s)),
- this._mappings.add({
- generatedLine: t.line,
- generatedColumn: t.column,
- originalLine: null != n && n.line,
- originalColumn: null != n && n.column,
- source: r,
- name: s
- })
- },
- a.prototype.setSourceContent = function (e, t) {
- var n = e;
- null != this._sourceRoot && (n = i.relative(this._sourceRoot, n)),
- null != t ? (this._sourcesContents || (this._sourcesContents = Object.create(null)), this._sourcesContents[i.toSetString(n)] = t) : this._sourcesContents && (delete this._sourcesContents[i.toSetString(n)], 0 === Object.keys(this._sourcesContents).length && (this._sourcesContents = null))
- },
- a.prototype.applySourceMap = function (e, t, n) {
- var r = t;
- if (null == t) {
- if (null == e.file) throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');
- r = e.file
- }
- var o = this._sourceRoot;
- null != o && (r = i.relative(o, r));
- var a = new s,
- u = new s;
- this._mappings.unsortedForEach(function (t) {
- if (t.source === r && null != t.originalLine) {
- var s = e.originalPositionFor({
- line: t.originalLine,
- column: t.originalColumn
- });
- null != s.source && (t.source = s.source, null != n && (t.source = i.join(n, t.source)), null != o && (t.source = i.relative(o, t.source)), t.originalLine = s.line, t.originalColumn = s.column, null != s.name && (t.name = s.name))
- }
- var l = t.source;
- null == l || a.has(l) || a.add(l);
- var c = t.name;
- null == c || u.has(c) || u.add(c)
- }, this),
- this._sources = a,
- this._names = u,
- e.sources.forEach(function (t) {
- var r = e.sourceContentFor(t);
- null != r && (null != n && (t = i.join(n, t)), null != o && (t = i.relative(o, t)), this.setSourceContent(t, r))
- }, this)
- },
- a.prototype._validateMapping = function (e, t, n, r) {
- if (t && 'number' != typeof t.line && 'number' != typeof t.column) throw new Error('original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.');
- if ((!(e && 'line' in e && 'column' in e && e.line > 0 && e.column >= 0) || t || n || r) && !(e && 'line' in e && 'column' in e && t && 'line' in t && 'column' in t && e.line > 0 && e.column >= 0 && t.line > 0 && t.column >= 0 && n)) throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: e,
- source: n,
- original: t,
- name: r
- }))
- },
- a.prototype._serializeMappings = function () {
- for (var e, t, n, s, o = 0, a = 1, u = 0, l = 0, c = 0, p = 0, h = '', f = this._mappings.toArray(), d = 0, m = f.length; d < m; d++) {
- if (e = '', (t = f[d]).generatedLine !== a) for (o = 0; t.generatedLine !== a; ) e += ';',
- a++;
- else if (d > 0) {
- if (!i.compareByGeneratedPositionsInflated(t, f[d - 1])) continue;
- e += ','
- }
- e += r.encode(t.generatedColumn - o),
- o = t.generatedColumn,
- null != t.source && (s = this._sources.indexOf(t.source), e += r.encode(s - p), p = s, e += r.encode(t.originalLine - 1 - l), l = t.originalLine - 1, e += r.encode(t.originalColumn - u), u = t.originalColumn, null != t.name && (n = this._names.indexOf(t.name), e += r.encode(n - c), c = n)),
- h += e
- }
- return h
- },
- a.prototype._generateSourcesContent = function (e, t) {
- return e.map(function (e) {
- if (!this._sourcesContents) return null;
- null != t && (e = i.relative(t, e));
- var n = i.toSetString(e);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents, n) ? this._sourcesContents[n] : null
- }, this)
- },
- a.prototype.toJSON = function () {
- var e = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- return null != this._file && (e.file = this._file),
- null != this._sourceRoot && (e.sourceRoot = this._sourceRoot),
- this._sourcesContents && (e.sourcesContent = this._generateSourcesContent(e.sources, e.sourceRoot)),
- e
- },
- a.prototype.toString = function () {
- return JSON.stringify(this.toJSON())
- },
- n.SourceMapGenerator = a
- },
- {
- './array-set': 139,
- './base64-vlq': 140,
- './mapping-list': 143,
- './util': 148
- }
- ],
- 147: [
- function (e, t, n) {
- var r = e('./source-map-generator').SourceMapGenerator,
- i = e('./util'),
- s = /(\r?\n)/,
- o = '$$$isSourceNode$$$';
- function a(e, t, n, r, i) {
- this.children = [
- ],
- this.sourceContents = {
- },
- this.line = null == e ? null : e,
- this.column = null == t ? null : t,
- this.source = null == n ? null : n,
- this.name = null == i ? null : i,
- this[o] = !0,
- null != r && this.add(r)
- }
- a.fromStringWithSourceMap = function (e, t, n) {
- var r = new a,
- o = e.split(s),
- u = 0,
- l = function () {
- return e() + (e() || '');
- function e() {
- return u < o.length ? o[u++] : void 0
- }
- },
- c = 1,
- p = 0,
- h = null;
- return t.eachMapping(function (e) {
- if (null !== h) {
- if (!(c < e.generatedLine)) {
- var t = (n = o[u] || '').substr(0, e.generatedColumn - p);
- return o[u] = n.substr(e.generatedColumn - p),
- p = e.generatedColumn,
- f(h, t),
- void (h = e)
- }
- f(h, l()),
- c++,
- p = 0
- }
- for (; c < e.generatedLine; ) r.add(l()),
- c++;
- if (p < e.generatedColumn) {
- var n = o[u] || '';
- r.add(n.substr(0, e.generatedColumn)),
- o[u] = n.substr(e.generatedColumn),
- p = e.generatedColumn
- }
- h = e
- }, this),
- u < o.length && (h && f(h, l()), r.add(o.splice(u).join(''))),
- t.sources.forEach(function (e) {
- var s = t.sourceContentFor(e);
- null != s && (null != n && (e = i.join(n, e)), r.setSourceContent(e, s))
- }),
- r;
- function f(e, t) {
- if (null === e || void 0 === e.source) r.add(t);
- else {
- var s = n ? i.join(n, e.source) : e.source;
- r.add(new a(e.originalLine, e.originalColumn, s, t, e.name))
- }
- }
- },
- a.prototype.add = function (e) {
- if (Array.isArray(e)) e.forEach(function (e) {
- this.add(e)
- }, this);
- else {
- if (!e[o] && 'string' != typeof e) throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + e);
- e && this.children.push(e)
- }
- return this
- },
- a.prototype.prepend = function (e) {
- if (Array.isArray(e)) for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]);
- else {
- if (!e[o] && 'string' != typeof e) throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + e);
- this.children.unshift(e)
- }
- return this
- },
- a.prototype.walk = function (e) {
- for (var t, n = 0, r = this.children.length; n < r; n++) (t = this.children[n]) [o] ? t.walk(e) : '' !== t && e(t, {
- source: this.source,
- line: this.line,
- column: this.column,
- name: this.name
- })
- },
- a.prototype.join = function (e) {
- var t,
- n,
- r = this.children.length;
- if (r > 0) {
- for (t = [
- ], n = 0; n < r - 1; n++) t.push(this.children[n]),
- t.push(e);
- t.push(this.children[n]),
- this.children = t
- }
- return this
- },
- a.prototype.replaceRight = function (e, t) {
- var n = this.children[this.children.length - 1];
- return n[o] ? n.replaceRight(e, t) : 'string' == typeof n ? this.children[this.children.length - 1] = n.replace(e, t) : this.children.push(''.replace(e, t)),
- this
- },
- a.prototype.setSourceContent = function (e, t) {
- this.sourceContents[i.toSetString(e)] = t
- },
- a.prototype.walkSourceContents = function (e) {
- for (var t = 0, n = this.children.length; t < n; t++) this.children[t][o] && this.children[t].walkSourceContents(e);
- var r = Object.keys(this.sourceContents);
- for (t = 0, n = r.length; t < n; t++) e(i.fromSetString(r[t]), this.sourceContents[r[t]])
- },
- a.prototype.toString = function () {
- var e = '';
- return this.walk(function (t) {
- e += t
- }),
- e
- },
- a.prototype.toStringWithSourceMap = function (e) {
- var t = {
- code: '',
- line: 1,
- column: 0
- },
- n = new r(e),
- i = !1,
- s = null,
- o = null,
- a = null,
- u = null;
- return this.walk(function (e, r) {
- t.code += e,
- null !== r.source && null !== r.line && null !== r.column ? (s === r.source && o === r.line && a === r.column && u === r.name || n.addMapping({
- source: r.source,
- original: {
- line: r.line,
- column: r.column
- },
- generated: {
- line: t.line,
- column: t.column
- },
- name: r.name
- }), s = r.source, o = r.line, a = r.column, u = r.name, i = !0) : i && (n.addMapping({
- generated: {
- line: t.line,
- column: t.column
- }
- }), s = null, i = !1);
- for (var l = 0, c = e.length; l < c; l++) 10 === e.charCodeAt(l) ? (t.line++, t.column = 0, l + 1 === c ? (s = null, i = !1) : i && n.addMapping({
- source: r.source,
- original: {
- line: r.line,
- column: r.column
- },
- generated: {
- line: t.line,
- column: t.column
- },
- name: r.name
- })) : t.column++
- }),
- this.walkSourceContents(function (e, t) {
- n.setSourceContent(e, t)
- }),
- {
- code: t.code,
- map: n
- }
- },
- n.SourceNode = a
- },
- {
- './source-map-generator': 146,
- './util': 148
- }
- ],
- 148: [
- function (e, t, n) {
- n.getArg = function (e, t, n) {
- if (t in e) return e[t];
- if (3 === arguments.length) return n;
- throw new Error('"' + t + '" is a required argument.')
- };
- var r = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,
- i = /^data:.+\,.+$/;
- function s(e) {
- var t = e.match(r);
- return t ? {
- scheme: t[1],
- auth: t[2],
- host: t[3],
- port: t[4],
- path: t[5]
- }
- : null
- }
- function o(e) {
- var t = '';
- return e.scheme && (t += e.scheme + ':'),
- t += '//',
- e.auth && (t += e.auth + '@'),
- e.host && (t += e.host),
- e.port && (t += ':' + e.port),
- e.path && (t += e.path),
- t
- }
- function a(e) {
- var t = e,
- r = s(e);
- if (r) {
- if (!r.path) return e;
- t = r.path
- }
- for (var i, a = n.isAbsolute(t), u = t.split(/\/+/), l = 0, c = u.length - 1; c >= 0; c--) '.' === (i = u[c]) ? u.splice(c, 1) : '..' === i ? l++ : l > 0 && ('' === i ? (u.splice(c + 1, l), l = 0) : (u.splice(c, 2), l--));
- return '' === (t = u.join('/')) && (t = a ? '/' : '.'),
- r ? (r.path = t, o(r)) : t
- }
- function u(e, t) {
- '' === e && (e = '.'),
- '' === t && (t = '.');
- var n = s(t),
- r = s(e);
- if (r && (e = r.path || '/'), n && !n.scheme) return r && (n.scheme = r.scheme),
- o(n);
- if (n || t.match(i)) return t;
- if (r && !r.host && !r.path) return r.host = t,
- o(r);
- var u = '/' === t.charAt(0) ? t : a(e.replace(/\/+$/, '') + '/' + t);
- return r ? (r.path = u, o(r)) : u
- }
- n.urlParse = s,
- n.urlGenerate = o,
- n.normalize = a,
- n.join = u,
- n.isAbsolute = function (e) {
- return '/' === e.charAt(0) || r.test(e)
- },
- n.relative = function (e, t) {
- '' === e && (e = '.'),
- e = e.replace(/\/$/, '');
- for (var n = 0; 0 !== t.indexOf(e + '/'); ) {
- var r = e.lastIndexOf('/');
- if (r < 0) return t;
- if ((e = e.slice(0, r)).match(/^([^\/]+:\/)?\/*$/)) return t;
- ++n
- }
- return Array(n + 1).join('../') + t.substr(e.length + 1)
- };
- var l = !('__proto__' in Object.create(null));
- function c(e) {
- return e
- }
- function p(e) {
- if (!e) return !1;
- var t = e.length;
- if (t < 9) return !1;
- if (95 !== e.charCodeAt(t - 1) || 95 !== e.charCodeAt(t - 2) || 111 !== e.charCodeAt(t - 3) || 116 !== e.charCodeAt(t - 4) || 111 !== e.charCodeAt(t - 5) || 114 !== e.charCodeAt(t - 6) || 112 !== e.charCodeAt(t - 7) || 95 !== e.charCodeAt(t - 8) || 95 !== e.charCodeAt(t - 9)) return !1;
- for (var n = t - 10; n >= 0; n--) if (36 !== e.charCodeAt(n)) return !1;
- return !0
- }
- function h(e, t) {
- return e === t ? 0 : null === e ? 1 : null === t ? - 1 : e > t ? 1 : - 1
- }
- n.toSetString = l ? c : function (e) {
- return p(e) ? '$' + e : e
- },
- n.fromSetString = l ? c : function (e) {
- return p(e) ? e.slice(1) : e
- },
- n.compareByOriginalPositions = function (e, t, n) {
- var r = h(e.source, t.source);
- return 0 !== r ? r : 0 != (r = e.originalLine - t.originalLine) ? r : 0 != (r = e.originalColumn - t.originalColumn) || n ? r : 0 != (r = e.generatedColumn - t.generatedColumn) ? r : 0 != (r = e.generatedLine - t.generatedLine) ? r : h(e.name, t.name)
- },
- n.compareByGeneratedPositionsDeflated = function (e, t, n) {
- var r = e.generatedLine - t.generatedLine;
- return 0 !== r ? r : 0 != (r = e.generatedColumn - t.generatedColumn) || n ? r : 0 !== (r = h(e.source, t.source)) ? r : 0 != (r = e.originalLine - t.originalLine) ? r : 0 != (r = e.originalColumn - t.originalColumn) ? r : h(e.name, t.name)
- },
- n.compareByGeneratedPositionsInflated = function (e, t) {
- var n = e.generatedLine - t.generatedLine;
- return 0 !== n ? n : 0 != (n = e.generatedColumn - t.generatedColumn) ? n : 0 !== (n = h(e.source, t.source)) ? n : 0 != (n = e.originalLine - t.originalLine) ? n : 0 != (n = e.originalColumn - t.originalColumn) ? n : h(e.name, t.name)
- },
- n.parseSourceMapInput = function (e) {
- return JSON.parse(e.replace(/^\)]}'[^\n]*\n/, ''))
- },
- n.computeSourceURL = function (e, t, n) {
- if (t = t || '', e && ('/' !== e[e.length - 1] && '/' !== t[0] && (e += '/'), t = e + t), n) {
- var r = s(n);
- if (!r) throw new Error('sourceMapURL could not be parsed');
- if (r.path) {
- var i = r.path.lastIndexOf('/');
- i >= 0 && (r.path = r.path.substring(0, i + 1))
- }
- t = u(o(r), t)
- }
- return a(t)
- }
- },
- {
- }
- ],
- 149: [
- function (e, t, n) {
- n.SourceMapGenerator = e('./lib/source-map-generator').SourceMapGenerator,
- n.SourceMapConsumer = e('./lib/source-map-consumer').SourceMapConsumer,
- n.SourceNode = e('./lib/source-node').SourceNode
- },
- {
- './lib/source-map-consumer': 145,
- './lib/source-map-generator': 146,
- './lib/source-node': 147
- }
- ],
- 150: [
- function (e, t, n) {
- e('../modules/web.dom.iterable'),
- e('../modules/es6.string.iterator'),
- t.exports = e('../modules/core.get-iterator')
- },
- {
- '../modules/core.get-iterator': 217,
- '../modules/es6.string.iterator': 223,
- '../modules/web.dom.iterable': 227
- }
- ],
- 151: [
- function (e, t, n) {
- var r = e('../../modules/_core'),
- i = r.JSON || (r.JSON = {
- stringify: JSON.stringify
- });
- t.exports = function (e) {
- return i.stringify.apply(i, arguments)
- }
- },
- {
- '../../modules/_core': 165
- }
- ],
- 152: [
- function (e, t, n) {
- e('../../modules/es6.number.max-safe-integer'),
- t.exports = 9007199254740991
- },
- {
- '../../modules/es6.number.max-safe-integer': 219
- }
- ],
- 153: [
- function (e, t, n) {
- e('../../modules/es6.object.create');
- var r = e('../../modules/_core').Object;
- t.exports = function (e, t) {
- return r.create(e, t)
- }
- },
- {
- '../../modules/_core': 165,
- '../../modules/es6.object.create': 220
- }
- ],
- 154: [
- function (e, t, n) {
- e('../../modules/es6.symbol'),
- t.exports = e('../../modules/_core').Object.getOwnPropertySymbols
- },
- {
- '../../modules/_core': 165,
- '../../modules/es6.symbol': 224
- }
- ],
- 155: [
- function (e, t, n) {
- e('../../modules/es6.object.keys'),
- t.exports = e('../../modules/_core').Object.keys
- },
- {
- '../../modules/_core': 165,
- '../../modules/es6.object.keys': 221
- }
- ],
- 156: [
- function (e, t, n) {
- e('../../modules/es6.symbol'),
- t.exports = e('../../modules/_core').Symbol.for
- },
- {
- '../../modules/_core': 165,
- '../../modules/es6.symbol': 224
- }
- ],
- 157: [
- function (e, t, n) {
- e('../../modules/es6.symbol'),
- e('../../modules/es6.object.to-string'),
- e('../../modules/es7.symbol.async-iterator'),
- e('../../modules/es7.symbol.observable'),
- t.exports = e('../../modules/_core').Symbol
- },
- {
- '../../modules/_core': 165,
- '../../modules/es6.object.to-string': 222,
- '../../modules/es6.symbol': 224,
- '../../modules/es7.symbol.async-iterator': 225,
- '../../modules/es7.symbol.observable': 226
- }
- ],
- 158: [
- function (e, t, n) {
- e('../../modules/es6.string.iterator'),
- e('../../modules/web.dom.iterable'),
- t.exports = e('../../modules/_wks-ext').f('iterator')
- },
- {
- '../../modules/_wks-ext': 214,
- '../../modules/es6.string.iterator': 223,
- '../../modules/web.dom.iterable': 227
- }
- ],
- 159: [
- function (e, t, n) {
- t.exports = function (e) {
- if ('function' != typeof e) throw TypeError(e + ' is not a function!');
- return e
- }
- },
- {
- }
- ],
- 160: [
- function (e, t, n) {
- t.exports = function () {
- }
- },
- {
- }
- ],
- 161: [
- function (e, t, n) {
- var r = e('./_is-object');
- t.exports = function (e) {
- if (!r(e)) throw TypeError(e + ' is not an object!');
- return e
- }
- },
- {
- './_is-object': 181
- }
- ],
- 162: [
- function (e, t, n) {
- var r = e('./_to-iobject'),
- i = e('./_to-length'),
- s = e('./_to-absolute-index');
- t.exports = function (e) {
- return function (t, n, o) {
- var a,
- u = r(t),
- l = i(u.length),
- c = s(o, l);
- if (e && n != n) {
- for (; l > c; ) if ((a = u[c++]) != a) return !0
- } else for (; l > c; c++) if ((e || c in u) && u[c] === n) return e || c || 0;
- return !e && - 1
- }
- }
- },
- {
- './_to-absolute-index': 206,
- './_to-iobject': 208,
- './_to-length': 209
- }
- ],
- 163: [
- function (e, t, n) {
- var r = e('./_cof'),
- i = e('./_wks') ('toStringTag'),
- s = 'Arguments' == r(function () {
- return arguments
- }());
- t.exports = function (e) {
- var t,
- n,
- o;
- return void 0 === e ? 'Undefined' : null === e ? 'Null' : 'string' == typeof (n = function (e, t) {
- try {
- return e[t]
- } catch (e) {
- }
- }(t = Object(e), i)) ? n : s ? r(t) : 'Object' == (o = r(t)) && 'function' == typeof t.callee ? 'Arguments' : o
- }
- },
- {
- './_cof': 164,
- './_wks': 215
- }
- ],
- 164: [
- function (e, t, n) {
- var r = {
- }.toString;
- t.exports = function (e) {
- return r.call(e).slice(8, - 1)
- }
- },
- {
- }
- ],
- 165: [
- function (e, t, n) {
- var r = t.exports = {
- version: '2.6.9'
- };
- 'number' == typeof __e && (__e = r)
- },
- {
- }
- ],
- 166: [
- function (e, t, n) {
- var r = e('./_a-function');
- t.exports = function (e, t, n) {
- if (r(e), void 0 === t) return e;
- switch (n) {
- case 1:
- return function (n) {
- return e.call(t, n)
- };
- case 2:
- return function (n, r) {
- return e.call(t, n, r)
- };
- case 3:
- return function (n, r, i) {
- return e.call(t, n, r, i)
- }
- }
- return function () {
- return e.apply(t, arguments)
- }
- }
- },
- {
- './_a-function': 159
- }
- ],
- 167: [
- function (e, t, n) {
- t.exports = function (e) {
- if (void 0 == e) throw TypeError('Can\'t call method on ' + e);
- return e
- }
- },
- {
- }
- ],
- 168: [
- function (e, t, n) {
- t.exports = !e('./_fails') (function () {
- return 7 != Object.defineProperty({
- }, 'a', {
- get: function () {
- return 7
- }
- }).a
- })
- },
- {
- './_fails': 173
- }
- ],
- 169: [
- function (e, t, n) {
- var r = e('./_is-object'),
- i = e('./_global').document,
- s = r(i) && r(i.createElement);
- t.exports = function (e) {
- return s ? i.createElement(e) : {
- }
- }
- },
- {
- './_global': 174,
- './_is-object': 181
- }
- ],
- 170: [
- function (e, t, n) {
- t.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',')
- },
- {
- }
- ],
- 171: [
- function (e, t, n) {
- var r = e('./_object-keys'),
- i = e('./_object-gops'),
- s = e('./_object-pie');
- t.exports = function (e) {
- var t = r(e),
- n = i.f;
- if (n) for (var o, a = n(e), u = s.f, l = 0; a.length > l; ) u.call(e, o = a[l++]) && t.push(o);
- return t
- }
- },
- {
- './_object-gops': 194,
- './_object-keys': 197,
- './_object-pie': 198
- }
- ],
- 172: [
- function (e, t, n) {
- var r = e('./_global'),
- i = e('./_core'),
- s = e('./_ctx'),
- o = e('./_hide'),
- a = e('./_has'),
- u = function (e, t, n) {
- var l,
- c,
- p,
- h = e & u.F,
- f = e & u.G,
- d = e & u.S,
- m = e & u.P,
- g = e & u.B,
- y = e & u.W,
- v = f ? i : i[t] || (i[t] = {
- }),
- b = v.prototype,
- x = f ? r : d ? r[t] : (r[t] || {
- }).prototype;
- for (l in f && (n = t), n) (c = !h && x && void 0 !== x[l]) && a(v, l) || (p = c ? x[l] : n[l], v[l] = f && 'function' != typeof x[l] ? n[l] : g && c ? s(p, r) : y && x[l] == p ? function (e) {
- var t = function (t, n, r) {
- if (this instanceof e) {
- switch (arguments.length) {
- case 0:
- return new e;
- case 1:
- return new e(t);
- case 2:
- return new e(t, n)
- }
- return new e(t, n, r)
- }
- return e.apply(this, arguments)
- };
- return t.prototype = e.prototype,
- t
- }(p) : m && 'function' == typeof p ? s(Function.call, p) : p, m && ((v.virtual || (v.virtual = {
- })) [l] = p, e & u.R && b && !b[l] && o(b, l, p)))
- };
- u.F = 1,
- u.G = 2,
- u.S = 4,
- u.P = 8,
- u.B = 16,
- u.W = 32,
- u.U = 64,
- u.R = 128,
- t.exports = u
- },
- {
- './_core': 165,
- './_ctx': 166,
- './_global': 174,
- './_has': 175,
- './_hide': 176
- }
- ],
- 173: [
- function (e, t, n) {
- t.exports = function (e) {
- try {
- return !!e()
- } catch (e) {
- return !0
- }
- }
- },
- {
- }
- ],
- 174: [
- function (e, t, n) {
- var r = t.exports = 'undefined' != typeof window && window.Math == Math ? window : 'undefined' != typeof self && self.Math == Math ? self : Function('return this') ();
- 'number' == typeof __g && (__g = r)
- },
- {
- }
- ],
- 175: [
- function (e, t, n) {
- var r = {
- }.hasOwnProperty;
- t.exports = function (e, t) {
- return r.call(e, t)
- }
- },
- {
- }
- ],
- 176: [
- function (e, t, n) {
- var r = e('./_object-dp'),
- i = e('./_property-desc');
- t.exports = e('./_descriptors') ? function (e, t, n) {
- return r.f(e, t, i(1, n))
- }
- : function (e, t, n) {
- return e[t] = n,
- e
- }
- },
- {
- './_descriptors': 168,
- './_object-dp': 189,
- './_property-desc': 200
- }
- ],
- 177: [
- function (e, t, n) {
- var r = e('./_global').document;
- t.exports = r && r.documentElement
- },
- {
- './_global': 174
- }
- ],
- 178: [
- function (e, t, n) {
- t.exports = !e('./_descriptors') && !e('./_fails') (function () {
- return 7 != Object.defineProperty(e('./_dom-create') ('div'), 'a', {
- get: function () {
- return 7
- }
- }).a
- })
- },
- {
- './_descriptors': 168,
- './_dom-create': 169,
- './_fails': 173
- }
- ],
- 179: [
- function (e, t, n) {
- var r = e('./_cof');
- t.exports = Object('z').propertyIsEnumerable(0) ? Object : function (e) {
- return 'String' == r(e) ? e.split('') : Object(e)
- }
- },
- {
- './_cof': 164
- }
- ],
- 180: [
- function (e, t, n) {
- var r = e('./_cof');
- t.exports = Array.isArray || function (e) {
- return 'Array' == r(e)
- }
- },
- {
- './_cof': 164
- }
- ],
- 181: [
- function (e, t, n) {
- t.exports = function (e) {
- return 'object' == typeof e ? null !== e : 'function' == typeof e
- }
- },
- {
- }
- ],
- 182: [
- function (e, t, n) {
- 'use strict';
- var r = e('./_object-create'),
- i = e('./_property-desc'),
- s = e('./_set-to-string-tag'),
- o = {
- };
- e('./_hide') (o, e('./_wks') ('iterator'), function () {
- return this
- }),
- t.exports = function (e, t, n) {
- e.prototype = r(o, {
- next: i(1, n)
- }),
- s(e, t + ' Iterator')
- }
- },
- {
- './_hide': 176,
- './_object-create': 188,
- './_property-desc': 200,
- './_set-to-string-tag': 202,
- './_wks': 215
- }
- ],
- 183: [
- function (e, t, n) {
- 'use strict';
- var r = e('./_library'),
- i = e('./_export'),
- s = e('./_redefine'),
- o = e('./_hide'),
- a = e('./_iterators'),
- u = e('./_iter-create'),
- l = e('./_set-to-string-tag'),
- c = e('./_object-gpo'),
- p = e('./_wks') ('iterator'),
- h = !([].keys && 'next' in [
- ].keys()),
- f = function () {
- return this
- };
- t.exports = function (e, t, n, d, m, g, y) {
- u(n, t, d);
- var v,
- b,
- x,
- A = function (e) {
- if (!h && e in w) return w[e];
- switch (e) {
- case 'keys':
- case 'values':
- return function () {
- return new n(this, e)
- }
- }
- return function () {
- return new n(this, e)
- }
- },
- E = t + ' Iterator',
- _ = 'values' == m,
- C = !1,
- w = e.prototype,
- D = w[p] || w['@@iterator'] || m && w[m],
- k = D || A(m),
- S = m ? _ ? A('entries') : k : void 0,
- T = 'Array' == t && w.entries || D;
- if (T && (x = c(T.call(new e))) !== Object.prototype && x.next && (l(x, E, !0), r || 'function' == typeof x[p] || o(x, p, f)), _ && D && 'values' !== D.name && (C = !0, k = function () {
- return D.call(this)
- }), r && !y || !h && !C && w[p] || o(w, p, k), a[t] = k, a[E] = f, m) if (v = {
- values: _ ? k : A('values'),
- keys: g ? k : A('keys'),
- entries: S
- }, y) for (b in v) b in w || s(w, b, v[b]);
- else i(i.P + i.F * (h || C), t, v);
- return v
- }
- },
- {
- './_export': 172,
- './_hide': 176,
- './_iter-create': 182,
- './_iterators': 185,
- './_library': 186,
- './_object-gpo': 195,
- './_redefine': 201,
- './_set-to-string-tag': 202,
- './_wks': 215
- }
- ],
- 184: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return {
- value: t,
- done: !!e
- }
- }
- },
- {
- }
- ],
- 185: [
- function (e, t, n) {
- t.exports = {
- }
- },
- {
- }
- ],
- 186: [
- function (e, t, n) {
- t.exports = !0
- },
- {
- }
- ],
- 187: [
- function (e, t, n) {
- var r = e('./_uid') ('meta'),
- i = e('./_is-object'),
- s = e('./_has'),
- o = e('./_object-dp').f,
- a = 0,
- u = Object.isExtensible || function () {
- return !0
- },
- l = !e('./_fails') (function () {
- return u(Object.preventExtensions({
- }))
- }),
- c = function (e) {
- o(e, r, {
- value: {
- i: 'O' + ++a,
- w: {
- }
- }
- })
- },
- p = t.exports = {
- KEY: r,
- NEED: !1,
- fastKey: function (e, t) {
- if (!i(e)) return 'symbol' == typeof e ? e : ('string' == typeof e ? 'S' : 'P') + e;
- if (!s(e, r)) {
- if (!u(e)) return 'F';
- if (!t) return 'E';
- c(e)
- }
- return e[r].i
- },
- getWeak: function (e, t) {
- if (!s(e, r)) {
- if (!u(e)) return !0;
- if (!t) return !1;
- c(e)
- }
- return e[r].w
- },
- onFreeze: function (e) {
- return l && p.NEED && u(e) && !s(e, r) && c(e),
- e
- }
- }
- },
- {
- './_fails': 173,
- './_has': 175,
- './_is-object': 181,
- './_object-dp': 189,
- './_uid': 212
- }
- ],
- 188: [
- function (e, t, n) {
- var r = e('./_an-object'),
- i = e('./_object-dps'),
- s = e('./_enum-bug-keys'),
- o = e('./_shared-key') ('IE_PROTO'),
- a = function () {
- },
- u = function () {
- var t,
- n = e('./_dom-create') ('iframe'),
- r = s.length;
- for (n.style.display = 'none', e('./_html').appendChild(n), n.src = 'javascript:', (t = n.contentWindow.document).open(), t.write('<script>document.F=Object</script>'), t.close(), u = t.F; r--; ) delete u.prototype[s[r]];
- return u()
- };
- t.exports = Object.create || function (e, t) {
- var n;
- return null !== e ? (a.prototype = r(e), n = new a, a.prototype = null, n[o] = e) : n = u(),
- void 0 === t ? n : i(n, t)
- }
- },
- {
- './_an-object': 161,
- './_dom-create': 169,
- './_enum-bug-keys': 170,
- './_html': 177,
- './_object-dps': 190,
- './_shared-key': 203
- }
- ],
- 189: [
- function (e, t, n) {
- var r = e('./_an-object'),
- i = e('./_ie8-dom-define'),
- s = e('./_to-primitive'),
- o = Object.defineProperty;
- n.f = e('./_descriptors') ? Object.defineProperty : function (e, t, n) {
- if (r(e), t = s(t, !0), r(n), i) try {
- return o(e, t, n)
- } catch (e) {
- }
- if ('get' in n || 'set' in n) throw TypeError('Accessors not supported!');
- return 'value' in n && (e[t] = n.value),
- e
- }
- },
- {
- './_an-object': 161,
- './_descriptors': 168,
- './_ie8-dom-define': 178,
- './_to-primitive': 211
- }
- ],
- 190: [
- function (e, t, n) {
- var r = e('./_object-dp'),
- i = e('./_an-object'),
- s = e('./_object-keys');
- t.exports = e('./_descriptors') ? Object.defineProperties : function (e, t) {
- i(e);
- for (var n, o = s(t), a = o.length, u = 0; a > u; ) r.f(e, n = o[u++], t[n]);
- return e
- }
- },
- {
- './_an-object': 161,
- './_descriptors': 168,
- './_object-dp': 189,
- './_object-keys': 197
- }
- ],
- 191: [
- function (e, t, n) {
- var r = e('./_object-pie'),
- i = e('./_property-desc'),
- s = e('./_to-iobject'),
- o = e('./_to-primitive'),
- a = e('./_has'),
- u = e('./_ie8-dom-define'),
- l = Object.getOwnPropertyDescriptor;
- n.f = e('./_descriptors') ? l : function (e, t) {
- if (e = s(e), t = o(t, !0), u) try {
- return l(e, t)
- } catch (e) {
- }
- if (a(e, t)) return i(!r.f.call(e, t), e[t])
- }
- },
- {
- './_descriptors': 168,
- './_has': 175,
- './_ie8-dom-define': 178,
- './_object-pie': 198,
- './_property-desc': 200,
- './_to-iobject': 208,
- './_to-primitive': 211
- }
- ],
- 192: [
- function (e, t, n) {
- var r = e('./_to-iobject'),
- i = e('./_object-gopn').f,
- s = {
- }.toString,
- o = 'object' == typeof window && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [
- ];
- t.exports.f = function (e) {
- return o && '[object Window]' == s.call(e) ? function (e) {
- try {
- return i(e)
- } catch (e) {
- return o.slice()
- }
- }(e) : i(r(e))
- }
- },
- {
- './_object-gopn': 193,
- './_to-iobject': 208
- }
- ],
- 193: [
- function (e, t, n) {
- var r = e('./_object-keys-internal'),
- i = e('./_enum-bug-keys').concat('length', 'prototype');
- n.f = Object.getOwnPropertyNames || function (e) {
- return r(e, i)
- }
- },
- {
- './_enum-bug-keys': 170,
- './_object-keys-internal': 196
- }
- ],
- 194: [
- function (e, t, n) {
- n.f = Object.getOwnPropertySymbols
- },
- {
- }
- ],
- 195: [
- function (e, t, n) {
- var r = e('./_has'),
- i = e('./_to-object'),
- s = e('./_shared-key') ('IE_PROTO'),
- o = Object.prototype;
- t.exports = Object.getPrototypeOf || function (e) {
- return e = i(e),
- r(e, s) ? e[s] : 'function' == typeof e.constructor && e instanceof e.constructor ? e.constructor.prototype : e instanceof Object ? o : null
- }
- },
- {
- './_has': 175,
- './_shared-key': 203,
- './_to-object': 210
- }
- ],
- 196: [
- function (e, t, n) {
- var r = e('./_has'),
- i = e('./_to-iobject'),
- s = e('./_array-includes') (!1),
- o = e('./_shared-key') ('IE_PROTO');
- t.exports = function (e, t) {
- var n,
- a = i(e),
- u = 0,
- l = [
- ];
- for (n in a) n != o && r(a, n) && l.push(n);
- for (; t.length > u; ) r(a, n = t[u++]) && (~s(l, n) || l.push(n));
- return l
- }
- },
- {
- './_array-includes': 162,
- './_has': 175,
- './_shared-key': 203,
- './_to-iobject': 208
- }
- ],
- 197: [
- function (e, t, n) {
- var r = e('./_object-keys-internal'),
- i = e('./_enum-bug-keys');
- t.exports = Object.keys || function (e) {
- return r(e, i)
- }
- },
- {
- './_enum-bug-keys': 170,
- './_object-keys-internal': 196
- }
- ],
- 198: [
- function (e, t, n) {
- n.f = {
- }.propertyIsEnumerable
- },
- {
- }
- ],
- 199: [
- function (e, t, n) {
- var r = e('./_export'),
- i = e('./_core'),
- s = e('./_fails');
- t.exports = function (e, t) {
- var n = (i.Object || {
- }) [e] || Object[e],
- o = {
- };
- o[e] = t(n),
- r(r.S + r.F * s(function () {
- n(1)
- }), 'Object', o)
- }
- },
- {
- './_core': 165,
- './_export': 172,
- './_fails': 173
- }
- ],
- 200: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return {
- enumerable: !(1 & e),
- configurable: !(2 & e),
- writable: !(4 & e),
- value: t
- }
- }
- },
- {
- }
- ],
- 201: [
- function (e, t, n) {
- t.exports = e('./_hide')
- },
- {
- './_hide': 176
- }
- ],
- 202: [
- function (e, t, n) {
- var r = e('./_object-dp').f,
- i = e('./_has'),
- s = e('./_wks') ('toStringTag');
- t.exports = function (e, t, n) {
- e && !i(e = n ? e : e.prototype, s) && r(e, s, {
- configurable: !0,
- value: t
- })
- }
- },
- {
- './_has': 175,
- './_object-dp': 189,
- './_wks': 215
- }
- ],
- 203: [
- function (e, t, n) {
- var r = e('./_shared') ('keys'),
- i = e('./_uid');
- t.exports = function (e) {
- return r[e] || (r[e] = i(e))
- }
- },
- {
- './_shared': 204,
- './_uid': 212
- }
- ],
- 204: [
- function (e, t, n) {
- var r = e('./_core'),
- i = e('./_global'),
- s = i['__core-js_shared__'] || (i['__core-js_shared__'] = {
- });
- (t.exports = function (e, t) {
- return s[e] || (s[e] = void 0 !== t ? t : {
- })
- }) ('versions', [
- ]).push({
- version: r.version,
- mode: e('./_library') ? 'pure' : 'global',
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
- })
- },
- {
- './_core': 165,
- './_global': 174,
- './_library': 186
- }
- ],
- 205: [
- function (e, t, n) {
- var r = e('./_to-integer'),
- i = e('./_defined');
- t.exports = function (e) {
- return function (t, n) {
- var s,
- o,
- a = String(i(t)),
- u = r(n),
- l = a.length;
- return u < 0 || u >= l ? e ? '' : void 0 : (s = a.charCodeAt(u)) < 55296 || s > 56319 || u + 1 === l || (o = a.charCodeAt(u + 1)) < 56320 || o > 57343 ? e ? a.charAt(u) : s : e ? a.slice(u, u + 2) : o - 56320 + (s - 55296 << 10) + 65536
- }
- }
- },
- {
- './_defined': 167,
- './_to-integer': 207
- }
- ],
- 206: [
- function (e, t, n) {
- var r = e('./_to-integer'),
- i = Math.max,
- s = Math.min;
- t.exports = function (e, t) {
- return (e = r(e)) < 0 ? i(e + t, 0) : s(e, t)
- }
- },
- {
- './_to-integer': 207
- }
- ],
- 207: [
- function (e, t, n) {
- var r = Math.ceil,
- i = Math.floor;
- t.exports = function (e) {
- return isNaN(e = + e) ? 0 : (e > 0 ? i : r) (e)
- }
- },
- {
- }
- ],
- 208: [
- function (e, t, n) {
- var r = e('./_iobject'),
- i = e('./_defined');
- t.exports = function (e) {
- return r(i(e))
- }
- },
- {
- './_defined': 167,
- './_iobject': 179
- }
- ],
- 209: [
- function (e, t, n) {
- var r = e('./_to-integer'),
- i = Math.min;
- t.exports = function (e) {
- return e > 0 ? i(r(e), 9007199254740991) : 0
- }
- },
- {
- './_to-integer': 207
- }
- ],
- 210: [
- function (e, t, n) {
- var r = e('./_defined');
- t.exports = function (e) {
- return Object(r(e))
- }
- },
- {
- './_defined': 167
- }
- ],
- 211: [
- function (e, t, n) {
- var r = e('./_is-object');
- t.exports = function (e, t) {
- if (!r(e)) return e;
- var n,
- i;
- if (t && 'function' == typeof (n = e.toString) && !r(i = n.call(e))) return i;
- if ('function' == typeof (n = e.valueOf) && !r(i = n.call(e))) return i;
- if (!t && 'function' == typeof (n = e.toString) && !r(i = n.call(e))) return i;
- throw TypeError('Can\'t convert object to primitive value')
- }
- },
- {
- './_is-object': 181
- }
- ],
- 212: [
- function (e, t, n) {
- var r = 0,
- i = Math.random();
- t.exports = function (e) {
- return 'Symbol('.concat(void 0 === e ? '' : e, ')_', (++r + i).toString(36))
- }
- },
- {
- }
- ],
- 213: [
- function (e, t, n) {
- var r = e('./_global'),
- i = e('./_core'),
- s = e('./_library'),
- o = e('./_wks-ext'),
- a = e('./_object-dp').f;
- t.exports = function (e) {
- var t = i.Symbol || (i.Symbol = s ? {
- }
- : r.Symbol || {
- });
- '_' == e.charAt(0) || e in t || a(t, e, {
- value: o.f(e)
- })
- }
- },
- {
- './_core': 165,
- './_global': 174,
- './_library': 186,
- './_object-dp': 189,
- './_wks-ext': 214
- }
- ],
- 214: [
- function (e, t, n) {
- n.f = e('./_wks')
- },
- {
- './_wks': 215
- }
- ],
- 215: [
- function (e, t, n) {
- var r = e('./_shared') ('wks'),
- i = e('./_uid'),
- s = e('./_global').Symbol,
- o = 'function' == typeof s;
- (t.exports = function (e) {
- return r[e] || (r[e] = o && s[e] || (o ? s : i) ('Symbol.' + e))
- }).store = r
- },
- {
- './_global': 174,
- './_shared': 204,
- './_uid': 212
- }
- ],
- 216: [
- function (e, t, n) {
- var r = e('./_classof'),
- i = e('./_wks') ('iterator'),
- s = e('./_iterators');
- t.exports = e('./_core').getIteratorMethod = function (e) {
- if (void 0 != e) return e[i] || e['@@iterator'] || s[r(e)]
- }
- },
- {
- './_classof': 163,
- './_core': 165,
- './_iterators': 185,
- './_wks': 215
- }
- ],
- 217: [
- function (e, t, n) {
- var r = e('./_an-object'),
- i = e('./core.get-iterator-method');
- t.exports = e('./_core').getIterator = function (e) {
- var t = i(e);
- if ('function' != typeof t) throw TypeError(e + ' is not iterable!');
- return r(t.call(e))
- }
- },
- {
- './_an-object': 161,
- './_core': 165,
- './core.get-iterator-method': 216
- }
- ],
- 218: [
- function (e, t, n) {
- 'use strict';
- var r = e('./_add-to-unscopables'),
- i = e('./_iter-step'),
- s = e('./_iterators'),
- o = e('./_to-iobject');
- t.exports = e('./_iter-define') (Array, 'Array', function (e, t) {
- this._t = o(e),
- this._i = 0,
- this._k = t
- }, function () {
- var e = this._t,
- t = this._k,
- n = this._i++;
- return !e || n >= e.length ? (this._t = void 0, i(1)) : i(0, 'keys' == t ? n : 'values' == t ? e[n] : [
- n,
- e[n]
- ])
- }, 'values'),
- s.Arguments = s.Array,
- r('keys'),
- r('values'),
- r('entries')
- },
- {
- './_add-to-unscopables': 160,
- './_iter-define': 183,
- './_iter-step': 184,
- './_iterators': 185,
- './_to-iobject': 208
- }
- ],
- 219: [
- function (e, t, n) {
- var r = e('./_export');
- r(r.S, 'Number', {
- MAX_SAFE_INTEGER: 9007199254740991
- })
- },
- {
- './_export': 172
- }
- ],
- 220: [
- function (e, t, n) {
- var r = e('./_export');
- r(r.S, 'Object', {
- create: e('./_object-create')
- })
- },
- {
- './_export': 172,
- './_object-create': 188
- }
- ],
- 221: [
- function (e, t, n) {
- var r = e('./_to-object'),
- i = e('./_object-keys');
- e('./_object-sap') ('keys', function () {
- return function (e) {
- return i(r(e))
- }
- })
- },
- {
- './_object-keys': 197,
- './_object-sap': 199,
- './_to-object': 210
- }
- ],
- 222: [
- function (e, t, n) {
- arguments[4][40][0].apply(n, arguments)
- },
- {
- dup: 40
- }
- ],
- 223: [
- function (e, t, n) {
- 'use strict';
- var r = e('./_string-at') (!0);
- e('./_iter-define') (String, 'String', function (e) {
- this._t = String(e),
- this._i = 0
- }, function () {
- var e,
- t = this._t,
- n = this._i;
- return n >= t.length ? {
- value: void 0,
- done: !0
- }
- : (e = r(t, n), this._i += e.length, {
- value: e,
- done: !1
- })
- })
- },
- {
- './_iter-define': 183,
- './_string-at': 205
- }
- ],
- 224: [
- function (e, t, n) {
- 'use strict';
- var r = e('./_global'),
- i = e('./_has'),
- s = e('./_descriptors'),
- o = e('./_export'),
- a = e('./_redefine'),
- u = e('./_meta').KEY,
- l = e('./_fails'),
- c = e('./_shared'),
- p = e('./_set-to-string-tag'),
- h = e('./_uid'),
- f = e('./_wks'),
- d = e('./_wks-ext'),
- m = e('./_wks-define'),
- g = e('./_enum-keys'),
- y = e('./_is-array'),
- v = e('./_an-object'),
- b = e('./_is-object'),
- x = e('./_to-object'),
- A = e('./_to-iobject'),
- E = e('./_to-primitive'),
- _ = e('./_property-desc'),
- C = e('./_object-create'),
- w = e('./_object-gopn-ext'),
- D = e('./_object-gopd'),
- k = e('./_object-gops'),
- S = e('./_object-dp'),
- T = e('./_object-keys'),
- F = D.f,
- O = S.f,
- B = w.f,
- P = r.Symbol,
- N = r.JSON,
- R = N && N.stringify,
- L = f('_hidden'),
- I = f('toPrimitive'),
- j = {
- }.propertyIsEnumerable,
- M = c('symbol-registry'),
- U = c('symbols'),
- V = c('op-symbols'),
- z = Object.prototype,
- q = 'function' == typeof P && !!k.f,
- K = r.QObject,
- $ = !K || !K.prototype || !K.prototype.findChild,
- Y = s && l(function () {
- return 7 != C(O({
- }, 'a', {
- get: function () {
- return O(this, 'a', {
- value: 7
- }).a
- }
- })).a
- }) ? function (e, t, n) {
- var r = F(z, t);
- r && delete z[t],
- O(e, t, n),
- r && e !== z && O(z, t, r)
- }
- : O,
- W = function (e) {
- var t = U[e] = C(P.prototype);
- return t._k = e,
- t
- },
- G = q && 'symbol' == typeof P.iterator ? function (e) {
- return 'symbol' == typeof e
- }
- : function (e) {
- return e instanceof P
- },
- H = function (e, t, n) {
- return e === z && H(V, t, n),
- v(e),
- t = E(t, !0),
- v(n),
- i(U, t) ? (n.enumerable ? (i(e, L) && e[L][t] && (e[L][t] = !1), n = C(n, {
- enumerable: _(0, !1)
- })) : (i(e, L) || O(e, L, _(1, {
- })), e[L][t] = !0), Y(e, t, n)) : O(e, t, n)
- },
- X = function (e, t) {
- v(e);
- for (var n, r = g(t = A(t)), i = 0, s = r.length; s > i; ) H(e, n = r[i++], t[n]);
- return e
- },
- J = function (e) {
- var t = j.call(this, e = E(e, !0));
- return !(this === z && i(U, e) && !i(V, e)) && (!(t || !i(this, e) || !i(U, e) || i(this, L) && this[L][e]) || t)
- },
- Q = function (e, t) {
- if (e = A(e), t = E(t, !0), e !== z || !i(U, t) || i(V, t)) {
- var n = F(e, t);
- return !n || !i(U, t) || i(e, L) && e[L][t] || (n.enumerable = !0),
- n
- }
- },
- Z = function (e) {
- for (var t, n = B(A(e)), r = [
- ], s = 0; n.length > s; ) i(U, t = n[s++]) || t == L || t == u || r.push(t);
- return r
- },
- ee = function (e) {
- for (var t, n = e === z, r = B(n ? V : A(e)), s = [
- ], o = 0; r.length > o; ) !i(U, t = r[o++]) || n && !i(z, t) || s.push(U[t]);
- return s
- };
- q || (a((P = function () {
- if (this instanceof P) throw TypeError('Symbol is not a constructor!');
- var e = h(arguments.length > 0 ? arguments[0] : void 0),
- t = function (n) {
- this === z && t.call(V, n),
- i(this, L) && i(this[L], e) && (this[L][e] = !1),
- Y(this, e, _(1, n))
- };
- return s && $ && Y(z, e, {
- configurable: !0,
- set: t
- }),
- W(e)
- }).prototype, 'toString', function () {
- return this._k
- }), D.f = Q, S.f = H, e('./_object-gopn').f = w.f = Z, e('./_object-pie').f = J, k.f = ee, s && !e('./_library') && a(z, 'propertyIsEnumerable', J, !0), d.f = function (e) {
- return W(f(e))
- }),
- o(o.G + o.W + o.F * !q, {
- Symbol: P
- });
- for (var te = 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), ne = 0; te.length > ne; ) f(te[ne++]);
- for (var re = T(f.store), ie = 0; re.length > ie; ) m(re[ie++]);
- o(o.S + o.F * !q, 'Symbol', {
- for : function (e) {
- return i(M, e += '') ? M[e] : M[e] = P(e)
- },
- keyFor: function (e) {
- if (!G(e)) throw TypeError(e + ' is not a symbol!');
- for (var t in M) if (M[t] === e) return t
- },
- useSetter: function () {
- $ = !0
- },
- useSimple: function () {
- $ = !1
- }
- }),
- o(o.S + o.F * !q, 'Object', {
- create: function (e, t) {
- return void 0 === t ? C(e) : X(C(e), t)
- },
- defineProperty: H,
- defineProperties: X,
- getOwnPropertyDescriptor: Q,
- getOwnPropertyNames: Z,
- getOwnPropertySymbols: ee
- });
- var se = l(function () {
- k.f(1)
- });
- o(o.S + o.F * se, 'Object', {
- getOwnPropertySymbols: function (e) {
- return k.f(x(e))
- }
- }),
- N && o(o.S + o.F * (!q || l(function () {
- var e = P();
- return '[null]' != R([e]) || '{}' != R({
- a: e
- }) || '{}' != R(Object(e))
- })), 'JSON', {
- stringify: function (e) {
- for (var t, n, r = [
- e
- ], i = 1; arguments.length > i; ) r.push(arguments[i++]);
- if (n = t = r[1], (b(t) || void 0 !== e) && !G(e)) return y(t) || (t = function (e, t) {
- if ('function' == typeof n && (t = n.call(this, e, t)), !G(t)) return t
- }),
- r[1] = t,
- R.apply(N, r)
- }
- }),
- P.prototype[I] || e('./_hide') (P.prototype, I, P.prototype.valueOf),
- p(P, 'Symbol'),
- p(Math, 'Math', !0),
- p(r.JSON, 'JSON', !0)
- },
- {
- './_an-object': 161,
- './_descriptors': 168,
- './_enum-keys': 171,
- './_export': 172,
- './_fails': 173,
- './_global': 174,
- './_has': 175,
- './_hide': 176,
- './_is-array': 180,
- './_is-object': 181,
- './_library': 186,
- './_meta': 187,
- './_object-create': 188,
- './_object-dp': 189,
- './_object-gopd': 191,
- './_object-gopn': 193,
- './_object-gopn-ext': 192,
- './_object-gops': 194,
- './_object-keys': 197,
- './_object-pie': 198,
- './_property-desc': 200,
- './_redefine': 201,
- './_set-to-string-tag': 202,
- './_shared': 204,
- './_to-iobject': 208,
- './_to-object': 210,
- './_to-primitive': 211,
- './_uid': 212,
- './_wks': 215,
- './_wks-define': 213,
- './_wks-ext': 214
- }
- ],
- 225: [
- function (e, t, n) {
- e('./_wks-define') ('asyncIterator')
- },
- {
- './_wks-define': 213
- }
- ],
- 226: [
- function (e, t, n) {
- e('./_wks-define') ('observable')
- },
- {
- './_wks-define': 213
- }
- ],
- 227: [
- function (e, t, n) {
- e('./es6.array.iterator');
- for (var r = e('./_global'), i = e('./_hide'), s = e('./_iterators'), o = e('./_wks') ('toStringTag'), a = 'CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList'.split(','), u = 0; u < a.length; u++) {
- var l = a[u],
- c = r[l],
- p = c && c.prototype;
- p && !p[o] && i(p, o, l),
- s[l] = s.Array
- }
- },
- {
- './_global': 174,
- './_hide': 176,
- './_iterators': 185,
- './_wks': 215,
- './es6.array.iterator': 218
- }
- ],
- 228: [
- function (e, t, n) {
- 'use strict';
- t.exports = {
- html: '<!DOCTYPE html>',
- xml: '<?xml version="1.0" encoding="utf-8" ?>',
- transitional: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
- strict: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
- frameset: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
- 1.1: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
- basic: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
- mobile: '<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">',
- plist: '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">'
- }
- },
- {
- }
- ],
- 229: [
- function (e, t, n) {
- !function () {
- 'use strict';
- function e(e) {
- if (null == e) return !1;
- switch (e.type) {
- case 'BlockStatement':
- case 'BreakStatement':
- case 'ContinueStatement':
- case 'DebuggerStatement':
- case 'DoWhileStatement':
- case 'EmptyStatement':
- case 'ExpressionStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'IfStatement':
- case 'LabeledStatement':
- case 'ReturnStatement':
- case 'SwitchStatement':
- case 'ThrowStatement':
- case 'TryStatement':
- case 'VariableDeclaration':
- case 'WhileStatement':
- case 'WithStatement':
- return !0
- }
- return !1
- }
- function n(e) {
- switch (e.type) {
- case 'IfStatement':
- return null != e.alternate ? e.alternate : e.consequent;
- case 'LabeledStatement':
- case 'ForStatement':
- case 'ForInStatement':
- case 'WhileStatement':
- case 'WithStatement':
- return e.body
- }
- return null
- }
- t.exports = {
- isExpression: function (e) {
- if (null == e) return !1;
- switch (e.type) {
- case 'ArrayExpression':
- case 'AssignmentExpression':
- case 'BinaryExpression':
- case 'CallExpression':
- case 'ConditionalExpression':
- case 'FunctionExpression':
- case 'Identifier':
- case 'Literal':
- case 'LogicalExpression':
- case 'MemberExpression':
- case 'NewExpression':
- case 'ObjectExpression':
- case 'SequenceExpression':
- case 'ThisExpression':
- case 'UnaryExpression':
- case 'UpdateExpression':
- return !0
- }
- return !1
- },
- isStatement: e,
- isIterationStatement: function (e) {
- if (null == e) return !1;
- switch (e.type) {
- case 'DoWhileStatement':
- case 'ForInStatement':
- case 'ForStatement':
- case 'WhileStatement':
- return !0
- }
- return !1
- },
- isSourceElement: function (t) {
- return e(t) || null != t && 'FunctionDeclaration' === t.type
- },
- isProblematicIfStatement: function (e) {
- var t;
- if ('IfStatement' !== e.type) return !1;
- if (null == e.alternate) return !1;
- t = e.consequent;
- do {
- if ('IfStatement' === t.type && null == t.alternate) return !0;
- t = n(t)
- } while (t);
- return !1
- },
- trailingStatement: n
- }
- }()
- },
- {
- }
- ],
- 230: [
- function (e, t, n) {
- !function () {
- 'use strict';
- var e,
- n,
- r,
- i,
- s,
- o;
- function a(e) {
- return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(Math.floor((e - 65536) / 1024) + 55296) + String.fromCharCode((e - 65536) % 1024 + 56320)
- }
- for (n = {
- NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
- NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/
- }, e = {
- NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,
- NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
- }, r = [
- 5760,
- 8192,
- 8193,
- 8194,
- 8195,
- 8196,
- 8197,
- 8198,
- 8199,
- 8200,
- 8201,
- 8202,
- 8239,
- 8287,
- 12288,
- 65279
- ], i = new Array(128), o = 0; o < 128; ++o) i[o] = o >= 97 && o <= 122 || o >= 65 && o <= 90 || 36 === o || 95 === o;
- for (s = new Array(128), o = 0; o < 128; ++o) s[o] = o >= 97 && o <= 122 || o >= 65 && o <= 90 || o >= 48 && o <= 57 || 36 === o || 95 === o;
- t.exports = {
- isDecimalDigit: function (e) {
- return 48 <= e && e <= 57
- },
- isHexDigit: function (e) {
- return 48 <= e && e <= 57 || 97 <= e && e <= 102 || 65 <= e && e <= 70
- },
- isOctalDigit: function (e) {
- return e >= 48 && e <= 55
- },
- isWhiteSpace: function (e) {
- return 32 === e || 9 === e || 11 === e || 12 === e || 160 === e || e >= 5760 && r.indexOf(e) >= 0
- },
- isLineTerminator: function (e) {
- return 10 === e || 13 === e || 8232 === e || 8233 === e
- },
- isIdentifierStartES5: function (e) {
- return e < 128 ? i[e] : n.NonAsciiIdentifierStart.test(a(e))
- },
- isIdentifierPartES5: function (e) {
- return e < 128 ? s[e] : n.NonAsciiIdentifierPart.test(a(e))
- },
- isIdentifierStartES6: function (t) {
- return t < 128 ? i[t] : e.NonAsciiIdentifierStart.test(a(t))
- },
- isIdentifierPartES6: function (t) {
- return t < 128 ? s[t] : e.NonAsciiIdentifierPart.test(a(t))
- }
- }
- }()
- },
- {
- }
- ],
- 231: [
- function (e, t, n) {
- !function () {
- 'use strict';
- var n = e('./code');
- function r(e, t) {
- return !(!t && 'yield' === e) && i(e, t)
- }
- function i(e, t) {
- if (t && function (e) {
- switch (e) {
- case 'implements':
- case 'interface':
- case 'package':
- case 'private':
- case 'protected':
- case 'public':
- case 'static':
- case 'let':
- return !0;
- default:
- return !1
- }
- }(e)) return !0;
- switch (e.length) {
- case 2:
- return 'if' === e || 'in' === e || 'do' === e;
- case 3:
- return 'var' === e || 'for' === e || 'new' === e || 'try' === e;
- case 4:
- return 'this' === e || 'else' === e || 'case' === e || 'void' === e || 'with' === e || 'enum' === e;
- case 5:
- return 'while' === e || 'break' === e || 'catch' === e || 'throw' === e || 'const' === e || 'yield' === e || 'class' === e || 'super' === e;
- case 6:
- return 'return' === e || 'typeof' === e || 'delete' === e || 'switch' === e || 'export' === e || 'import' === e;
- case 7:
- return 'default' === e || 'finally' === e || 'extends' === e;
- case 8:
- return 'function' === e || 'continue' === e || 'debugger' === e;
- case 10:
- return 'instanceof' === e;
- default:
- return !1
- }
- }
- function s(e, t) {
- return 'null' === e || 'true' === e || 'false' === e || r(e, t)
- }
- function o(e, t) {
- return 'null' === e || 'true' === e || 'false' === e || i(e, t)
- }
- function a(e) {
- var t,
- r,
- i;
- if (0 === e.length) return !1;
- if (i = e.charCodeAt(0), !n.isIdentifierStartES5(i)) return !1;
- for (t = 1, r = e.length; t < r; ++t) if (i = e.charCodeAt(t), !n.isIdentifierPartES5(i)) return !1;
- return !0
- }
- function u(e) {
- var t,
- r,
- i,
- s,
- o;
- if (0 === e.length) return !1;
- for (o = n.isIdentifierStartES6, t = 0, r = e.length; t < r; ++t) {
- if (55296 <= (i = e.charCodeAt(t)) && i <= 56319) {
- if (++t >= r) return !1;
- if (!(56320 <= (s = e.charCodeAt(t)) && s <= 57343)) return !1;
- i = 1024 * (i - 55296) + (s - 56320) + 65536
- }
- if (!o(i)) return !1;
- o = n.isIdentifierPartES6
- }
- return !0
- }
- t.exports = {
- isKeywordES5: r,
- isKeywordES6: i,
- isReservedWordES5: s,
- isReservedWordES6: o,
- isRestrictedWord: function (e) {
- return 'eval' === e || 'arguments' === e
- },
- isIdentifierNameES5: a,
- isIdentifierNameES6: u,
- isIdentifierES5: function (e, t) {
- return a(e) && !s(e, t)
- },
- isIdentifierES6: function (e, t) {
- return u(e) && !o(e, t)
- }
- }
- }()
- },
- {
- './code': 230
- }
- ],
- 232: [
- function (e, t, n) {
- !function () {
- 'use strict';
- n.ast = e('./ast'),
- n.code = e('./code'),
- n.keyword = e('./keyword')
- }()
- },
- {
- './ast': 229,
- './code': 230,
- './keyword': 231
- }
- ],
- 233: [
- function (e, t, n) {
- 'use strict';
- var r = Array.prototype.slice,
- i = Object.prototype.toString;
- t.exports = function (e) {
- var t = this;
- if ('function' != typeof t || '[object Function]' !== i.call(t)) throw new TypeError('Function.prototype.bind called on incompatible ' + t);
- for (var n, s = r.call(arguments, 1), o = Math.max(0, t.length - s.length), a = [
- ], u = 0; u < o; u++) a.push('$' + u);
- if (n = Function('binder', 'return function (' + a.join(',') + '){ return binder.apply(this,arguments); }') (function () {
- if (this instanceof n) {
- var i = t.apply(this, s.concat(r.call(arguments)));
- return Object(i) === i ? i : this
- }
- return t.apply(e, s.concat(r.call(arguments)))
- }), t.prototype) {
- var l = function () {
- };
- l.prototype = t.prototype,
- n.prototype = new l,
- l.prototype = null
- }
- return n
- }
- },
- {
- }
- ],
- 234: [
- function (e, t, n) {
- 'use strict';
- var r = e('./implementation');
- t.exports = Function.prototype.bind || r
- },
- {
- './implementation': 233
- }
- ],
- 235: [
- function (e, t, n) {
- 'use strict';
- var r = e('function-bind');
- t.exports = r.call(Function.call, Object.prototype.hasOwnProperty)
- },
- {
- 'function-bind': 234
- }
- ],
- 236: [
- function (e, t, n) {
- n.read = function (e, t, n, r, i) {
- var s,
- o,
- a = 8 * i - r - 1,
- u = (1 << a) - 1,
- l = u >> 1,
- c = - 7,
- p = n ? i - 1 : 0,
- h = n ? - 1 : 1,
- f = e[t + p];
- for (p += h, s = f & (1 << - c) - 1, f >>= - c, c += a; c > 0; s = 256 * s + e[t + p], p += h, c -= 8);
- for (o = s & (1 << - c) - 1, s >>= - c, c += r; c > 0; o = 256 * o + e[t + p], p += h, c -= 8);
- if (0 === s) s = 1 - l;
- else {
- if (s === u) return o ? NaN : 1 / 0 * (f ? - 1 : 1);
- o += Math.pow(2, r),
- s -= l
- }
- return (f ? - 1 : 1) * o * Math.pow(2, s - r)
- },
- n.write = function (e, t, n, r, i, s) {
- var o,
- a,
- u,
- l = 8 * s - i - 1,
- c = (1 << l) - 1,
- p = c >> 1,
- h = 23 === i ? Math.pow(2, - 24) - Math.pow(2, - 77) : 0,
- f = r ? 0 : s - 1,
- d = r ? 1 : - 1,
- m = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
- for (t = Math.abs(t), isNaN(t) || t === 1 / 0 ? (a = isNaN(t) ? 1 : 0, o = c) : (o = Math.floor(Math.log(t) / Math.LN2), t * (u = Math.pow(2, - o)) < 1 && (o--, u *= 2), (t += o + p >= 1 ? h / u : h * Math.pow(2, 1 - p)) * u >= 2 && (o++, u /= 2), o + p >= c ? (a = 0, o = c) : o + p >= 1 ? (a = (t * u - 1) * Math.pow(2, i), o += p) : (a = t * Math.pow(2, p - 1) * Math.pow(2, i), o = 0)); i >= 8; e[n + f] = 255 & a, f += d, a /= 256, i -= 8);
- for (o = o << i | a, l += i; l > 0; e[n + f] = 255 & o, f += d, o /= 256, l -= 8);
- e[n + f - d] |= 128 * m
- }
- },
- {
- }
- ],
- 237: [
- function (e, t, n) {
- function r(e) {
- return !!e.constructor && 'function' == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
- }
- t.exports = function (e) {
- return null != e && (r(e) || function (e) {
- return 'function' == typeof e.readFloatLE && 'function' == typeof e.slice && r(e.slice(0, 0))
- }(e) || !!e._isBuffer)
- }
- },
- {
- }
- ],
- 238: [
- function (e, t, n) {
- 'use strict';
- var r = e('acorn'),
- i = e('object-assign');
- t.exports = function (e, t) {
- t = i({
- }, s, t);
- try {
- var n = new r.Parser(t, e, 0);
- t.strict && (n.strict = !0),
- t.lineComment || (n.skipLineComment = function (e) {
- this.raise(this.pos, 'Line comments not allowed in an expression')
- }),
- n.nextToken(),
- n.parseExpression(),
- n.type !== r.tokTypes.eof && n.unexpected()
- } catch (e) {
- if (!t.throw) return !1;
- throw e
- }
- return !0
- };
- var s = {
- throw : !1,
- strict: !1,
- lineComment: !1
- }
- },
- {
- acorn: 239,
- 'object-assign': 370
- }
- ],
- 239: [
- function (e, t, n) {
- arguments[4][2][0].apply(n, arguments)
- },
- {
- dup: 2
- }
- ],
- 240: [
- function (e, t, n) {
- t.exports = function (e) {
- return !!e && ('object' == typeof e || 'function' == typeof e) && 'function' == typeof e.then
- }
- },
- {
- }
- ],
- 241: [
- function (e, t, n) {
- 'use strict';
- var r = e('has'),
- i = RegExp.prototype.exec,
- s = Object.getOwnPropertyDescriptor,
- o = Object.prototype.toString,
- a = 'function' == typeof Symbol && 'symbol' == typeof Symbol.toStringTag;
- t.exports = function (e) {
- if (!e || 'object' != typeof e) return !1;
- if (!a) return '[object RegExp]' === o.call(e);
- var t = s(e, 'lastIndex');
- return !(!t || !r(t, 'value')) && function (e) {
- try {
- var t = e.lastIndex;
- return e.lastIndex = 0,
- i.call(e),
- !0
- } catch (e) {
- return !1
- } finally {
- e.lastIndex = t
- }
- }(e)
- }
- },
- {
- has: 235
- }
- ],
- 242: [
- function (e, t, n) {
- 'use strict';
- t.exports = function e(t) {
- if (t instanceof Date) return 'new Date(' + e(t.toISOString()) + ')';
- if (void 0 === t) return 'undefined';
- return JSON.stringify(t).replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029').replace(/</g, '\\u003C').replace(/>/g, '\\u003E').replace(/\//g, '\\u002F')
- }
- },
- {
- }
- ],
- 243: [
- function (e, t, n) {
- 'use strict';
- var r = e('fs'),
- i = e('assert'),
- s = e('promise'),
- o = e('is-promise'),
- a = t.exports = function (e) {
- return new u(e)
- };
- function u(e) {
- i(e, 'Transformer must be an object'),
- i('string' == typeof e.name, 'Transformer must have a name'),
- i('string' == typeof e.outputFormat, 'Transformer must have an output format'),
- i(['compile',
- 'compileAsync',
- 'compileFile',
- 'compileFileAsync',
- 'compileClient',
- 'compileClientAsync',
- 'compileFileClient',
- 'compileFileClientAsync',
- 'render',
- 'renderAsync',
- 'renderFile',
- 'renderFileAsync'].some(function (t) {
- return 'function' == typeof e[t]
- }), 'Transformer must implement at least one of the potential methods.'),
- this._tr = e,
- this.name = this._tr.name,
- this.outputFormat = this._tr.outputFormat,
- this.inputFormats = this._tr.inputFormats || [
- this.name
- ]
- }
- a.Transformer = u,
- a.normalizeFn = function (e) {
- if ('function' == typeof e) return {
- fn: e,
- dependencies: [
- ]
- };
- if (e && 'object' == typeof e && 'function' == typeof e.fn) {
- if ('dependencies' in e) {
- if (!Array.isArray(e.dependencies)) throw new Error('Result should have a dependencies property that is an array')
- } else e.dependencies = [
- ];
- return e
- }
- throw new Error('Invalid result object from transform.')
- },
- a.normalizeFnAsync = function (e, t) {
- return s.resolve(e).then(function (e) {
- return e && o(e.fn) ? e.fn.then(function (t) {
- return e.fn = t,
- e
- }) : e
- }).then(a.normalizeFn).nodeify(t)
- },
- a.normalize = function (e) {
- if ('string' == typeof e) return {
- body: e,
- dependencies: [
- ]
- };
- if (e && 'object' == typeof e && 'string' == typeof e.body) {
- if ('dependencies' in e) {
- if (!Array.isArray(e.dependencies)) throw new Error('Result should have a dependencies property that is an array')
- } else e.dependencies = [
- ];
- return e
- }
- throw new Error('Invalid result object from transform.')
- },
- a.normalizeAsync = function (e, t) {
- return s.resolve(e).then(function (e) {
- return e && o(e.body) ? e.body.then(function (t) {
- return e.body = t,
- e
- }) : e
- }).then(a.normalize).nodeify(t)
- },
- r.readFile ? (a.readFile = s.denodeify(r.readFile), a.readFileSync = r.readFileSync) : (a.readFile = function () {
- throw new Error('fs.readFile unsupported')
- }, a.readFileSync = function () {
- throw new Error('fs.readFileSync unsupported')
- });
- var l = {
- compile: [
- 'compile',
- 'render'
- ],
- compileAsync: [
- 'compileAsync',
- 'compile',
- 'render'
- ],
- compileFile: [
- 'compileFile',
- 'compile',
- 'renderFile',
- 'render'
- ],
- compileFileAsync: [
- 'compileFileAsync',
- 'compileFile',
- 'compileAsync',
- 'compile',
- 'renderFile',
- 'render'
- ],
- compileClient: [
- 'compileClient'
- ],
- compileClientAsync: [
- 'compileClientAsync',
- 'compileClient'
- ],
- compileFileClient: [
- 'compileFileClient',
- 'compileClient'
- ],
- compileFileClientAsync: [
- 'compileFileClientAsync',
- 'compileFileClient',
- 'compileClientAsync',
- 'compileClient'
- ],
- render: [
- 'render',
- 'compile'
- ],
- renderAsync: [
- 'renderAsync',
- 'render',
- 'compileAsync',
- 'compile'
- ],
- renderFile: [
- 'renderFile',
- 'render',
- 'compileFile',
- 'compile'
- ],
- renderFileAsync: [
- 'renderFileAsync',
- 'renderFile',
- 'renderAsync',
- 'render',
- 'compileFileAsync',
- 'compileFile',
- 'compileAsync',
- 'compile'
- ]
- };
- u.prototype._hasMethod = function (e) {
- return 'function' == typeof this._tr[e]
- },
- u.prototype.can = function (e) {
- return l[e].some(function (e) {
- return this._hasMethod(e)
- }.bind(this))
- },
- u.prototype.compile = function (e, t) {
- if (!this._hasMethod('compile')) {
- if (this.can('render')) {
- var n = this;
- return {
- fn: function (r) {
- return a.normalize(n._tr.render(e, t, r)).body
- },
- dependencies: [
- ]
- }
- }
- throw this.can('compileAsync') ? new Error('The Transform "' + this.name + '" does not support synchronous compilation') : this.can('compileFileAsync') ? new Error('The Transform "' + this.name + '" does not support compiling plain strings') : new Error('The Transform "' + this.name + '" does not support compilation')
- }
- return a.normalizeFn(this._tr.compile(e, t))
- },
- u.prototype.compileAsync = function (e, t, n) {
- return this.can('compileAsync') ? this._hasMethod('compileAsync') ? a.normalizeFnAsync(this._tr.compileAsync(e, t), n) : a.normalizeFnAsync(this.compile(e, t), n) : s.reject(new Error('The Transform "' + this.name + '" does not support compiling plain strings')).nodeify(n)
- },
- u.prototype.compileFile = function (e, t) {
- if (!this.can('compileFile')) throw new Error('The Transform "' + this.name + '" does not support synchronous compilation');
- return this._hasMethod('compileFile') ? a.normalizeFn(this._tr.compileFile(e, t)) : this._hasMethod('renderFile') ? a.normalizeFn(function (n) {
- return a.normalize(this._tr.renderFile(e, t, n)).body
- }.bind(this)) : (t || (t = {
- }), void 0 === t.filename && (t.filename = e), this.compile(a.readFileSync(e, 'utf8'), t))
- },
- u.prototype.compileFileAsync = function (e, t, n) {
- return this.can('compileFileAsync') ? this._hasMethod('compileFileAsync') ? a.normalizeFnAsync(this._tr.compileFileAsync(e, t), n) : this._hasMethod('compileFile') || this._hasMethod('renderFile') ? a.normalizeFnAsync(this.compileFile(e, t), n) : (t || (t = {
- }), void 0 === t.filename && (t.filename = e), a.normalizeFnAsync(a.readFile(e, 'utf8').then(function (e) {
- return this._hasMethod('compileAsync') ? this._tr.compileAsync(e, t) : this.compile(e, t)
- }.bind(this)), n)) : s.reject(new Error('The Transform "' + this.name + '" does not support compilation'))
- },
- u.prototype.compileClient = function (e, t) {
- if (!this.can('compileClient')) throw this.can('compileClientAsync') ? new Error('The Transform "' + this.name + '" does not support compiling for the client synchronously.') : this.can('compileFileClientAsync') ? new Error('The Transform "' + this.name + '" does not support compiling for the client from a string.') : new Error('The Transform "' + this.name + '" does not support compiling for the client');
- return a.normalize(this._tr.compileClient(e, t))
- },
- u.prototype.compileClientAsync = function (e, t, n) {
- return this.can('compileClientAsync') ? this._hasMethod('compileClientAsync') ? a.normalizeAsync(this._tr.compileClientAsync(e, t), n) : a.normalizeAsync(this._tr.compileClient(e, t), n) : this.can('compileFileClientAsync') ? s.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client from a string.')).nodeify(n) : s.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client')).nodeify(n)
- },
- u.prototype.compileFileClient = function (e, t) {
- if (!this.can('compileFileClient')) throw this.can('compileFileClientAsync') ? new Error('The Transform "' + this.name + '" does not support compiling for the client synchronously.') : new Error('The Transform "' + this.name + '" does not support compiling for the client');
- return this._hasMethod('compileFileClient') ? a.normalize(this._tr.compileFileClient(e, t)) : (t || (t = {
- }), void 0 === t.filename && (t.filename = e), a.normalize(this._tr.compileClient(a.readFileSync(e, 'utf8'), t)))
- },
- u.prototype.compileFileClientAsync = function (e, t, n) {
- return this.can('compileFileClientAsync') ? this._hasMethod('compileFileClientAsync') ? a.normalizeAsync(this._tr.compileFileClientAsync(e, t), n) : this._hasMethod('compileFileClient') ? a.normalizeAsync(this._tr.compileFileClient(e, t), n) : (t || (t = {
- }), void 0 === t.filename && (t.filename = e), a.normalizeAsync(a.readFile(e, 'utf8').then(function (e) {
- return this._hasMethod('compileClientAsync') ? this._tr.compileClientAsync(e, t) : this._tr.compileClient(e, t)
- }.bind(this)), n)) : s.reject(new Error('The Transform "' + this.name + '" does not support compiling for the client')).nodeify(n)
- },
- u.prototype.render = function (e, t, n) {
- if (!this.can('render')) throw this.can('renderAsync') ? new Error('The Transform "' + this.name + '" does not support rendering synchronously.') : this.can('renderFileAsync') ? new Error('The Transform "' + this.name + '" does not support rendering from a string.') : new Error('The Transform "' + this.name + '" does not support rendering');
- if (this._hasMethod('render')) return a.normalize(this._tr.render(e, t, n));
- var r = a.normalizeFn(this._tr.compile(e, t)),
- i = r.fn(n || t);
- if ('string' != typeof i) throw new Error('The Transform "' + this.name + '" does not support rendering synchronously.');
- return a.normalize({
- body: i,
- dependencies: r.dependencies
- })
- },
- u.prototype.renderAsync = function (e, t, n, r) {
- return 'function' == typeof n && (r = n, n = t),
- this.can('renderAsync') ? this._hasMethod('renderAsync') ? a.normalizeAsync(this._tr.renderAsync(e, t, n), r) : this._hasMethod('render') ? a.normalizeAsync(this._tr.render(e, t, n), r) : a.normalizeAsync(this.compileAsync(e, t).then(function (e) {
- return {
- body: e.fn(n || t),
- dependencies: e.dependencies
- }
- }), r) : this.can('renderFileAsync') ? s.reject(new Error('The Transform "' + this.name + '" does not support rendering from a string.')).nodeify(r) : s.reject(new Error('The Transform "' + this.name + '" does not support rendering')).nodeify(r)
- },
- u.prototype.renderFile = function (e, t, n) {
- if (!this.can('renderFile')) throw new Error('The Transform "' + this.name + '" does not support rendering synchronously.');
- if (this._hasMethod('renderFile')) return a.normalize(this._tr.renderFile(e, t, n));
- if (this._hasMethod('render')) return t || (t = {
- }),
- void 0 === t.filename && (t.filename = e),
- a.normalize(this._tr.render(a.readFileSync(e, 'utf8'), t, n));
- var r = this.compileFile(e, t);
- return a.normalize({
- body: r.fn(n || t),
- dependencies: r.dependencies
- })
- },
- u.prototype.renderFileAsync = function (e, t, n, r) {
- if (!this.can('renderFileAsync')) throw new Error('The Transform "' + this.name + '" does not support rendering.');
- return 'function' == typeof n && (r = n, n = t),
- this._hasMethod('renderFileAsync') ? a.normalizeAsync(this._tr.renderFileAsync(e, t, n), r) : this._hasMethod('renderFile') ? a.normalizeAsync(this._tr.renderFile(e, t, n), r) : this._hasMethod('compile') || this._hasMethod('compileAsync') || this._hasMethod('compileFile') || this._hasMethod('compileFileAsync') ? a.normalizeAsync(this.compileFileAsync(e, t).then(function (e) {
- return {
- body: e.fn(n || t),
- dependencies: e.dependencies
- }
- }), r) : (t || (t = {
- }), void 0 === t.filename && (t.filename = e), a.normalizeAsync(a.readFile(e, 'utf8').then(function (e) {
- return this.renderAsync(e, t, n)
- }.bind(this)), r))
- }
- },
- {
- assert: 8,
- fs: 41,
- 'is-promise': 240,
- promise: 374
- }
- ],
- 244: [
- function (e, t, n) {
- var r = e('./_getNative') (e('./_root'), 'DataView');
- t.exports = r
- },
- {
- './_getNative': 303,
- './_root': 338
- }
- ],
- 245: [
- function (e, t, n) {
- var r = e('./_hashClear'),
- i = e('./_hashDelete'),
- s = e('./_hashGet'),
- o = e('./_hashHas'),
- a = e('./_hashSet');
- function u(e) {
- var t = - 1,
- n = null == e ? 0 : e.length;
- for (this.clear(); ++t < n; ) {
- var r = e[t];
- this.set(r[0], r[1])
- }
- }
- u.prototype.clear = r,
- u.prototype.delete = i,
- u.prototype.get = s,
- u.prototype.has = o,
- u.prototype.set = a,
- t.exports = u
- },
- {
- './_hashClear': 310,
- './_hashDelete': 311,
- './_hashGet': 312,
- './_hashHas': 313,
- './_hashSet': 314
- }
- ],
- 246: [
- function (e, t, n) {
- var r = e('./_listCacheClear'),
- i = e('./_listCacheDelete'),
- s = e('./_listCacheGet'),
- o = e('./_listCacheHas'),
- a = e('./_listCacheSet');
- function u(e) {
- var t = - 1,
- n = null == e ? 0 : e.length;
- for (this.clear(); ++t < n; ) {
- var r = e[t];
- this.set(r[0], r[1])
- }
- }
- u.prototype.clear = r,
- u.prototype.delete = i,
- u.prototype.get = s,
- u.prototype.has = o,
- u.prototype.set = a,
- t.exports = u
- },
- {
- './_listCacheClear': 322,
- './_listCacheDelete': 323,
- './_listCacheGet': 324,
- './_listCacheHas': 325,
- './_listCacheSet': 326
- }
- ],
- 247: [
- function (e, t, n) {
- var r = e('./_getNative') (e('./_root'), 'Map');
- t.exports = r
- },
- {
- './_getNative': 303,
- './_root': 338
- }
- ],
- 248: [
- function (e, t, n) {
- var r = e('./_mapCacheClear'),
- i = e('./_mapCacheDelete'),
- s = e('./_mapCacheGet'),
- o = e('./_mapCacheHas'),
- a = e('./_mapCacheSet');
- function u(e) {
- var t = - 1,
- n = null == e ? 0 : e.length;
- for (this.clear(); ++t < n; ) {
- var r = e[t];
- this.set(r[0], r[1])
- }
- }
- u.prototype.clear = r,
- u.prototype.delete = i,
- u.prototype.get = s,
- u.prototype.has = o,
- u.prototype.set = a,
- t.exports = u
- },
- {
- './_mapCacheClear': 327,
- './_mapCacheDelete': 328,
- './_mapCacheGet': 329,
- './_mapCacheHas': 330,
- './_mapCacheSet': 331
- }
- ],
- 249: [
- function (e, t, n) {
- var r = e('./_getNative') (e('./_root'), 'Promise');
- t.exports = r
- },
- {
- './_getNative': 303,
- './_root': 338
- }
- ],
- 250: [
- function (e, t, n) {
- var r = e('./_getNative') (e('./_root'), 'Set');
- t.exports = r
- },
- {
- './_getNative': 303,
- './_root': 338
- }
- ],
- 251: [
- function (e, t, n) {
- var r = e('./_MapCache'),
- i = e('./_setCacheAdd'),
- s = e('./_setCacheHas');
- function o(e) {
- var t = - 1,
- n = null == e ? 0 : e.length;
- for (this.__data__ = new r; ++t < n; ) this.add(e[t])
- }
- o.prototype.add = o.prototype.push = i,
- o.prototype.has = s,
- t.exports = o
- },
- {
- './_MapCache': 248,
- './_setCacheAdd': 339,
- './_setCacheHas': 340
- }
- ],
- 252: [
- function (e, t, n) {
- var r = e('./_ListCache'),
- i = e('./_stackClear'),
- s = e('./_stackDelete'),
- o = e('./_stackGet'),
- a = e('./_stackHas'),
- u = e('./_stackSet');
- function l(e) {
- var t = this.__data__ = new r(e);
- this.size = t.size
- }
- l.prototype.clear = i,
- l.prototype.delete = s,
- l.prototype.get = o,
- l.prototype.has = a,
- l.prototype.set = u,
- t.exports = l
- },
- {
- './_ListCache': 246,
- './_stackClear': 342,
- './_stackDelete': 343,
- './_stackGet': 344,
- './_stackHas': 345,
- './_stackSet': 346
- }
- ],
- 253: [
- function (e, t, n) {
- var r = e('./_root').Symbol;
- t.exports = r
- },
- {
- './_root': 338
- }
- ],
- 254: [
- function (e, t, n) {
- var r = e('./_root').Uint8Array;
- t.exports = r
- },
- {
- './_root': 338
- }
- ],
- 255: [
- function (e, t, n) {
- var r = e('./_getNative') (e('./_root'), 'WeakMap');
- t.exports = r
- },
- {
- './_getNative': 303,
- './_root': 338
- }
- ],
- 256: [
- function (e, t, n) {
- t.exports = function (e, t) {
- for (var n = - 1, r = null == e ? 0 : e.length; ++n < r && !1 !== t(e[n], n, e); );
- return e
- }
- },
- {
- }
- ],
- 257: [
- function (e, t, n) {
- t.exports = function (e, t) {
- for (var n = - 1, r = null == e ? 0 : e.length, i = 0, s = [
- ]; ++n < r; ) {
- var o = e[n];
- t(o, n, e) && (s[i++] = o)
- }
- return s
- }
- },
- {
- }
- ],
- 258: [
- function (e, t, n) {
- var r = e('./_baseIndexOf');
- t.exports = function (e, t) {
- return !(null == e || !e.length) && r(e, t, 0) > - 1
- }
- },
- {
- './_baseIndexOf': 272
- }
- ],
- 259: [
- function (e, t, n) {
- t.exports = function (e, t, n) {
- for (var r = - 1, i = null == e ? 0 : e.length; ++r < i; ) if (n(t, e[r])) return !0;
- return !1
- }
- },
- {
- }
- ],
- 260: [
- function (e, t, n) {
- var r = e('./_baseTimes'),
- i = e('./isArguments'),
- s = e('./isArray'),
- o = e('./isBuffer'),
- a = e('./_isIndex'),
- u = e('./isTypedArray'),
- l = Object.prototype.hasOwnProperty;
- t.exports = function (e, t) {
- var n = s(e),
- c = !n && i(e),
- p = !n && !c && o(e),
- h = !n && !c && !p && u(e),
- f = n || c || p || h,
- d = f ? r(e.length, String) : [
- ],
- m = d.length;
- for (var g in e) !t && !l.call(e, g) || f && ('length' == g || p && ('offset' == g || 'parent' == g) || h && ('buffer' == g || 'byteLength' == g || 'byteOffset' == g) || a(g, m)) || d.push(g);
- return d
- }
- },
- {
- './_baseTimes': 282,
- './_isIndex': 318,
- './isArguments': 351,
- './isArray': 352,
- './isBuffer': 354,
- './isTypedArray': 363
- }
- ],
- 261: [
- function (e, t, n) {
- t.exports = function (e, t) {
- for (var n = - 1, r = t.length, i = e.length; ++n < r; ) e[i + n] = t[n];
- return e
- }
- },
- {
- }
- ],
- 262: [
- function (e, t, n) {
- var r = e('./_baseAssignValue'),
- i = e('./eq'),
- s = Object.prototype.hasOwnProperty;
- t.exports = function (e, t, n) {
- var o = e[t];
- s.call(e, t) && i(o, n) && (void 0 !== n || t in e) || r(e, t, n)
- }
- },
- {
- './_baseAssignValue': 266,
- './eq': 350
- }
- ],
- 263: [
- function (e, t, n) {
- var r = e('./eq');
- t.exports = function (e, t) {
- for (var n = e.length; n--; ) if (r(e[n][0], t)) return n;
- return - 1
- }
- },
- {
- './eq': 350
- }
- ],
- 264: [
- function (e, t, n) {
- var r = e('./_copyObject'),
- i = e('./keys');
- t.exports = function (e, t) {
- return e && r(t, i(t), e)
- }
- },
- {
- './_copyObject': 293,
- './keys': 364
- }
- ],
- 265: [
- function (e, t, n) {
- var r = e('./_copyObject'),
- i = e('./keysIn');
- t.exports = function (e, t) {
- return e && r(t, i(t), e)
- }
- },
- {
- './_copyObject': 293,
- './keysIn': 365
- }
- ],
- 266: [
- function (e, t, n) {
- var r = e('./_defineProperty');
- t.exports = function (e, t, n) {
- '__proto__' == t && r ? r(e, t, {
- configurable: !0,
- enumerable: !0,
- value: n,
- writable: !0
- }) : e[t] = n
- }
- },
- {
- './_defineProperty': 298
- }
- ],
- 267: [
- function (e, t, n) {
- var r = e('./_Stack'),
- i = e('./_arrayEach'),
- s = e('./_assignValue'),
- o = e('./_baseAssign'),
- a = e('./_baseAssignIn'),
- u = e('./_cloneBuffer'),
- l = e('./_copyArray'),
- c = e('./_copySymbols'),
- p = e('./_copySymbolsIn'),
- h = e('./_getAllKeys'),
- f = e('./_getAllKeysIn'),
- d = e('./_getTag'),
- m = e('./_initCloneArray'),
- g = e('./_initCloneByTag'),
- y = e('./_initCloneObject'),
- v = e('./isArray'),
- b = e('./isBuffer'),
- x = e('./isMap'),
- A = e('./isObject'),
- E = e('./isSet'),
- _ = e('./keys'),
- C = 1,
- w = 2,
- D = 4,
- k = '[object Arguments]',
- S = '[object Function]',
- T = '[object GeneratorFunction]',
- F = '[object Object]',
- O = {
- };
- O[k] = O['[object Array]'] = O['[object ArrayBuffer]'] = O['[object DataView]'] = O['[object Boolean]'] = O['[object Date]'] = O['[object Float32Array]'] = O['[object Float64Array]'] = O['[object Int8Array]'] = O['[object Int16Array]'] = O['[object Int32Array]'] = O['[object Map]'] = O['[object Number]'] = O[F] = O['[object RegExp]'] = O['[object Set]'] = O['[object String]'] = O['[object Symbol]'] = O['[object Uint8Array]'] = O['[object Uint8ClampedArray]'] = O['[object Uint16Array]'] = O['[object Uint32Array]'] = !0,
- O['[object Error]'] = O[S] = O['[object WeakMap]'] = !1,
- t.exports = function e(t, n, B, P, N, R) {
- var L,
- I = n & C,
- j = n & w,
- M = n & D;
- if (B && (L = N ? B(t, P, N, R) : B(t)), void 0 !== L) return L;
- if (!A(t)) return t;
- var U = v(t);
- if (U) {
- if (L = m(t), !I) return l(t, L)
- } else {
- var V = d(t),
- z = V == S || V == T;
- if (b(t)) return u(t, I);
- if (V == F || V == k || z && !N) {
- if (L = j || z ? {
- }
- : y(t), !I) return j ? p(t, a(L, t)) : c(t, o(L, t))
- } else {
- if (!O[V]) return N ? t : {
- };
- L = g(t, V, I)
- }
- }
- R || (R = new r);
- var q = R.get(t);
- if (q) return q;
- R.set(t, L),
- E(t) ? t.forEach(function (r) {
- L.add(e(r, n, B, r, t, R))
- }) : x(t) && t.forEach(function (r, i) {
- L.set(i, e(r, n, B, i, t, R))
- });
- var K = M ? j ? f : h : j ? keysIn : _,
- $ = U ? void 0 : K(t);
- return i($ || t, function (r, i) {
- $ && (r = t[i = r]),
- s(L, i, e(r, n, B, i, t, R))
- }),
- L
- }
- },
- {
- './_Stack': 252,
- './_arrayEach': 256,
- './_assignValue': 262,
- './_baseAssign': 264,
- './_baseAssignIn': 265,
- './_cloneBuffer': 287,
- './_copyArray': 292,
- './_copySymbols': 294,
- './_copySymbolsIn': 295,
- './_getAllKeys': 300,
- './_getAllKeysIn': 301,
- './_getTag': 308,
- './_initCloneArray': 315,
- './_initCloneByTag': 316,
- './_initCloneObject': 317,
- './isArray': 352,
- './isBuffer': 354,
- './isMap': 357,
- './isObject': 358,
- './isSet': 362,
- './keys': 364
- }
- ],
- 268: [
- function (e, t, n) {
- var r = e('./isObject'),
- i = Object.create,
- s = function () {
- function e() {
- }
- return function (t) {
- if (!r(t)) return {
- };
- if (i) return i(t);
- e.prototype = t;
- var n = new e;
- return e.prototype = void 0,
- n
- }
- }();
- t.exports = s
- },
- {
- './isObject': 358
- }
- ],
- 269: [
- function (e, t, n) {
- t.exports = function (e, t, n, r) {
- for (var i = e.length, s = n + (r ? 1 : - 1); r ? s-- : ++s < i; ) if (t(e[s], s, e)) return s;
- return - 1
- }
- },
- {
- }
- ],
- 270: [
- function (e, t, n) {
- var r = e('./_arrayPush'),
- i = e('./isArray');
- t.exports = function (e, t, n) {
- var s = t(e);
- return i(e) ? s : r(s, n(e))
- }
- },
- {
- './_arrayPush': 261,
- './isArray': 352
- }
- ],
- 271: [
- function (e, t, n) {
- var r = e('./_Symbol'),
- i = e('./_getRawTag'),
- s = e('./_objectToString'),
- o = '[object Null]',
- a = '[object Undefined]',
- u = r ? r.toStringTag : void 0;
- t.exports = function (e) {
- return null == e ? void 0 === e ? a : o : u && u in Object(e) ? i(e) : s(e)
- }
- },
- {
- './_Symbol': 253,
- './_getRawTag': 305,
- './_objectToString': 336
- }
- ],
- 272: [
- function (e, t, n) {
- var r = e('./_baseFindIndex'),
- i = e('./_baseIsNaN'),
- s = e('./_strictIndexOf');
- t.exports = function (e, t, n) {
- return t == t ? s(e, t, n) : r(e, i, n)
- }
- },
- {
- './_baseFindIndex': 269,
- './_baseIsNaN': 275,
- './_strictIndexOf': 347
- }
- ],
- 273: [
- function (e, t, n) {
- var r = e('./_baseGetTag'),
- i = e('./isObjectLike'),
- s = '[object Arguments]';
- t.exports = function (e) {
- return i(e) && r(e) == s
- }
- },
- {
- './_baseGetTag': 271,
- './isObjectLike': 359
- }
- ],
- 274: [
- function (e, t, n) {
- var r = e('./_getTag'),
- i = e('./isObjectLike'),
- s = '[object Map]';
- t.exports = function (e) {
- return i(e) && r(e) == s
- }
- },
- {
- './_getTag': 308,
- './isObjectLike': 359
- }
- ],
- 275: [
- function (e, t, n) {
- t.exports = function (e) {
- return e != e
- }
- },
- {
- }
- ],
- 276: [
- function (e, t, n) {
- var r = e('./isFunction'),
- i = e('./_isMasked'),
- s = e('./isObject'),
- o = e('./_toSource'),
- a = /^\[object .+?Constructor\]$/,
- u = Function.prototype,
- l = Object.prototype,
- c = u.toString,
- p = l.hasOwnProperty,
- h = RegExp('^' + c.call(p).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');
- t.exports = function (e) {
- return !(!s(e) || i(e)) && (r(e) ? h : a).test(o(e))
- }
- },
- {
- './_isMasked': 320,
- './_toSource': 348,
- './isFunction': 355,
- './isObject': 358
- }
- ],
- 277: [
- function (e, t, n) {
- var r = e('./_baseGetTag'),
- i = e('./isObjectLike'),
- s = '[object RegExp]';
- t.exports = function (e) {
- return i(e) && r(e) == s
- }
- },
- {
- './_baseGetTag': 271,
- './isObjectLike': 359
- }
- ],
- 278: [
- function (e, t, n) {
- var r = e('./_getTag'),
- i = e('./isObjectLike'),
- s = '[object Set]';
- t.exports = function (e) {
- return i(e) && r(e) == s
- }
- },
- {
- './_getTag': 308,
- './isObjectLike': 359
- }
- ],
- 279: [
- function (e, t, n) {
- var r = e('./_baseGetTag'),
- i = e('./isLength'),
- s = e('./isObjectLike'),
- o = {
- };
- o['[object Float32Array]'] = o['[object Float64Array]'] = o['[object Int8Array]'] = o['[object Int16Array]'] = o['[object Int32Array]'] = o['[object Uint8Array]'] = o['[object Uint8ClampedArray]'] = o['[object Uint16Array]'] = o['[object Uint32Array]'] = !0,
- o['[object Arguments]'] = o['[object Array]'] = o['[object ArrayBuffer]'] = o['[object Boolean]'] = o['[object DataView]'] = o['[object Date]'] = o['[object Error]'] = o['[object Function]'] = o['[object Map]'] = o['[object Number]'] = o['[object Object]'] = o['[object RegExp]'] = o['[object Set]'] = o['[object String]'] = o['[object WeakMap]'] = !1,
- t.exports = function (e) {
- return s(e) && i(e.length) && !!o[r(e)]
- }
- },
- {
- './_baseGetTag': 271,
- './isLength': 356,
- './isObjectLike': 359
- }
- ],
- 280: [
- function (e, t, n) {
- var r = e('./_isPrototype'),
- i = e('./_nativeKeys'),
- s = Object.prototype.hasOwnProperty;
- t.exports = function (e) {
- if (!r(e)) return i(e);
- var t = [
- ];
- for (var n in Object(e)) s.call(e, n) && 'constructor' != n && t.push(n);
- return t
- }
- },
- {
- './_isPrototype': 321,
- './_nativeKeys': 333
- }
- ],
- 281: [
- function (e, t, n) {
- var r = e('./isObject'),
- i = e('./_isPrototype'),
- s = e('./_nativeKeysIn'),
- o = Object.prototype.hasOwnProperty;
- t.exports = function (e) {
- if (!r(e)) return s(e);
- var t = i(e),
- n = [
- ];
- for (var a in e) ('constructor' != a || !t && o.call(e, a)) && n.push(a);
- return n
- }
- },
- {
- './_isPrototype': 321,
- './_nativeKeysIn': 334,
- './isObject': 358
- }
- ],
- 282: [
- function (e, t, n) {
- t.exports = function (e, t) {
- for (var n = - 1, r = Array(e); ++n < e; ) r[n] = t(n);
- return r
- }
- },
- {
- }
- ],
- 283: [
- function (e, t, n) {
- t.exports = function (e) {
- return function (t) {
- return e(t)
- }
- }
- },
- {
- }
- ],
- 284: [
- function (e, t, n) {
- var r = e('./_SetCache'),
- i = e('./_arrayIncludes'),
- s = e('./_arrayIncludesWith'),
- o = e('./_cacheHas'),
- a = e('./_createSet'),
- u = e('./_setToArray'),
- l = 200;
- t.exports = function (e, t, n) {
- var c = - 1,
- p = i,
- h = e.length,
- f = !0,
- d = [
- ],
- m = d;
- if (n) f = !1,
- p = s;
- else if (h >= l) {
- var g = t ? null : a(e);
- if (g) return u(g);
- f = !1,
- p = o,
- m = new r
- } else m = t ? [
- ] : d;
- e: for (; ++c < h; ) {
- var y = e[c],
- v = t ? t(y) : y;
- if (y = n || 0 !== y ? y : 0, f && v == v) {
- for (var b = m.length; b--; ) if (m[b] === v) continue e;
- t && m.push(v),
- d.push(y)
- } else p(m, v, n) || (m !== d && m.push(v), d.push(y))
- }
- return d
- }
- },
- {
- './_SetCache': 251,
- './_arrayIncludes': 258,
- './_arrayIncludesWith': 259,
- './_cacheHas': 285,
- './_createSet': 297,
- './_setToArray': 341
- }
- ],
- 285: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return e.has(t)
- }
- },
- {
- }
- ],
- 286: [
- function (e, t, n) {
- var r = e('./_Uint8Array');
- t.exports = function (e) {
- var t = new e.constructor(e.byteLength);
- return new r(t).set(new r(e)),
- t
- }
- },
- {
- './_Uint8Array': 254
- }
- ],
- 287: [
- function (e, t, n) {
- var r = e('./_root'),
- i = 'object' == typeof n && n && !n.nodeType && n,
- s = i && 'object' == typeof t && t && !t.nodeType && t,
- o = s && s.exports === i ? r.Buffer : void 0,
- a = o ? o.allocUnsafe : void 0;
- t.exports = function (e, t) {
- if (t) return e.slice();
- var n = e.length,
- r = a ? a(n) : new e.constructor(n);
- return e.copy(r),
- r
- }
- },
- {
- './_root': 338
- }
- ],
- 288: [
- function (e, t, n) {
- var r = e('./_cloneArrayBuffer');
- t.exports = function (e, t) {
- var n = t ? r(e.buffer) : e.buffer;
- return new e.constructor(n, e.byteOffset, e.byteLength)
- }
- },
- {
- './_cloneArrayBuffer': 286
- }
- ],
- 289: [
- function (e, t, n) {
- var r = /\w*$/;
- t.exports = function (e) {
- var t = new e.constructor(e.source, r.exec(e));
- return t.lastIndex = e.lastIndex,
- t
- }
- },
- {
- }
- ],
- 290: [
- function (e, t, n) {
- var r = e('./_Symbol'),
- i = r ? r.prototype : void 0,
- s = i ? i.valueOf : void 0;
- t.exports = function (e) {
- return s ? Object(s.call(e)) : {
- }
- }
- },
- {
- './_Symbol': 253
- }
- ],
- 291: [
- function (e, t, n) {
- var r = e('./_cloneArrayBuffer');
- t.exports = function (e, t) {
- var n = t ? r(e.buffer) : e.buffer;
- return new e.constructor(n, e.byteOffset, e.length)
- }
- },
- {
- './_cloneArrayBuffer': 286
- }
- ],
- 292: [
- function (e, t, n) {
- t.exports = function (e, t) {
- var n = - 1,
- r = e.length;
- for (t || (t = Array(r)); ++n < r; ) t[n] = e[n];
- return t
- }
- },
- {
- }
- ],
- 293: [
- function (e, t, n) {
- var r = e('./_assignValue'),
- i = e('./_baseAssignValue');
- t.exports = function (e, t, n, s) {
- var o = !n;
- n || (n = {
- });
- for (var a = - 1, u = t.length; ++a < u; ) {
- var l = t[a],
- c = s ? s(n[l], e[l], l, n, e) : void 0;
- void 0 === c && (c = e[l]),
- o ? i(n, l, c) : r(n, l, c)
- }
- return n
- }
- },
- {
- './_assignValue': 262,
- './_baseAssignValue': 266
- }
- ],
- 294: [
- function (e, t, n) {
- var r = e('./_copyObject'),
- i = e('./_getSymbols');
- t.exports = function (e, t) {
- return r(e, i(e), t)
- }
- },
- {
- './_copyObject': 293,
- './_getSymbols': 306
- }
- ],
- 295: [
- function (e, t, n) {
- var r = e('./_copyObject'),
- i = e('./_getSymbolsIn');
- t.exports = function (e, t) {
- return r(e, i(e), t)
- }
- },
- {
- './_copyObject': 293,
- './_getSymbolsIn': 307
- }
- ],
- 296: [
- function (e, t, n) {
- var r = e('./_root') ['__core-js_shared__'];
- t.exports = r
- },
- {
- './_root': 338
- }
- ],
- 297: [
- function (e, t, n) {
- var r = e('./_Set'),
- i = e('./noop'),
- s = e('./_setToArray'),
- o = r && 1 / s(new r([,
- - 0])) [1] == 1 / 0 ? function (e) {
- return new r(e)
- }
- : i;
- t.exports = o
- },
- {
- './_Set': 250,
- './_setToArray': 341,
- './noop': 366
- }
- ],
- 298: [
- function (e, t, n) {
- var r = e('./_getNative'),
- i = function () {
- try {
- var e = r(Object, 'defineProperty');
- return e({
- }, '', {
- }),
- e
- } catch (e) {
- }
- }();
- t.exports = i
- },
- {
- './_getNative': 303
- }
- ],
- 299: [
- function (e, t, n) {
- (function (e) {
- var n = 'object' == typeof e && e && e.Object === Object && e;
- t.exports = n
- }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- })
- },
- {
- }
- ],
- 300: [
- function (e, t, n) {
- var r = e('./_baseGetAllKeys'),
- i = e('./_getSymbols'),
- s = e('./keys');
- t.exports = function (e) {
- return r(e, s, i)
- }
- },
- {
- './_baseGetAllKeys': 270,
- './_getSymbols': 306,
- './keys': 364
- }
- ],
- 301: [
- function (e, t, n) {
- var r = e('./_baseGetAllKeys'),
- i = e('./_getSymbolsIn'),
- s = e('./keysIn');
- t.exports = function (e) {
- return r(e, s, i)
- }
- },
- {
- './_baseGetAllKeys': 270,
- './_getSymbolsIn': 307,
- './keysIn': 365
- }
- ],
- 302: [
- function (e, t, n) {
- var r = e('./_isKeyable');
- t.exports = function (e, t) {
- var n = e.__data__;
- return r(t) ? n['string' == typeof t ? 'string' : 'hash'] : n.map
- }
- },
- {
- './_isKeyable': 319
- }
- ],
- 303: [
- function (e, t, n) {
- var r = e('./_baseIsNative'),
- i = e('./_getValue');
- t.exports = function (e, t) {
- var n = i(e, t);
- return r(n) ? n : void 0
- }
- },
- {
- './_baseIsNative': 276,
- './_getValue': 309
- }
- ],
- 304: [
- function (e, t, n) {
- var r = e('./_overArg') (Object.getPrototypeOf, Object);
- t.exports = r
- },
- {
- './_overArg': 337
- }
- ],
- 305: [
- function (e, t, n) {
- var r = e('./_Symbol'),
- i = Object.prototype,
- s = i.hasOwnProperty,
- o = i.toString,
- a = r ? r.toStringTag : void 0;
- t.exports = function (e) {
- var t = s.call(e, a),
- n = e[a];
- try {
- e[a] = void 0;
- var r = !0
- } catch (e) {
- }
- var i = o.call(e);
- return r && (t ? e[a] = n : delete e[a]),
- i
- }
- },
- {
- './_Symbol': 253
- }
- ],
- 306: [
- function (e, t, n) {
- var r = e('./_arrayFilter'),
- i = e('./stubArray'),
- s = Object.prototype.propertyIsEnumerable,
- o = Object.getOwnPropertySymbols,
- a = o ? function (e) {
- return null == e ? [
- ] : (e = Object(e), r(o(e), function (t) {
- return s.call(e, t)
- }))
- }
- : i;
- t.exports = a
- },
- {
- './_arrayFilter': 257,
- './stubArray': 367
- }
- ],
- 307: [
- function (e, t, n) {
- var r = e('./_arrayPush'),
- i = e('./_getPrototype'),
- s = e('./_getSymbols'),
- o = e('./stubArray'),
- a = Object.getOwnPropertySymbols ? function (e) {
- for (var t = [
- ]; e; ) r(t, s(e)),
- e = i(e);
- return t
- }
- : o;
- t.exports = a
- },
- {
- './_arrayPush': 261,
- './_getPrototype': 304,
- './_getSymbols': 306,
- './stubArray': 367
- }
- ],
- 308: [
- function (e, t, n) {
- var r = e('./_DataView'),
- i = e('./_Map'),
- s = e('./_Promise'),
- o = e('./_Set'),
- a = e('./_WeakMap'),
- u = e('./_baseGetTag'),
- l = e('./_toSource'),
- c = l(r),
- p = l(i),
- h = l(s),
- f = l(o),
- d = l(a),
- m = u;
- (r && '[object DataView]' != m(new r(new ArrayBuffer(1))) || i && '[object Map]' != m(new i) || s && '[object Promise]' != m(s.resolve()) || o && '[object Set]' != m(new o) || a && '[object WeakMap]' != m(new a)) && (m = function (e) {
- var t = u(e),
- n = '[object Object]' == t ? e.constructor : void 0,
- r = n ? l(n) : '';
- if (r) switch (r) {
- case c:
- return '[object DataView]';
- case p:
- return '[object Map]';
- case h:
- return '[object Promise]';
- case f:
- return '[object Set]';
- case d:
- return '[object WeakMap]'
- }
- return t
- }),
- t.exports = m
- },
- {
- './_DataView': 244,
- './_Map': 247,
- './_Promise': 249,
- './_Set': 250,
- './_WeakMap': 255,
- './_baseGetTag': 271,
- './_toSource': 348
- }
- ],
- 309: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return null == e ? void 0 : e[t]
- }
- },
- {
- }
- ],
- 310: [
- function (e, t, n) {
- var r = e('./_nativeCreate');
- t.exports = function () {
- this.__data__ = r ? r(null) : {
- },
- this.size = 0
- }
- },
- {
- './_nativeCreate': 332
- }
- ],
- 311: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = this.has(e) && delete this.__data__[e];
- return this.size -= t ? 1 : 0,
- t
- }
- },
- {
- }
- ],
- 312: [
- function (e, t, n) {
- var r = e('./_nativeCreate'),
- i = '__lodash_hash_undefined__',
- s = Object.prototype.hasOwnProperty;
- t.exports = function (e) {
- var t = this.__data__;
- if (r) {
- var n = t[e];
- return n === i ? void 0 : n
- }
- return s.call(t, e) ? t[e] : void 0
- }
- },
- {
- './_nativeCreate': 332
- }
- ],
- 313: [
- function (e, t, n) {
- var r = e('./_nativeCreate'),
- i = Object.prototype.hasOwnProperty;
- t.exports = function (e) {
- var t = this.__data__;
- return r ? void 0 !== t[e] : i.call(t, e)
- }
- },
- {
- './_nativeCreate': 332
- }
- ],
- 314: [
- function (e, t, n) {
- var r = e('./_nativeCreate'),
- i = '__lodash_hash_undefined__';
- t.exports = function (e, t) {
- var n = this.__data__;
- return this.size += this.has(e) ? 0 : 1,
- n[e] = r && void 0 === t ? i : t,
- this
- }
- },
- {
- './_nativeCreate': 332
- }
- ],
- 315: [
- function (e, t, n) {
- var r = Object.prototype.hasOwnProperty;
- t.exports = function (e) {
- var t = e.length,
- n = new e.constructor(t);
- return t && 'string' == typeof e[0] && r.call(e, 'index') && (n.index = e.index, n.input = e.input),
- n
- }
- },
- {
- }
- ],
- 316: [
- function (e, t, n) {
- var r = e('./_cloneArrayBuffer'),
- i = e('./_cloneDataView'),
- s = e('./_cloneRegExp'),
- o = e('./_cloneSymbol'),
- a = e('./_cloneTypedArray'),
- u = '[object Boolean]',
- l = '[object Date]',
- c = '[object Map]',
- p = '[object Number]',
- h = '[object RegExp]',
- f = '[object Set]',
- d = '[object String]',
- m = '[object Symbol]',
- g = '[object ArrayBuffer]',
- y = '[object DataView]',
- v = '[object Float32Array]',
- b = '[object Float64Array]',
- x = '[object Int8Array]',
- A = '[object Int16Array]',
- E = '[object Int32Array]',
- _ = '[object Uint8Array]',
- C = '[object Uint8ClampedArray]',
- w = '[object Uint16Array]',
- D = '[object Uint32Array]';
- t.exports = function (e, t, n) {
- var k = e.constructor;
- switch (t) {
- case g:
- return r(e);
- case u:
- case l:
- return new k( + e);
- case y:
- return i(e, n);
- case v:
- case b:
- case x:
- case A:
- case E:
- case _:
- case C:
- case w:
- case D:
- return a(e, n);
- case c:
- return new k;
- case p:
- case d:
- return new k(e);
- case h:
- return s(e);
- case f:
- return new k;
- case m:
- return o(e)
- }
- }
- },
- {
- './_cloneArrayBuffer': 286,
- './_cloneDataView': 288,
- './_cloneRegExp': 289,
- './_cloneSymbol': 290,
- './_cloneTypedArray': 291
- }
- ],
- 317: [
- function (e, t, n) {
- var r = e('./_baseCreate'),
- i = e('./_getPrototype'),
- s = e('./_isPrototype');
- t.exports = function (e) {
- return 'function' != typeof e.constructor || s(e) ? {
- }
- : r(i(e))
- }
- },
- {
- './_baseCreate': 268,
- './_getPrototype': 304,
- './_isPrototype': 321
- }
- ],
- 318: [
- function (e, t, n) {
- var r = 9007199254740991,
- i = /^(?:0|[1-9]\d*)$/;
- t.exports = function (e, t) {
- var n = typeof e;
- return !!(t = null == t ? r : t) && ('number' == n || 'symbol' != n && i.test(e)) && e > - 1 && e % 1 == 0 && e < t
- }
- },
- {
- }
- ],
- 319: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = typeof e;
- return 'string' == t || 'number' == t || 'symbol' == t || 'boolean' == t ? '__proto__' !== e : null === e
- }
- },
- {
- }
- ],
- 320: [
- function (e, t, n) {
- var r,
- i = e('./_coreJsData'),
- s = (r = /[^.]+$/.exec(i && i.keys && i.keys.IE_PROTO || '')) ? 'Symbol(src)_1.' + r : '';
- t.exports = function (e) {
- return !!s && s in e
- }
- },
- {
- './_coreJsData': 296
- }
- ],
- 321: [
- function (e, t, n) {
- var r = Object.prototype;
- t.exports = function (e) {
- var t = e && e.constructor;
- return e === ('function' == typeof t && t.prototype || r)
- }
- },
- {
- }
- ],
- 322: [
- function (e, t, n) {
- t.exports = function () {
- this.__data__ = [
- ],
- this.size = 0
- }
- },
- {
- }
- ],
- 323: [
- function (e, t, n) {
- var r = e('./_assocIndexOf'),
- i = Array.prototype.splice;
- t.exports = function (e) {
- var t = this.__data__,
- n = r(t, e);
- return !(n < 0 || (n == t.length - 1 ? t.pop() : i.call(t, n, 1), --this.size, 0))
- }
- },
- {
- './_assocIndexOf': 263
- }
- ],
- 324: [
- function (e, t, n) {
- var r = e('./_assocIndexOf');
- t.exports = function (e) {
- var t = this.__data__,
- n = r(t, e);
- return n < 0 ? void 0 : t[n][1]
- }
- },
- {
- './_assocIndexOf': 263
- }
- ],
- 325: [
- function (e, t, n) {
- var r = e('./_assocIndexOf');
- t.exports = function (e) {
- return r(this.__data__, e) > - 1
- }
- },
- {
- './_assocIndexOf': 263
- }
- ],
- 326: [
- function (e, t, n) {
- var r = e('./_assocIndexOf');
- t.exports = function (e, t) {
- var n = this.__data__,
- i = r(n, e);
- return i < 0 ? (++this.size, n.push([e,
- t])) : n[i][1] = t,
- this
- }
- },
- {
- './_assocIndexOf': 263
- }
- ],
- 327: [
- function (e, t, n) {
- var r = e('./_Hash'),
- i = e('./_ListCache'),
- s = e('./_Map');
- t.exports = function () {
- this.size = 0,
- this.__data__ = {
- hash: new r,
- map: new (s || i),
- string: new r
- }
- }
- },
- {
- './_Hash': 245,
- './_ListCache': 246,
- './_Map': 247
- }
- ],
- 328: [
- function (e, t, n) {
- var r = e('./_getMapData');
- t.exports = function (e) {
- var t = r(this, e).delete(e);
- return this.size -= t ? 1 : 0,
- t
- }
- },
- {
- './_getMapData': 302
- }
- ],
- 329: [
- function (e, t, n) {
- var r = e('./_getMapData');
- t.exports = function (e) {
- return r(this, e).get(e)
- }
- },
- {
- './_getMapData': 302
- }
- ],
- 330: [
- function (e, t, n) {
- var r = e('./_getMapData');
- t.exports = function (e) {
- return r(this, e).has(e)
- }
- },
- {
- './_getMapData': 302
- }
- ],
- 331: [
- function (e, t, n) {
- var r = e('./_getMapData');
- t.exports = function (e, t) {
- var n = r(this, e),
- i = n.size;
- return n.set(e, t),
- this.size += n.size == i ? 0 : 1,
- this
- }
- },
- {
- './_getMapData': 302
- }
- ],
- 332: [
- function (e, t, n) {
- var r = e('./_getNative') (Object, 'create');
- t.exports = r
- },
- {
- './_getNative': 303
- }
- ],
- 333: [
- function (e, t, n) {
- var r = e('./_overArg') (Object.keys, Object);
- t.exports = r
- },
- {
- './_overArg': 337
- }
- ],
- 334: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = [
- ];
- if (null != e) for (var n in Object(e)) t.push(n);
- return t
- }
- },
- {
- }
- ],
- 335: [
- function (e, t, n) {
- var r = e('./_freeGlobal'),
- i = 'object' == typeof n && n && !n.nodeType && n,
- s = i && 'object' == typeof t && t && !t.nodeType && t,
- o = s && s.exports === i && r.process,
- a = function () {
- try {
- var e = s && s.require && s.require('util').types;
- return e || o && o.binding && o.binding('util')
- } catch (e) {
- }
- }();
- t.exports = a
- },
- {
- './_freeGlobal': 299
- }
- ],
- 336: [
- function (e, t, n) {
- var r = Object.prototype.toString;
- t.exports = function (e) {
- return r.call(e)
- }
- },
- {
- }
- ],
- 337: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return function (n) {
- return e(t(n))
- }
- }
- },
- {
- }
- ],
- 338: [
- function (e, t, n) {
- var r = e('./_freeGlobal'),
- i = 'object' == typeof self && self && self.Object === Object && self,
- s = r || i || Function('return this') ();
- t.exports = s
- },
- {
- './_freeGlobal': 299
- }
- ],
- 339: [
- function (e, t, n) {
- var r = '__lodash_hash_undefined__';
- t.exports = function (e) {
- return this.__data__.set(e, r),
- this
- }
- },
- {
- }
- ],
- 340: [
- function (e, t, n) {
- t.exports = function (e) {
- return this.__data__.has(e)
- }
- },
- {
- }
- ],
- 341: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = - 1,
- n = Array(e.size);
- return e.forEach(function (e) {
- n[++t] = e
- }),
- n
- }
- },
- {
- }
- ],
- 342: [
- function (e, t, n) {
- var r = e('./_ListCache');
- t.exports = function () {
- this.__data__ = new r,
- this.size = 0
- }
- },
- {
- './_ListCache': 246
- }
- ],
- 343: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = this.__data__,
- n = t.delete(e);
- return this.size = t.size,
- n
- }
- },
- {
- }
- ],
- 344: [
- function (e, t, n) {
- t.exports = function (e) {
- return this.__data__.get(e)
- }
- },
- {
- }
- ],
- 345: [
- function (e, t, n) {
- t.exports = function (e) {
- return this.__data__.has(e)
- }
- },
- {
- }
- ],
- 346: [
- function (e, t, n) {
- var r = e('./_ListCache'),
- i = e('./_Map'),
- s = e('./_MapCache'),
- o = 200;
- t.exports = function (e, t) {
- var n = this.__data__;
- if (n instanceof r) {
- var a = n.__data__;
- if (!i || a.length < o - 1) return a.push([e,
- t]),
- this.size = ++n.size,
- this;
- n = this.__data__ = new s(a)
- }
- return n.set(e, t),
- this.size = n.size,
- this
- }
- },
- {
- './_ListCache': 246,
- './_Map': 247,
- './_MapCache': 248
- }
- ],
- 347: [
- function (e, t, n) {
- t.exports = function (e, t, n) {
- for (var r = n - 1, i = e.length; ++r < i; ) if (e[r] === t) return r;
- return - 1
- }
- },
- {
- }
- ],
- 348: [
- function (e, t, n) {
- var r = Function.prototype.toString;
- t.exports = function (e) {
- if (null != e) {
- try {
- return r.call(e)
- } catch (e) {
- }
- try {
- return e + ''
- } catch (e) {
- }
- }
- return ''
- }
- },
- {
- }
- ],
- 349: [
- function (e, t, n) {
- var r = e('./_baseClone'),
- i = 4;
- t.exports = function (e) {
- return r(e, i)
- }
- },
- {
- './_baseClone': 267
- }
- ],
- 350: [
- function (e, t, n) {
- t.exports = function (e, t) {
- return e === t || e != e && t != t
- }
- },
- {
- }
- ],
- 351: [
- function (e, t, n) {
- var r = e('./_baseIsArguments'),
- i = e('./isObjectLike'),
- s = Object.prototype,
- o = s.hasOwnProperty,
- a = s.propertyIsEnumerable,
- u = r(function () {
- return arguments
- }()) ? r : function (e) {
- return i(e) && o.call(e, 'callee') && !a.call(e, 'callee')
- };
- t.exports = u
- },
- {
- './_baseIsArguments': 273,
- './isObjectLike': 359
- }
- ],
- 352: [
- function (e, t, n) {
- var r = Array.isArray;
- t.exports = r
- },
- {
- }
- ],
- 353: [
- function (e, t, n) {
- var r = e('./isFunction'),
- i = e('./isLength');
- t.exports = function (e) {
- return null != e && i(e.length) && !r(e)
- }
- },
- {
- './isFunction': 355,
- './isLength': 356
- }
- ],
- 354: [
- function (e, t, n) {
- var r = e('./_root'),
- i = e('./stubFalse'),
- s = 'object' == typeof n && n && !n.nodeType && n,
- o = s && 'object' == typeof t && t && !t.nodeType && t,
- a = o && o.exports === s ? r.Buffer : void 0,
- u = (a ? a.isBuffer : void 0) || i;
- t.exports = u
- },
- {
- './_root': 338,
- './stubFalse': 368
- }
- ],
- 355: [
- function (e, t, n) {
- var r = e('./_baseGetTag'),
- i = e('./isObject'),
- s = '[object AsyncFunction]',
- o = '[object Function]',
- a = '[object GeneratorFunction]',
- u = '[object Proxy]';
- t.exports = function (e) {
- if (!i(e)) return !1;
- var t = r(e);
- return t == o || t == a || t == s || t == u
- }
- },
- {
- './_baseGetTag': 271,
- './isObject': 358
- }
- ],
- 356: [
- function (e, t, n) {
- var r = 9007199254740991;
- t.exports = function (e) {
- return 'number' == typeof e && e > - 1 && e % 1 == 0 && e <= r
- }
- },
- {
- }
- ],
- 357: [
- function (e, t, n) {
- var r = e('./_baseIsMap'),
- i = e('./_baseUnary'),
- s = e('./_nodeUtil'),
- o = s && s.isMap,
- a = o ? i(o) : r;
- t.exports = a
- },
- {
- './_baseIsMap': 274,
- './_baseUnary': 283,
- './_nodeUtil': 335
- }
- ],
- 358: [
- function (e, t, n) {
- t.exports = function (e) {
- var t = typeof e;
- return null != e && ('object' == t || 'function' == t)
- }
- },
- {
- }
- ],
- 359: [
- function (e, t, n) {
- t.exports = function (e) {
- return null != e && 'object' == typeof e
- }
- },
- {
- }
- ],
- 360: [
- function (e, t, n) {
- var r = e('./_baseGetTag'),
- i = e('./_getPrototype'),
- s = e('./isObjectLike'),
- o = '[object Object]',
- a = Function.prototype,
- u = Object.prototype,
- l = a.toString,
- c = u.hasOwnProperty,
- p = l.call(Object);
- t.exports = function (e) {
- if (!s(e) || r(e) != o) return !1;
- var t = i(e);
- if (null === t) return !0;
- var n = c.call(t, 'constructor') && t.constructor;
- return 'function' == typeof n && n instanceof n && l.call(n) == p
- }
- },
- {
- './_baseGetTag': 271,
- './_getPrototype': 304,
- './isObjectLike': 359
- }
- ],
- 361: [
- function (e, t, n) {
- var r = e('./_baseIsRegExp'),
- i = e('./_baseUnary'),
- s = e('./_nodeUtil'),
- o = s && s.isRegExp,
- a = o ? i(o) : r;
- t.exports = a
- },
- {
- './_baseIsRegExp': 277,
- './_baseUnary': 283,
- './_nodeUtil': 335
- }
- ],
- 362: [
- function (e, t, n) {
- var r = e('./_baseIsSet'),
- i = e('./_baseUnary'),
- s = e('./_nodeUtil'),
- o = s && s.isSet,
- a = o ? i(o) : r;
- t.exports = a
- },
- {
- './_baseIsSet': 278,
- './_baseUnary': 283,
- './_nodeUtil': 335
- }
- ],
- 363: [
- function (e, t, n) {
- var r = e('./_baseIsTypedArray'),
- i = e('./_baseUnary'),
- s = e('./_nodeUtil'),
- o = s && s.isTypedArray,
- a = o ? i(o) : r;
- t.exports = a
- },
- {
- './_baseIsTypedArray': 279,
- './_baseUnary': 283,
- './_nodeUtil': 335
- }
- ],
- 364: [
- function (e, t, n) {
- var r = e('./_arrayLikeKeys'),
- i = e('./_baseKeys'),
- s = e('./isArrayLike');
- t.exports = function (e) {
- return s(e) ? r(e) : i(e)
- }
- },
- {
- './_arrayLikeKeys': 260,
- './_baseKeys': 280,
- './isArrayLike': 353
- }
- ],
- 365: [
- function (e, t, n) {
- var r = e('./_arrayLikeKeys'),
- i = e('./_baseKeysIn'),
- s = e('./isArrayLike');
- t.exports = function (e) {
- return s(e) ? r(e, !0) : i(e)
- }
- },
- {
- './_arrayLikeKeys': 260,
- './_baseKeysIn': 281,
- './isArrayLike': 353
- }
- ],
- 366: [
- function (e, t, n) {
- t.exports = function () {
- }
- },
- {
- }
- ],
- 367: [
- function (e, t, n) {
- t.exports = function () {
- return []
- }
- },
- {
- }
- ],
- 368: [
- function (e, t, n) {
- t.exports = function () {
- return !1
- }
- },
- {
- }
- ],
- 369: [
- function (e, t, n) {
- var r = e('./_baseUniq');
- t.exports = function (e) {
- return e && e.length ? r(e) : [
- ]
- }
- },
- {
- './_baseUniq': 284
- }
- ],
- 370: [
- function (e, t, n) {
- 'use strict';
- var r = Object.getOwnPropertySymbols,
- i = Object.prototype.hasOwnProperty,
- s = Object.prototype.propertyIsEnumerable;
- t.exports = function () {
- try {
- if (!Object.assign) return !1;
- var e = new String('abc');
- if (e[5] = 'de', '5' === Object.getOwnPropertyNames(e) [0]) return !1;
- for (var t = {
- }, n = 0; n < 10; n++) t['_' + String.fromCharCode(n)] = n;
- if ('0123456789' !== Object.getOwnPropertyNames(t).map(function (e) {
- return t[e]
- }).join('')) return !1;
- var r = {
- };
- return 'abcdefghijklmnopqrst'.split('').forEach(function (e) {
- r[e] = e
- }),
- 'abcdefghijklmnopqrst' === Object.keys(Object.assign({
- }, r)).join('')
- } catch (e) {
- return !1
- }
- }() ? Object.assign : function (e, t) {
- for (var n, o, a = function (e) {
- if (null === e || void 0 === e) throw new TypeError('Object.assign cannot be called with null or undefined');
- return Object(e)
- }(e), u = 1; u < arguments.length; u++) {
- for (var l in n = Object(arguments[u])) i.call(n, l) && (a[l] = n[l]);
- if (r) {
- o = r(n);
- for (var c = 0; c < o.length; c++) s.call(n, o[c]) && (a[o[c]] = n[o[c]])
- }
- }
- return a
- }
- },
- {
- }
- ],
- 371: [
- function (e, t, n) {
- n.endianness = function () {
- return 'LE'
- },
- n.hostname = function () {
- return 'undefined' != typeof location ? location.hostname : ''
- },
- n.loadavg = function () {
- return []
- },
- n.uptime = function () {
- return 0
- },
- n.freemem = function () {
- return Number.MAX_VALUE
- },
- n.totalmem = function () {
- return Number.MAX_VALUE
- },
- n.cpus = function () {
- return []
- },
- n.type = function () {
- return 'Browser'
- },
- n.release = function () {
- return 'undefined' != typeof navigator ? navigator.appVersion : ''
- },
- n.networkInterfaces = n.getNetworkInterfaces = function () {
- return {
- }
- },
- n.arch = function () {
- return 'javascript'
- },
- n.platform = function () {
- return 'browser'
- },
- n.tmpdir = n.tmpDir = function () {
- return '/tmp'
- },
- n.EOL = '\n',
- n.homedir = function () {
- return '/'
- }
- },
- {
- }
- ],
- 372: [
- function (e, t, n) {
- (function (e) {
- function t(e, t) {
- for (var n = 0, r = e.length - 1; r >= 0; r--) {
- var i = e[r];
- '.' === i ? e.splice(r, 1) : '..' === i ? (e.splice(r, 1), n++) : n && (e.splice(r, 1), n--)
- }
- if (t) for (; n--; n) e.unshift('..');
- return e
- }
- function r(e, t) {
- if (e.filter) return e.filter(t);
- for (var n = [
- ], r = 0; r < e.length; r++) t(e[r], r, e) && n.push(e[r]);
- return n
- }
- n.resolve = function () {
- for (var n = '', i = !1, s = arguments.length - 1; s >= - 1 && !i; s--) {
- var o = s >= 0 ? arguments[s] : e.cwd();
- if ('string' != typeof o) throw new TypeError('Arguments to path.resolve must be strings');
- o && (n = o + '/' + n, i = '/' === o.charAt(0))
- }
- return n = t(r(n.split('/'), function (e) {
- return !!e
- }), !i).join('/'),
- (i ? '/' : '') + n || '.'
- },
- n.normalize = function (e) {
- var s = n.isAbsolute(e),
- o = '/' === i(e, - 1);
- return (e = t(r(e.split('/'), function (e) {
- return !!e
- }), !s).join('/')) || s || (e = '.'),
- e && o && (e += '/'),
- (s ? '/' : '') + e
- },
- n.isAbsolute = function (e) {
- return '/' === e.charAt(0)
- },
- n.join = function () {
- var e = Array.prototype.slice.call(arguments, 0);
- return n.normalize(r(e, function (e, t) {
- if ('string' != typeof e) throw new TypeError('Arguments to path.join must be strings');
- return e
- }).join('/'))
- },
- n.relative = function (e, t) {
- function r(e) {
- for (var t = 0; t < e.length && '' === e[t]; t++);
- for (var n = e.length - 1; n >= 0 && '' === e[n]; n--);
- return t > n ? [
- ] : e.slice(t, n - t + 1)
- }
- e = n.resolve(e).substr(1),
- t = n.resolve(t).substr(1);
- for (var i = r(e.split('/')), s = r(t.split('/')), o = Math.min(i.length, s.length), a = o, u = 0; u < o; u++) if (i[u] !== s[u]) {
- a = u;
- break
- }
- var l = [
- ];
- for (u = a; u < i.length; u++) l.push('..');
- return (l = l.concat(s.slice(a))).join('/')
- },
- n.sep = '/',
- n.delimiter = ':',
- n.dirname = function (e) {
- if ('string' != typeof e && (e += ''), 0 === e.length) return '.';
- for (var t = e.charCodeAt(0), n = 47 === t, r = - 1, i = !0, s = e.length - 1; s >= 1; --s) if (47 === (t = e.charCodeAt(s))) {
- if (!i) {
- r = s;
- break
- }
- } else i = !1;
- return - 1 === r ? n ? '/' : '.' : n && 1 === r ? '/' : e.slice(0, r)
- },
- n.basename = function (e, t) {
- var n = function (e) {
- 'string' != typeof e && (e += '');
- var t,
- n = 0,
- r = - 1,
- i = !0;
- for (t = e.length - 1; t >= 0; --t) if (47 === e.charCodeAt(t)) {
- if (!i) {
- n = t + 1;
- break
- }
- } else - 1 === r && (i = !1, r = t + 1);
- return - 1 === r ? '' : e.slice(n, r)
- }(e);
- return t && n.substr( - 1 * t.length) === t && (n = n.substr(0, n.length - t.length)),
- n
- },
- n.extname = function (e) {
- 'string' != typeof e && (e += '');
- for (var t = - 1, n = 0, r = - 1, i = !0, s = 0, o = e.length - 1; o >= 0; --o) {
- var a = e.charCodeAt(o);
- if (47 !== a) - 1 === r && (i = !1, r = o + 1),
- 46 === a ? - 1 === t ? t = o : 1 !== s && (s = 1) : - 1 !== t && (s = - 1);
- else if (!i) {
- n = o + 1;
- break
- }
- }
- return - 1 === t || - 1 === r || 0 === s || 1 === s && t === r - 1 && t === n + 1 ? '' : e.slice(t, r)
- };
- var i = 'b' === 'ab'.substr( - 1) ? function (e, t, n) {
- return e.substr(t, n)
- }
- : function (e, t, n) {
- return t < 0 && (t = e.length + t),
- e.substr(t, n)
- }
- }).call(this, e('_process'))
- },
- {
- _process: 373
- }
- ],
- 373: [
- function (e, t, n) {
- var r,
- i,
- s = t.exports = {
- };
- function o() {
- throw new Error('setTimeout has not been defined')
- }
- function a() {
- throw new Error('clearTimeout has not been defined')
- }
- function u(e) {
- if (r === setTimeout) return setTimeout(e, 0);
- if ((r === o || !r) && setTimeout) return r = setTimeout,
- setTimeout(e, 0);
- try {
- return r(e, 0)
- } catch (t) {
- try {
- return r.call(null, e, 0)
- } catch (t) {
- return r.call(this, e, 0)
- }
- }
- }
- !function () {
- try {
- r = 'function' == typeof setTimeout ? setTimeout : o
- } catch (e) {
- r = o
- }
- try {
- i = 'function' == typeof clearTimeout ? clearTimeout : a
- } catch (e) {
- i = a
- }
- }();
- var l,
- c = [
- ],
- p = !1,
- h = - 1;
- function f() {
- p && l && (p = !1, l.length ? c = l.concat(c) : h = - 1, c.length && d())
- }
- function d() {
- if (!p) {
- var e = u(f);
- p = !0;
- for (var t = c.length; t; ) {
- for (l = c, c = [
- ]; ++h < t; ) l && l[h].run();
- h = - 1,
- t = c.length
- }
- l = null,
- p = !1,
- function (e) {
- if (i === clearTimeout) return clearTimeout(e);
- if ((i === a || !i) && clearTimeout) return i = clearTimeout,
- clearTimeout(e);
- try {
- i(e)
- } catch (t) {
- try {
- return i.call(null, e)
- } catch (t) {
- return i.call(this, e)
- }
- }
- }(e)
- }
- }
- function m(e, t) {
- this.fun = e,
- this.array = t
- }
- function g() {
- }
- s.nextTick = function (e) {
- var t = new Array(arguments.length - 1);
- if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
- c.push(new m(e, t)),
- 1 !== c.length || p || u(d)
- },
- m.prototype.run = function () {
- this.fun.apply(null, this.array)
- },
- s.title = 'browser',
- s.browser = !0,
- s.env = {
- },
- s.argv = [
- ],
- s.version = '',
- s.versions = {
- },
- s.on = g,
- s.addListener = g,
- s.once = g,
- s.off = g,
- s.removeListener = g,
- s.removeAllListeners = g,
- s.emit = g,
- s.prependListener = g,
- s.prependOnceListener = g,
- s.listeners = function (e) {
- return []
- },
- s.binding = function (e) {
- throw new Error('process.binding is not supported')
- },
- s.cwd = function () {
- return '/'
- },
- s.chdir = function (e) {
- throw new Error('process.chdir is not supported')
- },
- s.umask = function () {
- return 0
- }
- },
- {
- }
- ],
- 374: [
- function (e, t, n) {
- 'use strict';
- t.exports = e('./lib')
- },
- {
- './lib': 379
- }
- ],
- 375: [
- function (e, t, n) {
- 'use strict';
- var r = e('asap/raw');
- function i() {
- }
- var s = null,
- o = {
- };
- function a(e) {
- if ('object' != typeof this) throw new TypeError('Promises must be constructed via new');
- if ('function' != typeof e) throw new TypeError('Promise constructor\'s argument is not a function');
- this._40 = 0,
- this._65 = 0,
- this._55 = null,
- this._72 = null,
- e !== i && f(e, this)
- }
- function u(e, t) {
- for (; 3 === e._65; ) e = e._55;
- if (a._37 && a._37(e), 0 === e._65) return 0 === e._40 ? (e._40 = 1, void (e._72 = t)) : 1 === e._40 ? (e._40 = 2, void (e._72 = [
- e._72,
- t
- ])) : void e._72.push(t);
- !function (e, t) {
- r(function () {
- var n = 1 === e._65 ? t.onFulfilled : t.onRejected;
- if (null !== n) {
- var r = function (e, t) {
- try {
- return e(t)
- } catch (e) {
- return s = e,
- o
- }
- }(n, e._55);
- r === o ? c(t.promise, s) : l(t.promise, r)
- } else 1 === e._65 ? l(t.promise, e._55) : c(t.promise, e._55)
- })
- }(e, t)
- }
- function l(e, t) {
- if (t === e) return c(e, new TypeError('A promise cannot be resolved with itself.'));
- if (t && ('object' == typeof t || 'function' == typeof t)) {
- var n = function (e) {
- try {
- return e.then
- } catch (e) {
- return s = e,
- o
- }
- }(t);
- if (n === o) return c(e, s);
- if (n === e.then && t instanceof a) return e._65 = 3,
- e._55 = t,
- void p(e);
- if ('function' == typeof n) return void f(n.bind(t), e)
- }
- e._65 = 1,
- e._55 = t,
- p(e)
- }
- function c(e, t) {
- e._65 = 2,
- e._55 = t,
- a._87 && a._87(e, t),
- p(e)
- }
- function p(e) {
- if (1 === e._40 && (u(e, e._72), e._72 = null), 2 === e._40) {
- for (var t = 0; t < e._72.length; t++) u(e, e._72[t]);
- e._72 = null
- }
- }
- function h(e, t, n) {
- this.onFulfilled = 'function' == typeof e ? e : null,
- this.onRejected = 'function' == typeof t ? t : null,
- this.promise = n
- }
- function f(e, t) {
- var n = !1,
- r = function (e, t, n) {
- try {
- e(t, n)
- } catch (e) {
- return s = e,
- o
- }
- }(e, function (e) {
- n || (n = !0, l(t, e))
- }, function (e) {
- n || (n = !0, c(t, e))
- });
- n || r !== o || (n = !0, c(t, s))
- }
- t.exports = a,
- a._37 = null,
- a._87 = null,
- a._61 = i,
- a.prototype.then = function (e, t) {
- if (this.constructor !== a) return function (e, t, n) {
- return new e.constructor(function (r, s) {
- var o = new a(i);
- o.then(r, s),
- u(e, new h(t, n, o))
- })
- }(this, e, t);
- var n = new a(i);
- return u(this, new h(e, t, n)),
- n
- }
- },
- {
- 'asap/raw': 7
- }
- ],
- 376: [
- function (e, t, n) {
- 'use strict';
- var r = e('./core.js');
- t.exports = r,
- r.prototype.done = function (e, t) {
- (arguments.length ? this.then.apply(this, arguments) : this).then(null, function (e) {
- setTimeout(function () {
- throw e
- }, 0)
- })
- }
- },
- {
- './core.js': 375
- }
- ],
- 377: [
- function (e, t, n) {
- 'use strict';
- var r = e('./core.js');
- t.exports = r;
- var i = c(!0),
- s = c(!1),
- o = c(null),
- a = c(void 0),
- u = c(0),
- l = c('');
- function c(e) {
- var t = new r(r._61);
- return t._65 = 1,
- t._55 = e,
- t
- }
- r.resolve = function (e) {
- if (e instanceof r) return e;
- if (null === e) return o;
- if (void 0 === e) return a;
- if (!0 === e) return i;
- if (!1 === e) return s;
- if (0 === e) return u;
- if ('' === e) return l;
- if ('object' == typeof e || 'function' == typeof e) try {
- var t = e.then;
- if ('function' == typeof t) return new r(t.bind(e))
- } catch (e) {
- return new r(function (t, n) {
- n(e)
- })
- }
- return c(e)
- },
- r.all = function (e) {
- var t = Array.prototype.slice.call(e);
- return new r(function (e, n) {
- if (0 === t.length) return e([]);
- var i = t.length;
- function s(o, a) {
- if (a && ('object' == typeof a || 'function' == typeof a)) {
- if (a instanceof r && a.then === r.prototype.then) {
- for (; 3 === a._65; ) a = a._55;
- return 1 === a._65 ? s(o, a._55) : (2 === a._65 && n(a._55), void a.then(function (e) {
- s(o, e)
- }, n))
- }
- var u = a.then;
- if ('function' == typeof u) return void new r(u.bind(a)).then(function (e) {
- s(o, e)
- }, n)
- }
- t[o] = a,
- 0 == --i && e(t)
- }
- for (var o = 0; o < t.length; o++) s(o, t[o])
- })
- },
- r.reject = function (e) {
- return new r(function (t, n) {
- n(e)
- })
- },
- r.race = function (e) {
- return new r(function (t, n) {
- e.forEach(function (e) {
- r.resolve(e).then(t, n)
- })
- })
- },
- r.prototype.catch = function (e) {
- return this.then(null, e)
- }
- },
- {
- './core.js': 375
- }
- ],
- 378: [
- function (e, t, n) {
- 'use strict';
- var r = e('./core.js');
- t.exports = r,
- r.prototype.finally = function (e) {
- return this.then(function (t) {
- return r.resolve(e()).then(function () {
- return t
- })
- }, function (t) {
- return r.resolve(e()).then(function () {
- throw t
- })
- })
- }
- },
- {
- './core.js': 375
- }
- ],
- 379: [
- function (e, t, n) {
- 'use strict';
- t.exports = e('./core.js'),
- e('./done.js'),
- e('./finally.js'),
- e('./es6-extensions.js'),
- e('./node-extensions.js'),
- e('./synchronous.js')
- },
- {
- './core.js': 375,
- './done.js': 376,
- './es6-extensions.js': 377,
- './finally.js': 378,
- './node-extensions.js': 380,
- './synchronous.js': 381
- }
- ],
- 380: [
- function (e, t, n) {
- 'use strict';
- var r = e('./core.js'),
- i = e('asap');
- t.exports = r,
- r.denodeify = function (e, t) {
- return 'number' == typeof t && t !== 1 / 0 ? function (e, t) {
- for (var n = [
- ], i = 0; i < t; i++) n.push('a' + i);
- var o = [
- 'return function (' + n.join(',') + ') {',
- 'var self = this;',
- 'return new Promise(function (rs, rj) {',
- 'var res = fn.call(',
- [
- 'self'
- ].concat(n).concat([s]).join(','),
- ');',
- 'if (res &&',
- '(typeof res === "object" || typeof res === "function") &&',
- 'typeof res.then === "function"',
- ') {rs(res);}',
- '});',
- '};'
- ].join('');
- return Function(['Promise',
- 'fn'], o) (r, e)
- }(e, t) : function (e) {
- for (var t = Math.max(e.length - 1, 3), n = [
- ], i = 0; i < t; i++) n.push('a' + i);
- var o = [
- 'return function (' + n.join(',') + ') {',
- 'var self = this;',
- 'var args;',
- 'var argLength = arguments.length;',
- 'if (arguments.length > ' + t + ') {',
- 'args = new Array(arguments.length + 1);',
- 'for (var i = 0; i < arguments.length; i++) {',
- 'args[i] = arguments[i];',
- '}',
- '}',
- 'return new Promise(function (rs, rj) {',
- 'var cb = ' + s + ';',
- 'var res;',
- 'switch (argLength) {',
- n.concat(['extra']).map(function (e, t) {
- return 'case ' + t + ':res = fn.call(' + ['self'].concat(n.slice(0, t)).concat('cb').join(',') + ');break;'
- }).join(''),
- 'default:',
- 'args[argLength] = cb;',
- 'res = fn.apply(self, args);',
- '}',
- 'if (res &&',
- '(typeof res === "object" || typeof res === "function") &&',
- 'typeof res.then === "function"',
- ') {rs(res);}',
- '});',
- '};'
- ].join('');
- return Function(['Promise',
- 'fn'], o) (r, e)
- }(e)
- };
- var s = 'function (err, res) {if (err) { rj(err); } else { rs(res); }}';
- r.nodeify = function (e) {
- return function () {
- var t = Array.prototype.slice.call(arguments),
- n = 'function' == typeof t[t.length - 1] ? t.pop() : null,
- s = this;
- try {
- return e.apply(this, arguments).nodeify(n, s)
- } catch (e) {
- if (null === n || void 0 === n) return new r(function (t, n) {
- n(e)
- });
- i(function () {
- n.call(s, e)
- })
- }
- }
- },
- r.prototype.nodeify = function (e, t) {
- if ('function' != typeof e) return this;
- this.then(function (n) {
- i(function () {
- e.call(t, null, n)
- })
- }, function (n) {
- i(function () {
- e.call(t, n)
- })
- })
- }
- },
- {
- './core.js': 375,
- asap: 6
- }
- ],
- 381: [
- function (e, t, n) {
- 'use strict';
- var r = e('./core.js');
- t.exports = r,
- r.enableSynchronous = function () {
- r.prototype.isPending = function () {
- return 0 == this.getState()
- },
- r.prototype.isFulfilled = function () {
- return 1 == this.getState()
- },
- r.prototype.isRejected = function () {
- return 2 == this.getState()
- },
- r.prototype.getValue = function () {
- if (3 === this._65) return this._55.getValue();
- if (!this.isFulfilled()) throw new Error('Cannot get a value of an unfulfilled promise.');
- return this._55
- },
- r.prototype.getReason = function () {
- if (3 === this._65) return this._55.getReason();
- if (!this.isRejected()) throw new Error('Cannot get a rejection reason of a non-rejected promise.');
- return this._55
- },
- r.prototype.getState = function () {
- return 3 === this._65 ? this._55.getState() : - 1 === this._65 || - 2 === this._65 ? 0 : this._65
- }
- },
- r.disableSynchronous = function () {
- r.prototype.isPending = void 0,
- r.prototype.isFulfilled = void 0,
- r.prototype.isRejected = void 0,
- r.prototype.getValue = void 0,
- r.prototype.getReason = void 0,
- r.prototype.getState = void 0
- }
- },
- {
- './core.js': 375
- }
- ],
- 382: [
- function (e, t, n) {
- 'use strict';
- var r = e('assert'),
- i = e('constantinople'),
- s = e('pug-runtime'),
- o = e('js-stringify');
- function a(e) {
- return i(e, {
- pug: s,
- pug_interp: void 0
- })
- }
- function u(e) {
- return i.toConstant(e, {
- pug: s,
- pug_interp: void 0
- })
- }
- t.exports = function (e, t) {
- r(Array.isArray(e), 'Attrs should be an array'),
- r(e.every(function (e) {
- return e && 'object' == typeof e && 'string' == typeof e.name && ('string' == typeof e.val || 'boolean' == typeof e.val) && 'boolean' == typeof e.mustEscape
- }), 'All attributes should be supplied as an object of the form {name, val, mustEscape}'),
- r(t && 'object' == typeof t, 'Options should be an object'),
- r('boolean' == typeof t.terse, 'Options.terse should be a boolean'),
- r('function' == typeof t.runtime, 'Options.runtime should be a function that takes a runtime function name and returns the source code that will evaluate to that function at runtime'),
- r('html' === t.format || 'object' === t.format, 'Options.format should be "html" or "object"');
- var n = [
- ],
- i = [
- ],
- l = [
- ];
- function c(e, n, r, i) {
- if (a(n)) if ('html' === t.format) {
- var l = o(s.attr(e, u(n), r, t.terse)),
- c = i[i.length - 1];
- c && c[c.length - 1] === l[0] ? i[i.length - 1] = c.substr(0, c.length - 1) + l.substr(1) : i.push(l)
- } else n = u(n),
- r && (n = s.escape(n)),
- i.push(o(e) + ': ' + o(n));
- else 'html' === t.format ? i.push(t.runtime('attr') + '("' + e + '", ' + n + ', ' + o(r) + ', ' + o(t.terse) + ')') : (r && (n = t.runtime('escape') + '(' + n + ')'), i.push(o(e) + ': ' + n))
- }
- e.forEach(function (e) {
- var r = e.name,
- p = e.val,
- h = e.mustEscape;
- 'class' === r ? (i.push(p), l.push(h)) : ('style' === r && (p = a(p) ? o(s.style(u(p))) : t.runtime('style') + '(' + p + ')'), c(r, p, h, n))
- });
- var p = [
- ];
- i.length && (i.every(a) ? c('class', o(s.classes(i.map(u), l)), !1, p) : (i = i.map(function (e, t) {
- return a(e) && (e = o(l[t] ? s.escape(u(e)) : u(e)), l[t] = !1),
- e
- }), c('class', t.runtime('classes') + '([' + i.join(',') + '], ' + o(l) + ')', !1, p)));
- return n = p.concat(n),
- 'html' === t.format ? n.length ? n.join('+') : '""' : '{' + n.join(',') + '}'
- }
- },
- {
- assert: 8,
- constantinople: 384,
- 'js-stringify': 242,
- 'pug-runtime': 400
- }
- ],
- 383: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0,
- n.default = function (e, t, n) {
- switch (e) {
- case '+':
- return t + n;
- case '-':
- return t - n;
- case '/':
- return t / n;
- case '%':
- return t % n;
- case '*':
- return t * n;
- case '**':
- return Math.pow(t, n);
- case '&':
- return t & n;
- case '|':
- return t | n;
- case '>>':
- return t >> n;
- case '>>>':
- return t >>> n;
- case '<<':
- return t << n;
- case '^':
- return t ^ n;
- case '==':
- return t == n;
- case '===':
- return t === n;
- case '!=':
- return t != n;
- case '!==':
- return t !== n;
- case 'in':
- return t in n;
- case 'instanceof':
- return t instanceof n;
- case '>':
- return t > n;
- case '<':
- return t < n;
- case '>=':
- return t >= n;
- case '<=':
- return t <= n
- }
- }
- },
- {
- }
- ],
- 384: [
- function (e, t, n) {
- 'use strict';
- n.__esModule = !0;
- var r = e('babylon'),
- i = e('babel-types'),
- s = e('./binaryOperation');
- function o(e, t) {
- void 0 === t && (t = {
- });
- var n = !0;
- var r = function e(r) {
- if (n) {
- if (i.isArrayExpression(r)) {
- for (var o = [
- ], u = 0; n && u < r.elements.length; u++) {
- var l = r.elements[u];
- i.isSpreadElement(l) ? a(f = e(l.argument)) && n ? o.push.apply(o, f) : n = !1 : o.push(e(l))
- }
- return o
- }
- if (i.isBinaryExpression(r)) {
- var c = e(r.left),
- p = e(r.right);
- return n && s.default(r.operator, c, p)
- }
- if (i.isBooleanLiteral(r)) return r.value;
- if (i.isCallExpression(r)) {
- var h = [
- ];
- for (u = 0; n && u < r.arguments.length; u++) {
- var f,
- d = r.arguments[u];
- i.isSpreadElement(d) ? a(f = e(d.argument)) && n ? h.push.apply(h, f) : n = !1 : h.push(e(d))
- }
- if (!n) return;
- if (!i.isMemberExpression(r.callee)) {
- var m = e(r.callee);
- if (!n) return;
- return m.apply(null, h)
- }
- if (!(g = e(r.callee.object)) || !n) return void (n = !1);
- if (void 0 !== (y = r.callee.computed ? e(r.callee.property) : i.isIdentifier(r.callee.property) ? r.callee.property.name : void 0) || r.callee.computed || (n = !1), !n) return;
- if (function (e, t) {
- switch (typeof e) {
- case 'boolean':
- switch (t) {
- case 'toString':
- return !0;
- default:
- return !1
- }
- case 'number':
- switch (t) {
- case 'toExponential':
- case 'toFixed':
- case 'toPrecision':
- case 'toString':
- return !0;
- default:
- return !1
- }
- case 'string':
- switch (t) {
- case 'charAt':
- case 'charCodeAt':
- case 'codePointAt':
- case 'concat':
- case 'endsWith':
- case 'includes':
- case 'indexOf':
- case 'lastIndexOf':
- case 'match':
- case 'normalize':
- case 'padEnd':
- case 'padStart':
- case 'repeat':
- case 'replace':
- case 'search':
- case 'slice':
- case 'split':
- case 'startsWith':
- case 'substr':
- case 'substring':
- case 'toLowerCase':
- case 'toUpperCase':
- case 'trim':
- return !0;
- default:
- return !1
- }
- default:
- if (e instanceof RegExp) switch (t) {
- case 'test':
- case 'exec':
- return !0;
- default:
- return !1
- }
- return {
- }.hasOwnProperty.call(e, t) && '_' !== t[0]
- }
- }(g, '' + y)) return g[y].apply(g, h)
- }
- if (i.isConditionalExpression(r)) return e(e(r.test) ? r.consequent : r.alternate);
- if (i.isIdentifier(r) && t.constants && {
- }.hasOwnProperty.call(t.constants, r.name)) return t.constants[r.name];
- if (i.isLogicalExpression(r)) {
- if (c = e(r.left), p = e(r.right), n && '&&' === r.operator) return c && p;
- if (n && '||' === r.operator) return c || p
- }
- if (i.isMemberExpression(r)) {
- var g,
- y;
- if (!(g = e(r.object)) || !n) return void (n = !1);
- if (void 0 !== (y = r.computed ? e(r.property) : i.isIdentifier(r.property) ? r.property.name : void 0) || r.computed || (n = !1), !n) return;
- if ({
- }.hasOwnProperty.call(g, '' + y) && '_' !== y[0]) return g[y]
- }
- if (i.isNullLiteral(r)) return null;
- if (i.isNumericLiteral(r)) return r.value;
- if (i.isObjectExpression(r)) {
- var v = {
- };
- for (u = 0; n && u < r.properties.length; u++) {
- var b = r.properties[u];
- if (i.isObjectProperty(b)) {
- if (b.shorthand) return void (n = !1);
- var x = b.computed ? e(b.key) : i.isIdentifier(b.key) ? b.key.name : i.isStringLiteral(b.key) ? b.key.value : void 0;
- if (x && '_' !== x[0] || (n = !1), !n) return;
- var A = e(b.value);
- if (!n) return;
- v[x] = A
- } else if (i.isObjectMethod(b)) n = !1;
- else if (i.isSpreadProperty(b)) {
- if ((_ = e(b.argument)) || (n = !1), !n) return;
- Object.assign(v, _)
- }
- }
- return v
- }
- if (i.isParenthesizedExpression(r)) return e(r.expression);
- if (i.isRegExpLiteral(r)) return new RegExp(r.pattern, r.flags);
- if (i.isSequenceExpression(r)) {
- for (u = 0; u < r.expressions.length - 1 && n; u++) e(r.expressions[u]);
- return e(r.expressions[r.expressions.length - 1])
- }
- if (i.isStringLiteral(r)) return r.value;
- if (i.isTemplateLiteral(r)) {
- var E = '';
- for (u = 0; u < r.quasis.length; u++) E += r.quasis[u].value.cooked,
- u < r.expressions.length && (E += '' + e(r.expressions[u]));
- return E
- }
- if (i.isUnaryExpression(r)) {
- var _ = e(r.argument);
- if (!n) return;
- switch (r.operator) {
- case '-':
- return - _;
- case '+':
- return + _;
- case '!':
- return !_;
- case '~':
- return ~_;
- case 'typeof':
- return typeof _;
- case 'void':
- return
- }
- }
- n = !1
- }
- }(e);
- return n ? {
- constant: !0,
- result: r
- }
- : {
- constant: !1
- }
- }
- function a(e) {
- return 'string' == typeof e || Array.isArray(e) || 'undefined' != typeof Set && e instanceof Set || 'undefined' != typeof Map && e instanceof Map
- }
- function u(e, t) {
- if (e === t) return !0;
- if (e && t && 'object' == typeof e && 'object' == typeof t) {
- for (var n in e) if (e[n] !== t[n]) return !1;
- for (var n in t) if (e[n] !== t[n]) return !1;
- return !0
- }
- return !1
- }
- n.expressionToConstant = o;
- var l = {
- },
- c = '',
- p = l,
- h = l,
- f = null,
- d = !1;
- function m(e, t, n) {
- if (void 0 === t && (t = l), void 0 === n && (n = l), c === e && u(p, t) && u(h, n)) return d;
- var i;
- c = e,
- p = t;
- try {
- i = r.parseExpression(e, n)
- } catch (e) {
- return d = !1
- }
- var s = o(i, {
- constants: t
- }),
- a = s.result,
- m = s.constant;
- return f = a,
- d = m
- }
- function g(e, t, n) {
- if (void 0 === t && (t = l), void 0 === n && (n = l), !m(e, t, n)) throw new Error(JSON.stringify(e) + ' is not constant.');
- return f
- }
- n.isConstant = m,
- n.toConstant = g,
- n.default = m,
- t.exports = m,
- t.exports.default = m,
- t.exports.expressionToConstant = o,
- t.exports.isConstant = m,
- t.exports.toConstant = g
- },
- {
- './binaryOperation': 383,
- 'babel-types': 33,
- babylon: 38
- }
- ],
- 385: [
- function (e, t, n) {
- 'use strict';
- var r = e('doctypes'),
- i = e('pug-error'),
- s = e('pug-runtime/build'),
- o = e('pug-runtime'),
- a = e('pug-attrs'),
- u = e('void-elements'),
- l = e('constantinople'),
- c = e('js-stringify'),
- p = e('with'),
- h = {
- pre: !0,
- textarea: !0
- },
- f = [
- 'pug',
- 'pug_mixins',
- 'pug_interp',
- 'pug_debug_filename',
- 'pug_debug_line',
- 'pug_debug_sources',
- 'pug_html'
- ];
- function d(e, t) {
- this.options = t = t || {
- },
- this.node = e,
- this.bufferedConcatenationCount = 0,
- this.hasCompiledDoctype = !1,
- this.hasCompiledTag = !1,
- this.pp = t.pretty || !1,
- this.pp && 'string' != typeof this.pp && (this.pp = ' '),
- this.debug = !1 !== t.compileDebug,
- this.indents = 0,
- this.parentIndents = 0,
- this.terse = !1,
- this.mixins = {
- },
- this.dynamicMixins = !1,
- this.eachCount = 0,
- t.doctype && this.setDoctype(t.doctype),
- this.runtimeFunctionsUsed = [
- ],
- this.inlineRuntimeFunctions = t.inlineRuntimeFunctions || !1,
- this.debug && this.inlineRuntimeFunctions && this.runtimeFunctionsUsed.push('rethrow')
- }
- t.exports = function (e, t) {
- return new d(e, t).compile()
- },
- t.exports.CodeGenerator = d,
- d.prototype = {
- runtime: function (e) {
- return this.inlineRuntimeFunctions ? (this.runtimeFunctionsUsed.push(e), 'pug_' + e) : 'pug.' + e
- },
- error: function (e, t, n) {
- throw i(t, e, {
- line: n.line,
- column: n.column,
- filename: n.filename
- })
- },
- compile: function () {
- if (this.buf = [
- ], this.pp && this.buf.push('var pug_indent = [];'), this.lastBufferedIdx = - 1, this.visit(this.node), !this.dynamicMixins) for (var e = Object.keys(this.mixins), t = 0; t < e.length; t++) {
- var n = this.mixins[e[t]];
- if (!n.used) for (var r = 0; r < n.instances.length; r++) for (var i = n.instances[r].start; i < n.instances[r].end; i++) this.buf[i] = ''
- }
- var o = this.buf.join('\n'),
- a = this.options.globals ? this.options.globals.concat(f) : f;
- return o = this.options.self ? 'var self = locals || {};' + o : p('locals || {}', o, a.concat(this.runtimeFunctionsUsed.map(function (e) {
- return 'pug_' + e
- }))),
- this.debug && (this.options.includeSources && (o = 'var pug_debug_sources = ' + c(this.options.includeSources) + ';\n' + o), o = 'var pug_debug_filename, pug_debug_line;try {' + o + '} catch (err) {' + (this.inlineRuntimeFunctions ? 'pug_rethrow' : 'pug.rethrow') + '(err, pug_debug_filename, pug_debug_line' + (this.options.includeSources ? ', pug_debug_sources[pug_debug_filename]' : '') + ');}'),
- s(this.runtimeFunctionsUsed) + 'function ' + (this.options.templateName || 'template') + '(locals) {var pug_html = "", pug_mixins = {}, pug_interp;' + o + ';return pug_html;}'
- },
- setDoctype: function (e) {
- this.doctype = r[e.toLowerCase()] || '<!DOCTYPE ' + e + '>',
- this.terse = '<!doctype html>' == this.doctype.toLowerCase(),
- this.xml = 0 == this.doctype.indexOf('<?xml')
- },
- buffer: function (e) {
- e = (e = c(e)).substr(1, e.length - 2),
- this.lastBufferedIdx == this.buf.length && this.bufferedConcatenationCount < 100 ? ('code' === this.lastBufferedType && (this.lastBuffered += ' + "', this.bufferedConcatenationCount++), this.lastBufferedType = 'text', this.lastBuffered += e, this.buf[this.lastBufferedIdx - 1] = 'pug_html = pug_html + ' + this.bufferStartChar + this.lastBuffered + '";') : (this.bufferedConcatenationCount = 0, this.buf.push('pug_html = pug_html + "' + e + '";'), this.lastBufferedType = 'text', this.bufferStartChar = '"', this.lastBuffered = e, this.lastBufferedIdx = this.buf.length)
- },
- bufferExpression: function (e) {
- if (function (e) {
- return l(e, {
- pug: o,
- pug_interp: void 0
- })
- }(e)) return this.buffer(function (e) {
- return l.toConstant(e, {
- pug: o,
- pug_interp: void 0
- })
- }(e) + '');
- this.lastBufferedIdx == this.buf.length && this.bufferedConcatenationCount < 100 ? (this.bufferedConcatenationCount++, 'text' === this.lastBufferedType && (this.lastBuffered += '"'), this.lastBufferedType = 'code', this.lastBuffered += ' + (' + e + ')', this.buf[this.lastBufferedIdx - 1] = 'pug_html = pug_html + (' + this.bufferStartChar + this.lastBuffered + ');') : (this.bufferedConcatenationCount = 0, this.buf.push('pug_html = pug_html + (' + e + ');'), this.lastBufferedType = 'code', this.bufferStartChar = '', this.lastBuffered = '(' + e + ')', this.lastBufferedIdx = this.buf.length)
- },
- prettyIndent: function (e, t) {
- e = e || 0,
- t = t ? '\n' : '',
- this.buffer(t + Array(this.indents + e).join(this.pp)),
- this.parentIndents && this.buf.push('pug_html = pug_html + pug_indent.join("");')
- },
- visit: function (e, t) {
- var n = this.debug;
- if (!e) throw i = t ? 'A child of ' + t.type + ' (' + (t.filename || 'Pug') + ':' + t.line + ')' : 'A top-level node',
- i += ' is ' + e + ', expected a Pug AST Node.',
- new TypeError(i);
- if (n && !1 !== e.debug && 'Block' !== e.type && e.line) {
- var r = ';pug_debug_line = ' + e.line;
- e.filename && (r += ';pug_debug_filename = ' + c(e.filename)),
- this.buf.push(r + ';')
- }
- if (!this['visit' + e.type]) {
- var i;
- switch (i = t ? 'A child of ' + t.type : 'A top-level node', i += ' (' + (e.filename || 'Pug') + ':' + e.line + ') is of type ' + e.type + ', which is not supported by pug-code-gen.', e.type) {
- case 'Filter':
- i += ' Please use pug-filters to preprocess this AST.';
- break;
- case 'Extends':
- case 'Include':
- case 'NamedBlock':
- case 'FileReference':
- i += ' Please use pug-linker to preprocess this AST.'
- }
- throw new TypeError(i)
- }
- this.visitNode(e)
- },
- visitNode: function (e) {
- return this['visit' + e.type](e)
- },
- visitCase: function (e) {
- this.buf.push('switch (' + e.expr + '){'),
- this.visit(e.block, e),
- this.buf.push('}')
- },
- visitWhen: function (e) {
- 'default' == e.expr ? this.buf.push('default:') : this.buf.push('case ' + e.expr + ':'),
- e.block && (this.visit(e.block, e), this.buf.push(' break;'))
- },
- visitLiteral: function (e) {
- this.buffer(e.str)
- },
- visitNamedBlock: function (e) {
- return this.visitBlock(e)
- },
- visitBlock: function (e) {
- var t = this.escapePrettyMode,
- n = this.pp;
- n && e.nodes.length > 1 && !t && 'Text' === e.nodes[0].type && 'Text' === e.nodes[1].type && this.prettyIndent(1, !0);
- for (var r = 0; r < e.nodes.length; ++r) n && r > 0 && !t && 'Text' === e.nodes[r].type && 'Text' === e.nodes[r - 1].type && /\n$/.test(e.nodes[r - 1].val) && this.prettyIndent(1, !1),
- this.visit(e.nodes[r], e)
- },
- visitMixinBlock: function (e) {
- this.pp && this.buf.push('pug_indent.push(\'' + Array(this.indents + 1).join(this.pp) + '\');'),
- this.buf.push('block && block();'),
- this.pp && this.buf.push('pug_indent.pop();')
- },
- visitDoctype: function (e) {
- !e || !e.val && this.doctype || this.setDoctype(e.val || 'html'),
- this.doctype && this.buffer(this.doctype),
- this.hasCompiledDoctype = !0
- },
- visitMixin: function (e) {
- var t = 'pug_mixins[',
- n = e.args || '',
- r = e.block,
- i = e.attrs,
- s = this.attributeBlocks(e.attributeBlocks),
- o = this.pp,
- a = '#' === e.name[0],
- u = e.name;
- if (a && (this.dynamicMixins = !0), t += (a ? e.name.substr(2, e.name.length - 3) : '"' + e.name + '"') + ']', this.mixins[u] = this.mixins[u] || {
- used: !1,
- instances: [
- ]
- }, e.call) {
- if (this.mixins[u].used = !0, o && this.buf.push('pug_indent.push(\'' + Array(this.indents + 1).join(o) + '\');'), r || i.length || s.length) {
- if (this.buf.push(t + '.call({'), r) {
- this.buf.push('block: function(){'),
- this.parentIndents++;
- var l = this.indents;
- this.indents = 0,
- this.visit(e.block, e),
- this.indents = l,
- this.parentIndents--,
- i.length || s.length ? this.buf.push('},') : this.buf.push('}')
- }
- if (s.length) {
- if (i.length) {
- var c = this.attrs(i);
- s.unshift(c)
- }
- s.length > 1 ? this.buf.push('attributes: ' + this.runtime('merge') + '([' + s.join(',') + '])') : this.buf.push('attributes: ' + s[0])
- } else if (i.length) {
- c = this.attrs(i);
- this.buf.push('attributes: ' + c)
- }
- n ? this.buf.push('}, ' + n + ');') : this.buf.push('});')
- } else this.buf.push(t + '(' + n + ');');
- o && this.buf.push('pug_indent.pop();')
- } else {
- var p,
- h = this.buf.length;
- (n = n ? n.split(',') : [
- ]).length && /^\.\.\./.test(n[n.length - 1].trim()) && (p = n.pop().trim().replace(/^\.\.\./, '')),
- this.buf.push(t + ' = pug_interp = function(' + n.join(',') + '){'),
- this.buf.push('var block = (this && this.block), attributes = (this && this.attributes) || {};'),
- p && (this.buf.push('var ' + p + ' = [];'), this.buf.push('for (pug_interp = ' + n.length + '; pug_interp < arguments.length; pug_interp++) {'), this.buf.push(' ' + p + '.push(arguments[pug_interp]);'), this.buf.push('}')),
- this.parentIndents++,
- this.visit(r, e),
- this.parentIndents--,
- this.buf.push('};');
- var f = this.buf.length;
- this.mixins[u].instances.push({
- start: h,
- end: f
- })
- }
- },
- visitTag: function (e, t) {
- this.indents++;
- var n = e.name,
- r = this.pp,
- i = this;
- function s() {
- t ? i.bufferExpression(e.expr) : i.buffer(n)
- }
- !0 === h[e.name] && (this.escapePrettyMode = !0),
- this.hasCompiledTag || (this.hasCompiledDoctype || 'html' != n || this.visitDoctype(), this.hasCompiledTag = !0),
- r && !e.isInline && this.prettyIndent(0, !0),
- e.selfClosing || !this.xml && u[e.name] ? (this.buffer('<'), s(), this.visitAttributes(e.attrs, this.attributeBlocks(e.attributeBlocks)), this.terse && !e.selfClosing ? this.buffer('>') : this.buffer('/>'), (e.code || e.block && ('Block' !== e.block.type || 0 !== e.block.nodes.length) && e.block.nodes.some(function (e) {
- return 'Text' !== e.type || !/^\s*$/.test(e.val)
- })) && this.error(n + ' is a self closing element: <' + n + '/> but contains nested content.', 'SELF_CLOSING_CONTENT', e)) : (this.buffer('<'), s(), this.visitAttributes(e.attrs, this.attributeBlocks(e.attributeBlocks)), this.buffer('>'), e.code && this.visitCode(e.code), this.visit(e.block, e), !r || e.isInline || !0 === h[e.name] || function (e) {
- return e.block.nodes.every(function e(t) {
- if ('Block' === t.type) return t.nodes.every(e);
- if ('YieldBlock' === t.type) return !0;
- return 'Text' === t.type && !/\n/.test(t.val) || t.isInline
- })
- }(e) || this.prettyIndent(0, !0), this.buffer('</'), s(), this.buffer('>')),
- !0 === h[e.name] && (this.escapePrettyMode = !1),
- this.indents--
- },
- visitInterpolatedTag: function (e) {
- return this.visitTag(e, !0)
- },
- visitText: function (e) {
- this.buffer(e.val)
- },
- visitComment: function (e) {
- e.buffer && (this.pp && this.prettyIndent(1, !0), this.buffer('<!--' + e.val + '-->'))
- },
- visitYieldBlock: function (e) {
- },
- visitBlockComment: function (e) {
- e.buffer && (this.pp && this.prettyIndent(1, !0), this.buffer('<!--' + (e.val || '')), this.visit(e.block, e), this.pp && this.prettyIndent(1, !0), this.buffer('-->'))
- },
- visitCode: function (e) {
- if (e.buffer) {
- var t = e.val.trim();
- t = 'null == (pug_interp = ' + t + ') ? "" : pug_interp',
- !1 !== e.mustEscape && (t = this.runtime('escape') + '(' + t + ')'),
- this.bufferExpression(t)
- } else this.buf.push(e.val);
- e.block && (e.buffer || this.buf.push('{'), this.visit(e.block, e), e.buffer || this.buf.push('}'))
- },
- visitConditional: function (e) {
- var t = e.test;
- this.buf.push('if (' + t + ') {'),
- this.visit(e.consequent, e),
- this.buf.push('}'),
- e.alternate && ('Conditional' === e.alternate.type ? (this.buf.push('else'), this.visitConditional(e.alternate)) : (this.buf.push('else {'), this.visit(e.alternate, e), this.buf.push('}')))
- },
- visitWhile: function (e) {
- var t = e.test;
- this.buf.push('while (' + t + ') {'),
- this.visit(e.block, e),
- this.buf.push('}')
- },
- visitEach: function (e) {
- var t = e.key || 'pug_index' + this.eachCount;
- this.eachCount++,
- this.buf.push('// iterate ' + e.obj + '\n;(function(){\n var $$obj = ' + e.obj + ';\n if (\'number\' == typeof $$obj.length) {'),
- e.alternate && this.buf.push(' if ($$obj.length) {'),
- this.buf.push(' for (var ' + t + ' = 0, $$l = $$obj.length; ' + t + ' < $$l; ' + t + '++) {\n var ' + e.val + ' = $$obj[' + t + '];'),
- this.visit(e.block, e),
- this.buf.push(' }'),
- e.alternate && (this.buf.push(' } else {'), this.visit(e.alternate, e), this.buf.push(' }')),
- this.buf.push(' } else {\n var $$l = 0;\n for (var ' + t + ' in $$obj) {\n $$l++;\n var ' + e.val + ' = $$obj[' + t + '];'),
- this.visit(e.block, e),
- this.buf.push(' }'),
- e.alternate && (this.buf.push(' if ($$l === 0) {'), this.visit(e.alternate, e), this.buf.push(' }')),
- this.buf.push(' }\n}).call(this);\n')
- },
- visitAttributes: function (e, t) {
- if (t.length) {
- if (e.length) {
- var n = this.attrs(e);
- t.unshift(n)
- }
- t.length > 1 ? this.bufferExpression(this.runtime('attrs') + '(' + this.runtime('merge') + '([' + t.join(',') + ']), ' + c(this.terse) + ')') : this.bufferExpression(this.runtime('attrs') + '(' + t[0] + ', ' + c(this.terse) + ')')
- } else e.length && this.attrs(e, !0)
- },
- attrs: function (e, t) {
- var n = a(e, {
- terse: this.terse,
- format: t ? 'html' : 'object',
- runtime: this.runtime.bind(this)
- });
- return t && this.bufferExpression(n),
- n
- },
- attributeBlocks: function (e) {
- return e && e.slice().map(function (e) {
- return e.val
- })
- }
- }
- },
- {
- constantinople: 387,
- doctypes: 228,
- 'js-stringify': 242,
- 'pug-attrs': 382,
- 'pug-error': 388,
- 'pug-runtime': 400,
- 'pug-runtime/build': 399,
- 'void-elements': 429,
- with : 430
- }
- ],
- 386: [
- function (e, t, n) {
- arguments[4][383][0].apply(n, arguments)
- },
- {
- dup: 383
- }
- ],
- 387: [
- function (e, t, n) {
- arguments[4][384][0].apply(n, arguments)
- },
- {
- './binaryOperation': 386,
- 'babel-types': 33,
- babylon: 38,
- dup: 384
- }
- ],
- 388: [
- function (e, t, n) {
- 'use strict';
- t.exports = function (e, t, n) {
- var r,
- i = n.line,
- s = n.column,
- o = n.filename,
- a = n.src,
- u = i + (s ? ':' + s : '');
- if (a && i >= 1 && i <= a.split('\n').length) {
- var l = a.split('\n'),
- c = Math.max(i - 3, 0),
- p = Math.min(l.length, i + 3),
- h = l.slice(c, p).map(function (e, t) {
- var n = t + c + 1,
- r = (n == i ? ' > ' : ' ') + n + '| ',
- o = r + e;
- return n === i && s > 0 && (o += '\n', o += Array(r.length + s).join('-') + '^'),
- o
- }).join('\n');
- r = (o || 'Pug') + ':' + u + '\n' + h + '\n\n' + t
- } else r = (o || 'Pug') + ':' + u + '\n\n' + t;
- var f = new Error(r);
- return f.code = 'PUG:' + e,
- f.msg = t,
- f.line = i,
- f.column = s,
- f.filename = o,
- f.src = a,
- f.toJSON = function () {
- return {
- code: this.code,
- msg: this.msg,
- line: this.line,
- column: this.column,
- filename: this.filename
- }
- },
- f
- }
- },
- {
- }
- ],
- 389: [
- function (e, t, n) {
- 'use strict';
- n.runFilter = e('./lib/run-filter'),
- n.handleFilters = e('./lib/handle-filters')
- },
- {
- './lib/handle-filters': 390,
- './lib/run-filter': 391
- }
- ],
- 390: [
- function (e, t, n) {
- 'use strict';
- var r = e('path').dirname,
- i = e('constantinople'),
- s = e('pug-walk'),
- o = e('pug-error'),
- a = e('./run-filter');
- function u(e, t, n, i) {
- function c(e) {
- var t = e.name;
- if (i && i[t] && (t = i[t], i[t])) throw o('FILTER_ALISE_CHAIN', 'The filter "' + e.name + '" is an alias for "' + t + '", which is an alias for "' + i[t] + '". Pug does not support chains of filter aliases.', e);
- return t
- }
- return n = n || {
- },
- s(e, function (e) {
- var s = e.filename ? r(e.filename) : null;
- if ('Filter' === e.type) {
- !function (e, t, n, r) {
- e.block.nodes[0] && 'Filter' === e.block.nodes[0].type && (e.block.nodes[0] = u(e.block, t, n, r).nodes[0])
- }(e, t, n, i);
- var p = function (e) {
- return e.block.nodes.map(function (e) {
- return e.val
- }).join('')
- }(e);
- (h = l(e, n)).filename = e.filename,
- e.type = 'Text',
- e.val = g(e, p, h)
- } else if ('RawInclude' === e.type && e.filters.length) {
- var h,
- f = e.filters.pop(),
- d = (h = l(f, n)).filename = e.file.fullPath,
- m = e.file.str;
- e.type = 'Text',
- e.val = function (e, n, r, i) {
- var s = c(e);
- return t && t[s] ? t[s](r, i) : g(e, n, i, 'renderFile')
- }(f, d, m, h),
- e.filters.slice().reverse().forEach(function (t) {
- var r = l(t, n);
- r.filename = d,
- e.val = g(t, e.val, r)
- }),
- e.filters = void 0,
- e.file = void 0
- }
- function g(e, n, r, i) {
- try {
- var u = c(e);
- return t && t[u] ? t[u](n, r) : a(u, n, r, s, i)
- } catch (t) {
- if ('UNKNOWN_FILTER' === t.code) throw o(t.code, t.message, e);
- throw t
- }
- }
- }, {
- includeDependencies: !0
- }),
- e
- }
- function l(e, t) {
- var n = {
- };
- e.attrs.forEach(function (t) {
- try {
- n[t.name] = !0 === t.val || i.toConstant(t.val)
- } catch (t) {
- if (/not constant/.test(t.message)) throw o('FILTER_OPTION_NOT_CONSTANT', t.message + ' All filters are rendered compile-time so filter options must be constants.', e);
- throw t
- }
- });
- var r = t[e.name] || {
- };
- return Object.keys(r).forEach(function (e) {
- n.hasOwnProperty(e) || (n[e] = r[e])
- }),
- n
- }
- t.exports = u
- },
- {
- './run-filter': 391,
- constantinople: 393,
- path: 372,
- 'pug-error': 388,
- 'pug-walk': 406
- }
- ],
- 391: [
- function (e, t, n) {
- (function (n) {
- 'use strict';
- var r = e('jstransformer'),
- i = e('uglify-js'),
- s = e('clean-css'),
- o = e('resolve');
- t.exports = function (t, a, u, l, c) {
- var p;
- c = c || 'render';
- try {
- try {
- p = o.sync('jstransformer-' + t, {
- basedir: l || n.cwd()
- })
- } catch (n) {
- p = e.resolve('jstransformer-' + t)
- }
- } catch (e) {
- var h = new Error('unknown filter ":' + t + '"');
- throw h.code = 'UNKNOWN_FILTER',
- h
- }
- var f = r(e(p)),
- d = f[c](a, u, u).body;
- if (u && u.minify) try {
- switch (f.outputFormat) {
- case 'js':
- d = i.minify(d, {
- fromString: !0
- }).code;
- break;
- case 'css':
- d = (new s).minify(d).styles
- }
- } catch (e) {
- }
- return d
- }
- }).call(this, e('_process'))
- },
- {
- _process: 373,
- 'clean-css': 44,
- jstransformer: 243,
- resolve: 41,
- 'uglify-js': 423
- }
- ],
- 392: [
- function (e, t, n) {
- arguments[4][383][0].apply(n, arguments)
- },
- {
- dup: 383
- }
- ],
- 393: [
- function (e, t, n) {
- arguments[4][384][0].apply(n, arguments)
- },
- {
- './binaryOperation': 392,
- 'babel-types': 33,
- babylon: 38,
- dup: 384
- }
- ],
- 394: [
- function (e, t, n) {
- 'use strict';
- var r = e('assert'),
- i = e('is-expression'),
- s = e('character-parser'),
- o = e('pug-error');
- function a(e, t) {
- if (t = t || {
- }, 'string' != typeof e) throw new Error('Expected source code to be a string but got "' + typeof e + '"');
- if ('object' != typeof t) throw new Error('Expected "options" to be an object but got "' + typeof t + '"');
- e = e.replace(/^\uFEFF/, ''),
- this.input = e.replace(/\r\n|\r/g, '\n'),
- this.originalInput = this.input,
- this.filename = t.filename,
- this.interpolated = t.interpolated || !1,
- this.lineno = t.startingLine || 1,
- this.colno = t.startingColumn || 1,
- this.plugins = t.plugins || [
- ],
- this.indentStack = [
- 0
- ],
- this.indentRe = null,
- this.interpolationAllowed = !0,
- this.whitespaceRe = /[ \n\t]/,
- this.tokens = [
- ],
- this.ended = !1
- }
- t.exports = function (e, t) {
- var n = new a(e, t);
- return JSON.parse(JSON.stringify(n.getTokens()))
- },
- t.exports.Lexer = a,
- a.prototype = {
- constructor: a,
- error: function (e, t) {
- throw o(e, t, {
- line: this.lineno,
- column: this.colno,
- filename: this.filename,
- src: this.originalInput
- })
- },
- assert: function (e, t) {
- e || this.error('ASSERT_FAILED', t)
- },
- isExpression: function (e) {
- return i(e, {
- throw : !0
- })
- },
- assertExpression: function (e, t) {
- try {
- return this.callLexerFunction('isExpression', e),
- !0
- } catch (e) {
- if (t) return !1;
- if (!e.loc) throw e;
- this.incrementLine(e.loc.line - 1),
- this.incrementColumn(e.loc.column);
- var n = 'Syntax Error: ' + e.message.replace(/ \([0-9]+:[0-9]+\)$/, '');
- this.error('SYNTAX_ERROR', n)
- }
- },
- assertNestingCorrect: function (e) {
- s(e).isNesting() && this.error('INCORRECT_NESTING', 'Nesting must match on expression `' + e + '`')
- },
- tok: function (e, t) {
- var n = {
- type: e,
- loc: {
- start: {
- line: this.lineno,
- column: this.colno
- },
- filename: this.filename
- }
- };
- return void 0 !== t && (n.val = t),
- n
- },
- tokEnd: function (e) {
- return e.loc.end = {
- line: this.lineno,
- column: this.colno
- },
- e
- },
- incrementLine: function (e) {
- this.lineno += e,
- e && (this.colno = 1)
- },
- incrementColumn: function (e) {
- this.colno += e
- },
- consume: function (e) {
- this.input = this.input.substr(e)
- },
- scan: function (e, t) {
- var n;
- if (n = e.exec(this.input)) {
- var r = n[0].length,
- i = n[1],
- s = r - (i ? i.length : 0),
- o = this.tok(t, i);
- return this.consume(r),
- this.incrementColumn(s),
- o
- }
- },
- scanEndOfLine: function (e, t) {
- var n;
- if (n = e.exec(this.input)) {
- var r,
- i,
- s = 0;
- (r = /^([ ]+)([^ ]*)/.exec(n[0])) && (s = r[1].length, this.incrementColumn(s));
- var o = this.input.substr(n[0].length);
- if (':' === o[0]) return this.input = o,
- i = this.tok(t, n[1]),
- this.incrementColumn(n[0].length - s),
- i;
- if (/^[ \t]*(\n|$)/.test(o)) return this.input = o.substr(/^[ \t]*/.exec(o) [0].length),
- i = this.tok(t, n[1]),
- this.incrementColumn(n[0].length - s),
- i
- }
- },
- bracketExpression: function (e) {
- e = e || 0;
- var t = this.input[e];
- r('(' === t || '{' === t || '[' === t, 'The start character should be "(", "{" or "["');
- var n,
- i = s.BRACKETS[t];
- try {
- n = s.parseUntil(this.input, i, {
- start: e + 1
- })
- } catch (t) {
- if (void 0 !== t.index) {
- for (var o = t.index, a = this.input.substr(e).indexOf('\n'), u = a + e, l = 0; o > u && - 1 !== a; ) this.incrementLine(1),
- o -= u + 1,
- l += u + 1,
- a = u = this.input.substr(l).indexOf('\n');
- this.incrementColumn(o)
- }
- throw 'CHARACTER_PARSER:END_OF_STRING_REACHED' === t.code ? this.error('NO_END_BRACKET', 'The end of the string reached with no closing bracket ' + i + ' found.') : 'CHARACTER_PARSER:MISMATCHED_BRACKET' === t.code && this.error('BRACKET_MISMATCH', t.message),
- t
- }
- return n
- },
- scanIndentation: function () {
- var e,
- t;
- return this.indentRe ? e = this.indentRe.exec(this.input) : ((e = (t = /^\n(\t*) */).exec(this.input)) && !e[1].length && (e = (t = /^\n( *)/).exec(this.input)), e && e[1].length && (this.indentRe = t)),
- e
- },
- eos: function () {
- if (!this.input.length) {
- this.interpolated && this.error('NO_END_BRACKET', 'End of line was reached with no closing bracket for interpolation.');
- for (var e = 0; this.indentStack[e]; e++) this.tokens.push(this.tokEnd(this.tok('outdent')));
- return this.tokens.push(this.tokEnd(this.tok('eos'))),
- this.ended = !0,
- !0
- }
- },
- blank: function () {
- var e;
- if (e = /^\n[ \t]*\n/.exec(this.input)) return this.consume(e[0].length - 1),
- this.incrementLine(1),
- !0
- },
- comment: function () {
- var e;
- if (e = /^\/\/(-)?([^\n]*)/.exec(this.input)) {
- this.consume(e[0].length);
- var t = this.tok('comment', e[2]);
- return t.buffer = '-' != e[1],
- this.interpolationAllowed = t.buffer,
- this.tokens.push(t),
- this.incrementColumn(e[0].length),
- this.tokEnd(t),
- this.callLexerFunction('pipelessText'),
- !0
- }
- },
- interpolation: function () {
- if (/^#\{/.test(this.input)) {
- var e = this.bracketExpression(1);
- this.consume(e.end + 1);
- var t = this.tok('interpolation', e.src);
- this.tokens.push(t),
- this.incrementColumn(2),
- this.assertExpression(e.src);
- var n = e.src.split('\n'),
- r = n.length - 1;
- return this.incrementLine(r),
- this.incrementColumn(n[r].length + 1),
- this.tokEnd(t),
- !0
- }
- },
- tag: function () {
- var e;
- if (e = /^(\w(?:[-:\w]*\w)?)/.exec(this.input)) {
- var t,
- n = e[1],
- r = e[0].length;
- return this.consume(r),
- t = this.tok('tag', n),
- this.tokens.push(t),
- this.incrementColumn(r),
- this.tokEnd(t),
- !0
- }
- },
- filter: function (e) {
- var t = this.scan(/^:([\w\-]+)/, 'filter'),
- n = e && e.inInclude;
- if (t) return this.tokens.push(t),
- this.incrementColumn(t.val.length),
- this.tokEnd(t),
- this.callLexerFunction('attrs'),
- n || (this.interpolationAllowed = !1, this.callLexerFunction('pipelessText')),
- !0
- },
- doctype: function () {
- var e = this.scanEndOfLine(/^doctype *([^\n]*)/, 'doctype');
- if (e) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- id: function () {
- var e = this.scan(/^#([\w-]+)/, 'id');
- if (e) return this.tokens.push(e),
- this.incrementColumn(e.val.length),
- this.tokEnd(e),
- !0;
- /^#/.test(this.input) && this.error('INVALID_ID', '"' + /.[^ \t\(\#\.\:]*/.exec(this.input.substr(1)) [0] + '" is not a valid ID.')
- },
- className: function () {
- var e = this.scan(/^\.([_a-z0-9\-]*[_a-z][_a-z0-9\-]*)/i, 'class');
- if (e) return this.tokens.push(e),
- this.incrementColumn(e.val.length),
- this.tokEnd(e),
- !0;
- /^\.[_a-z0-9\-]+/i.test(this.input) && this.error('INVALID_CLASS_NAME', 'Class names must contain at least one letter or underscore.'),
- /^\./.test(this.input) && this.error('INVALID_CLASS_NAME', '"' + /.[^ \t\(\#\.\:]*/.exec(this.input.substr(1)) [0] + '" is not a valid class name. Class names can only contain "_", "-", a-z and 0-9, and must contain at least one of "_", or a-z')
- },
- endInterpolation: function () {
- if (this.interpolated && ']' === this.input[0]) return this.input = this.input.substr(1),
- this.ended = !0,
- !0
- },
- addText: function (e, t, n, r) {
- var i;
- if (t + n !== '') {
- n = n || '',
- r = r || 0;
- var o = this.interpolated ? t.indexOf(']') : - 1,
- a = this.interpolationAllowed ? t.indexOf('#[') : - 1,
- u = this.interpolationAllowed ? t.indexOf('\\#[') : - 1,
- l = /(\\)?([#!]){((?:.|\n)*)$/.exec(t),
- c = this.interpolationAllowed && l ? l.index : 1 / 0;
- if ( - 1 === o && (o = 1 / 0), - 1 === a && (a = 1 / 0), - 1 === u && (u = 1 / 0), u !== 1 / 0 && u < o && u < a && u < c) return n = n + t.substring(0, u) + '#[',
- this.addText(e, t.substring(u + 3), n, r + 1);
- if (a !== 1 / 0 && a < o && a < u && a < c) {
- i = this.tok(e, n + t.substring(0, a)),
- this.incrementColumn(n.length + a + r),
- this.tokens.push(this.tokEnd(i)),
- i = this.tok('start-pug-interpolation'),
- this.incrementColumn(2),
- this.tokens.push(this.tokEnd(i));
- var p,
- h = new this.constructor(t.substr(a + 2), {
- filename: this.filename,
- interpolated: !0,
- startingLine: this.lineno,
- startingColumn: this.colno
- });
- try {
- p = h.getTokens()
- } catch (e) {
- throw e.code && /^PUG:/.test(e.code) && (this.colno = e.column, this.error(e.code.substr(4), e.msg)),
- e
- }
- return this.colno = h.colno,
- this.tokens = this.tokens.concat(p),
- i = this.tok('end-pug-interpolation'),
- this.incrementColumn(1),
- this.tokens.push(this.tokEnd(i)),
- void this.addText(e, h.input)
- }
- if (o !== 1 / 0 && o < a && o < u && o < c) return n + t.substring(0, o) && this.addText(e, t.substring(0, o), n),
- this.ended = !0,
- void (this.input = t.substr(t.indexOf(']') + 1) + this.input);
- if (c !== 1 / 0) {
- if (l[1]) return n = n + t.substring(0, c) + '#{',
- this.addText(e, t.substring(c + 3), n, r + 1);
- var f = t.substr(0, c);
- (n || f) && (f = n + f, i = this.tok(e, f), this.incrementColumn(f.length + r), this.tokens.push(this.tokEnd(i)));
- var d,
- m = l[3];
- i = this.tok('interpolated-code'),
- this.incrementColumn(2);
- try {
- d = s.parseUntil(m, '}')
- } catch (e) {
- if (void 0 !== e.index && this.incrementColumn(e.index), 'CHARACTER_PARSER:END_OF_STRING_REACHED' === e.code) this.error('NO_END_BRACKET', 'End of line was reached with no closing bracket for interpolation.');
- else {
- if ('CHARACTER_PARSER:MISMATCHED_BRACKET' !== e.code) throw e;
- this.error('BRACKET_MISMATCH', e.message)
- }
- }
- return i.mustEscape = '#' === l[2],
- i.buffer = !0,
- i.val = d.src,
- this.assertExpression(d.src),
- void (d.end + 1 < m.length ? (m = m.substr(d.end + 1), this.incrementColumn(d.end + 1), this.tokens.push(this.tokEnd(i)), this.addText(e, m)) : (this.incrementColumn(m.length), this.tokens.push(this.tokEnd(i))))
- }
- t = n + t,
- i = this.tok(e, t),
- this.incrementColumn(t.length + r),
- this.tokens.push(this.tokEnd(i))
- }
- },
- text: function () {
- var e = this.scan(/^(?:\| ?| )([^\n]+)/, 'text') || this.scan(/^( )/, 'text') || this.scan(/^\|( ?)/, 'text');
- if (e) return this.addText('text', e.val),
- !0
- },
- textHtml: function () {
- var e = this.scan(/^(<[^\n]*)/, 'text-html');
- if (e) return this.addText('text-html', e.val),
- !0
- },
- dot: function () {
- var e;
- if (e = this.scanEndOfLine(/^\./, 'dot')) return this.tokens.push(this.tokEnd(e)),
- this.callLexerFunction('pipelessText'),
- !0
- },
- extends : function () {
- var e = this.scan(/^extends?(?= |$|\n)/, 'extends');
- if (e) return this.tokens.push(this.tokEnd(e)),
- this.callLexerFunction('path') || this.error('NO_EXTENDS_PATH', 'missing path for extends'),
- !0;
- this.scan(/^extends?\b/) && this.error('MALFORMED_EXTENDS', 'malformed extends')
- },
- prepend: function () {
- var e;
- if (e = /^(?:block +)?prepend +([^\n]+)/.exec(this.input)) {
- var t = e[1].trim(),
- n = '';
- if ( - 1 !== t.indexOf('//') && (n = '//' + t.split('//').slice(1).join('//'), t = t.split('//') [0].trim()), !t) return;
- for (var r = this.tok('block', t), i = e[0].length - n.length; this.whitespaceRe.test(this.input.charAt(i - 1)); ) i--;
- return this.incrementColumn(i),
- r.mode = 'prepend',
- this.tokens.push(this.tokEnd(r)),
- this.consume(e[0].length - n.length),
- this.incrementColumn(e[0].length - n.length - i),
- !0
- }
- },
- append: function () {
- var e;
- if (e = /^(?:block +)?append +([^\n]+)/.exec(this.input)) {
- var t = e[1].trim(),
- n = '';
- if ( - 1 !== t.indexOf('//') && (n = '//' + t.split('//').slice(1).join('//'), t = t.split('//') [0].trim()), !t) return;
- for (var r = this.tok('block', t), i = e[0].length - n.length; this.whitespaceRe.test(this.input.charAt(i - 1)); ) i--;
- return this.incrementColumn(i),
- r.mode = 'append',
- this.tokens.push(this.tokEnd(r)),
- this.consume(e[0].length - n.length),
- this.incrementColumn(e[0].length - n.length - i),
- !0
- }
- },
- block: function () {
- var e;
- if (e = /^block +([^\n]+)/.exec(this.input)) {
- var t = e[1].trim(),
- n = '';
- if ( - 1 !== t.indexOf('//') && (n = '//' + t.split('//').slice(1).join('//'), t = t.split('//') [0].trim()), !t) return;
- for (var r = this.tok('block', t), i = e[0].length - n.length; this.whitespaceRe.test(this.input.charAt(i - 1)); ) i--;
- return this.incrementColumn(i),
- r.mode = 'replace',
- this.tokens.push(this.tokEnd(r)),
- this.consume(e[0].length - n.length),
- this.incrementColumn(e[0].length - n.length - i),
- !0
- }
- },
- mixinBlock: function () {
- var e;
- if (e = this.scanEndOfLine(/^block/, 'mixin-block')) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- yield: function () {
- var e = this.scanEndOfLine(/^yield/, 'yield');
- if (e) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- include: function () {
- var e = this.scan(/^include(?=:| |$|\n)/, 'include');
- if (e) {
- for (this.tokens.push(this.tokEnd(e)); this.callLexerFunction('filter', {
- inInclude: !0
- }); );
- return this.callLexerFunction('path') || (/^[^ \n]+/.test(this.input) ? this.fail() : this.error('NO_INCLUDE_PATH', 'missing path for include')),
- !0
- }
- this.scan(/^include\b/) && this.error('MALFORMED_INCLUDE', 'malformed include')
- },
- path: function () {
- var e = this.scanEndOfLine(/^ ([^\n]+)/, 'path');
- if (e && (e.val = e.val.trim())) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- case :
- function () {
- var e = this.scanEndOfLine(/^case +([^\n]+)/, 'case');
- if (e) return this.incrementColumn( - e.val.length),
- this.assertExpression(e.val),
- this.incrementColumn(e.val.length),
- this.tokens.push(this.tokEnd(e)),
- !0;
- this.scan(/^case\b/) && this.error('NO_CASE_EXPRESSION', 'missing expression for case')
- },
- when: function () {
- var e = this.scanEndOfLine(/^when +([^:\n]+)/, 'when');
- if (e) {
- for (var t = s(e.val); t.isNesting() || t.isString(); ) {
- var n = /:([^:\n]+)/.exec(this.input);
- if (!n) break;
- e.val += n[0],
- this.consume(n[0].length),
- this.incrementColumn(n[0].length),
- t = s(e.val)
- }
- return this.incrementColumn( - e.val.length),
- this.assertExpression(e.val),
- this.incrementColumn(e.val.length),
- this.tokens.push(this.tokEnd(e)),
- !0
- }
- this.scan(/^when\b/) && this.error('NO_WHEN_EXPRESSION', 'missing expression for when')
- },
- default:
- function () {
- var e = this.scanEndOfLine(/^default/, 'default');
- if (e) return this.tokens.push(this.tokEnd(e)),
- !0;
- this.scan(/^default\b/) && this.error('DEFAULT_WITH_EXPRESSION', 'default should not have an expression')
- },
- call: function () {
- var e,
- t,
- n;
- if (t = /^\+(\s*)(([-\w]+)|(#\{))/.exec(this.input)) {
- if (t[3]) n = t[0].length,
- this.consume(n),
- e = this.tok('call', t[3]);
- else {
- var r = this.bracketExpression(2 + t[1].length);
- n = r.end + 1,
- this.consume(n),
- this.assertExpression(r.src),
- e = this.tok('call', '#{' + r.src + '}')
- }
- if (this.incrementColumn(n), e.args = null, t = /^ *\(/.exec(this.input)) {
- var i = this.bracketExpression(t[0].length - 1);
- if (!/^\s*[-\w]+ *=/.test(i.src)) {
- this.incrementColumn(1),
- this.consume(i.end + 1),
- e.args = i.src,
- this.assertExpression('[' + e.args + ']');
- for (var s = 0; s <= e.args.length; s++) '\n' === e.args[s] ? this.incrementLine(1) : this.incrementColumn(1)
- }
- }
- return this.tokens.push(this.tokEnd(e)),
- !0
- }
- },
- mixin: function () {
- var e;
- if (e = /^mixin +([-\w]+)(?: *\((.*)\))? */.exec(this.input)) {
- this.consume(e[0].length);
- var t = this.tok('mixin', e[1]);
- return t.args = e[2] || null,
- this.incrementColumn(e[0].length),
- this.tokens.push(this.tokEnd(t)),
- !0
- }
- },
- conditional: function () {
- var e;
- if (e = /^(if|unless|else if|else)\b([^\n]*)/.exec(this.input)) {
- this.consume(e[0].length);
- var t = e[1].replace(/ /g, '-'),
- n = e[2] && e[2].trim(),
- r = this.tok(t, n);
- switch (this.incrementColumn(e[0].length - n.length), t) {
- case 'if':
- case 'else-if':
- this.assertExpression(n);
- break;
- case 'unless':
- this.assertExpression(n),
- r.val = '!(' + n + ')',
- r.type = 'if';
- break;
- case 'else':
- n && this.error('ELSE_CONDITION', '`else` cannot have a condition, perhaps you meant `else if`')
- }
- return this.incrementColumn(n.length),
- this.tokens.push(this.tokEnd(r)),
- !0
- }
- },
- while : function () {
- var e,
- t;
- if (e = /^while +([^\n]+)/.exec(this.input)) return this.consume(e[0].length),
- this.assertExpression(e[1]),
- t = this.tok('while', e[1]),
- this.incrementColumn(e[0].length),
- this.tokens.push(this.tokEnd(t)),
- !0;
- this.scan(/^while\b/) && this.error('NO_WHILE_EXPRESSION', 'missing expression for while')
- },
- each: function () {
- var e;
- if (e = /^(?:each|for) +([a-zA-Z_$][\w$]*)(?: *, *([a-zA-Z_$][\w$]*))? * in *([^\n]+)/.exec(this.input)) {
- this.consume(e[0].length);
- var t = this.tok('each', e[1]);
- return t.key = e[2] || null,
- this.incrementColumn(e[0].length - e[3].length),
- this.assertExpression(e[3]),
- t.code = e[3],
- this.incrementColumn(e[3].length),
- this.tokens.push(this.tokEnd(t)),
- !0
- }
- this.scan(/^(?:each|for)\b/) && this.error('MALFORMED_EACH', 'malformed each'),
- (e = /^- *(?:each|for) +([a-zA-Z_$][\w$]*)(?: *, *([a-zA-Z_$][\w$]*))? +in +([^\n]+)/.exec(this.input)) && this.error('MALFORMED_EACH', 'Pug each and for should no longer be prefixed with a dash ("-"). They are pug keywords and not part of JavaScript.')
- },
- code: function () {
- var e;
- if (e = /^(!?=|-)[ \t]*([^\n]+)/.exec(this.input)) {
- var t = e[1],
- n = e[2],
- r = 0;
- if (this.interpolated) {
- var i;
- try {
- i = s.parseUntil(n, ']')
- } catch (t) {
- if (void 0 !== t.index && this.incrementColumn(e[0].length - n.length + t.index), 'CHARACTER_PARSER:END_OF_STRING_REACHED' === t.code) this.error('NO_END_BRACKET', 'End of line was reached with no closing bracket for interpolation.');
- else {
- if ('CHARACTER_PARSER:MISMATCHED_BRACKET' !== t.code) throw t;
- this.error('BRACKET_MISMATCH', t.message)
- }
- }
- r = n.length - i.end,
- n = i.src
- }
- var o = e[0].length - r;
- this.consume(o);
- var a = this.tok('code', n);
- return a.mustEscape = '=' === t.charAt(0),
- a.buffer = '=' === t.charAt(0) || '=' === t.charAt(1),
- this.incrementColumn(e[0].length - e[2].length),
- a.buffer && this.assertExpression(n),
- this.tokens.push(a),
- this.incrementColumn(n.length),
- this.tokEnd(a),
- !0
- }
- },
- blockCode: function () {
- var e;
- if (e = this.scanEndOfLine(/^-/, 'blockcode')) return this.tokens.push(this.tokEnd(e)),
- this.interpolationAllowed = !1,
- this.callLexerFunction('pipelessText'),
- !0
- },
- attribute: function (e) {
- var t,
- n = '',
- r = '';
- for (t = 0; t < e.length && this.whitespaceRe.test(e[t]); t++) '\n' === e[t] ? this.incrementLine(1) : this.incrementColumn(1);
- if (t === e.length) return '';
- var i = this.tok('attribute');
- for (/['"]/.test(e[t]) && (n = e[t], this.incrementColumn(1), t++); t < e.length; t++) {
- if (n) {
- if (e[t] === n) {
- this.incrementColumn(1),
- t++;
- break
- }
- } else if (this.whitespaceRe.test(e[t]) || '!' === e[t] || '=' === e[t] || ',' === e[t]) break;
- r += e[t],
- '\n' === e[t] ? this.incrementLine(1) : this.incrementColumn(1)
- }
- i.name = r;
- var s = this.attributeValue(e.substr(t));
- for (s.val ? (i.val = s.val, i.mustEscape = s.mustEscape) : (i.val = !0, i.mustEscape = !0), e = s.remainingSource, this.tokens.push(this.tokEnd(i)), t = 0; t < e.length && this.whitespaceRe.test(e[t]); t++) '\n' === e[t] ? this.incrementLine(1) : this.incrementColumn(1);
- return ',' === e[t] && (this.incrementColumn(1), t++),
- e.substr(t)
- },
- attributeValue: function (e) {
- var t,
- n,
- r,
- i = /['"]/,
- o = '',
- a = !0,
- u = s.defaultState(),
- l = this.colno,
- c = this.lineno;
- for (n = 0; n < e.length && this.whitespaceRe.test(e[n]); n++) '\n' === e[n] ? (c++, l = 1) : l++;
- if (n === e.length) return {
- remainingSource: e
- };
- if ('!' === e[n] && (a = !1, l++, '=' !== e[++n] && this.error('INVALID_KEY_CHARACTER', 'Unexpected character ' + e[n] + ' expected `=`')), '=' !== e[n]) {
- if (0 !== n || !e || this.whitespaceRe.test(e[0]) || ',' === e[0]) return {
- remainingSource: e
- };
- this.error('INVALID_KEY_CHARACTER', 'Unexpected character ' + e[0] + ' expected `=`')
- }
- for (this.lineno = c, this.colno = l + 1, n++; n < e.length && this.whitespaceRe.test(e[n]); n++) '\n' === e[n] ? this.incrementLine(1) : this.incrementColumn(1);
- for (c = this.lineno, l = this.colno; n < e.length; n++) {
- if (!u.isNesting() && !u.isString()) {
- if (this.whitespaceRe.test(e[n])) {
- for (t = !1, r = n; r < e.length; r++) if (!this.whitespaceRe.test(e[r])) {
- const n = !s.isPunctuator(e[r]),
- a = i.test(e[r]),
- u = ':' === e[r],
- l = e[r] + e[r + 1] + e[r + 2] === '...';
- (n || a || u || l) && this.assertExpression(o, !0) && (t = !0);
- break
- }
- if (t || r === e.length) break
- }
- if (',' === e[n] && this.assertExpression(o, !0)) break
- }
- u = s.parseChar(e[n], u),
- o += e[n],
- '\n' === e[n] ? (c++, l = 1) : l++
- }
- return this.assertExpression(o),
- this.lineno = c,
- this.colno = l,
- {
- val: o,
- mustEscape: a,
- remainingSource: e.substr(n)
- }
- },
- attrs: function () {
- var e;
- if ('(' == this.input.charAt(0)) {
- e = this.tok('start-attributes');
- var t = this.bracketExpression().end,
- n = this.input.substr(1, t - 1);
- for (this.incrementColumn(1), this.tokens.push(this.tokEnd(e)), this.assertNestingCorrect(n), this.consume(t + 1); n; ) n = this.attribute(n);
- return e = this.tok('end-attributes'),
- this.incrementColumn(1),
- this.tokens.push(this.tokEnd(e)),
- !0
- }
- },
- attributesBlock: function () {
- if (/^&attributes\b/.test(this.input)) {
- var e = 11;
- this.consume(e);
- var t = this.tok('&attributes');
- this.incrementColumn(e);
- var n = this.bracketExpression();
- return e = n.end + 1,
- this.consume(e),
- t.val = n.src,
- this.incrementColumn(e),
- this.tokens.push(this.tokEnd(t)),
- !0
- }
- },
- indent: function () {
- var e,
- t = this.scanIndentation();
- if (t) {
- var n = t[1].length;
- if (this.incrementLine(1), this.consume(n + 1), ' ' != this.input[0] && '\t' != this.input[0] || this.error('INVALID_INDENTATION', 'Invalid indentation, you can use tabs or spaces but not both'), '\n' == this.input[0]) return this.interpolationAllowed = !0,
- this.tokEnd(this.tok('newline'));
- if (n < this.indentStack[0]) {
- for (var r = 0; this.indentStack[0] > n; ) this.indentStack[1] < n && this.error('INCONSISTENT_INDENTATION', 'Inconsistent indentation. Expecting either ' + this.indentStack[1] + ' or ' + this.indentStack[0] + ' spaces/tabs.'),
- r++,
- this.indentStack.shift();
- for (; r--; ) this.colno = 1,
- e = this.tok('outdent'),
- this.colno = this.indentStack[0] + 1,
- this.tokens.push(this.tokEnd(e))
- } else n && n != this.indentStack[0] ? (e = this.tok('indent', n), this.colno = 1 + n, this.tokens.push(this.tokEnd(e)), this.indentStack.unshift(n)) : (e = this.tok('newline'), this.colno = 1 + Math.min(this.indentStack[0] || 0, n), this.tokens.push(this.tokEnd(e)));
- return this.interpolationAllowed = !0,
- !0
- }
- },
- pipelessText: function e(t) {
- for (; this.callLexerFunction('blank'); );
- var n = this.scanIndentation();
- if ((t = t || n && n[1].length) > this.indentStack[0]) {
- this.tokens.push(this.tokEnd(this.tok('start-pipeless-text')));
- var r,
- i = [
- ],
- s = [
- ],
- o = 0;
- do {
- var a = this.input.substr(o + 1).indexOf('\n');
- - 1 == a && (a = this.input.length - o - 1);
- var u = this.input.substr(o + 1, a),
- l = this.indentRe.exec('\n' + u),
- c = l && l[1].length;
- if (r = c >= t, s.push(r), r = r || !u.trim()) o += u.length + 1,
- i.push(u.substr(t));
- else if (c > this.indentStack[0]) return this.tokens.pop(),
- e.call(this, l[1].length)
- } while (this.input.length - o && r);
- for (this.consume(o); 0 === this.input.length && '' === i[i.length - 1]; ) i.pop();
- return i.forEach(function (e, n) {
- var r;
- this.incrementLine(1),
- 0 !== n && (r = this.tok('newline')),
- s[n] && this.incrementColumn(t),
- r && this.tokens.push(this.tokEnd(r)),
- this.addText('text', e)
- }.bind(this)),
- this.tokens.push(this.tokEnd(this.tok('end-pipeless-text'))),
- !0
- }
- },
- slash: function () {
- var e = this.scan(/^\//, 'slash');
- if (e) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- colon: function () {
- var e = this.scan(/^: +/, ':');
- if (e) return this.tokens.push(this.tokEnd(e)),
- !0
- },
- fail: function () {
- this.error('UNEXPECTED_TEXT', 'unexpected text "' + this.input.substr(0, 5) + '"')
- },
- callLexerFunction: function (e) {
- for (var t = [
- ], n = 1; n < arguments.length; n++) t.push(arguments[n]);
- var r = [
- this
- ].concat(t);
- for (n = 0; n < this.plugins.length; n++) {
- var i = this.plugins[n];
- if (i[e] && i[e].apply(i, r)) return !0
- }
- return this[e].apply(this, t)
- },
- advance: function () {
- return this.callLexerFunction('blank') || this.callLexerFunction('eos') || this.callLexerFunction('endInterpolation') || this.callLexerFunction('yield') || this.callLexerFunction('doctype') || this.callLexerFunction('interpolation') || this.callLexerFunction('case') || this.callLexerFunction('when') || this.callLexerFunction('default') || this.callLexerFunction('extends') || this.callLexerFunction('append') || this.callLexerFunction('prepend') || this.callLexerFunction('block') || this.callLexerFunction('mixinBlock') || this.callLexerFunction('include') || this.callLexerFunction('mixin') || this.callLexerFunction('call') || this.callLexerFunction('conditional') || this.callLexerFunction('each') || this.callLexerFunction('while') || this.callLexerFunction('tag') || this.callLexerFunction('filter') || this.callLexerFunction('blockCode') || this.callLexerFunction('code') || this.callLexerFunction('id') || this.callLexerFunction('dot') || this.callLexerFunction('className') || this.callLexerFunction('attrs') || this.callLexerFunction('attributesBlock') || this.callLexerFunction('indent') || this.callLexerFunction('text') || this.callLexerFunction('textHtml') || this.callLexerFunction('comment') || this.callLexerFunction('slash') || this.callLexerFunction('colon') || this.fail()
- },
- getTokens: function () {
- for (; !this.ended; ) this.callLexerFunction('advance');
- return this.tokens
- }
- }
- },
- {
- assert: 8,
- 'character-parser': 43,
- 'is-expression': 238,
- 'pug-error': 388
- }
- ],
- 395: [
- function (e, t, n) {
- 'use strict';
- var r = e('assert'),
- i = e('pug-walk');
- function s() {
- throw e('pug-error').apply(null, arguments)
- }
- function o(e) {
- r('Block' === e.type, 'The top level element should always be a block');
- var t = null;
- if (e.nodes.length) {
- var n = 'Extends' === e.nodes[0].type;
- !function (e, t) {
- var n = !1;
- i(e, function (e) {
- 'Extends' === e.type && (t && !n ? n = !0 : s('EXTENDS_NOT_FIRST', 'Declaration of template inheritance ("extends") should be the first thing in the file. There can only be one extends statement per file.', e))
- })
- }(e, n),
- n && (t = e.nodes.shift())
- }
- if ((e = function (e, t) {
- return i(e, function (e, t) {
- 'RawInclude' === e.type && t({
- type: 'Text',
- val: e.file.str.replace(/\r/g, '')
- })
- }, function (e, t) {
- if ('Include' === e.type) {
- var n = o(e.file.ast);
- n.hasExtends && (n = i(n, function (e, t) {
- 'NamedBlock' === e.type && t({
- type: 'Block',
- nodes: e.nodes
- })
- })),
- t(function (e, t) {
- if (!t || !t.nodes.length) return e;
- var n = !1;
- e = i(e, null, function (e, r) {
- 'YieldBlock' === e.type && (n = !0, e.type = 'Block', e.nodes = [
- t
- ])
- }),
- n || function e(t) {
- var n = t;
- for (var r = 0; r < t.nodes.length; r++) t.nodes[r].textOnly || ('Block' === t.nodes[r].type ? n = e(t.nodes[r]) : t.nodes[r].block && t.nodes[r].block.nodes.length && (n = e(t.nodes[r].block)));
- return n
- }(e).nodes.push(t);
- return e
- }(n, e.block))
- }
- })
- }(e)).declaredBlocks = function (e) {
- var t = {
- };
- return i(e, function (e) {
- 'NamedBlock' === e.type && 'replace' === e.mode && (t[e.name] = t[e.name] || [
- ], t[e.name].push(e))
- }),
- t
- }(e), t) {
- var a = [
- ],
- u = [
- ];
- e.nodes.forEach(function e(t) {
- 'NamedBlock' === t.type ? u.push(t) : 'Block' === t.type ? t.nodes.forEach(e) : 'Mixin' === t.type && !1 === t.call ? a.push(t) : s('UNEXPECTED_NODES_IN_EXTENDING_ROOT', 'Only named blocks and mixins can appear at the top level of an extending template', t)
- });
- var l = o(t.file.ast);
- !function (e, t) {
- var n = {
- };
- i(t, function (t) {
- if ('NamedBlock' === t.type) {
- if (n[t.name] === t.name) return t.ignore = !0;
- n[t.name] = t.name;
- var r = e[t.name] ? function e(t, n) {
- n = n || [
- ];
- t.forEach(function (t) {
- t.parents && e(t.parents, n),
- n.push(t)
- });
- return n
- }(e[t.name]) : [
- ];
- r.length && (t.parents = r, r.forEach(function (e) {
- switch (t.mode) {
- case 'append':
- e.nodes = e.nodes.concat(t.nodes);
- break;
- case 'prepend':
- e.nodes = t.nodes.concat(e.nodes);
- break;
- case 'replace':
- e.nodes = t.nodes
- }
- }))
- }
- }, function (e) {
- 'NamedBlock' !== e.type || e.ignore || delete n[e.name]
- })
- }(l.declaredBlocks, e);
- var c = [
- ];
- return i(l, function (e) {
- 'NamedBlock' === e.type && c.push(e.name)
- }),
- u.forEach(function (e) {
- - 1 === c.indexOf(e.name) && s('UNEXPECTED_BLOCK', 'Unexpected block ' + e.name, e)
- }),
- Object.keys(e.declaredBlocks).forEach(function (t) {
- l.declaredBlocks[t] = e.declaredBlocks[t]
- }),
- l.nodes = a.concat(l.nodes),
- l.hasExtends = !0,
- l
- }
- return e
- }
- t.exports = o
- },
- {
- assert: 8,
- 'pug-error': 388,
- 'pug-walk': 406
- }
- ],
- 396: [
- function (e, t, n) {
- 'use strict';
- var r = e('fs'),
- i = e('path'),
- s = e('pug-walk'),
- o = e('object-assign');
- function a(e, t) {
- return t = u(t),
- e = JSON.parse(JSON.stringify(e)),
- s(e, function (e) {
- if (void 0 === e.str && ('Include' === e.type || 'RawInclude' === e.type || 'Extends' === e.type)) {
- var n,
- r,
- i = e.file;
- if ('FileReference' !== i.type) throw new Error('Expected file.type to be "FileReference"');
- try {
- n = t.resolve(i.path, i.filename, t),
- i.fullPath = n,
- r = t.read(n, t)
- } catch (t) {
- throw t.message += '\n at ' + e.filename + ' line ' + e.line,
- t
- }
- i.str = r,
- 'Extends' !== e.type && 'Include' !== e.type || (i.ast = a.string(r, o({
- }, t, {
- filename: n
- })))
- }
- })
- }
- function u(e) {
- return a.validateOptions(e),
- o({
- resolve: a.resolve,
- read: a.read
- }, e)
- }
- t.exports = a,
- a.string = function (e, t) {
- var n = (t = o(u(t), {
- src: e
- })).lex(e, t);
- return a(t.parse(n, t), t)
- },
- a.file = function (e, t) {
- var n = (t = o(u(t), {
- filename: e
- })).read(e);
- return a.string(n, t)
- },
- a.resolve = function (e, t, n) {
- if ('/' !== (e = e.trim()) [0] && !t) throw new Error('the "filename" option is required to use includes and extends with "relative" paths');
- if ('/' === e[0] && !n.basedir) throw new Error('the "basedir" option is required to use includes and extends with "absolute" paths');
- return e = i.join('/' === e[0] ? n.basedir : i.dirname(t.trim()), e)
- },
- a.read = function (e, t) {
- return r.readFileSync(e, 'utf8')
- },
- a.validateOptions = function (e) {
- if ('object' != typeof e) throw new TypeError('options must be an object');
- if ('function' != typeof e.lex) throw new TypeError('options.lex must be a function');
- if ('function' != typeof e.parse) throw new TypeError('options.parse must be a function');
- if (e.resolve && 'function' != typeof e.resolve) throw new TypeError('options.resolve must be a function');
- if (e.read && 'function' != typeof e.read) throw new TypeError('options.read must be a function')
- }
- },
- {
- fs: 41,
- 'object-assign': 370,
- path: 372,
- 'pug-walk': 406
- }
- ],
- 397: [
- function (e, t, n) {
- 'use strict';
- var r = e('assert'),
- i = e('token-stream'),
- s = e('pug-error'),
- o = e('./lib/inline-tags');
- function a(e, t) {
- if (t = t || {
- }, !Array.isArray(e)) throw new Error('Expected tokens to be an Array but got "' + typeof e + '"');
- if ('object' != typeof t) throw new Error('Expected "options" to be an object but got "' + typeof t + '"');
- this.tokens = new i(e),
- this.filename = t.filename,
- this.src = t.src,
- this.inMixin = 0,
- this.plugins = t.plugins || [
- ]
- }
- t.exports = function (e, t) {
- var n = new a(e, t).parse();
- return JSON.parse(JSON.stringify(n))
- },
- t.exports.Parser = a,
- a.prototype = {
- constructor: a,
- error: function (e, t, n) {
- throw s(e, t, {
- line: n.loc.start.line,
- column: n.loc.start.column,
- filename: this.filename,
- src: this.src
- })
- },
- advance: function () {
- return this.tokens.advance()
- },
- peek: function () {
- return this.tokens.peek()
- },
- lookahead: function (e) {
- return this.tokens.lookahead(e)
- },
- parse: function () {
- for (var e = this.emptyBlock(0); 'eos' != this.peek().type; ) if ('newline' == this.peek().type) this.advance();
- else if ('text-html' == this.peek().type) e.nodes = e.nodes.concat(this.parseTextHtml());
- else {
- var t = this.parseExpr();
- t && ('Block' === t.type ? e.nodes = e.nodes.concat(t.nodes) : e.nodes.push(t))
- }
- return e
- },
- expect: function (e) {
- if (this.peek().type === e) return this.advance();
- this.error('INVALID_TOKEN', 'expected "' + e + '", but got "' + this.peek().type + '"', this.peek())
- },
- accept: function (e) {
- if (this.peek().type === e) return this.advance()
- },
- initBlock: function (e, t) {
- if ((0 | e) !== e) throw new Error('`line` is not an integer');
- if (!Array.isArray(t)) throw new Error('`nodes` is not an array');
- return {
- type: 'Block',
- nodes: t,
- line: e,
- filename: this.filename
- }
- },
- emptyBlock: function (e) {
- return this.initBlock(e, [
- ])
- },
- runPlugin: function (e, t) {
- for (var n, r = [
- this
- ], i = 2; i < arguments.length; i++) r.push(arguments[i]);
- for (i = 0; i < this.plugins.length; i++) {
- var s = this.plugins[i];
- if (s[e] && s[e][t.type]) {
- if (n) throw new Error('Multiple plugin handlers found for context ' + JSON.stringify(e) + ', token type ' + JSON.stringify(t.type));
- n = s[e]
- }
- }
- if (n) return n[t.type].apply(n, r)
- },
- parseExpr: function () {
- switch (this.peek().type) {
- case 'tag':
- return this.parseTag();
- case 'mixin':
- return this.parseMixin();
- case 'block':
- return this.parseBlock();
- case 'mixin-block':
- return this.parseMixinBlock();
- case 'case':
- return this.parseCase();
- case 'extends':
- return this.parseExtends();
- case 'include':
- return this.parseInclude();
- case 'doctype':
- return this.parseDoctype();
- case 'filter':
- return this.parseFilter();
- case 'comment':
- return this.parseComment();
- case 'text':
- case 'interpolated-code':
- case 'start-pug-interpolation':
- return this.parseText({
- block: !0
- });
- case 'text-html':
- return this.initBlock(this.peek().loc.start.line, this.parseTextHtml());
- case 'dot':
- return this.parseDot();
- case 'each':
- return this.parseEach();
- case 'code':
- return this.parseCode();
- case 'blockcode':
- return this.parseBlockCode();
- case 'if':
- return this.parseConditional();
- case 'while':
- return this.parseWhile();
- case 'call':
- return this.parseCall();
- case 'interpolation':
- return this.parseInterpolation();
- case 'yield':
- return this.parseYield();
- case 'id':
- case 'class':
- return this.peek().loc.start,
- this.tokens.defer({
- type: 'tag',
- val: 'div',
- loc: this.peek().loc,
- filename: this.filename
- }),
- this.parseExpr();
- default:
- var e = this.runPlugin('expressionTokens', this.peek());
- if (e) return e;
- this.error('INVALID_TOKEN', 'unexpected token "' + this.peek().type + '"', this.peek())
- }
- },
- parseDot: function () {
- return this.advance(),
- this.parseTextBlock()
- },
- parseText: function (e) {
- var t = [
- ],
- n = this.peek().loc.start.line,
- r = this.peek();
- e: for (; ; ) {
- switch (r.type) {
- case 'text':
- var i = this.advance();
- t.push({
- type: 'Text',
- val: i.val,
- line: i.loc.start.line,
- column: i.loc.start.column,
- filename: this.filename
- });
- break;
- case 'interpolated-code':
- i = this.advance();
- t.push({
- type: 'Code',
- val: i.val,
- buffer: i.buffer,
- mustEscape: !1 !== i.mustEscape,
- isInline: !0,
- line: i.loc.start.line,
- column: i.loc.start.column,
- filename: this.filename
- });
- break;
- case 'newline':
- if (!e || !e.block) break e;
- i = this.advance();
- var s = this.peek().type;
- 'text' !== s && 'interpolated-code' !== s || t.push({
- type: 'Text',
- val: '\n',
- line: i.loc.start.line,
- column: i.loc.start.column,
- filename: this.filename
- });
- break;
- case 'start-pug-interpolation':
- this.advance(),
- t.push(this.parseExpr()),
- this.expect('end-pug-interpolation');
- break;
- default:
- if (this.runPlugin('textTokens', r, t)) break;
- break e
- }
- r = this.peek()
- }
- return 1 === t.length ? t[0] : this.initBlock(n, t)
- },
- parseTextHtml: function () {
- var e = [
- ],
- t = null;
- e: for (; ; ) switch (this.peek().type) {
- case 'text-html':
- var n = this.advance();
- t ? t.val += '\n' + n.val : (t = {
- type: 'Text',
- val: n.val,
- filename: this.filename,
- line: n.loc.start.line,
- column: n.loc.start.column,
- isHtml: !0
- }, e.push(t));
- break;
- case 'indent':
- this.block().nodes.forEach(function (n) {
- n.isHtml ? t ? t.val += '\n' + n.val : (t = n, e.push(t)) : (t = null, e.push(n))
- });
- break;
- case 'code':
- t = null,
- e.push(this.parseCode(!0));
- break;
- case 'newline':
- this.advance();
- break;
- default:
- break e
- }
- return e
- },
- parseBlockExpansion: function () {
- var e = this.accept(':');
- if (e) {
- var t = this.parseExpr();
- return 'Block' === t.type ? t : this.initBlock(e.loc.start.line, [
- t
- ])
- }
- return this.block()
- },
- parseCase: function () {
- var e = this.expect('case'),
- t = {
- type: 'Case',
- expr: e.val,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- },
- n = this.emptyBlock(e.loc.start.line + 1);
- for (this.expect('indent'); 'outdent' != this.peek().type; ) switch (this.peek().type) {
- case 'comment':
- case 'newline':
- this.advance();
- break;
- case 'when':
- n.nodes.push(this.parseWhen());
- break;
- case 'default':
- n.nodes.push(this.parseDefault());
- break;
- default:
- if (this.runPlugin('caseTokens', this.peek(), n)) break;
- this.error('INVALID_TOKEN', 'Unexpected token "' + this.peek().type + '", expected "when", "default" or "newline"', this.peek())
- }
- return this.expect('outdent'),
- t.block = n,
- t
- },
- parseWhen: function () {
- var e = this.expect('when');
- return 'newline' !== this.peek().type ? {
- type: 'When',
- expr: e.val,
- block: this.parseBlockExpansion(),
- debug: !1,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- : {
- type: 'When',
- expr: e.val,
- debug: !1,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseDefault: function () {
- var e = this.expect('default');
- return {
- type: 'When',
- expr: 'default',
- block: this.parseBlockExpansion(),
- debug: !1,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseCode: function (e) {
- var t = this.expect('code');
- r('boolean' == typeof t.mustEscape, 'Please update to the newest version of pug-lexer.');
- var n = {
- type: 'Code',
- val: t.val,
- buffer: t.buffer,
- mustEscape: !1 !== t.mustEscape,
- isInline: !!e,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- };
- return n.val.match(/^ *else/) && (n.debug = !1),
- e ? n : ('indent' == this.peek().type && (t.buffer && this.error('BLOCK_IN_BUFFERED_CODE', 'Buffered code cannot have a block attached to it', this.peek()), n.block = this.block()), n)
- },
- parseConditional: function () {
- var e = this.expect('if'),
- t = {
- type: 'Conditional',
- test: e.val,
- consequent: this.emptyBlock(e.loc.start.line),
- alternate: null,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- 'indent' == this.peek().type && (t.consequent = this.block());
- for (var n = t; ; ) if ('newline' === this.peek().type) this.expect('newline');
- else {
- if ('else-if' !== this.peek().type) {
- if ('else' === this.peek().type) {
- this.expect('else'),
- 'indent' === this.peek().type && (n.alternate = this.block());
- break
- }
- break
- }
- e = this.expect('else-if'),
- n = n.alternate = {
- type: 'Conditional',
- test: e.val,
- consequent: this.emptyBlock(e.loc.start.line),
- alternate: null,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- },
- 'indent' == this.peek().type && (n.consequent = this.block())
- }
- return t
- },
- parseWhile: function () {
- var e = this.expect('while'),
- t = {
- type: 'While',
- test: e.val,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return 'indent' == this.peek().type ? t.block = this.block() : t.block = this.emptyBlock(e.loc.start.line),
- t
- },
- parseBlockCode: function () {
- var e = this.expect('blockcode'),
- t = e.loc.start.line,
- n = e.loc.start.column,
- r = '';
- if ('start-pipeless-text' === this.peek().type) {
- for (this.advance(); 'end-pipeless-text' !== this.peek().type; ) switch ((e = this.advance()).type) {
- case 'text':
- r += e.val;
- break;
- case 'newline':
- r += '\n';
- break;
- default:
- var i = this.runPlugin('blockCodeTokens', e, e);
- if (i) {
- r += i;
- break
- }
- this.error('INVALID_TOKEN', 'Unexpected token type: ' + e.type, e)
- }
- this.advance()
- }
- return {
- type: 'Code',
- val: r,
- buffer: !1,
- mustEscape: !1,
- isInline: !1,
- line: t,
- column: n,
- filename: this.filename
- }
- },
- parseComment: function () {
- var e,
- t = this.expect('comment');
- return (e = this.parseTextBlock()) ? {
- type: 'BlockComment',
- val: t.val,
- block: e,
- buffer: t.buffer,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- }
- : {
- type: 'Comment',
- val: t.val,
- buffer: t.buffer,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- }
- },
- parseDoctype: function () {
- var e = this.expect('doctype');
- return {
- type: 'Doctype',
- val: e.val,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseIncludeFilter: function () {
- var e = this.expect('filter'),
- t = [
- ];
- return 'start-attributes' === this.peek().type && (t = this.attrs()),
- {
- type: 'IncludeFilter',
- name: e.val,
- attrs: t,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseFilter: function () {
- var e,
- t = this.expect('filter'),
- n = [
- ];
- if ('start-attributes' === this.peek().type && (n = this.attrs()), 'text' === this.peek().type) {
- var r = this.advance();
- e = this.initBlock(r.loc.start.line, [
- {
- type: 'Text',
- val: r.val,
- line: r.loc.start.line,
- column: r.loc.start.column,
- filename: this.filename
- }
- ])
- } else e = 'filter' === this.peek().type ? this.initBlock(t.loc.start.line, [
- this.parseFilter()
- ]) : this.parseTextBlock() || this.emptyBlock(t.loc.start.line);
- return {
- type: 'Filter',
- name: t.val,
- block: e,
- attrs: n,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- }
- },
- parseEach: function () {
- var e = this.expect('each'),
- t = {
- type: 'Each',
- obj: e.code,
- val: e.val,
- key: e.key,
- block: this.block(),
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return 'else' == this.peek().type && (this.advance(), t.alternate = this.block()),
- t
- },
- parseExtends: function () {
- var e = this.expect('extends'),
- t = this.expect('path');
- return {
- type: 'Extends',
- file: {
- type: 'FileReference',
- path: t.val.trim(),
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- },
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseBlock: function () {
- var e = this.expect('block'),
- t = 'indent' == this.peek().type ? this.block() : this.emptyBlock(e.loc.start.line);
- return t.type = 'NamedBlock',
- t.name = e.val.trim(),
- t.mode = e.mode,
- t.line = e.loc.start.line,
- t.column = e.loc.start.column,
- t
- },
- parseMixinBlock: function () {
- var e = this.expect('mixin-block');
- return this.inMixin || this.error('BLOCK_OUTISDE_MIXIN', 'Anonymous blocks are not allowed unless they are part of a mixin.', e),
- {
- type: 'MixinBlock',
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseYield: function () {
- var e = this.expect('yield');
- return {
- type: 'YieldBlock',
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }
- },
- parseInclude: function () {
- for (var e = this.expect('include'), t = {
- type: 'Include',
- file: {
- type: 'FileReference',
- filename: this.filename
- },
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- }, n = [
- ]; 'filter' === this.peek().type; ) n.push(this.parseIncludeFilter());
- var r = this.expect('path');
- return t.file.path = r.val.trim(),
- t.file.line = r.loc.start.line,
- t.file.column = r.loc.start.column,
- !/\.jade$/.test(t.file.path) && !/\.pug$/.test(t.file.path) || n.length ? (t.type = 'RawInclude', t.filters = n, 'indent' === this.peek().type && this.error('RAW_INCLUDE_BLOCK', 'Raw inclusion cannot contain a block', this.peek())) : (t.block = 'indent' == this.peek().type ? this.block() : this.emptyBlock(e.loc.start.line), /\.jade$/.test(t.file.path) && console.warn(this.filename + ', line ' + e.loc.start.line + ':\nThe .jade extension is deprecated, use .pug for "' + t.file.path + '".')),
- t
- },
- parseCall: function () {
- var e = this.expect('call'),
- t = {
- type: 'Mixin',
- name: e.val,
- args: e.args,
- block: this.emptyBlock(e.loc.start.line),
- call: !0,
- attrs: [
- ],
- attributeBlocks: [
- ],
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return this.tag(t),
- t.code && (t.block.nodes.push(t.code), delete t.code),
- 0 === t.block.nodes.length && (t.block = null),
- t
- },
- parseMixin: function () {
- var e = this.expect('mixin'),
- t = e.val,
- n = e.args;
- if ('indent' == this.peek().type) {
- this.inMixin++;
- var r = {
- type: 'Mixin',
- name: t,
- args: n,
- block: this.block(),
- call: !1,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return this.inMixin--,
- r
- }
- this.error('MIXIN_WITHOUT_BODY', 'Mixin ' + t + ' declared without body', e)
- },
- parseTextBlock: function () {
- if (t = this.accept('start-pipeless-text')) {
- for (var e = this.emptyBlock(t.loc.start.line); 'end-pipeless-text' !== this.peek().type; ) {
- var t;
- switch ((t = this.advance()).type) {
- case 'text':
- e.nodes.push({
- type: 'Text',
- val: t.val,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- });
- break;
- case 'newline':
- e.nodes.push({
- type: 'Text',
- val: '\n',
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- });
- break;
- case 'start-pug-interpolation':
- e.nodes.push(this.parseExpr()),
- this.expect('end-pug-interpolation');
- break;
- case 'interpolated-code':
- e.nodes.push({
- type: 'Code',
- val: t.val,
- buffer: t.buffer,
- mustEscape: !1 !== t.mustEscape,
- isInline: !0,
- line: t.loc.start.line,
- column: t.loc.start.column,
- filename: this.filename
- });
- break;
- default:
- if (this.runPlugin('textBlockTokens', t, e, t)) break;
- this.error('INVALID_TOKEN', 'Unexpected token type: ' + t.type, t)
- }
- }
- return this.advance(),
- e
- }
- },
- block: function () {
- for (var e = this.expect('indent'), t = this.emptyBlock(e.loc.start.line); 'outdent' != this.peek().type; ) if ('newline' == this.peek().type) this.advance();
- else if ('text-html' == this.peek().type) t.nodes = t.nodes.concat(this.parseTextHtml());
- else {
- var n = this.parseExpr();
- 'Block' === n.type ? t.nodes = t.nodes.concat(n.nodes) : t.nodes.push(n)
- }
- return this.expect('outdent'),
- t
- },
- parseInterpolation: function () {
- var e = this.advance(),
- t = {
- type: 'InterpolatedTag',
- expr: e.val,
- selfClosing: !1,
- block: this.emptyBlock(e.loc.start.line),
- attrs: [
- ],
- attributeBlocks: [
- ],
- isInline: !1,
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return this.tag(t, {
- selfClosingAllowed: !0
- })
- },
- parseTag: function () {
- var e = this.advance(),
- t = {
- type: 'Tag',
- name: e.val,
- selfClosing: !1,
- block: this.emptyBlock(e.loc.start.line),
- attrs: [
- ],
- attributeBlocks: [
- ],
- isInline: - 1 !== o.indexOf(e.val),
- line: e.loc.start.line,
- column: e.loc.start.column,
- filename: this.filename
- };
- return this.tag(t, {
- selfClosingAllowed: !0
- })
- },
- tag: function (e, t) {
- var n = !1,
- r = [
- ],
- i = t && t.selfClosingAllowed;
- e: for (; ; ) switch (this.peek().type) {
- case 'id':
- case 'class':
- 'id' === (s = this.advance()).type && ( - 1 !== r.indexOf('id') && this.error('DUPLICATE_ID', 'Duplicate attribute "id" is not allowed.', s), r.push('id')),
- e.attrs.push({
- name: s.type,
- val: '\'' + s.val + '\'',
- line: s.loc.start.line,
- column: s.loc.start.column,
- filename: this.filename,
- mustEscape: !1
- });
- continue;
- case 'start-attributes':
- n && console.warn(this.filename + ', line ' + this.peek().loc.start.line + ':\nYou should not have pug tags with multiple attributes.'),
- n = !0,
- e.attrs = e.attrs.concat(this.attrs(r));
- continue;
- case '&attributes':
- var s = this.advance();
- e.attributeBlocks.push({
- type: 'AttributeBlock',
- val: s.val,
- line: s.loc.start.line,
- column: s.loc.start.column,
- filename: this.filename
- });
- break;
- default:
- if (this.runPlugin('tagAttributeTokens', this.peek(), e, r)) break;
- break e
- }
- switch ('dot' == this.peek().type && (e.textOnly = !0, this.advance()), this.peek().type) {
- case 'text':
- case 'interpolated-code':
- var o = this.parseText();
- 'Block' === o.type ? e.block.nodes.push.apply(e.block.nodes, o.nodes) : e.block.nodes.push(o);
- break;
- case 'code':
- e.block.nodes.push(this.parseCode(!0));
- break;
- case ':':
- this.advance();
- var a = this.parseExpr();
- e.block = 'Block' === a.type ? a : this.initBlock(e.line, [
- a
- ]);
- break;
- case 'newline':
- case 'indent':
- case 'outdent':
- case 'eos':
- case 'start-pipeless-text':
- case 'end-pug-interpolation':
- break;
- case 'slash':
- if (i) {
- this.advance(),
- e.selfClosing = !0;
- break
- }
- default:
- if (this.runPlugin('tagTokens', this.peek(), e, t)) break;
- this.error('INVALID_TOKEN', 'Unexpected token `' + this.peek().type + '` expected `text`, `interpolated-code`, `code`, `:`' + (i ? ', `slash`' : '') + ', `newline` or `eos`', this.peek())
- }
- for (; 'newline' == this.peek().type; ) this.advance();
- if (e.textOnly) e.block = this.parseTextBlock() || this.emptyBlock(e.line);
- else if ('indent' == this.peek().type) for (var u = this.block(), l = 0, c = u.nodes.length; l < c; ++l) e.block.nodes.push(u.nodes[l]);
- return e
- },
- attrs: function (e) {
- this.expect('start-attributes');
- for (var t = [
- ], n = this.advance(); 'attribute' === n.type; ) 'class' !== n.name && e && ( - 1 !== e.indexOf(n.name) && this.error('DUPLICATE_ATTRIBUTE', 'Duplicate attribute "' + n.name + '" is not allowed.', n), e.push(n.name)),
- t.push({
- name: n.name,
- val: n.val,
- line: n.loc.start.line,
- column: n.loc.start.column,
- filename: this.filename,
- mustEscape: !1 !== n.mustEscape
- }),
- n = this.advance();
- return this.tokens.defer(n),
- this.expect('end-attributes'),
- t
- }
- }
- },
- {
- './lib/inline-tags': 398,
- assert: 8,
- 'pug-error': 388,
- 'token-stream': 422
- }
- ],
- 398: [
- function (e, t, n) {
- 'use strict';
- t.exports = [
- 'a',
- 'abbr',
- 'acronym',
- 'b',
- 'br',
- 'code',
- 'em',
- 'font',
- 'i',
- 'img',
- 'ins',
- 'kbd',
- 'map',
- 'samp',
- 'small',
- 'span',
- 'strong',
- 'sub',
- 'sup'
- ]
- },
- {
- }
- ],
- 399: [
- function (e, t, n) {
- 'use strict';
- e('fs');
- var r = e('./lib/dependencies.js'),
- i = e('./lib/internals.js'),
- s = e('./lib/sources.js');
- t.exports = function (e) {
- var t = [
- ];
- e = e.filter(function (e) {
- return !i[e]
- });
- for (var n = 0; n < e.length; n++) - 1 === t.indexOf(e[n]) && (t.push(e[n]), e.push.apply(e, r[e[n]]));
- return t.sort().map(function (e) {
- return s[e]
- }).join('\n')
- }
- },
- {
- './lib/dependencies.js': 401,
- './lib/internals.js': 402,
- './lib/sources.js': 403,
- fs: 40
- }
- ],
- 400: [
- function (e, t, n) {
- 'use strict';
- var r = Object.prototype.hasOwnProperty;
- function i(e, t) {
- return Array.isArray(e) ? function (e, t) {
- for (var n, r = '', s = '', o = Array.isArray(t), a = 0; a < e.length; a++) (n = i(e[a])) && (o && t[a] && (n = u(n)), r = r + s + n, s = ' ');
- return r
- }(e, t) : e && 'object' == typeof e ? function (e) {
- var t = '',
- n = '';
- for (var i in e) i && e[i] && r.call(e, i) && (t = t + n + i, n = ' ');
- return t
- }(e) : e || ''
- }
- function s(e) {
- if (!e) return '';
- if ('object' == typeof e) {
- var t = '';
- for (var n in e) r.call(e, n) && (t = t + n + ':' + e[n] + ';');
- return t
- }
- return e + ''
- }
- function o(e, t, n, r) {
- if (!1 === t || null == t || !t && ('class' === e || 'style' === e)) return '';
- if (!0 === t) return ' ' + (r ? e : e + '="' + e + '"');
- var i = typeof t;
- return 'object' !== i && 'function' !== i || 'function' != typeof t.toJSON || (t = t.toJSON()),
- 'string' == typeof t || (t = JSON.stringify(t), n || - 1 === t.indexOf('"')) ? (n && (t = u(t)), ' ' + e + '="' + t + '"') : ' ' + e + '=\'' + t.replace(/'/g, '&#39;') + '\''
- }
- n.merge = function e(t, n) {
- if (1 === arguments.length) {
- for (var r = t[0], i = 1; i < t.length; i++) r = e(r, t[i]);
- return r
- }
- for (var o in n) if ('class' === o) {
- var a = t[o] || [
- ];
- t[o] = (Array.isArray(a) ? a : [
- a
- ]).concat(n[o] || [
- ])
- } else if ('style' === o) {
- var a = s(t[o]);
- a = a && ';' !== a[a.length - 1] ? a + ';' : a;
- var u = s(n[o]);
- u = u && ';' !== u[u.length - 1] ? u + ';' : u,
- t[o] = a + u
- } else t[o] = n[o];
- return t
- },
- n.classes = i,
- n.style = s,
- n.attr = o,
- n.attrs = function (e, t) {
- var n = '';
- for (var a in e) if (r.call(e, a)) {
- var u = e[a];
- if ('class' === a) {
- u = i(u),
- n = o(a, u, !1, t) + n;
- continue
- }
- 'style' === a && (u = s(u)),
- n += o(a, u, !1, t)
- }
- return n
- };
- var a = /["&<>]/;
- function u(e) {
- var t = '' + e,
- n = a.exec(t);
- if (!n) return e;
- var r,
- i,
- s,
- o = '';
- for (r = n.index, i = 0; r < t.length; r++) {
- switch (t.charCodeAt(r)) {
- case 34:
- s = '&quot;';
- break;
- case 38:
- s = '&amp;';
- break;
- case 60:
- s = '&lt;';
- break;
- case 62:
- s = '&gt;';
- break;
- default:
- continue
- }
- i !== r && (o += t.substring(i, r)),
- i = r + 1,
- o += s
- }
- return i !== r ? o + t.substring(i, r) : o
- }
- n.escape = u,
- n.rethrow = function t(n, r, i, s) {
- if (!(n instanceof Error)) throw n;
- if (!('undefined' == typeof window && r || s)) throw n.message += ' on line ' + i,
- n;
- try {
- s = s || e('fs').readFileSync(r, 'utf8')
- } catch (e) {
- t(n, null, i)
- }
- var o = 3,
- a = s.split('\n'),
- u = Math.max(i - o, 0),
- l = Math.min(a.length, i + o);
- var o = a.slice(u, l).map(function (e, t) {
- var n = t + u + 1;
- return (n == i ? ' > ' : ' ') + n + '| ' + e
- }).join('\n');
- n.path = r;
- n.message = (r || 'Pug') + ':' + i + '\n' + o + '\n\n' + n.message;
- throw n
- }
- },
- {
- fs: 40
- }
- ],
- 401: [
- function (e, t, n) {
- t.exports = {
- has_own_property: [
- ],
- merge: [
- 'style'
- ],
- classes_array: [
- 'classes',
- 'escape'
- ],
- classes_object: [
- 'has_own_property'
- ],
- classes: [
- 'classes_array',
- 'classes_object'
- ],
- style: [
- 'has_own_property'
- ],
- attr: [
- 'escape'
- ],
- attrs: [
- 'attr',
- 'classes',
- 'has_own_property',
- 'style'
- ],
- match_html: [
- ],
- escape: [
- 'match_html'
- ],
- rethrow: [
- ]
- }
- },
- {
- }
- ],
- 402: [
- function (e, t, n) {
- t.exports = {
- dependencies: !0,
- internals: !0,
- has_own_property: !0,
- classes_array: !0,
- classes_object: !0,
- match_html: !0
- }
- },
- {
- }
- ],
- 403: [
- function (e, t, n) {
- t.exports = {
- has_own_property: 'var pug_has_own_property=Object.prototype.hasOwnProperty;',
- merge: 'function pug_merge(e,r){if(1===arguments.length){for(var t=e[0],g=1;g<e.length;g++)t=pug_merge(t,e[g]);return t}for(var l in r)if("class"===l){var n=e[l]||[];e[l]=(Array.isArray(n)?n:[n]).concat(r[l]||[])}else if("style"===l){var n=pug_style(e[l]);n=n&&";"!==n[n.length-1]?n+";":n;var a=pug_style(r[l]);a=a&&";"!==a[a.length-1]?a+";":a,e[l]=n+a}else e[l]=r[l];return e}',
- classes_array: 'function pug_classes_array(r,a){for(var s,e="",u="",c=Array.isArray(a),g=0;g<r.length;g++)(s=pug_classes(r[g]))&&(c&&a[g]&&(s=pug_escape(s)),e=e+u+s,u=" ");return e}',
- classes_object: 'function pug_classes_object(r){var a="",n="";for(var o in r)o&&r[o]&&pug_has_own_property.call(r,o)&&(a=a+n+o,n=" ");return a}',
- classes: 'function pug_classes(s,r){return Array.isArray(s)?pug_classes_array(s,r):s&&"object"==typeof s?pug_classes_object(s):s||""}',
- style: 'function pug_style(r){if(!r)return"";if("object"==typeof r){var t="";for(var e in r)pug_has_own_property.call(r,e)&&(t=t+e+":"+r[e]+";");return t}return r+""}',
- attr: 'function pug_attr(t,e,n,r){if(!1===e||null==e||!e&&("class"===t||"style"===t))return"";if(!0===e)return" "+(r?t:t+\'="\'+t+\'"\');var f=typeof e;return"object"!==f&&"function"!==f||"function"!=typeof e.toJSON||(e=e.toJSON()),"string"==typeof e||(e=JSON.stringify(e),n||-1===e.indexOf(\'"\'))?(n&&(e=pug_escape(e))," "+t+\'="\'+e+\'"\'):" "+t+"=\'"+e.replace(/\'/g,"&#39;")+"\'"}',
- attrs: 'function pug_attrs(t,r){var a="";for(var s in t)if(pug_has_own_property.call(t,s)){var u=t[s];if("class"===s){u=pug_classes(u),a=pug_attr(s,u,!1,r)+a;continue}"style"===s&&(u=pug_style(u)),a+=pug_attr(s,u,!1,r)}return a}',
- match_html: 'var pug_match_html=/["&<>]/;',
- escape: 'function pug_escape(e){var a=""+e,t=pug_match_html.exec(a);if(!t)return e;var r,c,n,s="";for(r=t.index,c=0;r<a.length;r++){switch(a.charCodeAt(r)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}c!==r&&(s+=a.substring(c,r)),c=r+1,s+=n}return c!==r?s+a.substring(c,r):s}',
- rethrow: 'function pug_rethrow(n,e,r,t){if(!(n instanceof Error))throw n;if(!("undefined"==typeof window&&e||t))throw n.message+=" on line "+r,n;try{t=t||require("fs").readFileSync(e,"utf8")}catch(e){pug_rethrow(n,null,r)}var i=3,a=t.split("\\n"),o=Math.max(r-i,0),h=Math.min(a.length,r+i),i=a.slice(o,h).map(function(n,e){var t=e+o+1;return(t==r?" > ":" ")+t+"| "+n}).join("\\n");throw n.path=e,n.message=(e||"Pug")+":"+r+"\\n"+i+"\\n\\n"+n.message,n}'
- }
- },
- {
- }
- ],
- 404: [
- function (e, t, n) {
- var r = e('./');
- t.exports = function (e, t) {
- return t = t || 'template',
- Function('pug', e + '\nreturn ' + t + ';') (r)
- }
- },
- {
- './': 400
- }
- ],
- 405: [
- function (e, t, n) {
- 'use strict';
- var r = e('pug-error');
- function i(e, t, n, i) {
- throw r('UNEXPECTED_TOKEN', '`' + e + '` encountered when ' + t, {
- filename: n,
- line: i
- })
- }
- t.exports = function (e, t) {
- var n = !1 !== (t = t || {
- }).stripUnbuffered,
- r = !0 === t.stripBuffered,
- s = t.filename,
- o = !1,
- a = !1;
- return e.filter(function (e) {
- switch (e.type) {
- case 'comment':
- if (!o) return !(o = e.buffer ? r : n);
- i('comment', 'already in a comment', s, e.line);
- case 'start-pipeless-text':
- return !o || (a && i('start-pipeless-text', 'already in pipeless text mode', s, e.line), a = !0, !1);
- case 'end-pipeless-text':
- return !o || (a || i('end-pipeless-text', 'not in pipeless text mode', s, e.line), a = !1, o = !1, !1);
- case 'text':
- return !o;
- default:
- return !a && (o = !1, !0)
- }
- })
- }
- },
- {
- 'pug-error': 388
- }
- ],
- 406: [
- function (e, t, n) {
- 'use strict';
- t.exports = function e(t, n, r, i) {
- r && 'object' == typeof r && void 0 === i && (i = r, r = null);
- i = i || {
- includeDependencies: !1
- };
- var s = i.parents = i.parents || [
- ];
- var o = function e(n) {
- if (Array.isArray(n) && !e.arrayAllowed) throw new Error('replace() can only be called with an array if the last parent is a Block or NamedBlock');
- t = n
- };
- o.arrayAllowed = s[0] && (/^(Named)?Block$/.test(s[0].type) || 'RawInclude' === s[0].type && 'IncludeFilter' === t.type);
- if (n) {
- var a = n(t, o);
- if (!1 === a) return t;
- if (Array.isArray(t)) return u(t)
- }
- s.unshift(t);
- switch (t.type) {
- case 'NamedBlock':
- case 'Block':
- t.nodes = u(t.nodes);
- break;
- case 'Case':
- case 'Filter':
- case 'Mixin':
- case 'Tag':
- case 'InterpolatedTag':
- case 'When':
- case 'Code':
- case 'While':
- t.block && (t.block = e(t.block, n, r, i));
- break;
- case 'Each':
- t.block && (t.block = e(t.block, n, r, i)),
- t.alternate && (t.alternate = e(t.alternate, n, r, i));
- break;
- case 'Conditional':
- t.consequent && (t.consequent = e(t.consequent, n, r, i)),
- t.alternate && (t.alternate = e(t.alternate, n, r, i));
- break;
- case 'Include':
- e(t.block, n, r, i),
- e(t.file, n, r, i);
- break;
- case 'Extends':
- e(t.file, n, r, i);
- break;
- case 'RawInclude':
- t.filters = u(t.filters),
- e(t.file, n, r, i);
- break;
- case 'Attrs':
- case 'BlockComment':
- case 'Comment':
- case 'Doctype':
- case 'IncludeFilter':
- case 'MixinBlock':
- case 'YieldBlock':
- case 'Text':
- break;
- case 'FileReference':
- i.includeDependencies && t.ast && e(t.ast, n, r, i);
- break;
- default:
- throw new Error('Unexpected node type ' + t.type)
- }
- s.shift();
- r && r(t, o);
- return t;
- function u(t) {
- return t.reduce(function (t, s) {
- var o = e(s, n, r, i);
- return Array.isArray(o) ? t.concat(o) : t.concat([o])
- }, [
- ])
- }
- }
- },
- {
- }
- ],
- 407: [
- function (e, t, n) {
- (function (e) {
- !function (r) {
- var i = 'object' == typeof n && n && !n.nodeType && n,
- s = 'object' == typeof t && t && !t.nodeType && t,
- o = 'object' == typeof e && e;
- o.global !== o && o.window !== o && o.self !== o || (r = o);
- var a,
- u,
- l = 2147483647,
- c = 36,
- p = 1,
- h = 26,
- f = 38,
- d = 700,
- m = 72,
- g = 128,
- y = '-',
- v = /^xn--/,
- b = /[^\x20-\x7E]/,
- x = /[\x2E\u3002\uFF0E\uFF61]/g,
- A = {
- overflow: 'Overflow: input needs wider integers to process',
- 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
- 'invalid-input': 'Invalid input'
- },
- E = c - p,
- _ = Math.floor,
- C = String.fromCharCode;
- function w(e) {
- throw new RangeError(A[e])
- }
- function D(e, t) {
- for (var n = e.length, r = [
- ]; n--; ) r[n] = t(e[n]);
- return r
- }
- function k(e, t) {
- var n = e.split('@'),
- r = '';
- return n.length > 1 && (r = n[0] + '@', e = n[1]),
- r + D((e = e.replace(x, '.')).split('.'), t).join('.')
- }
- function S(e) {
- for (var t, n, r = [
- ], i = 0, s = e.length; i < s; ) (t = e.charCodeAt(i++)) >= 55296 && t <= 56319 && i < s ? 56320 == (64512 & (n = e.charCodeAt(i++))) ? r.push(((1023 & t) << 10) + (1023 & n) + 65536) : (r.push(t), i--) : r.push(t);
- return r
- }
- function T(e) {
- return D(e, function (e) {
- var t = '';
- return e > 65535 && (t += C((e -= 65536) >>> 10 & 1023 | 55296), e = 56320 | 1023 & e),
- t += C(e)
- }).join('')
- }
- function F(e, t) {
- return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
- }
- function O(e, t, n) {
- var r = 0;
- for (e = n ? _(e / d) : e >> 1, e += _(e / t); e > E * h >> 1; r += c) e = _(e / E);
- return _(r + (E + 1) * e / (e + f))
- }
- function B(e) {
- var t,
- n,
- r,
- i,
- s,
- o,
- a,
- u,
- f,
- d,
- v,
- b = [
- ],
- x = e.length,
- A = 0,
- E = g,
- C = m;
- for ((n = e.lastIndexOf(y)) < 0 && (n = 0), r = 0; r < n; ++r) e.charCodeAt(r) >= 128 && w('not-basic'),
- b.push(e.charCodeAt(r));
- for (i = n > 0 ? n + 1 : 0; i < x; ) {
- for (s = A, o = 1, a = c; i >= x && w('invalid-input'), ((u = (v = e.charCodeAt(i++)) - 48 < 10 ? v - 22 : v - 65 < 26 ? v - 65 : v - 97 < 26 ? v - 97 : c) >= c || u > _((l - A) / o)) && w('overflow'), A += u * o, !(u < (f = a <= C ? p : a >= C + h ? h : a - C)); a += c) o > _(l / (d = c - f)) && w('overflow'),
- o *= d;
- C = O(A - s, t = b.length + 1, 0 == s),
- _(A / t) > l - E && w('overflow'),
- E += _(A / t),
- A %= t,
- b.splice(A++, 0, E)
- }
- return T(b)
- }
- function P(e) {
- var t,
- n,
- r,
- i,
- s,
- o,
- a,
- u,
- f,
- d,
- v,
- b,
- x,
- A,
- E,
- D = [
- ];
- for (b = (e = S(e)).length, t = g, n = 0, s = m, o = 0; o < b; ++o) (v = e[o]) < 128 && D.push(C(v));
- for (r = i = D.length, i && D.push(y); r < b; ) {
- for (a = l, o = 0; o < b; ++o) (v = e[o]) >= t && v < a && (a = v);
- for (a - t > _((l - n) / (x = r + 1)) && w('overflow'), n += (a - t) * x, t = a, o = 0; o < b; ++o) if ((v = e[o]) < t && ++n > l && w('overflow'), v == t) {
- for (u = n, f = c; !(u < (d = f <= s ? p : f >= s + h ? h : f - s)); f += c) E = u - d,
- A = c - d,
- D.push(C(F(d + E % A, 0))),
- u = _(E / A);
- D.push(C(F(u, 0))),
- s = O(n, x, r == i),
- n = 0,
- ++r
- }
- ++n,
- ++t
- }
- return D.join('')
- }
- if (a = {
- version: '1.4.1',
- ucs2: {
- decode: S,
- encode: T
- },
- decode: B,
- encode: P,
- toASCII: function (e) {
- return k(e, function (e) {
- return b.test(e) ? 'xn--' + P(e) : e
- })
- },
- toUnicode: function (e) {
- return k(e, function (e) {
- return v.test(e) ? B(e.slice(4).toLowerCase()) : e
- })
- }
- }, 'function' == typeof define && 'object' == typeof define.amd && define.amd) define('punycode', function () {
- return a
- });
- else if (i && s) if (t.exports == i) s.exports = a;
- else for (u in a) a.hasOwnProperty(u) && (i[u] = a[u]);
- else r.punycode = a
- }(this)
- }).call(this, 'undefined' != typeof global ? global : 'undefined' != typeof self ? self : 'undefined' != typeof window ? window : {
- })
- },
- {
- }
- ],
- 408: [
- function (e, t, n) {
- 'use strict';
- function r(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- t.exports = function (e, t, n, s) {
- t = t || '&',
- n = n || '=';
- var o = {
- };
- if ('string' != typeof e || 0 === e.length) return o;
- var a = /\+/g;
- e = e.split(t);
- var u = 1000;
- s && 'number' == typeof s.maxKeys && (u = s.maxKeys);
- var l = e.length;
- u > 0 && l > u && (l = u);
- for (var c = 0; c < l; ++c) {
- var p,
- h,
- f,
- d,
- m = e[c].replace(a, '%20'),
- g = m.indexOf(n);
- g >= 0 ? (p = m.substr(0, g), h = m.substr(g + 1)) : (p = m, h = ''),
- f = decodeURIComponent(p),
- d = decodeURIComponent(h),
- r(o, f) ? i(o[f]) ? o[f].push(d) : o[f] = [
- o[f],
- d
- ] : o[f] = d
- }
- return o
- };
- var i = Array.isArray || function (e) {
- return '[object Array]' === Object.prototype.toString.call(e)
- }
- },
- {
- }
- ],
- 409: [
- function (e, t, n) {
- 'use strict';
- var r = function (e) {
- switch (typeof e) {
- case 'string':
- return e;
- case 'boolean':
- return e ? 'true' : 'false';
- case 'number':
- return isFinite(e) ? e : '';
- default:
- return ''
- }
- };
- t.exports = function (e, t, n, a) {
- return t = t || '&',
- n = n || '=',
- null === e && (e = void 0),
- 'object' == typeof e ? s(o(e), function (o) {
- var a = encodeURIComponent(r(o)) + n;
- return i(e[o]) ? s(e[o], function (e) {
- return a + encodeURIComponent(r(e))
- }).join(t) : a + encodeURIComponent(r(e[o]))
- }).join(t) : a ? encodeURIComponent(r(a)) + n + encodeURIComponent(r(e)) : ''
- };
- var i = Array.isArray || function (e) {
- return '[object Array]' === Object.prototype.toString.call(e)
- };
- function s(e, t) {
- if (e.map) return e.map(t);
- for (var n = [
- ], r = 0; r < e.length; r++) n.push(t(e[r], r));
- return n
- }
- var o = Object.keys || function (e) {
- var t = [
- ];
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
- return t
- }
- },
- {
- }
- ],
- 410: [
- function (e, t, n) {
- 'use strict';
- n.decode = n.parse = e('./decode'),
- n.encode = n.stringify = e('./encode')
- },
- {
- './decode': 408,
- './encode': 409
- }
- ],
- 411: [
- function (e, t, n) {
- arguments[4][139][0].apply(n, arguments)
- },
- {
- './util': 420,
- dup: 139
- }
- ],
- 412: [
- function (e, t, n) {
- arguments[4][140][0].apply(n, arguments)
- },
- {
- './base64': 413,
- dup: 140
- }
- ],
- 413: [
- function (e, t, n) {
- arguments[4][141][0].apply(n, arguments)
- },
- {
- dup: 141
- }
- ],
- 414: [
- function (e, t, n) {
- arguments[4][142][0].apply(n, arguments)
- },
- {
- dup: 142
- }
- ],
- 415: [
- function (e, t, n) {
- arguments[4][143][0].apply(n, arguments)
- },
- {
- './util': 420,
- dup: 143
- }
- ],
- 416: [
- function (e, t, n) {
- arguments[4][144][0].apply(n, arguments)
- },
- {
- dup: 144
- }
- ],
- 417: [
- function (e, t, n) {
- var r = e('./util'),
- i = e('./binary-search'),
- s = e('./array-set').ArraySet,
- o = e('./base64-vlq'),
- a = e('./quick-sort').quickSort;
- function u(e) {
- var t = e;
- return 'string' == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ''))),
- null != t.sections ? new p(t) : new l(t)
- }
- function l(e) {
- var t = e;
- 'string' == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, '')));
- var n = r.getArg(t, 'version'),
- i = r.getArg(t, 'sources'),
- o = r.getArg(t, 'names', [
- ]),
- a = r.getArg(t, 'sourceRoot', null),
- u = r.getArg(t, 'sourcesContent', null),
- l = r.getArg(t, 'mappings'),
- c = r.getArg(t, 'file', null);
- if (n != this._version) throw new Error('Unsupported version: ' + n);
- i = i.map(String).map(r.normalize).map(function (e) {
- return a && r.isAbsolute(a) && r.isAbsolute(e) ? r.relative(a, e) : e
- }),
- this._names = s.fromArray(o.map(String), !0),
- this._sources = s.fromArray(i, !0),
- this.sourceRoot = a,
- this.sourcesContent = u,
- this._mappings = l,
- this.file = c
- }
- function c() {
- this.generatedLine = 0,
- this.generatedColumn = 0,
- this.source = null,
- this.originalLine = null,
- this.originalColumn = null,
- this.name = null
- }
- function p(e) {
- var t = e;
- 'string' == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, '')));
- var n = r.getArg(t, 'version'),
- i = r.getArg(t, 'sections');
- if (n != this._version) throw new Error('Unsupported version: ' + n);
- this._sources = new s,
- this._names = new s;
- var o = {
- line: - 1,
- column: 0
- };
- this._sections = i.map(function (e) {
- if (e.url) throw new Error('Support for url field in sections not implemented.');
- var t = r.getArg(e, 'offset'),
- n = r.getArg(t, 'line'),
- i = r.getArg(t, 'column');
- if (n < o.line || n === o.line && i < o.column) throw new Error('Section offsets must be ordered and non-overlapping.');
- return o = t,
- {
- generatedOffset: {
- generatedLine: n + 1,
- generatedColumn: i + 1
- },
- consumer: new u(r.getArg(e, 'map'))
- }
- })
- }
- u.fromSourceMap = function (e) {
- return l.fromSourceMap(e)
- },
- u.prototype._version = 3,
- u.prototype.__generatedMappings = null,
- Object.defineProperty(u.prototype, '_generatedMappings', {
- get: function () {
- return this.__generatedMappings || this._parseMappings(this._mappings, this.sourceRoot),
- this.__generatedMappings
- }
- }),
- u.prototype.__originalMappings = null,
- Object.defineProperty(u.prototype, '_originalMappings', {
- get: function () {
- return this.__originalMappings || this._parseMappings(this._mappings, this.sourceRoot),
- this.__originalMappings
- }
- }),
- u.prototype._charIsMappingSeparator = function (e, t) {
- var n = e.charAt(t);
- return ';' === n || ',' === n
- },
- u.prototype._parseMappings = function (e, t) {
- throw new Error('Subclasses must implement _parseMappings')
- },
- u.GENERATED_ORDER = 1,
- u.ORIGINAL_ORDER = 2,
- u.GREATEST_LOWER_BOUND = 1,
- u.LEAST_UPPER_BOUND = 2,
- u.prototype.eachMapping = function (e, t, n) {
- var i,
- s = t || null;
- switch (n || u.GENERATED_ORDER) {
- case u.GENERATED_ORDER:
- i = this._generatedMappings;
- break;
- case u.ORIGINAL_ORDER:
- i = this._originalMappings;
- break;
- default:
- throw new Error('Unknown order of iteration.')
- }
- var o = this.sourceRoot;
- i.map(function (e) {
- var t = null === e.source ? null : this._sources.at(e.source);
- return null != t && null != o && (t = r.join(o, t)),
- {
- source: t,
- generatedLine: e.generatedLine,
- generatedColumn: e.generatedColumn,
- originalLine: e.originalLine,
- originalColumn: e.originalColumn,
- name: null === e.name ? null : this._names.at(e.name)
- }
- }, this).forEach(e, s)
- },
- u.prototype.allGeneratedPositionsFor = function (e) {
- var t = r.getArg(e, 'line'),
- n = {
- source: r.getArg(e, 'source'),
- originalLine: t,
- originalColumn: r.getArg(e, 'column', 0)
- };
- if (null != this.sourceRoot && (n.source = r.relative(this.sourceRoot, n.source)), !this._sources.has(n.source)) return [];
- n.source = this._sources.indexOf(n.source);
- var s = [
- ],
- o = this._findMapping(n, this._originalMappings, 'originalLine', 'originalColumn', r.compareByOriginalPositions, i.LEAST_UPPER_BOUND);
- if (o >= 0) {
- var a = this._originalMappings[o];
- if (void 0 === e.column) for (var u = a.originalLine; a && a.originalLine === u; ) s.push({
- line: r.getArg(a, 'generatedLine', null),
- column: r.getArg(a, 'generatedColumn', null),
- lastColumn: r.getArg(a, 'lastGeneratedColumn', null)
- }),
- a = this._originalMappings[++o];
- else for (var l = a.originalColumn; a && a.originalLine === t && a.originalColumn == l; ) s.push({
- line: r.getArg(a, 'generatedLine', null),
- column: r.getArg(a, 'generatedColumn', null),
- lastColumn: r.getArg(a, 'lastGeneratedColumn', null)
- }),
- a = this._originalMappings[++o]
- }
- return s
- },
- n.SourceMapConsumer = u,
- l.prototype = Object.create(u.prototype),
- l.prototype.consumer = u,
- l.fromSourceMap = function (e) {
- var t = Object.create(l.prototype),
- n = t._names = s.fromArray(e._names.toArray(), !0),
- i = t._sources = s.fromArray(e._sources.toArray(), !0);
- t.sourceRoot = e._sourceRoot,
- t.sourcesContent = e._generateSourcesContent(t._sources.toArray(), t.sourceRoot),
- t.file = e._file;
- for (var o = e._mappings.toArray().slice(), u = t.__generatedMappings = [
- ], p = t.__originalMappings = [
- ], h = 0, f = o.length; h < f; h++) {
- var d = o[h],
- m = new c;
- m.generatedLine = d.generatedLine,
- m.generatedColumn = d.generatedColumn,
- d.source && (m.source = i.indexOf(d.source), m.originalLine = d.originalLine, m.originalColumn = d.originalColumn, d.name && (m.name = n.indexOf(d.name)), p.push(m)),
- u.push(m)
- }
- return a(t.__originalMappings, r.compareByOriginalPositions),
- t
- },
- l.prototype._version = 3,
- Object.defineProperty(l.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (e) {
- return null != this.sourceRoot ? r.join(this.sourceRoot, e) : e
- }, this)
- }
- }),
- l.prototype._parseMappings = function (e, t) {
- for (var n, i, s, u, l, p = 1, h = 0, f = 0, d = 0, m = 0, g = 0, y = e.length, v = 0, b = {
- }, x = {
- }, A = [
- ], E = [
- ]; v < y; ) if (';' === e.charAt(v)) p++,
- v++,
- h = 0;
- else if (',' === e.charAt(v)) v++;
- else {
- for ((n = new c).generatedLine = p, u = v; u < y && !this._charIsMappingSeparator(e, u); u++);
- if (s = b[i = e.slice(v, u)]) v += i.length;
- else {
- for (s = [
- ]; v < u; ) o.decode(e, v, x),
- l = x.value,
- v = x.rest,
- s.push(l);
- if (2 === s.length) throw new Error('Found a source, but no line and column');
- if (3 === s.length) throw new Error('Found a source and line, but no column');
- b[i] = s
- }
- n.generatedColumn = h + s[0],
- h = n.generatedColumn,
- s.length > 1 && (n.source = m + s[1], m += s[1], n.originalLine = f + s[2], f = n.originalLine, n.originalLine += 1, n.originalColumn = d + s[3], d = n.originalColumn, s.length > 4 && (n.name = g + s[4], g += s[4])),
- E.push(n),
- 'number' == typeof n.originalLine && A.push(n)
- }
- a(E, r.compareByGeneratedPositionsDeflated),
- this.__generatedMappings = E,
- a(A, r.compareByOriginalPositions),
- this.__originalMappings = A
- },
- l.prototype._findMapping = function (e, t, n, r, s, o) {
- if (e[n] <= 0) throw new TypeError('Line must be greater than or equal to 1, got ' + e[n]);
- if (e[r] < 0) throw new TypeError('Column must be greater than or equal to 0, got ' + e[r]);
- return i.search(e, t, s, o)
- },
- l.prototype.computeColumnSpans = function () {
- for (var e = 0; e < this._generatedMappings.length; ++e) {
- var t = this._generatedMappings[e];
- if (e + 1 < this._generatedMappings.length) {
- var n = this._generatedMappings[e + 1];
- if (t.generatedLine === n.generatedLine) {
- t.lastGeneratedColumn = n.generatedColumn - 1;
- continue
- }
- }
- t.lastGeneratedColumn = 1 / 0
- }
- },
- l.prototype.originalPositionFor = function (e) {
- var t = {
- generatedLine: r.getArg(e, 'line'),
- generatedColumn: r.getArg(e, 'column')
- },
- n = this._findMapping(t, this._generatedMappings, 'generatedLine', 'generatedColumn', r.compareByGeneratedPositionsDeflated, r.getArg(e, 'bias', u.GREATEST_LOWER_BOUND));
- if (n >= 0) {
- var i = this._generatedMappings[n];
- if (i.generatedLine === t.generatedLine) {
- var s = r.getArg(i, 'source', null);
- null !== s && (s = this._sources.at(s), null != this.sourceRoot && (s = r.join(this.sourceRoot, s)));
- var o = r.getArg(i, 'name', null);
- return null !== o && (o = this._names.at(o)),
- {
- source: s,
- line: r.getArg(i, 'originalLine', null),
- column: r.getArg(i, 'originalColumn', null),
- name: o
- }
- }
- }
- return {
- source: null,
- line: null,
- column: null,
- name: null
- }
- },
- l.prototype.hasContentsOfAllSources = function () {
- return !!this.sourcesContent && (this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (e) {
- return null == e
- }))
- },
- l.prototype.sourceContentFor = function (e, t) {
- if (!this.sourcesContent) return null;
- if (null != this.sourceRoot && (e = r.relative(this.sourceRoot, e)), this._sources.has(e)) return this.sourcesContent[this._sources.indexOf(e)];
- var n;
- if (null != this.sourceRoot && (n = r.urlParse(this.sourceRoot))) {
- var i = e.replace(/^file:\/\//, '');
- if ('file' == n.scheme && this._sources.has(i)) return this.sourcesContent[this._sources.indexOf(i)];
- if ((!n.path || '/' == n.path) && this._sources.has('/' + e)) return this.sourcesContent[this._sources.indexOf('/' + e)]
- }
- if (t) return null;
- throw new Error('"' + e + '" is not in the SourceMap.')
- },
- l.prototype.generatedPositionFor = function (e) {
- var t = r.getArg(e, 'source');
- if (null != this.sourceRoot && (t = r.relative(this.sourceRoot, t)), !this._sources.has(t)) return {
- line: null,
- column: null,
- lastColumn: null
- };
- var n = {
- source: t = this._sources.indexOf(t),
- originalLine: r.getArg(e, 'line'),
- originalColumn: r.getArg(e, 'column')
- },
- i = this._findMapping(n, this._originalMappings, 'originalLine', 'originalColumn', r.compareByOriginalPositions, r.getArg(e, 'bias', u.GREATEST_LOWER_BOUND));
- if (i >= 0) {
- var s = this._originalMappings[i];
- if (s.source === n.source) return {
- line: r.getArg(s, 'generatedLine', null),
- column: r.getArg(s, 'generatedColumn', null),
- lastColumn: r.getArg(s, 'lastGeneratedColumn', null)
- }
- }
- return {
- line: null,
- column: null,
- lastColumn: null
- }
- },
- n.BasicSourceMapConsumer = l,
- p.prototype = Object.create(u.prototype),
- p.prototype.constructor = u,
- p.prototype._version = 3,
- Object.defineProperty(p.prototype, 'sources', {
- get: function () {
- for (var e = [
- ], t = 0; t < this._sections.length; t++) for (var n = 0; n < this._sections[t].consumer.sources.length; n++) e.push(this._sections[t].consumer.sources[n]);
- return e
- }
- }),
- p.prototype.originalPositionFor = function (e) {
- var t = {
- generatedLine: r.getArg(e, 'line'),
- generatedColumn: r.getArg(e, 'column')
- },
- n = i.search(t, this._sections, function (e, t) {
- var n = e.generatedLine - t.generatedOffset.generatedLine;
- return n || e.generatedColumn - t.generatedOffset.generatedColumn
- }),
- s = this._sections[n];
- return s ? s.consumer.originalPositionFor({
- line: t.generatedLine - (s.generatedOffset.generatedLine - 1),
- column: t.generatedColumn - (s.generatedOffset.generatedLine === t.generatedLine ? s.generatedOffset.generatedColumn - 1 : 0),
- bias: e.bias
- }) : {
- source: null,
- line: null,
- column: null,
- name: null
- }
- },
- p.prototype.hasContentsOfAllSources = function () {
- return this._sections.every(function (e) {
- return e.consumer.hasContentsOfAllSources()
- })
- },
- p.prototype.sourceContentFor = function (e, t) {
- for (var n = 0; n < this._sections.length; n++) {
- var r = this._sections[n].consumer.sourceContentFor(e, !0);
- if (r) return r
- }
- if (t) return null;
- throw new Error('"' + e + '" is not in the SourceMap.')
- },
- p.prototype.generatedPositionFor = function (e) {
- for (var t = 0; t < this._sections.length; t++) {
- var n = this._sections[t];
- if ( - 1 !== n.consumer.sources.indexOf(r.getArg(e, 'source'))) {
- var i = n.consumer.generatedPositionFor(e);
- if (i) return {
- line: i.line + (n.generatedOffset.generatedLine - 1),
- column: i.column + (n.generatedOffset.generatedLine === i.line ? n.generatedOffset.generatedColumn - 1 : 0)
- }
- }
- }
- return {
- line: null,
- column: null
- }
- },
- p.prototype._parseMappings = function (e, t) {
- this.__generatedMappings = [
- ],
- this.__originalMappings = [
- ];
- for (var n = 0; n < this._sections.length; n++) for (var i = this._sections[n], s = i.consumer._generatedMappings, o = 0; o < s.length; o++) {
- var u = s[o],
- l = i.consumer._sources.at(u.source);
- null !== i.consumer.sourceRoot && (l = r.join(i.consumer.sourceRoot, l)),
- this._sources.add(l),
- l = this._sources.indexOf(l);
- var c = i.consumer._names.at(u.name);
- this._names.add(c),
- c = this._names.indexOf(c);
- var p = {
- source: l,
- generatedLine: u.generatedLine + (i.generatedOffset.generatedLine - 1),
- generatedColumn: u.generatedColumn + (i.generatedOffset.generatedLine === u.generatedLine ? i.generatedOffset.generatedColumn - 1 : 0),
- originalLine: u.originalLine,
- originalColumn: u.originalColumn,
- name: c
- };
- this.__generatedMappings.push(p),
- 'number' == typeof p.originalLine && this.__originalMappings.push(p)
- }
- a(this.__generatedMappings, r.compareByGeneratedPositionsDeflated),
- a(this.__originalMappings, r.compareByOriginalPositions)
- },
- n.IndexedSourceMapConsumer = p
- },
- {
- './array-set': 411,
- './base64-vlq': 412,
- './binary-search': 414,
- './quick-sort': 416,
- './util': 420
- }
- ],
- 418: [
- function (e, t, n) {
- var r = e('./base64-vlq'),
- i = e('./util'),
- s = e('./array-set').ArraySet,
- o = e('./mapping-list').MappingList;
- function a(e) {
- e || (e = {
- }),
- this._file = i.getArg(e, 'file', null),
- this._sourceRoot = i.getArg(e, 'sourceRoot', null),
- this._skipValidation = i.getArg(e, 'skipValidation', !1),
- this._sources = new s,
- this._names = new s,
- this._mappings = new o,
- this._sourcesContents = null
- }
- a.prototype._version = 3,
- a.fromSourceMap = function (e) {
- var t = e.sourceRoot,
- n = new a({
- file: e.file,
- sourceRoot: t
- });
- return e.eachMapping(function (e) {
- var r = {
- generated: {
- line: e.generatedLine,
- column: e.generatedColumn
- }
- };
- null != e.source && (r.source = e.source, null != t && (r.source = i.relative(t, r.source)), r.original = {
- line: e.originalLine,
- column: e.originalColumn
- }, null != e.name && (r.name = e.name)),
- n.addMapping(r)
- }),
- e.sources.forEach(function (t) {
- var r = e.sourceContentFor(t);
- null != r && n.setSourceContent(t, r)
- }),
- n
- },
- a.prototype.addMapping = function (e) {
- var t = i.getArg(e, 'generated'),
- n = i.getArg(e, 'original', null),
- r = i.getArg(e, 'source', null),
- s = i.getArg(e, 'name', null);
- this._skipValidation || this._validateMapping(t, n, r, s),
- null != r && (r = String(r), this._sources.has(r) || this._sources.add(r)),
- null != s && (s = String(s), this._names.has(s) || this._names.add(s)),
- this._mappings.add({
- generatedLine: t.line,
- generatedColumn: t.column,
- originalLine: null != n && n.line,
- originalColumn: null != n && n.column,
- source: r,
- name: s
- })
- },
- a.prototype.setSourceContent = function (e, t) {
- var n = e;
- null != this._sourceRoot && (n = i.relative(this._sourceRoot, n)),
- null != t ? (this._sourcesContents || (this._sourcesContents = Object.create(null)), this._sourcesContents[i.toSetString(n)] = t) : this._sourcesContents && (delete this._sourcesContents[i.toSetString(n)], 0 === Object.keys(this._sourcesContents).length && (this._sourcesContents = null))
- },
- a.prototype.applySourceMap = function (e, t, n) {
- var r = t;
- if (null == t) {
- if (null == e.file) throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');
- r = e.file
- }
- var o = this._sourceRoot;
- null != o && (r = i.relative(o, r));
- var a = new s,
- u = new s;
- this._mappings.unsortedForEach(function (t) {
- if (t.source === r && null != t.originalLine) {
- var s = e.originalPositionFor({
- line: t.originalLine,
- column: t.originalColumn
- });
- null != s.source && (t.source = s.source, null != n && (t.source = i.join(n, t.source)), null != o && (t.source = i.relative(o, t.source)), t.originalLine = s.line, t.originalColumn = s.column, null != s.name && (t.name = s.name))
- }
- var l = t.source;
- null == l || a.has(l) || a.add(l);
- var c = t.name;
- null == c || u.has(c) || u.add(c)
- }, this),
- this._sources = a,
- this._names = u,
- e.sources.forEach(function (t) {
- var r = e.sourceContentFor(t);
- null != r && (null != n && (t = i.join(n, t)), null != o && (t = i.relative(o, t)), this.setSourceContent(t, r))
- }, this)
- },
- a.prototype._validateMapping = function (e, t, n, r) {
- if (t && 'number' != typeof t.line && 'number' != typeof t.column) throw new Error('original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.');
- if ((!(e && 'line' in e && 'column' in e && e.line > 0 && e.column >= 0) || t || n || r) && !(e && 'line' in e && 'column' in e && t && 'line' in t && 'column' in t && e.line > 0 && e.column >= 0 && t.line > 0 && t.column >= 0 && n)) throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: e,
- source: n,
- original: t,
- name: r
- }))
- },
- a.prototype._serializeMappings = function () {
- for (var e, t, n, s, o = 0, a = 1, u = 0, l = 0, c = 0, p = 0, h = '', f = this._mappings.toArray(), d = 0, m = f.length; d < m; d++) {
- if (e = '', (t = f[d]).generatedLine !== a) for (o = 0; t.generatedLine !== a; ) e += ';',
- a++;
- else if (d > 0) {
- if (!i.compareByGeneratedPositionsInflated(t, f[d - 1])) continue;
- e += ','
- }
- e += r.encode(t.generatedColumn - o),
- o = t.generatedColumn,
- null != t.source && (s = this._sources.indexOf(t.source), e += r.encode(s - p), p = s, e += r.encode(t.originalLine - 1 - l), l = t.originalLine - 1, e += r.encode(t.originalColumn - u), u = t.originalColumn, null != t.name && (n = this._names.indexOf(t.name), e += r.encode(n - c), c = n)),
- h += e
- }
- return h
- },
- a.prototype._generateSourcesContent = function (e, t) {
- return e.map(function (e) {
- if (!this._sourcesContents) return null;
- null != t && (e = i.relative(t, e));
- var n = i.toSetString(e);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents, n) ? this._sourcesContents[n] : null
- }, this)
- },
- a.prototype.toJSON = function () {
- var e = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- return null != this._file && (e.file = this._file),
- null != this._sourceRoot && (e.sourceRoot = this._sourceRoot),
- this._sourcesContents && (e.sourcesContent = this._generateSourcesContent(e.sources, e.sourceRoot)),
- e
- },
- a.prototype.toString = function () {
- return JSON.stringify(this.toJSON())
- },
- n.SourceMapGenerator = a
- },
- {
- './array-set': 411,
- './base64-vlq': 412,
- './mapping-list': 415,
- './util': 420
- }
- ],
- 419: [
- function (e, t, n) {
- var r = e('./source-map-generator').SourceMapGenerator,
- i = e('./util'),
- s = /(\r?\n)/,
- o = '$$$isSourceNode$$$';
- function a(e, t, n, r, i) {
- this.children = [
- ],
- this.sourceContents = {
- },
- this.line = null == e ? null : e,
- this.column = null == t ? null : t,
- this.source = null == n ? null : n,
- this.name = null == i ? null : i,
- this[o] = !0,
- null != r && this.add(r)
- }
- a.fromStringWithSourceMap = function (e, t, n) {
- var r = new a,
- o = e.split(s),
- u = 0,
- l = function () {
- return e() + (e() || '');
- function e() {
- return u < o.length ? o[u++] : void 0
- }
- },
- c = 1,
- p = 0,
- h = null;
- return t.eachMapping(function (e) {
- if (null !== h) {
- if (!(c < e.generatedLine)) {
- var t = (n = o[u]).substr(0, e.generatedColumn - p);
- return o[u] = n.substr(e.generatedColumn - p),
- p = e.generatedColumn,
- f(h, t),
- void (h = e)
- }
- f(h, l()),
- c++,
- p = 0
- }
- for (; c < e.generatedLine; ) r.add(l()),
- c++;
- if (p < e.generatedColumn) {
- var n = o[u];
- r.add(n.substr(0, e.generatedColumn)),
- o[u] = n.substr(e.generatedColumn),
- p = e.generatedColumn
- }
- h = e
- }, this),
- u < o.length && (h && f(h, l()), r.add(o.splice(u).join(''))),
- t.sources.forEach(function (e) {
- var s = t.sourceContentFor(e);
- null != s && (null != n && (e = i.join(n, e)), r.setSourceContent(e, s))
- }),
- r;
- function f(e, t) {
- if (null === e || void 0 === e.source) r.add(t);
- else {
- var s = n ? i.join(n, e.source) : e.source;
- r.add(new a(e.originalLine, e.originalColumn, s, t, e.name))
- }
- }
- },
- a.prototype.add = function (e) {
- if (Array.isArray(e)) e.forEach(function (e) {
- this.add(e)
- }, this);
- else {
- if (!e[o] && 'string' != typeof e) throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + e);
- e && this.children.push(e)
- }
- return this
- },
- a.prototype.prepend = function (e) {
- if (Array.isArray(e)) for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]);
- else {
- if (!e[o] && 'string' != typeof e) throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got ' + e);
- this.children.unshift(e)
- }
- return this
- },
- a.prototype.walk = function (e) {
- for (var t, n = 0, r = this.children.length; n < r; n++) (t = this.children[n]) [o] ? t.walk(e) : '' !== t && e(t, {
- source: this.source,
- line: this.line,
- column: this.column,
- name: this.name
- })
- },
- a.prototype.join = function (e) {
- var t,
- n,
- r = this.children.length;
- if (r > 0) {
- for (t = [
- ], n = 0; n < r - 1; n++) t.push(this.children[n]),
- t.push(e);
- t.push(this.children[n]),
- this.children = t
- }
- return this
- },
- a.prototype.replaceRight = function (e, t) {
- var n = this.children[this.children.length - 1];
- return n[o] ? n.replaceRight(e, t) : 'string' == typeof n ? this.children[this.children.length - 1] = n.replace(e, t) : this.children.push(''.replace(e, t)),
- this
- },
- a.prototype.setSourceContent = function (e, t) {
- this.sourceContents[i.toSetString(e)] = t
- },
- a.prototype.walkSourceContents = function (e) {
- for (var t = 0, n = this.children.length; t < n; t++) this.children[t][o] && this.children[t].walkSourceContents(e);
- var r = Object.keys(this.sourceContents);
- for (t = 0, n = r.length; t < n; t++) e(i.fromSetString(r[t]), this.sourceContents[r[t]])
- },
- a.prototype.toString = function () {
- var e = '';
- return this.walk(function (t) {
- e += t
- }),
- e
- },
- a.prototype.toStringWithSourceMap = function (e) {
- var t = {
- code: '',
- line: 1,
- column: 0
- },
- n = new r(e),
- i = !1,
- s = null,
- o = null,
- a = null,
- u = null;
- return this.walk(function (e, r) {
- t.code += e,
- null !== r.source && null !== r.line && null !== r.column ? (s === r.source && o === r.line && a === r.column && u === r.name || n.addMapping({
- source: r.source,
- original: {
- line: r.line,
- column: r.column
- },
- generated: {
- line: t.line,
- column: t.column
- },
- name: r.name
- }), s = r.source, o = r.line, a = r.column, u = r.name, i = !0) : i && (n.addMapping({
- generated: {
- line: t.line,
- column: t.column
- }
- }), s = null, i = !1);
- for (var l = 0, c = e.length; l < c; l++) 10 === e.charCodeAt(l) ? (t.line++, t.column = 0, l + 1 === c ? (s = null, i = !1) : i && n.addMapping({
- source: r.source,
- original: {
- line: r.line,
- column: r.column
- },
- generated: {
- line: t.line,
- column: t.column
- },
- name: r.name
- })) : t.column++
- }),
- this.walkSourceContents(function (e, t) {
- n.setSourceContent(e, t)
- }),
- {
- code: t.code,
- map: n
- }
- },
- n.SourceNode = a
- },
- {
- './source-map-generator': 418,
- './util': 420
- }
- ],
- 420: [
- function (e, t, n) {
- n.getArg = function (e, t, n) {
- if (t in e) return e[t];
- if (3 === arguments.length) return n;
- throw new Error('"' + t + '" is a required argument.')
- };
- var r = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,
- i = /^data:.+\,.+$/;
- function s(e) {
- var t = e.match(r);
- return t ? {
- scheme: t[1],
- auth: t[2],
- host: t[3],
- port: t[4],
- path: t[5]
- }
- : null
- }
- function o(e) {
- var t = '';
- return e.scheme && (t += e.scheme + ':'),
- t += '//',
- e.auth && (t += e.auth + '@'),
- e.host && (t += e.host),
- e.port && (t += ':' + e.port),
- e.path && (t += e.path),
- t
- }
- function a(e) {
- var t = e,
- r = s(e);
- if (r) {
- if (!r.path) return e;
- t = r.path
- }
- for (var i, a = n.isAbsolute(t), u = t.split(/\/+/), l = 0, c = u.length - 1; c >= 0; c--) '.' === (i = u[c]) ? u.splice(c, 1) : '..' === i ? l++ : l > 0 && ('' === i ? (u.splice(c + 1, l), l = 0) : (u.splice(c, 2), l--));
- return '' === (t = u.join('/')) && (t = a ? '/' : '.'),
- r ? (r.path = t, o(r)) : t
- }
- n.urlParse = s,
- n.urlGenerate = o,
- n.normalize = a,
- n.join = function (e, t) {
- '' === e && (e = '.'),
- '' === t && (t = '.');
- var n = s(t),
- r = s(e);
- if (r && (e = r.path || '/'), n && !n.scheme) return r && (n.scheme = r.scheme),
- o(n);
- if (n || t.match(i)) return t;
- if (r && !r.host && !r.path) return r.host = t,
- o(r);
- var u = '/' === t.charAt(0) ? t : a(e.replace(/\/+$/, '') + '/' + t);
- return r ? (r.path = u, o(r)) : u
- },
- n.isAbsolute = function (e) {
- return '/' === e.charAt(0) || !!e.match(r)
- },
- n.relative = function (e, t) {
- '' === e && (e = '.'),
- e = e.replace(/\/$/, '');
- for (var n = 0; 0 !== t.indexOf(e + '/'); ) {
- var r = e.lastIndexOf('/');
- if (r < 0) return t;
- if ((e = e.slice(0, r)).match(/^([^\/]+:\/)?\/*$/)) return t;
- ++n
- }
- return Array(n + 1).join('../') + t.substr(e.length + 1)
- };
- var u = !('__proto__' in Object.create(null));
- function l(e) {
- return e
- }
- function c(e) {
- if (!e) return !1;
- var t = e.length;
- if (t < 9) return !1;
- if (95 !== e.charCodeAt(t - 1) || 95 !== e.charCodeAt(t - 2) || 111 !== e.charCodeAt(t - 3) || 116 !== e.charCodeAt(t - 4) || 111 !== e.charCodeAt(t - 5) || 114 !== e.charCodeAt(t - 6) || 112 !== e.charCodeAt(t - 7) || 95 !== e.charCodeAt(t - 8) || 95 !== e.charCodeAt(t - 9)) return !1;
- for (var n = t - 10; n >= 0; n--) if (36 !== e.charCodeAt(n)) return !1;
- return !0
- }
- function p(e, t) {
- return e === t ? 0 : e > t ? 1 : - 1
- }
- n.toSetString = u ? l : function (e) {
- return c(e) ? '$' + e : e
- },
- n.fromSetString = u ? l : function (e) {
- return c(e) ? e.slice(1) : e
- },
- n.compareByOriginalPositions = function (e, t, n) {
- var r = e.source - t.source;
- return 0 !== r ? r : 0 != (r = e.originalLine - t.originalLine) ? r : 0 != (r = e.originalColumn - t.originalColumn) || n ? r : 0 != (r = e.generatedColumn - t.generatedColumn) ? r : 0 != (r = e.generatedLine - t.generatedLine) ? r : e.name - t.name
- },
- n.compareByGeneratedPositionsDeflated = function (e, t, n) {
- var r = e.generatedLine - t.generatedLine;
- return 0 !== r ? r : 0 != (r = e.generatedColumn - t.generatedColumn) || n ? r : 0 != (r = e.source - t.source) ? r : 0 != (r = e.originalLine - t.originalLine) ? r : 0 != (r = e.originalColumn - t.originalColumn) ? r : e.name - t.name
- },
- n.compareByGeneratedPositionsInflated = function (e, t) {
- var n = e.generatedLine - t.generatedLine;
- return 0 !== n ? n : 0 != (n = e.generatedColumn - t.generatedColumn) ? n : 0 !== (n = p(e.source, t.source)) ? n : 0 != (n = e.originalLine - t.originalLine) ? n : 0 != (n = e.originalColumn - t.originalColumn) ? n : p(e.name, t.name)
- }
- },
- {
- }
- ],
- 421: [
- function (e, t, n) {
- arguments[4][149][0].apply(n, arguments)
- },
- {
- './lib/source-map-consumer': 417,
- './lib/source-map-generator': 418,
- './lib/source-node': 419,
- dup: 149
- }
- ],
- 422: [
- function (e, t, n) {
- 'use strict';
- function r(e) {
- if (!Array.isArray(e)) throw new TypeError('tokens must be passed to TokenStream as an array.');
- this._tokens = e
- }
- t.exports = r,
- r.prototype.lookahead = function (e) {
- if (this._tokens.length <= e) throw new Error('Cannot read past the end of a stream');
- return this._tokens[e]
- },
- r.prototype.peek = function () {
- if (0 === this._tokens.length) throw new Error('Cannot read past the end of a stream');
- return this._tokens[0]
- },
- r.prototype.advance = function () {
- if (0 === this._tokens.length) throw new Error('Cannot read past the end of a stream');
- return this._tokens.shift()
- },
- r.prototype.defer = function (e) {
- this._tokens.unshift(e)
- }
- },
- {
- }
- ],
- 423: [
- function (e, t, n) {
- (function (t) {
- var r = e('util'),
- i = e('source-map'),
- s = n;
- function o(e) {
- for (var t = Object.create(null), n = 0; n < e.length; ++n) t[e[n]] = !0;
- return t
- }
- function a(e) {
- return e.split('')
- }
- function u(e, t) {
- return t.indexOf(e) >= 0
- }
- function l(e, t) {
- for (var n = 0, r = t.length; n < r; ++n) if (e(t[n])) return t[n]
- }
- function c(e, t) {
- if (t <= 0) return '';
- if (1 == t) return e;
- var n = c(e, t >> 1);
- return n += n,
- 1 & t && (n += e),
- n
- }
- function p(e) {
- Object.defineProperty(e.prototype, 'stack', {
- get: function () {
- var e = new Error(this.message);
- e.name = this.name;
- try {
- throw e
- } catch (e) {
- return e.stack
- }
- }
- })
- }
- function h(e, t) {
- this.message = e,
- this.defs = t
- }
- function f(e, t, n) {
- !0 === e && (e = {
- });
- var r = e || {
- };
- if (n) for (var i in r) S(r, i) && !S(t, i) && h.croak('`' + i + '` is not a supported option', t);
- for (var i in t) S(t, i) && (r[i] = e && S(e, i) ? e[i] : t[i]);
- return r
- }
- function d(e, t) {
- var n = 0;
- for (var r in t) S(t, r) && (e[r] = t[r], n++);
- return n
- }
- function m() {
- }
- function g() {
- return !1
- }
- function y() {
- return !0
- }
- function v() {
- return this
- }
- function b() {
- return null
- }
- h.prototype = Object.create(Error.prototype),
- h.prototype.constructor = h,
- h.prototype.name = 'DefaultsError',
- p(h),
- h.croak = function (e, t) {
- throw new h(e, t)
- };
- var x = function () {
- function e(e, s, o) {
- var a,
- u = [
- ],
- l = [
- ];
- function c() {
- var c = s(e[a], a),
- p = c instanceof i;
- return p && (c = c.v),
- c instanceof n ? (c = c.v) instanceof r ? l.push.apply(l, o ? c.v.slice().reverse() : c.v) : l.push(c) : c !== t && (c instanceof r ? u.push.apply(u, o ? c.v.slice().reverse() : c.v) : u.push(c)),
- p
- }
- if (e instanceof Array) if (o) {
- for (a = e.length; --a >= 0 && !c(); );
- u.reverse(),
- l.reverse()
- } else for (a = 0; a < e.length && !c(); ++a);
- else for (a in e) if (S(e, a) && c()) break;
- return l.concat(u)
- }
- e.at_top = function (e) {
- return new n(e)
- },
- e.splice = function (e) {
- return new r(e)
- },
- e.last = function (e) {
- return new i(e)
- };
- var t = e.skip = {
- };
- function n(e) {
- this.v = e
- }
- function r(e) {
- this.v = e
- }
- function i(e) {
- this.v = e
- }
- return e
- }();
- function A(e, t) {
- e.indexOf(t) < 0 && e.push(t)
- }
- function E(e, t) {
- return e.replace(/\{(.+?)\}/g, function (e, n) {
- return t && t[n]
- })
- }
- function _(e, t) {
- for (var n = e.length; --n >= 0; ) e[n] === t && e.splice(n, 1)
- }
- function C(e, t) {
- if (e.length < 2) return e.slice();
- return function e(n) {
- if (n.length <= 1) return n;
- var r = Math.floor(n.length / 2),
- i = n.slice(0, r),
- s = n.slice(r);
- return function (e, n) {
- for (var r = [
- ], i = 0, s = 0, o = 0; i < e.length && s < n.length; ) t(e[i], n[s]) <= 0 ? r[o++] = e[i++] : r[o++] = n[s++];
- return i < e.length && r.push.apply(r, e.slice(i)),
- s < n.length && r.push.apply(r, n.slice(s)),
- r
- }(i = e(i), s = e(s))
- }(e)
- }
- function w(e) {
- e instanceof Array || (e = e.split(' '));
- var t = '',
- n = [
- ];
- e: for (var r = 0; r < e.length; ++r) {
- for (var i = 0; i < n.length; ++i) if (n[i][0].length == e[r].length) {
- n[i].push(e[r]);
- continue e
- }
- n.push([e[r]])
- }
- function s(e) {
- return JSON.stringify(e).replace(/[\u2028\u2029]/g, function (e) {
- switch (e) {
- case '\u2028':
- return '\\u2028';
- case '\u2029':
- return '\\u2029'
- }
- return e
- })
- }
- function o(e) {
- if (1 == e.length) return t += 'return str === ' + s(e[0]) + ';';
- t += 'switch(str){';
- for (var n = 0; n < e.length; ++n) t += 'case ' + s(e[n]) + ':';
- t += 'return true}return false;'
- }
- if (n.length > 3) {
- n.sort(function (e, t) {
- return t.length - e.length
- }),
- t += 'switch(str.length){';
- for (r = 0; r < n.length; ++r) {
- var a = n[r];
- t += 'case ' + a[0].length + ':',
- o(a)
- }
- t += '}'
- } else o(e);
- return new Function('str', t)
- }
- function D(e, t) {
- for (var n = e.length; --n >= 0; ) if (!t(e[n])) return !1;
- return !0
- }
- function k() {
- this._values = Object.create(null),
- this._size = 0
- }
- function S(e, t) {
- return Object.prototype.hasOwnProperty.call(e, t)
- }
- function T(e) {
- for (var t, n = e.parent( - 1), r = 0; t = e.parent(r); r++) {
- if (t instanceof P && t.body === n) return !0;
- if (!(t instanceof _e && t.car === n || t instanceof Ae && t.expression === n && !(t instanceof Ee) || t instanceof we && t.expression === n || t instanceof De && t.expression === n || t instanceof Oe && t.condition === n || t instanceof Fe && t.left === n || t instanceof Te && t.expression === n)) return !1;
- n = t
- }
- }
- function F(e, t, r, i) {
- arguments.length < 4 && (i = B);
- var s = t = t ? t.split(/\s+/) : [
- ];
- i && i.PROPS && (t = t.concat(i.PROPS));
- for (var o = 'return function AST_' + e + '(props){ if (props) { ', a = t.length; --a >= 0; ) o += 'this.' + t[a] + ' = props.' + t[a] + ';';
- var u = i && new i;
- (u && u.initialize || r && r.initialize) && (o += 'this.initialize();'),
- o += '}}';
- var l = new Function(o) ();
- if (u && (l.prototype = u, l.BASE = i), i && i.SUBCLASSES.push(l), l.prototype.CTOR = l, l.PROPS = t || null, l.SELF_PROPS = s, l.SUBCLASSES = [
- ], e && (l.prototype.TYPE = l.TYPE = e), r) for (a in r) S(r, a) && (/^\$/.test(a) ? l[a.substr(1)] = r[a] : l.prototype[a] = r[a]);
- return l.DEFMETHOD = function (e, t) {
- this.prototype[e] = t
- },
- void 0 !== n && (n['AST_' + e] = l),
- l
- }
- k.prototype = {
- set: function (e, t) {
- return this.has(e) || ++this._size,
- this._values['$' + e] = t,
- this
- },
- add: function (e, t) {
- return this.has(e) ? this.get(e).push(t) : this.set(e, [
- t
- ]),
- this
- },
- get: function (e) {
- return this._values['$' + e]
- },
- del: function (e) {
- return this.has(e) && (--this._size, delete this._values['$' + e]),
- this
- },
- has: function (e) {
- return '$' + e in this._values
- },
- each: function (e) {
- for (var t in this._values) e(this._values[t], t.substr(1))
- },
- size: function () {
- return this._size
- },
- map: function (e) {
- var t = [
- ];
- for (var n in this._values) t.push(e(this._values[n], n.substr(1)));
- return t
- },
- toObject: function () {
- return this._values
- }
- },
- k.fromObject = function (e) {
- var t = new k;
- return t._size = d(t._values, e),
- t
- };
- var O = F('Token', 'type value line col pos endline endcol endpos nlb comments_before file raw', {
- }, null),
- B = F('Node', 'start end', {
- _clone: function (e) {
- if (e) {
- var t = this.clone();
- return t.transform(new Ht(function (e) {
- if (e !== t) return e.clone(!0)
- }))
- }
- return new this.CTOR(this)
- },
- clone: function (e) {
- return this._clone(e)
- },
- $documentation: 'Base class of all AST nodes',
- $propdoc: {
- start: '[AST_Token] The first token of this node',
- end: '[AST_Token] The last token of this node'
- },
- _walk: function (e) {
- return e._visit(this)
- },
- walk: function (e) {
- return this._walk(e)
- }
- }, null);
- B.warn_function = null,
- B.warn = function (e, t) {
- B.warn_function && B.warn_function(E(e, t))
- };
- var P = F('Statement', null, {
- $documentation: 'Base class of all statements'
- }),
- N = F('Debugger', null, {
- $documentation: 'Represents a debugger statement'
- }, P),
- R = F('Directive', 'value scope quote', {
- $documentation: 'Represents a directive, like "use strict";',
- $propdoc: {
- value: '[string] The value of this directive as a plain string (it\'s not an AST_String!)',
- scope: '[AST_Scope/S] The scope that this directive affects',
- quote: '[string] the original quote character'
- }
- }, P),
- L = F('SimpleStatement', 'body', {
- $documentation: 'A statement consisting of an expression, i.e. a = 1 + 2',
- $propdoc: {
- body: '[AST_Node] an expression node (should not be instanceof AST_Statement)'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.body._walk(e)
- })
- }
- }, P);
- function I(e, t) {
- var n = e.body;
- if (n instanceof P) n._walk(t);
- else for (var r = 0, i = n.length; r < i; r++) n[r]._walk(t)
- }
- var j = F('Block', 'body', {
- $documentation: 'A body of statements (usually bracketed)',
- $propdoc: {
- body: '[AST_Statement*] an array of statements'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- I(this, e)
- })
- }
- }, P),
- M = F('BlockStatement', null, {
- $documentation: 'A block statement'
- }, j),
- U = F('EmptyStatement', null, {
- $documentation: 'The empty statement (empty block or simply a semicolon)',
- _walk: function (e) {
- return e._visit(this)
- }
- }, P),
- V = F('StatementWithBody', 'body', {
- $documentation: 'Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`',
- $propdoc: {
- body: '[AST_Statement] the body; this should always be present, even if it\'s an AST_EmptyStatement'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.body._walk(e)
- })
- }
- }, P),
- z = F('LabeledStatement', 'label', {
- $documentation: 'Statement with a label',
- $propdoc: {
- label: '[AST_Label] a label definition'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.label._walk(e),
- this.body._walk(e)
- })
- },
- clone: function (e) {
- var t = this._clone(e);
- if (e) {
- var n = t.label,
- r = this.label;
- t.walk(new pt(function (e) {
- e instanceof oe && e.label && e.label.thedef === r && (e.label.thedef = n, n.references.push(e))
- }))
- }
- return t
- }
- }, V),
- q = F('IterationStatement', null, {
- $documentation: 'Internal class. All loops inherit from it.'
- }, V),
- K = F('DWLoop', 'condition', {
- $documentation: 'Base class for do/while statements',
- $propdoc: {
- condition: '[AST_Node] the loop condition. Should not be instanceof AST_Statement'
- }
- }, q),
- $ = F('Do', null, {
- $documentation: 'A `do` statement',
- _walk: function (e) {
- return e._visit(this, function () {
- this.body._walk(e),
- this.condition._walk(e)
- })
- }
- }, K),
- Y = F('While', null, {
- $documentation: 'A `while` statement',
- _walk: function (e) {
- return e._visit(this, function () {
- this.condition._walk(e),
- this.body._walk(e)
- })
- }
- }, K),
- W = F('For', 'init condition step', {
- $documentation: 'A `for` statement',
- $propdoc: {
- init: '[AST_Node?] the `for` initialization code, or null if empty',
- condition: '[AST_Node?] the `for` termination clause, or null if empty',
- step: '[AST_Node?] the `for` update clause, or null if empty'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.init && this.init._walk(e),
- this.condition && this.condition._walk(e),
- this.step && this.step._walk(e),
- this.body._walk(e)
- })
- }
- }, q),
- G = F('ForIn', 'init name object', {
- $documentation: 'A `for ... in` statement',
- $propdoc: {
- init: '[AST_Node] the `for/in` initialization code',
- name: '[AST_SymbolRef?] the loop variable, only if `init` is AST_Var',
- object: '[AST_Node] the object that we\'re looping through'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.init._walk(e),
- this.object._walk(e),
- this.body._walk(e)
- })
- }
- }, q),
- H = F('With', 'expression', {
- $documentation: 'A `with` statement',
- $propdoc: {
- expression: '[AST_Node] the `with` expression'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e),
- this.body._walk(e)
- })
- }
- }, V),
- X = F('Scope', 'directives variables functions uses_with uses_eval parent_scope enclosed cname', {
- $documentation: 'Base class for all statements introducing a lexical scope',
- $propdoc: {
- directives: '[string*/S] an array of directives declared in this scope',
- variables: '[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope',
- functions: '[Object/S] like `variables`, but only lists function declarations',
- uses_with: '[boolean/S] tells whether this scope uses the `with` statement',
- uses_eval: '[boolean/S] tells whether this scope contains a direct call to the global `eval`',
- parent_scope: '[AST_Scope?/S] link to the parent scope',
- enclosed: '[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes',
- cname: '[integer/S] current index for mangling variables (used internally by the mangler)'
- }
- }, j),
- J = F('Toplevel', 'globals', {
- $documentation: 'The toplevel scope',
- $propdoc: {
- globals: '[Object/S] a map of name -> SymbolDef for all undeclared names'
- },
- wrap_enclose: function (e) {
- var t = this,
- n = [
- ],
- r = [
- ];
- e.forEach(function (e) {
- var t = e.lastIndexOf(':');
- n.push(e.substr(0, t)),
- r.push(e.substr(t + 1))
- });
- var i = '(function(' + r.join(',') + '){ \'$ORIG\'; })(' + n.join(',') + ')';
- return i = (i = Gt(i)).transform(new Ht(function (e) {
- if (e instanceof R && '$ORIG' == e.value) return x.splice(t.body)
- }))
- },
- wrap_commonjs: function (e, t) {
- var n = this,
- r = [
- ];
- t && (n.figure_out_scope(), n.walk(new pt(function (e) {
- e instanceof Ve && e.definition().global && (l(function (t) {
- return t.name == e.name
- }, r) || r.push(e))
- })));
- var i = '(function(exports, global){ \'$ORIG\'; \'$EXPORTS\'; global[\'' + e + '\'] = exports; }({}, (function(){return this}())))';
- return i = (i = Gt(i)).transform(new Ht(function (e) {
- if (e instanceof R) switch (e.value) {
- case '$ORIG':
- return x.splice(n.body);
- case '$EXPORTS':
- var t = [
- ];
- return r.forEach(function (e) {
- t.push(new L({
- body: new Be({
- left: new De({
- expression: new He({
- name: 'exports'
- }),
- property: new Ze({
- value: e.name
- })
- }),
- operator: '=',
- right: new He(e)
- })
- }))
- }),
- x.splice(t)
- }
- }))
- }
- }, X),
- Q = F('Lambda', 'name argnames uses_arguments', {
- $documentation: 'Base class for functions',
- $propdoc: {
- name: '[AST_SymbolDeclaration?] the name of this function',
- argnames: '[AST_SymbolFunarg*] array of function arguments',
- uses_arguments: '[boolean/S] tells whether this function accesses the arguments array'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.name && this.name._walk(e);
- for (var t = this.argnames, n = 0, r = t.length; n < r; n++) t[n]._walk(e);
- I(this, e)
- })
- }
- }, X),
- Z = F('Accessor', null, {
- $documentation: 'A setter/getter function. The `name` property is always null.'
- }, Q),
- ee = F('Function', null, {
- $documentation: 'A function expression'
- }, Q),
- te = F('Defun', null, {
- $documentation: 'A function definition'
- }, Q),
- ne = F('Jump', null, {
- $documentation: 'Base class for “jumps” (for now that\'s `return`, `throw`, `break` and `continue`)'
- }, P),
- re = F('Exit', 'value', {
- $documentation: 'Base class for “exits” (`return` and `throw`)',
- $propdoc: {
- value: '[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return'
- },
- _walk: function (e) {
- return e._visit(this, this.value && function () {
- this.value._walk(e)
- })
- }
- }, ne),
- ie = F('Return', null, {
- $documentation: 'A `return` statement'
- }, re),
- se = F('Throw', null, {
- $documentation: 'A `throw` statement'
- }, re),
- oe = F('LoopControl', 'label', {
- $documentation: 'Base class for loop control statements (`break` and `continue`)',
- $propdoc: {
- label: '[AST_LabelRef?] the label, or null if none'
- },
- _walk: function (e) {
- return e._visit(this, this.label && function () {
- this.label._walk(e)
- })
- }
- }, ne),
- ae = F('Break', null, {
- $documentation: 'A `break` statement'
- }, oe),
- ue = F('Continue', null, {
- $documentation: 'A `continue` statement'
- }, oe),
- le = F('If', 'condition alternative', {
- $documentation: 'A `if` statement',
- $propdoc: {
- condition: '[AST_Node] the `if` condition',
- alternative: '[AST_Statement?] the `else` part, or null if not present'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.condition._walk(e),
- this.body._walk(e),
- this.alternative && this.alternative._walk(e)
- })
- }
- }, V),
- ce = F('Switch', 'expression', {
- $documentation: 'A `switch` statement',
- $propdoc: {
- expression: '[AST_Node] the `switch` “discriminant”'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e),
- I(this, e)
- })
- }
- }, j),
- pe = F('SwitchBranch', null, {
- $documentation: 'Base class for `switch` branches'
- }, j),
- he = F('Default', null, {
- $documentation: 'A `default` switch branch'
- }, pe),
- fe = F('Case', 'expression', {
- $documentation: 'A `case` switch branch',
- $propdoc: {
- expression: '[AST_Node] the `case` expression'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e),
- I(this, e)
- })
- }
- }, pe),
- de = F('Try', 'bcatch bfinally', {
- $documentation: 'A `try` statement',
- $propdoc: {
- bcatch: '[AST_Catch?] the catch block, or null if not present',
- bfinally: '[AST_Finally?] the finally block, or null if not present'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- I(this, e),
- this.bcatch && this.bcatch._walk(e),
- this.bfinally && this.bfinally._walk(e)
- })
- }
- }, j),
- me = F('Catch', 'argname', {
- $documentation: 'A `catch` node; only makes sense as part of a `try` statement',
- $propdoc: {
- argname: '[AST_SymbolCatch] symbol for the exception'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.argname._walk(e),
- I(this, e)
- })
- }
- }, j),
- ge = F('Finally', null, {
- $documentation: 'A `finally` node; only makes sense as part of a `try` statement'
- }, j),
- ye = F('Definitions', 'definitions', {
- $documentation: 'Base class for `var` or `const` nodes (variable declarations/initializations)',
- $propdoc: {
- definitions: '[AST_VarDef*] array of variable definitions'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- for (var t = this.definitions, n = 0, r = t.length; n < r; n++) t[n]._walk(e)
- })
- }
- }, P),
- ve = F('Var', null, {
- $documentation: 'A `var` statement'
- }, ye),
- be = F('Const', null, {
- $documentation: 'A `const` statement'
- }, ye),
- xe = F('VarDef', 'name value', {
- $documentation: 'A variable declaration; only appears in a AST_Definitions node',
- $propdoc: {
- name: '[AST_SymbolVar|AST_SymbolConst] name of the variable',
- value: '[AST_Node?] initializer, or null of there\'s no initializer'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.name._walk(e),
- this.value && this.value._walk(e)
- })
- }
- }),
- Ae = F('Call', 'expression args', {
- $documentation: 'A function call expression',
- $propdoc: {
- expression: '[AST_Node] expression to invoke as function',
- args: '[AST_Node*] array of arguments'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e);
- for (var t = this.args, n = 0, r = t.length; n < r; n++) t[n]._walk(e)
- })
- }
- }),
- Ee = F('New', null, {
- $documentation: 'An object instantiation. Derives from a function call since it has exactly the same properties'
- }, Ae),
- _e = F('Seq', 'car cdr', {
- $documentation: 'A sequence expression (two comma-separated expressions)',
- $propdoc: {
- car: '[AST_Node] first element in sequence',
- cdr: '[AST_Node] second element in sequence'
- },
- $cons: function (e, t) {
- var n = new _e(e);
- return n.car = e,
- n.cdr = t,
- n
- },
- $from_array: function (e) {
- if (0 == e.length) return null;
- if (1 == e.length) return e[0].clone();
- for (var t = null, n = e.length; --n >= 0; ) t = _e.cons(e[n], t);
- for (var r = t; r; ) {
- if (r.cdr && !r.cdr.cdr) {
- r.cdr = r.cdr.car;
- break
- }
- r = r.cdr
- }
- return t
- },
- to_array: function () {
- for (var e = this, t = [
- ]; e; ) {
- if (t.push(e.car), e.cdr && !(e.cdr instanceof _e)) {
- t.push(e.cdr);
- break
- }
- e = e.cdr
- }
- return t
- },
- add: function (e) {
- for (var t = this; t; ) {
- if (!(t.cdr instanceof _e)) {
- var n = _e.cons(t.cdr, e);
- return t.cdr = n
- }
- t = t.cdr
- }
- },
- len: function () {
- return this.cdr instanceof _e ? this.cdr.len() + 1 : 2
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.car._walk(e),
- this.cdr && this.cdr._walk(e)
- })
- }
- }),
- Ce = F('PropAccess', 'expression property', {
- $documentation: 'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`',
- $propdoc: {
- expression: '[AST_Node] the “container” expression',
- property: '[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it\'s an arbitrary AST_Node'
- }
- }),
- we = F('Dot', null, {
- $documentation: 'A dotted property access expression',
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e)
- })
- }
- }, Ce),
- De = F('Sub', null, {
- $documentation: 'Index-style property access, i.e. `a["foo"]`',
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e),
- this.property._walk(e)
- })
- }
- }, Ce),
- ke = F('Unary', 'operator expression', {
- $documentation: 'Base class for unary expressions',
- $propdoc: {
- operator: '[string] the operator',
- expression: '[AST_Node] expression that this unary operator applies to'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.expression._walk(e)
- })
- }
- }),
- Se = F('UnaryPrefix', null, {
- $documentation: 'Unary prefix expression, i.e. `typeof i` or `++i`'
- }, ke),
- Te = F('UnaryPostfix', null, {
- $documentation: 'Unary postfix expression, i.e. `i++`'
- }, ke),
- Fe = F('Binary', 'left operator right', {
- $documentation: 'Binary expression, i.e. `a + b`',
- $propdoc: {
- left: '[AST_Node] left-hand side expression',
- operator: '[string] the operator',
- right: '[AST_Node] right-hand side expression'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.left._walk(e),
- this.right._walk(e)
- })
- }
- }),
- Oe = F('Conditional', 'condition consequent alternative', {
- $documentation: 'Conditional expression using the ternary operator, i.e. `a ? b : c`',
- $propdoc: {
- condition: '[AST_Node]',
- consequent: '[AST_Node]',
- alternative: '[AST_Node]'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.condition._walk(e),
- this.consequent._walk(e),
- this.alternative._walk(e)
- })
- }
- }),
- Be = F('Assign', null, {
- $documentation: 'An assignment expression — `a = b + 5`'
- }, Fe),
- Pe = F('Array', 'elements', {
- $documentation: 'An array literal',
- $propdoc: {
- elements: '[AST_Node*] array of elements'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- for (var t = this.elements, n = 0, r = t.length; n < r; n++) t[n]._walk(e)
- })
- }
- }),
- Ne = F('Object', 'properties', {
- $documentation: 'An object literal',
- $propdoc: {
- properties: '[AST_ObjectProperty*] array of properties'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- for (var t = this.properties, n = 0, r = t.length; n < r; n++) t[n]._walk(e)
- })
- }
- }),
- Re = F('ObjectProperty', 'key value', {
- $documentation: 'Base class for literal object properties',
- $propdoc: {
- key: '[string] the property name converted to a string for ObjectKeyVal. For setters and getters this is an AST_SymbolAccessor.',
- value: '[AST_Node] property value. For setters and getters this is an AST_Accessor.'
- },
- _walk: function (e) {
- return e._visit(this, function () {
- this.value._walk(e)
- })
- }
- }),
- Le = F('ObjectKeyVal', 'quote', {
- $documentation: 'A key: value object property',
- $propdoc: {
- quote: '[string] the original quote character'
- }
- }, Re),
- Ie = F('ObjectSetter', null, {
- $documentation: 'An object setter property'
- }, Re),
- je = F('ObjectGetter', null, {
- $documentation: 'An object getter property'
- }, Re),
- Me = F('Symbol', 'scope name thedef', {
- $propdoc: {
- name: '[string] name of this symbol',
- scope: '[AST_Scope/S] the current scope (not necessarily the definition scope)',
- thedef: '[SymbolDef/S] the definition of this symbol'
- },
- $documentation: 'Base class for all symbols'
- }),
- Ue = F('SymbolAccessor', null, {
- $documentation: 'The name of a property accessor (setter/getter function)'
- }, Me),
- Ve = F('SymbolDeclaration', 'init', {
- $documentation: 'A declaration symbol (symbol in var/const, function name or argument, symbol in catch)'
- }, Me),
- ze = F('SymbolVar', null, {
- $documentation: 'Symbol defining a variable'
- }, Ve),
- qe = F('SymbolConst', null, {
- $documentation: 'A constant declaration'
- }, Ve),
- Ke = F('SymbolFunarg', null, {
- $documentation: 'Symbol naming a function argument'
- }, ze),
- $e = F('SymbolDefun', null, {
- $documentation: 'Symbol defining a function'
- }, Ve),
- Ye = F('SymbolLambda', null, {
- $documentation: 'Symbol naming a function expression'
- }, Ve),
- We = F('SymbolCatch', null, {
- $documentation: 'Symbol naming the exception in catch'
- }, Ve),
- Ge = F('Label', 'references', {
- $documentation: 'Symbol naming a label (declaration)',
- $propdoc: {
- references: '[AST_LoopControl*] a list of nodes referring to this label'
- },
- initialize: function () {
- this.references = [
- ],
- this.thedef = this
- }
- }, Me),
- He = F('SymbolRef', null, {
- $documentation: 'Reference to some symbol (not definition/declaration)'
- }, Me),
- Xe = F('LabelRef', null, {
- $documentation: 'Reference to a label symbol'
- }, Me),
- Je = F('This', null, {
- $documentation: 'The `this` symbol'
- }, Me),
- Qe = F('Constant', null, {
- $documentation: 'Base class for all constants',
- getValue: function () {
- return this.value
- }
- }),
- Ze = F('String', 'value quote', {
- $documentation: 'A string literal',
- $propdoc: {
- value: '[string] the contents of this string',
- quote: '[string] the original quote character'
- }
- }, Qe),
- et = F('Number', 'value literal', {
- $documentation: 'A number literal',
- $propdoc: {
- value: '[number] the numeric value',
- literal: '[string] numeric value as string (optional)'
- }
- }, Qe),
- tt = F('RegExp', 'value', {
- $documentation: 'A regexp literal',
- $propdoc: {
- value: '[RegExp] the actual regexp'
- }
- }, Qe),
- nt = F('Atom', null, {
- $documentation: 'Base class for atoms'
- }, Qe),
- rt = F('Null', null, {
- $documentation: 'The `null` atom',
- value: null
- }, nt),
- it = F('NaN', null, {
- $documentation: 'The impossible value',
- value: NaN
- }, nt),
- st = F('Undefined', null, {
- $documentation: 'The `undefined` value',
- value: void 0
- }, nt),
- ot = F('Hole', null, {
- $documentation: 'A hole in an array',
- value: void 0
- }, nt),
- at = F('Infinity', null, {
- $documentation: 'The `Infinity` value',
- value: 1 / 0
- }, nt),
- ut = F('Boolean', null, {
- $documentation: 'Base class for booleans'
- }, nt),
- lt = F('False', null, {
- $documentation: 'The `false` atom',
- value: !1
- }, ut),
- ct = F('True', null, {
- $documentation: 'The `true` atom',
- value: !0
- }, ut);
- function pt(e) {
- this.visit = e,
- this.stack = [
- ],
- this.directives = Object.create(null)
- }
- pt.prototype = {
- _visit: function (e, t) {
- this.push(e);
- var n = this.visit(e, t ? function () {
- t.call(e)
- }
- : m);
- return !n && t && t.call(e),
- this.pop(e),
- n
- },
- parent: function (e) {
- return this.stack[this.stack.length - 2 - (e || 0)]
- },
- push: function (e) {
- e instanceof Q ? this.directives = Object.create(this.directives) : e instanceof R && !this.directives[e.value] && (this.directives[e.value] = e),
- this.stack.push(e)
- },
- pop: function (e) {
- this.stack.pop(),
- e instanceof Q && (this.directives = Object.getPrototypeOf(this.directives))
- },
- self: function () {
- return this.stack[this.stack.length - 1]
- },
- find_parent: function (e) {
- for (var t = this.stack, n = t.length; --n >= 0; ) {
- var r = t[n];
- if (r instanceof e) return r
- }
- },
- has_directive: function (e) {
- var t = this.directives[e];
- if (t) return t;
- var n = this.stack[this.stack.length - 1];
- if (n instanceof X) for (var r = 0; r < n.body.length; ++r) {
- var i = n.body[r];
- if (!(i instanceof R)) break;
- if (i.value == e) return i
- }
- },
- in_boolean_context: function () {
- for (var e = this.stack, t = e.length, n = e[--t]; t > 0; ) {
- var r = e[--t];
- if (r instanceof le && r.condition === n || r instanceof Oe && r.condition === n || r instanceof K && r.condition === n || r instanceof W && r.condition === n || r instanceof Se && '!' == r.operator && r.expression === n) return !0;
- if (!(r instanceof Fe) || '&&' != r.operator && '||' != r.operator) return !1;
- n = r
- }
- },
- loopcontrol_target: function (e) {
- var t = this.stack;
- if (e.label) for (var n = t.length; --n >= 0; ) {
- if ((r = t[n]) instanceof z && r.label.name == e.label.name) return r.body
- } else for (n = t.length; --n >= 0; ) {
- var r;
- if ((r = t[n]) instanceof q || e instanceof ae && r instanceof ce) return r
- }
- }
- };
- var ht = 'break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with',
- ft = 'false null true',
- dt = 'abstract boolean byte char class double enum export extends final float goto implements import int interface let long native package private protected public short static super synchronized this throws transient volatile yield ' + ft + ' ' + ht,
- mt = 'return new delete throw else case';
- ht = w(ht),
- dt = w(dt),
- mt = w(mt),
- ft = w(ft);
- var gt = w(a('+-*&%=<>!?|~^')),
- yt = /^0x[0-9a-f]+$/i,
- vt = /^0[0-7]+$/,
- bt = w(['in',
- 'instanceof',
- 'typeof',
- 'new',
- 'void',
- 'delete',
- '++',
- '--',
- '+',
- '-',
- '!',
- '~',
- '&',
- '|',
- '^',
- '*',
- '/',
- '%',
- '>>',
- '<<',
- '>>>',
- '<',
- '>',
- '<=',
- '>=',
- '==',
- '===',
- '!=',
- '!==',
- '?',
- '=',
- '+=',
- '-=',
- '/=',
- '*=',
- '%=',
- '>>=',
- '<<=',
- '>>>=',
- '|=',
- '^=',
- '&=',
- '&&',
- '||']),
- xt = w(a('  \n\r\t\f\v​           \u2028\u2029   ')),
- At = w(a('\n\r\u2028\u2029')),
- Et = w(a('[{(,;:')),
- _t = w(a('[]{}(),;:')),
- Ct = w(a('gmsiy')),
- wt = {
- letter: new RegExp('[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]'),
- digit: new RegExp('[\\u0030-\\u0039\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]'),
- non_spacing_mark: new RegExp('[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]'),
- space_combining_mark: new RegExp('[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]'),
- connector_punctuation: new RegExp('[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]')
- };
- function Dt(e) {
- return e >= 97 && e <= 122 || e >= 65 && e <= 90 || e >= 170 && wt.letter.test(String.fromCharCode(e))
- }
- function kt(e) {
- return e >= 48 && e <= 57
- }
- function St(e) {
- return kt(e) || Dt(e)
- }
- function Tt(e) {
- return wt.digit.test(String.fromCharCode(e))
- }
- function Ft(e) {
- return wt.non_spacing_mark.test(e) || wt.space_combining_mark.test(e)
- }
- function Ot(e) {
- return wt.connector_punctuation.test(e)
- }
- function Bt(e) {
- return !dt(e) && /^[a-z_$][a-z0-9_$]*$/i.test(e)
- }
- function Pt(e) {
- return 36 == e || 95 == e || Dt(e)
- }
- function Nt(e) {
- var t = e.charCodeAt(0);
- return Pt(t) || kt(t) || 8204 == t || 8205 == t || Ft(e) || Ot(e) || Tt(t)
- }
- function Rt(e) {
- return /^[a-z_$][a-z0-9_$]*$/i.test(e)
- }
- function Lt(e) {
- if (yt.test(e)) return parseInt(e.substr(2), 16);
- if (vt.test(e)) return parseInt(e.substr(1), 8);
- var t = parseFloat(e);
- return t == e ? t : void 0
- }
- function It(e, t, n, r, i) {
- this.message = e,
- this.filename = t,
- this.line = n,
- this.col = r,
- this.pos = i
- }
- function jt(e, t, n, r, i) {
- throw new It(e, t, n, r, i)
- }
- function Mt(e, t, n) {
- return e.type == t && (null == n || e.value == n)
- }
- It.prototype = Object.create(Error.prototype),
- It.prototype.constructor = It,
- It.prototype.name = 'SyntaxError',
- p(It);
- var Ut = {
- };
- function Vt(e, t, n, r) {
- var i = {
- text: e,
- filename: t,
- pos: 0,
- tokpos: 0,
- line: 1,
- tokline: 0,
- col: 0,
- tokcol: 0,
- newline_before: !1,
- regex_allowed: !1,
- comments_before: [
- ],
- directives: {
- },
- directive_stack: [
- ]
- };
- function s() {
- return i.text.charAt(i.pos)
- }
- function o(e, t) {
- var n = i.text.charAt(i.pos++);
- if (e && !n) throw Ut;
- return At(n) ? (i.newline_before = i.newline_before || !t, ++i.line, i.col = 0, t || '\r' != n || '\n' != s() || (++i.pos, n = '\n')) : ++i.col,
- n
- }
- function a(e) {
- for (; e-- > 0; ) o()
- }
- function u(e) {
- return i.text.substr(i.pos, e.length) == e
- }
- function l() {
- i.tokline = i.line,
- i.tokcol = i.col,
- i.tokpos = i.pos
- }
- var c = !1;
- function p(n, r, s) {
- i.regex_allowed = 'operator' == n && !qt(r) || 'keyword' == n && mt(r) || 'punc' == n && Et(r),
- 'punc' == n && '.' == r ? c = !0 : s || (c = !1);
- var o = {
- type: n,
- value: r,
- line: i.tokline,
- col: i.tokcol,
- pos: i.tokpos,
- endline: i.line,
- endcol: i.col,
- endpos: i.pos,
- nlb: i.newline_before,
- file: t
- };
- if (/^(?:num|string|regexp)$/i.test(n) && (o.raw = e.substring(o.pos, o.endpos)), !s) {
- o.comments_before = i.comments_before,
- i.comments_before = [
- ];
- for (var a = 0, u = o.comments_before.length; a < u; a++) o.nlb = o.nlb || o.comments_before[a].nlb
- }
- return i.newline_before = !1,
- new O(o)
- }
- function h() {
- for (; xt(s()); ) o()
- }
- function f(e) {
- jt(e, t, i.tokline, i.tokcol, i.tokpos)
- }
- function d(e) {
- var t = !1,
- n = !1,
- r = !1,
- i = '.' == e,
- a = function (e) {
- for (var t, n = '', r = 0; (t = s()) && e(t, r++); ) n += o();
- return n
- }(function (s, o) {
- var a = s.charCodeAt(0);
- switch (a) {
- case 120:
- case 88:
- return !r && (r = !0);
- case 101:
- case 69:
- return !!r || !t && (t = n = !0);
- case 45:
- return n || 0 == o && !e;
- case 43:
- return n;
- case n = !1,
- 46:
- return !(i || r || t) && (i = !0)
- }
- return St(a)
- });
- e && (a = e + a),
- vt.test(a) && w.has_directive('use strict') && f('Legacy octal literals are not allowed in strict mode');
- var u = Lt(a);
- if (!isNaN(u)) return p('num', u);
- f('Invalid syntax: ' + a)
- }
- function m(e) {
- var t = o(!0, e);
- switch (t.charCodeAt(0)) {
- case 110:
- return '\n';
- case 114:
- return '\r';
- case 116:
- return '\t';
- case 98:
- return '';
- case 118:
- return '\v';
- case 102:
- return '\f';
- case 120:
- return String.fromCharCode(g(2));
- case 117:
- return String.fromCharCode(g(4));
- case 10:
- return '';
- case 13:
- if ('\n' == s()) return o(!0, e),
- ''
- }
- return t >= '0' && t <= '7' ? function (e) {
- var t = s();
- t >= '0' && t <= '7' && (e += o(!0)) [0] <= '3' && (t = s()) >= '0' && t <= '7' && (e += o(!0));
- if ('0' === e) return '\x00';
- e.length > 0 && w.has_directive('use strict') && f('Legacy octal escape sequences are not allowed in strict mode');
- return String.fromCharCode(parseInt(e, 8))
- }(t) : t
- }
- function g(e) {
- for (var t = 0; e > 0; --e) {
- var n = parseInt(o(!0), 16);
- isNaN(n) && f('Invalid hex-character pattern in string'),
- t = t << 4 | n
- }
- return t
- }
- var y = C('Unterminated string constant', function (e) {
- for (var t = o(), n = ''; ; ) {
- var r = o(!0, !0);
- if ('\\' == r) r = m(!0);
- else if (At(r)) f('Unterminated string constant');
- else if (r == t) break;
- n += r
- }
- var i = p('string', n);
- return i.quote = e,
- i
- });
- function v(e) {
- var t,
- n = i.regex_allowed,
- r = function () {
- for (var e = i.text, t = i.pos, n = i.text.length; t < n; ++t) {
- var r = e[t];
- if (At(r)) return t
- }
- return - 1
- }();
- return - 1 == r ? (t = i.text.substr(i.pos), i.pos = i.text.length) : (t = i.text.substring(i.pos, r), i.pos = r),
- i.col = i.tokcol + (i.pos - i.tokpos),
- i.comments_before.push(p(e, t, !0)),
- i.regex_allowed = n,
- w
- }
- var b = C('Unterminated multiline comment', function () {
- var e = i.regex_allowed,
- t = function (e, t) {
- var n = i.text.indexOf(e, i.pos);
- if (t && - 1 == n) throw Ut;
- return n
- }('*/', !0),
- n = i.text.substring(i.pos, t).replace(/\r\n|\r|\u2028|\u2029/g, '\n');
- return a(n.length + 2),
- i.comments_before.push(p('comment2', n, !0)),
- i.regex_allowed = e,
- w
- });
- function x() {
- for (var e, t, n = !1, r = '', i = !1; null != (e = s()); ) if (n) 'u' != e && f('Expecting UnicodeEscapeSequence -- uXXXX'),
- Nt(e = m()) || f('Unicode char: ' + e.charCodeAt(0) + ' is not valid in identifier'),
- r += e,
- n = !1;
- else if ('\\' == e) i = n = !0,
- o();
- else {
- if (!Nt(e)) break;
- r += o()
- }
- return ht(r) && i && (t = r.charCodeAt(0).toString(16).toUpperCase(), r = '\\u' + '0000'.substr(t.length) + t + r.slice(1)),
- r
- }
- var A = C('Unterminated regular expression', function (e) {
- for (var t, n = !1, r = !1; t = o(!0); ) if (At(t)) f('Unexpected line terminator');
- else if (n) e += '\\' + t,
- n = !1;
- else if ('[' == t) r = !0,
- e += t;
- else if (']' == t && r) r = !1,
- e += t;
- else {
- if ('/' == t && !r) break;
- '\\' == t ? n = !0 : e += t
- }
- var i = x();
- try {
- return p('regexp', new RegExp(e, i))
- } catch (e) {
- f(e.message)
- }
- });
- function E(e) {
- return p('operator', function e(t) {
- if (!s()) return t;
- var n = t + s();
- return bt(n) ? (o(), e(n)) : t
- }(e || o()))
- }
- function _() {
- switch (o(), s()) {
- case '/':
- return o(),
- v('comment1');
- case '*':
- return o(),
- b()
- }
- return i.regex_allowed ? A('') : E('/')
- }
- function C(e, t) {
- return function (n) {
- try {
- return t(n)
- } catch (t) {
- if (t !== Ut) throw t;
- f(e)
- }
- }
- }
- function w(e) {
- if (null != e) return A(e);
- for (r && 0 == i.pos && u('#!') && (l(), a(2), v('comment5')); ; ) {
- if (h(), l(), n) {
- if (u('<!--')) {
- a(4),
- v('comment3');
- continue
- }
- if (u('-->') && i.newline_before) {
- a(3),
- v('comment4');
- continue
- }
- }
- var t = s();
- if (!t) return p('eof');
- var m = t.charCodeAt(0);
- switch (m) {
- case 34:
- case 39:
- return y(t);
- case 46:
- return o(),
- kt(s().charCodeAt(0)) ? d('.') : p('punc', '.');
- case 47:
- var g = _();
- if (g === w) continue;
- return g
- }
- if (kt(m)) return d();
- if (_t(t)) return p('punc', o());
- if (gt(t)) return E();
- if (92 == m || Pt(m)) return void 0,
- b = x(),
- c ? p('name', b) : ft(b) ? p('atom', b) : ht(b) ? bt(b) ? p('operator', b) : p('keyword', b) : p('name', b);
- break
- }
- var b;
- f('Unexpected character \'' + t + '\'')
- }
- return w.context = function (e) {
- return e && (i = e),
- i
- },
- w.add_directive = function (e) {
- i.directive_stack[i.directive_stack.length - 1].push(e),
- void 0 === i.directives[e] ? i.directives[e] = 1 : i.directives[e]++
- },
- w.push_directives_stack = function () {
- i.directive_stack.push([])
- },
- w.pop_directives_stack = function () {
- for (var e = i.directive_stack[i.directive_stack.length - 1], t = 0; t < e.length; t++) i.directives[e[t]]--;
- i.directive_stack.pop()
- },
- w.has_directive = function (e) {
- return void 0 !== i.directives[e] && i.directives[e] > 0
- },
- w
- }
- var zt = w(['typeof',
- 'void',
- 'delete',
- '--',
- '++',
- '!',
- '~',
- '-',
- '+']),
- qt = w(['--',
- '++']),
- Kt = w(['=',
- '+=',
- '-=',
- '/=',
- '*=',
- '%=',
- '>>=',
- '<<=',
- '>>>=',
- '|=',
- '^=',
- '&=']),
- $t = function (e, t) {
- for (var n = 0; n < e.length; ++n) for (var r = e[n], i = 0; i < r.length; ++i) t[r[i]] = n + 1;
- return t
- }([['||'],
- [
- '&&'
- ],
- [
- '|'
- ],
- [
- '^'
- ],
- [
- '&'
- ],
- [
- '==',
- '===',
- '!=',
- '!=='
- ],
- [
- '<',
- '>',
- '<=',
- '>=',
- 'in',
- 'instanceof'
- ],
- [
- '>>',
- '<<',
- '>>>'
- ],
- [
- '+',
- '-'
- ],
- [
- '*',
- '/',
- '%'
- ]], {
- }),
- Yt = o(['for',
- 'do',
- 'while',
- 'switch']),
- Wt = o(['atom',
- 'num',
- 'string',
- 'regexp',
- 'name']);
- function Gt(e, t) {
- t = f(t, {
- bare_returns: !1,
- cli: !1,
- expression: !1,
- filename: null,
- html5_comments: !0,
- shebang: !0,
- strict: !1,
- toplevel: null
- });
- var n = {
- input: 'string' == typeof e ? Vt(e, t.filename, t.html5_comments, t.shebang) : e,
- token: null,
- prev: null,
- peeked: null,
- in_function: 0,
- in_directives: !0,
- in_loop: 0,
- labels: [
- ]
- };
- function r(e, t) {
- return Mt(n.token, e, t)
- }
- function i() {
- return n.peeked || (n.peeked = n.input())
- }
- function s() {
- return n.prev = n.token,
- n.peeked ? (n.token = n.peeked, n.peeked = null) : n.token = n.input(),
- n.in_directives = n.in_directives && ('string' == n.token.type || r('punc', ';')),
- n.token
- }
- function o() {
- return n.prev
- }
- function a(e, t, r, i) {
- var s = n.input.context();
- jt(e, s.filename, null != t ? t : s.tokline, null != r ? r : s.tokcol, null != i ? i : s.tokpos)
- }
- function u(e, t) {
- a(t, e.line, e.col)
- }
- function c(e) {
- null == e && (e = n.token),
- u(e, 'Unexpected token: ' + e.type + ' (' + e.value + ')')
- }
- function p(e, t) {
- if (r(e, t)) return s();
- u(n.token, 'Unexpected token ' + n.token.type + ' «' + n.token.value + '», expected ' + e + ' «' + t + '»')
- }
- function h(e) {
- return p('punc', e)
- }
- function d() {
- return !t.strict && (n.token.nlb || r('eof') || r('punc', '}'))
- }
- function m(e) {
- r('punc', ';') ? s() : e || d() || c()
- }
- function g() {
- h('(');
- var e = pe(!0);
- return h(')'),
- e
- }
- function y(e) {
- return function () {
- var t = n.token,
- r = e(),
- i = o();
- return r.start = t,
- r.end = i,
- r
- }
- }
- function v() {
- (r('operator', '/') || r('operator', '/=')) && (n.peeked = null, n.token = n.input(n.token.value.substr(1)))
- }
- n.token = s();
- var b = y(function () {
- switch (v(), n.token.type) {
- case 'string':
- if (n.in_directives) {
- var e = i();
- - 1 == n.token.raw.indexOf('\\') && (e.nlb || Mt(e, 'eof') || Mt(e, 'punc', ';') || Mt(e, 'punc', '}')) ? n.input.add_directive(n.token.value) : n.in_directives = !1
- }
- var u = n.in_directives,
- f = x();
- return u ? new R(f.body) : f;
- case 'num':
- case 'regexp':
- case 'operator':
- case 'atom':
- return x();
- case 'name':
- return Mt(i(), 'punc', ':') ? function () {
- var e = j(Ge);
- l(function (t) {
- return t.name == e.name
- }, n.labels) && a('Label ' + e.name + ' defined twice');
- h(':'),
- n.labels.push(e);
- var t = b();
- n.labels.pop(),
- t instanceof q || e.references.forEach(function (t) {
- t instanceof ue && (t = t.label.start, a('Continue label `' + e.name + '` refers to non-IterationStatement.', t.line, t.col, t.pos))
- });
- return new z({
- body: t,
- label: e
- })
- }() : x();
- case 'punc':
- switch (n.token.value) {
- case '{':
- return new M({
- start: n.token,
- body: _(),
- end: o()
- });
- case '[':
- case '(':
- return x();
- case ';':
- return n.in_directives = !1,
- s(),
- new U;
- default:
- c()
- }
- case 'keyword':
- switch (n.token.value) {
- case 'break':
- return s(),
- A(ae);
- case 'continue':
- return s(),
- A(ue);
- case 'debugger':
- return s(),
- m(),
- new N;
- case 'do':
- s();
- var y = ye(b);
- p('keyword', 'while');
- var w = g();
- return m(!0),
- new $({
- body: y,
- condition: w
- });
- case 'while':
- return s(),
- new Y({
- condition: g(),
- body: ye(b)
- });
- case 'for':
- return s(),
- function () {
- h('(');
- var e = null;
- if (!r('punc', ';') && (e = r('keyword', 'var') ? (s(), D(!0)) : pe(!0, !0), r('operator', 'in'))) return e instanceof ve && e.definitions.length > 1 && a('Only one variable declaration allowed in for..in loop'),
- s(),
- function (e) {
- var t = e instanceof ve ? e.definitions[0].name : null,
- n = pe(!0);
- return h(')'),
- new G({
- init: e,
- name: t,
- object: n,
- body: ye(b)
- })
- }(e);
- return function (e) {
- h(';');
- var t = r('punc', ';') ? null : pe(!0);
- h(';');
- var n = r('punc', ')') ? null : pe(!0);
- return h(')'),
- new W({
- init: e,
- condition: t,
- step: n,
- body: ye(b)
- })
- }(e)
- }();
- case 'function':
- return s(),
- E(te);
- case 'if':
- return s(),
- function () {
- var e = g(),
- t = b(),
- n = null;
- r('keyword', 'else') && (s(), n = b());
- return new le({
- condition: e,
- body: t,
- alternative: n
- })
- }();
- case 'return':
- 0 != n.in_function || t.bare_returns || a('\'return\' outside of function'),
- s();
- var S = null;
- return r('punc', ';') ? s() : d() || (S = pe(!0), m()),
- new ie({
- value: S
- });
- case 'switch':
- return s(),
- new ce({
- expression: g(),
- body: ye(C)
- });
- case 'throw':
- s(),
- n.token.nlb && a('Illegal newline after \'throw\'');
- S = pe(!0);
- return m(),
- new se({
- value: S
- });
- case 'try':
- return s(),
- function () {
- var e = _(),
- t = null,
- i = null;
- if (r('keyword', 'catch')) {
- var u = n.token;
- s(),
- h('(');
- var l = j(We);
- h(')'),
- t = new me({
- start: u,
- argname: l,
- body: _(),
- end: o()
- })
- }
- if (r('keyword', 'finally')) {
- var u = n.token;
- s(),
- i = new ge({
- start: u,
- body: _(),
- end: o()
- })
- }
- t || i || a('Missing catch/finally blocks');
- return new de({
- body: e,
- bcatch: t,
- bfinally: i
- })
- }();
- case 'var':
- s();
- var T = D();
- return m(),
- T;
- case 'const':
- s();
- T = k();
- return m(),
- T;
- case 'with':
- return n.input.has_directive('use strict') && a('Strict mode may not include a with statement'),
- s(),
- new H({
- expression: g(),
- body: b()
- })
- }
- }
- c()
- });
- function x(e) {
- return new L({
- body: (e = pe(!0), m(), e)
- })
- }
- function A(e) {
- var t,
- r = null;
- d() || (r = j(Xe, !0)),
- null != r ? ((t = l(function (e) {
- return e.name == r.name
- }, n.labels)) || a('Undefined label ' + r.name), r.thedef = t) : 0 == n.in_loop && a(e.TYPE + ' not inside a loop or switch'),
- m();
- var i = new e({
- label: r
- });
- return t && t.references.push(i),
- i
- }
- var E = function (e) {
- var t = e === te,
- i = r('name') ? j(t ? $e : Ye) : null;
- return t && !i && c(),
- h('('),
- new e({
- name: i,
- argnames: function (e, t) {
- for (; !r('punc', ')'); ) e ? e = !1 : h(','),
- t.push(j(Ke));
- return s(),
- t
- }(!0, [
- ]),
- body: function (e, t) {
- ++n.in_function,
- n.in_directives = !0,
- n.input.push_directives_stack(),
- n.in_loop = 0,
- n.labels = [
- ];
- var r = _();
- return n.input.pop_directives_stack(),
- --n.in_function,
- n.in_loop = e,
- n.labels = t,
- r
- }(n.in_loop, n.labels)
- })
- };
- function _() {
- h('{');
- for (var e = [
- ]; !r('punc', '}'); ) r('eof') && c(),
- e.push(b());
- return s(),
- e
- }
- function C() {
- h('{');
- for (var e, t = [
- ], i = null, a = null; !r('punc', '}'); ) r('eof') && c(),
- r('keyword', 'case') ? (a && (a.end = o()), i = [
- ], a = new fe({
- start: (e = n.token, s(), e),
- expression: pe(!0),
- body: i
- }), t.push(a), h(':')) : r('keyword', 'default') ? (a && (a.end = o()), i = [
- ], a = new he({
- start: (e = n.token, s(), h(':'), e),
- body: i
- }), t.push(a)) : (i || c(), i.push(b()));
- return a && (a.end = o()),
- s(),
- t
- }
- function w(e, t) {
- for (var i = [
- ]; i.push(new xe({
- start: n.token,
- name: j(t ? qe : ze),
- value: r('operator', '=') ? (s(), pe(!1, e)) : null,
- end: o()
- })), r('punc', ','); ) s();
- return i
- }
- var D = function (e) {
- return new ve({
- start: o(),
- definitions: w(e, !1),
- end: o()
- })
- },
- k = function () {
- return new be({
- start: o(),
- definitions: w(!1, !0),
- end: o()
- })
- };
- var S = function (e) {
- if (r('operator', 'new')) return function (e) {
- var t = n.token;
- p('operator', 'new');
- var i,
- a = S(!1);
- return r('punc', '(') ? (s(), i = T(')')) : i = [
- ],
- V(new Ee({
- start: t,
- expression: a,
- args: i,
- end: o()
- }), e)
- }(e);
- var t = n.token;
- if (r('punc')) {
- switch (t.value) {
- case '(':
- s();
- var i = pe(!0);
- return i.start = t,
- i.end = n.token,
- h(')'),
- V(i, e);
- case '[':
- return V(F(), e);
- case '{':
- return V(B(), e)
- }
- c()
- }
- if (r('keyword', 'function')) {
- s();
- var u = E(ee);
- return u.start = t,
- u.end = o(),
- V(u, e)
- }
- if (Wt[n.token.type]) return V(function () {
- var e,
- t = n.token;
- switch (t.type) {
- case 'name':
- case 'keyword':
- e = I(He);
- break;
- case 'num':
- e = new et({
- start: t,
- end: t,
- value: t.value
- });
- break;
- case 'string':
- e = new Ze({
- start: t,
- end: t,
- value: t.value,
- quote: t.quote
- });
- break;
- case 'regexp':
- e = new tt({
- start: t,
- end: t,
- value: t.value
- });
- break;
- case 'atom':
- switch (t.value) {
- case 'false':
- e = new lt({
- start: t,
- end: t
- });
- break;
- case 'true':
- e = new ct({
- start: t,
- end: t
- });
- break;
- case 'null':
- e = new rt({
- start: t,
- end: t
- })
- }
- break;
- case 'operator':
- Rt(t.value) || a('Invalid getter/setter name: ' + t.value, t.line, t.col, t.pos),
- e = I(He)
- }
- return s(),
- e
- }(), e);
- c()
- };
- function T(e, t, i) {
- for (var o = !0, a = [
- ]; !r('punc', e) && (o ? o = !1 : h(','), !t || !r('punc', e)); ) r('punc', ',') && i ? a.push(new ot({
- start: n.token,
- end: n.token
- })) : a.push(pe(!1));
- return s(),
- a
- }
- var F = y(function () {
- return h('['),
- new Pe({
- elements: T(']', !t.strict, !0)
- })
- }),
- O = y(function () {
- return E(Z)
- }),
- B = y(function () {
- h('{');
- for (var e = !0, i = [
- ]; !r('punc', '}') && (e ? e = !1 : h(','), t.strict || !r('punc', '}')); ) {
- var a = n.token,
- u = a.type,
- l = P();
- if ('name' == u && !r('punc', ':')) {
- var c = new Ue({
- start: n.token,
- name: P(),
- end: o()
- });
- if ('get' == l) {
- i.push(new je({
- start: a,
- key: c,
- value: O(),
- end: o()
- }));
- continue
- }
- if ('set' == l) {
- i.push(new Ie({
- start: a,
- key: c,
- value: O(),
- end: o()
- }));
- continue
- }
- }
- h(':'),
- i.push(new Le({
- start: a,
- quote: a.quote,
- key: l,
- value: pe(!1),
- end: o()
- }))
- }
- return s(),
- new Ne({
- properties: i
- })
- });
- function P() {
- var e = n.token;
- switch (e.type) {
- case 'operator':
- ht(e.value) || c();
- case 'num':
- case 'string':
- case 'name':
- case 'keyword':
- case 'atom':
- return s(),
- e.value;
- default:
- c()
- }
- }
- function I(e) {
- var t = n.token.value;
- return new ('this' == t ? Je : e) ({
- name: String(t),
- start: n.token,
- end: n.token
- })
- }
- function j(e, t) {
- if (!r('name')) return t || a('Name expected'),
- null;
- var n = I(e);
- return s(),
- n
- }
- var V = function (e, t) {
- var i,
- a = e.start;
- if (r('punc', '.')) return s(),
- V(new we({
- start: a,
- expression: e,
- property: (i = n.token, 'name' != i.type && c(), s(), i.value),
- end: o()
- }), t);
- if (r('punc', '[')) {
- s();
- var u = pe(!0);
- return h(']'),
- V(new De({
- start: a,
- expression: e,
- property: u,
- end: o()
- }), t)
- }
- return t && r('punc', '(') ? (s(), V(new Ae({
- start: a,
- expression: e,
- args: T(')'),
- end: o()
- }), !0)) : e
- },
- K = function (e) {
- var t = n.token;
- if (r('operator') && zt(t.value)) {
- s(),
- v();
- var i = X(Se, t, K(e));
- return i.start = t,
- i.end = o(),
- i
- }
- for (var a = S(e); r('operator') && qt(n.token.value) && !n.token.nlb; ) (a = X(Te, n.token, a)).start = t,
- a.end = n.token,
- s();
- return a
- };
- function X(e, t, n) {
- var r = t.value;
- return '++' != r && '--' != r || re(n) || a('Invalid use of ' + r + ' operator', t.line, t.col, t.pos),
- new e({
- operator: r,
- expression: n
- })
- }
- var Q = function (e, t, i) {
- var o = r('operator') ? n.token.value : null;
- 'in' == o && i && (o = null);
- var a = null != o ? $t[o] : null;
- if (null != a && a > t) {
- s();
- var u = Q(K(!0), a, i);
- return Q(new Fe({
- start: e.start,
- left: e,
- operator: o,
- right: u,
- end: u.end
- }), t, i)
- }
- return e
- };
- var ne = function (e) {
- var t = n.token,
- i = function (e) {
- return Q(K(!0), 0, e)
- }(e);
- if (r('operator', '?')) {
- s();
- var a = pe(!1);
- return h(':'),
- new Oe({
- start: t,
- condition: i,
- consequent: a,
- alternative: pe(!1, e),
- end: o()
- })
- }
- return i
- };
- function re(e) {
- return !!t.cli || (e instanceof Ce || e instanceof He)
- }
- var oe = function (e) {
- var t = n.token,
- i = ne(e),
- u = n.token.value;
- if (r('operator') && Kt(u)) {
- if (re(i)) return s(),
- new Be({
- start: t,
- left: i,
- operator: u,
- right: oe(e),
- end: o()
- });
- a('Invalid assignment')
- }
- return i
- },
- pe = function (e, t) {
- var o = n.token,
- a = oe(t);
- return e && r('punc', ',') ? (s(), new _e({
- start: o,
- car: a,
- cdr: pe(!0, t),
- end: i()
- })) : a
- };
- function ye(e) {
- ++n.in_loop;
- var t = e();
- return --n.in_loop,
- t
- }
- return t.expression ? pe(!0) : function () {
- var e = n.token,
- i = [
- ];
- for (n.input.push_directives_stack(); !r('eof'); ) i.push(b());
- n.input.pop_directives_stack();
- var s = o(),
- a = t.toplevel;
- return a ? (a.body = a.body.concat(i), a.end = s) : a = new J({
- start: e,
- body: i,
- end: s
- }),
- a
- }()
- }
- function Ht(e, t) {
- pt.call(this),
- this.before = e,
- this.after = t
- }
- function Xt(e, t, n) {
- this.name = n.name,
- this.orig = [
- n
- ],
- this.scope = e,
- this.references = [
- ],
- this.global = !1,
- this.mangled_name = null,
- this.undeclared = !1,
- this.index = t,
- this.id = Xt.next_id++
- }
- Ht.prototype = new pt,
- function (e) {
- function t(t, n) {
- t.DEFMETHOD('transform', function (t, r) {
- var i,
- s;
- return t.push(this),
- t.before && (i = t.before(this, n, r)),
- i === e && (t.after ? (t.stack[t.stack.length - 1] = i = this, n(i, t), (s = t.after(i, r)) !== e && (i = s)) : n(i = this, t)),
- t.pop(this),
- i
- })
- }
- function n(e, t) {
- return x(e, function (e) {
- return e.transform(t, !0)
- })
- }
- t(B, m),
- t(z, function (e, t) {
- e.label = e.label.transform(t),
- e.body = e.body.transform(t)
- }),
- t(L, function (e, t) {
- e.body = e.body.transform(t)
- }),
- t(j, function (e, t) {
- e.body = n(e.body, t)
- }),
- t(K, function (e, t) {
- e.condition = e.condition.transform(t),
- e.body = e.body.transform(t)
- }),
- t(W, function (e, t) {
- e.init && (e.init = e.init.transform(t)),
- e.condition && (e.condition = e.condition.transform(t)),
- e.step && (e.step = e.step.transform(t)),
- e.body = e.body.transform(t)
- }),
- t(G, function (e, t) {
- e.init = e.init.transform(t),
- e.object = e.object.transform(t),
- e.body = e.body.transform(t)
- }),
- t(H, function (e, t) {
- e.expression = e.expression.transform(t),
- e.body = e.body.transform(t)
- }),
- t(re, function (e, t) {
- e.value && (e.value = e.value.transform(t))
- }),
- t(oe, function (e, t) {
- e.label && (e.label = e.label.transform(t))
- }),
- t(le, function (e, t) {
- e.condition = e.condition.transform(t),
- e.body = e.body.transform(t),
- e.alternative && (e.alternative = e.alternative.transform(t))
- }),
- t(ce, function (e, t) {
- e.expression = e.expression.transform(t),
- e.body = n(e.body, t)
- }),
- t(fe, function (e, t) {
- e.expression = e.expression.transform(t),
- e.body = n(e.body, t)
- }),
- t(de, function (e, t) {
- e.body = n(e.body, t),
- e.bcatch && (e.bcatch = e.bcatch.transform(t)),
- e.bfinally && (e.bfinally = e.bfinally.transform(t))
- }),
- t(me, function (e, t) {
- e.argname = e.argname.transform(t),
- e.body = n(e.body, t)
- }),
- t(ye, function (e, t) {
- e.definitions = n(e.definitions, t)
- }),
- t(xe, function (e, t) {
- e.name = e.name.transform(t),
- e.value && (e.value = e.value.transform(t))
- }),
- t(Q, function (e, t) {
- e.name && (e.name = e.name.transform(t)),
- e.argnames = n(e.argnames, t),
- e.body = n(e.body, t)
- }),
- t(Ae, function (e, t) {
- e.expression = e.expression.transform(t),
- e.args = n(e.args, t)
- }),
- t(_e, function (e, t) {
- e.car = e.car.transform(t),
- e.cdr = e.cdr.transform(t)
- }),
- t(we, function (e, t) {
- e.expression = e.expression.transform(t)
- }),
- t(De, function (e, t) {
- e.expression = e.expression.transform(t),
- e.property = e.property.transform(t)
- }),
- t(ke, function (e, t) {
- e.expression = e.expression.transform(t)
- }),
- t(Fe, function (e, t) {
- e.left = e.left.transform(t),
- e.right = e.right.transform(t)
- }),
- t(Oe, function (e, t) {
- e.condition = e.condition.transform(t),
- e.consequent = e.consequent.transform(t),
- e.alternative = e.alternative.transform(t)
- }),
- t(Pe, function (e, t) {
- e.elements = n(e.elements, t)
- }),
- t(Ne, function (e, t) {
- e.properties = n(e.properties, t)
- }),
- t(Re, function (e, t) {
- e.value = e.value.transform(t)
- })
- }(),
- Xt.next_id = 1,
- Xt.prototype = {
- unmangleable: function (e) {
- return e || (e = {
- }),
- this.global && !e.toplevel || this.undeclared || !e.eval && (this.scope.uses_eval || this.scope.uses_with) || e.keep_fnames && (this.orig[0] instanceof Ye || this.orig[0] instanceof $e)
- },
- mangle: function (e) {
- var t = e.cache && e.cache.props;
- if (this.global && t && t.has(this.name)) this.mangled_name = t.get(this.name);
- else if (!this.mangled_name && !this.unmangleable(e)) {
- var n,
- r = this.scope,
- i = this.orig[0];
- !e.screw_ie8 && i instanceof Ye && (r = r.parent_scope),
- this.defun && (n = this.defun.variables.get(this.name)) ? this.mangled_name = n.mangled_name || n.name : this.mangled_name = r.next_mangled(e, this),
- this.global && t && t.set(this.name, this.mangled_name)
- }
- }
- },
- J.DEFMETHOD('figure_out_scope', function (e) {
- e = f(e, {
- cache: null,
- screw_ie8: !0
- });
- var t = this,
- n = t.parent_scope = null,
- r = new k,
- i = null,
- s = new pt(function (t, s) {
- if (t instanceof me) {
- var o = n;
- return (n = new X(t)).init_scope_vars(o),
- s(),
- n = o,
- !0
- }
- if (t instanceof X) {
- t.init_scope_vars(n);
- o = n;
- var a = i,
- u = r;
- return i = n = t,
- r = new k,
- s(),
- n = o,
- i = a,
- r = u,
- !0
- }
- if (t instanceof z) {
- var l = t.label;
- if (r.has(l.name)) throw new Error(E('Label {name} defined twice', l));
- return r.set(l.name, l),
- s(),
- r.del(l.name),
- !0
- }
- if (t instanceof H) for (var c = n; c; c = c.parent_scope) c.uses_with = !0;
- else if (t instanceof Me && (t.scope = n), t instanceof Ge && (t.thedef = t, t.references = [
- ]), t instanceof Ye) i.def_function(t);
- else if (t instanceof $e) (t.scope = i.parent_scope).def_function(t);
- else if (t instanceof ze || t instanceof qe) {
- if (i.def_variable(t), i !== n) {
- t.mark_enclosed(e);
- var p = n.find_variable(t);
- t.thedef !== p && (t.thedef = p, t.reference(e))
- }
- } else if (t instanceof We) n.def_variable(t).defun = i;
- else if (t instanceof Xe) {
- var h = r.get(t.name);
- if (!h) throw new Error(E('Undefined label {name} [{line},{col}]', {
- name: t.name,
- line: t.start.line,
- col: t.start.col
- }));
- t.thedef = h
- }
- });
- t.walk(s);
- var o = null;
- t.globals = new k,
- s = new pt(function (n, r) {
- if (n instanceof Q) {
- var i = o;
- return o = n,
- r(),
- o = i,
- !0
- }
- if (n instanceof oe && n.label) return n.label.thedef.references.push(n),
- !0;
- if (n instanceof He) {
- var a = n.name;
- if ('eval' == a && s.parent() instanceof Ae) for (var u = n.scope; u && !u.uses_eval; u = u.parent_scope) u.uses_eval = !0;
- var l = n.scope.find_variable(a);
- return n.scope instanceof Q && 'arguments' == a && (n.scope.uses_arguments = !0),
- l || (l = t.def_global(n)),
- n.thedef = l,
- n.reference(e),
- !0
- }
- });
- t.walk(s),
- e.screw_ie8 || t.walk(new pt(function (n, r) {
- if (n instanceof We) {
- var i = n.name,
- s = n.thedef.references,
- o = n.thedef.defun,
- a = o.find_variable(i) || t.globals.get(i) || o.def_variable(n);
- return s.forEach(function (t) {
- t.thedef = a,
- t.reference(e)
- }),
- n.thedef = a,
- !0
- }
- })),
- e.cache && (this.cname = e.cache.cname)
- }),
- J.DEFMETHOD('def_global', function (e) {
- var t = this.globals,
- n = e.name;
- if (t.has(n)) return t.get(n);
- var r = new Xt(this, t.size(), e);
- return r.undeclared = !0,
- r.global = !0,
- t.set(n, r),
- r
- }),
- X.DEFMETHOD('init_scope_vars', function (e) {
- this.variables = new k,
- this.functions = new k,
- this.uses_with = !1,
- this.uses_eval = !1,
- this.parent_scope = e,
- this.enclosed = [
- ],
- this.cname = - 1
- }),
- Q.DEFMETHOD('init_scope_vars', function () {
- X.prototype.init_scope_vars.apply(this, arguments),
- this.uses_arguments = !1,
- this.def_variable(new ze({
- name: 'arguments',
- start: this.start,
- end: this.end
- }))
- }),
- Me.DEFMETHOD('mark_enclosed', function (e) {
- for (var t = this.definition(), n = this.scope; n && (A(n.enclosed, t), e.keep_fnames && n.functions.each(function (e) {
- A(t.scope.enclosed, e)
- }), n !== t.scope); ) n = n.parent_scope
- }),
- Me.DEFMETHOD('reference', function (e) {
- this.definition().references.push(this),
- this.mark_enclosed(e)
- }),
- X.DEFMETHOD('find_variable', function (e) {
- return e instanceof Me && (e = e.name),
- this.variables.get(e) || this.parent_scope && this.parent_scope.find_variable(e)
- }),
- X.DEFMETHOD('def_function', function (e) {
- this.functions.set(e.name, this.def_variable(e))
- }),
- X.DEFMETHOD('def_variable', function (e) {
- var t;
- return this.variables.has(e.name) ? (t = this.variables.get(e.name)).orig.push(e) : (t = new Xt(this, this.variables.size(), e), this.variables.set(e.name, t), t.global = !this.parent_scope),
- e.thedef = t
- }),
- X.DEFMETHOD('next_mangled', function (e) {
- var t = this.enclosed;
- e: for (; ; ) {
- var n = Jt(++this.cname);
- if (Bt(n) && !(e.except.indexOf(n) >= 0)) {
- for (var r = t.length; --r >= 0; ) {
- var i = t[r];
- if (n == (i.mangled_name || i.unmangleable(e) && i.name)) continue e
- }
- return n
- }
- }
- }),
- ee.DEFMETHOD('next_mangled', function (e, t) {
- for (var n = t.orig[0] instanceof Ke && this.name && this.name.definition(), r = n ? n.mangled_name || n.name : null; ; ) {
- var i = Q.prototype.next_mangled.call(this, e, t);
- if (!r || r != i) return i
- }
- }),
- Me.DEFMETHOD('unmangleable', function (e) {
- return this.definition().unmangleable(e)
- }),
- Ge.DEFMETHOD('unmangleable', function () {
- return !1
- }),
- Me.DEFMETHOD('unreferenced', function () {
- return 0 == this.definition().references.length && !(this.scope.uses_eval || this.scope.uses_with)
- }),
- Me.DEFMETHOD('undeclared', function () {
- return this.definition().undeclared
- }),
- Xe.DEFMETHOD('undeclared', function () {
- return !1
- }),
- Ge.DEFMETHOD('undeclared', function () {
- return !1
- }),
- Me.DEFMETHOD('definition', function () {
- return this.thedef
- }),
- Me.DEFMETHOD('global', function () {
- return this.definition().global
- }),
- J.DEFMETHOD('_default_mangler_options', function (e) {
- return f(e, {
- eval: !1,
- except: [
- ],
- keep_fnames: !1,
- screw_ie8: !0,
- sort: !1,
- toplevel: !1
- })
- }),
- J.DEFMETHOD('mangle_names', function (e) {
- (e = this._default_mangler_options(e)).except.push('arguments');
- var t = - 1,
- n = [
- ];
- e.cache && this.globals.each(function (t) {
- e.except.indexOf(t.name) < 0 && n.push(t)
- });
- var r = new pt(function (i, s) {
- if (i instanceof z) {
- var o = t;
- return s(),
- t = o,
- !0
- }
- if (i instanceof X) {
- r.parent();
- var a = [
- ];
- return i.variables.each(function (t) {
- e.except.indexOf(t.name) < 0 && a.push(t)
- }),
- void n.push.apply(n, a)
- }
- if (i instanceof Ge) {
- var u;
- do {
- u = Jt(++t)
- } while (!Bt(u));
- return i.mangled_name = u,
- !0
- }
- e.screw_ie8 && i instanceof We && n.push(i.definition())
- });
- this.walk(r),
- n.forEach(function (t) {
- t.mangle(e)
- }),
- e.cache && (e.cache.cname = this.cname)
- }),
- J.DEFMETHOD('compute_char_frequency', function (e) {
- e = this._default_mangler_options(e);
- var t = new pt(function (t) {
- t instanceof Qe ? Jt.consider(t.print_to_string()) : t instanceof ie ? Jt.consider('return') : t instanceof se ? Jt.consider('throw') : t instanceof ue ? Jt.consider('continue') : t instanceof ae ? Jt.consider('break') : t instanceof N ? Jt.consider('debugger') : t instanceof R ? Jt.consider(t.value) : t instanceof Y ? Jt.consider('while') : t instanceof $ ? Jt.consider('do while') : t instanceof le ? (Jt.consider('if'), t.alternative && Jt.consider('else')) : t instanceof ve ? Jt.consider('var') : t instanceof be ? Jt.consider('const') : t instanceof Q ? Jt.consider('function') : t instanceof W ? Jt.consider('for') : t instanceof G ? Jt.consider('for in') : t instanceof ce ? Jt.consider('switch') : t instanceof fe ? Jt.consider('case') : t instanceof he ? Jt.consider('default') : t instanceof H ? Jt.consider('with') : t instanceof Ie ? Jt.consider('set' + t.key) : t instanceof je ? Jt.consider('get' + t.key) : t instanceof Le ? Jt.consider(t.key) : t instanceof Ee ? Jt.consider('new') : t instanceof Je ? Jt.consider('this') : t instanceof de ? Jt.consider('try') : t instanceof me ? Jt.consider('catch') : t instanceof ge ? Jt.consider('finally') : t instanceof Me && t.unmangleable(e) ? Jt.consider(t.name) : t instanceof ke || t instanceof Fe ? Jt.consider(t.operator) : t instanceof we && Jt.consider(t.property)
- });
- this.walk(t),
- Jt.sort()
- });
- var Jt = function () {
- var e,
- t,
- n = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789';
- function r() {
- t = Object.create(null),
- (e = n.split('').map(function (e) {
- return e.charCodeAt(0)
- })).forEach(function (e) {
- t[e] = 0
- })
- }
- function i(t) {
- var n = '',
- r = 54;
- t++;
- do {
- t--,
- n += String.fromCharCode(e[t % r]),
- t = Math.floor(t / r),
- r = 64
- } while (t > 0);
- return n
- }
- return i.consider = function (e) {
- for (var n = e.length; --n >= 0; ) {
- var r = e.charCodeAt(n);
- r in t && ++t[r]
- }
- },
- i.sort = function () {
- e = C(e, function (e, n) {
- return kt(e) && !kt(n) ? 1 : kt(n) && !kt(e) ? - 1 : t[n] - t[e]
- })
- },
- i.reset = r,
- r(),
- i.get = function () {
- return e
- },
- i.freq = function () {
- return t
- },
- i
- }();
- J.DEFMETHOD('scope_warnings', function (e) {
- e = f(e, {
- assign_to_global: !0,
- eval: !0,
- func_arguments: !0,
- nested_defuns: !0,
- undeclared: !1,
- unreferenced: !0
- });
- var t = new pt(function (n) {
- if (e.undeclared && n instanceof He && n.undeclared() && B.warn('Undeclared symbol: {name} [{file}:{line},{col}]', {
- name: n.name,
- file: n.start.file,
- line: n.start.line,
- col: n.start.col
- }), e.assign_to_global) {
- var r = null;
- n instanceof Be && n.left instanceof He ? r = n.left : n instanceof G && n.init instanceof He && (r = n.init),
- r && (r.undeclared() || r.global() && r.scope !== r.definition().scope) && B.warn('{msg}: {name} [{file}:{line},{col}]', {
- msg: r.undeclared() ? 'Accidental global?' : 'Assignment to global',
- name: r.name,
- file: r.start.file,
- line: r.start.line,
- col: r.start.col
- })
- }
- e.eval && n instanceof He && n.undeclared() && 'eval' == n.name && B.warn('Eval is used [{file}:{line},{col}]', n.start),
- e.unreferenced && (n instanceof Ve || n instanceof Ge) && !(n instanceof We) && n.unreferenced() && B.warn('{type} {name} is declared but not referenced [{file}:{line},{col}]', {
- type: n instanceof Ge ? 'Label' : 'Symbol',
- name: n.name,
- file: n.start.file,
- line: n.start.line,
- col: n.start.col
- }),
- e.func_arguments && n instanceof Q && n.uses_arguments && B.warn('arguments used in function {name} [{file}:{line},{col}]', {
- name: n.name ? n.name.name : 'anonymous',
- file: n.start.file,
- line: n.start.line,
- col: n.start.col
- }),
- e.nested_defuns && n instanceof te && !(t.parent() instanceof X) && B.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]', {
- name: n.name.name,
- type: t.parent().TYPE,
- file: n.start.file,
- line: n.start.line,
- col: n.start.col
- })
- });
- this.walk(t)
- });
- var Qt = /^$|[;{][\s\n]*$/;
- function Zt(e) {
- return 'comment2' == e.type && /@preserve|@license|@cc_on/i.test(e.value)
- }
- function en(e) {
- var t = g;
- if ((e = f(e, {
- ascii_only: !1,
- beautify: !1,
- bracketize: !1,
- comments: !1,
- indent_level: 4,
- indent_start: 0,
- inline_script: !0,
- keep_quoted_props: !1,
- max_line_len: !1,
- preamble: null,
- preserve_line: !1,
- quote_keys: !1,
- quote_style: 0,
- screw_ie8: !0,
- semicolons: !0,
- shebang: !0,
- source_map: null,
- space_colon: !0,
- unescape_regexps: !1,
- width: 80,
- wrap_iife: !1
- }, !0)).comments) {
- var n = e.comments;
- if ('string' == typeof e.comments && /^\/.*\/[a-zA-Z]*$/.test(e.comments)) {
- var r = e.comments.lastIndexOf('/');
- n = new RegExp(e.comments.substr(1, r - 1), e.comments.substr(r + 1))
- }
- t = n instanceof RegExp ? function (e) {
- return 'comment5' != e.type && n.test(e.value)
- }
- : 'function' == typeof n ? function (e) {
- return 'comment5' != e.type && n(this, e)
- }
- : 'some' === n ? Zt : y
- }
- var i = 0,
- s = 0,
- o = 1,
- a = 0,
- u = '';
- function l(e, t) {
- return e.replace(/[\u0000-\u001f\u007f-\uffff]/g, function (e) {
- var n = e.charCodeAt(0).toString(16);
- if (n.length <= 2 && !t) {
- for (; n.length < 2; ) n = '0' + n;
- return '\\x' + n
- }
- for (; n.length < 4; ) n = '0' + n;
- return '\\u' + n
- })
- }
- function p(t, n) {
- var r = function (t, n) {
- var r = 0,
- i = 0;
- function s() {
- return '\'' + t.replace(/\x27/g, '\\\'') + '\''
- }
- function o() {
- return '"' + t.replace(/\x22/g, '\\"') + '"'
- }
- switch (t = t.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function (n, s) {
- switch (n) {
- case '"':
- return ++r,
- '"';
- case '\'':
- return ++i,
- '\'';
- case '\\':
- return '\\\\';
- case '\n':
- return '\\n';
- case '\r':
- return '\\r';
- case '\t':
- return '\\t';
- case '':
- return '\\b';
- case '\f':
- return '\\f';
- case '\v':
- return e.screw_ie8 ? '\\v' : '\\x0B';
- case '\u2028':
- return '\\u2028';
- case '\u2029':
- return '\\u2029';
- case '':
- return '\\ufeff';
- case '\x00':
- return /[0-7]/.test(t.charAt(s + 1)) ? '\\x00' : '\\0'
- }
- return n
- }), e.ascii_only && (t = l(t)), e.quote_style) {
- case 1:
- return s();
- case 2:
- return o();
- case 3:
- return '\'' == n ? s() : o();
- default:
- return r > i ? s() : o()
- }
- }(t, n);
- return e.inline_script && (r = (r = (r = r.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, '<\\/script$1')).replace(/\x3c!--/g, '\\x3c!--')).replace(/--\x3e/g, '--\\x3e')),
- r
- }
- var h = !1,
- d = !1,
- v = 0,
- b = '',
- x = e.max_line_len ? function () {
- if (s > e.max_line_len) {
- if (v) {
- var t = u.slice(0, v),
- n = u.slice(v);
- u = t + '\n' + n,
- o++,
- a++,
- s = n.length
- }
- s > e.max_line_len && B.warn('Output exceeds {max_line_len} characters', e)
- }
- v = 0
- }
- : m,
- A = w('( [ + * / - , .');
- function E(t) {
- var n = (t = String(t)).charAt(0),
- r = b.charAt(b.length - 1);
- if (d && (d = !1, (':' == r && '}' == n || (!n || ';}'.indexOf(n) < 0) && ';' != r) && (e.semicolons || A(n) ? (u += ';', s++, a++) : (x(), u += '\n', a++, o++, s = 0, /^\s+$/.test(t) && (d = !0)), e.beautify || (h = !1))), !e.beautify && e.preserve_line && N[N.length - 1]) for (var i = N[N.length - 1].start.line; o < i; ) x(),
- u += '\n',
- a++,
- o++,
- s = 0,
- h = !1;
- h && ((Nt(r) && (Nt(n) || '\\' == n) || '/' == n && n == r || ('+' == n || '-' == n) && n == b) && (u += ' ', s++, a++), h = !1),
- u += t,
- a += t.length;
- var l = t.split(/\r?\n/),
- c = l.length - 1;
- o += c,
- s += l[0].length,
- c > 0 && (x(), s = l[c].length),
- b = t
- }
- var _ = e.beautify ? function () {
- E(' ')
- }
- : function () {
- h = !0
- },
- C = e.beautify ? function (t) {
- var n;
- e.beautify && E((n = t ? 0.5 : 0, c(' ', e.indent_start + i - n * e.indent_level)))
- }
- : m,
- D = e.beautify ? function (e, t) {
- !0 === e && (e = F());
- var n = i;
- i = e;
- var r = t();
- return i = n,
- r
- }
- : function (e, t) {
- return t()
- },
- k = e.beautify ? function () {
- E('\n')
- }
- : e.max_line_len ? function () {
- x(),
- v = u.length
- }
- : m,
- S = e.beautify ? function () {
- E(';')
- }
- : function () {
- d = !0
- };
- function T() {
- d = !1,
- E(';')
- }
- function F() {
- return i + e.indent_level
- }
- var O = e.source_map ? function (t, n) {
- try {
- t && e.source_map.add(t.file || '?', o, s, t.line, t.col, n || 'name' != t.type ? n : t.value)
- } catch (e) {
- B.warn('Couldn\'t figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]', {
- file: t.file,
- line: t.line,
- col: t.col,
- cline: o,
- ccol: s,
- name: n || ''
- })
- }
- }
- : m;
- function P() {
- return v && x(),
- u
- }
- var N = [
- ];
- return {
- get: P,
- toString: P,
- indent: C,
- indentation: function () {
- return i
- },
- current_width: function () {
- return s - i
- },
- should_break: function () {
- return e.width && this.current_width() >= e.width
- },
- newline: k,
- print: E,
- space: _,
- comma: function () {
- E(','),
- _()
- },
- colon: function () {
- E(':'),
- e.space_colon && _()
- },
- last: function () {
- return b
- },
- semicolon: S,
- force_semicolon: T,
- to_ascii: l,
- print_name: function (t) {
- E(function (t) {
- return t = t.toString(),
- e.ascii_only && (t = l(t, !0)),
- t
- }(t))
- },
- print_string: function (e, t, n) {
- var r = p(e, t);
- !0 === n && - 1 === r.indexOf('\\') && (Qt.test(u) || T(), T()),
- E(r)
- },
- encode_string: p,
- next_indent: F,
- with_indent: D,
- with_block: function (e) {
- var t;
- return E('{'),
- k(),
- D(F(), function () {
- t = e()
- }),
- C(),
- E('}'),
- t
- },
- with_parens: function (e) {
- E('(');
- var t = e();
- return E(')'),
- t
- },
- with_square: function (e) {
- E('[');
- var t = e();
- return E(']'),
- t
- },
- add_mapping: O,
- option: function (t) {
- return e[t]
- },
- comment_filter: t,
- line: function () {
- return o
- },
- col: function () {
- return s
- },
- pos: function () {
- return a
- },
- push_node: function (e) {
- N.push(e)
- },
- pop_node: function () {
- return N.pop()
- },
- parent: function (e) {
- return N[N.length - 2 - (e || 0)]
- }
- }
- }
- function tn(e, t) {
- if (!(this instanceof tn)) return new tn(e, t);
- Ht.call(this, this.before, this.after),
- this.options = f(e, {
- angular: !1,
- booleans: !t,
- cascade: !t,
- collapse_vars: !t,
- comparisons: !t,
- conditionals: !t,
- dead_code: !t,
- drop_console: !1,
- drop_debugger: !t,
- evaluate: !t,
- expression: !1,
- global_defs: {
- },
- hoist_funs: !t,
- hoist_vars: !1,
- if_return: !t,
- join_vars: !t,
- keep_fargs: !0,
- keep_fnames: !1,
- keep_infinity: !1,
- loops: !t,
- negate_iife: !t,
- passes: 1,
- properties: !t,
- pure_getters: !t && 'strict',
- pure_funcs: null,
- reduce_vars: !t,
- screw_ie8: !0,
- sequences: !t,
- side_effects: !t,
- switches: !t,
- top_retain: null,
- toplevel: !(!e || !e.top_retain),
- unsafe: !1,
- unsafe_comps: !1,
- unsafe_math: !1,
- unsafe_proto: !1,
- unsafe_regexp: !1,
- unused: !t,
- warnings: !0
- }, !0);
- var n = this.options.pure_funcs;
- this.pure_funcs = 'function' == typeof n ? n : n ? function (e) {
- return n.indexOf(e.expression.print_to_string()) < 0
- }
- : y;
- var r = this.options.top_retain;
- r instanceof RegExp ? this.top_retain = function (e) {
- return r.test(e.name)
- }
- : 'function' == typeof r ? this.top_retain = r : r && ('string' == typeof r && (r = r.split(/,/)), this.top_retain = function (e) {
- return r.indexOf(e.name) >= 0
- });
- var i = this.options.sequences;
- this.sequences_limit = 1 == i ? 200 : 0 | i,
- this.warnings_produced = {
- }
- }
- function nn(e) {
- e = f(e, {
- file: null,
- root: null,
- orig: null,
- orig_line_diff: 0,
- dest_line_diff: 0
- });
- var t = new i.SourceMapGenerator({
- file: e.file,
- sourceRoot: e.root
- }),
- n = e.orig && new i.SourceMapConsumer(e.orig);
- return n && Array.isArray(e.orig.sources) && n._sources.toArray().forEach(function (e) {
- var r = n.sourceContentFor(e, !0);
- r && t.setSourceContent(e, r)
- }),
- {
- add: function (r, i, s, o, a, u) {
- if (n) {
- var l = n.originalPositionFor({
- line: o,
- column: a
- });
- if (null === l.source) return;
- r = l.source,
- o = l.line,
- a = l.column,
- u = l.name || u
- }
- t.addMapping({
- generated: {
- line: i + e.dest_line_diff,
- column: s
- },
- original: {
- line: o + e.orig_line_diff,
- column: a
- },
- source: r,
- name: u
- })
- },
- get: function () {
- return t
- },
- toString: function () {
- return JSON.stringify(t.toJSON())
- }
- }
- }
- function rn() {
- var e = [
- 'null',
- 'true',
- 'false',
- 'Infinity',
- '-Infinity',
- 'undefined'
- ];
- function t(t) {
- A(e, t)
- }
- return [Object,
- Array,
- Function,
- Number,
- String,
- Boolean,
- Error,
- Math,
- Date,
- RegExp].forEach(function (e) {
- Object.getOwnPropertyNames(e).map(t),
- e.prototype && Object.getOwnPropertyNames(e.prototype).map(t)
- }),
- e
- }
- function sn(e, t) {
- var n = (t = f(t, {
- cache: null,
- debug: !1,
- ignore_quoted: !1,
- only_cache: !1,
- regex: null,
- reserved: null
- })).reserved;
- null == n && (n = rn());
- var r = t.cache;
- null == r && (r = {
- cname: - 1,
- props: new k
- });
- var i,
- s = t.regex,
- o = t.ignore_quoted,
- a = !1 !== t.debug;
- a && (i = !0 === t.debug ? '' : t.debug);
- var u = [
- ],
- l = [
- ],
- c = {
- };
- return e.walk(new pt(function (e) {
- e instanceof Le ? d(e.key, o && e.quote) : e instanceof Re ? d(e.key.name) : e instanceof we ? d(e.property) : e instanceof De && function (e, t) {
- var n = {
- };
- try {
- !function e(r) {
- r.walk(new pt(function (r) {
- if (r instanceof _e) return e(r.cdr),
- !0;
- if (r instanceof Ze) return d(r.value, t),
- !0;
- if (r instanceof Oe) return e(r.consequent),
- e(r.alternative),
- !0;
- throw n
- }))
- }(e)
- } catch (e) {
- if (e !== n) throw e
- }
- }(e.property, o)
- })),
- e.transform(new Ht(function (e) {
- e instanceof Le ? o && e.quote || (e.key = m(e.key)) : e instanceof Re ? e.key.name = m(e.key.name) : e instanceof we ? e.property = m(e.property) : e instanceof De && (o || (e.property = function e(t) {
- return t.transform(new Ht(function (t) {
- return t instanceof _e ? t.cdr = e(t.cdr) : t instanceof Ze ? t.value = m(t.value) : t instanceof Oe && (t.consequent = e(t.consequent), t.alternative = e(t.alternative)),
- t
- }))
- }(e.property)))
- }));
- function p(e) {
- return !(l.indexOf(e) >= 0) && (!(n.indexOf(e) >= 0) && (t.only_cache ? r.props.has(e) : !/^-?[0-9]+(\.[0-9]+)?(e[+-][0-9]+)?$/.test(e)))
- }
- function h(e) {
- return !(o && e in c) && (!(s && !s.test(e)) && (!(n.indexOf(e) >= 0) && (r.props.has(e) || u.indexOf(e) >= 0)))
- }
- function d(e, t) {
- t ? c[e] = !0 : (p(e) && A(u, e), h(e) || A(l, e))
- }
- function m(e) {
- if (!h(e)) return e;
- var t = r.props.get(e);
- if (!t) {
- if (a) {
- var n = '_$' + e + '$' + i + '_';
- !p(n) || o && n in c || (t = n)
- }
- if (!t) do {
- t = Jt(++r.cname)
- } while (!p(t) || o && t in c);
- r.props.set(e, t)
- }
- return t
- }
- }
- !function () {
- function e(e, t) {
- e.DEFMETHOD('_codegen', t)
- }
- var t = !1,
- n = !1;
- function r(e, t) {
- Array.isArray(e) ? e.forEach(function (e) {
- r(e, t)
- }) : e.DEFMETHOD('needs_parens', t)
- }
- function i(e, t, r, i) {
- var s = e.length - 1;
- n = i,
- e.forEach(function (e, i) {
- !0 !== n || e instanceof R || e instanceof U || e instanceof L && e.body instanceof Ze || (n = !1),
- e instanceof U || (r.indent(), e.print(r), i == s && t || (r.newline(), t && r.newline())),
- !0 === n && e instanceof L && e.body instanceof Ze && (n = !1)
- }),
- n = !1
- }
- function s(e, t, n) {
- e.length > 0 ? t.with_block(function () {
- i(e, !1, t, n)
- }) : t.print('{}')
- }
- function o(e, t, n) {
- if (n) try {
- e.walk(new pt(function (e) {
- if (e instanceof Fe && 'in' == e.operator) throw t
- })),
- e.print(t)
- } catch (n) {
- if (n !== t) throw n;
- e.print(t, !0)
- } else e.print(t)
- }
- function a(e, t, n) {
- n.option('quote_keys') ? n.print_string(e + '') : ('number' == typeof e || !n.option('beautify') && + e + '' == e) && parseFloat(e) >= 0 ? n.print(c(e)) : (dt(e) ? n.option('screw_ie8') : Rt(e)) ? t && n.option('keep_quoted_props') ? n.print_string(e, t) : n.print_name(e) : n.print_string(e, t)
- }
- function u(e, t) {
- t.option('bracketize') ? p(e, t) : !e || e instanceof U ? t.force_semicolon() : e.print(t)
- }
- function l(e, t) {
- return e.args.length > 0 || t.option('beautify')
- }
- function c(e) {
- var t,
- n = e.toString(10),
- r = [
- n.replace(/^0\./, '.').replace('e+', 'e')
- ];
- return Math.floor(e) === e ? (e >= 0 ? r.push('0x' + e.toString(16).toLowerCase(), '0' + e.toString(8)) : r.push('-0x' + ( - e).toString(16).toLowerCase(), '-0' + ( - e).toString(8)), (t = /^(.*?)(0+)$/.exec(e)) && r.push(t[1] + 'e' + t[2].length)) : (t = /^0?\.(0+)(.*)$/.exec(e)) && r.push(t[2] + 'e-' + (t[1].length + t[2].length), n.substr(n.indexOf('.'))),
- function (e) {
- for (var t = e[0], n = t.length, r = 1; r < e.length; ++r) e[r].length < n && (n = (t = e[r]).length);
- return t
- }(r)
- }
- function p(e, t) {
- !e || e instanceof U ? t.print('{}') : e instanceof M ? e.print(t) : t.with_block(function () {
- t.indent(),
- e.print(t),
- t.newline()
- })
- }
- function h(e, t) {
- e.DEFMETHOD('add_source_map', function (e) {
- t(this, e)
- })
- }
- function f(e, t) {
- t.add_mapping(e.start)
- }
- B.DEFMETHOD('print', function (e, n) {
- var r = this,
- i = r._codegen,
- s = t;
- function o() {
- r.add_comments(e),
- r.add_source_map(e),
- i(r, e)
- }
- r instanceof R && 'use asm' == r.value && e.parent() instanceof X && (t = !0),
- e.push_node(r),
- n || r.needs_parens(e) ? e.with_parens(o) : o(),
- e.pop_node(),
- r instanceof X && (t = s)
- }),
- B.DEFMETHOD('print_to_string', function (e) {
- var t = en(e);
- return e || (t._readonly = !0),
- this.print(t),
- t.get()
- }),
- B.DEFMETHOD('add_comments', function (e) {
- if (!e._readonly) {
- var t = this.start;
- if (t && !t._comments_dumped) {
- t._comments_dumped = !0;
- var n = t.comments_before || [
- ];
- if (this instanceof re && this.value && this.value.walk(new pt(function (e) {
- if (e.start && e.start.comments_before && (n = n.concat(e.start.comments_before), e.start.comments_before = [
- ]), e instanceof ee || e instanceof Pe || e instanceof Ne) return !0
- })), 0 == e.pos()) {
- n.length > 0 && e.option('shebang') && 'comment5' == n[0].type && (e.print('#!' + n.shift().value + '\n'), e.indent());
- var r = e.option('preamble');
- r && e.print(r.replace(/\r\n?|[\n\u2028\u2029]|\s*$/g, '\n'))
- }
- n = n.filter(e.comment_filter, this),
- !e.option('beautify') && n.length > 0 && /comment[134]/.test(n[0].type) && 0 !== e.col() && n[0].nlb && e.print('\n'),
- n.forEach(function (n) {
- /comment[134]/.test(n.type) ? (e.print('//' + n.value + '\n'), e.indent()) : 'comment2' == n.type && (e.print('/*' + n.value + '*/'), t.nlb ? (e.print('\n'), e.indent()) : e.space())
- })
- }
- }
- }),
- r(B, function () {
- return !1
- }),
- r(ee, function (e) {
- if (T(e)) return !0;
- if (e.option('wrap_iife')) {
- var t = e.parent();
- return t instanceof Ae && t.expression === this
- }
- return !1
- }),
- r(Ne, function (e) {
- return T(e)
- }),
- r(ke, function (e) {
- var t = e.parent();
- return t instanceof Ce && t.expression === this || t instanceof Ae && t.expression === this
- }),
- r(_e, function (e) {
- var t = e.parent();
- return t instanceof Ae || t instanceof ke || t instanceof Fe || t instanceof xe || t instanceof Ce || t instanceof Pe || t instanceof Re || t instanceof Oe
- }),
- r(Fe, function (e) {
- var t = e.parent();
- if (t instanceof Ae && t.expression === this) return !0;
- if (t instanceof ke) return !0;
- if (t instanceof Ce && t.expression === this) return !0;
- if (t instanceof Fe) {
- var n = t.operator,
- r = $t[n],
- i = this.operator,
- s = $t[i];
- if (r > s || r == s && this === t.right) return !0
- }
- }),
- r(Ce, function (e) {
- var t = e.parent();
- if (t instanceof Ee && t.expression === this) try {
- this.walk(new pt(function (e) {
- if (e instanceof Ae) throw t
- }))
- } catch (e) {
- if (e !== t) throw e;
- return !0
- }
- }),
- r(Ae, function (e) {
- var t,
- n = e.parent();
- return n instanceof Ee && n.expression === this || this.expression instanceof ee && n instanceof Ce && n.expression === this && (t = e.parent(1)) instanceof Be && t.left === n
- }),
- r(Ee, function (e) {
- var t = e.parent();
- if (!l(this, e) && (t instanceof Ce || t instanceof Ae && t.expression === this)) return !0
- }),
- r(et, function (e) {
- var t = e.parent();
- if (t instanceof Ce && t.expression === this) {
- var n = this.getValue();
- if (n < 0 || /^0/.test(c(n))) return !0
- }
- }),
- r([Be,
- Oe], function (e) {
- var t = e.parent();
- return t instanceof ke || (t instanceof Fe && !(t instanceof Be) || (t instanceof Ae && t.expression === this || (t instanceof Oe && t.condition === this || (t instanceof Ce && t.expression === this || void 0))))
- }),
- e(R, function (e, t) {
- t.print_string(e.value, e.quote),
- t.semicolon()
- }),
- e(N, function (e, t) {
- t.print('debugger'),
- t.semicolon()
- }),
- V.DEFMETHOD('_do_print_body', function (e) {
- u(this.body, e)
- }),
- e(P, function (e, t) {
- e.body.print(t),
- t.semicolon()
- }),
- e(J, function (e, t) {
- i(e.body, !0, t, !0),
- t.print('')
- }),
- e(z, function (e, t) {
- e.label.print(t),
- t.colon(),
- e.body.print(t)
- }),
- e(L, function (e, t) {
- e.body.print(t),
- t.semicolon()
- }),
- e(M, function (e, t) {
- s(e.body, t)
- }),
- e(U, function (e, t) {
- t.semicolon()
- }),
- e($, function (e, t) {
- t.print('do'),
- t.space(),
- p(e.body, t),
- t.space(),
- t.print('while'),
- t.space(),
- t.with_parens(function () {
- e.condition.print(t)
- }),
- t.semicolon()
- }),
- e(Y, function (e, t) {
- t.print('while'),
- t.space(),
- t.with_parens(function () {
- e.condition.print(t)
- }),
- t.space(),
- e._do_print_body(t)
- }),
- e(W, function (e, t) {
- t.print('for'),
- t.space(),
- t.with_parens(function () {
- e.init ? (e.init instanceof ye ? e.init.print(t) : o(e.init, t, !0), t.print(';'), t.space()) : t.print(';'),
- e.condition ? (e.condition.print(t), t.print(';'), t.space()) : t.print(';'),
- e.step && e.step.print(t)
- }),
- t.space(),
- e._do_print_body(t)
- }),
- e(G, function (e, t) {
- t.print('for'),
- t.space(),
- t.with_parens(function () {
- e.init.print(t),
- t.space(),
- t.print('in'),
- t.space(),
- e.object.print(t)
- }),
- t.space(),
- e._do_print_body(t)
- }),
- e(H, function (e, t) {
- t.print('with'),
- t.space(),
- t.with_parens(function () {
- e.expression.print(t)
- }),
- t.space(),
- e._do_print_body(t)
- }),
- Q.DEFMETHOD('_do_print', function (e, t) {
- var n = this;
- t || e.print('function'),
- n.name && (e.space(), n.name.print(e)),
- e.with_parens(function () {
- n.argnames.forEach(function (t, n) {
- n && e.comma(),
- t.print(e)
- })
- }),
- e.space(),
- s(n.body, e, !0)
- }),
- e(Q, function (e, t) {
- e._do_print(t)
- }),
- re.DEFMETHOD('_do_print', function (e, t) {
- e.print(t),
- this.value && (e.space(), this.value.print(e)),
- e.semicolon()
- }),
- e(ie, function (e, t) {
- e._do_print(t, 'return')
- }),
- e(se, function (e, t) {
- e._do_print(t, 'throw')
- }),
- oe.DEFMETHOD('_do_print', function (e, t) {
- e.print(t),
- this.label && (e.space(), this.label.print(e)),
- e.semicolon()
- }),
- e(ae, function (e, t) {
- e._do_print(t, 'break')
- }),
- e(ue, function (e, t) {
- e._do_print(t, 'continue')
- }),
- e(le, function (e, t) {
- t.print('if'),
- t.space(),
- t.with_parens(function () {
- e.condition.print(t)
- }),
- t.space(),
- e.alternative ? (!function (e, t) {
- var n = e.body;
- if (t.option('bracketize') || !t.option('screw_ie8') && n instanceof $) return p(n, t);
- if (!n) return t.force_semicolon();
- for (; ; ) if (n instanceof le) {
- if (!n.alternative) return void p(e.body, t);
- n = n.alternative
- } else {
- if (!(n instanceof V)) break;
- n = n.body
- }
- u(e.body, t)
- }(e, t), t.space(), t.print('else'), t.space(), e.alternative instanceof le ? e.alternative.print(t) : u(e.alternative, t)) : e._do_print_body(t)
- }),
- e(ce, function (e, t) {
- t.print('switch'),
- t.space(),
- t.with_parens(function () {
- e.expression.print(t)
- }),
- t.space();
- var n = e.body.length - 1;
- n < 0 ? t.print('{}') : t.with_block(function () {
- e.body.forEach(function (e, r) {
- t.indent(!0),
- e.print(t),
- r < n && e.body.length > 0 && t.newline()
- })
- })
- }),
- pe.DEFMETHOD('_do_print_body', function (e) {
- e.newline(),
- this.body.forEach(function (t) {
- e.indent(),
- t.print(e),
- e.newline()
- })
- }),
- e(he, function (e, t) {
- t.print('default:'),
- e._do_print_body(t)
- }),
- e(fe, function (e, t) {
- t.print('case'),
- t.space(),
- e.expression.print(t),
- t.print(':'),
- e._do_print_body(t)
- }),
- e(de, function (e, t) {
- t.print('try'),
- t.space(),
- s(e.body, t),
- e.bcatch && (t.space(), e.bcatch.print(t)),
- e.bfinally && (t.space(), e.bfinally.print(t))
- }),
- e(me, function (e, t) {
- t.print('catch'),
- t.space(),
- t.with_parens(function () {
- e.argname.print(t)
- }),
- t.space(),
- s(e.body, t)
- }),
- e(ge, function (e, t) {
- t.print('finally'),
- t.space(),
- s(e.body, t)
- }),
- ye.DEFMETHOD('_do_print', function (e, t) {
- e.print(t),
- e.space(),
- this.definitions.forEach(function (t, n) {
- n && e.comma(),
- t.print(e)
- });
- var n = e.parent();
- (n instanceof W || n instanceof G) && n.init === this || e.semicolon()
- }),
- e(ve, function (e, t) {
- e._do_print(t, 'var')
- }),
- e(be, function (e, t) {
- e._do_print(t, 'const')
- }),
- e(xe, function (e, t) {
- if (e.name.print(t), e.value) {
- t.space(),
- t.print('='),
- t.space();
- var n = t.parent(1),
- r = n instanceof W || n instanceof G;
- o(e.value, t, r)
- }
- }),
- e(Ae, function (e, t) {
- e.expression.print(t),
- e instanceof Ee && !l(e, t) || t.with_parens(function () {
- e.args.forEach(function (e, n) {
- n && t.comma(),
- e.print(t)
- })
- })
- }),
- e(Ee, function (e, t) {
- t.print('new'),
- t.space(),
- Ae.prototype._codegen(e, t)
- }),
- _e.DEFMETHOD('_do_print', function (e) {
- this.car.print(e),
- this.cdr && (e.comma(), e.should_break() && (e.newline(), e.indent()), this.cdr.print(e))
- }),
- e(_e, function (e, t) {
- e._do_print(t)
- }),
- e(we, function (e, t) {
- var n = e.expression;
- n.print(t),
- n instanceof et && n.getValue() >= 0 && (/[xa-f.)]/i.test(t.last()) || t.print('.')),
- t.print('.'),
- t.add_mapping(e.end),
- t.print_name(e.property)
- }),
- e(De, function (e, t) {
- e.expression.print(t),
- t.print('['),
- e.property.print(t),
- t.print(']')
- }),
- e(Se, function (e, t) {
- var n = e.operator;
- t.print(n),
- (/^[a-z]/i.test(n) || /[+-]$/.test(n) && e.expression instanceof Se && /^[+-]/.test(e.expression.operator)) && t.space(),
- e.expression.print(t)
- }),
- e(Te, function (e, t) {
- e.expression.print(t),
- t.print(e.operator)
- }),
- e(Fe, function (e, t) {
- var n = e.operator;
- e.left.print(t),
- '>' == n[0] && e.left instanceof Te && '--' == e.left.operator ? t.print(' ') : t.space(),
- t.print(n),
- ('<' == n || '<<' == n) && e.right instanceof Se && '!' == e.right.operator && e.right.expression instanceof Se && '--' == e.right.expression.operator ? t.print(' ') : t.space(),
- e.right.print(t)
- }),
- e(Oe, function (e, t) {
- e.condition.print(t),
- t.space(),
- t.print('?'),
- t.space(),
- e.consequent.print(t),
- t.space(),
- t.colon(),
- e.alternative.print(t)
- }),
- e(Pe, function (e, t) {
- t.with_square(function () {
- var n = e.elements,
- r = n.length;
- r > 0 && t.space(),
- n.forEach(function (e, n) {
- n && t.comma(),
- e.print(t),
- n === r - 1 && e instanceof ot && t.comma()
- }),
- r > 0 && t.space()
- })
- }),
- e(Ne, function (e, t) {
- e.properties.length > 0 ? t.with_block(function () {
- e.properties.forEach(function (e, n) {
- n && (t.print(','), t.newline()),
- t.indent(),
- e.print(t)
- }),
- t.newline()
- }) : t.print('{}')
- }),
- e(Le, function (e, t) {
- a(e.key, e.quote, t),
- t.colon(),
- e.value.print(t)
- }),
- Re.DEFMETHOD('_print_getter_setter', function (e, t) {
- t.print(e),
- t.space(),
- a(this.key.name, this.quote, t),
- this.value._do_print(t, !0)
- }),
- e(Ie, function (e, t) {
- e._print_getter_setter('set', t)
- }),
- e(je, function (e, t) {
- e._print_getter_setter('get', t)
- }),
- e(Me, function (e, t) {
- var n = e.definition();
- t.print_name(n ? n.mangled_name || n.name : e.name)
- }),
- e(ot, m),
- e(Je, function (e, t) {
- t.print('this')
- }),
- e(Qe, function (e, t) {
- t.print(e.getValue())
- }),
- e(Ze, function (e, t) {
- t.print_string(e.getValue(), e.quote, n)
- }),
- e(et, function (e, n) {
- t && e.start && null != e.start.raw ? n.print(e.start.raw) : n.print(c(e.getValue()))
- }),
- e(tt, function (e, t) {
- var n = e.getValue().toString();
- t.option('ascii_only') ? n = t.to_ascii(n) : t.option('unescape_regexps') && (n = n.split('\\\\').map(function (e) {
- return e.replace(/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}/g, function (e) {
- var t = parseInt(e.substr(2), 16);
- return function (e) {
- return [92,
- 47,
- 46,
- 43,
- 42,
- 63,
- 40,
- 41,
- 91,
- 93,
- 123,
- 125,
- 36,
- 94,
- 58,
- 124,
- 33,
- 10,
- 13,
- 0,
- 65279,
- 8232,
- 8233].indexOf(e) < 0
- }(t) ? String.fromCharCode(t) : e
- })
- }).join('\\\\')),
- t.print(n);
- var r = t.parent();
- r instanceof Fe && /^in/.test(r.operator) && r.left === e && t.print(' ')
- }),
- h(B, m),
- h(R, f),
- h(N, f),
- h(Me, f),
- h(ne, f),
- h(V, f),
- h(z, m),
- h(Q, f),
- h(ce, f),
- h(pe, f),
- h(M, f),
- h(J, m),
- h(Ee, f),
- h(de, f),
- h(me, f),
- h(ge, f),
- h(ye, f),
- h(Qe, f),
- h(Ie, function (e, t) {
- t.add_mapping(e.start, e.key.name)
- }),
- h(je, function (e, t) {
- t.add_mapping(e.start, e.key.name)
- }),
- h(Re, function (e, t) {
- t.add_mapping(e.start, e.key)
- })
- }(),
- tn.prototype = new Ht,
- d(tn.prototype, {
- option: function (e) {
- return this.options[e]
- },
- compress: function (e) {
- this.option('expression') && (e = e.process_expression(!0));
- for (var t = + this.options.passes || 1, n = 0; n < t && n < 3; ++n) (n > 0 || this.option('reduce_vars')) && e.reset_opt_flags(this, !0),
- e = e.transform(this);
- return this.option('expression') && (e = e.process_expression(!1)),
- e
- },
- info: function () {
- 'verbose' == this.options.warnings && B.warn.apply(B, arguments)
- },
- warn: function (e, t) {
- if (this.options.warnings) {
- var n = E(e, t);
- n in this.warnings_produced || (this.warnings_produced[n] = !0, B.warn.apply(B, arguments))
- }
- },
- clear_warnings: function () {
- this.warnings_produced = {
- }
- },
- before: function (e, t, n) {
- if (e._squeezed) return e;
- var r = !1;
- e instanceof X && (e = e.hoist_declarations(this), r = !0),
- t(e, this),
- t(e, this);
- var i = e.optimize(this);
- return r && i instanceof X && (i.drop_unused(this), t(i, this)),
- i === e && (i._squeezed = !0),
- i
- }
- }),
- function () {
- function e(e, t) {
- e.DEFMETHOD('optimize', function (e) {
- if (this._optimized) return this;
- if (e.has_directive('use asm')) return this;
- var n = t(this, e);
- return n._optimized = !0,
- n
- })
- }
- function t(e) {
- if (!(e instanceof He)) return !1;
- for (var t = e.definition().orig, n = t.length; --n >= 0; ) if (t[n] instanceof qe) return !0
- }
- function n(e, t) {
- for (var n, r = 0; (n = e.parent(r++)) && !(n instanceof X); ) if (n instanceof me) {
- n = n.argname.definition().scope;
- break
- }
- return n.find_variable(t)
- }
- function r(e, t, n) {
- return n || (n = {
- }),
- t && (n.start || (n.start = t.start), n.end || (n.end = t.end)),
- new e(n)
- }
- function i(e, t) {
- switch (typeof e) {
- case 'string':
- return r(Ze, t, {
- value: e
- });
- case 'number':
- return isNaN(e) ? r(it, t) : isFinite(e) ? 1 / e < 0 ? r(Se, t, {
- operator: '-',
- expression: r(et, t, {
- value: - e
- })
- }) : r(et, t, {
- value: e
- }) : e < 0 ? r(Se, t, {
- operator: '-',
- expression: r(at, t)
- }) : r(at, t);
- case 'boolean':
- return r(e ? ct : lt, t);
- case 'undefined':
- return r(st, t);
- default:
- if (null === e) return r(rt, t, {
- value: null
- });
- if (e instanceof RegExp) return r(tt, t, {
- value: e
- });
- throw new Error(E('Can\'t handle constant of type: {type}', {
- type: typeof e
- }))
- }
- }
- function s(e, t, n) {
- return e instanceof Se && 'delete' == e.operator || e instanceof Ae && e.expression === t && (n instanceof Ce || n instanceof He && 'eval' == n.name) ? r(_e, t, {
- car: r(et, t, {
- value: 0
- }),
- cdr: n
- }) : n
- }
- function o(e) {
- if (null === e) return [];
- if (e instanceof M) return e.body;
- if (e instanceof U) return [];
- if (e instanceof P) return [e];
- throw new Error('Can\'t convert thing to statement array')
- }
- function a(e) {
- return null === e || (e instanceof U || e instanceof M && 0 == e.body.length)
- }
- function c(e) {
- return e instanceof ce ? e : (e instanceof W || e instanceof G || e instanceof K) && e.body instanceof M ? e.body : e
- }
- function p(e) {
- return e instanceof Ae && !(e instanceof Ee) && (e.expression instanceof ee || p(e.expression))
- }
- function h(e, t) {
- var n,
- i = 10;
- do {
- n = !1,
- t.option('angular') && (e = u(e)),
- e = l(e),
- t.option('dead_code') && (e = h(e, t)),
- t.option('if_return') && (e = p(e, t)),
- t.sequences_limit > 0 && (e = m(e, t)),
- t.option('join_vars') && (e = g(e, t)),
- t.option('collapse_vars') && (e = a(e, t))
- } while (n && i-- > 0);
- return e;
- function a(e, t) {
- for (var i = t.self(), o = !1, u = t.option('toplevel'), l = e.length; --l >= 0; ) {
- var c = e[l];
- if (!(c instanceof ye)) {
- if ([c,
- c.body,
- c.alternative,
- c.bcatch,
- c.bfinally].forEach(function (e) {
- e && e.body && a(e.body, t)
- }), l <= 0) break;
- var p = l - 1,
- h = e[p];
- if (h instanceof ye) {
- var f = h.definitions;
- if (null != f) for (var d = {
- }, m = !1, g = !1, y = {
- }, v = f.length; --v >= 0; ) {
- var b = f[v];
- if (null == b.value) break;
- var x = b.name.name;
- if (!x || !x.length) break;
- if (x in d) break;
- d[x] = !0;
- var A = i.find_variable && i.find_variable(x);
- if (A && A.references && 1 === A.references.length && 'arguments' != x && (u || !A.global)) {
- var E = A.references[0];
- if (E.scope.uses_eval || E.scope.uses_with) break;
- if (b.value.is_constant()) {
- var _ = new Ht(function (e) {
- var t = _.parent();
- return t instanceof q && (t.condition === e || t.init === e) ? e : e === E ? F(e, t, !0) : void 0
- });
- c.transform(_)
- } else if (!(m |= g)) {
- var C = b.value.has_side_effects(t);
- if (E.scope === i) {
- var w = new pt(function (e) {
- e instanceof He && T(e, w.parent()) && (y[e.name] = g = !0)
- });
- b.value.walk(w);
- var D = !1,
- k = new Ht(function (e) {
- if (D) return e;
- var t = k.parent();
- if (e instanceof Q || e instanceof de || e instanceof H || e instanceof fe || e instanceof q || t instanceof le && e !== t.condition || t instanceof Oe && e !== t.condition || e instanceof He && C && !function (e, t) {
- if (1 === e.orig.length && e.orig[0] instanceof $e) return !0;
- if (e.scope !== t) return !1;
- for (var n = e.references, r = 0, i = n.length; r < i; r++) if (n[r].scope !== t) return !1;
- return !0
- }(e.definition(), i) || t instanceof Fe && ('&&' == t.operator || '||' == t.operator) && e === t.right || t instanceof ce && e !== t.expression) return m = D = !0,
- e
- }, function (e) {
- return D ? e : e === E ? (D = !0, F(e, k.parent(), !1)) : (m |= e.has_side_effects(t)) ? (D = !0, e) : g && e instanceof He && e.name in y ? (m = !0, D = !0, e) : void 0
- });
- c.transform(k)
- } else m |= C
- }
- } else m = !0
- }
- }
- }
- }
- if (o) for (var S = e.length; --S >= 0; ) e.length > 1 && e[S] instanceof U && e.splice(S, 1);
- return e;
- function T(e, t) {
- return e instanceof He && ge(e, t)
- }
- function F(a, u, l) {
- if (T(a, u)) return a;
- var h = s(u, a, b.value);
- return b.value = null,
- f.splice(v, 1),
- 0 === f.length && (e[p] = r(U, i), o = !0),
- c.reset_opt_flags(t),
- t.info('Collapsing ' + (l ? 'constant' : 'variable') + ' ' + x + ' [{file}:{line},{col}]', a.start),
- n = !0,
- h
- }
- }
- function u(e) {
- function n(e) {
- return /@ngInject/.test(e.value)
- }
- function i(e) {
- return e.argnames.map(function (e) {
- return r(Ze, e, {
- value: e.name
- })
- })
- }
- function s(e, t) {
- return r(Pe, e, {
- elements: t
- })
- }
- function o(e, t) {
- return r(L, e, {
- body: r(Be, e, {
- operator: '=',
- left: r(we, t, {
- expression: r(He, t, t),
- property: '$inject'
- }),
- right: s(e, i(e))
- })
- })
- }
- return e.reduce(function (e, r) {
- if (e.push(r), r.body && r.body.args) !function e(t) {
- t && t.args && (t.args.forEach(function (e, t, r) {
- var o = e.start.comments_before;
- e instanceof Q && o.length && n(o[0]) && (r[t] = s(e, i(e).concat(e)))
- }), t.expression && t.expression.expression && e(t.expression.expression))
- }(r.body);
- else {
- var a = r.start,
- u = a.comments_before;
- if (u && u.length > 0) n(u.pop()) && (r instanceof te ? e.push(o(r, r.name)) : r instanceof ye ? r.definitions.forEach(function (t) {
- t.value && t.value instanceof Q && e.push(o(t.value, t.name))
- }) : t.warn('Unknown statement marked with @ngInject [{file}:{line},{col}]', a))
- }
- return e
- }, [
- ])
- }
- function l(e) {
- var t = [
- ];
- return e.reduce(function (e, r) {
- return r instanceof M ? (n = !0, e.push.apply(e, l(r.body))) : r instanceof U ? n = !0 : r instanceof R ? t.indexOf(r.value) < 0 ? (e.push(r), t.push(r.value)) : n = !0 : e.push(r),
- e
- }, [
- ])
- }
- function p(e, t) {
- var i = t.self(),
- s = function (e) {
- for (var t = 0, n = e.length; --n >= 0; ) {
- var r = e[n];
- if (r instanceof le && r.body instanceof ie && ++t > 1) return !0
- }
- return !1
- }(e),
- a = i instanceof Q,
- u = [
- ];
- e: for (var l = e.length; --l >= 0; ) {
- var p = e[l];
- switch (!0) {
- case a && p instanceof ie && !p.value && 0 == u.length:
- n = !0;
- continue e;
- case p instanceof le:
- if (p.body instanceof ie) {
- if ((a && 0 == u.length || u[0] instanceof ie && !u[0].value) && !p.body.value && !p.alternative) {
- n = !0;
- var h = r(L, p.condition, {
- body: p.condition
- });
- u.unshift(h);
- continue e
- }
- if (u[0] instanceof ie && p.body.value && u[0].value && !p.alternative) {
- n = !0,
- (p = p.clone()).alternative = u[0],
- u[0] = p.transform(t);
- continue e
- }
- if (s && (0 == u.length || u[0] instanceof ie) && p.body.value && !p.alternative && a) {
- n = !0,
- (p = p.clone()).alternative = u[0] || r(ie, p, {
- value: null
- }),
- u[0] = p.transform(t);
- continue e
- }
- if (!p.body.value && a) {
- n = !0,
- (p = p.clone()).condition = p.condition.negate(t);
- var d = f(g = o(p.alternative).concat(u));
- p.body = r(M, p, {
- body: g
- }),
- p.alternative = null,
- u = d.concat([p.transform(t)]);
- continue e
- }
- if (t.option('sequences') && l > 0 && e[l - 1] instanceof le && e[l - 1].body instanceof ie && 1 == u.length && a && u[0] instanceof L && !p.alternative) {
- n = !0,
- u.push(r(ie, u[0], {
- value: null
- }).transform(t)),
- u.unshift(p);
- continue e
- }
- }
- var m = (y = je(p.body)) instanceof oe ? t.loopcontrol_target(y) : null;
- if (y && (y instanceof ie && !y.value && a || y instanceof ue && i === c(m) || y instanceof ae && m instanceof M && i === m)) {
- y.label && _(y.label.thedef.references, y),
- n = !0;
- var g = o(p.body).slice(0, - 1);
- (p = p.clone()).condition = p.condition.negate(t),
- p.body = r(M, p, {
- body: o(p.alternative).concat(u)
- }),
- p.alternative = r(M, p, {
- body: g
- }),
- u = [
- p.transform(t)
- ];
- continue e
- }
- var y;
- m = (y = je(p.alternative)) instanceof oe ? t.loopcontrol_target(y) : null;
- if (y && (y instanceof ie && !y.value && a || y instanceof ue && i === c(m) || y instanceof ae && m instanceof M && i === m)) {
- y.label && _(y.label.thedef.references, y),
- n = !0,
- (p = p.clone()).body = r(M, p.body, {
- body: o(p.body).concat(u)
- }),
- p.alternative = r(M, p.alternative, {
- body: o(p.alternative).slice(0, - 1)
- }),
- u = [
- p.transform(t)
- ];
- continue e
- }
- u.unshift(p);
- break;
- default:
- u.unshift(p)
- }
- }
- return u
- }
- function h(e, t) {
- var r = !1,
- i = e.length,
- s = t.self();
- return e = e.reduce(function (e, n) {
- if (r) d(t, n, e);
- else {
- if (n instanceof oe) {
- var i = t.loopcontrol_target(n);
- n instanceof ae && !(i instanceof q) && c(i) === s || n instanceof ue && c(i) === s ? n.label && _(n.label.thedef.references, n) : e.push(n)
- } else e.push(n);
- je(n) && (r = !0)
- }
- return e
- }, [
- ]),
- n = e.length != i,
- e
- }
- function m(e, t) {
- if (e.length < 2) return e;
- var i = [
- ],
- s = [
- ];
- function o() {
- (i = _e.from_array(i)) && s.push(r(L, i, {
- body: i
- })),
- i = [
- ]
- }
- return e.forEach(function (e) {
- if (e instanceof L) {
- (function (e) {
- for (var t = 0, n = 0; n < e.length; ++n) {
- var r = e[n];
- r instanceof _e ? t += r.len() : t++
- }
- return t
- }) (i) >= t.sequences_limit && o();
- var n = e.body;
- i.length > 0 && (n = n.drop_side_effect_free(t)),
- n && i.push(n)
- } else o(),
- s.push(e)
- }),
- o(),
- s = function (e, t) {
- function n(e) {
- i.pop();
- var n = s.body;
- return n instanceof _e ? n.add(e) : n = _e.cons(n, e),
- n.transform(t)
- }
- var i = [
- ],
- s = null;
- return e.forEach(function (e) {
- if (s) if (e instanceof W) {
- var o = {
- };
- try {
- s.body.walk(new pt(function (e) {
- if (e instanceof Fe && 'in' == e.operator) throw o
- })),
- !e.init || e.init instanceof ye ? e.init || (e.init = s.body.drop_side_effect_free(t), i.pop()) : e.init = n(e.init)
- } catch (e) {
- if (e !== o) throw e
- }
- } else e instanceof le ? e.condition = n(e.condition) : e instanceof H ? e.expression = n(e.expression) : e instanceof re && e.value ? e.value = n(e.value) : e instanceof re ? e.value = n(r(st, e).transform(t)) : e instanceof ce && (e.expression = n(e.expression));
- i.push(e),
- s = e instanceof L ? e : null
- }),
- i
- }(s, t),
- n = s.length != e.length,
- s
- }
- function g(e, t) {
- var r = null;
- return e.reduce(function (e, t) {
- return t instanceof ye && r && r.TYPE == t.TYPE ? (r.definitions = r.definitions.concat(t.definitions), n = !0) : t instanceof W && r instanceof ve && (!t.init || t.init.TYPE == r.TYPE) ? (n = !0, e.pop(), t.init ? t.init.definitions = r.definitions.concat(t.init.definitions) : t.init = r, e.push(t), r = t) : (r = t, e.push(t)),
- e
- }, [
- ])
- }
- }
- function f(e) {
- for (var t = [
- ], n = e.length - 1; n >= 0; --n) {
- var r = e[n];
- r instanceof te && (e.splice(n, 1), t.unshift(r))
- }
- return t
- }
- function d(e, t, n) {
- t instanceof te || e.warn('Dropping unreachable code [{file}:{line},{col}]', t.start),
- t.walk(new pt(function (t) {
- return t instanceof ye ? (e.warn('Declarations in unreachable code! [{file}:{line},{col}]', t.start), t.remove_initializers(), n.push(t), !0) : t instanceof te ? (n.push(t), !0) : t instanceof X || void 0
- }))
- }
- function A(e, t) {
- return e.is_undefined || e instanceof st || e instanceof Se && 'void' == e.operator && !e.expression.has_side_effects(t)
- }
- var F,
- O,
- V;
- e(B, function (e, t) {
- return e
- }),
- B.DEFMETHOD('equivalent_to', function (e) {
- return this.TYPE == e.TYPE && this.print_to_string() == e.print_to_string()
- }),
- B.DEFMETHOD('process_expression', function (e, t) {
- var n = this,
- i = new Ht(function (s) {
- if (e && s instanceof L) return r(ie, s, {
- value: s.body
- });
- if (!e && s instanceof ie) {
- if (t) {
- var o = s.value && s.value.drop_side_effect_free(t, !0);
- return o ? r(L, s, {
- body: o
- }) : r(U, s)
- }
- return r(L, s, {
- body: s.value || r(Se, s, {
- operator: 'void',
- expression: r(et, s, {
- value: 0
- })
- })
- })
- }
- if (s instanceof Q && s !== n) return s;
- if (s instanceof j) {
- var a = s.body.length - 1;
- a >= 0 && (s.body[a] = s.body[a].transform(i))
- }
- return s instanceof le && (s.body = s.body.transform(i), s.alternative && (s.alternative = s.alternative.transform(i))),
- s instanceof H && (s.body = s.body.transform(i)),
- s
- });
- return n.transform(i)
- }),
- B.DEFMETHOD('reset_opt_flags', function (e, t) {
- var n = t && e.option('reduce_vars'),
- i = e.option('toplevel'),
- s = Object.create(null),
- o = new pt(function (e) {
- if (e instanceof Me) {
- var t = e.definition();
- e instanceof He && t.references.push(e),
- t.fixed = !1
- }
- }),
- a = new pt(function (e, t) {
- if (e._squeezed = !1, e._optimized = !1, n) {
- var f;
- if (e instanceof J && e.globals.each(h), e instanceof X && e.variables.each(h), e instanceof He) if ((m = e.definition()).references.push(e), void 0 === m.fixed || !l(m) || function e(t, n, r) {
- var i = a.parent(n);
- if (ge(t, i) || !r && i instanceof Ae && i.expression === t) return !0;
- if (i instanceof Ce && i.expression === t) return !r && e(i, n + 1)
- }(e, 0, e.fixed_value() instanceof Q)) m.fixed = !1;
- else {
- var d = a.parent();
- (d instanceof Be && '=' == d.operator && e === d.right || d instanceof Ae && e !== d.expression || d instanceof ie && e === d.value && e.scope !== m.scope || d instanceof xe && e === d.value) && (m.escaped = !0)
- }
- if (e instanceof We && (e.definition().fixed = !1), e instanceof xe) {
- if (null == (m = e.name.definition()).fixed) return e.value ? (m.fixed = function () {
- return e.value
- }, u(m, !1), t()) : m.fixed = null,
- u(m, !0),
- !0;
- e.value && (m.fixed = !1)
- }
- if (e instanceof te) {
- var m = e.name.definition();
- !i && m.global || l(m) ? m.fixed = !1 : (m.fixed = e, u(m, !0));
- var g = s;
- return s = Object.create(null),
- t(),
- s = g,
- !0
- }
- if (e instanceof ee) return c(),
- !e.name && (f = a.parent()) instanceof Ae && f.expression === e && e.argnames.forEach(function (t, n) {
- var i = t.definition();
- e.uses_arguments || void 0 !== i.fixed ? i.fixed = !1 : (i.fixed = function () {
- return f.args[n] || r(st, f)
- }, u(i, !0))
- }),
- t(),
- p(),
- !0;
- if (e instanceof Z) {
- g = s;
- return s = Object.create(null),
- t(),
- s = g,
- !0
- }
- if (e instanceof Fe && ('&&' == e.operator || '||' == e.operator)) return e.left.walk(a),
- c(),
- e.right.walk(a),
- p(),
- !0;
- if (e instanceof Oe) return e.condition.walk(a),
- c(),
- e.consequent.walk(a),
- p(),
- c(),
- e.alternative.walk(a),
- p(),
- !0;
- if (e instanceof le || e instanceof K) return e.condition.walk(a),
- c(),
- e.body.walk(a),
- p(),
- e.alternative && (c(), e.alternative.walk(a), p()),
- !0;
- if (e instanceof z) return c(),
- e.body.walk(a),
- p(),
- !0;
- if (e instanceof W) return e.init && e.init.walk(a),
- c(),
- e.condition && e.condition.walk(a),
- e.body.walk(a),
- e.step && e.step.walk(a),
- p(),
- !0;
- if (e instanceof G) return e.init.walk(o),
- e.object.walk(a),
- c(),
- e.body.walk(a),
- p(),
- !0;
- if (e instanceof de) return c(),
- I(e, a),
- p(),
- e.bcatch && (c(), e.bcatch.walk(a), p()),
- e.bfinally && e.bfinally.walk(a),
- !0;
- if (e instanceof pe) return c(),
- t(),
- p(),
- !0
- }
- });
- function u(e, t) {
- s[e.id] = t
- }
- function l(e) {
- if (s[e.id]) {
- if (null == e.fixed) {
- var t = e.orig[0];
- if (t instanceof Ke || 'arguments' == t.name) return !1;
- e.fixed = r(st, t)
- }
- return !0
- }
- }
- function c() {
- s = Object.create(s)
- }
- function p() {
- s = Object.getPrototypeOf(s)
- }
- function h(e) {
- e.escaped = !1,
- e.scope.uses_eval ? e.fixed = !1 : i || !e.global || e.orig[0] instanceof qe ? e.fixed = void 0 : e.fixed = !1,
- e.references = [
- ],
- e.should_replace = void 0
- }
- this.walk(a)
- }),
- He.DEFMETHOD('fixed_value', function () {
- var e = this.definition().fixed;
- return !e || e instanceof B ? e : e()
- }),
- function (e) {
- function t(e) {
- return /strict/.test(e)
- }
- B.DEFMETHOD('may_throw_on_access', function (e) {
- var t = e.option('pure_getters');
- return !t || this._throw_on_access(t)
- }),
- e(B, t),
- e(rt, y),
- e(st, y),
- e(Qe, g),
- e(Pe, g),
- e(Ne, function (e) {
- if (!t(e)) return !1;
- for (var n = this.properties.length; --n >= 0; ) if (this.properties[n].value instanceof Z) return !0;
- return !1
- }),
- e(ee, g),
- e(Te, g),
- e(Se, function () {
- return 'void' == this.operator
- }),
- e(Fe, function (e) {
- switch (this.operator) {
- case '&&':
- return this.left._throw_on_access(e);
- case '||':
- return this.left._throw_on_access(e) && this.right._throw_on_access(e);
- default:
- return !1
- }
- }),
- e(Be, function (e) {
- return '=' == this.operator && this.right._throw_on_access(e)
- }),
- e(Oe, function (e) {
- return this.consequent._throw_on_access(e) || this.alternative._throw_on_access(e)
- }),
- e(_e, function (e) {
- return this.cdr._throw_on_access(e)
- }),
- e(He, function (e) {
- if (this.is_undefined) return !0;
- if (!t(e)) return !1;
- var n = this.fixed_value();
- return !n || n._throw_on_access(e)
- })
- }(function (e, t) {
- e.DEFMETHOD('_throw_on_access', t)
- }),
- O = [
- '!',
- 'delete'
- ],
- V = [
- 'in',
- 'instanceof',
- '==',
- '!=',
- '===',
- '!==',
- '<',
- '<=',
- '>=',
- '>'
- ],
- (F = function (e, t) {
- e.DEFMETHOD('is_boolean', t)
- }) (B, g),
- F(Se, function () {
- return u(this.operator, O)
- }),
- F(Fe, function () {
- return u(this.operator, V) || ('&&' == this.operator || '||' == this.operator) && this.left.is_boolean() && this.right.is_boolean()
- }),
- F(Oe, function () {
- return this.consequent.is_boolean() && this.alternative.is_boolean()
- }),
- F(Be, function () {
- return '=' == this.operator && this.right.is_boolean()
- }),
- F(_e, function () {
- return this.cdr.is_boolean()
- }),
- F(ct, y),
- F(lt, y),
- function (e) {
- e(B, g),
- e(et, y);
- var t = w('+ - ~ ++ --');
- e(ke, function () {
- return t(this.operator)
- });
- var n = w('- * / % & | ^ << >> >>>');
- e(Fe, function (e) {
- return n(this.operator) || '+' == this.operator && this.left.is_number(e) && this.right.is_number(e)
- }),
- e(Be, function (e) {
- return n(this.operator.slice(0, - 1)) || '=' == this.operator && this.right.is_number(e)
- }),
- e(_e, function (e) {
- return this.cdr.is_number(e)
- }),
- e(Oe, function (e) {
- return this.consequent.is_number(e) && this.alternative.is_number(e)
- })
- }(function (e, t) {
- e.DEFMETHOD('is_number', t)
- }),
- function (e) {
- e(B, g),
- e(Ze, y),
- e(Se, function () {
- return 'typeof' == this.operator
- }),
- e(Fe, function (e) {
- return '+' == this.operator && (this.left.is_string(e) || this.right.is_string(e))
- }),
- e(Be, function (e) {
- return ('=' == this.operator || '+=' == this.operator) && this.right.is_string(e)
- }),
- e(_e, function (e) {
- return this.cdr.is_string(e)
- }),
- e(Oe, function (e) {
- return this.consequent.is_string(e) && this.alternative.is_string(e)
- })
- }(function (e, t) {
- e.DEFMETHOD('is_string', t)
- });
- var se = w('delete ++ --');
- function ge(e, t) {
- return t instanceof ke && se(t.operator) ? t.expression : t instanceof Be && t.left === e ? e : void 0
- }
- function be(e, t) {
- return e.print_to_string().length > t.print_to_string().length ? t : e
- }
- function Ie(e, t, n) {
- return (T(e) ? function (e, t) {
- return be(r(L, e, {
- body: e
- }), r(L, t, {
- body: t
- })).body
- }
- : be) (t, n)
- }
- function je(e) {
- return e && e.aborts()
- }
- !function (e) {
- B.DEFMETHOD('resolve_defines', function (e) {
- if (e.option('global_defs')) {
- var t = this._find_defs(e, '');
- if (t) {
- var n,
- r = this,
- i = 0;
- do {
- n = r,
- r = e.parent(i++)
- } while (r instanceof Ce && r.expression === n);
- if (!ge(n, r)) return t;
- e.warn('global_defs ' + this.print_to_string() + ' redefined [{file}:{line},{col}]', this.start)
- }
- }
- }),
- e(B, m),
- e(we, function (e, t) {
- return this.expression._find_defs(e, '.' + this.property + t)
- }),
- e(He, function (e, t) {
- if (this.global()) {
- var n,
- s = e.option('global_defs');
- if (s && S(s, n = this.name + t)) {
- var o = function e(t, n) {
- if (t instanceof B) return r(t.CTOR, n, t);
- if (Array.isArray(t)) return r(Pe, n, {
- elements: t.map(function (t) {
- return e(t, n)
- })
- });
- if (t && 'object' == typeof t) {
- var s = [
- ];
- for (var o in t) s.push(r(Le, n, {
- key: o,
- value: e(t[o], n)
- }));
- return r(Ne, n, {
- properties: s
- })
- }
- return i(t, n)
- }(s[n], this),
- a = e.find_parent(J);
- return o.walk(new pt(function (e) {
- e instanceof He && (e.scope = a, e.thedef = a.def_global(e))
- })),
- o
- }
- }
- })
- }(function (e, t) {
- e.DEFMETHOD('_find_defs', t)
- }),
- function (e) {
- B.DEFMETHOD('evaluate', function (t) {
- if (!t.option('evaluate')) return this;
- try {
- var n = this._eval(t);
- return !n || n instanceof RegExp || 'object' != typeof n ? n : this
- } catch (t) {
- if (t !== e) throw t;
- return this
- }
- });
- var t = w('! ~ - + void');
- function n(e, t) {
- if (!t) throw new Error('Compressor must be passed');
- return e._eval(t)
- }
- B.DEFMETHOD('is_constant', function () {
- return this instanceof Qe ? !(this instanceof tt) : this instanceof Se && this.expression instanceof Qe && t(this.operator)
- }),
- B.DEFMETHOD('constant_value', function (e) {
- if (this instanceof Qe && !(this instanceof tt)) return this.value;
- if (this instanceof Se && this.expression instanceof Qe) switch (this.operator) {
- case '!':
- return !this.expression.value;
- case '~':
- return ~this.expression.value;
- case '-':
- return - this.expression.value;
- case '+':
- return + this.expression.value;
- default:
- throw new Error(E('Cannot evaluate unary expression {value}', {
- value: this.print_to_string()
- }))
- }
- var t = this.evaluate(e);
- if (t !== this) return t;
- throw new Error(E('Cannot evaluate constant [{file}:{line},{col}]', this.start))
- }),
- e(P, function () {
- throw new Error(E('Cannot evaluate a statement [{file}:{line},{col}]', this.start))
- }),
- e(Q, function () {
- throw e
- }),
- e(B, function () {
- throw e
- }),
- e(Qe, function () {
- return this.getValue()
- }),
- e(Pe, function (t) {
- if (t.option('unsafe')) return this.elements.map(function (e) {
- return n(e, t)
- });
- throw e
- }),
- e(Ne, function (t) {
- if (t.option('unsafe')) {
- for (var r = {
- }, i = 0, s = this.properties.length; i < s; i++) {
- var o = this.properties[i],
- a = o.key;
- if (a instanceof Me ? a = a.name : a instanceof B && (a = n(a, t)), 'function' == typeof Object.prototype[a]) throw e;
- r[a] = n(o.value, t)
- }
- return r
- }
- throw e
- }),
- e(Se, function (t) {
- var r = this.expression;
- switch (this.operator) {
- case '!':
- return !n(r, t);
- case 'typeof':
- if (r instanceof ee) return 'function';
- if ((r = n(r, t)) instanceof RegExp) throw e;
- return typeof r;
- case 'void':
- return void n(r, t);
- case '~':
- return ~n(r, t);
- case '-':
- return - n(r, t);
- case '+':
- return + n(r, t)
- }
- throw e
- }),
- e(Fe, function (t) {
- var r,
- i = this.left,
- s = this.right;
- switch (this.operator) {
- case '&&':
- r = n(i, t) && n(s, t);
- break;
- case '||':
- r = n(i, t) || n(s, t);
- break;
- case '|':
- r = n(i, t) | n(s, t);
- break;
- case '&':
- r = n(i, t) & n(s, t);
- break;
- case '^':
- r = n(i, t) ^ n(s, t);
- break;
- case '+':
- r = n(i, t) + n(s, t);
- break;
- case '*':
- r = n(i, t) * n(s, t);
- break;
- case '/':
- r = n(i, t) / n(s, t);
- break;
- case '%':
- r = n(i, t) % n(s, t);
- break;
- case '-':
- r = n(i, t) - n(s, t);
- break;
- case '<<':
- r = n(i, t) << n(s, t);
- break;
- case '>>':
- r = n(i, t) >> n(s, t);
- break;
- case '>>>':
- r = n(i, t) >>> n(s, t);
- break;
- case '==':
- r = n(i, t) == n(s, t);
- break;
- case '===':
- r = n(i, t) === n(s, t);
- break;
- case '!=':
- r = n(i, t) != n(s, t);
- break;
- case '!==':
- r = n(i, t) !== n(s, t);
- break;
- case '<':
- r = n(i, t) < n(s, t);
- break;
- case '<=':
- r = n(i, t) <= n(s, t);
- break;
- case '>':
- r = n(i, t) > n(s, t);
- break;
- case '>=':
- r = n(i, t) >= n(s, t);
- break;
- default:
- throw e
- }
- if (isNaN(r) && t.find_parent(H)) throw e;
- return r
- }),
- e(Oe, function (e) {
- return n(this.condition, e) ? n(this.consequent, e) : n(this.alternative, e)
- }),
- e(He, function (t) {
- if (!t.option('reduce_vars') || this._evaluating) throw e;
- this._evaluating = !0;
- try {
- var r = this.fixed_value();
- if (!r) throw e;
- var i = n(r, t);
- if (S(r, '_eval') || (r._eval = function () {
- return i
- }), i && 'object' == typeof i && this.definition().escaped) throw e;
- return i
- } finally {
- this._evaluating = !1
- }
- }),
- e(Ce, function (t) {
- if (t.option('unsafe')) {
- var r = this.property;
- r instanceof B && (r = n(r, t));
- var i = n(this.expression, t);
- if (i && S(i, r)) return i[r]
- }
- throw e
- })
- }(function (e, t) {
- e.DEFMETHOD('_eval', t)
- }),
- function (e) {
- function t(e) {
- return r(Se, e, {
- operator: '!',
- expression: e
- })
- }
- function n(e, n, i) {
- var s = t(e);
- if (i) {
- var o = r(L, n, {
- body: n
- });
- return be(s, o) === o ? n : s
- }
- return be(s, n)
- }
- e(B, function () {
- return t(this)
- }),
- e(P, function () {
- throw new Error('Cannot negate a statement')
- }),
- e(ee, function () {
- return t(this)
- }),
- e(Se, function () {
- return '!' == this.operator ? this.expression : t(this)
- }),
- e(_e, function (e) {
- var t = this.clone();
- return t.cdr = t.cdr.negate(e),
- t
- }),
- e(Oe, function (e, t) {
- var r = this.clone();
- return r.consequent = r.consequent.negate(e),
- r.alternative = r.alternative.negate(e),
- n(this, r, t)
- }),
- e(Fe, function (e, r) {
- var i = this.clone(),
- s = this.operator;
- if (e.option('unsafe_comps')) switch (s) {
- case '<=':
- return i.operator = '>',
- i;
- case '<':
- return i.operator = '>=',
- i;
- case '>=':
- return i.operator = '<',
- i;
- case '>':
- return i.operator = '<=',
- i
- }
- switch (s) {
- case '==':
- return i.operator = '!=',
- i;
- case '!=':
- return i.operator = '==',
- i;
- case '===':
- return i.operator = '!==',
- i;
- case '!==':
- return i.operator = '===',
- i;
- case '&&':
- return i.operator = '||',
- i.left = i.left.negate(e, r),
- i.right = i.right.negate(e),
- n(this, i, r);
- case '||':
- return i.operator = '&&',
- i.left = i.left.negate(e, r),
- i.right = i.right.negate(e),
- n(this, i, r)
- }
- return t(this)
- })
- }(function (e, t) {
- e.DEFMETHOD('negate', function (e, n) {
- return t.call(this, e, n)
- })
- }),
- Ae.DEFMETHOD('has_pure_annotation', function (e) {
- if (!e.option('side_effects')) return !1;
- if (void 0 !== this.pure) return this.pure;
- var t,
- n,
- r = !1;
- return this.start && (t = this.start.comments_before) && t.length && /[@#]__PURE__/.test((n = t[t.length - 1]).value) && (r = n),
- this.pure = r
- }),
- function (e) {
- function t(e, t) {
- for (var n = e.length; --n >= 0; ) if (e[n].has_side_effects(t)) return !0;
- return !1
- }
- e(B, y),
- e(U, g),
- e(Qe, g),
- e(Je, g),
- e(Ae, function (e) {
- if (!this.has_pure_annotation(e) && e.pure_funcs(this)) return !0;
- for (var t = this.args.length; --t >= 0; ) if (this.args[t].has_side_effects(e)) return !0;
- return !1
- }),
- e(j, function (e) {
- return t(this.body, e)
- }),
- e(ce, function (e) {
- return this.expression.has_side_effects(e) || t(this.body, e)
- }),
- e(fe, function (e) {
- return this.expression.has_side_effects(e) || t(this.body, e)
- }),
- e(de, function (e) {
- return t(this.body, e) || this.bcatch && this.bcatch.has_side_effects(e) || this.bfinally && this.bfinally.has_side_effects(e)
- }),
- e(le, function (e) {
- return this.condition.has_side_effects(e) || this.body && this.body.has_side_effects(e) || this.alternative && this.alternative.has_side_effects(e)
- }),
- e(z, function (e) {
- return this.body.has_side_effects(e)
- }),
- e(L, function (e) {
- return this.body.has_side_effects(e)
- }),
- e(te, y),
- e(ee, g),
- e(Fe, function (e) {
- return this.left.has_side_effects(e) || this.right.has_side_effects(e)
- }),
- e(Be, y),
- e(Oe, function (e) {
- return this.condition.has_side_effects(e) || this.consequent.has_side_effects(e) || this.alternative.has_side_effects(e)
- }),
- e(ke, function (e) {
- return se(this.operator) || this.expression.has_side_effects(e)
- }),
- e(He, function (e) {
- return this.undeclared()
- }),
- e(Ne, function (e) {
- return t(this.properties, e)
- }),
- e(Re, function (e) {
- return this.value.has_side_effects(e)
- }),
- e(Pe, function (e) {
- return t(this.elements, e)
- }),
- e(we, function (e) {
- return this.expression.may_throw_on_access(e) || this.expression.has_side_effects(e)
- }),
- e(De, function (e) {
- return this.expression.may_throw_on_access(e) || this.expression.has_side_effects(e) || this.property.has_side_effects(e)
- }),
- e(_e, function (e) {
- return this.car.has_side_effects(e) || this.cdr.has_side_effects(e)
- })
- }(function (e, t) {
- e.DEFMETHOD('has_side_effects', t)
- }),
- function (e) {
- function t() {
- var e = this.body.length;
- return e > 0 && je(this.body[e - 1])
- }
- e(P, b),
- e(ne, v),
- e(M, t),
- e(pe, t),
- e(le, function () {
- return this.alternative && je(this.body) && je(this.alternative) && this
- })
- }(function (e, t) {
- e.DEFMETHOD('aborts', t)
- }),
- e(R, function (e, t) {
- return t.has_directive(e.value) !== e ? r(U, e) : e
- }),
- e(N, function (e, t) {
- return t.option('drop_debugger') ? r(U, e) : e
- }),
- e(z, function (e, t) {
- return e.body instanceof ae && t.loopcontrol_target(e.body) === e.body ? r(U, e) : 0 == e.label.references.length ? e.body : e
- }),
- e(j, function (e, t) {
- return e.body = h(e.body, t),
- e
- }),
- e(M, function (e, t) {
- switch (e.body = h(e.body, t), e.body.length) {
- case 1:
- return e.body[0];
- case 0:
- return r(U, e)
- }
- return e
- }),
- X.DEFMETHOD('drop_unused', function (e) {
- var n = this;
- if (e.has_directive('use asm')) return n;
- var i = e.option('toplevel');
- if (e.option('unused') && (!(n instanceof J) || i) && !n.uses_eval && !n.uses_with) {
- var o = !/keep_assign/.test(e.option('unused')),
- u = /funcs/.test(i),
- l = /vars/.test(i);
- n instanceof J && 1 != i || (u = l = !0);
- var c = [
- ],
- p = Object.create(null);
- n instanceof J && e.top_retain && n.variables.each(function (t) {
- !e.top_retain(t) || t.id in p || (p[t.id] = !0, c.push(t))
- });
- var h = new k,
- f = this,
- d = new pt(function (r, i) {
- if (r !== n) {
- if (r instanceof te) {
- if (!u && f === n) (s = r.name.definition()).id in p || (p[s.id] = !0, c.push(s));
- return h.add(r.name.name, r),
- !0
- }
- if (r instanceof ye && f === n) return r.definitions.forEach(function (t) {
- if (!l) {
- var n = t.name.definition();
- n.id in p || (p[n.id] = !0, c.push(n))
- }
- t.value && (h.add(t.name.name, t.value), t.value.has_side_effects(e) && t.value.walk(d))
- }),
- !0;
- if (o && r instanceof Be && '=' == r.operator && r.left instanceof He && !t(r.left) && f === n) return r.right.walk(d),
- !0;
- var s;
- if (r instanceof He) return (s = r.definition()).id in p || (p[s.id] = !0, c.push(s)),
- !0;
- if (r instanceof X) {
- var a = f;
- return f = r,
- i(),
- f = a,
- !0
- }
- }
- });
- n.walk(d);
- for (var m = 0; m < c.length; ++m) c[m].orig.forEach(function (e) {
- var t = h.get(e.name);
- t && t.forEach(function (e) {
- var t = new pt(function (e) {
- if (e instanceof He) {
- var t = e.definition();
- t.id in p || (p[t.id] = !0, c.push(t))
- }
- });
- e.walk(t)
- })
- });
- var g = new Ht(function (t, i, c) {
- t instanceof ee && t.name && !e.option('keep_fnames') && ((y = t.name.definition()).id in p && !(y.orig.length > 1) || (t.name = null));
- if (t instanceof Q && !(t instanceof Z)) for (var h = !e.option('keep_fargs'), f = t.argnames, d = f.length; --d >= 0; ) {
- var m = f[d];
- m.definition().id in p ? h = !1 : (m.__unused = !0, h && (f.pop(), e[m.unreferenced() ? 'warn' : 'info']('Dropping unused function argument {name} [{file}:{line},{col}]', {
- name: m.name,
- file: m.start.file,
- line: m.start.line,
- col: m.start.col
- })))
- }
- if (u && t instanceof te && t !== n) return t.name.definition().id in p ? t : (e[t.name.unreferenced() ? 'warn' : 'info']('Dropping unused function {name} [{file}:{line},{col}]', {
- name: t.name.name,
- file: t.name.start.file,
- line: t.name.start.line,
- col: t.name.start.col
- }), r(U, t));
- if (l && t instanceof ye && !(g.parent() instanceof G && g.parent().init === t)) {
- var y;
- y = C(y = t.definitions.filter(function (t) {
- t.value && (t.value = t.value.transform(g));
- var n = t.name.definition();
- if (n.id in p) return !0;
- if (n.orig[0] instanceof We) return t.value = t.value && t.value.drop_side_effect_free(e),
- !0;
- var r = {
- name: t.name.name,
- file: t.name.start.file,
- line: t.name.start.line,
- col: t.name.start.col
- };
- return t.value && (t._unused_side_effects = t.value.drop_side_effect_free(e)) ? (e.warn('Side effects in initialization of unused variable {name} [{file}:{line},{col}]', r), !0) : (e[t.name.unreferenced() ? 'warn' : 'info']('Dropping unused variable {name} [{file}:{line},{col}]', r), !1)
- }), function (e, t) {
- return !e.value && t.value ? - 1 : !t.value && e.value ? 1 : 0
- });
- var v = [
- ];
- for (d = 0; d < y.length; ) {
- var b = y[d];
- b._unused_side_effects ? (v.push(b._unused_side_effects), y.splice(d, 1)) : (v.length > 0 && (v.push(b.value), b.value = _e.from_array(v), v = [
- ]), ++d)
- }
- return v = v.length > 0 ? r(M, t, {
- body: [
- r(L, t, {
- body: _e.from_array(v)
- })
- ]
- }) : null,
- 0 != y.length || v ? 0 == y.length ? c ? x.splice(v.body) : v : (t.definitions = y, v ? (v.body.unshift(t), c ? x.splice(v.body) : v) : t) : r(U, t)
- }
- if (l && o && t instanceof Be && '=' == t.operator && t.left instanceof He && (!((y = t.left.definition()).id in p) && n.variables.get(y.name) === y)) return s(g.parent(), t, t.right.transform(g));
- if (t instanceof W) {
- if (i(t, this), t.init instanceof M) {
- var A = t.init;
- return t.init = A.body.pop(),
- A.body.push(t),
- c ? x.splice(A.body) : A
- }
- return a(t.init) && (t.init = null),
- t
- }
- if (t instanceof z && t.body instanceof W) {
- if (i(t, this), t.body instanceof M) {
- A = t.body;
- return t.body = A.body.pop(),
- A.body.push(t),
- c ? x.splice(A.body) : A
- }
- return t
- }
- return t instanceof X && t !== n ? t : void 0
- });
- n.transform(g)
- }
- }),
- X.DEFMETHOD('hoist_declarations', function (e) {
- var t = this;
- if (e.has_directive('use asm')) return t;
- var n = e.option('hoist_funs'),
- i = e.option('hoist_vars');
- if (n || i) {
- var s = [
- ],
- o = [
- ],
- a = new k,
- u = 0,
- c = 0;
- t.walk(new pt(function (e) {
- return e instanceof X && e !== t || (e instanceof ve ? (++c, !0) : void 0)
- })),
- i = i && c > 1;
- var p = new Ht(function (l) {
- if (l !== t) {
- if (l instanceof R) return s.push(l),
- r(U, l);
- if (l instanceof te && n) return o.push(l),
- r(U, l);
- if (l instanceof ve && i) {
- l.definitions.forEach(function (e) {
- a.set(e.name.name, e),
- ++u
- });
- var c = l.to_assignments(e),
- h = p.parent();
- if (h instanceof G && h.init === l) {
- if (null == c) {
- var f = l.definitions[0].name;
- return r(He, f, f)
- }
- return c
- }
- return h instanceof W && h.init === l ? c : c ? r(L, l, {
- body: c
- }) : r(U, l)
- }
- if (l instanceof X) return l
- }
- });
- if (t = t.transform(p), u > 0) {
- var h = [
- ];
- if (a.each(function (e, n) {
- t instanceof Q && l(function (t) {
- return t.name == e.name.name
- }, t.argnames) ? a.del(n) : ((e = e.clone()).value = null, h.push(e), a.set(n, e))
- }), h.length > 0) {
- for (var f = 0; f < t.body.length; ) {
- if (t.body[f] instanceof L) {
- var d,
- m,
- g = t.body[f].body;
- if (g instanceof Be && '=' == g.operator && (d = g.left) instanceof Me && a.has(d.name)) {
- if ((y = a.get(d.name)).value) break;
- y.value = g.right,
- _(h, y),
- h.push(y),
- t.body.splice(f, 1);
- continue
- }
- if (g instanceof _e && (m = g.car) instanceof Be && '=' == m.operator && (d = m.left) instanceof Me && a.has(d.name)) {
- var y;
- if ((y = a.get(d.name)).value) break;
- y.value = m.right,
- _(h, y),
- h.push(y),
- t.body[f].body = g.cdr;
- continue
- }
- }
- if (t.body[f] instanceof U) t.body.splice(f, 1);
- else {
- if (!(t.body[f] instanceof M)) break;
- var v = [
- f,
- 1
- ].concat(t.body[f].body);
- t.body.splice.apply(t.body, v)
- }
- }
- h = r(ve, t, {
- definitions: h
- }),
- o.push(h)
- }
- }
- t.body = s.concat(o, t.body)
- }
- return t
- }),
- function (e) {
- function t(e, t, n) {
- for (var r = [
- ], i = !1, s = 0, o = e.length; s < o; s++) {
- var a = e[s].drop_side_effect_free(t, n);
- i |= a !== e[s],
- a && (r.push(a), n = !1)
- }
- return i ? r.length ? r : null : e
- }
- e(B, v),
- e(Qe, b),
- e(Je, b),
- e(Ae, function (e, n) {
- if (!this.has_pure_annotation(e) && e.pure_funcs(this)) {
- if (this.expression instanceof ee && (!this.expression.name || !this.expression.name.definition().references.length)) {
- var r = this.clone();
- return r.expression = r.expression.process_expression(!1, e),
- r
- }
- return this
- }
- this.pure && (e.warn('Dropping __PURE__ call [{file}:{line},{col}]', this.start), this.pure.value = this.pure.value.replace(/[@#]__PURE__/g, ' '));
- var i = t(this.args, e, n);
- return i && _e.from_array(i)
- }),
- e(Z, b),
- e(ee, b),
- e(Fe, function (e, t) {
- var n = this.right.drop_side_effect_free(e);
- if (!n) return this.left.drop_side_effect_free(e, t);
- switch (this.operator) {
- case '&&':
- case '||':
- if (n === this.right) return this;
- var i = this.clone();
- return i.right = n,
- i;
- default:
- var s = this.left.drop_side_effect_free(e, t);
- return s ? r(_e, this, {
- car: s,
- cdr: n
- }) : this.right.drop_side_effect_free(e, t)
- }
- }),
- e(Be, v),
- e(Oe, function (e) {
- var t = this.consequent.drop_side_effect_free(e),
- n = this.alternative.drop_side_effect_free(e);
- if (t === this.consequent && n === this.alternative) return this;
- if (!t) return n ? r(Fe, this, {
- operator: '||',
- left: this.condition,
- right: n
- }) : this.condition.drop_side_effect_free(e);
- if (!n) return r(Fe, this, {
- operator: '&&',
- left: this.condition,
- right: t
- });
- var i = this.clone();
- return i.consequent = t,
- i.alternative = n,
- i
- }),
- e(ke, function (e, t) {
- if (se(this.operator)) return this;
- if ('typeof' == this.operator && this.expression instanceof He) return null;
- var n = this.expression.drop_side_effect_free(e, t);
- return t && this instanceof Se && p(n) ? n === this.expression && 1 === this.operator.length ? this : r(Se, this, {
- operator: 1 === this.operator.length ? this.operator : '!',
- expression: n
- }) : n
- }),
- e(He, function () {
- return this.undeclared() ? this : null
- }),
- e(Ne, function (e, n) {
- var r = t(this.properties, e, n);
- return r && _e.from_array(r)
- }),
- e(Re, function (e, t) {
- return this.value.drop_side_effect_free(e, t)
- }),
- e(Pe, function (e, n) {
- var r = t(this.elements, e, n);
- return r && _e.from_array(r)
- }),
- e(we, function (e, t) {
- return this.expression.may_throw_on_access(e) ? this : this.expression.drop_side_effect_free(e, t)
- }),
- e(De, function (e, t) {
- if (this.expression.may_throw_on_access(e)) return this;
- var n = this.expression.drop_side_effect_free(e, t);
- if (!n) return this.property.drop_side_effect_free(e, t);
- var i = this.property.drop_side_effect_free(e);
- return i ? r(_e, this, {
- car: n,
- cdr: i
- }) : n
- }),
- e(_e, function (e) {
- var t = this.cdr.drop_side_effect_free(e);
- return t === this.cdr ? this : t ? r(_e, this, {
- car: this.car,
- cdr: t
- }) : this.car
- })
- }(function (e, t) {
- e.DEFMETHOD('drop_side_effect_free', t)
- }),
- e(L, function (e, t) {
- if (t.option('side_effects')) {
- var n = e.body,
- i = n.drop_side_effect_free(t, !0);
- if (!i) return t.warn('Dropping side-effect-free statement [{file}:{line},{col}]', e.start),
- r(U, e);
- if (i !== n) return r(L, e, {
- body: i
- })
- }
- return e
- }),
- e(K, function (e, t) {
- if (!t.option('loops')) return e;
- var n = e.condition.evaluate(t);
- if (n !== e.condition) {
- if (n) return r(W, e, {
- body: e.body
- });
- if (t.option('dead_code') && e instanceof Y) {
- var i = [
- ];
- return d(t, e.body, i),
- r(M, e, {
- body: i
- }).optimize(t)
- }
- if (e instanceof $) {
- var s = !1,
- o = new pt(function (t) {
- return !!(t instanceof X || s) || (t instanceof oe && o.loopcontrol_target(t) === e ? s = !0 : void 0)
- }),
- a = t.parent();
- if ((a instanceof z ? a : e).walk(o), !s) return e.body
- }
- }
- return e instanceof Y ? r(W, e, e).optimize(t) : e
- }),
- e(W, function (e, t) {
- if (!t.option('loops')) return e;
- if (e.condition) {
- var n = e.condition.evaluate(t);
- if (t.option('dead_code') && !n) {
- var s = [
- ];
- return e.init instanceof P ? s.push(e.init) : e.init && s.push(r(L, e.init, {
- body: e.init
- })),
- d(t, e.body, s),
- r(M, e, {
- body: s
- }).optimize(t)
- }
- n !== e.condition && (n = i(n, e.condition).transform(t), e.condition = be(n, e.condition))
- }
- return function e(t, n) {
- function i(i) {
- i = o(i),
- t.body instanceof M ? (t.body = t.body.clone(), t.body.body = i.concat(t.body.body.slice(1)), t.body = t.body.transform(n)) : t.body = r(M, t.body, {
- body: i
- }).transform(n),
- e(t, n)
- }
- var s = t.body instanceof M ? t.body.body[0] : t.body;
- s instanceof le && (s.body instanceof ae && n.loopcontrol_target(s.body) === n.self() ? (t.condition ? t.condition = r(Fe, t.condition, {
- left: t.condition,
- operator: '&&',
- right: s.condition.negate(n)
- }) : t.condition = s.condition.negate(n), i(s.alternative)) : s.alternative instanceof ae && n.loopcontrol_target(s.alternative) === n.self() && (t.condition ? t.condition = r(Fe, t.condition, {
- left: t.condition,
- operator: '&&',
- right: s.condition
- }) : t.condition = s.condition, i(s.body)))
- }(e, t),
- e
- }),
- e(le, function (e, t) {
- if (a(e.alternative) && (e.alternative = null), !t.option('conditionals')) return e;
- var n = e.condition.evaluate(t);
- if (n !== e.condition) {
- if (n) {
- if (t.warn('Condition always true [{file}:{line},{col}]', e.condition.start), t.option('dead_code')) {
- var s = [
- ];
- return e.alternative && d(t, e.alternative, s),
- s.push(e.body),
- r(M, e, {
- body: s
- }).optimize(t)
- }
- } else if (t.warn('Condition always false [{file}:{line},{col}]', e.condition.start), t.option('dead_code')) {
- s = [
- ];
- return d(t, e.body, s),
- e.alternative && s.push(e.alternative),
- r(M, e, {
- body: s
- }).optimize(t)
- }
- n = i(n, e.condition).transform(t),
- e.condition = be(n, e.condition)
- }
- var o = e.condition.negate(t),
- u = e.condition.print_to_string().length,
- l = o.print_to_string().length,
- c = l < u;
- if (e.alternative && c) {
- c = !1,
- e.condition = o;
- var p = e.body;
- e.body = e.alternative || r(U, e),
- e.alternative = p
- }
- if (a(e.body) && a(e.alternative)) return r(L, e.condition, {
- body: e.condition.clone()
- }).optimize(t);
- if (e.body instanceof L && e.alternative instanceof L) return r(L, e, {
- body: r(Oe, e, {
- condition: e.condition,
- consequent: e.body.body,
- alternative: e.alternative.body
- })
- }).optimize(t);
- if (a(e.alternative) && e.body instanceof L) return u === l && !c && e.condition instanceof Fe && '||' == e.condition.operator && (c = !0),
- c ? r(L, e, {
- body: r(Fe, e, {
- operator: '||',
- left: o,
- right: e.body.body
- })
- }).optimize(t) : r(L, e, {
- body: r(Fe, e, {
- operator: '&&',
- left: e.condition,
- right: e.body.body
- })
- }).optimize(t);
- if (e.body instanceof U && e.alternative instanceof L) return r(L, e, {
- body: r(Fe, e, {
- operator: '||',
- left: e.condition,
- right: e.alternative.body
- })
- }).optimize(t);
- if (e.body instanceof re && e.alternative instanceof re && e.body.TYPE == e.alternative.TYPE) return r(e.body.CTOR, e, {
- value: r(Oe, e, {
- condition: e.condition,
- consequent: e.body.value || r(st, e.body),
- alternative: e.alternative.value || r(st, e.alternative)
- }).transform(t)
- }).optimize(t);
- if (e.body instanceof le && !e.body.alternative && !e.alternative && (e = r(le, e, {
- condition: r(Fe, e.condition, {
- operator: '&&',
- left: e.condition,
- right: e.body.condition
- }),
- body: e.body.body,
- alternative: null
- })), je(e.body) && e.alternative) {
- var h = e.alternative;
- return e.alternative = null,
- r(M, e, {
- body: [
- e,
- h
- ]
- }).optimize(t)
- }
- if (je(e.alternative)) {
- var f = e.body;
- return e.body = e.alternative,
- e.condition = c ? o : e.condition.negate(t),
- e.alternative = null,
- r(M, e, {
- body: [
- e,
- f
- ]
- }).optimize(t)
- }
- return e
- }),
- e(ce, function (e, t) {
- if (!t.option('switches')) return e;
- var n,
- s = e.expression.evaluate(t);
- if (s !== e.expression) {
- var o = i(s, e.expression).transform(t);
- e.expression = be(o, e.expression)
- }
- if (!t.option('dead_code')) return e;
- for (var a, u, l = [
- ], c = [
- ], p = 0, h = e.body.length; p < h && !u; p++) {
- if ((n = e.body[p]) instanceof he) a ? x(n, c[c.length - 1]) : a = n;
- else if (s !== e.expression) {
- var f = n.expression.evaluate(t);
- if (f === s) {
- if (u = n, a) {
- var m = c.indexOf(a);
- c.splice(m, 1),
- x(a, c[m - 1]),
- a = null
- }
- } else if (f !== n.expression) {
- x(n, c[c.length - 1]);
- continue
- }
- }
- if (je(n)) {
- var g = c[c.length - 1];
- je(g) && g.body.length == n.body.length && r(M, g, g).equivalent_to(r(M, n, n)) && (g.body = [
- ])
- }
- c.push(n)
- }
- for (; p < h; ) x(e.body[p++], c[c.length - 1]);
- for (c.length > 0 && (c[0].body = l.concat(c[0].body)), e.body = c; n = c[c.length - 1]; ) {
- var y = n.body[n.body.length - 1];
- if (y instanceof ae && t.loopcontrol_target(y) === e && n.body.pop(), n.body.length || n instanceof fe && (a || n.expression.has_side_effects(t))) break;
- c.pop() === a && (a = null)
- }
- if (0 == c.length) return r(M, e, {
- body: l.concat(r(L, e.expression, {
- body: e.expression
- }))
- }).optimize(t);
- if (1 == c.length && (c[0] === u || c[0] === a)) {
- var v = !1,
- b = new pt(function (t) {
- if (v || t instanceof Q || t instanceof L) return !0;
- t instanceof ae && b.loopcontrol_target(t) === e && (v = !0)
- });
- if (e.walk(b), !v) return (c = c[0].body.slice()).unshift(r(L, e.expression, {
- body: e.expression
- })),
- r(M, e, {
- body: c
- }).optimize(t)
- }
- return e;
- function x(e, n) {
- n && !je(n) ? n.body = n.body.concat(e.body) : d(t, e, l)
- }
- }),
- e(de, function (e, t) {
- if (e.body = h(e.body, t), e.bcatch && e.bfinally && D(e.bfinally.body, a) && (e.bfinally = null), D(e.body, a)) {
- var n = [
- ];
- return e.bcatch && d(t, e.bcatch, n),
- e.bfinally && (n = n.concat(e.bfinally.body)),
- r(M, e, {
- body: n
- }).optimize(t)
- }
- return e
- }),
- ye.DEFMETHOD('remove_initializers', function () {
- this.definitions.forEach(function (e) {
- e.value = null
- })
- }),
- ye.DEFMETHOD('to_assignments', function (e) {
- var t = e.option('reduce_vars'),
- n = this.definitions.reduce(function (e, n) {
- if (n.value) {
- var i = r(He, n.name, n.name);
- e.push(r(Be, n, {
- operator: '=',
- left: i,
- right: n.value
- })),
- t && (i.definition().fixed = !1)
- }
- return e
- }, [
- ]);
- return 0 == n.length ? null : _e.from_array(n)
- }),
- e(ye, function (e, t) {
- return 0 == e.definitions.length ? r(U, e) : e
- }),
- e(Ae, function (e, t) {
- var n = e.expression;
- if (t.option('reduce_vars') && n instanceof He) {
- var s = n.definition(),
- o = n.fixed_value();
- o instanceof te && (s.fixed = o = r(ee, o, o).clone(!0)),
- o instanceof ee && (n = o, !t.option('unused') || 1 != s.references.length || s.scope.uses_arguments && s.orig[0] instanceof Ke || s.scope.uses_eval || t.find_parent(X) !== s.scope || (e.expression = n))
- }
- if (t.option('unused') && n instanceof ee && !n.uses_arguments && !n.uses_eval) {
- for (var u = 0, l = 0, c = 0, h = e.args.length; c < h; c++) {
- var f = c >= n.argnames.length;
- if (f || n.argnames[c].__unused) {
- if (A = e.args[c].drop_side_effect_free(t)) e.args[u++] = A;
- else if (!f) {
- e.args[u++] = r(et, e.args[c], {
- value: 0
- });
- continue
- }
- } else e.args[u++] = e.args[c];
- l = u
- }
- e.args.length = l
- }
- if (t.option('unsafe')) if (n instanceof He && n.undeclared()) switch (n.name) {
- case 'Array':
- if (1 != e.args.length) return r(Pe, e, {
- elements: e.args
- }).optimize(t);
- break;
- case 'Object':
- if (0 == e.args.length) return r(Ne, e, {
- properties: [
- ]
- });
- break;
- case 'String':
- if (0 == e.args.length) return r(Ze, e, {
- value: ''
- });
- if (e.args.length <= 1) return r(Fe, e, {
- left: e.args[0],
- operator: '+',
- right: r(Ze, e, {
- value: ''
- })
- }).optimize(t);
- break;
- case 'Number':
- if (0 == e.args.length) return r(et, e, {
- value: 0
- });
- if (1 == e.args.length) return r(Se, e, {
- expression: e.args[0],
- operator: '+'
- }).optimize(t);
- case 'Boolean':
- if (0 == e.args.length) return r(lt, e);
- if (1 == e.args.length) return r(Se, e, {
- expression: r(Se, e, {
- expression: e.args[0],
- operator: '!'
- }),
- operator: '!'
- }).optimize(t);
- break;
- case 'Function':
- if (0 == e.args.length) return r(ee, e, {
- argnames: [
- ],
- body: [
- ]
- });
- if (D(e.args, function (e) {
- return e instanceof Ze
- })) try {
- var d = Gt(v = '(function(' + e.args.slice(0, - 1).map(function (e) {
- return e.value
- }).join(',') + '){' + e.args[e.args.length - 1].value + '})()');
- d.figure_out_scope({
- screw_ie8: t.option('screw_ie8')
- });
- var m,
- g = new tn(t.options);
- (d = d.transform(g)).figure_out_scope({
- screw_ie8: t.option('screw_ie8')
- }),
- d.mangle_names();
- try {
- d.walk(new pt(function (e) {
- if (e instanceof Q) throw m = e,
- d
- }))
- } catch (e) {
- if (e !== d) throw e
- }
- if (!m) return e;
- var y = m.argnames.map(function (t, n) {
- return r(Ze, e.args[n], {
- value: t.print_to_string()
- })
- }),
- v = en();
- return M.prototype._codegen.call(m, m, v),
- v = v.toString().replace(/^\{|\}$/g, ''),
- y.push(r(Ze, e.args[e.args.length - 1], {
- value: v
- })),
- e.args = y,
- e
- } catch (n) {
- if (!(n instanceof It)) throw console.log(n),
- n;
- t.warn('Error parsing code passed to new Function [{file}:{line},{col}]', e.args[e.args.length - 1].start),
- t.warn(n.toString())
- }
- } else {
- if (n instanceof we && 'toString' == n.property && 0 == e.args.length) return r(Fe, e, {
- left: r(Ze, e, {
- value: ''
- }),
- operator: '+',
- right: n.expression
- }).optimize(t);
- var b;
- if (n instanceof we && n.expression instanceof Pe && 'join' == n.property) {
- if (!(e.args.length > 0 && (b = e.args[0].evaluate(t)) === e.args[0])) {
- var x,
- A,
- E = [
- ],
- _ = [
- ];
- return n.expression.elements.forEach(function (n) {
- var i = n.evaluate(t);
- i !== n ? _.push(i) : (_.length > 0 && (E.push(r(Ze, e, {
- value: _.join(b)
- })), _.length = 0), E.push(n))
- }),
- _.length > 0 && E.push(r(Ze, e, {
- value: _.join(b)
- })),
- 0 == E.length ? r(Ze, e, {
- value: ''
- }) : 1 == E.length ? E[0].is_string(t) ? E[0] : r(Fe, E[0], {
- operator: '+',
- left: r(Ze, e, {
- value: ''
- }),
- right: E[0]
- }) : '' == b ? (x = E[0].is_string(t) || E[1].is_string(t) ? E.shift() : r(Ze, e, {
- value: ''
- }), E.reduce(function (e, t) {
- return r(Fe, t, {
- operator: '+',
- left: e,
- right: t
- })
- }, x).optimize(t)) : ((A = e.clone()).expression = A.expression.clone(), A.expression.expression = A.expression.expression.clone(), A.expression.expression.elements = E, Ie(t, e, A))
- }
- } else if (n instanceof we && n.expression.is_string(t) && 'charAt' == n.property) {
- var C = e.args[0],
- w = C ? C.evaluate(t) : 0;
- if (w !== C) return r(De, n, {
- expression: n.expression,
- property: i(0 | w, C || n)
- }).optimize(t)
- }
- }
- if (n instanceof ee) {
- if (n.body[0] instanceof ie) {
- var k = n.body[0].value;
- if (!k || k.is_constant()) {
- y = e.args.concat(k || r(st, e));
- return _e.from_array(y).transform(t)
- }
- }
- if (t.option('side_effects') && D(n.body, a)) {
- y = e.args.concat(r(st, e));
- return _e.from_array(y).transform(t)
- }
- }
- if (t.option('drop_console') && n instanceof Ce) {
- for (var S = n.expression; S.expression; ) S = S.expression;
- if (S instanceof He && 'console' == S.name && S.undeclared()) return r(st, e).optimize(t)
- }
- return t.option('negate_iife') && t.parent() instanceof L && p(e) ? e.negate(t, !0) : e
- }),
- e(Ee, function (e, t) {
- if (t.option('unsafe')) {
- var n = e.expression;
- if (n instanceof He && n.undeclared()) switch (n.name) {
- case 'Object':
- case 'RegExp':
- case 'Function':
- case 'Error':
- case 'Array':
- return r(Ae, e, e).transform(t)
- }
- }
- return e
- }),
- e(_e, function (e, n) {
- if (!n.option('side_effects')) return e;
- if (e.car = e.car.drop_side_effect_free(n, T(n)), !e.car) return s(n.parent(), e, e.cdr);
- var i;
- if (n.option('cascade') && (e.car instanceof Be && !e.car.left.has_side_effects(n) ? i = e.car.left : e.car instanceof ke && ('++' == e.car.operator || '--' == e.car.operator) && (i = e.car.expression), i && !(i instanceof He && (i.definition().orig[0] instanceof Ye || t(i))))) for (var o, a, u = e.cdr; ; ) {
- if (u.equivalent_to(i)) {
- var l = e.car instanceof Te ? r(Se, e.car, {
- operator: e.car.operator,
- expression: i
- }) : e.car;
- return o ? (o[a] = l, e.cdr) : l
- }
- if (u instanceof Fe && !(u instanceof Be)) if (u.left.is_constant()) {
- if ('||' == u.operator || '&&' == u.operator) break;
- a = 'right'
- } else a = 'left';
- else {
- if (!(u instanceof Ae || u instanceof ke && !se(u.operator))) break;
- a = 'expression'
- }
- o = u,
- u = u[a]
- }
- return A(e.cdr, n) ? r(Se, e, {
- operator: 'void',
- expression: e.car
- }) : e
- }),
- ke.DEFMETHOD('lift_sequences', function (e) {
- if (e.option('sequences') && this.expression instanceof _e) {
- var t = this.expression,
- n = t.to_array(),
- r = this.clone();
- return r.expression = n.pop(),
- n.push(r),
- t = _e.from_array(n).transform(e)
- }
- return this
- }),
- e(Te, function (e, t) {
- return e.lift_sequences(t)
- }),
- e(Se, function (e, t) {
- var n = e.expression;
- if ('delete' == e.operator && !(n instanceof He || n instanceof Ce || n instanceof it || n instanceof at || n instanceof st)) return n instanceof _e ? ((n = n.to_array()).push(r(ct, e)), _e.from_array(n).optimize(t)) : r(_e, e, {
- car: n,
- cdr: r(ct, e)
- }).optimize(t);
- var s = e.lift_sequences(t);
- if (s !== e) return s;
- if (t.option('side_effects') && 'void' == e.operator) return (n = n.drop_side_effect_free(t)) ? (e.expression = n, e) : r(st, e).optimize(t);
- if (t.option('booleans') && t.in_boolean_context()) switch (e.operator) {
- case '!':
- if (n instanceof Se && '!' == n.operator) return n.expression;
- n instanceof Fe && (e = Ie(t, e, n.negate(t, T(t))));
- break;
- case 'typeof':
- return t.warn('Boolean expression always true [{file}:{line},{col}]', e.start),
- (n instanceof He ? r(ct, e) : r(_e, e, {
- car: n,
- cdr: r(ct, e)
- })).optimize(t)
- }
- if ('-' == e.operator && n instanceof at && (n = n.transform(t)), n instanceof Fe && ('+' == e.operator || '-' == e.operator) && ('*' == n.operator || '/' == n.operator || '%' == n.operator)) return r(Fe, e, {
- operator: n.operator,
- left: r(Se, n.left, {
- operator: e.operator,
- expression: n.left
- }),
- right: n.right
- });
- if ('-' != e.operator || !(n instanceof et || n instanceof at)) {
- var o = e.evaluate(t);
- if (o !== e) return Ie(t, o = i(o, e).optimize(t), e)
- }
- return e
- }),
- Fe.DEFMETHOD('lift_sequences', function (e) {
- if (e.option('sequences')) {
- if (this.left instanceof _e) {
- var t = (o = this.left).to_array();
- return (r = this.clone()).left = t.pop(),
- t.push(r),
- _e.from_array(t).optimize(e)
- }
- if (this.right instanceof _e && !this.left.has_side_effects(e)) {
- for (var n, r, i = '=' == this.operator && this.left instanceof He, s = this.right.clone(), o = s; (i || !o.car.has_side_effects(e)) && (n = o, o.cdr instanceof _e); ) o = o.cdr = o.cdr.clone();
- if (n) return (r = this.clone()).right = n.cdr,
- n.cdr = r,
- s.optimize(e)
- }
- }
- return this
- });
- var Ue = w('== === != !== * & | ^');
- function Ve(e, t) {
- return e instanceof He || e.TYPE === t.TYPE
- }
- e(Fe, function (e, t) {
- function n() {
- return e.left.is_constant() || e.right.is_constant() || !e.left.has_side_effects(t) && !e.right.has_side_effects(t)
- }
- function o(t) {
- if (n()) {
- t && (e.operator = t);
- var r = e.left;
- e.left = e.right,
- e.right = r
- }
- }
- if (Ue(e.operator) && e.right.is_constant() && !e.left.is_constant() && (e.left instanceof Fe && $t[e.left.operator] >= $t[e.operator] || o()), e = e.lift_sequences(t), t.option('comparisons')) switch (e.operator) {
- case '===':
- case '!==':
- (e.left.is_string(t) && e.right.is_string(t) || e.left.is_number(t) && e.right.is_number(t) || e.left.is_boolean() && e.right.is_boolean()) && (e.operator = e.operator.substr(0, 2));
- case '==':
- case '!=':
- if (e.left instanceof Ze && 'undefined' == e.left.value && e.right instanceof Se && 'typeof' == e.right.operator) {
- var a = e.right.expression;
- (a instanceof He ? a.undeclared() : a instanceof Ce && !t.option('screw_ie8')) || (e.right = a, e.left = r(st, e.left).optimize(t), 2 == e.operator.length && (e.operator += '='))
- }
- }
- if (t.option('booleans') && '+' == e.operator && t.in_boolean_context()) {
- var u = e.left.evaluate(t),
- l = e.right.evaluate(t);
- if (u && 'string' == typeof u) return t.warn('+ in boolean context always true [{file}:{line},{col}]', e.start),
- r(_e, e, {
- car: e.right,
- cdr: r(ct, e)
- }).optimize(t);
- if (l && 'string' == typeof l) return t.warn('+ in boolean context always true [{file}:{line},{col}]', e.start),
- r(_e, e, {
- car: e.left,
- cdr: r(ct, e)
- }).optimize(t)
- }
- if (t.option('comparisons') && e.is_boolean()) {
- if (!(t.parent() instanceof Fe) || t.parent() instanceof Be) {
- var c = r(Se, e, {
- operator: '!',
- expression: e.negate(t, T(t))
- });
- e = Ie(t, e, c)
- }
- if (t.option('unsafe_comps')) switch (e.operator) {
- case '<':
- o('>');
- break;
- case '<=':
- o('>=')
- }
- }
- if ('+' == e.operator) {
- if (e.right instanceof Ze && '' == e.right.getValue() && e.left.is_string(t)) return e.left;
- if (e.left instanceof Ze && '' == e.left.getValue() && e.right.is_string(t)) return e.right;
- if (e.left instanceof Fe && '+' == e.left.operator && e.left.left instanceof Ze && '' == e.left.left.getValue() && e.right.is_string(t)) return e.left = e.left.right,
- e.transform(t)
- }
- if (t.option('evaluate')) {
- switch (e.operator) {
- case '&&':
- if (!(u = e.left.evaluate(t))) return t.warn('Condition left of && always false [{file}:{line},{col}]', e.start),
- s(t.parent(), e, e.left).optimize(t);
- if (u !== e.left) return t.warn('Condition left of && always true [{file}:{line},{col}]', e.start),
- s(t.parent(), e, e.right).optimize(t);
- if (t.option('booleans') && t.in_boolean_context()) {
- if (!(l = e.right.evaluate(t))) return t.warn('Boolean && always false [{file}:{line},{col}]', e.start),
- r(_e, e, {
- car: e.left,
- cdr: r(lt, e)
- }).optimize(t);
- if (l !== e.right) return t.warn('Dropping side-effect-free && in boolean context [{file}:{line},{col}]', e.start),
- e.left.optimize(t)
- }
- break;
- case '||':
- if (!(u = e.left.evaluate(t))) return t.warn('Condition left of || always false [{file}:{line},{col}]', e.start),
- s(t.parent(), e, e.right).optimize(t);
- if (u !== e.left) return t.warn('Condition left of || always true [{file}:{line},{col}]', e.start),
- s(t.parent(), e, e.left).optimize(t);
- if (t.option('booleans') && t.in_boolean_context()) {
- if (!(l = e.right.evaluate(t))) return t.warn('Dropping side-effect-free || in boolean context [{file}:{line},{col}]', e.start),
- e.left.optimize(t);
- if (l !== e.right) return t.warn('Boolean || always true [{file}:{line},{col}]', e.start),
- r(_e, e, {
- car: e.left,
- cdr: r(ct, e)
- }).optimize(t)
- }
- }
- var p = !0;
- switch (e.operator) {
- case '+':
- if (e.left instanceof Qe && e.right instanceof Fe && '+' == e.right.operator && e.right.left instanceof Qe && e.right.is_string(t) && (e = r(Fe, e, {
- operator: '+',
- left: r(Ze, e.left, {
- value: '' + e.left.getValue() + e.right.left.getValue(),
- start: e.left.start,
- end: e.right.left.end
- }),
- right: e.right.right
- })), e.right instanceof Qe && e.left instanceof Fe && '+' == e.left.operator && e.left.right instanceof Qe && e.left.is_string(t) && (e = r(Fe, e, {
- operator: '+',
- left: e.left.left,
- right: r(Ze, e.right, {
- value: '' + e.left.right.getValue() + e.right.getValue(),
- start: e.left.right.start,
- end: e.right.end
- })
- })), e.left instanceof Fe && '+' == e.left.operator && e.left.is_string(t) && e.left.right instanceof Qe && e.right instanceof Fe && '+' == e.right.operator && e.right.left instanceof Qe && e.right.is_string(t) && (e = r(Fe, e, {
- operator: '+',
- left: r(Fe, e.left, {
- operator: '+',
- left: e.left.left,
- right: r(Ze, e.left.right, {
- value: '' + e.left.right.getValue() + e.right.left.getValue(),
- start: e.left.right.start,
- end: e.right.left.end
- })
- }),
- right: e.right.right
- })), e.right instanceof Se && '-' == e.right.operator && e.left.is_number(t)) {
- e = r(Fe, e, {
- operator: '-',
- left: e.left,
- right: e.right.expression
- });
- break
- }
- if (e.left instanceof Se && '-' == e.left.operator && n() && e.right.is_number(t)) {
- e = r(Fe, e, {
- operator: '-',
- left: e.right,
- right: e.left.expression
- });
- break
- }
- case '*':
- p = t.option('unsafe_math');
- case '&':
- case '|':
- case '^':
- if (e.left.is_number(t) && e.right.is_number(t) && n() && !(e.left instanceof Fe && e.left.operator != e.operator && $t[e.left.operator] >= $t[e.operator])) {
- var h = r(Fe, e, {
- operator: e.operator,
- left: e.right,
- right: e.left
- });
- e = e.right instanceof Qe && !(e.left instanceof Qe) ? Ie(t, h, e) : Ie(t, e, h)
- }
- p && e.is_number(t) && (e.right instanceof Fe && e.right.operator == e.operator && (e = r(Fe, e, {
- operator: e.operator,
- left: r(Fe, e.left, {
- operator: e.operator,
- left: e.left,
- right: e.right.left,
- start: e.left.start,
- end: e.right.left.end
- }),
- right: e.right.right
- })), e.right instanceof Qe && e.left instanceof Fe && e.left.operator == e.operator && (e.left.left instanceof Qe ? e = r(Fe, e, {
- operator: e.operator,
- left: r(Fe, e.left, {
- operator: e.operator,
- left: e.left.left,
- right: e.right,
- start: e.left.left.start,
- end: e.right.end
- }),
- right: e.left.right
- }) : e.left.right instanceof Qe && (e = r(Fe, e, {
- operator: e.operator,
- left: r(Fe, e.left, {
- operator: e.operator,
- left: e.left.right,
- right: e.right,
- start: e.left.right.start,
- end: e.right.end
- }),
- right: e.left.left
- }))), e.left instanceof Fe && e.left.operator == e.operator && e.left.right instanceof Qe && e.right instanceof Fe && e.right.operator == e.operator && e.right.left instanceof Qe && (e = r(Fe, e, {
- operator: e.operator,
- left: r(Fe, e.left, {
- operator: e.operator,
- left: r(Fe, e.left.left, {
- operator: e.operator,
- left: e.left.right,
- right: e.right.left,
- start: e.left.right.start,
- end: e.right.left.end
- }),
- right: e.left.left
- }),
- right: e.right.right
- })))
- }
- }
- if (e.right instanceof Fe && e.right.operator == e.operator && ('&&' == e.operator || '||' == e.operator || '+' == e.operator && (e.right.left.is_string(t) || e.left.is_string(t) && e.right.right.is_string(t)))) return e.left = r(Fe, e.left, {
- operator: e.operator,
- left: e.left,
- right: e.right.left
- }),
- e.right = e.right.right,
- e.transform(t);
- var f = e.evaluate(t);
- return f !== e ? (f = i(f, e).optimize(t), Ie(t, f, e)) : e
- }),
- e(He, function (e, t) {
- var n = e.resolve_defines(t);
- if (n) return n.optimize(t);
- if (t.option('screw_ie8') && e.undeclared() && (!e.scope.uses_with || !t.find_parent(H))) switch (e.name) {
- case 'undefined':
- return r(st, e).optimize(t);
- case 'NaN':
- return r(it, e).optimize(t);
- case 'Infinity':
- return r(at, e).optimize(t)
- }
- if (t.option('evaluate') && t.option('reduce_vars') && ge(e, t.parent()) !== e) {
- var s = e.definition(),
- o = e.fixed_value();
- if (o) {
- if (void 0 === s.should_replace) {
- var a = o.evaluate(t);
- if (a === o || !t.option('unsafe_regexp') && a instanceof RegExp) s.should_replace = !1;
- else {
- var u,
- l = (a = i(a, o)).optimize(t).print_to_string().length;
- !function (e) {
- var t;
- return e.walk(new pt(function (e) {
- if (e instanceof He && (t = !0), t) return !0
- })),
- t
- }(o) ? (l = Math.min(l, o.print_to_string().length), u = function () {
- var e = be(a.optimize(t), o);
- return e === a || e === o ? e.clone(!0) : e
- }) : u = function () {
- var e = a.optimize(t);
- return e === a ? e.clone(!0) : e
- };
- var c = s.name.length,
- p = 0;
- !t.option('unused') || s.global && !t.option('toplevel') || (p = (c + 2 + l) / s.references.length),
- s.should_replace = l <= c + p && u
- }
- }
- if (s.should_replace) return s.should_replace()
- }
- }
- return e
- }),
- e(st, function (e, t) {
- if (t.option('unsafe')) {
- var i = n(t, 'undefined');
- if (i) {
- var s = r(He, e, {
- name: 'undefined',
- scope: i.scope,
- thedef: i
- });
- return s.is_undefined = !0,
- s
- }
- }
- var o = ge(t.self(), t.parent());
- return o && Ve(o, e) ? e : r(Se, e, {
- operator: 'void',
- expression: r(et, e, {
- value: 0
- })
- })
- }),
- e(at, function (e, t) {
- var i = ge(t.self(), t.parent());
- return i && Ve(i, e) ? e : !t.option('keep_infinity') || i && !Ve(i, e) || n(t, 'Infinity') ? r(Fe, e, {
- operator: '/',
- left: r(et, e, {
- value: 1
- }),
- right: r(et, e, {
- value: 0
- })
- }) : e
- }),
- e(it, function (e, t) {
- var i = ge(t.self(), t.parent());
- return i && !Ve(i, e) || n(t, 'NaN') ? r(Fe, e, {
- operator: '/',
- left: r(et, e, {
- value: 0
- }),
- right: r(et, e, {
- value: 0
- })
- }) : e
- });
- var ze = [
- '+',
- '-',
- '/',
- '*',
- '%',
- '>>',
- '<<',
- '>>>',
- '|',
- '^',
- '&'
- ],
- Ge = [
- '*',
- '|',
- '^',
- '&'
- ];
- function Xe(e, t) {
- return t.option('booleans') && t.in_boolean_context() ? Ie(t, e, r(_e, e, {
- car: e,
- cdr: r(ct, e)
- }).optimize(t)) : e
- }
- e(Be, function (e, t) {
- return '=' == (e = e.lift_sequences(t)).operator && e.left instanceof He && e.right instanceof Fe && (e.right.left instanceof He && e.right.left.name == e.left.name && u(e.right.operator, ze) ? (e.operator = e.right.operator + '=', e.right = e.right.right) : e.right.right instanceof He && e.right.right.name == e.left.name && u(e.right.operator, Ge) && !e.right.left.has_side_effects(t) && (e.operator = e.right.operator + '=', e.right = e.right.left)),
- e
- }),
- e(Oe, function (e, t) {
- if (!t.option('conditionals')) return e;
- if (e.condition instanceof _e) {
- var n = e.condition.car;
- return e.condition = e.condition.cdr,
- _e.cons(n, e)
- }
- var i = e.condition.evaluate(t);
- if (i !== e.condition) return i ? (t.warn('Condition always true [{file}:{line},{col}]', e.start), s(t.parent(), e, e.consequent)) : (t.warn('Condition always false [{file}:{line},{col}]', e.start), s(t.parent(), e, e.alternative));
- var o = i.negate(t, T(t));
- Ie(t, i, o) === o && (e = r(Oe, e, {
- condition: o,
- consequent: e.alternative,
- alternative: e.consequent
- }));
- var a = e.condition,
- u = e.consequent,
- l = e.alternative;
- return a instanceof He && u instanceof He && a.definition() === u.definition() ? r(Fe, e, {
- operator: '||',
- left: a,
- right: l
- }) : u instanceof Be && l instanceof Be && u.operator == l.operator && u.left.equivalent_to(l.left) && (!e.condition.has_side_effects(t) || '=' == u.operator && !u.left.has_side_effects(t)) ? r(Be, e, {
- operator: u.operator,
- left: u.left,
- right: r(Oe, e, {
- condition: e.condition,
- consequent: u.right,
- alternative: l.right
- })
- }) : u instanceof Ae && l.TYPE === u.TYPE && 1 == u.args.length && 1 == l.args.length && u.expression.equivalent_to(l.expression) && !u.expression.has_side_effects(t) ? (u.args[0] = r(Oe, e, {
- condition: e.condition,
- consequent: u.args[0],
- alternative: l.args[0]
- }), u) : u instanceof Oe && u.alternative.equivalent_to(l) ? r(Oe, e, {
- condition: r(Fe, e, {
- left: e.condition,
- operator: '&&',
- right: u.condition
- }),
- consequent: u.consequent,
- alternative: l
- }) : u.equivalent_to(l) ? r(_e, e, {
- car: e.condition,
- cdr: u
- }).optimize(t) : p(e.consequent) ? h(e.alternative) ? c(e.condition) : r(Fe, e, {
- operator: '||',
- left: c(e.condition),
- right: e.alternative
- }) : h(e.consequent) ? p(e.alternative) ? c(e.condition.negate(t)) : r(Fe, e, {
- operator: '&&',
- left: c(e.condition.negate(t)),
- right: e.alternative
- }) : p(e.alternative) ? r(Fe, e, {
- operator: '||',
- left: c(e.condition.negate(t)),
- right: e.consequent
- }) : h(e.alternative) ? r(Fe, e, {
- operator: '&&',
- left: c(e.condition),
- right: e.consequent
- }) : e;
- function c(e) {
- return e.is_boolean() ? e : r(Se, e, {
- operator: '!',
- expression: e.negate(t)
- })
- }
- function p(e) {
- return e instanceof ct || e instanceof Se && '!' == e.operator && e.expression instanceof Qe && !e.expression.value
- }
- function h(e) {
- return e instanceof lt || e instanceof Se && '!' == e.operator && e.expression instanceof Qe && !!e.expression.value
- }
- }),
- e(ut, function (e, t) {
- if (t.option('booleans')) {
- var n = t.parent();
- return n instanceof Fe && ('==' == n.operator || '!=' == n.operator) ? (t.warn('Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]', {
- operator: n.operator,
- value: e.value,
- file: n.start.file,
- line: n.start.line,
- col: n.start.col
- }), r(et, e, {
- value: + e.value
- })) : r(Se, e, {
- operator: '!',
- expression: r(et, e, {
- value: 1 - e.value
- })
- })
- }
- return e
- }),
- e(De, function (e, t) {
- var n = e.property;
- if (n instanceof Ze && t.option('properties')) {
- if (n = n.getValue(), dt(n) ? t.option('screw_ie8') : Rt(n)) return r(we, e, {
- expression: e.expression,
- property: n
- }).optimize(t);
- var s = parseFloat(n);
- isNaN(s) || s.toString() != n || (e.property = r(et, e.property, {
- value: s
- }))
- }
- var o = e.evaluate(t);
- return o !== e ? Ie(t, o = i(o, e).optimize(t), e) : e
- }),
- e(we, function (e, t) {
- var n = e.resolve_defines(t);
- if (n) return n.optimize(t);
- var s = e.property;
- if (dt(s) && !t.option('screw_ie8')) return r(De, e, {
- expression: e.expression,
- property: r(Ze, e, {
- value: s
- })
- }).optimize(t);
- if (t.option('unsafe_proto') && e.expression instanceof we && 'prototype' == e.expression.property) {
- var o = e.expression.expression;
- if (o instanceof He && o.undeclared()) switch (o.name) {
- case 'Array':
- e.expression = r(Pe, e.expression, {
- elements: [
- ]
- });
- break;
- case 'Object':
- e.expression = r(Ne, e.expression, {
- properties: [
- ]
- });
- break;
- case 'String':
- e.expression = r(Ze, e.expression, {
- value: ''
- })
- }
- }
- var a = e.evaluate(t);
- return a !== e ? Ie(t, a = i(a, e).optimize(t), e) : e
- }),
- e(Pe, Xe),
- e(Ne, Xe),
- e(tt, Xe),
- e(ie, function (e, t) {
- return e.value && A(e.value, t) && (e.value = null),
- e
- }),
- e(xe, function (e, t) {
- var n = t.option('global_defs');
- return n && S(n, e.name.name) && t.warn('global_defs ' + e.name.name + ' redefined [{file}:{line},{col}]', e.start),
- e
- })
- }(),
- function () {
- var e = function (e) {
- for (var t = !0, n = 0; n < e.length; n++) t && e[n] instanceof P && e[n].body instanceof Ze ? e[n] = new R({
- start: e[n].start,
- end: e[n].end,
- value: e[n].body.value
- }) : !t || e[n] instanceof P && e[n].body instanceof Ze || (t = !1);
- return e
- },
- t = {
- Program: function (t) {
- return new J({
- start: i(t),
- end: s(t),
- body: e(t.body.map(u))
- })
- },
- FunctionDeclaration: function (t) {
- return new te({
- start: i(t),
- end: s(t),
- name: u(t.id),
- argnames: t.params.map(u),
- body: e(u(t.body).body)
- })
- },
- FunctionExpression: function (t) {
- return new ee({
- start: i(t),
- end: s(t),
- name: u(t.id),
- argnames: t.params.map(u),
- body: e(u(t.body).body)
- })
- },
- ExpressionStatement: function (e) {
- return new L({
- start: i(e),
- end: s(e),
- body: u(e.expression)
- })
- },
- TryStatement: function (e) {
- var t = e.handlers || [
- e.handler
- ];
- if (t.length > 1 || e.guardedHandlers && e.guardedHandlers.length) throw new Error('Multiple catch clauses are not supported.');
- return new de({
- start: i(e),
- end: s(e),
- body: u(e.block).body,
- bcatch: u(t[0]),
- bfinally: e.finalizer ? new ge(u(e.finalizer)) : null
- })
- },
- Property: function (e) {
- var t = e.key,
- n = {
- start: i(t),
- end: s(e.value),
- key: 'Identifier' == t.type ? t.name : t.value,
- value: u(e.value)
- };
- return 'init' == e.kind ? new Le(n) : (n.key = new Ue({
- name: n.key
- }), n.value = new Z(n.value), 'get' == e.kind ? new je(n) : 'set' == e.kind ? new Ie(n) : void 0)
- },
- ArrayExpression: function (e) {
- return new Pe({
- start: i(e),
- end: s(e),
- elements: e.elements.map(function (e) {
- return null === e ? new ot : u(e)
- })
- })
- },
- ObjectExpression: function (e) {
- return new Ne({
- start: i(e),
- end: s(e),
- properties: e.properties.map(function (e) {
- return e.type = 'Property',
- u(e)
- })
- })
- },
- SequenceExpression: function (e) {
- return _e.from_array(e.expressions.map(u))
- },
- MemberExpression: function (e) {
- return new (e.computed ? De : we) ({
- start: i(e),
- end: s(e),
- property: e.computed ? u(e.property) : e.property.name,
- expression: u(e.object)
- })
- },
- SwitchCase: function (e) {
- return new (e.test ? fe : he) ({
- start: i(e),
- end: s(e),
- expression: u(e.test),
- body: e.consequent.map(u)
- })
- },
- VariableDeclaration: function (e) {
- return new ('const' === e.kind ? be : ve) ({
- start: i(e),
- end: s(e),
- definitions: e.declarations.map(u)
- })
- },
- Literal: function (e) {
- var t = e.value,
- n = {
- start: i(e),
- end: s(e)
- };
- if (null === t) return new rt(n);
- switch (typeof t) {
- case 'string':
- return n.value = t,
- new Ze(n);
- case 'number':
- return n.value = t,
- new et(n);
- case 'boolean':
- return new (t ? ct : lt) (n);
- default:
- var r = e.regex;
- return r && r.pattern ? n.value = new RegExp(r.pattern, r.flags).toString() : n.value = e.regex && e.raw ? e.raw : t,
- new tt(n)
- }
- },
- Identifier: function (e) {
- var t = a[a.length - 2];
- return new ('LabeledStatement' == t.type ? Ge : 'VariableDeclarator' == t.type && t.id === e ? 'const' == t.kind ? qe : ze : 'FunctionExpression' == t.type ? t.id === e ? Ye : Ke : 'FunctionDeclaration' == t.type ? t.id === e ? $e : Ke : 'CatchClause' == t.type ? We : 'BreakStatement' == t.type || 'ContinueStatement' == t.type ? Xe : He) ({
- start: i(e),
- end: s(e),
- name: e.name
- })
- }
- };
- function r(e) {
- if ('Literal' == e.type) return null != e.raw ? e.raw : e.value + ''
- }
- function i(e) {
- var t = e.loc,
- n = t && t.start,
- i = e.range;
- return new O({
- file: t && t.source,
- line: n && n.line,
- col: n && n.column,
- pos: i ? i[0] : e.start,
- endline: n && n.line,
- endcol: n && n.column,
- endpos: i ? i[0] : e.start,
- raw: r(e)
- })
- }
- function s(e) {
- var t = e.loc,
- n = t && t.end,
- i = e.range;
- return new O({
- file: t && t.source,
- line: n && n.line,
- col: n && n.column,
- pos: i ? i[1] : e.end,
- endline: n && n.line,
- endcol: n && n.column,
- endpos: i ? i[1] : e.end,
- raw: r(e)
- })
- }
- function o(e, r, o) {
- var a = 'function From_Moz_' + e + '(M){\n';
- a += 'return new U2.' + r.name + '({\nstart: my_start_token(M),\nend: my_end_token(M)';
- var f = 'function To_Moz_' + e + '(M){\n';
- f += 'return {\ntype: ' + JSON.stringify(e),
- o && o.split(/\s*,\s*/).forEach(function (e) {
- var t = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(e);
- if (!t) throw new Error('Can\'t understand property map: ' + e);
- var n = t[1],
- r = t[2],
- i = t[3];
- switch (a += ',\n' + i + ': ', f += ',\n' + n + ': ', r) {
- case '@':
- a += 'M.' + n + '.map(from_moz)',
- f += 'M.' + i + '.map(to_moz)';
- break;
- case '>':
- a += 'from_moz(M.' + n + ')',
- f += 'to_moz(M.' + i + ')';
- break;
- case '=':
- a += 'M.' + n,
- f += 'M.' + i;
- break;
- case '%':
- a += 'from_moz(M.' + n + ').body',
- f += 'to_moz_block(M)';
- break;
- default:
- throw new Error('Can\'t understand operator in propmap: ' + e)
- }
- }),
- a += '\n})\n}',
- f += '\n}\n}',
- a = new Function('U2', 'my_start_token', 'my_end_token', 'from_moz', 'return(' + a + ')') (n, i, s, u),
- f = new Function('to_moz', 'to_moz_block', 'to_moz_scope', 'return(' + f + ')') (c, p, h),
- t[e] = a,
- l(r, f)
- }
- t.UpdateExpression = t.UnaryExpression = function (e) {
- return new (('prefix' in e ? e.prefix : 'UnaryExpression' == e.type) ? Se : Te) ({
- start: i(e),
- end: s(e),
- operator: e.operator,
- expression: u(e.argument)
- })
- },
- o('EmptyStatement', U),
- o('BlockStatement', M, 'body@body'),
- o('IfStatement', le, 'test>condition, consequent>body, alternate>alternative'),
- o('LabeledStatement', z, 'label>label, body>body'),
- o('BreakStatement', ae, 'label>label'),
- o('ContinueStatement', ue, 'label>label'),
- o('WithStatement', H, 'object>expression, body>body'),
- o('SwitchStatement', ce, 'discriminant>expression, cases@body'),
- o('ReturnStatement', ie, 'argument>value'),
- o('ThrowStatement', se, 'argument>value'),
- o('WhileStatement', Y, 'test>condition, body>body'),
- o('DoWhileStatement', $, 'test>condition, body>body'),
- o('ForStatement', W, 'init>init, test>condition, update>step, body>body'),
- o('ForInStatement', G, 'left>init, right>object, body>body'),
- o('DebuggerStatement', N),
- o('VariableDeclarator', xe, 'id>name, init>value'),
- o('CatchClause', me, 'param>argname, body%body'),
- o('ThisExpression', Je),
- o('BinaryExpression', Fe, 'operator=operator, left>left, right>right'),
- o('LogicalExpression', Fe, 'operator=operator, left>left, right>right'),
- o('AssignmentExpression', Be, 'operator=operator, left>left, right>right'),
- o('ConditionalExpression', Oe, 'test>condition, consequent>consequent, alternate>alternative'),
- o('NewExpression', Ee, 'callee>expression, arguments@args'),
- o('CallExpression', Ae, 'callee>expression, arguments@args'),
- l(J, function (e) {
- return h('Program', e)
- }),
- l(te, function (e) {
- return {
- type: 'FunctionDeclaration',
- id: c(e.name),
- params: e.argnames.map(c),
- body: h('BlockStatement', e)
- }
- }),
- l(ee, function (e) {
- return {
- type: 'FunctionExpression',
- id: c(e.name),
- params: e.argnames.map(c),
- body: h('BlockStatement', e)
- }
- }),
- l(R, function (e) {
- return {
- type: 'ExpressionStatement',
- expression: {
- type: 'Literal',
- value: e.value
- }
- }
- }),
- l(L, function (e) {
- return {
- type: 'ExpressionStatement',
- expression: c(e.body)
- }
- }),
- l(pe, function (e) {
- return {
- type: 'SwitchCase',
- test: c(e.expression),
- consequent: e.body.map(c)
- }
- }),
- l(de, function (e) {
- return {
- type: 'TryStatement',
- block: p(e),
- handler: c(e.bcatch),
- guardedHandlers: [
- ],
- finalizer: c(e.bfinally)
- }
- }),
- l(me, function (e) {
- return {
- type: 'CatchClause',
- param: c(e.argname),
- guard: null,
- body: p(e)
- }
- }),
- l(ye, function (e) {
- return {
- type: 'VariableDeclaration',
- kind: e instanceof be ? 'const' : 'var',
- declarations: e.definitions.map(c)
- }
- }),
- l(_e, function (e) {
- return {
- type: 'SequenceExpression',
- expressions: e.to_array().map(c)
- }
- }),
- l(Ce, function (e) {
- var t = e instanceof De;
- return {
- type: 'MemberExpression',
- object: c(e.expression),
- computed: t,
- property: t ? c(e.property) : {
- type: 'Identifier',
- name: e.property
- }
- }
- }),
- l(ke, function (e) {
- return {
- type: '++' == e.operator || '--' == e.operator ? 'UpdateExpression' : 'UnaryExpression',
- operator: e.operator,
- prefix: e instanceof Se,
- argument: c(e.expression)
- }
- }),
- l(Fe, function (e) {
- return {
- type: '&&' == e.operator || '||' == e.operator ? 'LogicalExpression' : 'BinaryExpression',
- left: c(e.left),
- operator: e.operator,
- right: c(e.right)
- }
- }),
- l(Pe, function (e) {
- return {
- type: 'ArrayExpression',
- elements: e.elements.map(c)
- }
- }),
- l(Ne, function (e) {
- return {
- type: 'ObjectExpression',
- properties: e.properties.map(c)
- }
- }),
- l(Re, function (e) {
- var t,
- n = {
- type: 'Literal',
- value: e.key instanceof Ue ? e.key.name : e.key
- };
- return e instanceof Le ? t = 'init' : e instanceof je ? t = 'get' : e instanceof Ie && (t = 'set'),
- {
- type: 'Property',
- kind: t,
- key: n,
- value: c(e.value)
- }
- }),
- l(Me, function (e) {
- var t = e.definition();
- return {
- type: 'Identifier',
- name: t ? t.mangled_name || t.name : e.name
- }
- }),
- l(tt, function (e) {
- var t = e.value;
- return {
- type: 'Literal',
- value: t,
- raw: t.toString(),
- regex: {
- pattern: t.source,
- flags: t.toString().match(/[gimuy]*$/) [0]
- }
- }
- }),
- l(Qe, function (e) {
- var t = e.value;
- return 'number' == typeof t && (t < 0 || 0 === t && 1 / t < 0) ? {
- type: 'UnaryExpression',
- operator: '-',
- prefix: !0,
- argument: {
- type: 'Literal',
- value: - t,
- raw: e.start.raw
- }
- }
- : {
- type: 'Literal',
- value: t,
- raw: e.start.raw
- }
- }),
- l(nt, function (e) {
- return {
- type: 'Identifier',
- name: String(e.value)
- }
- }),
- ut.DEFMETHOD('to_mozilla_ast', Qe.prototype.to_mozilla_ast),
- rt.DEFMETHOD('to_mozilla_ast', Qe.prototype.to_mozilla_ast),
- ot.DEFMETHOD('to_mozilla_ast', function () {
- return null
- }),
- j.DEFMETHOD('to_mozilla_ast', M.prototype.to_mozilla_ast),
- Q.DEFMETHOD('to_mozilla_ast', ee.prototype.to_mozilla_ast);
- var a = null;
- function u(e) {
- a.push(e);
- var n = null != e ? t[e.type](e) : null;
- return a.pop(),
- n
- }
- function l(e, t) {
- e.DEFMETHOD('to_mozilla_ast', function () {
- return e = this,
- n = t(this),
- r = e.start,
- i = e.end,
- null != r.pos && null != i.endpos && (n.range = [
- r.pos,
- i.endpos
- ]),
- r.line && (n.loc = {
- start: {
- line: r.line,
- column: r.col
- },
- end: i.endline ? {
- line: i.endline,
- column: i.endcol
- }
- : null
- }, r.file && (n.loc.source = r.file)),
- n;
- var e,
- n,
- r,
- i
- })
- }
- function c(e) {
- return null != e ? e.to_mozilla_ast() : null
- }
- function p(e) {
- return {
- type: 'BlockStatement',
- body: e.body.map(c)
- }
- }
- function h(e, t) {
- var n = t.body.map(c);
- return t.body[0] instanceof L && t.body[0].body instanceof Ze && n.unshift(c(new U(t.body[0]))),
- {
- type: e,
- body: n
- }
- }
- B.from_mozilla_ast = function (e) {
- var t = a;
- a = [
- ];
- var n = u(e);
- return a = t,
- n
- }
- }(),
- n.Compressor = tn,
- n.DefaultsError = h,
- n.Dictionary = k,
- n.JS_Parse_Error = It,
- n.MAP = x,
- n.OutputStream = en,
- n.SourceMap = nn,
- n.TreeTransformer = Ht,
- n.TreeWalker = pt,
- n.base54 = Jt,
- n.defaults = f,
- n.mangle_properties = sn,
- n.merge = d,
- n.parse = Gt,
- n.push_uniq = A,
- n.string_template = E,
- n.tokenizer = Vt,
- n.is_identifier = Bt,
- n.SymbolDef = Xt,
- n.sys = r,
- n.MOZ_SourceMap = i,
- n.UglifyJS = s,
- n.array_to_hash = o,
- n.slice = function (e, t) {
- return Array.prototype.slice.call(e, t || 0)
- },
- n.characters = a,
- n.member = u,
- n.find_if = l,
- n.repeat_string = c,
- n.configure_error_stack = p,
- n.DefaultsError = h,
- n.defaults = f,
- n.merge = d,
- n.noop = m,
- n.return_false = g,
- n.return_true = y,
- n.return_this = v,
- n.return_null = b,
- n.MAP = x,
- n.push_uniq = A,
- n.string_template = E,
- n.remove = _,
- n.mergeSort = C,
- n.set_difference = function (e, t) {
- return e.filter(function (e) {
- return t.indexOf(e) < 0
- })
- },
- n.set_intersection = function (e, t) {
- return e.filter(function (e) {
- return t.indexOf(e) >= 0
- })
- },
- n.makePredicate = w,
- n.all = D,
- n.Dictionary = k,
- n.HOP = S,
- n.first_in_statement = T,
- n.DEFNODE = F,
- n.AST_Token = O,
- n.AST_Node = B,
- n.AST_Statement = P,
- n.AST_Debugger = N,
- n.AST_Directive = R,
- n.AST_SimpleStatement = L,
- n.walk_body = I,
- n.AST_Block = j,
- n.AST_BlockStatement = M,
- n.AST_EmptyStatement = U,
- n.AST_StatementWithBody = V,
- n.AST_LabeledStatement = z,
- n.AST_IterationStatement = q,
- n.AST_DWLoop = K,
- n.AST_Do = $,
- n.AST_While = Y,
- n.AST_For = W,
- n.AST_ForIn = G,
- n.AST_With = H,
- n.AST_Scope = X,
- n.AST_Toplevel = J,
- n.AST_Lambda = Q,
- n.AST_Accessor = Z,
- n.AST_Function = ee,
- n.AST_Defun = te,
- n.AST_Jump = ne,
- n.AST_Exit = re,
- n.AST_Return = ie,
- n.AST_Throw = se,
- n.AST_LoopControl = oe,
- n.AST_Break = ae,
- n.AST_Continue = ue,
- n.AST_If = le,
- n.AST_Switch = ce,
- n.AST_SwitchBranch = pe,
- n.AST_Default = he,
- n.AST_Case = fe,
- n.AST_Try = de,
- n.AST_Catch = me,
- n.AST_Finally = ge,
- n.AST_Definitions = ye,
- n.AST_Var = ve,
- n.AST_Const = be,
- n.AST_VarDef = xe,
- n.AST_Call = Ae,
- n.AST_New = Ee,
- n.AST_Seq = _e,
- n.AST_PropAccess = Ce,
- n.AST_Dot = we,
- n.AST_Sub = De,
- n.AST_Unary = ke,
- n.AST_UnaryPrefix = Se,
- n.AST_UnaryPostfix = Te,
- n.AST_Binary = Fe,
- n.AST_Conditional = Oe,
- n.AST_Assign = Be,
- n.AST_Array = Pe,
- n.AST_Object = Ne,
- n.AST_ObjectProperty = Re,
- n.AST_ObjectKeyVal = Le,
- n.AST_ObjectSetter = Ie,
- n.AST_ObjectGetter = je,
- n.AST_Symbol = Me,
- n.AST_SymbolAccessor = Ue,
- n.AST_SymbolDeclaration = Ve,
- n.AST_SymbolVar = ze,
- n.AST_SymbolConst = qe,
- n.AST_SymbolFunarg = Ke,
- n.AST_SymbolDefun = $e,
- n.AST_SymbolLambda = Ye,
- n.AST_SymbolCatch = We,
- n.AST_Label = Ge,
- n.AST_SymbolRef = He,
- n.AST_LabelRef = Xe,
- n.AST_This = Je,
- n.AST_Constant = Qe,
- n.AST_String = Ze,
- n.AST_Number = et,
- n.AST_RegExp = tt,
- n.AST_Atom = nt,
- n.AST_Null = rt,
- n.AST_NaN = it,
- n.AST_Undefined = st,
- n.AST_Hole = ot,
- n.AST_Infinity = at,
- n.AST_Boolean = ut,
- n.AST_False = lt,
- n.AST_True = ct,
- n.TreeWalker = pt,
- n.KEYWORDS = ht,
- n.KEYWORDS_ATOM = ft,
- n.RESERVED_WORDS = dt,
- n.KEYWORDS_BEFORE_EXPRESSION = mt,
- n.OPERATOR_CHARS = gt,
- n.RE_HEX_NUMBER = yt,
- n.RE_OCT_NUMBER = vt,
- n.OPERATORS = bt,
- n.WHITESPACE_CHARS = xt,
- n.NEWLINE_CHARS = At,
- n.PUNC_BEFORE_EXPRESSION = Et,
- n.PUNC_CHARS = _t,
- n.REGEXP_MODIFIERS = Ct,
- n.UNICODE = wt,
- n.is_letter = Dt,
- n.is_digit = kt,
- n.is_alphanumeric_char = St,
- n.is_unicode_digit = Tt,
- n.is_unicode_combining_mark = Ft,
- n.is_unicode_connector_punctuation = Ot,
- n.is_identifier = Bt,
- n.is_identifier_start = Pt,
- n.is_identifier_char = Nt,
- n.is_identifier_string = Rt,
- n.parse_js_number = Lt,
- n.JS_Parse_Error = It,
- n.js_error = jt,
- n.is_token = Mt,
- n.EX_EOF = Ut,
- n.tokenizer = Vt,
- n.UNARY_PREFIX = zt,
- n.UNARY_POSTFIX = qt,
- n.ASSIGNMENT = Kt,
- n.PRECEDENCE = $t,
- n.STATEMENTS_WITH_LABELS = Yt,
- n.ATOMIC_START_TOKEN = Wt,
- n.parse = Gt,
- n.TreeTransformer = Ht,
- n.SymbolDef = Xt,
- n.base54 = Jt,
- n.EXPECT_DIRECTIVE = Qt,
- n.is_some_comments = Zt,
- n.OutputStream = en,
- n.Compressor = tn,
- n.SourceMap = nn,
- n.find_builtins = rn,
- n.mangle_properties = sn,
- n.AST_Node.warn_function = function (e) {
- 'undefined' != typeof console && 'function' == typeof console.warn && console.warn(e)
- },
- n.minify = function (e, n) {
- n = s.defaults(n, {
- compress: {
- },
- fromString: !1,
- inSourceMap: null,
- mangle: {
- },
- mangleProperties: !1,
- nameCache: null,
- outFileName: null,
- output: null,
- outSourceMap: null,
- parse: {
- },
- sourceMapInline: !1,
- sourceMapUrl: null,
- sourceRoot: null,
- spidermonkey: !1,
- warnings: !1
- }),
- s.base54.reset();
- var r = n.inSourceMap;
- 'string' == typeof r && 'inline' != r && (r = JSON.parse(fs.readFileSync(r, 'utf8')));
- var i = null,
- o = {
- };
- if (n.spidermonkey) {
- if ('inline' == r) throw new Error('inline source map only works with built-in parser');
- i = s.AST_Node.from_mozilla_ast(e)
- } else {
- function a(e, t) {
- var a = n.fromString ? e : fs.readFileSync(e, 'utf8');
- 'inline' == r && (r = read_source_map(a)),
- o[t] = a,
- i = s.parse(a, {
- filename: t,
- toplevel: i,
- bare_returns: n.parse ? n.parse.bare_returns : void 0
- })
- }
- if (!n.fromString && (e = s.simple_glob(e), 'inline' == r && e.length > 1)) throw new Error('inline source map only works with singular input');
- [
- ].concat(e).forEach(function (e, t) {
- if ('string' == typeof e) a(e, n.fromString ? t : e);
- else for (var r in e) a(e[r], r)
- })
- }
- if (n.wrap && (i = i.wrap_commonjs(n.wrap, n.exportAll)), n.compress) {
- var u = {
- warnings: n.warnings
- };
- s.merge(u, n.compress),
- i.figure_out_scope(n.mangle);
- var l = s.Compressor(u);
- i = l.compress(i)
- }(n.mangleProperties || n.nameCache) && (n.mangleProperties.cache = s.readNameCache(n.nameCache, 'props'), i = s.mangle_properties(i, n.mangleProperties), s.writeNameCache(n.nameCache, 'props', n.mangleProperties.cache)),
- n.mangle && (i.figure_out_scope(n.mangle), i.compute_char_frequency(n.mangle), i.mangle_names(n.mangle));
- var c = {
- max_line_len: 32000
- };
- if ((n.outSourceMap || n.sourceMapInline) && (c.source_map = s.SourceMap({
- file: n.outFileName || ('string' == typeof n.outSourceMap ? n.outSourceMap.replace(/\.map$/i, '') : null),
- orig: r,
- root: n.sourceRoot
- }), n.sourceMapIncludeSources)) for (var p in o) o.hasOwnProperty(p) && c.source_map.get().setSourceContent(p, o[p]);
- n.output && s.merge(c, n.output);
- var h = s.OutputStream(c);
- i.print(h);
- var f = c.source_map;
- f && (f += '');
- return n.sourceMapInline ? h += '\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,' + new t(f).toString('base64') : n.outSourceMap && 'string' == typeof n.outSourceMap && !1 !== n.sourceMapUrl && (h += '\n//# sourceMappingURL=' + ('string' == typeof n.sourceMapUrl ? n.sourceMapUrl : n.outSourceMap)),
- {
- code: h + '',
- map: f
- }
- },
- n.describe_ast = function () {
- var e = s.OutputStream({
- beautify: !0
- });
- return function t(n) {
- e.print('AST_' + n.TYPE);
- var r = n.SELF_PROPS.filter(function (e) {
- return !/^\$/.test(e)
- });
- r.length > 0 && (e.space(), e.with_parens(function () {
- r.forEach(function (t, n) {
- n && e.space(),
- e.print(t)
- })
- })),
- n.documentation && (e.space(), e.print_string(n.documentation)),
- n.SUBCLASSES.length > 0 && (e.space(), e.with_block(function () {
- n.SUBCLASSES.forEach(function (n, r) {
- e.indent(),
- t(n),
- e.newline()
- })
- }))
- }(s.AST_Node),
- e + ''
- }
- }).call(this, e('buffer').Buffer)
- },
- {
- buffer: 42,
- 'source-map': 421,
- util: 428
- }
- ],
- 424: [
- function (e, t, n) {
- 'use strict';
- var r = e('punycode'),
- i = e('./util');
- function s() {
- this.protocol = null,
- this.slashes = null,
- this.auth = null,
- this.host = null,
- this.port = null,
- this.hostname = null,
- this.hash = null,
- this.search = null,
- this.query = null,
- this.pathname = null,
- this.path = null,
- this.href = null
- }
- n.parse = b,
- n.resolve = function (e, t) {
- return b(e, !1, !0).resolve(t)
- },
- n.resolveObject = function (e, t) {
- return e ? b(e, !1, !0).resolveObject(t) : t
- },
- n.format = function (e) {
- i.isString(e) && (e = b(e));
- return e instanceof s ? e.format() : s.prototype.format.call(e)
- },
- n.Url = s;
- var o = /^([a-z0-9.+-]+:)/i,
- a = /:[0-9]*$/,
- u = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,
- l = [
- '{',
- '}',
- '|',
- '\\',
- '^',
- '`'
- ].concat(['<',
- '>',
- '"',
- '`',
- ' ',
- '\r',
- '\n',
- '\t']),
- c = [
- '\''
- ].concat(l),
- p = [
- '%',
- '/',
- '?',
- ';',
- '#'
- ].concat(c),
- h = [
- '/',
- '?',
- '#'
- ],
- f = /^[+a-z0-9A-Z_-]{0,63}$/,
- d = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,
- m = {
- javascript: !0,
- 'javascript:': !0
- },
- g = {
- javascript: !0,
- 'javascript:': !0
- },
- y = {
- http: !0,
- https: !0,
- ftp: !0,
- gopher: !0,
- file: !0,
- 'http:': !0,
- 'https:': !0,
- 'ftp:': !0,
- 'gopher:': !0,
- 'file:': !0
- },
- v = e('querystring');
- function b(e, t, n) {
- if (e && i.isObject(e) && e instanceof s) return e;
- var r = new s;
- return r.parse(e, t, n),
- r
- }
- s.prototype.parse = function (e, t, n) {
- if (!i.isString(e)) throw new TypeError('Parameter \'url\' must be a string, not ' + typeof e);
- var s = e.indexOf('?'),
- a = - 1 !== s && s < e.indexOf('#') ? '?' : '#',
- l = e.split(a);
- l[0] = l[0].replace(/\\/g, '/');
- var b = e = l.join(a);
- if (b = b.trim(), !n && 1 === e.split('#').length) {
- var x = u.exec(b);
- if (x) return this.path = b,
- this.href = b,
- this.pathname = x[1],
- x[2] ? (this.search = x[2], this.query = t ? v.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = '', this.query = {
- }),
- this
- }
- var A = o.exec(b);
- if (A) {
- var E = (A = A[0]).toLowerCase();
- this.protocol = E,
- b = b.substr(A.length)
- }
- if (n || A || b.match(/^\/\/[^@\/]+@[^@\/]+/)) {
- var _ = '//' === b.substr(0, 2);
- !_ || A && g[A] || (b = b.substr(2), this.slashes = !0)
- }
- if (!g[A] && (_ || A && !y[A])) {
- for (var C, w, D = - 1, k = 0; k < h.length; k++) {
- - 1 !== (S = b.indexOf(h[k])) && ( - 1 === D || S < D) && (D = S)
- }
- - 1 !== (w = - 1 === D ? b.lastIndexOf('@') : b.lastIndexOf('@', D)) && (C = b.slice(0, w), b = b.slice(w + 1), this.auth = decodeURIComponent(C)),
- D = - 1;
- for (k = 0; k < p.length; k++) {
- var S;
- - 1 !== (S = b.indexOf(p[k])) && ( - 1 === D || S < D) && (D = S)
- }
- - 1 === D && (D = b.length),
- this.host = b.slice(0, D),
- b = b.slice(D),
- this.parseHost(),
- this.hostname = this.hostname || '';
- var T = '[' === this.hostname[0] && ']' === this.hostname[this.hostname.length - 1];
- if (!T) for (var F = this.hostname.split(/\./), O = (k = 0, F.length); k < O; k++) {
- var B = F[k];
- if (B && !B.match(f)) {
- for (var P = '', N = 0, R = B.length; N < R; N++) B.charCodeAt(N) > 127 ? P += 'x' : P += B[N];
- if (!P.match(f)) {
- var L = F.slice(0, k),
- I = F.slice(k + 1),
- j = B.match(d);
- j && (L.push(j[1]), I.unshift(j[2])),
- I.length && (b = '/' + I.join('.') + b),
- this.hostname = L.join('.');
- break
- }
- }
- }
- this.hostname.length > 255 ? this.hostname = '' : this.hostname = this.hostname.toLowerCase(),
- T || (this.hostname = r.toASCII(this.hostname));
- var M = this.port ? ':' + this.port : '',
- U = this.hostname || '';
- this.host = U + M,
- this.href += this.host,
- T && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), '/' !== b[0] && (b = '/' + b))
- }
- if (!m[E]) for (k = 0, O = c.length; k < O; k++) {
- var V = c[k];
- if ( - 1 !== b.indexOf(V)) {
- var z = encodeURIComponent(V);
- z === V && (z = escape(V)),
- b = b.split(V).join(z)
- }
- }
- var q = b.indexOf('#');
- - 1 !== q && (this.hash = b.substr(q), b = b.slice(0, q));
- var K = b.indexOf('?');
- if ( - 1 !== K ? (this.search = b.substr(K), this.query = b.substr(K + 1), t && (this.query = v.parse(this.query)), b = b.slice(0, K)) : t && (this.search = '', this.query = {
- }), b && (this.pathname = b), y[E] && this.hostname && !this.pathname && (this.pathname = '/'), this.pathname || this.search) {
- M = this.pathname || '';
- var $ = this.search || '';
- this.path = M + $
- }
- return this.href = this.format(),
- this
- },
- s.prototype.format = function () {
- var e = this.auth || '';
- e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ':'), e += '@');
- var t = this.protocol || '',
- n = this.pathname || '',
- r = this.hash || '',
- s = !1,
- o = '';
- this.host ? s = e + this.host : this.hostname && (s = e + ( - 1 === this.hostname.indexOf(':') ? this.hostname : '[' + this.hostname + ']'), this.port && (s += ':' + this.port)),
- this.query && i.isObject(this.query) && Object.keys(this.query).length && (o = v.stringify(this.query));
- var a = this.search || o && '?' + o || '';
- return t && ':' !== t.substr( - 1) && (t += ':'),
- this.slashes || (!t || y[t]) && !1 !== s ? (s = '//' + (s || ''), n && '/' !== n.charAt(0) && (n = '/' + n)) : s || (s = ''),
- r && '#' !== r.charAt(0) && (r = '#' + r),
- a && '?' !== a.charAt(0) && (a = '?' + a),
- t + s + (n = n.replace(/[?#]/g, function (e) {
- return encodeURIComponent(e)
- })) + (a = a.replace('#', '%23')) + r
- },
- s.prototype.resolve = function (e) {
- return this.resolveObject(b(e, !1, !0)).format()
- },
- s.prototype.resolveObject = function (e) {
- if (i.isString(e)) {
- var t = new s;
- t.parse(e, !1, !0),
- e = t
- }
- for (var n = new s, r = Object.keys(this), o = 0; o < r.length; o++) {
- var a = r[o];
- n[a] = this[a]
- }
- if (n.hash = e.hash, '' === e.href) return n.href = n.format(),
- n;
- if (e.slashes && !e.protocol) {
- for (var u = Object.keys(e), l = 0; l < u.length; l++) {
- var c = u[l];
- 'protocol' !== c && (n[c] = e[c])
- }
- return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname = '/'),
- n.href = n.format(),
- n
- }
- if (e.protocol && e.protocol !== n.protocol) {
- if (!y[e.protocol]) {
- for (var p = Object.keys(e), h = 0; h < p.length; h++) {
- var f = p[h];
- n[f] = e[f]
- }
- return n.href = n.format(),
- n
- }
- if (n.protocol = e.protocol, e.host || g[e.protocol]) n.pathname = e.pathname;
- else {
- for (var d = (e.pathname || '').split('/'); d.length && !(e.host = d.shift()); );
- e.host || (e.host = ''),
- e.hostname || (e.hostname = ''),
- '' !== d[0] && d.unshift(''),
- d.length < 2 && d.unshift(''),
- n.pathname = d.join('/')
- }
- if (n.search = e.search, n.query = e.query, n.host = e.host || '', n.auth = e.auth, n.hostname = e.hostname || e.host, n.port = e.port, n.pathname || n.search) {
- var m = n.pathname || '',
- v = n.search || '';
- n.path = m + v
- }
- return n.slashes = n.slashes || e.slashes,
- n.href = n.format(),
- n
- }
- var b = n.pathname && '/' === n.pathname.charAt(0),
- x = e.host || e.pathname && '/' === e.pathname.charAt(0),
- A = x || b || n.host && e.pathname,
- E = A,
- _ = n.pathname && n.pathname.split('/') || [
- ],
- C = (d = e.pathname && e.pathname.split('/') || [
- ], n.protocol && !y[n.protocol]);
- if (C && (n.hostname = '', n.port = null, n.host && ('' === _[0] ? _[0] = n.host : _.unshift(n.host)), n.host = '', e.protocol && (e.hostname = null, e.port = null, e.host && ('' === d[0] ? d[0] = e.host : d.unshift(e.host)), e.host = null), A = A && ('' === d[0] || '' === _[0])), x) n.host = e.host || '' === e.host ? e.host : n.host,
- n.hostname = e.hostname || '' === e.hostname ? e.hostname : n.hostname,
- n.search = e.search,
- n.query = e.query,
- _ = d;
- else if (d.length) _ || (_ = [
- ]),
- _.pop(),
- _ = _.concat(d),
- n.search = e.search,
- n.query = e.query;
- else if (!i.isNullOrUndefined(e.search)) {
- if (C) n.hostname = n.host = _.shift(),
- (T = !!(n.host && n.host.indexOf('@') > 0) && n.host.split('@')) && (n.auth = T.shift(), n.host = n.hostname = T.shift());
- return n.search = e.search,
- n.query = e.query,
- i.isNull(n.pathname) && i.isNull(n.search) || (n.path = (n.pathname ? n.pathname : '') + (n.search ? n.search : '')),
- n.href = n.format(),
- n
- }
- if (!_.length) return n.pathname = null,
- n.search ? n.path = '/' + n.search : n.path = null,
- n.href = n.format(),
- n;
- for (var w = _.slice( - 1) [0], D = (n.host || e.host || _.length > 1) && ('.' === w || '..' === w) || '' === w, k = 0, S = _.length; S >= 0; S--) '.' === (w = _[S]) ? _.splice(S, 1) : '..' === w ? (_.splice(S, 1), k++) : k && (_.splice(S, 1), k--);
- if (!A && !E) for (; k--; k) _.unshift('..');
- !A || '' === _[0] || _[0] && '/' === _[0].charAt(0) || _.unshift(''),
- D && '/' !== _.join('/').substr( - 1) && _.push('');
- var T,
- F = '' === _[0] || _[0] && '/' === _[0].charAt(0);
- C && (n.hostname = n.host = F ? '' : _.length ? _.shift() : '', (T = !!(n.host && n.host.indexOf('@') > 0) && n.host.split('@')) && (n.auth = T.shift(), n.host = n.hostname = T.shift()));
- return (A = A || n.host && _.length) && !F && _.unshift(''),
- _.length ? n.pathname = _.join('/') : (n.pathname = null, n.path = null),
- i.isNull(n.pathname) && i.isNull(n.search) || (n.path = (n.pathname ? n.pathname : '') + (n.search ? n.search : '')),
- n.auth = e.auth || n.auth,
- n.slashes = n.slashes || e.slashes,
- n.href = n.format(),
- n
- },
- s.prototype.parseHost = function () {
- var e = this.host,
- t = a.exec(e);
- t && (':' !== (t = t[0]) && (this.port = t.substr(1)), e = e.substr(0, e.length - t.length)),
- e && (this.hostname = e)
- }
- },
- {
- './util': 425,
- punycode: 407,
- querystring: 410
- }
- ],
- 425: [
- function (e, t, n) {
- 'use strict';
- t.exports = {
- isString: function (e) {
- return 'string' == typeof e
- },
- isObject: function (e) {
- return 'object' == typeof e && null !== e
- },
- isNull: function (e) {
- return null === e
- },
- isNullOrUndefined: function (e) {
- return null == e
- }
- }
- },
- {
- }
- ],
- 426: [
- function (e, t, n) {
- arguments[4][9][0].apply(n, arguments)
- },
- {
- dup: 9
- }
- ],
- 427: [
- function (e, t, n) {
- arguments[4][10][0].apply(n, arguments)
- },
- {
- dup: 10
- }
- ],
- 428: [
- function (e, t, n) {
- arguments[4][11][0].apply(n, arguments)
- },
- {
- './support/isBuffer': 427,
- _process: 373,
- dup: 11,
- inherits: 426
- }
- ],
- 429: [
- function (e, t, n) {
- t.exports = {
- area: !0,
- base: !0,
- br: !0,
- col: !0,
- embed: !0,
- hr: !0,
- img: !0,
- input: !0,
- keygen: !0,
- link: !0,
- menuitem: !0,
- meta: !0,
- param: !0,
- source: !0,
- track: !0,
- wbr: !0
- }
- },
- {
- }
- ],
- 430: [
- function (e, t, n) {
- 'use strict';
- var r = e('acorn-globals'),
- i = e('acorn'),
- s = e('acorn/dist/walk');
- t.exports = function (e, t, n) {
- e += '',
- t += '',
- n = (n = n || [
- ]).concat(r(e).map(function (e) {
- return e.name
- }));
- var o = r(t).map(function (e) {
- return e.name
- }).filter(function (e) {
- return - 1 === n.indexOf(e) && 'undefined' !== e && 'this' !== e
- });
- if (0 === o.length) return t;
- var a = '',
- u = 'locals_for_with',
- l = 'result_of_with';
- if (/^[a-zA-Z0-9$_]+$/.test(e)) u = e;
- else {
- for (; - 1 != o.indexOf(u) || - 1 != n.indexOf(u); ) u += '_';
- a = 'var ' + u + ' = (' + e + ')'
- }
- for (; - 1 != o.indexOf(l) || - 1 != n.indexOf(l); ) l += '_';
- var c = o.map(function (e) {
- return JSON.stringify(e) + ' in ' + u + '?' + u + '.' + e + ':typeof ' + e + '!=="undefined"?' + e + ':undefined'
- });
- return t = '(function (' + o.join(', ') + ') {' + t + '}.call(this' + c.map(function (e) {
- return ',' + e
- }).join('') + '))',
- ';' + a + ';' + function (e, t) {
- var n,
- r = e,
- o = !1,
- a = function (e) {
- return i.parse(e, {
- ecmaVersion: 6,
- allowReturnOutsideFunction: !0
- })
- }(e);
- if (e = e.split(''), 1 !== (n = a.body).length || 'ExpressionStatement' !== (n = n[0]).type || 'CallExpression' !== (n = n.expression).type || 'MemberExpression' !== (n = n.callee).type || !1 !== n.computed || 'call' !== n.property.name || 'FunctionExpression' !== (n = n.object).type) throw new Error('AST does not seem to represent a self-calling function');
- var u = n;
- return s.recursive(a, null, {
- Function: function (e, t, n) {
- e === u && n(e.body, t, 'ScopeBody')
- },
- ReturnStatement: function (t) {
- o = !0,
- function (t, n) {
- for (var r = t.start; r < t.end; r++) e[r] = '';
- e[t.start] = n
- }(t, 'return {value: (' + (t.argument ? function (t) {
- return e.slice(t.start, t.end).join('')
- }(t.argument) : 'undefined') + ')};')
- }
- }),
- o ? 'var ' + t + '=' + e.join('') + ';if (' + t + ') return ' + t + '.value' : r
- }(t, l) + ';'
- }
- },
- {
- acorn: 4,
- 'acorn-globals': 1,
- 'acorn/dist/walk': 5
- }
- ],
- pug: [
- function (e, t, n) {
- (function (t) {
- 'use strict';
- var r = e('fs'),
- i = e('path'),
- s = e('pug-lexer'),
- o = e('pug-strip-comments'),
- a = e('pug-parser'),
- u = e('pug-load'),
- l = e('pug-filters'),
- c = e('pug-linker'),
- p = e('pug-code-gen'),
- h = e('pug-runtime'),
- f = e('pug-runtime/wrap');
- function d(e, t, n, r) {
- return n.reduce(function (e, n) {
- return n[r] ? n[r](e, t) : e
- }, e)
- }
- function m(e, t) {
- var n = e.filter(function (e) {
- return e[t]
- });
- if (n.length > 1) throw new Error('Two or more plugins all implement ' + t + ' method.');
- return n.length ? n[0][t].bind(n[0]) : null
- }
- function g(e, t) {
- var r = {
- };
- r[t.filename] = e;
- var h = [
- ],
- f = t.plugins || [
- ],
- g = u.string(e, {
- filename: t.filename,
- basedir: t.basedir,
- lex: function (e, t) {
- var n = {
- };
- Object.keys(t).forEach(function (e) {
- n[e] = t[e]
- }),
- n.plugins = f.filter(function (e) {
- return !!e.lex
- }).map(function (e) {
- return e.lex
- });
- var r = d(e, {
- filename: t.filename
- }, f, 'preLex');
- return d(s(r, n), t, f, 'postLex')
- },
- parse: function (e, t) {
- e = e.map(function (e) {
- return 'path' === e.type && '' === i.extname(e.val) ? {
- type: 'path',
- loc: e.loc,
- val: e.val + '.pug'
- }
- : e
- }),
- e = d(e = o(e, t), t, f, 'preParse');
- var n = {
- };
- return Object.keys(t).forEach(function (e) {
- n[e] = t[e]
- }),
- n.plugins = f.filter(function (e) {
- return !!e.parse
- }).map(function (e) {
- return e.parse
- }),
- d(d(a(e, n), t, f, 'postParse'), t, f, 'preLoad')
- },
- resolve: function (e, n, r) {
- var i = m(f, 'resolve');
- return i ? i(e, n, t) : u.resolve(e, n, r)
- },
- read: function (e, n) {
- var i;
- h.push(e);
- var s = m(f, 'read');
- return i = s ? s(e, t) : u.read(e, n),
- r[e] = i,
- i
- }
- });
- g = d(g = d(g, t, f, 'postLoad'), t, f, 'preFilters');
- var y = {
- };
- Object.keys(n.filters).forEach(function (e) {
- y[e] = n.filters[e]
- }),
- t.filters && Object.keys(t.filters).forEach(function (e) {
- y[e] = t.filters[e]
- }),
- g = d(g = d(g = l.handleFilters(g, y, t.filterOptions, t.filterAliases), t, f, 'postFilters'), t, f, 'preLink'),
- g = d(g = d(g = c(g), t, f, 'postLink'), t, f, 'preCodeGen');
- var v = p(g, {
- pretty: t.pretty,
- compileDebug: t.compileDebug,
- doctype: t.doctype,
- inlineRuntimeFunctions: t.inlineRuntimeFunctions,
- globals: t.globals,
- self: t.self,
- includeSources: !!t.includeSources && r,
- templateName: t.templateName
- });
- return v = d(v, t, f, 'postCodeGen'),
- t.debug && console.error('\nCompiled Function:\n\n%s', v.replace(/^/gm, ' ')),
- {
- body: v,
- dependencies: h
- }
- }
- function y(e, t) {
- var i = e.filename;
- if (e.cache && n.cache[i]) return n.cache[i];
- void 0 === t && (t = r.readFileSync(e.filename, 'utf8'));
- var s = n.compile(t, e);
- return e.cache && (n.cache[i] = s),
- s
- }
- n.name = 'Pug',
- n.runtime = h,
- n.cache = {
- },
- n.filters = {
- },
- n.compile = function (e, t) {
- t = t || {
- };
- var n = g(e = String(e), {
- compileDebug: !1 !== t.compileDebug,
- filename: t.filename,
- basedir: t.basedir,
- pretty: t.pretty,
- doctype: t.doctype,
- inlineRuntimeFunctions: t.inlineRuntimeFunctions,
- globals: t.globals,
- self: t.self,
- includeSources: !0 === t.compileDebug,
- debug: t.debug,
- templateName: 'template',
- filters: t.filters,
- filterOptions: t.filterOptions,
- filterAliases: t.filterAliases,
- plugins: t.plugins
- }),
- r = t.inlineRuntimeFunctions ? new Function('', n.body + ';return template;') () : f(n.body);
- return r.dependencies = n.dependencies,
- r
- },
- n.compileClientWithDependenciesTracked = function (e, t) {
- t = t || {
- };
- var n = g(e = String(e), {
- compileDebug: t.compileDebug,
- filename: t.filename,
- basedir: t.basedir,
- pretty: t.pretty,
- doctype: t.doctype,
- inlineRuntimeFunctions: !1 !== t.inlineRuntimeFunctions,
- globals: t.globals,
- self: t.self,
- includeSources: t.compileDebug,
- debug: t.debug,
- templateName: t.name || 'template',
- filters: t.filters,
- filterOptions: t.filterOptions,
- filterAliases: t.filterAliases,
- plugins: t.plugins
- }),
- r = n.body;
- return t.module && (!1 === t.inlineRuntimeFunctions && (r = 'var pug = require("pug-runtime");' + r), r += ' module.exports = ' + (t.name || 'template') + ';'),
- {
- body: r,
- dependencies: n.dependencies
- }
- },
- n.compileClient = function (e, t) {
- return n.compileClientWithDependenciesTracked(e, t).body
- },
- n.compileFile = function (e, t) {
- return (t = t || {
- }).filename = e,
- y(t)
- },
- n.render = function (e, t, r) {
- if ('function' == typeof t && (r = t, t = void 0), 'function' == typeof r) {
- var i;
- try {
- i = n.render(e, t)
- } catch (e) {
- return r(e)
- }
- return r(null, i)
- }
- if ((t = t || {
- }).cache && !t.filename) throw new Error('the "filename" option is required for caching');
- return y(t, e) (t)
- },
- n.renderFile = function (e, t, r) {
- if ('function' == typeof t && (r = t, t = void 0), 'function' == typeof r) {
- var i;
- try {
- i = n.renderFile(e, t)
- } catch (e) {
- return r(e)
- }
- return r(null, i)
- }
- return (t = t || {
- }).filename = e,
- y(t) (t)
- },
- n.compileFileClient = function (e, t) {
- var i = e + ':client';
- if ((t = t || {
- }).filename = e, t.cache && n.cache[i]) return n.cache[i];
- var s = r.readFileSync(t.filename, 'utf8'),
- o = n.compileClient(s, t);
- return t.cache && (n.cache[i] = o),
- o
- },
- n.__express = function (e, r, i) {
- void 0 == r.compileDebug && 'production' === t.env.NODE_ENV && (r.compileDebug = !1),
- n.renderFile(e, r, i)
- }
- }).call(this, e('_process'))
- },
- {
- _process: 373,
- fs: 40,
- path: 372,
- 'pug-code-gen': 385,
- 'pug-filters': 389,
- 'pug-lexer': 394,
- 'pug-linker': 395,
- 'pug-load': 396,
- 'pug-parser': 397,
- 'pug-runtime': 400,
- 'pug-runtime/wrap': 404,
- 'pug-strip-comments': 405
- }
- ]
- },
- {
- },
- [
- ]);
- \ No newline at end of file
diff --git a/src/assets/javascripts/services.js b/src/assets/javascripts/services.js
index 17091e9d..598dd30e 100644
--- a/src/assets/javascripts/services.js
+++ b/src/assets/javascripts/services.js
@@ -10,7 +10,7 @@ function init() {
options = r.options
redirects = r.redirects
targets = r.targets
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
config = JSON.parse(configData)
@@ -124,10 +124,6 @@ function redirect(url, type, initiator, forceRedirection) {
else return `${randomInstance}/u${url.pathname}${url.search}` // Likely a user profile, redirect to '/u/...'
case "lbryDesktop":
return url.href.replace(/^https?:\/{2}odysee\.com\//, "lbry://").replace(/:(?=[a-zA-Z0-9])/g, "#")
- case "neuters":
- if (url.pathname.startsWith("/article/") || url.pathname.startsWith("/pf/") || url.pathname.startsWith("/arc/") || url.pathname.startsWith("/resizer/")) return null
- else if (url.pathname.endsWith("/")) return `${randomInstance}${url.pathname}`
- else return `${randomInstance}${url.pathname}/`
case "searx":
case "searxng":
return `${randomInstance}/${url.search}`
@@ -363,27 +359,6 @@ function redirect(url, type, initiator, forceRedirection) {
if (query) return `${randomInstance}/${mapCentre}/Mpnk/${query}`
}
}
- case "wikiless":
- let GETArguments = []
- if (url.search.length > 0) {
- let search = url.search.substring(1) //get rid of '?'
- let argstrings = search.split("&")
- for (let i = 0; i < argstrings.length; i++) {
- let args = argstrings[i].split("=")
- GETArguments.push([args[0], args[1]])
- }
- }
-
- let link = `${randomInstance}${url.pathname}`
- let urlSplit = url.host.split(".")
- if (urlSplit[0] != "wikipedia" && urlSplit[0] != "www") {
- if (urlSplit[0] == "m") GETArguments.push(["mobileaction", "toggle_view_mobile"])
- else GETArguments.push(["lang", urlSplit[0]])
- if (urlSplit[1] == "m") GETArguments.push(["mobileaction", "toggle_view_mobile"])
- // wikiless doesn't have mobile view support yet
- }
- for (let i = 0; i < GETArguments.length; i++) link += (i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1]
- return link
case "lingva":
let params_arr = url.search.split("&")
params_arr[0] = params_arr[0].substring(1)
@@ -443,7 +418,7 @@ function redirect(url, type, initiator, forceRedirection) {
function computeService(url, returnFrontend) {
return new Promise(resolve => {
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
const config = JSON.parse(configData)
@@ -529,13 +504,8 @@ function reverse(url, urlString) {
case "twitter":
case "reddit":
case "imdb":
- case "reuters":
case "quora":
case "medium":
- case "wikipedia":
- if (!urlString) resolve(config.services[service].url + url.pathname + url.search)
- else resolve(url.replace(/https?:\/{2}(?:[^\s\/]+\.)+[a-zA-Z0-9]+/, config.services[service].url))
- return
case "fandom":
let regex = url.pathname.match(/^\/([a-zA-Z0-9-]+)\/wiki\/([a-zA-Z0-9-]+)/)
if (regex) {
@@ -555,7 +525,7 @@ function reverse(url, urlString) {
function setRedirects(passedRedirects) {
return new Promise(resolve => {
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
browser.storage.local.get(/* [ */ "options" /* , "blacklists"] */, async r => {
@@ -612,7 +582,7 @@ function initDefaults() {
fetch("/instances/data.json")
.then(response => response.text())
.then(data => {
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
browser.storage.local.get(["options", "blacklists"], r => {
@@ -655,7 +625,7 @@ function initDefaults() {
function upgradeOptions() {
return new Promise(resolve => {
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
browser.storage.local.get(null, r => {
@@ -727,7 +697,7 @@ function processUpdate() {
fetch("/instances/data.json")
.then(response => response.text())
.then(data => {
- fetch("/config/config.json")
+ fetch("/config.json")
.then(response => response.text())
.then(configData => {
browser.storage.local.get(["options", "blacklists", "targets"], r => {
diff --git a/src/assets/javascripts/utils.js b/src/assets/javascripts/utils.js
index cff8c2a9..d6c5e300 100644
--- a/src/assets/javascripts/utils.js
+++ b/src/assets/javascripts/utils.js
@@ -1,6 +1,5 @@
window.browser = window.browser || window.chrome
-import localise from "./localise.js"
import servicesHelper from "./services.js"
function getRandomInstance(instances) {
@@ -11,204 +10,11 @@ function camelCase(str) {
return str.charAt(0).toUpperCase() + str.slice(1)
}
-let cloudflareBlackList = []
-let authenticateBlackList = []
-async function initBlackList() {
- return new Promise(resolve => {
- fetch("/instances/blacklist.json")
- .then(response => response.text())
- .then(data => {
- cloudflareBlackList = JSON.parse(data).cloudflare
- authenticateBlackList = JSON.parse(data).authenticate
- resolve()
- })
- })
-}
-
-function updateInstances() {
- return new Promise(async resolve => {
- let http = new XMLHttpRequest()
- let fallback = new XMLHttpRequest()
- http.open("GET", "https://codeberg.org/LibRedirect/libredirect/raw/branch/master/src/instances/data.json", false)
- http.send(null)
- if (http.status != 200) {
- fallback.open("GET", "https://raw.githubusercontent.com/libredirect/libredirect/master/src/instances/data.json", false)
- fallback.send(null)
- if (fallback.status === 200) {
- http = fallback
- } else {
- resolve()
- return
- }
- }
- await initBlackList()
- const instances = JSON.parse(http.responseText)
-
- await servicesHelper.setRedirects(instances)
-
- console.info("Successfully updated Instances")
- resolve(true)
- return
- })
-}
-
function protocolHost(url) {
if (url.username && url.password) return `${url.protocol}//${url.username}:${url.password}@${url.host}`
return `${url.protocol}//${url.host}`
}
-async function processDefaultCustomInstances(service, frontend, network, document) {
- let frontendNetworkElement = document.getElementById(frontend).getElementsByClassName(network)[0]
-
- let frontendCustomInstances = []
- let frontendCheckListElement = frontendNetworkElement.getElementsByClassName("checklist")[0]
-
- await initBlackList()
-
- let frontendDefaultRedirects
-
- let redirects, options
-
- async function getFromStorage() {
- return new Promise(async resolve =>
- browser.storage.local.get(["options", "redirects",], r => {
- frontendDefaultRedirects = r.options[frontend][network].enabled
- frontendCustomInstances = r.options[frontend][network].custom
- options = r.options
- redirects = r.redirects
- resolve()
- })
- )
- }
-
- await getFromStorage()
-
- function calcFrontendCheckBoxes() {
- let isTrue = true
- for (const item of redirects[frontend][network]) {
- if (!frontendDefaultRedirects.includes(item)) {
- isTrue = false
- break
- }
- }
- for (const element of frontendCheckListElement.getElementsByTagName("input")) {
- element.checked = frontendDefaultRedirects.includes(element.className)
- }
- if (frontendDefaultRedirects.length == 0) isTrue = false
- frontendNetworkElement.getElementsByClassName("toggle-all")[0].checked = isTrue
- }
- frontendCheckListElement.innerHTML = [
- `<div>
- <x data-localise="__MSG_toggleAll__">Toggle All</x>
- <input type="checkbox" class="toggle-all"/>
- </div>`,
- ...redirects[frontend][network]
- .sort((a, b) =>
- (cloudflareBlackList.includes(a) && !cloudflareBlackList.includes(b))
- ||
- (authenticateBlackList.includes(a) && !authenticateBlackList.includes(b))
- )
- .map(x => {
- const cloudflare = cloudflareBlackList.includes(x) ? ' <span style="color:red;">cloudflare</span>' : ""
- const authenticate = authenticateBlackList.includes(x) ? ' <span style="color:orange;">authenticate</span>' : ""
-
- let warnings = [cloudflare, authenticate].join(" ")
- return `<div>
- <x><a href="${x}" target="_blank">${x}</a>${warnings}</x>
- <input type="checkbox" class="${x}"/>
- </div>`
- }),
- ].join("\n<hr>\n")
-
- localise.localisePage()
-
- calcFrontendCheckBoxes()
- frontendNetworkElement.getElementsByClassName("toggle-all")[0].addEventListener("change", async event => {
- browser.storage.local.get("options", r => {
- let options = r.options
- if (event.target.checked) frontendDefaultRedirects = [...redirects[frontend][network]]
- else frontendDefaultRedirects = []
-
- options[frontend][network].enabled = frontendDefaultRedirects
- browser.storage.local.set({ options })
- calcFrontendCheckBoxes()
- })
- })
-
- for (let element of frontendCheckListElement.getElementsByTagName("input")) {
- if (element.className != "toggle-all")
- frontendNetworkElement.getElementsByClassName(element.className)[0].addEventListener("change", async event => {
- browser.storage.local.get("options", r => {
- let options = r.options
- if (event.target.checked) frontendDefaultRedirects.push(element.className)
- else {
- let index = frontendDefaultRedirects.indexOf(element.className)
- if (index > -1) frontendDefaultRedirects.splice(index, 1)
- }
-
- options[frontend][network].enabled = frontendDefaultRedirects
- browser.storage.local.set({ options })
- calcFrontendCheckBoxes()
- })
- })
- }
-
- function calcFrontendCustomInstances() {
- console.log('calcFrontendCustomInstances()')
- document.getElementById(frontend).getElementsByClassName("custom-checklist")[0].innerHTML = frontendCustomInstances
- .map(
- x => `<div>
- ${x}
- <button class="add clear-${x}">
- <svg xmlns="https://www.w3.org/2000/svg" height="20px" viewBox="0 0 24 24" width="20px" fill="currentColor">
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" />
- </svg>
- </button>
- </div>
- <hr>`
- )
- .join("\n")
-
- for (const item of frontendCustomInstances) {
- document.getElementById(frontend).getElementsByClassName(`clear-${item}`)[0].addEventListener("click", async () => {
- browser.storage.local.get("options", r => {
- let options = r.options
- let index = frontendCustomInstances.indexOf(item)
- if (index > -1) frontendCustomInstances.splice(index, 1)
- options[frontend][network].custom = frontendCustomInstances
- browser.storage.local.set({ options })
- calcFrontendCustomInstances()
- })
- })
- }
- }
- calcFrontendCustomInstances()
- document.getElementById(frontend).getElementsByClassName("custom-instance-form")[0].addEventListener("submit", async event => {
- event.preventDefault();
- browser.storage.local.get("options", async r => {
- let options = r.options
- event.preventDefault()
- let frontendCustomInstanceInput = document.getElementById(frontend).getElementsByClassName("custom-instance")[0]
- let url
- try {
- url = new URL(frontendCustomInstanceInput.value)
- } catch (error) {
- return
- }
- let protocolHostVar = protocolHost(url)
- if (frontendCustomInstanceInput.validity.valid && !redirects[frontend][network].includes(protocolHostVar)) {
- if (!frontendCustomInstances.includes(protocolHostVar)) {
- frontendCustomInstances.push(protocolHostVar)
- options[frontend][network].custom = frontendCustomInstances
- browser.storage.local.set({ options })
- frontendCustomInstanceInput.value = ""
- }
- calcFrontendCustomInstances()
- }
- })
- })
-}
-
function copyRaw(test, copyRawElement) {
return new Promise(resolve => {
browser.tabs.query({ active: true, currentWindow: true }, async tabs => {
@@ -266,9 +72,7 @@ function switchInstance(test) {
export default {
getRandomInstance,
- updateInstances,
protocolHost,
- processDefaultCustomInstances,
switchInstance,
copyRaw,
camelCase,