@oomol-lab/open-flow 0.1.0-beta.3 → 0.1.0-beta.4
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/dist/browser/DesignerIcon-DdfuH2jW.js +2066 -0
- package/dist/browser/createResourceDialog-4YQKl8lG.js +505 -0
- package/dist/browser/{esm-C2UUqIUP.js → esm-C9jQK70n.js} +1 -1
- package/dist/browser/flow-authoring-node.d.ts +3 -0
- package/dist/browser/flow-authoring.d.ts +1 -1
- package/dist/browser/flow-authoring.js +66 -46
- package/dist/browser/flow-change.d.ts +14 -1
- package/dist/browser/flow-notifications.d.ts +5 -0
- package/dist/browser/{diagnostics-SDCyFuxm.js → flowChanges-Bs-ZcJV8.js} +3963 -3591
- package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-BYa8zFLC.js} +1 -1
- package/dist/browser/{flowWorkspace-BZ_eiQNR.js → flowWorkspace-BewofPeU.js} +35223 -35041
- package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-qDxSDwzN.js} +1813 -2328
- package/dist/browser/icons-DRoMXL5h.js +521 -0
- package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-CwMPjseS.js} +1 -1
- package/dist/browser/waitNotificationInputs-DtrPBwA1.js +26 -0
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +1 -0
- package/dist/browser/workbench.js +611 -536
- package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-CX8KtT7L.js} +483 -482
- package/dist/common/control-api-conformance.d.ts +1 -0
- package/dist/common/control-api-conformance.js +59 -0
- package/dist/common/control-api-errors.d.ts +4 -0
- package/dist/common/control-api.d.ts +22 -3
- package/dist/common/control-api.js +134 -73
- package/dist/common/flow-encoding.js +20 -8
- package/dist/common/flow-notifications.d.ts +5 -0
- package/dist/common/flow-semantics.d.ts +1 -0
- package/dist/common/flow-semantics.js +467 -381
- package/dist/common/run-events.js +2 -1
- package/dist/common/run-lifecycle.d.ts +17 -2
- package/dist/common/run-lifecycle.js +53 -2
- package/dist/common/scheduler.d.ts +64 -3
- package/dist/common/scheduler.js +417 -142
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/browser/createResourceDialog-BkZns-oZ.js +0 -504
|
@@ -518,7 +518,7 @@ var re = (t) => class extends t {
|
|
|
518
518
|
resetEndLocation(e, t = this.state.lastTokEndLoc) {
|
|
519
519
|
super.resetEndLocation(e, t), ne(e);
|
|
520
520
|
}
|
|
521
|
-
}, _ = !0, v = !0, ie = !0, ae = !0,
|
|
521
|
+
}, _ = !0, v = !0, ie = !0, ae = !0, y = !0, oe = !0, se = class {
|
|
522
522
|
label;
|
|
523
523
|
keyword;
|
|
524
524
|
beforeExpr;
|
|
@@ -532,302 +532,302 @@ var re = (t) => class extends t {
|
|
|
532
532
|
constructor(e, t = {}) {
|
|
533
533
|
this.label = e, this.keyword = t.keyword, this.beforeExpr = !!t.beforeExpr, this.startsExpr = !!t.startsExpr, this.rightAssociative = !!t.rightAssociative, this.isLoop = !!t.isLoop, this.isAssign = !!t.isAssign, this.prefix = !!t.prefix, this.postfix = !!t.postfix, this.binop = t.binop == null ? null : t.binop;
|
|
534
534
|
}
|
|
535
|
-
},
|
|
536
|
-
function
|
|
535
|
+
}, ce = /* @__PURE__ */ new Map();
|
|
536
|
+
function b(e, t = {}) {
|
|
537
537
|
t.keyword = e;
|
|
538
|
-
let n =
|
|
539
|
-
return
|
|
538
|
+
let n = S(e, t);
|
|
539
|
+
return ce.set(e, n), n;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
542
|
-
return
|
|
541
|
+
function x(e, t) {
|
|
542
|
+
return S(e, {
|
|
543
543
|
beforeExpr: _,
|
|
544
544
|
binop: t
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
var
|
|
548
|
-
function x(e, t = {}) {
|
|
549
|
-
return ++ue, fe.push(e), pe.push(t.binop ?? -1), me.push(t.beforeExpr ?? !1), he.push(t.startsExpr ?? !1), ge.push(t.prefix ?? !1), de.push(new ce(e, t)), ue;
|
|
550
|
-
}
|
|
547
|
+
var le = -1, ue = [], de = [], fe = [], pe = [], me = [], he = [];
|
|
551
548
|
function S(e, t = {}) {
|
|
552
|
-
return ++
|
|
549
|
+
return ++le, de.push(e), fe.push(t.binop ?? -1), pe.push(t.beforeExpr ?? !1), me.push(t.startsExpr ?? !1), he.push(t.prefix ?? !1), ue.push(new se(e, t)), le;
|
|
550
|
+
}
|
|
551
|
+
function C(e, t = {}) {
|
|
552
|
+
return ++le, ce.set(e, le), de.push(e), fe.push(t.binop ?? -1), pe.push(t.beforeExpr ?? !1), me.push(t.startsExpr ?? !1), he.push(t.prefix ?? !1), ue.push(new se("name", t)), le;
|
|
553
553
|
}
|
|
554
|
-
var
|
|
555
|
-
bracketL:
|
|
554
|
+
var ge = {
|
|
555
|
+
bracketL: S("[", {
|
|
556
556
|
beforeExpr: _,
|
|
557
557
|
startsExpr: v
|
|
558
558
|
}),
|
|
559
|
-
bracketR:
|
|
560
|
-
braceL:
|
|
559
|
+
bracketR: S("]"),
|
|
560
|
+
braceL: S("{", {
|
|
561
561
|
beforeExpr: _,
|
|
562
562
|
startsExpr: v
|
|
563
563
|
}),
|
|
564
|
-
braceBarL:
|
|
564
|
+
braceBarL: S("{|", {
|
|
565
565
|
beforeExpr: _,
|
|
566
566
|
startsExpr: v
|
|
567
567
|
}),
|
|
568
|
-
braceR:
|
|
569
|
-
braceBarR:
|
|
570
|
-
parenL:
|
|
568
|
+
braceR: S("}"),
|
|
569
|
+
braceBarR: S("|}"),
|
|
570
|
+
parenL: S("(", {
|
|
571
571
|
beforeExpr: _,
|
|
572
572
|
startsExpr: v
|
|
573
573
|
}),
|
|
574
|
-
parenR:
|
|
575
|
-
comma:
|
|
576
|
-
semi:
|
|
577
|
-
colon:
|
|
578
|
-
doubleColon:
|
|
579
|
-
dot:
|
|
580
|
-
question:
|
|
581
|
-
questionDot:
|
|
582
|
-
arrow:
|
|
583
|
-
template:
|
|
584
|
-
ellipsis:
|
|
585
|
-
backQuote:
|
|
586
|
-
dollarBraceL:
|
|
574
|
+
parenR: S(")"),
|
|
575
|
+
comma: S(",", { beforeExpr: _ }),
|
|
576
|
+
semi: S(";", { beforeExpr: _ }),
|
|
577
|
+
colon: S(":", { beforeExpr: _ }),
|
|
578
|
+
doubleColon: S("::", { beforeExpr: _ }),
|
|
579
|
+
dot: S("."),
|
|
580
|
+
question: S("?", { beforeExpr: _ }),
|
|
581
|
+
questionDot: S("?."),
|
|
582
|
+
arrow: S("=>", { beforeExpr: _ }),
|
|
583
|
+
template: S("template"),
|
|
584
|
+
ellipsis: S("...", { beforeExpr: _ }),
|
|
585
|
+
backQuote: S("`", { startsExpr: v }),
|
|
586
|
+
dollarBraceL: S("${", {
|
|
587
587
|
beforeExpr: _,
|
|
588
588
|
startsExpr: v
|
|
589
589
|
}),
|
|
590
|
-
templateTail:
|
|
591
|
-
templateNonTail:
|
|
590
|
+
templateTail: S("...`", { startsExpr: v }),
|
|
591
|
+
templateNonTail: S("...${", {
|
|
592
592
|
beforeExpr: _,
|
|
593
593
|
startsExpr: v
|
|
594
594
|
}),
|
|
595
|
-
at:
|
|
596
|
-
hash:
|
|
597
|
-
interpreterDirective:
|
|
598
|
-
eq:
|
|
595
|
+
at: S("@"),
|
|
596
|
+
hash: S("#", { startsExpr: v }),
|
|
597
|
+
interpreterDirective: S("#!..."),
|
|
598
|
+
eq: S("=", {
|
|
599
599
|
beforeExpr: _,
|
|
600
600
|
isAssign: ae
|
|
601
601
|
}),
|
|
602
|
-
assign:
|
|
602
|
+
assign: S("_=", {
|
|
603
603
|
beforeExpr: _,
|
|
604
604
|
isAssign: ae
|
|
605
605
|
}),
|
|
606
|
-
slashAssign:
|
|
606
|
+
slashAssign: S("_=", {
|
|
607
607
|
beforeExpr: _,
|
|
608
608
|
isAssign: ae
|
|
609
609
|
}),
|
|
610
|
-
xorAssign:
|
|
610
|
+
xorAssign: S("_=", {
|
|
611
611
|
beforeExpr: _,
|
|
612
612
|
isAssign: ae
|
|
613
613
|
}),
|
|
614
|
-
moduloAssign:
|
|
614
|
+
moduloAssign: S("_=", {
|
|
615
615
|
beforeExpr: _,
|
|
616
616
|
isAssign: ae
|
|
617
617
|
}),
|
|
618
|
-
incDec:
|
|
619
|
-
prefix:
|
|
620
|
-
postfix:
|
|
618
|
+
incDec: S("++/--", {
|
|
619
|
+
prefix: y,
|
|
620
|
+
postfix: oe,
|
|
621
621
|
startsExpr: v
|
|
622
622
|
}),
|
|
623
|
-
bang:
|
|
623
|
+
bang: S("!", {
|
|
624
624
|
beforeExpr: _,
|
|
625
|
-
prefix:
|
|
625
|
+
prefix: y,
|
|
626
626
|
startsExpr: v
|
|
627
627
|
}),
|
|
628
|
-
tilde:
|
|
628
|
+
tilde: S("~", {
|
|
629
629
|
beforeExpr: _,
|
|
630
|
-
prefix:
|
|
630
|
+
prefix: y,
|
|
631
631
|
startsExpr: v
|
|
632
632
|
}),
|
|
633
|
-
doubleCaret:
|
|
634
|
-
doubleAt:
|
|
635
|
-
pipeline:
|
|
636
|
-
nullishCoalescing:
|
|
637
|
-
logicalOR:
|
|
638
|
-
logicalAND:
|
|
639
|
-
bitwiseOR:
|
|
640
|
-
bitwiseXOR:
|
|
641
|
-
bitwiseAND:
|
|
642
|
-
equality:
|
|
643
|
-
lt:
|
|
644
|
-
gt:
|
|
645
|
-
relational:
|
|
646
|
-
bitShift:
|
|
647
|
-
bitShiftL:
|
|
648
|
-
bitShiftR:
|
|
649
|
-
plusMin:
|
|
633
|
+
doubleCaret: S("^^", { startsExpr: v }),
|
|
634
|
+
doubleAt: S("@@", { startsExpr: v }),
|
|
635
|
+
pipeline: x("|>", 0),
|
|
636
|
+
nullishCoalescing: x("??", 1),
|
|
637
|
+
logicalOR: x("||", 1),
|
|
638
|
+
logicalAND: x("&&", 2),
|
|
639
|
+
bitwiseOR: x("|", 3),
|
|
640
|
+
bitwiseXOR: x("^", 4),
|
|
641
|
+
bitwiseAND: x("&", 5),
|
|
642
|
+
equality: x("==/!=/===/!==", 6),
|
|
643
|
+
lt: x("</>/<=/>=", 7),
|
|
644
|
+
gt: x("</>/<=/>=", 7),
|
|
645
|
+
relational: x("</>/<=/>=", 7),
|
|
646
|
+
bitShift: x("<</>>/>>>", 8),
|
|
647
|
+
bitShiftL: x("<</>>/>>>", 8),
|
|
648
|
+
bitShiftR: x("<</>>/>>>", 8),
|
|
649
|
+
plusMin: S("+/-", {
|
|
650
650
|
beforeExpr: _,
|
|
651
651
|
binop: 9,
|
|
652
|
-
prefix:
|
|
652
|
+
prefix: y,
|
|
653
653
|
startsExpr: v
|
|
654
654
|
}),
|
|
655
|
-
modulo:
|
|
655
|
+
modulo: S("%", {
|
|
656
656
|
binop: 10,
|
|
657
657
|
startsExpr: v
|
|
658
658
|
}),
|
|
659
|
-
star:
|
|
660
|
-
slash:
|
|
661
|
-
exponent:
|
|
659
|
+
star: S("*", { binop: 10 }),
|
|
660
|
+
slash: x("/", 10),
|
|
661
|
+
exponent: S("**", {
|
|
662
662
|
beforeExpr: _,
|
|
663
663
|
binop: 11,
|
|
664
664
|
rightAssociative: !0
|
|
665
665
|
}),
|
|
666
|
-
_in:
|
|
666
|
+
_in: b("in", {
|
|
667
667
|
beforeExpr: _,
|
|
668
668
|
binop: 7
|
|
669
669
|
}),
|
|
670
|
-
_instanceof:
|
|
670
|
+
_instanceof: b("instanceof", {
|
|
671
671
|
beforeExpr: _,
|
|
672
672
|
binop: 7
|
|
673
673
|
}),
|
|
674
|
-
_break:
|
|
675
|
-
_case:
|
|
676
|
-
_catch:
|
|
677
|
-
_continue:
|
|
678
|
-
_debugger:
|
|
679
|
-
_default:
|
|
680
|
-
_else:
|
|
681
|
-
_finally:
|
|
682
|
-
_function:
|
|
683
|
-
_if:
|
|
684
|
-
_return:
|
|
685
|
-
_switch:
|
|
686
|
-
_throw:
|
|
674
|
+
_break: b("break"),
|
|
675
|
+
_case: b("case", { beforeExpr: _ }),
|
|
676
|
+
_catch: b("catch"),
|
|
677
|
+
_continue: b("continue"),
|
|
678
|
+
_debugger: b("debugger"),
|
|
679
|
+
_default: b("default", { beforeExpr: _ }),
|
|
680
|
+
_else: b("else", { beforeExpr: _ }),
|
|
681
|
+
_finally: b("finally"),
|
|
682
|
+
_function: b("function", { startsExpr: v }),
|
|
683
|
+
_if: b("if"),
|
|
684
|
+
_return: b("return", { beforeExpr: _ }),
|
|
685
|
+
_switch: b("switch"),
|
|
686
|
+
_throw: b("throw", {
|
|
687
687
|
beforeExpr: _,
|
|
688
|
-
prefix:
|
|
688
|
+
prefix: y,
|
|
689
689
|
startsExpr: v
|
|
690
690
|
}),
|
|
691
|
-
_try:
|
|
692
|
-
_var:
|
|
693
|
-
_const:
|
|
694
|
-
_with:
|
|
695
|
-
_new:
|
|
691
|
+
_try: b("try"),
|
|
692
|
+
_var: b("var"),
|
|
693
|
+
_const: b("const"),
|
|
694
|
+
_with: b("with"),
|
|
695
|
+
_new: b("new", {
|
|
696
696
|
beforeExpr: _,
|
|
697
697
|
startsExpr: v
|
|
698
698
|
}),
|
|
699
|
-
_this:
|
|
700
|
-
_super:
|
|
701
|
-
_class:
|
|
702
|
-
_extends:
|
|
703
|
-
_export:
|
|
704
|
-
_import:
|
|
705
|
-
_null:
|
|
706
|
-
_true:
|
|
707
|
-
_false:
|
|
708
|
-
_typeof:
|
|
699
|
+
_this: b("this", { startsExpr: v }),
|
|
700
|
+
_super: b("super", { startsExpr: v }),
|
|
701
|
+
_class: b("class", { startsExpr: v }),
|
|
702
|
+
_extends: b("extends", { beforeExpr: _ }),
|
|
703
|
+
_export: b("export"),
|
|
704
|
+
_import: b("import", { startsExpr: v }),
|
|
705
|
+
_null: b("null", { startsExpr: v }),
|
|
706
|
+
_true: b("true", { startsExpr: v }),
|
|
707
|
+
_false: b("false", { startsExpr: v }),
|
|
708
|
+
_typeof: b("typeof", {
|
|
709
709
|
beforeExpr: _,
|
|
710
|
-
prefix:
|
|
710
|
+
prefix: y,
|
|
711
711
|
startsExpr: v
|
|
712
712
|
}),
|
|
713
|
-
_void:
|
|
713
|
+
_void: b("void", {
|
|
714
714
|
beforeExpr: _,
|
|
715
|
-
prefix:
|
|
715
|
+
prefix: y,
|
|
716
716
|
startsExpr: v
|
|
717
717
|
}),
|
|
718
|
-
_delete:
|
|
718
|
+
_delete: b("delete", {
|
|
719
719
|
beforeExpr: _,
|
|
720
|
-
prefix:
|
|
720
|
+
prefix: y,
|
|
721
721
|
startsExpr: v
|
|
722
722
|
}),
|
|
723
|
-
_do:
|
|
723
|
+
_do: b("do", {
|
|
724
724
|
isLoop: ie,
|
|
725
725
|
beforeExpr: _
|
|
726
726
|
}),
|
|
727
|
-
_for:
|
|
728
|
-
_while:
|
|
729
|
-
_as:
|
|
730
|
-
_assert:
|
|
731
|
-
_async:
|
|
732
|
-
_await:
|
|
733
|
-
_defer:
|
|
734
|
-
_from:
|
|
735
|
-
_get:
|
|
736
|
-
_let:
|
|
737
|
-
_meta:
|
|
738
|
-
_of:
|
|
739
|
-
_sent:
|
|
740
|
-
_set:
|
|
741
|
-
_source:
|
|
742
|
-
_static:
|
|
743
|
-
_using:
|
|
744
|
-
_yield:
|
|
745
|
-
_asserts:
|
|
746
|
-
_checks:
|
|
747
|
-
_exports:
|
|
748
|
-
_global:
|
|
749
|
-
_implements:
|
|
750
|
-
_intrinsic:
|
|
751
|
-
_infer:
|
|
752
|
-
_is:
|
|
753
|
-
_mixins:
|
|
754
|
-
_proto:
|
|
755
|
-
_require:
|
|
756
|
-
_satisfies:
|
|
757
|
-
_keyof:
|
|
758
|
-
_readonly:
|
|
759
|
-
_unique:
|
|
760
|
-
_abstract:
|
|
761
|
-
_declare:
|
|
762
|
-
_enum:
|
|
763
|
-
_module:
|
|
764
|
-
_namespace:
|
|
765
|
-
_interface:
|
|
766
|
-
_type:
|
|
767
|
-
_opaque:
|
|
768
|
-
name:
|
|
769
|
-
placeholder:
|
|
770
|
-
string:
|
|
771
|
-
num:
|
|
772
|
-
bigint:
|
|
773
|
-
regexp:
|
|
774
|
-
privateName:
|
|
775
|
-
eof:
|
|
776
|
-
jsxName:
|
|
777
|
-
jsxText:
|
|
778
|
-
jsxTagStart:
|
|
779
|
-
jsxTagEnd:
|
|
727
|
+
_for: b("for", { isLoop: ie }),
|
|
728
|
+
_while: b("while", { isLoop: ie }),
|
|
729
|
+
_as: C("as", { startsExpr: v }),
|
|
730
|
+
_assert: C("assert", { startsExpr: v }),
|
|
731
|
+
_async: C("async", { startsExpr: v }),
|
|
732
|
+
_await: C("await", { startsExpr: v }),
|
|
733
|
+
_defer: C("defer", { startsExpr: v }),
|
|
734
|
+
_from: C("from", { startsExpr: v }),
|
|
735
|
+
_get: C("get", { startsExpr: v }),
|
|
736
|
+
_let: C("let", { startsExpr: v }),
|
|
737
|
+
_meta: C("meta", { startsExpr: v }),
|
|
738
|
+
_of: C("of", { startsExpr: v }),
|
|
739
|
+
_sent: C("sent", { startsExpr: v }),
|
|
740
|
+
_set: C("set", { startsExpr: v }),
|
|
741
|
+
_source: C("source", { startsExpr: v }),
|
|
742
|
+
_static: C("static", { startsExpr: v }),
|
|
743
|
+
_using: C("using", { startsExpr: v }),
|
|
744
|
+
_yield: C("yield", { startsExpr: v }),
|
|
745
|
+
_asserts: C("asserts", { startsExpr: v }),
|
|
746
|
+
_checks: C("checks", { startsExpr: v }),
|
|
747
|
+
_exports: C("exports", { startsExpr: v }),
|
|
748
|
+
_global: C("global", { startsExpr: v }),
|
|
749
|
+
_implements: C("implements", { startsExpr: v }),
|
|
750
|
+
_intrinsic: C("intrinsic", { startsExpr: v }),
|
|
751
|
+
_infer: C("infer", { startsExpr: v }),
|
|
752
|
+
_is: C("is", { startsExpr: v }),
|
|
753
|
+
_mixins: C("mixins", { startsExpr: v }),
|
|
754
|
+
_proto: C("proto", { startsExpr: v }),
|
|
755
|
+
_require: C("require", { startsExpr: v }),
|
|
756
|
+
_satisfies: C("satisfies", { startsExpr: v }),
|
|
757
|
+
_keyof: C("keyof", { startsExpr: v }),
|
|
758
|
+
_readonly: C("readonly", { startsExpr: v }),
|
|
759
|
+
_unique: C("unique", { startsExpr: v }),
|
|
760
|
+
_abstract: C("abstract", { startsExpr: v }),
|
|
761
|
+
_declare: C("declare", { startsExpr: v }),
|
|
762
|
+
_enum: C("enum", { startsExpr: v }),
|
|
763
|
+
_module: C("module", { startsExpr: v }),
|
|
764
|
+
_namespace: C("namespace", { startsExpr: v }),
|
|
765
|
+
_interface: C("interface", { startsExpr: v }),
|
|
766
|
+
_type: C("type", { startsExpr: v }),
|
|
767
|
+
_opaque: C("opaque", { startsExpr: v }),
|
|
768
|
+
name: S("name", { startsExpr: v }),
|
|
769
|
+
placeholder: S("%%", { startsExpr: v }),
|
|
770
|
+
string: S("string", { startsExpr: v }),
|
|
771
|
+
num: S("num", { startsExpr: v }),
|
|
772
|
+
bigint: S("bigint", { startsExpr: v }),
|
|
773
|
+
regexp: S("regexp", { startsExpr: v }),
|
|
774
|
+
privateName: S("#name", { startsExpr: v }),
|
|
775
|
+
eof: S("eof"),
|
|
776
|
+
jsxName: S("jsxName"),
|
|
777
|
+
jsxText: S("jsxText", { beforeExpr: _ }),
|
|
778
|
+
jsxTagStart: S("jsxTagStart", { startsExpr: v }),
|
|
779
|
+
jsxTagEnd: S("jsxTagEnd")
|
|
780
780
|
};
|
|
781
|
-
function
|
|
781
|
+
function w(e) {
|
|
782
782
|
return e >= 89 && e <= 129;
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function _e(e) {
|
|
785
785
|
return e <= 88;
|
|
786
786
|
}
|
|
787
|
-
function
|
|
787
|
+
function T(e) {
|
|
788
788
|
return e >= 54 && e <= 129;
|
|
789
789
|
}
|
|
790
|
-
function
|
|
790
|
+
function ve(e) {
|
|
791
791
|
return e >= 54 && e <= 132;
|
|
792
792
|
}
|
|
793
|
+
function ye(e) {
|
|
794
|
+
return pe[e];
|
|
795
|
+
}
|
|
793
796
|
function be(e) {
|
|
794
797
|
return me[e];
|
|
795
798
|
}
|
|
796
799
|
function xe(e) {
|
|
797
|
-
return
|
|
800
|
+
return e >= 25 && e <= 29;
|
|
798
801
|
}
|
|
799
802
|
function Se(e) {
|
|
800
|
-
return e >=
|
|
803
|
+
return e >= 125 && e <= 127;
|
|
801
804
|
}
|
|
802
805
|
function Ce(e) {
|
|
803
|
-
return e >=
|
|
806
|
+
return e >= 86 && e <= 88;
|
|
804
807
|
}
|
|
805
808
|
function we(e) {
|
|
806
|
-
return e >=
|
|
809
|
+
return e >= 54 && e <= 88;
|
|
807
810
|
}
|
|
808
811
|
function Te(e) {
|
|
809
|
-
return e >=
|
|
812
|
+
return e >= 35 && e <= 55;
|
|
810
813
|
}
|
|
811
814
|
function Ee(e) {
|
|
812
|
-
return e
|
|
815
|
+
return e === 30;
|
|
813
816
|
}
|
|
814
817
|
function De(e) {
|
|
815
|
-
return e
|
|
818
|
+
return he[e];
|
|
816
819
|
}
|
|
817
820
|
function Oe(e) {
|
|
818
|
-
return ge[e];
|
|
819
|
-
}
|
|
820
|
-
function ke(e) {
|
|
821
821
|
return e >= 117 && e <= 119;
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function ke(e) {
|
|
824
824
|
return e >= 120 && e <= 126;
|
|
825
825
|
}
|
|
826
|
-
function
|
|
827
|
-
return
|
|
826
|
+
function Ae(e) {
|
|
827
|
+
return de[e];
|
|
828
828
|
}
|
|
829
829
|
function je(e) {
|
|
830
|
-
return
|
|
830
|
+
return fe[e];
|
|
831
831
|
}
|
|
832
832
|
function Me(e) {
|
|
833
833
|
return e === 53;
|
|
@@ -836,7 +836,7 @@ function Ne(e) {
|
|
|
836
836
|
return e >= 20 && e <= 21;
|
|
837
837
|
}
|
|
838
838
|
function Pe(e) {
|
|
839
|
-
return
|
|
839
|
+
return ue[e];
|
|
840
840
|
}
|
|
841
841
|
var Fe = class {
|
|
842
842
|
constructor(e, t) {
|
|
@@ -1419,7 +1419,7 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1419
1419
|
else if (this.match(6) || this.match(43)) a != null && this.unexpected(a), d && this.unexpected(d.start), o.callProperties.push(this.flowParseObjectTypeCallProperty(u, t));
|
|
1420
1420
|
else {
|
|
1421
1421
|
let e = "init";
|
|
1422
|
-
(this.isContextual(95) || this.isContextual(100)) &&
|
|
1422
|
+
(this.isContextual(95) || this.isContextual(100)) && ve(this.lookahead().type) && (e = this.state.value, this.next());
|
|
1423
1423
|
let r = this.flowParseObjectTypeProperty(u, t, a, d, e, n, i ?? !c);
|
|
1424
1424
|
r === null ? (l = !0, s = this.state.lastTokStartLoc) : o.properties.push(r);
|
|
1425
1425
|
}
|
|
@@ -1521,7 +1521,7 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1521
1521
|
case 6: {
|
|
1522
1522
|
let e = this.startNode();
|
|
1523
1523
|
if (this.next(), !this.match(7) && !this.match(17)) {
|
|
1524
|
-
if (
|
|
1524
|
+
if (w(this.state.type) || this.match(74)) {
|
|
1525
1525
|
let e = this.lookahead().type;
|
|
1526
1526
|
i = e !== 13 && e !== 10;
|
|
1527
1527
|
} else i = !0;
|
|
@@ -1550,11 +1550,11 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1550
1550
|
case 51: return this.next(), this.finishNode(t, "ExistsTypeAnnotation");
|
|
1551
1551
|
case 83: return this.flowParseTypeofType();
|
|
1552
1552
|
default:
|
|
1553
|
-
if (
|
|
1554
|
-
let e =
|
|
1553
|
+
if (we(this.state.type)) {
|
|
1554
|
+
let e = Ae(this.state.type);
|
|
1555
1555
|
return this.next(), super.createIdentifier(t, e);
|
|
1556
1556
|
}
|
|
1557
|
-
if (
|
|
1557
|
+
if (w(this.state.type)) return this.isContextual(125) ? this.flowParseInterfaceType() : this.flowIdentToTypeAnnotation(e, t, this.parseIdentifier());
|
|
1558
1558
|
}
|
|
1559
1559
|
throw this.unexpected();
|
|
1560
1560
|
}
|
|
@@ -1636,7 +1636,7 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
parseStatementLike(e) {
|
|
1638
1638
|
if (this.state.strict && this.isContextual(125)) {
|
|
1639
|
-
if (
|
|
1639
|
+
if (T(this.lookahead().type)) {
|
|
1640
1640
|
let e = this.startNode();
|
|
1641
1641
|
return this.next(), this.flowParseInterface(e);
|
|
1642
1642
|
}
|
|
@@ -1650,8 +1650,8 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1650
1650
|
parseExpressionStatement(e, t, n) {
|
|
1651
1651
|
if (t.type === "Identifier") {
|
|
1652
1652
|
if (t.name === "declare") {
|
|
1653
|
-
if (this.match(76) ||
|
|
1654
|
-
} else if (
|
|
1653
|
+
if (this.match(76) || w(this.state.type) || this.match(64) || this.match(70) || this.match(78)) return this.flowParseDeclare(e);
|
|
1654
|
+
} else if (w(this.state.type)) {
|
|
1655
1655
|
if (t.name === "interface") return this.flowParseInterface(e);
|
|
1656
1656
|
if (t.name === "type") return this.flowParseTypeAlias(e);
|
|
1657
1657
|
if (t.name === "opaque") return this.flowParseOpaqueType(e, !1);
|
|
@@ -1661,11 +1661,11 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1661
1661
|
}
|
|
1662
1662
|
shouldParseExportDeclaration() {
|
|
1663
1663
|
let { type: e } = this.state;
|
|
1664
|
-
return e === 122 ||
|
|
1664
|
+
return e === 122 || Se(e) ? !this.state.containsEsc : super.shouldParseExportDeclaration();
|
|
1665
1665
|
}
|
|
1666
1666
|
isExportDefaultSpecifier() {
|
|
1667
1667
|
let { type: e } = this.state;
|
|
1668
|
-
return e === 122 ||
|
|
1668
|
+
return e === 122 || Se(e) ? this.state.containsEsc : super.isExportDefaultSpecifier();
|
|
1669
1669
|
}
|
|
1670
1670
|
parseExportDefaultExpression() {
|
|
1671
1671
|
if (this.isContextual(122)) {
|
|
@@ -1895,9 +1895,9 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
1895
1895
|
let s = !1;
|
|
1896
1896
|
if (this.isContextual(89) && !this.isLookaheadContextual("as")) {
|
|
1897
1897
|
let t = this.parseIdentifier(!0);
|
|
1898
|
-
o !== null && !
|
|
1898
|
+
o !== null && !T(this.state.type) ? (e.imported = t, e.importKind = o, e.local = this.cloneIdentifier(t)) : (e.imported = a, e.importKind = null, e.local = this.parseIdentifier());
|
|
1899
1899
|
} else {
|
|
1900
|
-
if (o !== null &&
|
|
1900
|
+
if (o !== null && T(this.state.type)) e.imported = this.parseIdentifier(!0), e.importKind = o;
|
|
1901
1901
|
else {
|
|
1902
1902
|
if (t) throw this.raise(g.ImportBindingIsString, e, { importName: a.value });
|
|
1903
1903
|
e.imported = a, e.importKind = null;
|
|
@@ -2195,7 +2195,7 @@ var lt = /\*?\s*@((?:no)?flow)\b/, ut = (e) => class extends e {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
flowEnumParseExplicitType({ enumName: e }) {
|
|
2197
2197
|
if (!this.eatContextual(98)) return null;
|
|
2198
|
-
if (!
|
|
2198
|
+
if (!w(this.state.type)) throw this.raise(O.EnumInvalidExplicitTypeUnknownSupplied, this.state.startLoc, { enumName: e });
|
|
2199
2199
|
let { value: t } = this.state;
|
|
2200
2200
|
return this.next(), t !== "boolean" && t !== "number" && t !== "string" && t !== "symbol" && this.raise(O.EnumInvalidExplicitType, this.state.startLoc, {
|
|
2201
2201
|
enumName: e,
|
|
@@ -2647,7 +2647,7 @@ var bt = (e) => class extends e {
|
|
|
2647
2647
|
}
|
|
2648
2648
|
jsxParseIdentifier() {
|
|
2649
2649
|
let e = this.startNode();
|
|
2650
|
-
return this.match(136) ? e.name = this.state.value :
|
|
2650
|
+
return this.match(136) ? e.name = this.state.value : we(this.state.type) ? e.name = Ae(this.state.type) : this.unexpected(), this.next(), this.finishNode(e, "JSXIdentifier");
|
|
2651
2651
|
}
|
|
2652
2652
|
jsxParseNamespacedName() {
|
|
2653
2653
|
let e = this.state.startLoc, t = this.jsxParseIdentifier();
|
|
@@ -2790,7 +2790,7 @@ var bt = (e) => class extends e {
|
|
|
2790
2790
|
else if (n === 139) {
|
|
2791
2791
|
let n = t[t.length - 1];
|
|
2792
2792
|
n === E.j_oTag && e === 52 || n === E.j_cTag ? (t.pop(), this.state.canStartJSXElement = t[t.length - 1] === E.j_expr) : (this.setContext(E.j_expr), this.state.canStartJSXElement = !0);
|
|
2793
|
-
} else this.state.canStartJSXElement =
|
|
2793
|
+
} else this.state.canStartJSXElement = ye(n);
|
|
2794
2794
|
}
|
|
2795
2795
|
}, xt = class extends et {
|
|
2796
2796
|
tsNames = /* @__PURE__ */ new Map();
|
|
@@ -3804,12 +3804,12 @@ var Bt = /* @__PURE__ */ new Set([
|
|
|
3804
3804
|
return t + this.input.slice(r, this.state.pos);
|
|
3805
3805
|
}
|
|
3806
3806
|
readWord(e) {
|
|
3807
|
-
let t = this.readWord1(e), n =
|
|
3808
|
-
n === void 0 ? this.finishToken(128, t) : this.finishToken(n,
|
|
3807
|
+
let t = this.readWord1(e), n = ce.get(t);
|
|
3808
|
+
n === void 0 ? this.finishToken(128, t) : this.finishToken(n, Ae(n));
|
|
3809
3809
|
}
|
|
3810
3810
|
checkKeywordEscapes() {
|
|
3811
3811
|
let { type: e } = this.state;
|
|
3812
|
-
|
|
3812
|
+
we(e) && this.state.containsEsc && this.raise(g.InvalidEscapedReservedWord, this.state.startLoc, { reservedWord: Ae(e) });
|
|
3813
3813
|
}
|
|
3814
3814
|
raise(t, n, r = {}) {
|
|
3815
3815
|
let i = n instanceof e ? n : typeof n == "number" ? this.getLoc(n) : this.optionFlags & 256 ? n.loc.start : this.getLoc(n.start), a = t(i, n instanceof e ? i.index : typeof n == "number" ? n : n.start, r);
|
|
@@ -3827,7 +3827,7 @@ var Bt = /* @__PURE__ */ new Set([
|
|
|
3827
3827
|
}
|
|
3828
3828
|
updateContext(e) {}
|
|
3829
3829
|
unexpected(e, t) {
|
|
3830
|
-
throw this.raise(g.UnexpectedToken, e ?? this.state.startLoc, { expected: t ?
|
|
3830
|
+
throw this.raise(g.UnexpectedToken, e ?? this.state.startLoc, { expected: t ? Ae(t) : null });
|
|
3831
3831
|
}
|
|
3832
3832
|
expectPlugin(e, t) {
|
|
3833
3833
|
if (this.hasPlugin(e)) return !0;
|
|
@@ -4108,7 +4108,7 @@ var tn = class extends Ut {
|
|
|
4108
4108
|
n != null && this.raise(g.InvalidCoverInitializedName, n), r != null && this.raise(g.DuplicateProto, r), i != null && this.raise(g.UnexpectedPrivateField, i), a != null && this.unexpected(a), o != null && this.raise(g.InvalidCoverDiscardElement, o);
|
|
4109
4109
|
}
|
|
4110
4110
|
isLiteralPropertyName() {
|
|
4111
|
-
return
|
|
4111
|
+
return ve(this.state.type);
|
|
4112
4112
|
}
|
|
4113
4113
|
isPrivateName(e) {
|
|
4114
4114
|
return e.type === "PrivateName";
|
|
@@ -4478,7 +4478,7 @@ var tn = class extends Ut {
|
|
|
4478
4478
|
let i;
|
|
4479
4479
|
e ? i = !1 : (e = new nn(), i = !0), this.state.canStartArrow = !0;
|
|
4480
4480
|
let a = this.parseMaybeConditional(e);
|
|
4481
|
-
if (t && (a = t.call(this, a, n)),
|
|
4481
|
+
if (t && (a = t.call(this, a, n)), xe(this.state.type)) {
|
|
4482
4482
|
let t = this.startNodeAt(n), r = this.state.value;
|
|
4483
4483
|
if (t.operator = r, this.match(25)) {
|
|
4484
4484
|
this.toAssignable(a, !0), t.left = a;
|
|
@@ -4489,7 +4489,7 @@ var tn = class extends Ut {
|
|
|
4489
4489
|
}
|
|
4490
4490
|
if (i && this.checkExpressionErrors(e, !0), r) {
|
|
4491
4491
|
let { type: e } = this.state;
|
|
4492
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
4492
|
+
if ((this.hasPlugin("v8intrinsic") ? be(e) : be(e) && !this.match(50)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(g.YieldNotInGeneratorFunction, n), this.parseYield(n);
|
|
4493
4493
|
}
|
|
4494
4494
|
return a;
|
|
4495
4495
|
}
|
|
@@ -4517,7 +4517,7 @@ var tn = class extends Ut {
|
|
|
4517
4517
|
(n >= je(54) || !this.prodParam.hasIn || !this.match(54)) && this.raise(g.PrivateInExpectedIn, t, { identifierName: r }), this.classScope.usePrivateName(r, t);
|
|
4518
4518
|
}
|
|
4519
4519
|
let r = this.state.type;
|
|
4520
|
-
if (
|
|
4520
|
+
if (Te(r) && (this.prodParam.hasIn || !this.match(54))) {
|
|
4521
4521
|
let i = je(r);
|
|
4522
4522
|
if (i > n) {
|
|
4523
4523
|
if (r === 35 && (this.expectPlugin("pipelineOperator"), this.prodParam.inFSharpPipelineDirectBody)) return e;
|
|
@@ -4560,7 +4560,7 @@ var tn = class extends Ut {
|
|
|
4560
4560
|
return t || this.checkExponentialAfterUnary(e), e;
|
|
4561
4561
|
}
|
|
4562
4562
|
let i = this.match(30), a = this.startNode();
|
|
4563
|
-
if (
|
|
4563
|
+
if (De(this.state.type)) {
|
|
4564
4564
|
a.operator = this.state.value, a.prefix = !0, this.state.canStartArrow = !1, this.match(68) && this.expectPlugin("throwExpressions");
|
|
4565
4565
|
let n = this.match(85);
|
|
4566
4566
|
if (this.next(), a.argument = this.parseMaybeUnary(null, !0), this.checkExpressionErrors(e, !0), this.state.strict && n) {
|
|
@@ -4572,7 +4572,7 @@ var tn = class extends Ut {
|
|
|
4572
4572
|
let o = this.parseUpdate(a, i, e);
|
|
4573
4573
|
if (r) {
|
|
4574
4574
|
let { type: e } = this.state;
|
|
4575
|
-
if ((this.hasPlugin("v8intrinsic") ?
|
|
4575
|
+
if ((this.hasPlugin("v8intrinsic") ? be(e) : be(e) && !this.match(50)) && !this.isAmbiguousPrefixOrIdentifier()) return this.raiseOverwrite(g.AwaitNotInAsyncContext, n), this.parseAwait(n);
|
|
4576
4576
|
}
|
|
4577
4577
|
return o;
|
|
4578
4578
|
}
|
|
@@ -4583,7 +4583,7 @@ var tn = class extends Ut {
|
|
|
4583
4583
|
}
|
|
4584
4584
|
let r = this.state.startLoc, i = this.parseExprSubscripts(n);
|
|
4585
4585
|
if (this.checkExpressionErrors(n, !1)) return i;
|
|
4586
|
-
for (;
|
|
4586
|
+
for (; Ee(this.state.type) && !this.canInsertSemicolon();) {
|
|
4587
4587
|
let e = this.startNodeAt(r);
|
|
4588
4588
|
e.operator = this.state.value, e.prefix = !1, e.argument = i, this.next(), this.checkLVal(i, i = this.finishNode(e, "UpdateExpression"));
|
|
4589
4589
|
}
|
|
@@ -4732,13 +4732,13 @@ var tn = class extends Ut {
|
|
|
4732
4732
|
]) : this.unexpected();
|
|
4733
4733
|
}
|
|
4734
4734
|
default:
|
|
4735
|
-
if (
|
|
4735
|
+
if (w(r)) {
|
|
4736
4736
|
if (this.isContextual(123) && this.lookaheadInLineCharCode() === 123) return this.parseModuleExpression();
|
|
4737
4737
|
let { canStartArrow: e, containsEsc: t } = this.state, n = this.parseIdentifier();
|
|
4738
4738
|
if (!t && n.name === "async" && !this.canInsertSemicolon()) {
|
|
4739
4739
|
let { type: t } = this.state;
|
|
4740
4740
|
if (t === 64) return this.resetPreviousNodeTrailingComments(n), this.next(), this.parseAsyncFunctionExpression(this.startNodeAtNode(n));
|
|
4741
|
-
if (
|
|
4741
|
+
if (w(t)) return e && this.lookaheadCharCode() === 61 ? this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)) : n;
|
|
4742
4742
|
if (t === 86) return this.resetPreviousNodeTrailingComments(n), this.parseDo(this.startNodeAtNode(n), !0);
|
|
4743
4743
|
}
|
|
4744
4744
|
return e && this.match(15) && !this.canInsertSemicolon() ? (this.next(), this.parseArrowExpression(this.startNodeAtNode(n), [n], !1)) : n;
|
|
@@ -4757,11 +4757,11 @@ var tn = class extends Ut {
|
|
|
4757
4757
|
}
|
|
4758
4758
|
finishTopicReference(e, t, n, r) {
|
|
4759
4759
|
if (this.testTopicReferenceConfiguration(n, t, r)) return this.topicReferenceIsAllowedInCurrentContext() || this.raise(g.PipeTopicUnbound, t), this.registerTopicReference(), this.finishNode(e, "TopicReference");
|
|
4760
|
-
throw this.raise(g.PipeTopicUnconfiguredToken, t, { token:
|
|
4760
|
+
throw this.raise(g.PipeTopicUnconfiguredToken, t, { token: Ae(r) });
|
|
4761
4761
|
}
|
|
4762
4762
|
testTopicReferenceConfiguration(e, t, n) {
|
|
4763
4763
|
switch (e) {
|
|
4764
|
-
case "hack": return this.hasPlugin(["pipelineOperator", { topicToken:
|
|
4764
|
+
case "hack": return this.hasPlugin(["pipelineOperator", { topicToken: Ae(n) }]);
|
|
4765
4765
|
default: throw this.raise(g.PipeTopicRequiresHackPipes, t);
|
|
4766
4766
|
}
|
|
4767
4767
|
}
|
|
@@ -4992,7 +4992,7 @@ var tn = class extends Ut {
|
|
|
4992
4992
|
if (this.eat(0)) e.computed = !0, e.key = this.parseMaybeAssignAllowIn(), this.expect(1);
|
|
4993
4993
|
else {
|
|
4994
4994
|
let { type: n, value: r } = this.state, i;
|
|
4995
|
-
if (
|
|
4995
|
+
if (T(n)) i = this.parseIdentifier(!0);
|
|
4996
4996
|
else switch (n) {
|
|
4997
4997
|
case 131:
|
|
4998
4998
|
i = this.parseNumericLiteral(r);
|
|
@@ -5098,8 +5098,8 @@ var tn = class extends Ut {
|
|
|
5098
5098
|
}
|
|
5099
5099
|
parseIdentifierName(e) {
|
|
5100
5100
|
let t, { start: n, type: r } = this.state;
|
|
5101
|
-
|
|
5102
|
-
let i =
|
|
5101
|
+
T(r) ? t = this.state.value : this.unexpected();
|
|
5102
|
+
let i = _e(r);
|
|
5103
5103
|
return e ? i && this.replaceToken(128) : this.checkReservedWord(t, this.sourceToOffsetPos(n), i, !1), this.next(), t;
|
|
5104
5104
|
}
|
|
5105
5105
|
checkReservedWord(e, t, n, r) {
|
|
@@ -5224,7 +5224,7 @@ var tn = class extends Ut {
|
|
|
5224
5224
|
if (this.isContextual(92) && this.recordAwaitIfAllowed()) {
|
|
5225
5225
|
this.next(), n = this.parseAwait(t, !0);
|
|
5226
5226
|
let e = this.state.type;
|
|
5227
|
-
|
|
5227
|
+
Te(e) && e !== 35 && (this.prodParam.hasIn || e !== 54) && this.raise(g.PipelineUnparenthesized, t);
|
|
5228
5228
|
} else this.state.canStartArrow = !0, n = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), t, e);
|
|
5229
5229
|
return this.prodParam.exit(), n;
|
|
5230
5230
|
}
|
|
@@ -5404,7 +5404,7 @@ var hn = class extends ln {
|
|
|
5404
5404
|
default: if (this.isAsyncFunction()) return i || this.raise(g.AsyncFunctionInSingleStatementContext, this.state.startLoc), this.next(), this.parseFunctionStatement(r, !0, !i && a);
|
|
5405
5405
|
}
|
|
5406
5406
|
let s = this.state.value, c = this.parseExpression();
|
|
5407
|
-
return
|
|
5407
|
+
return w(n) && c.type === "Identifier" && this.eat(10) ? this.parseLabeledStatement(r, s, c, e) : this.parseExpressionStatement(r, c, t);
|
|
5408
5408
|
}
|
|
5409
5409
|
assertModuleNodeAllowed(e) {
|
|
5410
5410
|
!(this.optionFlags & 8) && !this.inModule && this.raise(g.ImportOutsideModule, e);
|
|
@@ -5546,7 +5546,7 @@ var hn = class extends ln {
|
|
|
5546
5546
|
}
|
|
5547
5547
|
parseLabeledStatement(e, t, n, r) {
|
|
5548
5548
|
for (let e of this.state.labels) e.name === t && this.raise(g.LabelRedeclaration, n, { labelName: t });
|
|
5549
|
-
let i =
|
|
5549
|
+
let i = Ce(this.state.type) ? 1 : this.match(67) ? 2 : null;
|
|
5550
5550
|
for (let t = this.state.labels.length - 1; t >= 0; t--) {
|
|
5551
5551
|
let n = this.state.labels[t];
|
|
5552
5552
|
if (n.statementStart === e.start) n.statementStart = this.sourceToOffsetPos(this.state.start), n.kind = i;
|
|
@@ -5615,7 +5615,7 @@ var hn = class extends ln {
|
|
|
5615
5615
|
return this.initFunction(e, a), this.match(51) && (n && this.raise(g.GeneratorInSingleStatementContext, this.state.startLoc), this.next(), e.generator = !0), r && (e.id = this.parseFunctionId(i)), this.scope.enter(514), this.prodParam.enter(en(a, e.generator)), r || (e.id = this.parseFunctionId()), this.parseFunctionParams(e, !1), this.parseFunctionBodyAndFinish(e, r ? "FunctionDeclaration" : "FunctionExpression"), this.prodParam.exit(), this.scope.exit(), r && !n && this.registerFunctionStatementId(e), e;
|
|
5616
5616
|
}
|
|
5617
5617
|
parseFunctionId(e) {
|
|
5618
|
-
return e ||
|
|
5618
|
+
return e || w(this.state.type) ? this.parseIdentifier() : null;
|
|
5619
5619
|
}
|
|
5620
5620
|
parseFunctionParams(e, t) {
|
|
5621
5621
|
this.expect(6), this.expressionScope.enter(Yt()), e.params = this.parseBindingList(7, 41, 2 | (t ? 4 : 0)), this.expressionScope.exit();
|
|
@@ -5696,7 +5696,7 @@ var hn = class extends ln {
|
|
|
5696
5696
|
this.isNonstaticConstructor(i) && this.raise(g.ConstructorIsGenerator, i.key), this.pushClassMethod(e, i, !0, !1, !1, !1);
|
|
5697
5697
|
return;
|
|
5698
5698
|
}
|
|
5699
|
-
let d = !this.state.containsEsc &&
|
|
5699
|
+
let d = !this.state.containsEsc && w(this.state.type), f = this.parseClassElementName(t), p = d ? f.name : null, m = this.isPrivateName(f), h = this.state.startLoc;
|
|
5700
5700
|
if (this.parsePostMemberNameModifiers(u), this.isClassMethod()) {
|
|
5701
5701
|
if (l.kind = "method", m) {
|
|
5702
5702
|
this.pushClassPrivateMethod(e, a, !1, !1);
|
|
@@ -5775,7 +5775,7 @@ var hn = class extends ln {
|
|
|
5775
5775
|
this.scope.enter(592), this.expressionScope.enter(Qt()), this.prodParam.enter(0), e.value = this.eat(25) ? this.parseMaybeAssignAllowIn() : null, this.expressionScope.exit(), this.prodParam.exit(), this.scope.exit();
|
|
5776
5776
|
}
|
|
5777
5777
|
parseClassId(e, t, n, r = 8331) {
|
|
5778
|
-
if (
|
|
5778
|
+
if (w(this.state.type)) e.id = this.parseIdentifier(), t && this.declareNameFromIdentifier(e.id, r);
|
|
5779
5779
|
else if (n || !t) e.id = null;
|
|
5780
5780
|
else throw this.raise(g.MissingClassName, this.state.startLoc);
|
|
5781
5781
|
}
|
|
@@ -5860,7 +5860,7 @@ var hn = class extends ln {
|
|
|
5860
5860
|
}
|
|
5861
5861
|
isExportDefaultSpecifier() {
|
|
5862
5862
|
let { type: e } = this.state;
|
|
5863
|
-
if (
|
|
5863
|
+
if (w(e)) {
|
|
5864
5864
|
if (e === 91 && !this.state.containsEsc || e === 96) return !1;
|
|
5865
5865
|
if ((e === 126 || e === 125) && !this.state.containsEsc) {
|
|
5866
5866
|
let e = this.nextTokenStart(), t = this.input.charCodeAt(e);
|
|
@@ -5868,7 +5868,7 @@ var hn = class extends ln {
|
|
|
5868
5868
|
}
|
|
5869
5869
|
} else if (!this.match(61)) return !1;
|
|
5870
5870
|
let t = this.nextTokenStart(), n = this.isUnparsedContextual(t, "from");
|
|
5871
|
-
if (this.input.charCodeAt(t) === 44 ||
|
|
5871
|
+
if (this.input.charCodeAt(t) === 44 || w(this.state.type) && n) return !0;
|
|
5872
5872
|
if (this.match(61) && n) {
|
|
5873
5873
|
let e = this.input.charCodeAt(this.nextTokenStartSince(t + 4));
|
|
5874
5874
|
return e === 34 || e === 39;
|
|
@@ -5951,11 +5951,11 @@ var hn = class extends ln {
|
|
|
5951
5951
|
parseMaybeImportPhase(e, t) {
|
|
5952
5952
|
if (!this.isPotentialImportPhase(t)) return this.applyImportPhase(e, t, null), null;
|
|
5953
5953
|
let n = this.startNode(), r = this.parseIdentifierName(!0), { type: i } = this.state;
|
|
5954
|
-
return (
|
|
5954
|
+
return (T(i) ? i !== 94 || this.lookaheadCharCode() === 102 : i !== 8) ? (this.applyImportPhase(e, t, r, n.start), null) : (this.applyImportPhase(e, t, null), this.createIdentifier(n, r));
|
|
5955
5955
|
}
|
|
5956
5956
|
isPrecedingIdImportPhase(e) {
|
|
5957
5957
|
let { type: t } = this.state;
|
|
5958
|
-
return
|
|
5958
|
+
return w(t) ? t !== 94 || this.lookaheadCharCode() === 102 : t !== 8;
|
|
5959
5959
|
}
|
|
5960
5960
|
parseImport(e) {
|
|
5961
5961
|
return this.match(130) ? this.parseImportSourceAndAttributes(e) : this.parseImportSpecifiersAndAfter(e, this.parseMaybeImportPhase(e, !1));
|
|
@@ -6001,7 +6001,7 @@ var hn = class extends ln {
|
|
|
6001
6001
|
let n = this.startNodeAtNode(t);
|
|
6002
6002
|
return n.local = t, e.specifiers.push(this.finishImportSpecifier(n, "ImportDefaultSpecifier")), !0;
|
|
6003
6003
|
}
|
|
6004
|
-
return
|
|
6004
|
+
return T(this.state.type) ? (this.parseImportSpecifierLocal(e, this.startNode(), "ImportDefaultSpecifier"), !0) : !1;
|
|
6005
6005
|
}
|
|
6006
6006
|
maybeParseStarImportSpecifier(e) {
|
|
6007
6007
|
if (this.match(51)) {
|
|
@@ -6157,7 +6157,7 @@ var Cn = (e) => class extends e {
|
|
|
6157
6157
|
return St;
|
|
6158
6158
|
}
|
|
6159
6159
|
tsIsIdentifier() {
|
|
6160
|
-
return
|
|
6160
|
+
return w(this.state.type);
|
|
6161
6161
|
}
|
|
6162
6162
|
tsTokenCanFollowModifier() {
|
|
6163
6163
|
return this.match(0) || this.match(2) || this.match(51) || this.match(17) || this.match(134) || this.isLiteralPropertyName();
|
|
@@ -6169,7 +6169,7 @@ var Cn = (e) => class extends e {
|
|
|
6169
6169
|
return this.match(102) ? (this.next(), this.tsTokenCanFollowModifier()) : this.tsNextTokenOnSameLineAndCanFollowModifier();
|
|
6170
6170
|
}
|
|
6171
6171
|
tsParseModifier(e, t, n) {
|
|
6172
|
-
if (!
|
|
6172
|
+
if (!w(this.state.type) && this.state.type !== 54 && this.state.type !== 71) return;
|
|
6173
6173
|
let r = this.state.value;
|
|
6174
6174
|
if (e.includes(r)) {
|
|
6175
6175
|
if (n && this.match(102) || t && this.tsIsStartOfStaticBlocks()) return;
|
|
@@ -6240,7 +6240,7 @@ var Cn = (e) => class extends e {
|
|
|
6240
6240
|
let e = this.startNode(), t = [];
|
|
6241
6241
|
for (this.expect(2); !this.match(4);) {
|
|
6242
6242
|
let e = this.state.type;
|
|
6243
|
-
|
|
6243
|
+
w(e) || e === 130 ? t.push(super.parsePropertyDefinition(null)) : this.unexpected(), this.eat(8);
|
|
6244
6244
|
}
|
|
6245
6245
|
return e.properties = t, this.next(), this.finishNode(e, "ObjectExpression");
|
|
6246
6246
|
}
|
|
@@ -6344,7 +6344,7 @@ var Cn = (e) => class extends e {
|
|
|
6344
6344
|
return this.tsFillSignature(10, t), this.tsParseTypeMemberSemicolon(), this.finishNode(t, e);
|
|
6345
6345
|
}
|
|
6346
6346
|
tsIsUnambiguouslyIndexSignature() {
|
|
6347
|
-
return this.next(),
|
|
6347
|
+
return this.next(), w(this.state.type) ? (this.next(), this.match(10)) : !1;
|
|
6348
6348
|
}
|
|
6349
6349
|
tsTryParseIndexSignature(e) {
|
|
6350
6350
|
if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) return;
|
|
@@ -6422,7 +6422,7 @@ var Cn = (e) => class extends e {
|
|
|
6422
6422
|
}), this.finishNode(e, "TSTupleType");
|
|
6423
6423
|
}
|
|
6424
6424
|
tsParseTupleElementType() {
|
|
6425
|
-
let e = this.state.startLoc, t = this.eat(17), { startLoc: n } = this.state, r, i, a, o, s =
|
|
6425
|
+
let e = this.state.startLoc, t = this.eat(17), { startLoc: n } = this.state, r, i, a, o, s = T(this.state.type) ? this.lookaheadCharCode() : null;
|
|
6426
6426
|
if (s === 58) r = !0, a = !1, i = this.parseIdentifier(!0), this.expect(10), o = this.tsParseType();
|
|
6427
6427
|
else if (s === 63) {
|
|
6428
6428
|
a = !0;
|
|
@@ -6514,7 +6514,7 @@ var Cn = (e) => class extends e {
|
|
|
6514
6514
|
case 20: return this.tsParseTemplateLiteralType();
|
|
6515
6515
|
default: {
|
|
6516
6516
|
let { type: e } = this.state;
|
|
6517
|
-
if (
|
|
6517
|
+
if (w(e) || e === 84 || e === 80) {
|
|
6518
6518
|
let t = e === 84 ? "TSVoidKeyword" : e === 80 ? "TSNullKeyword" : yn(this.state.value);
|
|
6519
6519
|
if (t !== void 0 && this.lookaheadCharCode() !== 46) {
|
|
6520
6520
|
let e = this.startNode();
|
|
@@ -6561,7 +6561,7 @@ var Cn = (e) => class extends e {
|
|
|
6561
6561
|
}
|
|
6562
6562
|
}
|
|
6563
6563
|
tsParseTypeOperatorOrHigher() {
|
|
6564
|
-
return
|
|
6564
|
+
return Oe(this.state.type) && !this.state.containsEsc ? this.tsParseTypeOperator() : this.isContextual(111) ? this.tsParseInferType() : this.tsInAllowConditionalTypesContext(() => this.tsParseArrayTypeOrHigher());
|
|
6565
6565
|
}
|
|
6566
6566
|
tsParseUnionOrIntersectionType(e, t, n) {
|
|
6567
6567
|
let r = this.startNode(), i = this.eat(n), a = [];
|
|
@@ -6580,7 +6580,7 @@ var Cn = (e) => class extends e {
|
|
|
6580
6580
|
return this.match(43) ? !0 : this.match(6) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
|
|
6581
6581
|
}
|
|
6582
6582
|
tsSkipParameterStart() {
|
|
6583
|
-
if (
|
|
6583
|
+
if (w(this.state.type) || this.match(74)) return this.next(), !0;
|
|
6584
6584
|
if (this.match(2)) {
|
|
6585
6585
|
let { errors: e } = this.state, t = e.length;
|
|
6586
6586
|
try {
|
|
@@ -6634,7 +6634,7 @@ var Cn = (e) => class extends e {
|
|
|
6634
6634
|
tsParseTypePredicateAsserts() {
|
|
6635
6635
|
if (this.state.type !== 105) return !1;
|
|
6636
6636
|
let e = this.state.containsEsc;
|
|
6637
|
-
return this.next(), !
|
|
6637
|
+
return this.next(), !w(this.state.type) && !this.match(74) ? !1 : (e && this.raise(g.InvalidEscapedReservedWord, this.state.lastTokStartLoc, { reservedWord: "asserts" }), !0);
|
|
6638
6638
|
}
|
|
6639
6639
|
tsParseTypeAnnotation(e = !0, t = this.startNode()) {
|
|
6640
6640
|
return this.tsInType(() => {
|
|
@@ -6672,7 +6672,7 @@ var Cn = (e) => class extends e {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
tsParseInterfaceDeclaration(e, t = {}) {
|
|
6674
6674
|
if (this.hasFollowingLineBreak()) return null;
|
|
6675
|
-
this.expectContextual(125), t.declare && (e.declare = !0),
|
|
6675
|
+
this.expectContextual(125), t.declare && (e.declare = !0), w(this.state.type) ? (e.id = this.parseIdentifier(), this.checkIdentifier(e.id, 130)) : (e.id = null, this.raise(A.MissingInterfaceName, this.state.startLoc)), e.typeParameters = this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers), this.eat(77) && (e.extends = this.tsParseHeritageClause("extends"));
|
|
6676
6676
|
let n = this.startNode();
|
|
6677
6677
|
return n.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this)), e.body = this.finishNode(n, "TSInterfaceBody"), this.finishNode(e, "TSInterfaceDeclaration");
|
|
6678
6678
|
}
|
|
@@ -6756,7 +6756,7 @@ var Cn = (e) => class extends e {
|
|
|
6756
6756
|
else {
|
|
6757
6757
|
e.kind = "module";
|
|
6758
6758
|
let { type: t, value: n } = this.state;
|
|
6759
|
-
t === 130 ? e.id = super.parseStringLiteral(n) :
|
|
6759
|
+
t === 130 ? e.id = super.parseStringLiteral(n) : w(t) ? (this.raise(A.InlineModuleDeclarationMustUseString, this.state.startLoc), e.id = this.tsParseEntityName(0)) : t === 2 ? this.raise(A.EmptyNamespaceName, this.state.startLoc) : (this.raise(A.InvalidNamespaceName, this.state.startLoc, n), e.id = super.parseExprAtom());
|
|
6760
6760
|
}
|
|
6761
6761
|
return this.match(2) ? (t || this.scope.enter(1024), this.prodParam.enter(0), e.body = this.tsParseModuleBlock(t), this.prodParam.exit(), t || this.scope.exit()) : this.semicolon(), this.finishNode(e, "TSModuleDeclaration");
|
|
6762
6762
|
}
|
|
@@ -6813,7 +6813,7 @@ var Cn = (e) => class extends e {
|
|
|
6813
6813
|
let t = this.tsParseInterfaceDeclaration(e, { declare: !0 });
|
|
6814
6814
|
if (t) return t;
|
|
6815
6815
|
}
|
|
6816
|
-
default: if (
|
|
6816
|
+
default: if (w(t)) return this.tsParseDeclaration(e, this.state.type, !0, null);
|
|
6817
6817
|
}
|
|
6818
6818
|
});
|
|
6819
6819
|
}
|
|
@@ -6823,15 +6823,15 @@ var Cn = (e) => class extends e {
|
|
|
6823
6823
|
tsParseDeclaration(e, t, n, r) {
|
|
6824
6824
|
switch (t) {
|
|
6825
6825
|
case 120:
|
|
6826
|
-
if (this.tsCheckLineTerminator(n) && (this.match(76) ||
|
|
6826
|
+
if (this.tsCheckLineTerminator(n) && (this.match(76) || w(this.state.type))) return this.tsParseAbstractDeclaration(e, r);
|
|
6827
6827
|
break;
|
|
6828
6828
|
case 123:
|
|
6829
6829
|
if (this.tsCheckLineTerminator(n)) return this.tsParseAmbientExternalModuleDeclaration(e);
|
|
6830
6830
|
break;
|
|
6831
6831
|
case 124:
|
|
6832
|
-
if (this.tsCheckLineTerminator(n) &&
|
|
6832
|
+
if (this.tsCheckLineTerminator(n) && w(this.state.type)) return e.kind = "namespace", this.tsParseNamespaceDeclaration(e);
|
|
6833
6833
|
break;
|
|
6834
|
-
case 126: if (this.tsCheckLineTerminator(n) &&
|
|
6834
|
+
case 126: if (this.tsCheckLineTerminator(n) && w(this.state.type)) return this.tsParseTypeAliasDeclaration(e);
|
|
6835
6835
|
}
|
|
6836
6836
|
}
|
|
6837
6837
|
tsCheckLineTerminator(e) {
|
|
@@ -6853,7 +6853,7 @@ var Cn = (e) => class extends e {
|
|
|
6853
6853
|
return e.params = this.tsInType(() => this.tsInTopLevelContext(() => (this.expect(43), this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this))))), e.params.length === 0 ? this.raise(A.EmptyTypeArguments, e) : !this.state.inType && this.curContext() === E.brace && this.reScan_lt_gt(), this.expect(44), this.finishNode(e, "TSTypeParameterInstantiation");
|
|
6854
6854
|
}
|
|
6855
6855
|
tsIsDeclarationStart() {
|
|
6856
|
-
return
|
|
6856
|
+
return ke(this.state.type);
|
|
6857
6857
|
}
|
|
6858
6858
|
isExportDefaultSpecifier() {
|
|
6859
6859
|
return !this.tsIsDeclarationStart() && super.isExportDefaultSpecifier();
|
|
@@ -6944,7 +6944,7 @@ var Cn = (e) => class extends e {
|
|
|
6944
6944
|
return n.callee = e, n.arguments = this.parseCallExpressionArguments(), this.tsCheckForInvalidTypeCasts(n.arguments), n.typeArguments = o, r.optionalChainMember && (n.optional = i), this.finishCallExpression(n, r.optionalChainMember);
|
|
6945
6945
|
}
|
|
6946
6946
|
let s = this.state.type;
|
|
6947
|
-
if (s === 44 || s === 48 || s !== 6 && s !== 89 && s !== 116 &&
|
|
6947
|
+
if (s === 44 || s === 48 || s !== 6 && s !== 89 && s !== 116 && be(s) && !this.hasPrecedingLineBreak()) return;
|
|
6948
6948
|
let c = this.startNodeAt(t);
|
|
6949
6949
|
return c.expression = e, c.typeArguments = o, this.finishNode(c, "TSInstantiationExpression");
|
|
6950
6950
|
});
|
|
@@ -6985,7 +6985,7 @@ var Cn = (e) => class extends e {
|
|
|
6985
6985
|
parseImport(e) {
|
|
6986
6986
|
if (this.match(130)) return e.importKind = "value", this.scope.inTSNamespace && this.raise(A.ImportInTSNamespace, e), super.parseImport(e);
|
|
6987
6987
|
let t;
|
|
6988
|
-
if (
|
|
6988
|
+
if (w(this.state.type) && this.lookaheadCharCode() === 61) {
|
|
6989
6989
|
e.importKind = "value";
|
|
6990
6990
|
let t = this.tsParseImportEqualsDeclaration(e);
|
|
6991
6991
|
return this.scope.inTSNamespace && t.moduleReference.type === "TSExternalModuleReference" && this.raise(A.ImportInTSNamespace, e), t;
|
|
@@ -7169,7 +7169,7 @@ var Cn = (e) => class extends e {
|
|
|
7169
7169
|
if (!this.state.isAmbientContext && this.isContextual(121)) return this.tsInAmbientContext(() => this.parseExportDeclaration(e));
|
|
7170
7170
|
let t = this.state.startLoc, n = this.eatContextual(121);
|
|
7171
7171
|
if (n && (this.isContextual(121) || !this.shouldParseExportDeclaration())) throw this.raise(A.ExpectedAmbientAfterExportDeclare, this.state.startLoc);
|
|
7172
|
-
let r =
|
|
7172
|
+
let r = w(this.state.type) && this.tsTryParseExportDeclaration() || super.parseExportDeclaration(e);
|
|
7173
7173
|
return r ? ((r.type === "TSInterfaceDeclaration" || r.type === "TSTypeAliasDeclaration" || n) && (e.exportKind = "type"), n && r.type !== "TSImportEqualsDeclaration" && (this.resetStartLocation(r, t), r.declare = !0), r) : null;
|
|
7174
7174
|
}
|
|
7175
7175
|
parseClassId(e, t, n, r) {
|
|
@@ -7482,9 +7482,9 @@ var Cn = (e) => class extends e {
|
|
|
7482
7482
|
let e = this.parseIdentifier();
|
|
7483
7483
|
if (this.isContextual(89)) {
|
|
7484
7484
|
let n = this.parseIdentifier();
|
|
7485
|
-
|
|
7486
|
-
} else
|
|
7487
|
-
} else
|
|
7485
|
+
T(this.state.type) ? (s = !0, a = e, o = t ? this.parseIdentifier() : this.parseModuleExportName(), c = !1) : (o = n, c = !1);
|
|
7486
|
+
} else T(this.state.type) ? (c = !1, o = t ? this.parseIdentifier() : this.parseModuleExportName()) : (s = !0, a = e);
|
|
7487
|
+
} else T(this.state.type) && (s = !0, t ? (a = this.parseIdentifier(!0), this.isContextual(89) || this.checkReservedWord(a.name, a.start, !0, !0)) : a = this.parseModuleExportName());
|
|
7488
7488
|
s && n && this.raise(t ? A.TypeModifierIsUsedInTypeImports : A.TypeModifierIsUsedInTypeExports, l), e[r] = a, e[i] = o;
|
|
7489
7489
|
let u = t ? "importKind" : "exportKind";
|
|
7490
7490
|
e[u] = s ? "type" : "value", c && this.eatContextual(89) && (e[i] = t ? this.parseIdentifier() : this.parseModuleExportName()), e[i] || (e[i] = this.cloneIdentifier(e[r])), t && this.checkIdentifier(e[i], s ? 4098 : 4096);
|
|
@@ -7699,7 +7699,7 @@ var kn = h`placeholders`({
|
|
|
7699
7699
|
isExportDefaultSpecifier() {
|
|
7700
7700
|
if (this.match(61)) {
|
|
7701
7701
|
let e = this.nextTokenStart();
|
|
7702
|
-
if (this.isUnparsedContextual(e, "from") && this.input.startsWith(
|
|
7702
|
+
if (this.isUnparsedContextual(e, "from") && this.input.startsWith(Ae(129), this.nextTokenStartSince(e + 4))) return !0;
|
|
7703
7703
|
}
|
|
7704
7704
|
return super.isExportDefaultSpecifier();
|
|
7705
7705
|
}
|
|
@@ -7727,7 +7727,7 @@ var kn = h`placeholders`({
|
|
|
7727
7727
|
parseV8Intrinsic() {
|
|
7728
7728
|
if (this.match(50)) {
|
|
7729
7729
|
let e = this.state.startLoc, t = this.startNode();
|
|
7730
|
-
if (this.next(),
|
|
7730
|
+
if (this.next(), w(this.state.type)) {
|
|
7731
7731
|
let e = this.parseIdentifierName(), n = this.createIdentifier(t, e);
|
|
7732
7732
|
if (this.castNodeTo(n, "V8IntrinsicIdentifier"), this.match(6)) return n;
|
|
7733
7733
|
}
|
|
@@ -7827,7 +7827,7 @@ function zn(e) {
|
|
|
7827
7827
|
for (let n of Object.keys(e)) t[n] = Pe(e[n]);
|
|
7828
7828
|
return t;
|
|
7829
7829
|
}
|
|
7830
|
-
zn(
|
|
7830
|
+
zn(ge);
|
|
7831
7831
|
function Bn(e, t) {
|
|
7832
7832
|
let n = Ln, r = /* @__PURE__ */ new Map();
|
|
7833
7833
|
if (e?.plugins) {
|
|
@@ -10231,19 +10231,31 @@ function vo(e) {
|
|
|
10231
10231
|
kind: e.kind,
|
|
10232
10232
|
subflowId: e.subflowId
|
|
10233
10233
|
};
|
|
10234
|
-
case "task":
|
|
10235
|
-
|
|
10236
|
-
|
|
10237
|
-
|
|
10238
|
-
|
|
10234
|
+
case "task": {
|
|
10235
|
+
let n = e.task == null ? Object.assign({}, t, {
|
|
10236
|
+
kind: e.kind,
|
|
10237
|
+
taskId: e.taskId
|
|
10238
|
+
}) : Object.assign({}, t, {
|
|
10239
|
+
kind: e.kind,
|
|
10240
|
+
task: xo(e.task)
|
|
10241
|
+
});
|
|
10242
|
+
return e.additionalInputs != null && (n.additionalInputs = mo(e.additionalInputs)), n;
|
|
10243
|
+
}
|
|
10244
|
+
case "value": return {
|
|
10239
10245
|
...t,
|
|
10240
10246
|
kind: e.kind,
|
|
10241
|
-
|
|
10247
|
+
values: mo(e.values)
|
|
10242
10248
|
};
|
|
10243
|
-
case "
|
|
10249
|
+
case "wait": return {
|
|
10244
10250
|
...t,
|
|
10251
|
+
actions: e.actions,
|
|
10245
10252
|
kind: e.kind,
|
|
10246
|
-
|
|
10253
|
+
...e.notification == null ? {} : { notification: {
|
|
10254
|
+
inputs: go(e.notification.inputs),
|
|
10255
|
+
messageHandle: e.notification.messageHandle,
|
|
10256
|
+
taskId: e.notification.taskId
|
|
10257
|
+
} },
|
|
10258
|
+
prompt: e.prompt
|
|
10247
10259
|
};
|
|
10248
10260
|
}
|
|
10249
10261
|
}
|
|
@@ -10364,7 +10376,7 @@ function Eo(e) {
|
|
|
10364
10376
|
function Do(e) {
|
|
10365
10377
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
10366
10378
|
}
|
|
10367
|
-
|
|
10379
|
+
function Oo(e) {
|
|
10368
10380
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set();
|
|
10369
10381
|
function o(e) {
|
|
10370
10382
|
t.add(e);
|
|
@@ -10388,6 +10400,9 @@ async function Oo(e) {
|
|
|
10388
10400
|
t.task == null ? a.add(t.taskId) : s(t.task.moduleId);
|
|
10389
10401
|
break;
|
|
10390
10402
|
case "value": break;
|
|
10403
|
+
case "wait":
|
|
10404
|
+
t.notification != null && (a.add(t.notification.taskId), c(t.notification.inputs));
|
|
10405
|
+
break;
|
|
10391
10406
|
case "poll":
|
|
10392
10407
|
case "integration": o(t.bindingId);
|
|
10393
10408
|
}
|
|
@@ -10398,43 +10413,45 @@ async function Oo(e) {
|
|
|
10398
10413
|
let n = e.document.subflows[t];
|
|
10399
10414
|
n != null && l(n.graph);
|
|
10400
10415
|
}
|
|
10401
|
-
l(e.document.graph)
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
return n == null ? [t, null] : [t, {
|
|
10412
|
-
graph: yo(n.graph),
|
|
10413
|
-
inputs: mo(n.inputs),
|
|
10414
|
-
name: n.name,
|
|
10415
|
-
outputs: _o(n.outputs)
|
|
10416
|
-
}];
|
|
10417
|
-
})),
|
|
10418
|
-
version: 1
|
|
10419
|
-
});
|
|
10416
|
+
return l(e.document.graph), {
|
|
10417
|
+
bindings: t,
|
|
10418
|
+
inputBindings: n,
|
|
10419
|
+
modules: r,
|
|
10420
|
+
subflows: i,
|
|
10421
|
+
tasks: a
|
|
10422
|
+
};
|
|
10423
|
+
}
|
|
10424
|
+
async function ko(e) {
|
|
10425
|
+
let t = Oo(e), { bindings: n, modules: r, subflows: i, tasks: a } = t;
|
|
10420
10426
|
return {
|
|
10421
|
-
dependencies:
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10427
|
+
dependencies: t,
|
|
10428
|
+
digest: await uo(lo({
|
|
10429
|
+
bindings: Object.fromEntries([...n].toSorted().map((t) => [t, e.document.bindings[t] ?? null])),
|
|
10430
|
+
graph: yo(e.document.graph),
|
|
10431
|
+
kind: "open-flow-semantic-closure",
|
|
10432
|
+
modelVersion: e.modelVersion,
|
|
10433
|
+
modules: Object.fromEntries([...r].toSorted().map((t) => [t, e.modules[t] == null ? null : Eo(e.modules[t])])),
|
|
10434
|
+
tasks: Object.fromEntries([...a].toSorted().map((t) => [t, e.document.tasks[t] == null ? null : bo(e.document.tasks[t])])),
|
|
10435
|
+
subflows: Object.fromEntries([...i].toSorted().map((t) => {
|
|
10436
|
+
let n = e.document.subflows[t];
|
|
10437
|
+
return n == null ? [t, null] : [t, {
|
|
10438
|
+
graph: yo(n.graph),
|
|
10439
|
+
inputs: mo(n.inputs),
|
|
10440
|
+
name: n.name,
|
|
10441
|
+
outputs: _o(n.outputs)
|
|
10442
|
+
}];
|
|
10443
|
+
})),
|
|
10444
|
+
version: 1
|
|
10445
|
+
}))
|
|
10429
10446
|
};
|
|
10430
10447
|
}
|
|
10431
|
-
function
|
|
10448
|
+
function Ao(e, t) {
|
|
10432
10449
|
return Object.fromEntries([...t].flatMap((t) => {
|
|
10433
10450
|
let n = e.document.bindings[t];
|
|
10434
10451
|
return n?.kind == "variable" ? [[t, n.target]] : [];
|
|
10435
10452
|
}));
|
|
10436
10453
|
}
|
|
10437
|
-
function
|
|
10454
|
+
function jo(e) {
|
|
10438
10455
|
return e.kind == "poll" || e.kind == "integration" ? e.definition.payloadSchema : e.kind == "cron" ? {
|
|
10439
10456
|
additionalProperties: !1,
|
|
10440
10457
|
type: "object"
|
|
@@ -10445,7 +10462,7 @@ function Ao(e) {
|
|
|
10445
10462
|
type: "object"
|
|
10446
10463
|
};
|
|
10447
10464
|
}
|
|
10448
|
-
function
|
|
10465
|
+
function Mo(e) {
|
|
10449
10466
|
return {
|
|
10450
10467
|
column: e.loc?.start.column ?? 0,
|
|
10451
10468
|
line: e.loc?.start.line ?? 1
|
|
@@ -10454,25 +10471,25 @@ function jo(e) {
|
|
|
10454
10471
|
function Z(e) {
|
|
10455
10472
|
return `/modules/${e}/source`;
|
|
10456
10473
|
}
|
|
10457
|
-
function
|
|
10474
|
+
function No(e, t) {
|
|
10458
10475
|
if (typeof e != "object" || !e) return;
|
|
10459
10476
|
let n = e;
|
|
10460
10477
|
if (n.type == "Identifier" && typeof n.name == "string") t.add(n.name);
|
|
10461
|
-
else if (n.type == "RestElement")
|
|
10462
|
-
else if (n.type == "AssignmentPattern")
|
|
10463
|
-
else if (n.type == "ArrayPattern") for (let e of n.elements ?? [])
|
|
10478
|
+
else if (n.type == "RestElement") No(n.argument, t);
|
|
10479
|
+
else if (n.type == "AssignmentPattern") No(n.left, t);
|
|
10480
|
+
else if (n.type == "ArrayPattern") for (let e of n.elements ?? []) No(e, t);
|
|
10464
10481
|
else if (n.type == "ObjectPattern") for (let e of n.properties ?? []) {
|
|
10465
10482
|
let n = e;
|
|
10466
|
-
|
|
10483
|
+
No(n.type == "RestElement" ? n.argument : n.value, t);
|
|
10467
10484
|
}
|
|
10468
10485
|
}
|
|
10469
|
-
function
|
|
10486
|
+
function Po(e) {
|
|
10470
10487
|
if (typeof e != "object" || !e) return;
|
|
10471
10488
|
let t = e;
|
|
10472
10489
|
if (t.type == "Identifier" && typeof t.name == "string") return t.name;
|
|
10473
10490
|
if (t.type == "StringLiteral" && typeof t.value == "string") return t.value;
|
|
10474
10491
|
}
|
|
10475
|
-
function
|
|
10492
|
+
function Fo(e, t, n) {
|
|
10476
10493
|
let r;
|
|
10477
10494
|
try {
|
|
10478
10495
|
r = Rn(t, {
|
|
@@ -10498,11 +10515,11 @@ function Po(e, t, n) {
|
|
|
10498
10515
|
let e = t.specifiers.flatMap((e) => {
|
|
10499
10516
|
if (e.type == "ImportNamespaceSpecifier") return [];
|
|
10500
10517
|
if (e.type == "ImportDefaultSpecifier") return ["default"];
|
|
10501
|
-
let t =
|
|
10518
|
+
let t = Po(e.imported);
|
|
10502
10519
|
return t == null ? [] : [t];
|
|
10503
10520
|
});
|
|
10504
10521
|
a.push({
|
|
10505
|
-
...
|
|
10522
|
+
...Mo(t.source),
|
|
10506
10523
|
imported: e,
|
|
10507
10524
|
specifier: t.source.value
|
|
10508
10525
|
});
|
|
@@ -10516,7 +10533,7 @@ function Po(e, t, n) {
|
|
|
10516
10533
|
if (t.source != null) {
|
|
10517
10534
|
n.push({
|
|
10518
10535
|
code: "module.unsupported-import",
|
|
10519
|
-
...
|
|
10536
|
+
...Mo(t.source),
|
|
10520
10537
|
message: `CodeModule "${e}" must import before re-exporting values.`,
|
|
10521
10538
|
path: Z(e),
|
|
10522
10539
|
values: {
|
|
@@ -10526,10 +10543,10 @@ function Po(e, t, n) {
|
|
|
10526
10543
|
});
|
|
10527
10544
|
continue;
|
|
10528
10545
|
}
|
|
10529
|
-
if (t.declaration?.type == "VariableDeclaration") for (let e of t.declaration.declarations)
|
|
10546
|
+
if (t.declaration?.type == "VariableDeclaration") for (let e of t.declaration.declarations) No(e.id, i);
|
|
10530
10547
|
else (t.declaration?.type == "FunctionDeclaration" || t.declaration?.type == "ClassDeclaration") && t.declaration.id != null && i.add(t.declaration.id.name);
|
|
10531
10548
|
for (let e of t.specifiers) {
|
|
10532
|
-
let t =
|
|
10549
|
+
let t = Po(e.exported);
|
|
10533
10550
|
t != null && i.add(t);
|
|
10534
10551
|
}
|
|
10535
10552
|
}
|
|
@@ -10543,19 +10560,19 @@ function Po(e, t, n) {
|
|
|
10543
10560
|
let r = t, i = r.callee;
|
|
10544
10561
|
r.type == "ImportExpression" || r.type == "CallExpression" && i?.type == "Import" ? n.push({
|
|
10545
10562
|
code: "module.dynamic-import",
|
|
10546
|
-
...
|
|
10563
|
+
...Mo(r),
|
|
10547
10564
|
message: `CodeModule "${e}" cannot use dynamic import.`,
|
|
10548
10565
|
path: Z(e),
|
|
10549
10566
|
values: { moduleId: e }
|
|
10550
10567
|
}) : r.type == "CallExpression" && i?.type == "Identifier" && i.name == "require" ? n.push({
|
|
10551
10568
|
code: "module.commonjs",
|
|
10552
|
-
...
|
|
10569
|
+
...Mo(r),
|
|
10553
10570
|
message: `CodeModule "${e}" cannot use CommonJS require.`,
|
|
10554
10571
|
path: Z(e),
|
|
10555
10572
|
values: { moduleId: e }
|
|
10556
10573
|
}) : (r.type == "CallExpression" && i?.type == "Identifier" && (i.name == "eval" || i.name == "Function") || r.type == "NewExpression" && i?.type == "Identifier" && i.name == "Function") && n.push({
|
|
10557
10574
|
code: "module.dynamic-code",
|
|
10558
|
-
...
|
|
10575
|
+
...Mo(r),
|
|
10559
10576
|
message: `CodeModule "${e}" cannot evaluate dynamic code.`,
|
|
10560
10577
|
path: Z(e),
|
|
10561
10578
|
values: { moduleId: e }
|
|
@@ -10567,14 +10584,14 @@ function Po(e, t, n) {
|
|
|
10567
10584
|
imports: a
|
|
10568
10585
|
};
|
|
10569
10586
|
}
|
|
10570
|
-
function
|
|
10587
|
+
function Io(e) {
|
|
10571
10588
|
return /^\.\/(.+)\.mjs$/.exec(e)?.[1];
|
|
10572
10589
|
}
|
|
10573
|
-
function
|
|
10590
|
+
function Lo(e, t) {
|
|
10574
10591
|
return e < t ? -1 : +(e > t);
|
|
10575
10592
|
}
|
|
10576
|
-
function
|
|
10577
|
-
return
|
|
10593
|
+
function Ro(e, t) {
|
|
10594
|
+
return Lo(e.path, t.path) || e.line - t.line || e.column - t.column || Lo(e.code, t.code) || Lo(e.message, t.message);
|
|
10578
10595
|
}
|
|
10579
10596
|
function Q(e, t, n, r) {
|
|
10580
10597
|
return {
|
|
@@ -10586,21 +10603,21 @@ function Q(e, t, n, r) {
|
|
|
10586
10603
|
...r == null ? {} : { values: r }
|
|
10587
10604
|
};
|
|
10588
10605
|
}
|
|
10589
|
-
function
|
|
10606
|
+
function zo(e, t) {
|
|
10590
10607
|
if (e === t) return !0;
|
|
10591
10608
|
if (e == null || t == null || typeof e != "object" || typeof t != "object") return !1;
|
|
10592
|
-
if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) =>
|
|
10609
|
+
if (Array.isArray(e) || Array.isArray(t)) return Array.isArray(e) && Array.isArray(t) && e.length == t.length && e.every((e, n) => zo(e, t[n]));
|
|
10593
10610
|
let n = Object.entries(e), r = t;
|
|
10594
|
-
return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) &&
|
|
10611
|
+
return n.length == Object.keys(r).length && n.every(([e, t]) => Object.hasOwn(r, e) && zo(t, r[e]));
|
|
10595
10612
|
}
|
|
10596
|
-
function
|
|
10613
|
+
function Bo(e) {
|
|
10597
10614
|
return typeof e == "object" && e && !Array.isArray(e) ? e : void 0;
|
|
10598
10615
|
}
|
|
10599
|
-
function
|
|
10616
|
+
function Vo(e) {
|
|
10600
10617
|
return Array.isArray(e) ? e : void 0;
|
|
10601
10618
|
}
|
|
10602
|
-
function
|
|
10603
|
-
if (Array.isArray(e)) return e.some((e) =>
|
|
10619
|
+
function Ho(e, t) {
|
|
10620
|
+
if (Array.isArray(e)) return e.some((e) => Ho(e, t));
|
|
10604
10621
|
switch (e) {
|
|
10605
10622
|
case void 0: return !0;
|
|
10606
10623
|
case "null": return t == null;
|
|
@@ -10615,16 +10632,16 @@ function Vo(e, t) {
|
|
|
10615
10632
|
}
|
|
10616
10633
|
function $(e, t) {
|
|
10617
10634
|
if (typeof t == "boolean") return t;
|
|
10618
|
-
let n =
|
|
10635
|
+
let n = Bo(t);
|
|
10619
10636
|
if (n == null) return !1;
|
|
10620
|
-
let r =
|
|
10637
|
+
let r = Vo(n.allOf);
|
|
10621
10638
|
if (r != null && !r.every((t) => $(e, t))) return !1;
|
|
10622
|
-
let i =
|
|
10639
|
+
let i = Vo(n.anyOf);
|
|
10623
10640
|
if (i != null && !i.some((t) => $(e, t))) return !1;
|
|
10624
|
-
let a =
|
|
10625
|
-
if (a != null && a.filter((t) => $(e, t)).length != 1 || n.not != null && $(e, n.not) || n.const != null && !
|
|
10626
|
-
let o =
|
|
10627
|
-
if (o != null && !o.some((t) =>
|
|
10641
|
+
let a = Vo(n.oneOf);
|
|
10642
|
+
if (a != null && a.filter((t) => $(e, t)).length != 1 || n.not != null && $(e, n.not) || n.const != null && !zo(e, n.const)) return !1;
|
|
10643
|
+
let o = Vo(n.enum);
|
|
10644
|
+
if (o != null && !o.some((t) => zo(e, t)) || !Ho(n.type, e)) return !1;
|
|
10628
10645
|
if (typeof e == "string") {
|
|
10629
10646
|
if (typeof n.minLength == "number" && e.length < n.minLength || typeof n.maxLength == "number" && e.length > n.maxLength) return !1;
|
|
10630
10647
|
if (typeof n.pattern == "string") try {
|
|
@@ -10635,9 +10652,9 @@ function $(e, t) {
|
|
|
10635
10652
|
}
|
|
10636
10653
|
if (typeof e == "number" && (typeof n.minimum == "number" && e < n.minimum || typeof n.maximum == "number" && e > n.maximum || typeof n.exclusiveMinimum == "number" && e <= n.exclusiveMinimum || typeof n.exclusiveMaximum == "number" && e >= n.exclusiveMaximum) || Array.isArray(e) && (typeof n.minItems == "number" && e.length < n.minItems || typeof n.maxItems == "number" && e.length > n.maxItems || n.items != null && !e.every((e) => $(e, n.items)))) return !1;
|
|
10637
10654
|
if (typeof e == "object" && e && !Array.isArray(e)) {
|
|
10638
|
-
let t = e, r =
|
|
10655
|
+
let t = e, r = Vo(n.required);
|
|
10639
10656
|
if (r != null && r.some((e) => typeof e != "string" || !Object.hasOwn(t, e))) return !1;
|
|
10640
|
-
let i =
|
|
10657
|
+
let i = Bo(n.properties ?? {});
|
|
10641
10658
|
if (i == null) return !1;
|
|
10642
10659
|
for (let [e, r] of Object.entries(t)) {
|
|
10643
10660
|
let t = i[e];
|
|
@@ -10649,10 +10666,10 @@ function $(e, t) {
|
|
|
10649
10666
|
}
|
|
10650
10667
|
return !0;
|
|
10651
10668
|
}
|
|
10652
|
-
function
|
|
10653
|
-
if (t === !0 ||
|
|
10654
|
-
if (e === !0 ||
|
|
10655
|
-
let i =
|
|
10669
|
+
function Uo(e, t, n = !1, r = !1) {
|
|
10670
|
+
if (t === !0 || zo(t, {})) return !0;
|
|
10671
|
+
if (e === !0 || zo(e, {}) || e === !1 || t === !1) return !1;
|
|
10672
|
+
let i = Bo(e), a = Bo(t);
|
|
10656
10673
|
return i == null || a == null ? !1 : ro({
|
|
10657
10674
|
nullable: n,
|
|
10658
10675
|
packageId: void 0,
|
|
@@ -10663,22 +10680,22 @@ function Ho(e, t, n = !1, r = !1) {
|
|
|
10663
10680
|
schema: a
|
|
10664
10681
|
}).kind == "compatible";
|
|
10665
10682
|
}
|
|
10666
|
-
function
|
|
10667
|
-
return
|
|
10683
|
+
function Wo(e, t) {
|
|
10684
|
+
return Uo(e.jsonSchema, t.jsonSchema, e.nullable, t.nullable);
|
|
10668
10685
|
}
|
|
10669
|
-
function
|
|
10670
|
-
let t =
|
|
10671
|
-
return t != null && n?.includes("string") ?
|
|
10686
|
+
function Go(e) {
|
|
10687
|
+
let t = Bo(e), n = Vo(t?.type);
|
|
10688
|
+
return t != null && n?.includes("string") ? Uo({ type: "string" }, {
|
|
10672
10689
|
...t,
|
|
10673
10690
|
type: "string"
|
|
10674
|
-
}) :
|
|
10691
|
+
}) : Uo({ type: "string" }, e);
|
|
10675
10692
|
}
|
|
10676
|
-
function
|
|
10693
|
+
function Ko(e) {
|
|
10677
10694
|
if (typeof e != "object" || !e) return !1;
|
|
10678
10695
|
let t = e;
|
|
10679
|
-
return t.contentMediaType == "oomol/ref" || Object.values(t).some(
|
|
10696
|
+
return t.contentMediaType == "oomol/ref" || Object.values(t).some(Ko);
|
|
10680
10697
|
}
|
|
10681
|
-
function
|
|
10698
|
+
function qo(e, t, n, r, i) {
|
|
10682
10699
|
if (t.kind == "webhook") {
|
|
10683
10700
|
let e = /* @__PURE__ */ new Set();
|
|
10684
10701
|
for (let [n, a] of t.inputsDef.entries()) e.has(a.handle) && i.push(Q("trigger.input-duplicate", `Webhook Trigger input "${a.handle}" is declared more than once.`, `${r}/inputsDef/${n}/handle`, { input: a.handle })), e.add(a.handle);
|
|
@@ -10687,22 +10704,27 @@ function Ko(e, t, n, r, i) {
|
|
|
10687
10704
|
if (t.kind == "cron") return;
|
|
10688
10705
|
let a = n.bindings[t.bindingId];
|
|
10689
10706
|
a == null ? i.push(Q("trigger.connection-missing", `Trigger Connection binding "${t.bindingId}" does not exist.`, `${r}/bindingId`, { bindingId: t.bindingId })) : a.kind != "connection" && i.push(Q("trigger.connection-invalid", `Trigger binding "${t.bindingId}" must be a Connection.`, `${r}/bindingId`, { bindingId: t.bindingId }));
|
|
10690
|
-
let o = Bo(
|
|
10707
|
+
let o = Vo(Bo(t.definition.configSchema)?.required)?.filter((e) => typeof e == "string" && !Object.hasOwn(t.config, e)) ?? [];
|
|
10691
10708
|
o.length > 0 ? i.push(Q("trigger.config-incomplete", `Complete the required Trigger config fields: ${o.join(", ")}.`, `${r}/config`, { fields: o.join(", ") })) : $(t.config, t.definition.configSchema) || i.push(Q("trigger.config-invalid", `Trigger "${e}" config does not match its fixed definition.`, `${r}/config`, { triggerId: e }));
|
|
10692
10709
|
}
|
|
10693
|
-
function
|
|
10710
|
+
function Jo(e, t) {
|
|
10694
10711
|
switch (t.kind) {
|
|
10695
10712
|
case "condition": return { [t.input.handle]: t.input };
|
|
10696
10713
|
case "value": return {};
|
|
10697
10714
|
case "subflow": return oo(e.subflows[t.subflowId]?.inputs ?? []);
|
|
10698
|
-
case "task": return oo(t.task == null ? e.tasks[t.taskId]?.inputs ?? [] : t.task.inputs);
|
|
10715
|
+
case "task": return oo([...t.task == null ? e.tasks[t.taskId]?.inputs ?? [] : t.task.inputs, ...t.additionalInputs ?? []]);
|
|
10716
|
+
case "wait": return { value: {
|
|
10717
|
+
jsonSchema: {},
|
|
10718
|
+
nullable: !0,
|
|
10719
|
+
value: null
|
|
10720
|
+
} };
|
|
10699
10721
|
case "cron":
|
|
10700
10722
|
case "integration":
|
|
10701
10723
|
case "poll":
|
|
10702
10724
|
case "webhook": return {};
|
|
10703
10725
|
}
|
|
10704
10726
|
}
|
|
10705
|
-
function
|
|
10727
|
+
function Yo(e, t) {
|
|
10706
10728
|
switch (t.kind) {
|
|
10707
10729
|
case "condition": {
|
|
10708
10730
|
let e = [...t.cases.map((e) => e.output), ...t.defaultOutput == null ? [] : [t.defaultOutput]];
|
|
@@ -10711,26 +10733,30 @@ function Jo(e, t) {
|
|
|
10711
10733
|
case "value": return oo(t.values);
|
|
10712
10734
|
case "subflow": return oo(e.subflows[t.subflowId]?.outputs ?? []);
|
|
10713
10735
|
case "task": return oo(t.task == null ? e.tasks[t.taskId]?.outputs ?? [] : t.task.outputs);
|
|
10736
|
+
case "wait": return Object.fromEntries(t.actions.map((e) => [e, {
|
|
10737
|
+
jsonSchema: {},
|
|
10738
|
+
nullable: !0
|
|
10739
|
+
}]));
|
|
10714
10740
|
case "cron":
|
|
10715
10741
|
case "integration":
|
|
10716
10742
|
case "poll":
|
|
10717
10743
|
case "webhook": return { payload: {
|
|
10718
|
-
jsonSchema:
|
|
10744
|
+
jsonSchema: jo(t),
|
|
10719
10745
|
nullable: !1
|
|
10720
10746
|
} };
|
|
10721
10747
|
}
|
|
10722
10748
|
}
|
|
10723
|
-
function
|
|
10749
|
+
function Xo(e, t, n, r, i, a, o) {
|
|
10724
10750
|
switch (e.kind) {
|
|
10725
10751
|
case "binding":
|
|
10726
|
-
n.bindings[e.bindingId] == null ? o.push(Q("graph.binding-missing", `Binding "${e.bindingId}" does not exist.`, a, { bindingId: e.bindingId })) : n.bindings[e.bindingId].kind == "variable" ? i != null && !
|
|
10752
|
+
n.bindings[e.bindingId] == null ? o.push(Q("graph.binding-missing", `Binding "${e.bindingId}" does not exist.`, a, { bindingId: e.bindingId })) : n.bindings[e.bindingId].kind == "variable" ? i != null && !Go(i.jsonSchema) && o.push(Q("graph.variable-incompatible", `Variable binding "${e.bindingId}" is not compatible with this input.`, a, { bindingId: e.bindingId })) : o.push(Q("graph.binding-invalid", `Binding "${e.bindingId}" must be a Variable.`, a, { bindingId: e.bindingId }));
|
|
10727
10753
|
return;
|
|
10728
10754
|
case "flow": {
|
|
10729
10755
|
let t = r != null && Object.hasOwn(r, e.input) ? r[e.input] : void 0;
|
|
10730
10756
|
return t == null ? o.push(Q("graph.source-missing", `Flow input "${e.input}" does not exist in this graph.`, a, {
|
|
10731
10757
|
input: e.input,
|
|
10732
10758
|
variant: "flow-input"
|
|
10733
|
-
})) : i != null && !
|
|
10759
|
+
})) : i != null && !Wo(t, i) && o.push(Q("graph.flow-input-incompatible", `Flow input "${e.input}" is not compatible with this input.`, a, { input: e.input })), t;
|
|
10734
10760
|
}
|
|
10735
10761
|
case "node": {
|
|
10736
10762
|
let r = t.nodes[e.nodeId];
|
|
@@ -10741,26 +10767,79 @@ function Yo(e, t, n, r, i, a, o) {
|
|
|
10741
10767
|
}));
|
|
10742
10768
|
return;
|
|
10743
10769
|
}
|
|
10744
|
-
let s =
|
|
10770
|
+
let s = Yo(n, r)[e.output];
|
|
10745
10771
|
return s == null ? o.push(Q("graph.source-missing", `Upstream node "${e.nodeId}" does not expose output "${e.output}".`, a, {
|
|
10746
10772
|
nodeId: e.nodeId,
|
|
10747
10773
|
output: e.output,
|
|
10748
10774
|
variant: "output"
|
|
10749
|
-
})) : i != null && !
|
|
10775
|
+
})) : i != null && !Wo(s, i) && o.push(Q("graph.node-output-incompatible", `Upstream node "${e.nodeId}" output "${e.output}" is not compatible with this input.`, a, {
|
|
10750
10776
|
nodeId: e.nodeId,
|
|
10751
10777
|
output: e.output
|
|
10752
10778
|
})), s;
|
|
10753
10779
|
}
|
|
10754
10780
|
}
|
|
10755
10781
|
}
|
|
10756
|
-
function
|
|
10782
|
+
function Zo(e, t) {
|
|
10757
10783
|
let n = /* @__PURE__ */ new Set();
|
|
10758
10784
|
if (!("inputs" in t)) return n;
|
|
10759
|
-
|
|
10785
|
+
let r = [...Object.values(t.inputs), ...t.kind == "wait" && t.notification != null ? Object.values(t.notification.inputs) : []];
|
|
10786
|
+
for (let t of r) if (t.kind == "sources") for (let r of t.sources) r.kind == "node" && e.nodes[r.nodeId] != null && n.add(r.nodeId);
|
|
10760
10787
|
return n;
|
|
10761
10788
|
}
|
|
10762
|
-
function
|
|
10763
|
-
let
|
|
10789
|
+
function Qo(e, t, n, r, i, a, o, s) {
|
|
10790
|
+
let c = /* @__PURE__ */ new Set([
|
|
10791
|
+
"actions",
|
|
10792
|
+
"concurrency",
|
|
10793
|
+
"description",
|
|
10794
|
+
"icon",
|
|
10795
|
+
"inputs",
|
|
10796
|
+
"kind",
|
|
10797
|
+
"name",
|
|
10798
|
+
"notification",
|
|
10799
|
+
"prompt"
|
|
10800
|
+
]), l = Object.keys(t).filter((e) => !c.has(e));
|
|
10801
|
+
if (l.length > 0 && s.push(Q("wait.field-unsupported", `Wait node "${e}" contains unsupported fields: ${l.join(", ")}.`, o, {
|
|
10802
|
+
fields: l.join(", "),
|
|
10803
|
+
nodeId: e
|
|
10804
|
+
})), a || s.push(Q("wait.not-allowed", "Wait nodes are only allowed in Flows.", o)), t.concurrency != 1 && s.push(Q("wait.concurrency-invalid", "Wait concurrency must be 1.", `${o}/concurrency`)), (typeof t.prompt != "string" || t.prompt.trim().length == 0 || [...t.prompt].length > 1e3) && s.push(Q("wait.prompt-invalid", "Wait prompt must contain between 1 and 1,000 Unicode code points.", `${o}/prompt`)), (!Array.isArray(t.actions) || !(t.actions.length == 1 && t.actions[0] == "continue" || t.actions.length == 2 && t.actions[0] == "approve" && t.actions[1] == "reject")) && s.push(Q("wait.actions-invalid", "Wait actions must be [\"continue\"] or [\"approve\", \"reject\"].", `${o}/actions`)), t.notification == null) return;
|
|
10805
|
+
let u = t.notification;
|
|
10806
|
+
if (typeof u != "object" || Array.isArray(u)) {
|
|
10807
|
+
s.push(Q("wait.notification-invalid", "Wait notification must be an object.", `${o}/notification`));
|
|
10808
|
+
return;
|
|
10809
|
+
}
|
|
10810
|
+
let d = u;
|
|
10811
|
+
if (Object.keys(d).length != 3 || !Object.hasOwn(d, "inputs") || !Object.hasOwn(d, "messageHandle") || !Object.hasOwn(d, "taskId") || typeof d.taskId != "string" || typeof d.messageHandle != "string" || d.inputs == null || typeof d.inputs != "object" || Array.isArray(d.inputs)) {
|
|
10812
|
+
s.push(Q("wait.notification-invalid", "Wait notification has an invalid shape.", `${o}/notification`));
|
|
10813
|
+
return;
|
|
10814
|
+
}
|
|
10815
|
+
let f = r.tasks[d.taskId];
|
|
10816
|
+
if (f == null) {
|
|
10817
|
+
s.push(Q("graph.target-missing", `Task "${d.taskId}" does not exist.`, `${o}/notification/taskId`, {
|
|
10818
|
+
taskId: d.taskId,
|
|
10819
|
+
variant: "task"
|
|
10820
|
+
}));
|
|
10821
|
+
return;
|
|
10822
|
+
}
|
|
10823
|
+
f.executor.kind != "connector" && s.push(Q("wait.notification-task-invalid", "Wait notification must use a Connector Task.", `${o}/notification/taskId`));
|
|
10824
|
+
let p = oo(f.inputs);
|
|
10825
|
+
p[d.messageHandle] ?? s.push(Q("wait.notification-message-missing", `Notification Task "${d.taskId}" does not expose input "${d.messageHandle}".`, `${o}/notification/messageHandle`));
|
|
10826
|
+
let m = d.inputs;
|
|
10827
|
+
Object.hasOwn(m, d.messageHandle) && s.push(Q("wait.notification-message-mapped", "The notification message input is populated by the system.", `${o}/notification/inputs`));
|
|
10828
|
+
for (let [t, a] of Object.entries(m)) {
|
|
10829
|
+
let c = `${o}/notification/inputs/${t}`, l = p[t];
|
|
10830
|
+
if (l == null) {
|
|
10831
|
+
s.push(Q("graph.input-missing", `Notification Task "${d.taskId}" does not expose input "${t}".`, c, {
|
|
10832
|
+
handle: t,
|
|
10833
|
+
nodeId: e
|
|
10834
|
+
}));
|
|
10835
|
+
continue;
|
|
10836
|
+
}
|
|
10837
|
+
if (a.kind == "sources") for (let e of a.sources) Xo(e, n, r, i, l, c, s);
|
|
10838
|
+
}
|
|
10839
|
+
for (let [e, t] of Object.entries(p)) e == d.messageHandle || Object.hasOwn(m, e) || Object.hasOwn(t, "value") || s.push(Q("wait.notification-input-missing", `Notification input "${e}" requires a mapping or default value.`, `${o}/notification/inputs`, { handle: e }));
|
|
10840
|
+
}
|
|
10841
|
+
function $o(e, t, n) {
|
|
10842
|
+
let r = new Map(Object.entries(e.nodes).map(([t, n]) => [t, Zo(e, n)]));
|
|
10764
10843
|
for (; r.size > 0;) {
|
|
10765
10844
|
let e = [...r].filter(([, e]) => e.size == 0).map(([e]) => e);
|
|
10766
10845
|
if (e.length == 0) {
|
|
@@ -10772,11 +10851,11 @@ function Zo(e, t, n) {
|
|
|
10772
10851
|
for (let t of r.values()) for (let n of e) t.delete(n);
|
|
10773
10852
|
}
|
|
10774
10853
|
}
|
|
10775
|
-
function
|
|
10854
|
+
function es(e, t, n, r, i, a) {
|
|
10776
10855
|
for (let [o, s] of Object.entries(e.nodes)) {
|
|
10777
10856
|
let c = `${i}/nodes/${o}`;
|
|
10778
10857
|
if (!("inputs" in s)) {
|
|
10779
|
-
|
|
10858
|
+
Ko(jo(s)) && a.push(Q("graph.schema-unsupported", "Runtime Ref schemas are not supported.", c)), r ? qo(o, s, t, c, a) : a.push(Q("graph.trigger-not-allowed", "Trigger nodes are only allowed in Flows.", c));
|
|
10780
10859
|
continue;
|
|
10781
10860
|
}
|
|
10782
10861
|
s.kind == "task" && s.task == null && t.tasks[s.taskId] == null ? a.push(Q("graph.target-missing", `Task "${s.taskId}" does not exist.`, `${c}/taskId`, {
|
|
@@ -10786,8 +10865,15 @@ function Qo(e, t, n, r, i, a) {
|
|
|
10786
10865
|
subflowId: s.subflowId,
|
|
10787
10866
|
variant: "subflow"
|
|
10788
10867
|
}));
|
|
10789
|
-
let l =
|
|
10790
|
-
|
|
10868
|
+
let l = Jo(t, s);
|
|
10869
|
+
if (s.kind == "task") {
|
|
10870
|
+
let e = [...s.task == null ? t.tasks[s.taskId]?.inputs ?? [] : s.task.inputs, ...s.additionalInputs ?? []], n = /* @__PURE__ */ new Set();
|
|
10871
|
+
for (let t of e) "handle" in t && (n.has(t.handle) && a.push(Q("graph.input-duplicate", `Node "${o}" declares input "${t.handle}" more than once.`, c, {
|
|
10872
|
+
handle: t.handle,
|
|
10873
|
+
nodeId: o
|
|
10874
|
+
})), n.add(t.handle));
|
|
10875
|
+
}
|
|
10876
|
+
[...Object.values(l), ...Object.values(Yo(t, s))].some((e) => Ko(e.jsonSchema)) && a.push(Q("graph.schema-unsupported", "Runtime Ref schemas are not supported.", c));
|
|
10791
10877
|
let u = new Set(Object.keys(l));
|
|
10792
10878
|
for (let [r, i] of Object.entries(s.inputs)) {
|
|
10793
10879
|
let s = `${c}/inputs/${r}`;
|
|
@@ -10797,19 +10883,19 @@ function Qo(e, t, n, r, i, a) {
|
|
|
10797
10883
|
})), i.kind == "sources") {
|
|
10798
10884
|
let o = i.sources.filter((e) => e.kind == "binding" && t.bindings[e.bindingId]?.kind == "variable");
|
|
10799
10885
|
o.length > 0 && (o.length != 1 || i.sources.length != 1) && a.push(Q("graph.variable-source-mixed", "A Variable must be the only source for an input.", s));
|
|
10800
|
-
for (let o of i.sources)
|
|
10886
|
+
for (let o of i.sources) Xo(o, e, t, n, l[r], s, a);
|
|
10801
10887
|
}
|
|
10802
10888
|
}
|
|
10803
|
-
if (s.kind != "condition") continue;
|
|
10889
|
+
if (s.kind == "wait" && Qo(o, s, e, t, n, r, c, a), s.kind != "condition") continue;
|
|
10804
10890
|
let d = /* @__PURE__ */ new Set();
|
|
10805
10891
|
for (let [e, t] of s.cases.entries()) {
|
|
10806
10892
|
d.has(t.output) && a.push(Q("condition.output-duplicate", `Condition output "${t.output}" is declared more than once.`, `${c}/cases/${e}/output`, { output: t.output })), d.add(t.output);
|
|
10807
10893
|
for (let [n, r] of t.expressions.entries()) r.input != s.input.handle && a.push(Q("condition.input-missing", `Condition expression references unknown input "${r.input}".`, `${c}/cases/${e}/expressions/${n}/input`, { input: r.input }));
|
|
10808
10894
|
}
|
|
10809
10895
|
}
|
|
10810
|
-
|
|
10896
|
+
$o(e, i, a);
|
|
10811
10897
|
}
|
|
10812
|
-
function
|
|
10898
|
+
function ts(e, t) {
|
|
10813
10899
|
let n = /* @__PURE__ */ new Set(), r = [];
|
|
10814
10900
|
function i(a, o) {
|
|
10815
10901
|
for (let [s, c] of Object.entries(a.nodes)) {
|
|
@@ -10825,42 +10911,42 @@ function $o(e, t) {
|
|
|
10825
10911
|
}
|
|
10826
10912
|
i(e.graph, "/document/graph");
|
|
10827
10913
|
}
|
|
10828
|
-
function
|
|
10914
|
+
function ns(e, t) {
|
|
10829
10915
|
let n = [];
|
|
10830
10916
|
for (let [t, r] of Object.entries(e.document.bindings)) r.kind == "variable" && !ao(r.target) && n.push(Q("binding.variable-invalid", `Variable binding "${t}" has an invalid target.`, `/document/bindings/${t}/target`, { bindingId: t }));
|
|
10831
|
-
|
|
10917
|
+
es(e.document.graph, e.document, void 0, !0, "/document/graph", n);
|
|
10832
10918
|
for (let r of [...t.dependencies.subflows].toSorted()) {
|
|
10833
10919
|
let t = e.document.subflows[r];
|
|
10834
10920
|
if (t == null) continue;
|
|
10835
10921
|
let i = `/document/subflows/${r}`, a = oo(t.inputs);
|
|
10836
|
-
|
|
10922
|
+
es(t.graph, e.document, a, !1, `${i}/graph`, n);
|
|
10837
10923
|
for (let r of t.outputs) for (let o of r.sources) {
|
|
10838
|
-
let s =
|
|
10839
|
-
s != null && !
|
|
10924
|
+
let s = Xo(o, t.graph, e.document, a, void 0, `${i}/outputs/${r.handle}/sources`, n);
|
|
10925
|
+
s != null && !Wo(s, r) && n.push(Q("graph.subflow-output-incompatible", `A source is not compatible with Subflow output "${r.handle}".`, `${i}/outputs/${r.handle}/sources`, { output: r.handle }));
|
|
10840
10926
|
}
|
|
10841
10927
|
}
|
|
10842
|
-
return
|
|
10928
|
+
return ts(e.document, n), n;
|
|
10843
10929
|
}
|
|
10844
|
-
function
|
|
10930
|
+
function rs(e, t) {
|
|
10845
10931
|
if (typeof t != "object" || !t || Array.isArray(t)) return "invalid";
|
|
10846
10932
|
let n = e.document.graph;
|
|
10847
10933
|
for (let [r, i] of Object.entries(t)) {
|
|
10848
10934
|
let t = n.nodes[r];
|
|
10849
10935
|
if (t == null || !("inputs" in t) || typeof i != "object" || !i || Array.isArray(i)) return "invalid";
|
|
10850
|
-
let a =
|
|
10936
|
+
let a = Jo(e.document, t);
|
|
10851
10937
|
for (let e of Object.keys(i)) {
|
|
10852
10938
|
let n = a[e];
|
|
10853
|
-
if (n == null ||
|
|
10939
|
+
if (n == null || Ko(n.jsonSchema) || t.inputs[e] != null || Object.hasOwn(n, "value")) return "invalid";
|
|
10854
10940
|
}
|
|
10855
10941
|
}
|
|
10856
10942
|
return "valid";
|
|
10857
10943
|
}
|
|
10858
|
-
function
|
|
10944
|
+
function is(e, t, n) {
|
|
10859
10945
|
let r = [], i = /* @__PURE__ */ new Map();
|
|
10860
10946
|
for (let n of t.toSorted()) {
|
|
10861
10947
|
let t = e.modules[n];
|
|
10862
10948
|
if (t == null) continue;
|
|
10863
|
-
let a =
|
|
10949
|
+
let a = Fo(n, t.source, r);
|
|
10864
10950
|
a != null && i.set(n, a);
|
|
10865
10951
|
}
|
|
10866
10952
|
for (let a of t.toSorted()) {
|
|
@@ -10884,7 +10970,7 @@ function ns(e, t, n) {
|
|
|
10884
10970
|
});
|
|
10885
10971
|
continue;
|
|
10886
10972
|
}
|
|
10887
|
-
let o =
|
|
10973
|
+
let o = Io(c.specifier);
|
|
10888
10974
|
if (o == null) {
|
|
10889
10975
|
r.push({
|
|
10890
10976
|
code: "module.unsupported-import",
|
|
@@ -10956,12 +11042,12 @@ function ns(e, t, n) {
|
|
|
10956
11042
|
diagnostics: r
|
|
10957
11043
|
};
|
|
10958
11044
|
}
|
|
10959
|
-
function
|
|
10960
|
-
return
|
|
11045
|
+
function as(e, t, n) {
|
|
11046
|
+
return is(e, t, n).diagnostics.toSorted(Ro);
|
|
10961
11047
|
}
|
|
10962
|
-
async function
|
|
10963
|
-
let n = await
|
|
10964
|
-
r.diagnostics.push(...
|
|
11048
|
+
async function os(e, t) {
|
|
11049
|
+
let n = await ko(e), r = is(e, [...n.dependencies.modules], t);
|
|
11050
|
+
r.diagnostics.push(...ns(e, n));
|
|
10965
11051
|
let i = [["/document/graph", e.document.graph], ...[...n.dependencies.subflows].toSorted().flatMap((t) => {
|
|
10966
11052
|
let n = e.document.subflows[t];
|
|
10967
11053
|
return n == null ? [] : [[`/document/subflows/${t}/graph`, n.graph]];
|
|
@@ -11005,17 +11091,17 @@ async function is(e, t) {
|
|
|
11005
11091
|
values: { taskId: t }
|
|
11006
11092
|
});
|
|
11007
11093
|
}
|
|
11008
|
-
let o = r.diagnostics.toSorted(
|
|
11094
|
+
let o = r.diagnostics.toSorted(Ro);
|
|
11009
11095
|
return {
|
|
11010
11096
|
closure: n,
|
|
11011
11097
|
diagnostics: o,
|
|
11012
11098
|
valid: o.length == 0
|
|
11013
11099
|
};
|
|
11014
11100
|
}
|
|
11015
|
-
async function
|
|
11101
|
+
async function ss(e, t) {
|
|
11016
11102
|
let n = Wn(t);
|
|
11017
11103
|
if (n == null) return { kind: "engine-unsupported" };
|
|
11018
|
-
let r = await
|
|
11104
|
+
let r = await os(e, n);
|
|
11019
11105
|
if (!r.valid) return {
|
|
11020
11106
|
kind: "flow-invalid",
|
|
11021
11107
|
validation: r
|
|
@@ -11034,7 +11120,7 @@ async function as(e, t) {
|
|
|
11034
11120
|
validation: r
|
|
11035
11121
|
};
|
|
11036
11122
|
}
|
|
11037
|
-
function
|
|
11123
|
+
function cs(e, t, n) {
|
|
11038
11124
|
if (Object.hasOwn(e.modules, t)) return {
|
|
11039
11125
|
engineContract: e.engineContract,
|
|
11040
11126
|
engineDigest: n,
|
|
@@ -11043,4 +11129,4 @@ function os(e, t, n) {
|
|
|
11043
11129
|
};
|
|
11044
11130
|
}
|
|
11045
11131
|
//#endregion
|
|
11046
|
-
export {
|
|
11132
|
+
export { cs as createRuntimeProgram, ko as flowClosure, Oo as flowDependencies, $ as matchesSchema, ss as prepareFlow, jo as triggerPayloadSchema, os as validateFlow, rs as validateFlowInputs, as as validateModules, Ao as variableBindings, Go as variableInputCompatible };
|