@feathery/react 2.15.0 → 2.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Form/logic.d.ts.map +1 -1
- package/cjs/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/cjs/{fthry_FormControl.C8oeoDk3.js → fthry_FormControl.DhxdiYw6.js} +1 -1
- package/cjs/{fthry_InlineTooltip.CRRFOiO4.js → fthry_InlineTooltip.BgAXRUIt.js} +2 -2
- package/cjs/{fthry_Overlay.CMYptYVH.js → fthry_Overlay.D7IM1ywp.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.C_yV3aay.js → fthry_PaymentMethodField.NEoloWMI.js} +4 -4
- package/cjs/{fthry_Placeholder.xDn0I29f.js → fthry_Placeholder.D5C0aH2S.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.COZczYEG.js → fthry_ShowEyeIcon.CmLMyaN5.js} +1 -1
- package/cjs/{fthry_index.CQ3OgNZu.js → fthry_index.BFpcCw2o.js} +1 -1
- package/cjs/{fthry_index.Dm94Mor0.js → fthry_index.BJYH_2P6.js} +1 -1
- package/cjs/{fthry_index.Dzq-7u_A.js → fthry_index.BK_jaGHn.js} +5 -5
- package/cjs/{fthry_index.Db8Zj-xl.js → fthry_index.Bb1R5GZK.js} +2 -2
- package/cjs/{fthry_index.BV9FIqI3.js → fthry_index.Bd1HfYvE.js} +5 -5
- package/cjs/{fthry_index.CgatqFlS.js → fthry_index.BgeTdwT5.js} +2 -2
- package/cjs/{fthry_index.CFl7Tra-.js → fthry_index.Bq3nU0FH.js} +6 -6
- package/cjs/{fthry_index.Ct-olYcX.js → fthry_index.BqS0kCfh.js} +1 -1
- package/cjs/{fthry_index.ByYAaIPz.js → fthry_index.By8RWuUY.js} +6 -6
- package/cjs/{fthry_index.C97Bm277.js → fthry_index.CbfDILWu.js} +4 -4
- package/cjs/{fthry_index.CfGx505W.js → fthry_index.CgMWWz7f.js} +1 -1
- package/cjs/{fthry_index.BvXec6y1.js → fthry_index.Ci8dMyBp.js} +1 -1
- package/cjs/{fthry_index.B9CITASf.js → fthry_index.CkmA933O.js} +1 -1
- package/cjs/{fthry_index.BAis6iAm.js → fthry_index.CrFjXWLg.js} +3 -3
- package/cjs/{fthry_index.B5Nc9EIn.js → fthry_index.CzzIM_Es.js} +1831 -41
- package/cjs/{fthry_index.CPkoG8dL.js → fthry_index.D4rjZ-iU.js} +4 -4
- package/cjs/{fthry_index.BdfASO2V.js → fthry_index.DDjTLR_C.js} +6 -6
- package/cjs/{fthry_index.B5aSeoEj.js → fthry_index.DLnigFf3.js} +4 -4
- package/cjs/{fthry_index.Be_wKtBW.js → fthry_index.DXm31Dvn.js} +3 -3
- package/cjs/{fthry_index.BokP8_1j.js → fthry_index.DzpGyyn4.js} +5 -5
- package/cjs/{fthry_index.CoR2X1u6.js → fthry_index.E_vLB-7s.js} +8 -8
- package/cjs/{fthry_index.D35rnGh5.js → fthry_index.GeYRayLh.js} +1 -1
- package/cjs/{fthry_index.BZzFi9o3.js → fthry_index.JRP5lBfp.js} +7 -6
- package/cjs/{fthry_index.Iw93ZIvk.js → fthry_index.WDI9ExUl.js} +1 -1
- package/cjs/{fthry_input.DjhEftHE.js → fthry_input.kxr0lkUP.js} +1 -1
- package/cjs/{fthry_script.CEXFQk2h.js → fthry_script.CpqGoZRW.js} +1 -1
- package/cjs/{fthry_styles.twMOjtIt.js → fthry_styles.UURZE2St.js} +1 -1
- package/cjs/{fthry_useElementSize.CMss2qLc.js → fthry_useElementSize.B7mqB2ri.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.GHaAu-dd.js → fthry_useSalesforceSync.DFHAEpBn.js} +1 -1
- package/cjs/{fthry_webfontloader.CZxQtgFm.js → fthry_webfontloader.COsYlNwD.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/eventQueue.d.ts +26 -0
- package/cjs/utils/eventQueue.d.ts.map +1 -0
- package/cjs/utils/featheryClient/index.d.ts +6 -0
- package/cjs/utils/featheryClient/index.d.ts.map +1 -1
- package/dist/Form/logic.d.ts.map +1 -1
- package/dist/elements/fields/AddressLine1Field/index.d.ts.map +1 -1
- package/dist/{fthry_FormControl.BdmdMzA3.js → fthry_FormControl.CikgGb3C.js} +1 -1
- package/dist/{fthry_InlineTooltip.DRPooJGa.js → fthry_InlineTooltip.BpfxcSEn.js} +2 -2
- package/dist/{fthry_Overlay.DSfIRMWh.js → fthry_Overlay.CJVfag7c.js} +1 -1
- package/dist/{fthry_PaymentMethodField.C2kDTnuL.js → fthry_PaymentMethodField.BpA_xhqt.js} +4 -4
- package/dist/{fthry_Placeholder.BYxBlfxe.js → fthry_Placeholder.DwCFN6a9.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.DcuxGpJk.js → fthry_ShowEyeIcon.D6nQhesH.js} +1 -1
- package/dist/{fthry_index.BF_Plcr0.js → fthry_index.B-oHlMGi.js} +2 -2
- package/dist/{fthry_index.DwzU97uW.js → fthry_index.B7VWXvgC.js} +4 -4
- package/dist/{fthry_index.BuGMpxqA.js → fthry_index.B84L3MVC.js} +1 -1
- package/dist/{fthry_index.IjpiaOO-.js → fthry_index.BAhh3Pz6.js} +1 -1
- package/dist/{fthry_index.BIkZtQJH.js → fthry_index.BEZmvsoo.js} +7 -6
- package/dist/{fthry_index.BXiUUqma.js → fthry_index.BSEfDQAc.js} +2 -2
- package/dist/{fthry_index.COrbe5-R.js → fthry_index.BsEfTy-x.js} +8 -8
- package/dist/{fthry_index.CCtbaItI.js → fthry_index.BsNCOSBE.js} +5 -5
- package/dist/{fthry_index.B-bHDKSO.js → fthry_index.Bz07r-AM.js} +1 -1
- package/dist/{fthry_index.CxYSZnO_.js → fthry_index.BzrcCLzO.js} +4 -4
- package/dist/{fthry_index.D9VkJYNy.js → fthry_index.CJKGRCG-.js} +3 -3
- package/dist/{fthry_index.Cocw39qz.js → fthry_index.D9AKkBzu.js} +1 -1
- package/dist/{fthry_index.DkSTwhvF.js → fthry_index.D9VjMJ_U.js} +1 -1
- package/dist/{fthry_index.DCKiab_1.js → fthry_index.DH2fsNWG.js} +3 -3
- package/dist/{fthry_index.DvV-_9rQ.js → fthry_index.Dgmpm9wy.js} +6 -6
- package/dist/{fthry_index.BD6daAle.js → fthry_index.DhU16s57.js} +5 -5
- package/dist/{fthry_index.C0TSdYY1.js → fthry_index.DoP7RwIP.js} +1 -1
- package/dist/{fthry_index.uw0MJJ4F.js → fthry_index.Dy4nSWZa.js} +1 -1
- package/dist/{fthry_index.D6uzSPi5.js → fthry_index.Fs86Fy9Y.js} +5 -5
- package/dist/{fthry_index.CkEibXDT.js → fthry_index.NOuMR_hq.js} +6 -6
- package/dist/{fthry_index.Ox88biXC.js → fthry_index.OHN-Iv2R.js} +1 -1
- package/dist/{fthry_index.4fMPrW44.js → fthry_index.m7CZv4YY.js} +4 -4
- package/dist/{fthry_index.Cz1sN7j0.js → fthry_index.t4v0qqgv.js} +6 -6
- package/dist/{fthry_index.DSkVpyvV.js → fthry_index.y4j9reIZ.js} +1831 -41
- package/dist/{fthry_input.BJLJlGVj.js → fthry_input.Cb2u4VEf.js} +1 -1
- package/dist/{fthry_script.BL_LvOsU.js → fthry_script.C5O1ZNQQ.js} +1 -1
- package/dist/{fthry_styles.Bgjx59v5.js → fthry_styles.DGB23xLr.js} +1 -1
- package/dist/{fthry_useElementSize.COmxJss_.js → fthry_useElementSize.CBdpS9aW.js} +1 -1
- package/dist/{fthry_useSalesforceSync.BZM69NNS.js → fthry_useSalesforceSync.Cae_lMG1.js} +1 -1
- package/dist/{fthry_webfontloader.BonjOYue.js → fthry_webfontloader.DAANkO2-.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/eventQueue.d.ts +26 -0
- package/dist/utils/eventQueue.d.ts.map +1 -0
- package/dist/utils/featheryClient/index.d.ts +6 -0
- package/dist/utils/featheryClient/index.d.ts.map +1 -1
- package/package.json +4 -3
- package/umd/{277.94ae8bf6190836d1dceb.js → 277.d9907ecd5dc2117c9171.js} +1 -1
- package/umd/{509.4236d4d76d2fa2ccd971.js → 509.341a4196aad912adb28d.js} +2 -2
- package/umd/{AddressField.3523efd23175117d47a5.js → AddressField.ec97334fe233830bc05b.js} +1 -1
- package/umd/index.js +1 -1
- /package/umd/{509.4236d4d76d2fa2ccd971.js.LICENSE.txt → 509.341a4196aad912adb28d.js.LICENSE.txt} +0 -0
|
@@ -634,7 +634,7 @@ function identifier (index) {
|
|
|
634
634
|
* @return {object[]}
|
|
635
635
|
*/
|
|
636
636
|
function compile (value) {
|
|
637
|
-
return dealloc(parse$
|
|
637
|
+
return dealloc(parse$2('', null, null, null, [''], value = alloc(value), 0, [0], value))
|
|
638
638
|
}
|
|
639
639
|
|
|
640
640
|
/**
|
|
@@ -649,7 +649,7 @@ function compile (value) {
|
|
|
649
649
|
* @param {string[]} declarations
|
|
650
650
|
* @return {object}
|
|
651
651
|
*/
|
|
652
|
-
function parse$
|
|
652
|
+
function parse$2 (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
653
653
|
var index = 0;
|
|
654
654
|
var offset = 0;
|
|
655
655
|
var length = pseudo;
|
|
@@ -718,15 +718,15 @@ function parse$1 (value, root, parent, rule, rules, rulesets, pseudo, points, de
|
|
|
718
718
|
|
|
719
719
|
if (character === 123)
|
|
720
720
|
if (offset === 0)
|
|
721
|
-
parse$
|
|
721
|
+
parse$2(characters, root, reference, reference, props, rulesets, length, points, children);
|
|
722
722
|
else
|
|
723
723
|
switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
|
|
724
724
|
// d l m s
|
|
725
725
|
case 100: case 108: case 109: case 115:
|
|
726
|
-
parse$
|
|
726
|
+
parse$2(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
|
|
727
727
|
break
|
|
728
728
|
default:
|
|
729
|
-
parse$
|
|
729
|
+
parse$2(characters, reference, reference, reference, [''], children, 0, points, children);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
|
|
@@ -35610,10 +35610,1637 @@ Parser.acorn = {
|
|
|
35610
35610
|
//
|
|
35611
35611
|
// [estree]: https://github.com/estree/estree
|
|
35612
35612
|
|
|
35613
|
-
function parse(input, options) {
|
|
35613
|
+
function parse$1(input, options) {
|
|
35614
35614
|
return Parser.parse(input, options)
|
|
35615
35615
|
}
|
|
35616
35616
|
|
|
35617
|
+
var dummyValue = "✖";
|
|
35618
|
+
|
|
35619
|
+
function isDummy(node) { return node.name === dummyValue }
|
|
35620
|
+
|
|
35621
|
+
function noop() {}
|
|
35622
|
+
|
|
35623
|
+
var LooseParser = function LooseParser(input, options) {
|
|
35624
|
+
if ( options === void 0 ) options = {};
|
|
35625
|
+
|
|
35626
|
+
this.toks = this.constructor.BaseParser.tokenizer(input, options);
|
|
35627
|
+
this.options = this.toks.options;
|
|
35628
|
+
this.input = this.toks.input;
|
|
35629
|
+
this.tok = this.last = {type: types$1.eof, start: 0, end: 0};
|
|
35630
|
+
this.tok.validateRegExpFlags = noop;
|
|
35631
|
+
this.tok.validateRegExpPattern = noop;
|
|
35632
|
+
if (this.options.locations) {
|
|
35633
|
+
var here = this.toks.curPosition();
|
|
35634
|
+
this.tok.loc = new SourceLocation(this.toks, here, here);
|
|
35635
|
+
}
|
|
35636
|
+
this.ahead = []; // Tokens ahead
|
|
35637
|
+
this.context = []; // Indentation contexted
|
|
35638
|
+
this.curIndent = 0;
|
|
35639
|
+
this.curLineStart = 0;
|
|
35640
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
35641
|
+
this.inAsync = false;
|
|
35642
|
+
this.inGenerator = false;
|
|
35643
|
+
this.inFunction = false;
|
|
35644
|
+
};
|
|
35645
|
+
|
|
35646
|
+
LooseParser.prototype.startNode = function startNode () {
|
|
35647
|
+
return new Node(this.toks, this.tok.start, this.options.locations ? this.tok.loc.start : null)
|
|
35648
|
+
};
|
|
35649
|
+
|
|
35650
|
+
LooseParser.prototype.storeCurrentPos = function storeCurrentPos () {
|
|
35651
|
+
return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
|
|
35652
|
+
};
|
|
35653
|
+
|
|
35654
|
+
LooseParser.prototype.startNodeAt = function startNodeAt (pos) {
|
|
35655
|
+
if (this.options.locations) {
|
|
35656
|
+
return new Node(this.toks, pos[0], pos[1])
|
|
35657
|
+
} else {
|
|
35658
|
+
return new Node(this.toks, pos)
|
|
35659
|
+
}
|
|
35660
|
+
};
|
|
35661
|
+
|
|
35662
|
+
LooseParser.prototype.finishNode = function finishNode (node, type) {
|
|
35663
|
+
node.type = type;
|
|
35664
|
+
node.end = this.last.end;
|
|
35665
|
+
if (this.options.locations)
|
|
35666
|
+
{ node.loc.end = this.last.loc.end; }
|
|
35667
|
+
if (this.options.ranges)
|
|
35668
|
+
{ node.range[1] = this.last.end; }
|
|
35669
|
+
return node
|
|
35670
|
+
};
|
|
35671
|
+
|
|
35672
|
+
LooseParser.prototype.dummyNode = function dummyNode (type) {
|
|
35673
|
+
var dummy = this.startNode();
|
|
35674
|
+
dummy.type = type;
|
|
35675
|
+
dummy.end = dummy.start;
|
|
35676
|
+
if (this.options.locations)
|
|
35677
|
+
{ dummy.loc.end = dummy.loc.start; }
|
|
35678
|
+
if (this.options.ranges)
|
|
35679
|
+
{ dummy.range[1] = dummy.start; }
|
|
35680
|
+
this.last = {type: types$1.name, start: dummy.start, end: dummy.start, loc: dummy.loc};
|
|
35681
|
+
return dummy
|
|
35682
|
+
};
|
|
35683
|
+
|
|
35684
|
+
LooseParser.prototype.dummyIdent = function dummyIdent () {
|
|
35685
|
+
var dummy = this.dummyNode("Identifier");
|
|
35686
|
+
dummy.name = dummyValue;
|
|
35687
|
+
return dummy
|
|
35688
|
+
};
|
|
35689
|
+
|
|
35690
|
+
LooseParser.prototype.dummyString = function dummyString () {
|
|
35691
|
+
var dummy = this.dummyNode("Literal");
|
|
35692
|
+
dummy.value = dummy.raw = dummyValue;
|
|
35693
|
+
return dummy
|
|
35694
|
+
};
|
|
35695
|
+
|
|
35696
|
+
LooseParser.prototype.eat = function eat (type) {
|
|
35697
|
+
if (this.tok.type === type) {
|
|
35698
|
+
this.next();
|
|
35699
|
+
return true
|
|
35700
|
+
} else {
|
|
35701
|
+
return false
|
|
35702
|
+
}
|
|
35703
|
+
};
|
|
35704
|
+
|
|
35705
|
+
LooseParser.prototype.isContextual = function isContextual (name) {
|
|
35706
|
+
return this.tok.type === types$1.name && this.tok.value === name
|
|
35707
|
+
};
|
|
35708
|
+
|
|
35709
|
+
LooseParser.prototype.eatContextual = function eatContextual (name) {
|
|
35710
|
+
return this.tok.value === name && this.eat(types$1.name)
|
|
35711
|
+
};
|
|
35712
|
+
|
|
35713
|
+
LooseParser.prototype.canInsertSemicolon = function canInsertSemicolon () {
|
|
35714
|
+
return this.tok.type === types$1.eof || this.tok.type === types$1.braceR ||
|
|
35715
|
+
lineBreak.test(this.input.slice(this.last.end, this.tok.start))
|
|
35716
|
+
};
|
|
35717
|
+
|
|
35718
|
+
LooseParser.prototype.semicolon = function semicolon () {
|
|
35719
|
+
return this.eat(types$1.semi)
|
|
35720
|
+
};
|
|
35721
|
+
|
|
35722
|
+
LooseParser.prototype.expect = function expect (type) {
|
|
35723
|
+
if (this.eat(type)) { return true }
|
|
35724
|
+
for (var i = 1; i <= 2; i++) {
|
|
35725
|
+
if (this.lookAhead(i).type === type) {
|
|
35726
|
+
for (var j = 0; j < i; j++) { this.next(); }
|
|
35727
|
+
return true
|
|
35728
|
+
}
|
|
35729
|
+
}
|
|
35730
|
+
};
|
|
35731
|
+
|
|
35732
|
+
LooseParser.prototype.pushCx = function pushCx () {
|
|
35733
|
+
this.context.push(this.curIndent);
|
|
35734
|
+
};
|
|
35735
|
+
|
|
35736
|
+
LooseParser.prototype.popCx = function popCx () {
|
|
35737
|
+
this.curIndent = this.context.pop();
|
|
35738
|
+
};
|
|
35739
|
+
|
|
35740
|
+
LooseParser.prototype.lineEnd = function lineEnd (pos) {
|
|
35741
|
+
while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) { ++pos; }
|
|
35742
|
+
return pos
|
|
35743
|
+
};
|
|
35744
|
+
|
|
35745
|
+
LooseParser.prototype.indentationAfter = function indentationAfter (pos) {
|
|
35746
|
+
for (var count = 0;; ++pos) {
|
|
35747
|
+
var ch = this.input.charCodeAt(pos);
|
|
35748
|
+
if (ch === 32) { ++count; }
|
|
35749
|
+
else if (ch === 9) { count += this.options.tabSize; }
|
|
35750
|
+
else { return count }
|
|
35751
|
+
}
|
|
35752
|
+
};
|
|
35753
|
+
|
|
35754
|
+
LooseParser.prototype.closes = function closes (closeTok, indent, line, blockHeuristic) {
|
|
35755
|
+
if (this.tok.type === closeTok || this.tok.type === types$1.eof) { return true }
|
|
35756
|
+
return line !== this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
|
|
35757
|
+
(!blockHeuristic || this.nextLineStart >= this.input.length ||
|
|
35758
|
+
this.indentationAfter(this.nextLineStart) < indent)
|
|
35759
|
+
};
|
|
35760
|
+
|
|
35761
|
+
LooseParser.prototype.tokenStartsLine = function tokenStartsLine () {
|
|
35762
|
+
for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
|
|
35763
|
+
var ch = this.input.charCodeAt(p);
|
|
35764
|
+
if (ch !== 9 && ch !== 32) { return false }
|
|
35765
|
+
}
|
|
35766
|
+
return true
|
|
35767
|
+
};
|
|
35768
|
+
|
|
35769
|
+
LooseParser.prototype.extend = function extend (name, f) {
|
|
35770
|
+
this[name] = f(this[name]);
|
|
35771
|
+
};
|
|
35772
|
+
|
|
35773
|
+
LooseParser.prototype.parse = function parse () {
|
|
35774
|
+
this.next();
|
|
35775
|
+
return this.parseTopLevel()
|
|
35776
|
+
};
|
|
35777
|
+
|
|
35778
|
+
LooseParser.extend = function extend () {
|
|
35779
|
+
var plugins = [], len = arguments.length;
|
|
35780
|
+
while ( len-- ) plugins[ len ] = arguments[ len ];
|
|
35781
|
+
|
|
35782
|
+
var cls = this;
|
|
35783
|
+
for (var i = 0; i < plugins.length; i++) { cls = plugins[i](cls); }
|
|
35784
|
+
return cls
|
|
35785
|
+
};
|
|
35786
|
+
|
|
35787
|
+
LooseParser.parse = function parse (input, options) {
|
|
35788
|
+
return new this(input, options).parse()
|
|
35789
|
+
};
|
|
35790
|
+
|
|
35791
|
+
// Allows plugins to extend the base parser / tokenizer used
|
|
35792
|
+
LooseParser.BaseParser = Parser;
|
|
35793
|
+
|
|
35794
|
+
var lp$2 = LooseParser.prototype;
|
|
35795
|
+
|
|
35796
|
+
function isSpace(ch) {
|
|
35797
|
+
return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
|
|
35798
|
+
}
|
|
35799
|
+
|
|
35800
|
+
lp$2.next = function() {
|
|
35801
|
+
this.last = this.tok;
|
|
35802
|
+
if (this.ahead.length)
|
|
35803
|
+
{ this.tok = this.ahead.shift(); }
|
|
35804
|
+
else
|
|
35805
|
+
{ this.tok = this.readToken(); }
|
|
35806
|
+
|
|
35807
|
+
if (this.tok.start >= this.nextLineStart) {
|
|
35808
|
+
while (this.tok.start >= this.nextLineStart) {
|
|
35809
|
+
this.curLineStart = this.nextLineStart;
|
|
35810
|
+
this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
|
|
35811
|
+
}
|
|
35812
|
+
this.curIndent = this.indentationAfter(this.curLineStart);
|
|
35813
|
+
}
|
|
35814
|
+
};
|
|
35815
|
+
|
|
35816
|
+
lp$2.readToken = function() {
|
|
35817
|
+
for (;;) {
|
|
35818
|
+
try {
|
|
35819
|
+
this.toks.next();
|
|
35820
|
+
if (this.toks.type === types$1.dot &&
|
|
35821
|
+
this.input.substr(this.toks.end, 1) === "." &&
|
|
35822
|
+
this.options.ecmaVersion >= 6) {
|
|
35823
|
+
this.toks.end++;
|
|
35824
|
+
this.toks.type = types$1.ellipsis;
|
|
35825
|
+
}
|
|
35826
|
+
return new Token(this.toks)
|
|
35827
|
+
} catch (e) {
|
|
35828
|
+
if (!(e instanceof SyntaxError)) { throw e }
|
|
35829
|
+
|
|
35830
|
+
// Try to skip some text, based on the error message, and then continue
|
|
35831
|
+
var msg = e.message, pos = e.raisedAt, replace = true;
|
|
35832
|
+
if (/unterminated/i.test(msg)) {
|
|
35833
|
+
pos = this.lineEnd(e.pos + 1);
|
|
35834
|
+
if (/string/.test(msg)) {
|
|
35835
|
+
replace = {start: e.pos, end: pos, type: types$1.string, value: this.input.slice(e.pos + 1, pos)};
|
|
35836
|
+
} else if (/regular expr/i.test(msg)) {
|
|
35837
|
+
var re = this.input.slice(e.pos, pos);
|
|
35838
|
+
try { re = new RegExp(re); } catch (e$1) { /* ignore compilation error due to new syntax */ }
|
|
35839
|
+
replace = {start: e.pos, end: pos, type: types$1.regexp, value: re};
|
|
35840
|
+
} else if (/template/.test(msg)) {
|
|
35841
|
+
replace = {
|
|
35842
|
+
start: e.pos,
|
|
35843
|
+
end: pos,
|
|
35844
|
+
type: types$1.template,
|
|
35845
|
+
value: this.input.slice(e.pos, pos)
|
|
35846
|
+
};
|
|
35847
|
+
} else {
|
|
35848
|
+
replace = false;
|
|
35849
|
+
}
|
|
35850
|
+
} else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix|numeric separator/i.test(msg)) {
|
|
35851
|
+
while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) { ++pos; }
|
|
35852
|
+
} else if (/character escape|expected hexadecimal/i.test(msg)) {
|
|
35853
|
+
while (pos < this.input.length) {
|
|
35854
|
+
var ch = this.input.charCodeAt(pos++);
|
|
35855
|
+
if (ch === 34 || ch === 39 || isNewLine(ch)) { break }
|
|
35856
|
+
}
|
|
35857
|
+
} else if (/unexpected character/i.test(msg)) {
|
|
35858
|
+
pos++;
|
|
35859
|
+
replace = false;
|
|
35860
|
+
} else if (/regular expression/i.test(msg)) {
|
|
35861
|
+
replace = true;
|
|
35862
|
+
} else {
|
|
35863
|
+
throw e
|
|
35864
|
+
}
|
|
35865
|
+
this.resetTo(pos);
|
|
35866
|
+
if (replace === true) { replace = {start: pos, end: pos, type: types$1.name, value: dummyValue}; }
|
|
35867
|
+
if (replace) {
|
|
35868
|
+
if (this.options.locations)
|
|
35869
|
+
{ replace.loc = new SourceLocation(
|
|
35870
|
+
this.toks,
|
|
35871
|
+
getLineInfo(this.input, replace.start),
|
|
35872
|
+
getLineInfo(this.input, replace.end)); }
|
|
35873
|
+
return replace
|
|
35874
|
+
}
|
|
35875
|
+
}
|
|
35876
|
+
}
|
|
35877
|
+
};
|
|
35878
|
+
|
|
35879
|
+
lp$2.resetTo = function(pos) {
|
|
35880
|
+
this.toks.pos = pos;
|
|
35881
|
+
this.toks.containsEsc = false;
|
|
35882
|
+
var ch = this.input.charAt(pos - 1);
|
|
35883
|
+
this.toks.exprAllowed = !ch || /[[{(,;:?/*=+\-~!|&%^<>]/.test(ch) ||
|
|
35884
|
+
/[enwfd]/.test(ch) &&
|
|
35885
|
+
/\b(case|else|return|throw|new|in|(instance|type)?of|delete|void)$/.test(this.input.slice(pos - 10, pos));
|
|
35886
|
+
|
|
35887
|
+
if (this.options.locations) {
|
|
35888
|
+
this.toks.curLine = 1;
|
|
35889
|
+
this.toks.lineStart = lineBreakG.lastIndex = 0;
|
|
35890
|
+
var match;
|
|
35891
|
+
while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
|
|
35892
|
+
++this.toks.curLine;
|
|
35893
|
+
this.toks.lineStart = match.index + match[0].length;
|
|
35894
|
+
}
|
|
35895
|
+
}
|
|
35896
|
+
};
|
|
35897
|
+
|
|
35898
|
+
lp$2.lookAhead = function(n) {
|
|
35899
|
+
while (n > this.ahead.length)
|
|
35900
|
+
{ this.ahead.push(this.readToken()); }
|
|
35901
|
+
return this.ahead[n - 1]
|
|
35902
|
+
};
|
|
35903
|
+
|
|
35904
|
+
var lp$1 = LooseParser.prototype;
|
|
35905
|
+
|
|
35906
|
+
lp$1.parseTopLevel = function() {
|
|
35907
|
+
var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
|
|
35908
|
+
node.body = [];
|
|
35909
|
+
while (this.tok.type !== types$1.eof) { node.body.push(this.parseStatement()); }
|
|
35910
|
+
this.toks.adaptDirectivePrologue(node.body);
|
|
35911
|
+
this.last = this.tok;
|
|
35912
|
+
node.sourceType = this.options.sourceType === "commonjs" ? "script" : this.options.sourceType;
|
|
35913
|
+
return this.finishNode(node, "Program")
|
|
35914
|
+
};
|
|
35915
|
+
|
|
35916
|
+
lp$1.parseStatement = function() {
|
|
35917
|
+
var starttype = this.tok.type, node = this.startNode(), kind;
|
|
35918
|
+
|
|
35919
|
+
if (this.toks.isLet()) {
|
|
35920
|
+
starttype = types$1._var;
|
|
35921
|
+
kind = "let";
|
|
35922
|
+
}
|
|
35923
|
+
|
|
35924
|
+
switch (starttype) {
|
|
35925
|
+
case types$1._break: case types$1._continue:
|
|
35926
|
+
this.next();
|
|
35927
|
+
var isBreak = starttype === types$1._break;
|
|
35928
|
+
if (this.semicolon() || this.canInsertSemicolon()) {
|
|
35929
|
+
node.label = null;
|
|
35930
|
+
} else {
|
|
35931
|
+
node.label = this.tok.type === types$1.name ? this.parseIdent() : null;
|
|
35932
|
+
this.semicolon();
|
|
35933
|
+
}
|
|
35934
|
+
return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
|
|
35935
|
+
|
|
35936
|
+
case types$1._debugger:
|
|
35937
|
+
this.next();
|
|
35938
|
+
this.semicolon();
|
|
35939
|
+
return this.finishNode(node, "DebuggerStatement")
|
|
35940
|
+
|
|
35941
|
+
case types$1._do:
|
|
35942
|
+
this.next();
|
|
35943
|
+
node.body = this.parseStatement();
|
|
35944
|
+
node.test = this.eat(types$1._while) ? this.parseParenExpression() : this.dummyIdent();
|
|
35945
|
+
this.semicolon();
|
|
35946
|
+
return this.finishNode(node, "DoWhileStatement")
|
|
35947
|
+
|
|
35948
|
+
case types$1._for:
|
|
35949
|
+
this.next(); // `for` keyword
|
|
35950
|
+
var isAwait = this.options.ecmaVersion >= 9 && this.eatContextual("await");
|
|
35951
|
+
|
|
35952
|
+
this.pushCx();
|
|
35953
|
+
this.expect(types$1.parenL);
|
|
35954
|
+
if (this.tok.type === types$1.semi) { return this.parseFor(node, null) }
|
|
35955
|
+
var isLet = this.toks.isLet();
|
|
35956
|
+
var isAwaitUsing = this.toks.isAwaitUsing(true);
|
|
35957
|
+
var isUsing = !isAwaitUsing && this.toks.isUsing(true);
|
|
35958
|
+
|
|
35959
|
+
if (isLet || this.tok.type === types$1._var || this.tok.type === types$1._const || isUsing || isAwaitUsing) {
|
|
35960
|
+
var kind$1 = isLet ? "let" : isUsing ? "using" : isAwaitUsing ? "await using" : this.tok.value;
|
|
35961
|
+
var init$1 = this.startNode();
|
|
35962
|
+
if (isUsing || isAwaitUsing) {
|
|
35963
|
+
if (isAwaitUsing) { this.next(); }
|
|
35964
|
+
this.parseVar(init$1, true, kind$1);
|
|
35965
|
+
} else {
|
|
35966
|
+
init$1 = this.parseVar(init$1, true, kind$1);
|
|
35967
|
+
}
|
|
35968
|
+
|
|
35969
|
+
if (init$1.declarations.length === 1 && (this.tok.type === types$1._in || this.isContextual("of"))) {
|
|
35970
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== types$1._in) {
|
|
35971
|
+
node.await = isAwait;
|
|
35972
|
+
}
|
|
35973
|
+
return this.parseForIn(node, init$1)
|
|
35974
|
+
}
|
|
35975
|
+
return this.parseFor(node, init$1)
|
|
35976
|
+
}
|
|
35977
|
+
var init = this.parseExpression(true);
|
|
35978
|
+
if (this.tok.type === types$1._in || this.isContextual("of")) {
|
|
35979
|
+
if (this.options.ecmaVersion >= 9 && this.tok.type !== types$1._in) {
|
|
35980
|
+
node.await = isAwait;
|
|
35981
|
+
}
|
|
35982
|
+
return this.parseForIn(node, this.toAssignable(init))
|
|
35983
|
+
}
|
|
35984
|
+
return this.parseFor(node, init)
|
|
35985
|
+
|
|
35986
|
+
case types$1._function:
|
|
35987
|
+
this.next();
|
|
35988
|
+
return this.parseFunction(node, true)
|
|
35989
|
+
|
|
35990
|
+
case types$1._if:
|
|
35991
|
+
this.next();
|
|
35992
|
+
node.test = this.parseParenExpression();
|
|
35993
|
+
node.consequent = this.parseStatement();
|
|
35994
|
+
node.alternate = this.eat(types$1._else) ? this.parseStatement() : null;
|
|
35995
|
+
return this.finishNode(node, "IfStatement")
|
|
35996
|
+
|
|
35997
|
+
case types$1._return:
|
|
35998
|
+
this.next();
|
|
35999
|
+
if (this.eat(types$1.semi) || this.canInsertSemicolon()) { node.argument = null; }
|
|
36000
|
+
else { node.argument = this.parseExpression(); this.semicolon(); }
|
|
36001
|
+
return this.finishNode(node, "ReturnStatement")
|
|
36002
|
+
|
|
36003
|
+
case types$1._switch:
|
|
36004
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36005
|
+
this.next();
|
|
36006
|
+
node.discriminant = this.parseParenExpression();
|
|
36007
|
+
node.cases = [];
|
|
36008
|
+
this.pushCx();
|
|
36009
|
+
this.expect(types$1.braceL);
|
|
36010
|
+
|
|
36011
|
+
var cur;
|
|
36012
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true)) {
|
|
36013
|
+
if (this.tok.type === types$1._case || this.tok.type === types$1._default) {
|
|
36014
|
+
var isCase = this.tok.type === types$1._case;
|
|
36015
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
36016
|
+
node.cases.push(cur = this.startNode());
|
|
36017
|
+
cur.consequent = [];
|
|
36018
|
+
this.next();
|
|
36019
|
+
if (isCase) { cur.test = this.parseExpression(); }
|
|
36020
|
+
else { cur.test = null; }
|
|
36021
|
+
this.expect(types$1.colon);
|
|
36022
|
+
} else {
|
|
36023
|
+
if (!cur) {
|
|
36024
|
+
node.cases.push(cur = this.startNode());
|
|
36025
|
+
cur.consequent = [];
|
|
36026
|
+
cur.test = null;
|
|
36027
|
+
}
|
|
36028
|
+
cur.consequent.push(this.parseStatement());
|
|
36029
|
+
}
|
|
36030
|
+
}
|
|
36031
|
+
if (cur) { this.finishNode(cur, "SwitchCase"); }
|
|
36032
|
+
this.popCx();
|
|
36033
|
+
this.eat(types$1.braceR);
|
|
36034
|
+
return this.finishNode(node, "SwitchStatement")
|
|
36035
|
+
|
|
36036
|
+
case types$1._throw:
|
|
36037
|
+
this.next();
|
|
36038
|
+
node.argument = this.parseExpression();
|
|
36039
|
+
this.semicolon();
|
|
36040
|
+
return this.finishNode(node, "ThrowStatement")
|
|
36041
|
+
|
|
36042
|
+
case types$1._try:
|
|
36043
|
+
this.next();
|
|
36044
|
+
node.block = this.parseBlock();
|
|
36045
|
+
node.handler = null;
|
|
36046
|
+
if (this.tok.type === types$1._catch) {
|
|
36047
|
+
var clause = this.startNode();
|
|
36048
|
+
this.next();
|
|
36049
|
+
if (this.eat(types$1.parenL)) {
|
|
36050
|
+
clause.param = this.toAssignable(this.parseExprAtom(), true);
|
|
36051
|
+
this.expect(types$1.parenR);
|
|
36052
|
+
} else {
|
|
36053
|
+
clause.param = null;
|
|
36054
|
+
}
|
|
36055
|
+
clause.body = this.parseBlock();
|
|
36056
|
+
node.handler = this.finishNode(clause, "CatchClause");
|
|
36057
|
+
}
|
|
36058
|
+
node.finalizer = this.eat(types$1._finally) ? this.parseBlock() : null;
|
|
36059
|
+
if (!node.handler && !node.finalizer) { return node.block }
|
|
36060
|
+
return this.finishNode(node, "TryStatement")
|
|
36061
|
+
|
|
36062
|
+
case types$1._var:
|
|
36063
|
+
case types$1._const:
|
|
36064
|
+
return this.parseVar(node, false, kind || this.tok.value)
|
|
36065
|
+
|
|
36066
|
+
case types$1._while:
|
|
36067
|
+
this.next();
|
|
36068
|
+
node.test = this.parseParenExpression();
|
|
36069
|
+
node.body = this.parseStatement();
|
|
36070
|
+
return this.finishNode(node, "WhileStatement")
|
|
36071
|
+
|
|
36072
|
+
case types$1._with:
|
|
36073
|
+
this.next();
|
|
36074
|
+
node.object = this.parseParenExpression();
|
|
36075
|
+
node.body = this.parseStatement();
|
|
36076
|
+
return this.finishNode(node, "WithStatement")
|
|
36077
|
+
|
|
36078
|
+
case types$1.braceL:
|
|
36079
|
+
return this.parseBlock()
|
|
36080
|
+
|
|
36081
|
+
case types$1.semi:
|
|
36082
|
+
this.next();
|
|
36083
|
+
return this.finishNode(node, "EmptyStatement")
|
|
36084
|
+
|
|
36085
|
+
case types$1._class:
|
|
36086
|
+
return this.parseClass(true)
|
|
36087
|
+
|
|
36088
|
+
case types$1._import:
|
|
36089
|
+
if (this.options.ecmaVersion > 10) {
|
|
36090
|
+
var nextType = this.lookAhead(1).type;
|
|
36091
|
+
if (nextType === types$1.parenL || nextType === types$1.dot) {
|
|
36092
|
+
node.expression = this.parseExpression();
|
|
36093
|
+
this.semicolon();
|
|
36094
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
36095
|
+
}
|
|
36096
|
+
}
|
|
36097
|
+
|
|
36098
|
+
return this.parseImport()
|
|
36099
|
+
|
|
36100
|
+
case types$1._export:
|
|
36101
|
+
return this.parseExport()
|
|
36102
|
+
|
|
36103
|
+
default:
|
|
36104
|
+
if (this.toks.isAsyncFunction()) {
|
|
36105
|
+
this.next();
|
|
36106
|
+
this.next();
|
|
36107
|
+
return this.parseFunction(node, true, true)
|
|
36108
|
+
}
|
|
36109
|
+
|
|
36110
|
+
if (this.toks.isUsing(false)) {
|
|
36111
|
+
return this.parseVar(node, false, "using")
|
|
36112
|
+
}
|
|
36113
|
+
|
|
36114
|
+
if (this.toks.isAwaitUsing(false)) {
|
|
36115
|
+
this.next();
|
|
36116
|
+
return this.parseVar(node, false, "await using")
|
|
36117
|
+
}
|
|
36118
|
+
|
|
36119
|
+
var expr = this.parseExpression();
|
|
36120
|
+
if (isDummy(expr)) {
|
|
36121
|
+
this.next();
|
|
36122
|
+
if (this.tok.type === types$1.eof) { return this.finishNode(node, "EmptyStatement") }
|
|
36123
|
+
return this.parseStatement()
|
|
36124
|
+
} else if (starttype === types$1.name && expr.type === "Identifier" && this.eat(types$1.colon)) {
|
|
36125
|
+
node.body = this.parseStatement();
|
|
36126
|
+
node.label = expr;
|
|
36127
|
+
return this.finishNode(node, "LabeledStatement")
|
|
36128
|
+
} else {
|
|
36129
|
+
node.expression = expr;
|
|
36130
|
+
this.semicolon();
|
|
36131
|
+
return this.finishNode(node, "ExpressionStatement")
|
|
36132
|
+
}
|
|
36133
|
+
}
|
|
36134
|
+
};
|
|
36135
|
+
|
|
36136
|
+
lp$1.parseBlock = function() {
|
|
36137
|
+
var node = this.startNode();
|
|
36138
|
+
this.pushCx();
|
|
36139
|
+
this.expect(types$1.braceL);
|
|
36140
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36141
|
+
node.body = [];
|
|
36142
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true))
|
|
36143
|
+
{ node.body.push(this.parseStatement()); }
|
|
36144
|
+
this.popCx();
|
|
36145
|
+
this.eat(types$1.braceR);
|
|
36146
|
+
return this.finishNode(node, "BlockStatement")
|
|
36147
|
+
};
|
|
36148
|
+
|
|
36149
|
+
lp$1.parseFor = function(node, init) {
|
|
36150
|
+
node.init = init;
|
|
36151
|
+
node.test = node.update = null;
|
|
36152
|
+
if (this.eat(types$1.semi) && this.tok.type !== types$1.semi) { node.test = this.parseExpression(); }
|
|
36153
|
+
if (this.eat(types$1.semi) && this.tok.type !== types$1.parenR) { node.update = this.parseExpression(); }
|
|
36154
|
+
this.popCx();
|
|
36155
|
+
this.expect(types$1.parenR);
|
|
36156
|
+
node.body = this.parseStatement();
|
|
36157
|
+
return this.finishNode(node, "ForStatement")
|
|
36158
|
+
};
|
|
36159
|
+
|
|
36160
|
+
lp$1.parseForIn = function(node, init) {
|
|
36161
|
+
var type = this.tok.type === types$1._in ? "ForInStatement" : "ForOfStatement";
|
|
36162
|
+
this.next();
|
|
36163
|
+
node.left = init;
|
|
36164
|
+
node.right = this.parseExpression();
|
|
36165
|
+
this.popCx();
|
|
36166
|
+
this.expect(types$1.parenR);
|
|
36167
|
+
node.body = this.parseStatement();
|
|
36168
|
+
return this.finishNode(node, type)
|
|
36169
|
+
};
|
|
36170
|
+
|
|
36171
|
+
lp$1.parseVar = function(node, noIn, kind) {
|
|
36172
|
+
node.kind = kind;
|
|
36173
|
+
this.next();
|
|
36174
|
+
node.declarations = [];
|
|
36175
|
+
do {
|
|
36176
|
+
var decl = this.startNode();
|
|
36177
|
+
decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent();
|
|
36178
|
+
decl.init = this.eat(types$1.eq) ? this.parseMaybeAssign(noIn) : null;
|
|
36179
|
+
node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
|
|
36180
|
+
} while (this.eat(types$1.comma))
|
|
36181
|
+
if (!node.declarations.length) {
|
|
36182
|
+
var decl$1 = this.startNode();
|
|
36183
|
+
decl$1.id = this.dummyIdent();
|
|
36184
|
+
node.declarations.push(this.finishNode(decl$1, "VariableDeclarator"));
|
|
36185
|
+
}
|
|
36186
|
+
if (!noIn) { this.semicolon(); }
|
|
36187
|
+
return this.finishNode(node, "VariableDeclaration")
|
|
36188
|
+
};
|
|
36189
|
+
|
|
36190
|
+
lp$1.parseClass = function(isStatement) {
|
|
36191
|
+
var node = this.startNode();
|
|
36192
|
+
this.next();
|
|
36193
|
+
if (this.tok.type === types$1.name) { node.id = this.parseIdent(); }
|
|
36194
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
36195
|
+
else { node.id = null; }
|
|
36196
|
+
node.superClass = this.eat(types$1._extends) ? this.parseExpression() : null;
|
|
36197
|
+
node.body = this.startNode();
|
|
36198
|
+
node.body.body = [];
|
|
36199
|
+
this.pushCx();
|
|
36200
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
36201
|
+
this.eat(types$1.braceL);
|
|
36202
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
36203
|
+
while (!this.closes(types$1.braceR, indent, line)) {
|
|
36204
|
+
var element = this.parseClassElement();
|
|
36205
|
+
if (element) { node.body.body.push(element); }
|
|
36206
|
+
}
|
|
36207
|
+
this.popCx();
|
|
36208
|
+
if (!this.eat(types$1.braceR)) {
|
|
36209
|
+
// If there is no closing brace, make the node span to the start
|
|
36210
|
+
// of the next token (this is useful for Tern)
|
|
36211
|
+
this.last.end = this.tok.start;
|
|
36212
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
36213
|
+
}
|
|
36214
|
+
this.semicolon();
|
|
36215
|
+
this.finishNode(node.body, "ClassBody");
|
|
36216
|
+
return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
|
|
36217
|
+
};
|
|
36218
|
+
|
|
36219
|
+
lp$1.parseClassElement = function() {
|
|
36220
|
+
if (this.eat(types$1.semi)) { return null }
|
|
36221
|
+
|
|
36222
|
+
var ref = this.options;
|
|
36223
|
+
var ecmaVersion = ref.ecmaVersion;
|
|
36224
|
+
var locations = ref.locations;
|
|
36225
|
+
var indent = this.curIndent;
|
|
36226
|
+
var line = this.curLineStart;
|
|
36227
|
+
var node = this.startNode();
|
|
36228
|
+
var keyName = "";
|
|
36229
|
+
var isGenerator = false;
|
|
36230
|
+
var isAsync = false;
|
|
36231
|
+
var kind = "method";
|
|
36232
|
+
var isStatic = false;
|
|
36233
|
+
|
|
36234
|
+
if (this.eatContextual("static")) {
|
|
36235
|
+
// Parse static init block
|
|
36236
|
+
if (ecmaVersion >= 13 && this.eat(types$1.braceL)) {
|
|
36237
|
+
this.parseClassStaticBlock(node);
|
|
36238
|
+
return node
|
|
36239
|
+
}
|
|
36240
|
+
if (this.isClassElementNameStart() || this.toks.type === types$1.star) {
|
|
36241
|
+
isStatic = true;
|
|
36242
|
+
} else {
|
|
36243
|
+
keyName = "static";
|
|
36244
|
+
}
|
|
36245
|
+
}
|
|
36246
|
+
node.static = isStatic;
|
|
36247
|
+
if (!keyName && ecmaVersion >= 8 && this.eatContextual("async")) {
|
|
36248
|
+
if ((this.isClassElementNameStart() || this.toks.type === types$1.star) && !this.canInsertSemicolon()) {
|
|
36249
|
+
isAsync = true;
|
|
36250
|
+
} else {
|
|
36251
|
+
keyName = "async";
|
|
36252
|
+
}
|
|
36253
|
+
}
|
|
36254
|
+
if (!keyName) {
|
|
36255
|
+
isGenerator = this.eat(types$1.star);
|
|
36256
|
+
var lastValue = this.toks.value;
|
|
36257
|
+
if (this.eatContextual("get") || this.eatContextual("set")) {
|
|
36258
|
+
if (this.isClassElementNameStart()) {
|
|
36259
|
+
kind = lastValue;
|
|
36260
|
+
} else {
|
|
36261
|
+
keyName = lastValue;
|
|
36262
|
+
}
|
|
36263
|
+
}
|
|
36264
|
+
}
|
|
36265
|
+
|
|
36266
|
+
// Parse element name
|
|
36267
|
+
if (keyName) {
|
|
36268
|
+
// 'async', 'get', 'set', or 'static' were not a keyword contextually.
|
|
36269
|
+
// The last token is any of those. Make it the element name.
|
|
36270
|
+
node.computed = false;
|
|
36271
|
+
node.key = this.startNodeAt(locations ? [this.toks.lastTokStart, this.toks.lastTokStartLoc] : this.toks.lastTokStart);
|
|
36272
|
+
node.key.name = keyName;
|
|
36273
|
+
this.finishNode(node.key, "Identifier");
|
|
36274
|
+
} else {
|
|
36275
|
+
this.parseClassElementName(node);
|
|
36276
|
+
|
|
36277
|
+
// From https://github.com/acornjs/acorn/blob/7deba41118d6384a2c498c61176b3cf434f69590/acorn-loose/src/statement.js#L291
|
|
36278
|
+
// Skip broken stuff.
|
|
36279
|
+
if (isDummy(node.key)) {
|
|
36280
|
+
if (isDummy(this.parseMaybeAssign())) { this.next(); }
|
|
36281
|
+
this.eat(types$1.comma);
|
|
36282
|
+
return null
|
|
36283
|
+
}
|
|
36284
|
+
}
|
|
36285
|
+
|
|
36286
|
+
// Parse element value
|
|
36287
|
+
if (ecmaVersion < 13 || this.toks.type === types$1.parenL || kind !== "method" || isGenerator || isAsync) {
|
|
36288
|
+
// Method
|
|
36289
|
+
var isConstructor =
|
|
36290
|
+
!node.computed &&
|
|
36291
|
+
!node.static &&
|
|
36292
|
+
!isGenerator &&
|
|
36293
|
+
!isAsync &&
|
|
36294
|
+
kind === "method" && (
|
|
36295
|
+
node.key.type === "Identifier" && node.key.name === "constructor" ||
|
|
36296
|
+
node.key.type === "Literal" && node.key.value === "constructor"
|
|
36297
|
+
);
|
|
36298
|
+
node.kind = isConstructor ? "constructor" : kind;
|
|
36299
|
+
node.value = this.parseMethod(isGenerator, isAsync);
|
|
36300
|
+
this.finishNode(node, "MethodDefinition");
|
|
36301
|
+
} else {
|
|
36302
|
+
// Field
|
|
36303
|
+
if (this.eat(types$1.eq)) {
|
|
36304
|
+
if (this.curLineStart !== line && this.curIndent <= indent && this.tokenStartsLine()) {
|
|
36305
|
+
// Estimated the next line is the next class element by indentations.
|
|
36306
|
+
node.value = null;
|
|
36307
|
+
} else {
|
|
36308
|
+
var oldInAsync = this.inAsync;
|
|
36309
|
+
var oldInGenerator = this.inGenerator;
|
|
36310
|
+
this.inAsync = false;
|
|
36311
|
+
this.inGenerator = false;
|
|
36312
|
+
node.value = this.parseMaybeAssign();
|
|
36313
|
+
this.inAsync = oldInAsync;
|
|
36314
|
+
this.inGenerator = oldInGenerator;
|
|
36315
|
+
}
|
|
36316
|
+
} else {
|
|
36317
|
+
node.value = null;
|
|
36318
|
+
}
|
|
36319
|
+
this.semicolon();
|
|
36320
|
+
this.finishNode(node, "PropertyDefinition");
|
|
36321
|
+
}
|
|
36322
|
+
|
|
36323
|
+
return node
|
|
36324
|
+
};
|
|
36325
|
+
|
|
36326
|
+
lp$1.parseClassStaticBlock = function(node) {
|
|
36327
|
+
var blockIndent = this.curIndent, line = this.curLineStart;
|
|
36328
|
+
node.body = [];
|
|
36329
|
+
this.pushCx();
|
|
36330
|
+
while (!this.closes(types$1.braceR, blockIndent, line, true))
|
|
36331
|
+
{ node.body.push(this.parseStatement()); }
|
|
36332
|
+
this.popCx();
|
|
36333
|
+
this.eat(types$1.braceR);
|
|
36334
|
+
|
|
36335
|
+
return this.finishNode(node, "StaticBlock")
|
|
36336
|
+
};
|
|
36337
|
+
|
|
36338
|
+
lp$1.isClassElementNameStart = function() {
|
|
36339
|
+
return this.toks.isClassElementNameStart()
|
|
36340
|
+
};
|
|
36341
|
+
|
|
36342
|
+
lp$1.parseClassElementName = function(element) {
|
|
36343
|
+
if (this.toks.type === types$1.privateId) {
|
|
36344
|
+
element.computed = false;
|
|
36345
|
+
element.key = this.parsePrivateIdent();
|
|
36346
|
+
} else {
|
|
36347
|
+
this.parsePropertyName(element);
|
|
36348
|
+
}
|
|
36349
|
+
};
|
|
36350
|
+
|
|
36351
|
+
lp$1.parseFunction = function(node, isStatement, isAsync) {
|
|
36352
|
+
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
36353
|
+
this.initFunction(node);
|
|
36354
|
+
if (this.options.ecmaVersion >= 6) {
|
|
36355
|
+
node.generator = this.eat(types$1.star);
|
|
36356
|
+
}
|
|
36357
|
+
if (this.options.ecmaVersion >= 8) {
|
|
36358
|
+
node.async = !!isAsync;
|
|
36359
|
+
}
|
|
36360
|
+
if (this.tok.type === types$1.name) { node.id = this.parseIdent(); }
|
|
36361
|
+
else if (isStatement === true) { node.id = this.dummyIdent(); }
|
|
36362
|
+
this.inAsync = node.async;
|
|
36363
|
+
this.inGenerator = node.generator;
|
|
36364
|
+
this.inFunction = true;
|
|
36365
|
+
node.params = this.parseFunctionParams();
|
|
36366
|
+
node.body = this.parseBlock();
|
|
36367
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
36368
|
+
this.inAsync = oldInAsync;
|
|
36369
|
+
this.inGenerator = oldInGenerator;
|
|
36370
|
+
this.inFunction = oldInFunction;
|
|
36371
|
+
return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
|
|
36372
|
+
};
|
|
36373
|
+
|
|
36374
|
+
lp$1.parseExport = function() {
|
|
36375
|
+
var node = this.startNode();
|
|
36376
|
+
this.next();
|
|
36377
|
+
if (this.eat(types$1.star)) {
|
|
36378
|
+
if (this.options.ecmaVersion >= 11) {
|
|
36379
|
+
if (this.eatContextual("as")) {
|
|
36380
|
+
node.exported = this.parseExprAtom();
|
|
36381
|
+
} else {
|
|
36382
|
+
node.exported = null;
|
|
36383
|
+
}
|
|
36384
|
+
}
|
|
36385
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : this.dummyString();
|
|
36386
|
+
if (this.options.ecmaVersion >= 16)
|
|
36387
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36388
|
+
this.semicolon();
|
|
36389
|
+
return this.finishNode(node, "ExportAllDeclaration")
|
|
36390
|
+
}
|
|
36391
|
+
if (this.eat(types$1._default)) {
|
|
36392
|
+
// export default (function foo() {}) // This is FunctionExpression.
|
|
36393
|
+
var isAsync;
|
|
36394
|
+
if (this.tok.type === types$1._function || (isAsync = this.toks.isAsyncFunction())) {
|
|
36395
|
+
var fNode = this.startNode();
|
|
36396
|
+
this.next();
|
|
36397
|
+
if (isAsync) { this.next(); }
|
|
36398
|
+
node.declaration = this.parseFunction(fNode, "nullableID", isAsync);
|
|
36399
|
+
} else if (this.tok.type === types$1._class) {
|
|
36400
|
+
node.declaration = this.parseClass("nullableID");
|
|
36401
|
+
} else {
|
|
36402
|
+
node.declaration = this.parseMaybeAssign();
|
|
36403
|
+
this.semicolon();
|
|
36404
|
+
}
|
|
36405
|
+
return this.finishNode(node, "ExportDefaultDeclaration")
|
|
36406
|
+
}
|
|
36407
|
+
if (this.tok.type.keyword || this.toks.isLet() || this.toks.isAsyncFunction()) {
|
|
36408
|
+
node.declaration = this.parseStatement();
|
|
36409
|
+
node.specifiers = [];
|
|
36410
|
+
node.source = null;
|
|
36411
|
+
} else {
|
|
36412
|
+
node.declaration = null;
|
|
36413
|
+
node.specifiers = this.parseExportSpecifierList();
|
|
36414
|
+
node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
|
|
36415
|
+
if (this.options.ecmaVersion >= 16)
|
|
36416
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36417
|
+
this.semicolon();
|
|
36418
|
+
}
|
|
36419
|
+
return this.finishNode(node, "ExportNamedDeclaration")
|
|
36420
|
+
};
|
|
36421
|
+
|
|
36422
|
+
lp$1.parseImport = function() {
|
|
36423
|
+
var node = this.startNode();
|
|
36424
|
+
this.next();
|
|
36425
|
+
if (this.tok.type === types$1.string) {
|
|
36426
|
+
node.specifiers = [];
|
|
36427
|
+
node.source = this.parseExprAtom();
|
|
36428
|
+
} else {
|
|
36429
|
+
var elt;
|
|
36430
|
+
if (this.tok.type === types$1.name && this.tok.value !== "from") {
|
|
36431
|
+
elt = this.startNode();
|
|
36432
|
+
elt.local = this.parseIdent();
|
|
36433
|
+
this.finishNode(elt, "ImportDefaultSpecifier");
|
|
36434
|
+
this.eat(types$1.comma);
|
|
36435
|
+
}
|
|
36436
|
+
node.specifiers = this.parseImportSpecifiers();
|
|
36437
|
+
node.source = this.eatContextual("from") && this.tok.type === types$1.string ? this.parseExprAtom() : this.dummyString();
|
|
36438
|
+
if (elt) { node.specifiers.unshift(elt); }
|
|
36439
|
+
}
|
|
36440
|
+
if (this.options.ecmaVersion >= 16)
|
|
36441
|
+
{ node.attributes = this.parseWithClause(); }
|
|
36442
|
+
this.semicolon();
|
|
36443
|
+
return this.finishNode(node, "ImportDeclaration")
|
|
36444
|
+
};
|
|
36445
|
+
|
|
36446
|
+
lp$1.parseImportSpecifiers = function() {
|
|
36447
|
+
var elts = [];
|
|
36448
|
+
if (this.tok.type === types$1.star) {
|
|
36449
|
+
var elt = this.startNode();
|
|
36450
|
+
this.next();
|
|
36451
|
+
elt.local = this.eatContextual("as") ? this.parseIdent() : this.dummyIdent();
|
|
36452
|
+
elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
|
|
36453
|
+
} else {
|
|
36454
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36455
|
+
this.pushCx();
|
|
36456
|
+
this.eat(types$1.braceL);
|
|
36457
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36458
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36459
|
+
var elt$1 = this.startNode();
|
|
36460
|
+
if (this.eat(types$1.star)) {
|
|
36461
|
+
elt$1.local = this.eatContextual("as") ? this.parseModuleExportName() : this.dummyIdent();
|
|
36462
|
+
this.finishNode(elt$1, "ImportNamespaceSpecifier");
|
|
36463
|
+
} else {
|
|
36464
|
+
if (this.isContextual("from")) { break }
|
|
36465
|
+
elt$1.imported = this.parseModuleExportName();
|
|
36466
|
+
if (isDummy(elt$1.imported)) { break }
|
|
36467
|
+
elt$1.local = this.eatContextual("as") ? this.parseModuleExportName() : elt$1.imported;
|
|
36468
|
+
this.finishNode(elt$1, "ImportSpecifier");
|
|
36469
|
+
}
|
|
36470
|
+
elts.push(elt$1);
|
|
36471
|
+
this.eat(types$1.comma);
|
|
36472
|
+
}
|
|
36473
|
+
this.eat(types$1.braceR);
|
|
36474
|
+
this.popCx();
|
|
36475
|
+
}
|
|
36476
|
+
return elts
|
|
36477
|
+
};
|
|
36478
|
+
|
|
36479
|
+
lp$1.parseWithClause = function() {
|
|
36480
|
+
var nodes = [];
|
|
36481
|
+
if (!this.eat(types$1._with)) {
|
|
36482
|
+
return nodes
|
|
36483
|
+
}
|
|
36484
|
+
|
|
36485
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36486
|
+
this.pushCx();
|
|
36487
|
+
this.eat(types$1.braceL);
|
|
36488
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36489
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36490
|
+
var attr = this.startNode();
|
|
36491
|
+
attr.key = this.tok.type === types$1.string ? this.parseExprAtom() : this.parseIdent();
|
|
36492
|
+
if (this.eat(types$1.colon)) {
|
|
36493
|
+
if (this.tok.type === types$1.string)
|
|
36494
|
+
{ attr.value = this.parseExprAtom(); }
|
|
36495
|
+
else { attr.value = this.dummyString(); }
|
|
36496
|
+
} else {
|
|
36497
|
+
if (isDummy(attr.key)) { break }
|
|
36498
|
+
if (this.tok.type === types$1.string)
|
|
36499
|
+
{ attr.value = this.parseExprAtom(); }
|
|
36500
|
+
else { break }
|
|
36501
|
+
}
|
|
36502
|
+
nodes.push(this.finishNode(attr, "ImportAttribute"));
|
|
36503
|
+
this.eat(types$1.comma);
|
|
36504
|
+
}
|
|
36505
|
+
this.eat(types$1.braceR);
|
|
36506
|
+
this.popCx();
|
|
36507
|
+
return nodes
|
|
36508
|
+
};
|
|
36509
|
+
|
|
36510
|
+
lp$1.parseExportSpecifierList = function() {
|
|
36511
|
+
var elts = [];
|
|
36512
|
+
var indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart;
|
|
36513
|
+
this.pushCx();
|
|
36514
|
+
this.eat(types$1.braceL);
|
|
36515
|
+
if (this.curLineStart > continuedLine) { continuedLine = this.curLineStart; }
|
|
36516
|
+
while (!this.closes(types$1.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
|
|
36517
|
+
if (this.isContextual("from")) { break }
|
|
36518
|
+
var elt = this.startNode();
|
|
36519
|
+
elt.local = this.parseModuleExportName();
|
|
36520
|
+
if (isDummy(elt.local)) { break }
|
|
36521
|
+
elt.exported = this.eatContextual("as") ? this.parseModuleExportName() : elt.local;
|
|
36522
|
+
this.finishNode(elt, "ExportSpecifier");
|
|
36523
|
+
elts.push(elt);
|
|
36524
|
+
this.eat(types$1.comma);
|
|
36525
|
+
}
|
|
36526
|
+
this.eat(types$1.braceR);
|
|
36527
|
+
this.popCx();
|
|
36528
|
+
return elts
|
|
36529
|
+
};
|
|
36530
|
+
|
|
36531
|
+
lp$1.parseModuleExportName = function() {
|
|
36532
|
+
return this.options.ecmaVersion >= 13 && this.tok.type === types$1.string
|
|
36533
|
+
? this.parseExprAtom()
|
|
36534
|
+
: this.parseIdent()
|
|
36535
|
+
};
|
|
36536
|
+
|
|
36537
|
+
var lp = LooseParser.prototype;
|
|
36538
|
+
|
|
36539
|
+
lp.checkLVal = function(expr) {
|
|
36540
|
+
if (!expr) { return expr }
|
|
36541
|
+
switch (expr.type) {
|
|
36542
|
+
case "Identifier":
|
|
36543
|
+
case "MemberExpression":
|
|
36544
|
+
return expr
|
|
36545
|
+
|
|
36546
|
+
case "ParenthesizedExpression":
|
|
36547
|
+
expr.expression = this.checkLVal(expr.expression);
|
|
36548
|
+
return expr
|
|
36549
|
+
|
|
36550
|
+
default:
|
|
36551
|
+
return this.dummyIdent()
|
|
36552
|
+
}
|
|
36553
|
+
};
|
|
36554
|
+
|
|
36555
|
+
lp.parseExpression = function(noIn) {
|
|
36556
|
+
var start = this.storeCurrentPos();
|
|
36557
|
+
var expr = this.parseMaybeAssign(noIn);
|
|
36558
|
+
if (this.tok.type === types$1.comma) {
|
|
36559
|
+
var node = this.startNodeAt(start);
|
|
36560
|
+
node.expressions = [expr];
|
|
36561
|
+
while (this.eat(types$1.comma)) { node.expressions.push(this.parseMaybeAssign(noIn)); }
|
|
36562
|
+
return this.finishNode(node, "SequenceExpression")
|
|
36563
|
+
}
|
|
36564
|
+
return expr
|
|
36565
|
+
};
|
|
36566
|
+
|
|
36567
|
+
lp.parseParenExpression = function() {
|
|
36568
|
+
this.pushCx();
|
|
36569
|
+
this.expect(types$1.parenL);
|
|
36570
|
+
var val = this.parseExpression();
|
|
36571
|
+
this.popCx();
|
|
36572
|
+
this.expect(types$1.parenR);
|
|
36573
|
+
return val
|
|
36574
|
+
};
|
|
36575
|
+
|
|
36576
|
+
lp.parseMaybeAssign = function(noIn) {
|
|
36577
|
+
// `yield` should be an identifier reference if it's not in generator functions.
|
|
36578
|
+
if (this.inGenerator && this.toks.isContextual("yield")) {
|
|
36579
|
+
var node = this.startNode();
|
|
36580
|
+
this.next();
|
|
36581
|
+
if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type !== types$1.star && !this.tok.type.startsExpr)) {
|
|
36582
|
+
node.delegate = false;
|
|
36583
|
+
node.argument = null;
|
|
36584
|
+
} else {
|
|
36585
|
+
node.delegate = this.eat(types$1.star);
|
|
36586
|
+
node.argument = this.parseMaybeAssign();
|
|
36587
|
+
}
|
|
36588
|
+
return this.finishNode(node, "YieldExpression")
|
|
36589
|
+
}
|
|
36590
|
+
|
|
36591
|
+
var start = this.storeCurrentPos();
|
|
36592
|
+
var left = this.parseMaybeConditional(noIn);
|
|
36593
|
+
if (this.tok.type.isAssign) {
|
|
36594
|
+
var node$1 = this.startNodeAt(start);
|
|
36595
|
+
node$1.operator = this.tok.value;
|
|
36596
|
+
node$1.left = this.tok.type === types$1.eq ? this.toAssignable(left) : this.checkLVal(left);
|
|
36597
|
+
this.next();
|
|
36598
|
+
node$1.right = this.parseMaybeAssign(noIn);
|
|
36599
|
+
return this.finishNode(node$1, "AssignmentExpression")
|
|
36600
|
+
}
|
|
36601
|
+
return left
|
|
36602
|
+
};
|
|
36603
|
+
|
|
36604
|
+
lp.parseMaybeConditional = function(noIn) {
|
|
36605
|
+
var start = this.storeCurrentPos();
|
|
36606
|
+
var expr = this.parseExprOps(noIn);
|
|
36607
|
+
if (this.eat(types$1.question)) {
|
|
36608
|
+
var node = this.startNodeAt(start);
|
|
36609
|
+
node.test = expr;
|
|
36610
|
+
node.consequent = this.parseMaybeAssign();
|
|
36611
|
+
node.alternate = this.expect(types$1.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
|
|
36612
|
+
return this.finishNode(node, "ConditionalExpression")
|
|
36613
|
+
}
|
|
36614
|
+
return expr
|
|
36615
|
+
};
|
|
36616
|
+
|
|
36617
|
+
lp.parseExprOps = function(noIn) {
|
|
36618
|
+
var start = this.storeCurrentPos();
|
|
36619
|
+
var indent = this.curIndent, line = this.curLineStart;
|
|
36620
|
+
return this.parseExprOp(this.parseMaybeUnary(false), start, -1, noIn, indent, line)
|
|
36621
|
+
};
|
|
36622
|
+
|
|
36623
|
+
lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
|
|
36624
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) { return left }
|
|
36625
|
+
var prec = this.tok.type.binop;
|
|
36626
|
+
if (prec != null && (!noIn || this.tok.type !== types$1._in)) {
|
|
36627
|
+
if (prec > minPrec) {
|
|
36628
|
+
var node = this.startNodeAt(start);
|
|
36629
|
+
node.left = left;
|
|
36630
|
+
node.operator = this.tok.value;
|
|
36631
|
+
this.next();
|
|
36632
|
+
if (this.curLineStart !== line && this.curIndent < indent && this.tokenStartsLine()) {
|
|
36633
|
+
node.right = this.dummyIdent();
|
|
36634
|
+
} else {
|
|
36635
|
+
var rightStart = this.storeCurrentPos();
|
|
36636
|
+
node.right = this.parseExprOp(this.parseMaybeUnary(false), rightStart, prec, noIn, indent, line);
|
|
36637
|
+
}
|
|
36638
|
+
this.finishNode(node, /&&|\|\||\?\?/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
|
|
36639
|
+
return this.parseExprOp(node, start, minPrec, noIn, indent, line)
|
|
36640
|
+
}
|
|
36641
|
+
}
|
|
36642
|
+
return left
|
|
36643
|
+
};
|
|
36644
|
+
|
|
36645
|
+
lp.parseMaybeUnary = function(sawUnary) {
|
|
36646
|
+
var start = this.storeCurrentPos(), expr;
|
|
36647
|
+
if (this.options.ecmaVersion >= 8 && this.toks.isContextual("await") &&
|
|
36648
|
+
(this.inAsync || (this.toks.inModule && this.options.ecmaVersion >= 13) ||
|
|
36649
|
+
(!this.inFunction && this.options.allowAwaitOutsideFunction))) {
|
|
36650
|
+
expr = this.parseAwait();
|
|
36651
|
+
sawUnary = true;
|
|
36652
|
+
} else if (this.tok.type.prefix) {
|
|
36653
|
+
var node = this.startNode(), update = this.tok.type === types$1.incDec;
|
|
36654
|
+
if (!update) { sawUnary = true; }
|
|
36655
|
+
node.operator = this.tok.value;
|
|
36656
|
+
node.prefix = true;
|
|
36657
|
+
this.next();
|
|
36658
|
+
node.argument = this.parseMaybeUnary(true);
|
|
36659
|
+
if (update) { node.argument = this.checkLVal(node.argument); }
|
|
36660
|
+
expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
|
|
36661
|
+
} else if (this.tok.type === types$1.ellipsis) {
|
|
36662
|
+
var node$1 = this.startNode();
|
|
36663
|
+
this.next();
|
|
36664
|
+
node$1.argument = this.parseMaybeUnary(sawUnary);
|
|
36665
|
+
expr = this.finishNode(node$1, "SpreadElement");
|
|
36666
|
+
} else if (!sawUnary && this.tok.type === types$1.privateId) {
|
|
36667
|
+
expr = this.parsePrivateIdent();
|
|
36668
|
+
} else {
|
|
36669
|
+
expr = this.parseExprSubscripts();
|
|
36670
|
+
while (this.tok.type.postfix && !this.canInsertSemicolon()) {
|
|
36671
|
+
var node$2 = this.startNodeAt(start);
|
|
36672
|
+
node$2.operator = this.tok.value;
|
|
36673
|
+
node$2.prefix = false;
|
|
36674
|
+
node$2.argument = this.checkLVal(expr);
|
|
36675
|
+
this.next();
|
|
36676
|
+
expr = this.finishNode(node$2, "UpdateExpression");
|
|
36677
|
+
}
|
|
36678
|
+
}
|
|
36679
|
+
|
|
36680
|
+
if (!sawUnary && this.eat(types$1.starstar)) {
|
|
36681
|
+
var node$3 = this.startNodeAt(start);
|
|
36682
|
+
node$3.operator = "**";
|
|
36683
|
+
node$3.left = expr;
|
|
36684
|
+
node$3.right = this.parseMaybeUnary(false);
|
|
36685
|
+
return this.finishNode(node$3, "BinaryExpression")
|
|
36686
|
+
}
|
|
36687
|
+
|
|
36688
|
+
return expr
|
|
36689
|
+
};
|
|
36690
|
+
|
|
36691
|
+
lp.parseExprSubscripts = function() {
|
|
36692
|
+
var start = this.storeCurrentPos();
|
|
36693
|
+
return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
|
|
36694
|
+
};
|
|
36695
|
+
|
|
36696
|
+
lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
|
|
36697
|
+
var optionalSupported = this.options.ecmaVersion >= 11;
|
|
36698
|
+
var optionalChained = false;
|
|
36699
|
+
for (;;) {
|
|
36700
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine()) {
|
|
36701
|
+
if (this.tok.type === types$1.dot && this.curIndent === startIndent)
|
|
36702
|
+
{ --startIndent; }
|
|
36703
|
+
else
|
|
36704
|
+
{ break }
|
|
36705
|
+
}
|
|
36706
|
+
|
|
36707
|
+
var maybeAsyncArrow = base.type === "Identifier" && base.name === "async" && !this.canInsertSemicolon();
|
|
36708
|
+
var optional = optionalSupported && this.eat(types$1.questionDot);
|
|
36709
|
+
if (optional) {
|
|
36710
|
+
optionalChained = true;
|
|
36711
|
+
}
|
|
36712
|
+
|
|
36713
|
+
if ((optional && this.tok.type !== types$1.parenL && this.tok.type !== types$1.bracketL && this.tok.type !== types$1.backQuote) || this.eat(types$1.dot)) {
|
|
36714
|
+
var node = this.startNodeAt(start);
|
|
36715
|
+
node.object = base;
|
|
36716
|
+
if (this.curLineStart !== line && this.curIndent <= startIndent && this.tokenStartsLine())
|
|
36717
|
+
{ node.property = this.dummyIdent(); }
|
|
36718
|
+
else
|
|
36719
|
+
{ node.property = this.parsePropertyAccessor() || this.dummyIdent(); }
|
|
36720
|
+
node.computed = false;
|
|
36721
|
+
if (optionalSupported) {
|
|
36722
|
+
node.optional = optional;
|
|
36723
|
+
}
|
|
36724
|
+
base = this.finishNode(node, "MemberExpression");
|
|
36725
|
+
} else if (this.tok.type === types$1.bracketL) {
|
|
36726
|
+
this.pushCx();
|
|
36727
|
+
this.next();
|
|
36728
|
+
var node$1 = this.startNodeAt(start);
|
|
36729
|
+
node$1.object = base;
|
|
36730
|
+
node$1.property = this.parseExpression();
|
|
36731
|
+
node$1.computed = true;
|
|
36732
|
+
if (optionalSupported) {
|
|
36733
|
+
node$1.optional = optional;
|
|
36734
|
+
}
|
|
36735
|
+
this.popCx();
|
|
36736
|
+
this.expect(types$1.bracketR);
|
|
36737
|
+
base = this.finishNode(node$1, "MemberExpression");
|
|
36738
|
+
} else if (!noCalls && this.tok.type === types$1.parenL) {
|
|
36739
|
+
var exprList = this.parseExprList(types$1.parenR);
|
|
36740
|
+
if (maybeAsyncArrow && this.eat(types$1.arrow))
|
|
36741
|
+
{ return this.parseArrowExpression(this.startNodeAt(start), exprList, true) }
|
|
36742
|
+
var node$2 = this.startNodeAt(start);
|
|
36743
|
+
node$2.callee = base;
|
|
36744
|
+
node$2.arguments = exprList;
|
|
36745
|
+
if (optionalSupported) {
|
|
36746
|
+
node$2.optional = optional;
|
|
36747
|
+
}
|
|
36748
|
+
base = this.finishNode(node$2, "CallExpression");
|
|
36749
|
+
} else if (this.tok.type === types$1.backQuote) {
|
|
36750
|
+
var node$3 = this.startNodeAt(start);
|
|
36751
|
+
node$3.tag = base;
|
|
36752
|
+
node$3.quasi = this.parseTemplate();
|
|
36753
|
+
base = this.finishNode(node$3, "TaggedTemplateExpression");
|
|
36754
|
+
} else {
|
|
36755
|
+
break
|
|
36756
|
+
}
|
|
36757
|
+
}
|
|
36758
|
+
|
|
36759
|
+
if (optionalChained) {
|
|
36760
|
+
var chainNode = this.startNodeAt(start);
|
|
36761
|
+
chainNode.expression = base;
|
|
36762
|
+
base = this.finishNode(chainNode, "ChainExpression");
|
|
36763
|
+
}
|
|
36764
|
+
return base
|
|
36765
|
+
};
|
|
36766
|
+
|
|
36767
|
+
lp.parseExprAtom = function() {
|
|
36768
|
+
var node;
|
|
36769
|
+
switch (this.tok.type) {
|
|
36770
|
+
case types$1._this:
|
|
36771
|
+
case types$1._super:
|
|
36772
|
+
var type = this.tok.type === types$1._this ? "ThisExpression" : "Super";
|
|
36773
|
+
node = this.startNode();
|
|
36774
|
+
this.next();
|
|
36775
|
+
return this.finishNode(node, type)
|
|
36776
|
+
|
|
36777
|
+
case types$1.name:
|
|
36778
|
+
var start = this.storeCurrentPos();
|
|
36779
|
+
var id = this.parseIdent();
|
|
36780
|
+
var isAsync = false;
|
|
36781
|
+
if (id.name === "async" && !this.canInsertSemicolon()) {
|
|
36782
|
+
if (this.eat(types$1._function)) {
|
|
36783
|
+
this.toks.overrideContext(types.f_expr);
|
|
36784
|
+
return this.parseFunction(this.startNodeAt(start), false, true)
|
|
36785
|
+
}
|
|
36786
|
+
if (this.tok.type === types$1.name) {
|
|
36787
|
+
id = this.parseIdent();
|
|
36788
|
+
isAsync = true;
|
|
36789
|
+
}
|
|
36790
|
+
}
|
|
36791
|
+
return this.eat(types$1.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id], isAsync) : id
|
|
36792
|
+
|
|
36793
|
+
case types$1.regexp:
|
|
36794
|
+
node = this.startNode();
|
|
36795
|
+
var val = this.tok.value;
|
|
36796
|
+
node.regex = {pattern: val.pattern, flags: val.flags};
|
|
36797
|
+
node.value = val.value;
|
|
36798
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
36799
|
+
this.next();
|
|
36800
|
+
return this.finishNode(node, "Literal")
|
|
36801
|
+
|
|
36802
|
+
case types$1.num: case types$1.string:
|
|
36803
|
+
node = this.startNode();
|
|
36804
|
+
node.value = this.tok.value;
|
|
36805
|
+
node.raw = this.input.slice(this.tok.start, this.tok.end);
|
|
36806
|
+
if (this.tok.type === types$1.num && node.raw.charCodeAt(node.raw.length - 1) === 110)
|
|
36807
|
+
{ node.bigint = node.value != null ? node.value.toString() : node.raw.slice(0, -1).replace(/_/g, ""); }
|
|
36808
|
+
this.next();
|
|
36809
|
+
return this.finishNode(node, "Literal")
|
|
36810
|
+
|
|
36811
|
+
case types$1._null: case types$1._true: case types$1._false:
|
|
36812
|
+
node = this.startNode();
|
|
36813
|
+
node.value = this.tok.type === types$1._null ? null : this.tok.type === types$1._true;
|
|
36814
|
+
node.raw = this.tok.type.keyword;
|
|
36815
|
+
this.next();
|
|
36816
|
+
return this.finishNode(node, "Literal")
|
|
36817
|
+
|
|
36818
|
+
case types$1.parenL:
|
|
36819
|
+
var parenStart = this.storeCurrentPos();
|
|
36820
|
+
this.next();
|
|
36821
|
+
var inner = this.parseExpression();
|
|
36822
|
+
this.expect(types$1.parenR);
|
|
36823
|
+
if (this.eat(types$1.arrow)) {
|
|
36824
|
+
// (a,)=>a // SequenceExpression makes dummy in the last hole. Drop the dummy.
|
|
36825
|
+
var params = inner.expressions || [inner];
|
|
36826
|
+
if (params.length && isDummy(params[params.length - 1]))
|
|
36827
|
+
{ params.pop(); }
|
|
36828
|
+
return this.parseArrowExpression(this.startNodeAt(parenStart), params)
|
|
36829
|
+
}
|
|
36830
|
+
if (this.options.preserveParens) {
|
|
36831
|
+
var par = this.startNodeAt(parenStart);
|
|
36832
|
+
par.expression = inner;
|
|
36833
|
+
inner = this.finishNode(par, "ParenthesizedExpression");
|
|
36834
|
+
}
|
|
36835
|
+
return inner
|
|
36836
|
+
|
|
36837
|
+
case types$1.bracketL:
|
|
36838
|
+
node = this.startNode();
|
|
36839
|
+
node.elements = this.parseExprList(types$1.bracketR, true);
|
|
36840
|
+
return this.finishNode(node, "ArrayExpression")
|
|
36841
|
+
|
|
36842
|
+
case types$1.braceL:
|
|
36843
|
+
this.toks.overrideContext(types.b_expr);
|
|
36844
|
+
return this.parseObj()
|
|
36845
|
+
|
|
36846
|
+
case types$1._class:
|
|
36847
|
+
return this.parseClass(false)
|
|
36848
|
+
|
|
36849
|
+
case types$1._function:
|
|
36850
|
+
node = this.startNode();
|
|
36851
|
+
this.next();
|
|
36852
|
+
return this.parseFunction(node, false)
|
|
36853
|
+
|
|
36854
|
+
case types$1._new:
|
|
36855
|
+
return this.parseNew()
|
|
36856
|
+
|
|
36857
|
+
case types$1.backQuote:
|
|
36858
|
+
return this.parseTemplate()
|
|
36859
|
+
|
|
36860
|
+
case types$1._import:
|
|
36861
|
+
if (this.options.ecmaVersion >= 11) {
|
|
36862
|
+
return this.parseExprImport()
|
|
36863
|
+
} else {
|
|
36864
|
+
return this.dummyIdent()
|
|
36865
|
+
}
|
|
36866
|
+
|
|
36867
|
+
default:
|
|
36868
|
+
return this.dummyIdent()
|
|
36869
|
+
}
|
|
36870
|
+
};
|
|
36871
|
+
|
|
36872
|
+
lp.parseExprImport = function() {
|
|
36873
|
+
var node = this.startNode();
|
|
36874
|
+
var meta = this.parseIdent(true);
|
|
36875
|
+
switch (this.tok.type) {
|
|
36876
|
+
case types$1.parenL:
|
|
36877
|
+
return this.parseDynamicImport(node)
|
|
36878
|
+
case types$1.dot:
|
|
36879
|
+
node.meta = meta;
|
|
36880
|
+
return this.parseImportMeta(node)
|
|
36881
|
+
default:
|
|
36882
|
+
node.name = "import";
|
|
36883
|
+
return this.finishNode(node, "Identifier")
|
|
36884
|
+
}
|
|
36885
|
+
};
|
|
36886
|
+
|
|
36887
|
+
lp.parseDynamicImport = function(node) {
|
|
36888
|
+
var list = this.parseExprList(types$1.parenR);
|
|
36889
|
+
node.source = list[0] || this.dummyString();
|
|
36890
|
+
node.options = list[1] || null;
|
|
36891
|
+
return this.finishNode(node, "ImportExpression")
|
|
36892
|
+
};
|
|
36893
|
+
|
|
36894
|
+
lp.parseImportMeta = function(node) {
|
|
36895
|
+
this.next(); // skip '.'
|
|
36896
|
+
node.property = this.parseIdent(true);
|
|
36897
|
+
return this.finishNode(node, "MetaProperty")
|
|
36898
|
+
};
|
|
36899
|
+
|
|
36900
|
+
lp.parseNew = function() {
|
|
36901
|
+
var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;
|
|
36902
|
+
var meta = this.parseIdent(true);
|
|
36903
|
+
if (this.options.ecmaVersion >= 6 && this.eat(types$1.dot)) {
|
|
36904
|
+
node.meta = meta;
|
|
36905
|
+
node.property = this.parseIdent(true);
|
|
36906
|
+
return this.finishNode(node, "MetaProperty")
|
|
36907
|
+
}
|
|
36908
|
+
var start = this.storeCurrentPos();
|
|
36909
|
+
node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
|
|
36910
|
+
if (this.tok.type === types$1.parenL) {
|
|
36911
|
+
node.arguments = this.parseExprList(types$1.parenR);
|
|
36912
|
+
} else {
|
|
36913
|
+
node.arguments = [];
|
|
36914
|
+
}
|
|
36915
|
+
return this.finishNode(node, "NewExpression")
|
|
36916
|
+
};
|
|
36917
|
+
|
|
36918
|
+
lp.parseTemplateElement = function() {
|
|
36919
|
+
var elem = this.startNode();
|
|
36920
|
+
|
|
36921
|
+
// The loose parser accepts invalid unicode escapes even in untagged templates.
|
|
36922
|
+
if (this.tok.type === types$1.invalidTemplate) {
|
|
36923
|
+
elem.value = {
|
|
36924
|
+
raw: this.tok.value,
|
|
36925
|
+
cooked: null
|
|
36926
|
+
};
|
|
36927
|
+
} else {
|
|
36928
|
+
elem.value = {
|
|
36929
|
+
raw: this.input.slice(this.tok.start, this.tok.end).replace(/\r\n?/g, "\n"),
|
|
36930
|
+
cooked: this.tok.value
|
|
36931
|
+
};
|
|
36932
|
+
}
|
|
36933
|
+
this.next();
|
|
36934
|
+
elem.tail = this.tok.type === types$1.backQuote;
|
|
36935
|
+
return this.finishNode(elem, "TemplateElement")
|
|
36936
|
+
};
|
|
36937
|
+
|
|
36938
|
+
lp.parseTemplate = function() {
|
|
36939
|
+
var node = this.startNode();
|
|
36940
|
+
this.next();
|
|
36941
|
+
node.expressions = [];
|
|
36942
|
+
var curElt = this.parseTemplateElement();
|
|
36943
|
+
node.quasis = [curElt];
|
|
36944
|
+
while (!curElt.tail) {
|
|
36945
|
+
this.next();
|
|
36946
|
+
node.expressions.push(this.parseExpression());
|
|
36947
|
+
if (this.expect(types$1.braceR)) {
|
|
36948
|
+
curElt = this.parseTemplateElement();
|
|
36949
|
+
} else {
|
|
36950
|
+
curElt = this.startNode();
|
|
36951
|
+
curElt.value = {cooked: "", raw: ""};
|
|
36952
|
+
curElt.tail = true;
|
|
36953
|
+
this.finishNode(curElt, "TemplateElement");
|
|
36954
|
+
}
|
|
36955
|
+
node.quasis.push(curElt);
|
|
36956
|
+
}
|
|
36957
|
+
this.expect(types$1.backQuote);
|
|
36958
|
+
return this.finishNode(node, "TemplateLiteral")
|
|
36959
|
+
};
|
|
36960
|
+
|
|
36961
|
+
lp.parseObj = function() {
|
|
36962
|
+
var node = this.startNode();
|
|
36963
|
+
node.properties = [];
|
|
36964
|
+
this.pushCx();
|
|
36965
|
+
var indent = this.curIndent + 1, line = this.curLineStart;
|
|
36966
|
+
this.eat(types$1.braceL);
|
|
36967
|
+
if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart; }
|
|
36968
|
+
while (!this.closes(types$1.braceR, indent, line)) {
|
|
36969
|
+
var prop = this.startNode(), isGenerator = (void 0), isAsync = (void 0), start = (void 0);
|
|
36970
|
+
if (this.options.ecmaVersion >= 9 && this.eat(types$1.ellipsis)) {
|
|
36971
|
+
prop.argument = this.parseMaybeAssign();
|
|
36972
|
+
node.properties.push(this.finishNode(prop, "SpreadElement"));
|
|
36973
|
+
this.eat(types$1.comma);
|
|
36974
|
+
continue
|
|
36975
|
+
}
|
|
36976
|
+
if (this.options.ecmaVersion >= 6) {
|
|
36977
|
+
start = this.storeCurrentPos();
|
|
36978
|
+
prop.method = false;
|
|
36979
|
+
prop.shorthand = false;
|
|
36980
|
+
isGenerator = this.eat(types$1.star);
|
|
36981
|
+
}
|
|
36982
|
+
this.parsePropertyName(prop);
|
|
36983
|
+
if (this.toks.isAsyncProp(prop)) {
|
|
36984
|
+
isAsync = true;
|
|
36985
|
+
isGenerator = this.options.ecmaVersion >= 9 && this.eat(types$1.star);
|
|
36986
|
+
this.parsePropertyName(prop);
|
|
36987
|
+
} else {
|
|
36988
|
+
isAsync = false;
|
|
36989
|
+
}
|
|
36990
|
+
if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) { this.next(); } this.eat(types$1.comma); continue }
|
|
36991
|
+
if (this.eat(types$1.colon)) {
|
|
36992
|
+
prop.kind = "init";
|
|
36993
|
+
prop.value = this.parseMaybeAssign();
|
|
36994
|
+
} else if (this.options.ecmaVersion >= 6 && (this.tok.type === types$1.parenL || this.tok.type === types$1.braceL)) {
|
|
36995
|
+
prop.kind = "init";
|
|
36996
|
+
prop.method = true;
|
|
36997
|
+
prop.value = this.parseMethod(isGenerator, isAsync);
|
|
36998
|
+
} else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
|
|
36999
|
+
!prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
|
|
37000
|
+
(this.tok.type !== types$1.comma && this.tok.type !== types$1.braceR && this.tok.type !== types$1.eq)) {
|
|
37001
|
+
prop.kind = prop.key.name;
|
|
37002
|
+
this.parsePropertyName(prop);
|
|
37003
|
+
prop.value = this.parseMethod(false);
|
|
37004
|
+
} else {
|
|
37005
|
+
prop.kind = "init";
|
|
37006
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37007
|
+
if (this.eat(types$1.eq)) {
|
|
37008
|
+
var assign = this.startNodeAt(start);
|
|
37009
|
+
assign.operator = "=";
|
|
37010
|
+
assign.left = prop.key;
|
|
37011
|
+
assign.right = this.parseMaybeAssign();
|
|
37012
|
+
prop.value = this.finishNode(assign, "AssignmentExpression");
|
|
37013
|
+
} else {
|
|
37014
|
+
prop.value = prop.key;
|
|
37015
|
+
}
|
|
37016
|
+
} else {
|
|
37017
|
+
prop.value = this.dummyIdent();
|
|
37018
|
+
}
|
|
37019
|
+
prop.shorthand = true;
|
|
37020
|
+
}
|
|
37021
|
+
node.properties.push(this.finishNode(prop, "Property"));
|
|
37022
|
+
this.eat(types$1.comma);
|
|
37023
|
+
}
|
|
37024
|
+
this.popCx();
|
|
37025
|
+
if (!this.eat(types$1.braceR)) {
|
|
37026
|
+
// If there is no closing brace, make the node span to the start
|
|
37027
|
+
// of the next token (this is useful for Tern)
|
|
37028
|
+
this.last.end = this.tok.start;
|
|
37029
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
37030
|
+
}
|
|
37031
|
+
return this.finishNode(node, "ObjectExpression")
|
|
37032
|
+
};
|
|
37033
|
+
|
|
37034
|
+
lp.parsePropertyName = function(prop) {
|
|
37035
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37036
|
+
if (this.eat(types$1.bracketL)) {
|
|
37037
|
+
prop.computed = true;
|
|
37038
|
+
prop.key = this.parseExpression();
|
|
37039
|
+
this.expect(types$1.bracketR);
|
|
37040
|
+
return
|
|
37041
|
+
} else {
|
|
37042
|
+
prop.computed = false;
|
|
37043
|
+
}
|
|
37044
|
+
}
|
|
37045
|
+
var key = (this.tok.type === types$1.num || this.tok.type === types$1.string) ? this.parseExprAtom() : this.parseIdent();
|
|
37046
|
+
prop.key = key || this.dummyIdent();
|
|
37047
|
+
};
|
|
37048
|
+
|
|
37049
|
+
lp.parsePropertyAccessor = function() {
|
|
37050
|
+
if (this.tok.type === types$1.name || this.tok.type.keyword) { return this.parseIdent() }
|
|
37051
|
+
if (this.tok.type === types$1.privateId) { return this.parsePrivateIdent() }
|
|
37052
|
+
};
|
|
37053
|
+
|
|
37054
|
+
lp.parseIdent = function() {
|
|
37055
|
+
var name = this.tok.type === types$1.name ? this.tok.value : this.tok.type.keyword;
|
|
37056
|
+
if (!name) { return this.dummyIdent() }
|
|
37057
|
+
if (this.tok.type.keyword) { this.toks.type = types$1.name; }
|
|
37058
|
+
var node = this.startNode();
|
|
37059
|
+
this.next();
|
|
37060
|
+
node.name = name;
|
|
37061
|
+
return this.finishNode(node, "Identifier")
|
|
37062
|
+
};
|
|
37063
|
+
|
|
37064
|
+
lp.parsePrivateIdent = function() {
|
|
37065
|
+
var node = this.startNode();
|
|
37066
|
+
node.name = this.tok.value;
|
|
37067
|
+
this.next();
|
|
37068
|
+
return this.finishNode(node, "PrivateIdentifier")
|
|
37069
|
+
};
|
|
37070
|
+
|
|
37071
|
+
lp.initFunction = function(node) {
|
|
37072
|
+
node.id = null;
|
|
37073
|
+
node.params = [];
|
|
37074
|
+
if (this.options.ecmaVersion >= 6) {
|
|
37075
|
+
node.generator = false;
|
|
37076
|
+
node.expression = false;
|
|
37077
|
+
}
|
|
37078
|
+
if (this.options.ecmaVersion >= 8)
|
|
37079
|
+
{ node.async = false; }
|
|
37080
|
+
};
|
|
37081
|
+
|
|
37082
|
+
// Convert existing expression atom to assignable pattern
|
|
37083
|
+
// if possible.
|
|
37084
|
+
|
|
37085
|
+
lp.toAssignable = function(node, binding) {
|
|
37086
|
+
if (!node || node.type === "Identifier" || (node.type === "MemberExpression" && !binding)) ; else if (node.type === "ParenthesizedExpression") {
|
|
37087
|
+
this.toAssignable(node.expression, binding);
|
|
37088
|
+
} else if (this.options.ecmaVersion < 6) {
|
|
37089
|
+
return this.dummyIdent()
|
|
37090
|
+
} else if (node.type === "ObjectExpression") {
|
|
37091
|
+
node.type = "ObjectPattern";
|
|
37092
|
+
for (var i = 0, list = node.properties; i < list.length; i += 1)
|
|
37093
|
+
{
|
|
37094
|
+
var prop = list[i];
|
|
37095
|
+
|
|
37096
|
+
this.toAssignable(prop, binding);
|
|
37097
|
+
}
|
|
37098
|
+
} else if (node.type === "ArrayExpression") {
|
|
37099
|
+
node.type = "ArrayPattern";
|
|
37100
|
+
this.toAssignableList(node.elements, binding);
|
|
37101
|
+
} else if (node.type === "Property") {
|
|
37102
|
+
this.toAssignable(node.value, binding);
|
|
37103
|
+
} else if (node.type === "SpreadElement") {
|
|
37104
|
+
node.type = "RestElement";
|
|
37105
|
+
this.toAssignable(node.argument, binding);
|
|
37106
|
+
} else if (node.type === "AssignmentExpression") {
|
|
37107
|
+
node.type = "AssignmentPattern";
|
|
37108
|
+
delete node.operator;
|
|
37109
|
+
} else {
|
|
37110
|
+
return this.dummyIdent()
|
|
37111
|
+
}
|
|
37112
|
+
return node
|
|
37113
|
+
};
|
|
37114
|
+
|
|
37115
|
+
lp.toAssignableList = function(exprList, binding) {
|
|
37116
|
+
for (var i = 0, list = exprList; i < list.length; i += 1)
|
|
37117
|
+
{
|
|
37118
|
+
var expr = list[i];
|
|
37119
|
+
|
|
37120
|
+
this.toAssignable(expr, binding);
|
|
37121
|
+
}
|
|
37122
|
+
return exprList
|
|
37123
|
+
};
|
|
37124
|
+
|
|
37125
|
+
lp.parseFunctionParams = function(params) {
|
|
37126
|
+
params = this.parseExprList(types$1.parenR);
|
|
37127
|
+
return this.toAssignableList(params, true)
|
|
37128
|
+
};
|
|
37129
|
+
|
|
37130
|
+
lp.parseMethod = function(isGenerator, isAsync) {
|
|
37131
|
+
var node = this.startNode(), oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
37132
|
+
this.initFunction(node);
|
|
37133
|
+
if (this.options.ecmaVersion >= 6)
|
|
37134
|
+
{ node.generator = !!isGenerator; }
|
|
37135
|
+
if (this.options.ecmaVersion >= 8)
|
|
37136
|
+
{ node.async = !!isAsync; }
|
|
37137
|
+
this.inAsync = node.async;
|
|
37138
|
+
this.inGenerator = node.generator;
|
|
37139
|
+
this.inFunction = true;
|
|
37140
|
+
node.params = this.parseFunctionParams();
|
|
37141
|
+
node.body = this.parseBlock();
|
|
37142
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
37143
|
+
this.inAsync = oldInAsync;
|
|
37144
|
+
this.inGenerator = oldInGenerator;
|
|
37145
|
+
this.inFunction = oldInFunction;
|
|
37146
|
+
return this.finishNode(node, "FunctionExpression")
|
|
37147
|
+
};
|
|
37148
|
+
|
|
37149
|
+
lp.parseArrowExpression = function(node, params, isAsync) {
|
|
37150
|
+
var oldInAsync = this.inAsync, oldInGenerator = this.inGenerator, oldInFunction = this.inFunction;
|
|
37151
|
+
this.initFunction(node);
|
|
37152
|
+
if (this.options.ecmaVersion >= 8)
|
|
37153
|
+
{ node.async = !!isAsync; }
|
|
37154
|
+
this.inAsync = node.async;
|
|
37155
|
+
this.inGenerator = false;
|
|
37156
|
+
this.inFunction = true;
|
|
37157
|
+
node.params = this.toAssignableList(params, true);
|
|
37158
|
+
node.expression = this.tok.type !== types$1.braceL;
|
|
37159
|
+
if (node.expression) {
|
|
37160
|
+
node.body = this.parseMaybeAssign();
|
|
37161
|
+
} else {
|
|
37162
|
+
node.body = this.parseBlock();
|
|
37163
|
+
this.toks.adaptDirectivePrologue(node.body.body);
|
|
37164
|
+
}
|
|
37165
|
+
this.inAsync = oldInAsync;
|
|
37166
|
+
this.inGenerator = oldInGenerator;
|
|
37167
|
+
this.inFunction = oldInFunction;
|
|
37168
|
+
return this.finishNode(node, "ArrowFunctionExpression")
|
|
37169
|
+
};
|
|
37170
|
+
|
|
37171
|
+
lp.parseExprList = function(close, allowEmpty) {
|
|
37172
|
+
this.pushCx();
|
|
37173
|
+
var indent = this.curIndent, line = this.curLineStart, elts = [];
|
|
37174
|
+
this.next(); // Opening bracket
|
|
37175
|
+
while (!this.closes(close, indent + 1, line)) {
|
|
37176
|
+
if (this.eat(types$1.comma)) {
|
|
37177
|
+
elts.push(allowEmpty ? null : this.dummyIdent());
|
|
37178
|
+
continue
|
|
37179
|
+
}
|
|
37180
|
+
var elt = this.parseMaybeAssign();
|
|
37181
|
+
if (isDummy(elt)) {
|
|
37182
|
+
if (this.closes(close, indent, line)) { break }
|
|
37183
|
+
this.next();
|
|
37184
|
+
} else {
|
|
37185
|
+
elts.push(elt);
|
|
37186
|
+
}
|
|
37187
|
+
this.eat(types$1.comma);
|
|
37188
|
+
}
|
|
37189
|
+
this.popCx();
|
|
37190
|
+
if (!this.eat(close)) {
|
|
37191
|
+
// If there is no closing brace, make the node span to the start
|
|
37192
|
+
// of the next token (this is useful for Tern)
|
|
37193
|
+
this.last.end = this.tok.start;
|
|
37194
|
+
if (this.options.locations) { this.last.loc.end = this.tok.loc.start; }
|
|
37195
|
+
}
|
|
37196
|
+
return elts
|
|
37197
|
+
};
|
|
37198
|
+
|
|
37199
|
+
lp.parseAwait = function() {
|
|
37200
|
+
var node = this.startNode();
|
|
37201
|
+
this.next();
|
|
37202
|
+
node.argument = this.parseMaybeUnary();
|
|
37203
|
+
return this.finishNode(node, "AwaitExpression")
|
|
37204
|
+
};
|
|
37205
|
+
|
|
37206
|
+
// Acorn: Loose parser
|
|
37207
|
+
//
|
|
37208
|
+
// This module provides an alternative parser that exposes that same
|
|
37209
|
+
// interface as the main module's `parse` function, but will try to
|
|
37210
|
+
// parse anything as JavaScript, repairing syntax error the best it
|
|
37211
|
+
// can. There are circumstances in which it will raise an error and
|
|
37212
|
+
// give up, but they are very rare. The resulting AST will be a mostly
|
|
37213
|
+
// valid JavaScript AST (as per the [ESTree spec][estree], except
|
|
37214
|
+
// that:
|
|
37215
|
+
//
|
|
37216
|
+
// - Return outside functions is allowed
|
|
37217
|
+
//
|
|
37218
|
+
// - Label consistency (no conflicts, break only to existing labels)
|
|
37219
|
+
// is not enforced.
|
|
37220
|
+
//
|
|
37221
|
+
// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
|
|
37222
|
+
// the parser got too confused to return anything meaningful.
|
|
37223
|
+
//
|
|
37224
|
+
// [estree]: https://github.com/estree/estree
|
|
37225
|
+
//
|
|
37226
|
+
// The expected use for this is to *first* try `acorn.parse`, and only
|
|
37227
|
+
// if that fails switch to the loose parser. The loose parser might
|
|
37228
|
+
// parse badly indented code incorrectly, so **don't** use it as your
|
|
37229
|
+
// default parser.
|
|
37230
|
+
//
|
|
37231
|
+
// Quite a lot of acorn.js is duplicated here. The alternative was to
|
|
37232
|
+
// add a *lot* of extra cruft to that file, making it less readable
|
|
37233
|
+
// and slower. Copying and editing the code allowed me to make
|
|
37234
|
+
// invasive changes and simplifications without creating a complicated
|
|
37235
|
+
// tangle.
|
|
37236
|
+
|
|
37237
|
+
|
|
37238
|
+
defaultOptions.tabSize = 4;
|
|
37239
|
+
|
|
37240
|
+
function parse(input, options) {
|
|
37241
|
+
return LooseParser.parse(input, options)
|
|
37242
|
+
}
|
|
37243
|
+
|
|
35617
37244
|
// AST walker module for ESTree compatible trees
|
|
35618
37245
|
|
|
35619
37246
|
// A simple walk is one where you simply specify callbacks to be
|
|
@@ -35901,13 +37528,24 @@ base.MethodDefinition = base.PropertyDefinition = base.Property = function (node
|
|
|
35901
37528
|
function getAcornParsedNodes(input) {
|
|
35902
37529
|
var parsedNode = null;
|
|
35903
37530
|
try {
|
|
35904
|
-
parsedNode = parse(input, {
|
|
37531
|
+
parsedNode = parse$1(input, {
|
|
35905
37532
|
ecmaVersion: 'latest',
|
|
35906
37533
|
sourceType: 'module',
|
|
35907
37534
|
locations: true
|
|
35908
37535
|
});
|
|
35909
37536
|
}
|
|
35910
|
-
catch (_a) {
|
|
37537
|
+
catch (_a) {
|
|
37538
|
+
// attempt parse with more error-tolerant parser.
|
|
37539
|
+
// handles rules with both shared code and top-level
|
|
37540
|
+
// return, which is technically invalid syntax
|
|
37541
|
+
try {
|
|
37542
|
+
parsedNode = parse(input, {
|
|
37543
|
+
ecmaVersion: 'latest',
|
|
37544
|
+
locations: true
|
|
37545
|
+
});
|
|
37546
|
+
}
|
|
37547
|
+
catch (_b) { }
|
|
37548
|
+
}
|
|
35911
37549
|
return parsedNode;
|
|
35912
37550
|
}
|
|
35913
37551
|
function extractReferencedIdentifiers(bodyNode) {
|
|
@@ -36051,8 +37689,10 @@ function extractJsElements(code) {
|
|
|
36051
37689
|
var exportFunctions = [];
|
|
36052
37690
|
var exportVariables = [];
|
|
36053
37691
|
var parsedNodes = getAcornParsedNodes(code);
|
|
36054
|
-
if (!parsedNodes)
|
|
37692
|
+
if (!parsedNodes) {
|
|
37693
|
+
console.warn('Failed to parse logic rule code');
|
|
36055
37694
|
return { exportVariables: exportVariables, exportFunctions: exportFunctions };
|
|
37695
|
+
}
|
|
36056
37696
|
// Helper: turn a param node into its original text
|
|
36057
37697
|
var paramText = function (p) { return code.slice(p.start, p.end); };
|
|
36058
37698
|
// Helper: build function signature and body from FunctionExpression or ArrowFunctionExpression
|
|
@@ -42311,6 +43951,112 @@ function loadQRScanner() {
|
|
|
42311
43951
|
qrPromise = dynamicImport(QR_SCANNER_LIB_URL);
|
|
42312
43952
|
}
|
|
42313
43953
|
|
|
43954
|
+
/**
|
|
43955
|
+
* Event queue for holding events before user interaction
|
|
43956
|
+
*/
|
|
43957
|
+
var EventQueue = /** @class */ (function () {
|
|
43958
|
+
function EventQueue() {
|
|
43959
|
+
this.queue = [];
|
|
43960
|
+
this.isReplaying = false;
|
|
43961
|
+
}
|
|
43962
|
+
EventQueue.prototype.enqueue = function (eventData) {
|
|
43963
|
+
var _this = this;
|
|
43964
|
+
return new Promise(function (resolve, reject) {
|
|
43965
|
+
_this.queue.push({
|
|
43966
|
+
eventData: eventData,
|
|
43967
|
+
timestamp: Date.now(),
|
|
43968
|
+
resolve: resolve,
|
|
43969
|
+
reject: reject
|
|
43970
|
+
});
|
|
43971
|
+
});
|
|
43972
|
+
};
|
|
43973
|
+
EventQueue.prototype.getAll = function () {
|
|
43974
|
+
return this.queue;
|
|
43975
|
+
};
|
|
43976
|
+
EventQueue.prototype.clear = function () {
|
|
43977
|
+
this.queue = [];
|
|
43978
|
+
};
|
|
43979
|
+
EventQueue.prototype.isEmpty = function () {
|
|
43980
|
+
return this.queue.length === 0;
|
|
43981
|
+
};
|
|
43982
|
+
EventQueue.prototype.size = function () {
|
|
43983
|
+
return this.queue.length;
|
|
43984
|
+
};
|
|
43985
|
+
EventQueue.prototype.isReplayingEvents = function () {
|
|
43986
|
+
return this.isReplaying;
|
|
43987
|
+
};
|
|
43988
|
+
EventQueue.prototype.setReplayState = function (replaying) {
|
|
43989
|
+
this.isReplaying = replaying;
|
|
43990
|
+
};
|
|
43991
|
+
/**
|
|
43992
|
+
* Apply replay function to all queued events
|
|
43993
|
+
* @param replayFn Function to call for each event
|
|
43994
|
+
*/
|
|
43995
|
+
EventQueue.prototype.replayAll = function (replayFn) {
|
|
43996
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
43997
|
+
var eventsToReplay, eventsToReplay_1, eventsToReplay_1_1, queuedEvent, result, error_1, e_1_1;
|
|
43998
|
+
var e_1, _a;
|
|
43999
|
+
return __generator(this, function (_b) {
|
|
44000
|
+
switch (_b.label) {
|
|
44001
|
+
case 0:
|
|
44002
|
+
if (this.isEmpty())
|
|
44003
|
+
return [2 /*return*/];
|
|
44004
|
+
this.setReplayState(true);
|
|
44005
|
+
_b.label = 1;
|
|
44006
|
+
case 1:
|
|
44007
|
+
_b.trys.push([1, , 14, 15]);
|
|
44008
|
+
_b.label = 2;
|
|
44009
|
+
case 2:
|
|
44010
|
+
if (!!this.isEmpty()) return [3 /*break*/, 13];
|
|
44011
|
+
eventsToReplay = __spreadArray([], __read(this.queue), false);
|
|
44012
|
+
this.queue = [];
|
|
44013
|
+
_b.label = 3;
|
|
44014
|
+
case 3:
|
|
44015
|
+
_b.trys.push([3, 10, 11, 12]);
|
|
44016
|
+
eventsToReplay_1 = (e_1 = void 0, __values(eventsToReplay)), eventsToReplay_1_1 = eventsToReplay_1.next();
|
|
44017
|
+
_b.label = 4;
|
|
44018
|
+
case 4:
|
|
44019
|
+
if (!!eventsToReplay_1_1.done) return [3 /*break*/, 9];
|
|
44020
|
+
queuedEvent = eventsToReplay_1_1.value;
|
|
44021
|
+
_b.label = 5;
|
|
44022
|
+
case 5:
|
|
44023
|
+
_b.trys.push([5, 7, , 8]);
|
|
44024
|
+
return [4 /*yield*/, replayFn(queuedEvent.eventData)];
|
|
44025
|
+
case 6:
|
|
44026
|
+
result = _b.sent();
|
|
44027
|
+
queuedEvent.resolve(result);
|
|
44028
|
+
return [3 /*break*/, 8];
|
|
44029
|
+
case 7:
|
|
44030
|
+
error_1 = _b.sent();
|
|
44031
|
+
queuedEvent.reject(error_1);
|
|
44032
|
+
return [3 /*break*/, 8];
|
|
44033
|
+
case 8:
|
|
44034
|
+
eventsToReplay_1_1 = eventsToReplay_1.next();
|
|
44035
|
+
return [3 /*break*/, 4];
|
|
44036
|
+
case 9: return [3 /*break*/, 12];
|
|
44037
|
+
case 10:
|
|
44038
|
+
e_1_1 = _b.sent();
|
|
44039
|
+
e_1 = { error: e_1_1 };
|
|
44040
|
+
return [3 /*break*/, 12];
|
|
44041
|
+
case 11:
|
|
44042
|
+
try {
|
|
44043
|
+
if (eventsToReplay_1_1 && !eventsToReplay_1_1.done && (_a = eventsToReplay_1.return)) _a.call(eventsToReplay_1);
|
|
44044
|
+
}
|
|
44045
|
+
finally { if (e_1) throw e_1.error; }
|
|
44046
|
+
return [7 /*endfinally*/];
|
|
44047
|
+
case 12: return [3 /*break*/, 2];
|
|
44048
|
+
case 13: return [3 /*break*/, 15];
|
|
44049
|
+
case 14:
|
|
44050
|
+
this.setReplayState(false);
|
|
44051
|
+
return [7 /*endfinally*/];
|
|
44052
|
+
case 15: return [2 /*return*/];
|
|
44053
|
+
}
|
|
44054
|
+
});
|
|
44055
|
+
});
|
|
44056
|
+
};
|
|
44057
|
+
return EventQueue;
|
|
44058
|
+
}());
|
|
44059
|
+
|
|
42314
44060
|
var API_URL_OPTIONS = {
|
|
42315
44061
|
local: 'http://localhost:8006/api/',
|
|
42316
44062
|
staging: 'https://staging.feathery.io/api/',
|
|
@@ -42385,6 +44131,10 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
42385
44131
|
var _this = this;
|
|
42386
44132
|
var _a, _b;
|
|
42387
44133
|
_this = _super.call(this, formKey, ignoreNetworkErrors, draft, bypassCDN) || this;
|
|
44134
|
+
/**
|
|
44135
|
+
* Queue for events triggered before user interaction
|
|
44136
|
+
*/
|
|
44137
|
+
_this.userEventQueue = new EventQueue();
|
|
42388
44138
|
/**
|
|
42389
44139
|
* `beforeunload` event handler that flushes the pending submit custom changes
|
|
42390
44140
|
* when a user is attempting to exit the page.
|
|
@@ -42420,8 +44170,39 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
42420
44170
|
var _a, _b;
|
|
42421
44171
|
return __awaiter$2(this, void 0, void 0, function () {
|
|
42422
44172
|
return __generator(this, function (_c) {
|
|
42423
|
-
|
|
42424
|
-
|
|
44173
|
+
switch (_c.label) {
|
|
44174
|
+
case 0:
|
|
44175
|
+
(_b = (_a = featheryWindow()).removeEventListener) === null || _b === void 0 ? void 0 : _b.call(_a, FEATHERY_INTERACTION_EVENT, this.handleInteraction);
|
|
44176
|
+
// replay queued events, then flush fields
|
|
44177
|
+
return [4 /*yield*/, this.replayQueuedEvents()];
|
|
44178
|
+
case 1:
|
|
44179
|
+
// replay queued events, then flush fields
|
|
44180
|
+
_c.sent();
|
|
44181
|
+
return [4 /*yield*/, this.submitCustom({}, { shouldFlush: true })];
|
|
44182
|
+
case 2:
|
|
44183
|
+
_c.sent();
|
|
44184
|
+
return [2 /*return*/];
|
|
44185
|
+
}
|
|
44186
|
+
});
|
|
44187
|
+
});
|
|
44188
|
+
};
|
|
44189
|
+
FeatheryClient.prototype.replayQueuedEvents = function () {
|
|
44190
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
44191
|
+
var _this = this;
|
|
44192
|
+
return __generator(this, function (_a) {
|
|
44193
|
+
switch (_a.label) {
|
|
44194
|
+
case 0:
|
|
44195
|
+
if (this.userEventQueue.isEmpty())
|
|
44196
|
+
return [2 /*return*/];
|
|
44197
|
+
return [4 /*yield*/, this.userEventQueue.replayAll(function (eventData) { return __awaiter$2(_this, void 0, void 0, function () {
|
|
44198
|
+
return __generator(this, function (_a) {
|
|
44199
|
+
return [2 /*return*/, this._registerEventInternal(eventData)];
|
|
44200
|
+
});
|
|
44201
|
+
}); })];
|
|
44202
|
+
case 1:
|
|
44203
|
+
_a.sent();
|
|
44204
|
+
return [2 /*return*/];
|
|
44205
|
+
}
|
|
42425
44206
|
});
|
|
42426
44207
|
});
|
|
42427
44208
|
};
|
|
@@ -43112,15 +44893,24 @@ var FeatheryClient = /** @class */ (function (_super) {
|
|
|
43112
44893
|
});
|
|
43113
44894
|
};
|
|
43114
44895
|
FeatheryClient.prototype.registerEvent = function (eventData) {
|
|
44896
|
+
return __awaiter$2(this, void 0, void 0, function () {
|
|
44897
|
+
return __generator(this, function (_a) {
|
|
44898
|
+
if (this.draft)
|
|
44899
|
+
return [2 /*return*/];
|
|
44900
|
+
if (!isInteractionDetected() || this.userEventQueue.isReplayingEvents()) {
|
|
44901
|
+
return [2 /*return*/, this.userEventQueue.enqueue(eventData)];
|
|
44902
|
+
}
|
|
44903
|
+
return [2 /*return*/, this._registerEventInternal(eventData)];
|
|
44904
|
+
});
|
|
44905
|
+
});
|
|
44906
|
+
};
|
|
44907
|
+
FeatheryClient.prototype._registerEventInternal = function (eventData) {
|
|
43115
44908
|
return __awaiter$2(this, void 0, void 0, function () {
|
|
43116
44909
|
var _a, userId, collaboratorId, url, data, options, prom, stepKey, triggerEvent, eventPromise;
|
|
43117
44910
|
var _this = this;
|
|
43118
44911
|
return __generator(this, function (_b) {
|
|
43119
44912
|
switch (_b.label) {
|
|
43120
|
-
case 0:
|
|
43121
|
-
if (this.draft)
|
|
43122
|
-
return [2 /*return*/];
|
|
43123
|
-
return [4 /*yield*/, initFormsPromise];
|
|
44913
|
+
case 0: return [4 /*yield*/, initFormsPromise];
|
|
43124
44914
|
case 1:
|
|
43125
44915
|
_b.sent();
|
|
43126
44916
|
_a = initInfo(), userId = _a.userId, collaboratorId = _a.collaboratorId;
|
|
@@ -43632,9 +45422,9 @@ function init(sdkKey, options) {
|
|
|
43632
45422
|
if (runningInClient()) {
|
|
43633
45423
|
// Dynamically load libraries that must be client side
|
|
43634
45424
|
global.scriptjsLoadPromise = import(
|
|
43635
|
-
/* webpackChunkName: "scriptjs" */ './fthry_script.
|
|
45425
|
+
/* webpackChunkName: "scriptjs" */ './fthry_script.C5O1ZNQQ.js').then(function (n) { return n.s; });
|
|
43636
45426
|
global.webfontloaderPromise = import(
|
|
43637
|
-
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.
|
|
45427
|
+
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.DAANkO2-.js').then(function (n) { return n.w; });
|
|
43638
45428
|
// Client-side tracking logic
|
|
43639
45429
|
if (initState.userTracking === 'cookie') {
|
|
43640
45430
|
var cookieKey = "feathery-user-id-".concat(sdkKey);
|
|
@@ -43780,7 +45570,7 @@ function getFieldValues() {
|
|
|
43780
45570
|
return __assign({}, fieldValues);
|
|
43781
45571
|
}
|
|
43782
45572
|
function logFeatheryBadge() {
|
|
43783
|
-
console.log('%c Feathery %c v' + "2.15.
|
|
45573
|
+
console.log('%c Feathery %c v' + "2.15.1" + ' ', // replaced with real version during build
|
|
43784
45574
|
'background: #e2626e; color: white; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;', 'background: #fce7e9; color: #c5495a; padding: 2px 6px; border-radius: 0 3px 3px 0;');
|
|
43785
45575
|
}
|
|
43786
45576
|
|
|
@@ -45258,39 +47048,39 @@ breakpoint) {
|
|
|
45258
47048
|
return styles.getTarget('inner-container', undefined, viewport === 'mobile');
|
|
45259
47049
|
};
|
|
45260
47050
|
|
|
45261
|
-
var AddressLine1 = lazy(function () { return import(/* webpackChunkName: "AddressField" */ './fthry_index.
|
|
45262
|
-
var ButtonGroupField = lazy(function () { return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.
|
|
45263
|
-
var CheckboxField = lazy(function () { return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.
|
|
47051
|
+
var AddressLine1 = lazy(function () { return import(/* webpackChunkName: "AddressField" */ './fthry_index.BEZmvsoo.js'); });
|
|
47052
|
+
var ButtonGroupField = lazy(function () { return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.m7CZv4YY.js'); });
|
|
47053
|
+
var CheckboxField = lazy(function () { return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.Dy4nSWZa.js'); });
|
|
45264
47054
|
var CheckboxGroupField = lazy(function () {
|
|
45265
|
-
return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.
|
|
47055
|
+
return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.t4v0qqgv.js');
|
|
45266
47056
|
});
|
|
45267
|
-
var ColorPickerField = lazy(function () { return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.
|
|
45268
|
-
var CustomField = lazy(function () { return import(/* webpackChunkName: "CustomField" */ './fthry_index.
|
|
47057
|
+
var ColorPickerField = lazy(function () { return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.D9VjMJ_U.js'); });
|
|
47058
|
+
var CustomField = lazy(function () { return import(/* webpackChunkName: "CustomField" */ './fthry_index.Bz07r-AM.js'); });
|
|
45269
47059
|
var DateSelectorField = lazy(function () {
|
|
45270
|
-
return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.
|
|
47060
|
+
return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.NOuMR_hq.js');
|
|
45271
47061
|
});
|
|
45272
|
-
var DropdownField = lazy(function () { return import(/* webpackChunkName: "DropdownField" */ './fthry_index.
|
|
47062
|
+
var DropdownField = lazy(function () { return import(/* webpackChunkName: "DropdownField" */ './fthry_index.B7VWXvgC.js'); });
|
|
45273
47063
|
var DropdownMultiField = lazy(function () {
|
|
45274
|
-
return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.
|
|
47064
|
+
return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.DhU16s57.js');
|
|
45275
47065
|
});
|
|
45276
|
-
var FileUploadField = lazy(function () { return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.
|
|
45277
|
-
var MatrixField = lazy(function () { return import(/* webpackChunkName: "MatrixField" */ './fthry_index.
|
|
45278
|
-
var PasswordField = lazy(function () { return import(/* webpackChunkName: "PasswordField" */ './fthry_index.
|
|
47066
|
+
var FileUploadField = lazy(function () { return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.B84L3MVC.js'); });
|
|
47067
|
+
var MatrixField = lazy(function () { return import(/* webpackChunkName: "MatrixField" */ './fthry_index.DH2fsNWG.js'); });
|
|
47068
|
+
var PasswordField = lazy(function () { return import(/* webpackChunkName: "PasswordField" */ './fthry_index.Fs86Fy9Y.js'); });
|
|
45279
47069
|
var PaymentMethodField = lazy(function () {
|
|
45280
|
-
return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.
|
|
47070
|
+
return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.BpA_xhqt.js');
|
|
45281
47071
|
});
|
|
45282
|
-
var PhoneField = lazy(function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.
|
|
45283
|
-
var PinInputField = lazy(function () { return import(/* webpackChunkName: "PinInputField" */ './fthry_index.
|
|
45284
|
-
var QRScanner = lazy(function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.
|
|
47072
|
+
var PhoneField = lazy(function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.BsNCOSBE.js'); });
|
|
47073
|
+
var PinInputField = lazy(function () { return import(/* webpackChunkName: "PinInputField" */ './fthry_index.D9AKkBzu.js'); });
|
|
47074
|
+
var QRScanner = lazy(function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.B-oHlMGi.js'); });
|
|
45285
47075
|
var RadioButtonGroupField = lazy(function () {
|
|
45286
47076
|
return import(
|
|
45287
|
-
/* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.
|
|
47077
|
+
/* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.Dgmpm9wy.js');
|
|
45288
47078
|
});
|
|
45289
|
-
var RatingField = lazy(function () { return import(/* webpackChunkName: "RatingField" */ './fthry_index.
|
|
45290
|
-
var SignatureField = lazy(function () { return import(/* webpackChunkName: "SignatureField" */ './fthry_index.
|
|
45291
|
-
var SliderField = lazy(function () { return import(/* webpackChunkName: "SliderField" */ './fthry_index.
|
|
45292
|
-
var TextField = lazy(function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.
|
|
45293
|
-
var TextArea = lazy(function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.
|
|
47079
|
+
var RatingField = lazy(function () { return import(/* webpackChunkName: "RatingField" */ './fthry_index.DoP7RwIP.js'); });
|
|
47080
|
+
var SignatureField = lazy(function () { return import(/* webpackChunkName: "SignatureField" */ './fthry_index.CJKGRCG-.js'); });
|
|
47081
|
+
var SliderField = lazy(function () { return import(/* webpackChunkName: "SliderField" */ './fthry_index.BSEfDQAc.js'); });
|
|
47082
|
+
var TextField = lazy(function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.BsEfTy-x.js'); });
|
|
47083
|
+
var TextArea = lazy(function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.BzrcCLzO.js'); });
|
|
45294
47084
|
var Fields = {
|
|
45295
47085
|
AddressLine1: AddressLine1,
|
|
45296
47086
|
ButtonGroupField: ButtonGroupField,
|
|
@@ -46230,7 +48020,7 @@ function ElementSkeleton(_a) {
|
|
|
46230
48020
|
}
|
|
46231
48021
|
var templateObject_1;
|
|
46232
48022
|
|
|
46233
|
-
var TableElement = lazy(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.
|
|
48023
|
+
var TableElement = lazy(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.BAhh3Pz6.js'); });
|
|
46234
48024
|
var Basic = {
|
|
46235
48025
|
ImageElement: ImageElement,
|
|
46236
48026
|
VideoElement: VideoElement,
|