@malloy-publisher/server 0.0.106 → 0.0.109
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/app/api-doc.yaml +133 -0
- package/dist/app/assets/Chip-DulNumvr.js +1 -0
- package/dist/app/assets/Container-Dn_IEeIp.js +1 -0
- package/dist/app/assets/DialogTitle-CBoB5s1x.js +1 -0
- package/dist/app/assets/Edit-CnTAusNy.js +1 -0
- package/dist/app/assets/FormControlContext-BWbaVxQH.js +1 -0
- package/dist/app/assets/HomePage-vbEJVepI.js +3 -0
- package/dist/app/assets/MainPage-6getdplb.js +1 -0
- package/dist/app/assets/MenuItem-DE8NK-Xy.js +1 -0
- package/dist/app/assets/Modal-PUsNPbDx.js +1 -0
- package/dist/app/assets/ModelPage-Cuqbuu_v.js +2 -0
- package/dist/app/assets/MoreVert-BqUb6vJH.js +1 -0
- package/dist/app/assets/PackagePage-Cc5cjUZ9.js +2 -0
- package/dist/app/assets/ProjectPage-CJbF04bc.js +1 -0
- package/dist/app/assets/RouteError-CTlaesPV.js +1 -0
- package/dist/app/assets/WorkbookPage-CGJZfEXN.js +6 -0
- package/dist/app/assets/index-BV8rQ2ml.css +1 -0
- package/dist/app/assets/index-BVlZ6i8j.js +676 -0
- package/dist/app/assets/index-DdF3z9Gd.js +420 -0
- package/dist/app/assets/{index-CvbMKVwx.js → index-DycfvfsO.js} +7 -7
- package/dist/app/assets/index.es20-DlWN4z3R.js +1 -0
- package/dist/app/assets/index.es23-BDdtxnbW.js +2 -0
- package/dist/app/assets/{index.es231-02O061a5.js → index.es310-AKXDC8rl.js} +1 -1
- package/dist/app/assets/{index.es232-DOZR37hD.js → index.es311-CE0-K0fx.js} +1 -1
- package/dist/app/assets/{index.es235-CwaFVls_.js → index.es314-CsD4AFJi.js} +1 -1
- package/dist/app/assets/{index.es240-BXsCiix7.js → index.es319-BAaFF8nF.js} +1 -1
- package/dist/app/assets/{index.es248-BBXwDGlH.js → index.es327-CLjg00CO.js} +1 -1
- package/dist/app/assets/{index.es249-it6O0zLZ.js → index.es328-Dk49f56D.js} +1 -1
- package/dist/app/assets/{index.es252-BU8jndoZ.js → index.es331-CNjOIk10.js} +1 -1
- package/dist/app/assets/{index.es256-BvZRwMxf.js → index.es335-BeNrivcI.js} +1 -1
- package/dist/app/assets/{index.es259-6-xstYpb.js → index.es338-BhR7SkS5.js} +1 -1
- package/dist/app/assets/{index.es262-BDUOVoIz.js → index.es341-C_6PzCoq.js} +1 -1
- package/dist/app/assets/{index.es263-CHueaYAb.js → index.es342-D1uAr8c1.js} +1 -1
- package/dist/app/assets/{index.es277-CbrHqWmX.js → index.es356-7PPXN4m3.js} +1 -1
- package/dist/app/assets/{index.es278-CI5gPs5v.js → index.es357-CJh2QG0N.js} +1 -1
- package/dist/app/assets/{index.es279-DH9b__8l.js → index.es358-C_zZutkw.js} +1 -1
- package/dist/app/assets/{index.es281-CGN0Pl1D.js → index.es360-DeQ44nE8.js} +1 -1
- package/dist/app/assets/{index.es286-XRt1U2aU.js → index.es365-oFKdnBEe.js} +1 -1
- package/dist/app/assets/{index.es288-DSszyNly.js → index.es367-BUiiHWL7.js} +1 -1
- package/dist/app/assets/{index.es289-xrNpklpB.js → index.es368-Bb8Mmpp1.js} +1 -1
- package/dist/app/assets/{index.es294-B75OnIUq.js → index.es373-C5Q5iXfG.js} +1 -1
- package/dist/app/assets/{index.es295-wxT8LaCU.js → index.es374-s3ewK3v_.js} +1 -1
- package/dist/app/assets/{index.es297-DCQpwhAH.js → index.es376-Dot0I9EF.js} +1 -1
- package/dist/app/assets/{index.es298-Dtm6S7Te.js → index.es377-B6TLwhtH.js} +1 -1
- package/dist/app/assets/{index.es299-CO3NhjF0.js → index.es378-mEifvHi6.js} +1 -1
- package/dist/app/assets/{index.es302-BNx4kwZQ.js → index.es381-DdV8KTBv.js} +1 -1
- package/dist/app/assets/{index.es304-Cslijulp.js → index.es383-B762Qvzb.js} +1 -1
- package/dist/app/assets/{index.es305-Bj5y75UJ.js → index.es384-DBjLFE2E.js} +1 -1
- package/dist/app/assets/{index.es306-BY9A-bfA.js → index.es385-DkDs29_v.js} +1 -1
- package/dist/app/assets/{index.es312-BOpCGR-W.js → index.es391-BOBiTPht.js} +1 -1
- package/dist/app/assets/{index.es313-j4e0V-ax.js → index.es392-BGdYwXRd.js} +1 -1
- package/dist/app/assets/{index.es314-QPXF8A7X.js → index.es393-BnuSumNM.js} +1 -1
- package/dist/app/assets/{index.es315-BBht-U5W.js → index.es394-DMJpONen.js} +1 -1
- package/dist/app/assets/{index.es317-Ba6bfhqW.js → index.es396-Dexy1Fdn.js} +1 -1
- package/dist/app/assets/{index.es321-BzMKJGft.js → index.es400-V_MXD6ds.js} +1 -1
- package/dist/app/assets/{index.es322-Dsh6cVFT.js → index.es401-CAcCA7it.js} +1 -1
- package/dist/app/assets/{index.es330-CwhtB6Ga.js → index.es409-DgSxLsfq.js} +1 -1
- package/dist/app/assets/{index.es333-BkIXdkt8.js → index.es412-wcTkTrNP.js} +1 -1
- package/dist/app/assets/{index.es336-CDPSHwok.js → index.es415-hnSTt9Hn.js} +1 -1
- package/dist/app/assets/{index.es339-CpmgqEMA.js → index.es418-DwuHSZfi.js} +1 -1
- package/dist/app/assets/{index.es343-DpQJ0N3s.js → index.es422-DWsCMo9a.js} +1 -1
- package/dist/app/assets/{index.es345-Cu1t0B48.js → index.es424-CX2jVTDC.js} +1 -1
- package/dist/app/assets/{index.es353-Boayqq8b.js → index.es432-DpOOpPot.js} +1 -1
- package/dist/app/assets/{index.es354-B25Rulno.js → index.es433--E-hGrgp.js} +1 -1
- package/dist/app/assets/{index.es361-BbYa_qYT.js → index.es440-NJaU5ncf.js} +1 -1
- package/dist/app/assets/{index.es362-BnUI1TJX.js → index.es441-CR0Ohpvp.js} +1 -1
- package/dist/app/assets/{index.es372-Din3gmuj.js → index.es451-sHTEx-Dl.js} +1 -1
- package/dist/app/assets/{index.es376-CAM-NFdA.js → index.es455-9ZC7rz1G.js} +1 -1
- package/dist/app/assets/{index.es382-r9NT2hns.js → index.es461-DAQjszqb.js} +1 -1
- package/dist/app/assets/{index.es387-DWtDDVHa.js → index.es466-sT_GOjPl.js} +1 -1
- package/dist/app/assets/{index.es388-Cddokof0.js → index.es467-D1qnNYJr.js} +1 -1
- package/dist/app/assets/{index.es390-BgcDic1S.js → index.es469-DW1np4pg.js} +1 -1
- package/dist/app/assets/{index.es394-Cuad4cFu.js → index.es473-wVAdvQ6_.js} +1 -1
- package/dist/app/assets/{index.es396-CQcbzzI_.js → index.es475-CZM7KBU8.js} +1 -1
- package/dist/app/assets/{index.es398-DBUoETTk.js → index.es477-OAyIdwW_.js} +1 -1
- package/dist/app/assets/{index.es401-D7FZbPq9.js → index.es480-DSR8isSz.js} +1 -1
- package/dist/app/assets/{index.es402-C5ht0e8l.js → index.es481-CBydsWwB.js} +1 -1
- package/dist/app/assets/{index.es406-pes6PLHN.js → index.es485-CJc4fpNV.js} +1 -1
- package/dist/app/assets/{index.es408-DV2ChDJw.js → index.es487-C1wULFp4.js} +1 -1
- package/dist/app/assets/{index.es415-BI_J_S9x.js → index.es494-BLp6ucpV.js} +1 -1
- package/dist/app/assets/{index.es417-BNH1K0F3.js → index.es496-Tis1R15L.js} +1 -1
- package/dist/app/assets/{index.es419-DaaHuOeT.js → index.es498-DnIxUf2o.js} +1 -1
- package/dist/app/assets/{index.es423-BFNF97RC.js → index.es502-DhEHE70J.js} +1 -1
- package/dist/app/assets/{index.es433-TWQYaV1h.js → index.es512-B---8rhN.js} +1 -1
- package/dist/app/assets/{index.es434-Dhj89L3U.js → index.es513-BU_koFtA.js} +1 -1
- package/dist/app/assets/{index.es441-9pPCdH1i.js → index.es520-ZlB1VPRK.js} +1 -1
- package/dist/app/assets/{index.es442-B_JzqX5N.js → index.es521-VBglaSPm.js} +1 -1
- package/dist/app/assets/index.es7-OgxBdVPl.js +1 -0
- package/dist/app/assets/index.modern--uQhcQlR.js +17 -0
- package/dist/app/assets/{index.umd-DknWdzGi.js → index.umd-DraF67oa.js} +61 -61
- package/dist/app/assets/listItemTextClasses-BY1YL8dW.js +1 -0
- package/dist/app/index.html +2 -4
- package/dist/server.js +1838 -6280
- package/eslint.config.mjs +16 -3
- package/package.json +10 -10
- package/publisher.config.json +32 -25
- package/src/config.ts +61 -1
- package/src/constants.ts +0 -1
- package/src/controller/connection.controller.ts +2 -2
- package/src/server.ts +73 -13
- package/src/service/connection.ts +25 -15
- package/src/service/package.spec.ts +67 -22
- package/src/service/package.ts +8 -1
- package/src/service/project.ts +13 -31
- package/src/service/project_store.spec.ts +30 -53
- package/src/service/project_store.ts +100 -68
- package/dist/app/assets/index-Bh1cWMgT.js +0 -240
- package/dist/app/assets/index-CcIq0aEZ.css +0 -1
- package/dist/app/assets/index-SM0qJxoC.js +0 -676
- package/dist/app/assets/index.es24-CDJ3b9GD.js +0 -2
- package/dist/app/assets/mui-BL9dYvR2.js +0 -159
- package/dist/app/assets/vendor-c5ypKtDW.js +0 -17
- /package/dist/app/assets/{index.es220-CG6Dc4jp.js → index.es299-CG6Dc4jp.js} +0 -0
- /package/dist/app/assets/{index.es228-DsBKuouk.js → index.es307-DsBKuouk.js} +0 -0
- /package/dist/app/assets/{index.es229-D_z4Izcz.js → index.es308-D_z4Izcz.js} +0 -0
- /package/dist/app/assets/{index.es230-727ZlQH0.js → index.es309-727ZlQH0.js} +0 -0
- /package/dist/app/assets/{index.es233-Dn00JSTd.js → index.es312-Dn00JSTd.js} +0 -0
- /package/dist/app/assets/{index.es234-COJ4H7py.js → index.es313-COJ4H7py.js} +0 -0
- /package/dist/app/assets/{index.es236-Bu5BbsvL.js → index.es315-Bu5BbsvL.js} +0 -0
- /package/dist/app/assets/{index.es237-7O62HKoU.js → index.es316-7O62HKoU.js} +0 -0
- /package/dist/app/assets/{index.es238-BPT9niGB.js → index.es317-BPT9niGB.js} +0 -0
- /package/dist/app/assets/{index.es239-Dhn9LcZ4.js → index.es318-Dhn9LcZ4.js} +0 -0
- /package/dist/app/assets/{index.es241-eg146-Ew.js → index.es320-eg146-Ew.js} +0 -0
- /package/dist/app/assets/{index.es242-Du268qiB.js → index.es321-Du268qiB.js} +0 -0
- /package/dist/app/assets/{index.es243-fje9CFhw.js → index.es322-fje9CFhw.js} +0 -0
- /package/dist/app/assets/{index.es244-BwXTMy5W.js → index.es323-BwXTMy5W.js} +0 -0
- /package/dist/app/assets/{index.es245-3xVqZejG.js → index.es324-3xVqZejG.js} +0 -0
- /package/dist/app/assets/{index.es246-xW4inM5L.js → index.es325-xW4inM5L.js} +0 -0
- /package/dist/app/assets/{index.es247-DHo0CJ0O.js → index.es326-DHo0CJ0O.js} +0 -0
- /package/dist/app/assets/{index.es250-C3t2pwGQ.js → index.es329-C3t2pwGQ.js} +0 -0
- /package/dist/app/assets/{index.es251-DNquZEk8.js → index.es330-DNquZEk8.js} +0 -0
- /package/dist/app/assets/{index.es253-BHOwM8T6.js → index.es332-BHOwM8T6.js} +0 -0
- /package/dist/app/assets/{index.es254-DxSadP1t.js → index.es333-DxSadP1t.js} +0 -0
- /package/dist/app/assets/{index.es255-DbXoA79R.js → index.es334-DbXoA79R.js} +0 -0
- /package/dist/app/assets/{index.es257-Bp6g37R7.js → index.es336-Bp6g37R7.js} +0 -0
- /package/dist/app/assets/{index.es258-sacFqUAJ.js → index.es337-sacFqUAJ.js} +0 -0
- /package/dist/app/assets/{index.es260-C7gG9l05.js → index.es339-C7gG9l05.js} +0 -0
- /package/dist/app/assets/{index.es261-Dsg_Bt_b.js → index.es340-Dsg_Bt_b.js} +0 -0
- /package/dist/app/assets/{index.es264-D9R-vmeu.js → index.es343-D9R-vmeu.js} +0 -0
- /package/dist/app/assets/{index.es265-BPhBrDlE.js → index.es344-BPhBrDlE.js} +0 -0
- /package/dist/app/assets/{index.es266-C-TU5hQ_.js → index.es345-C-TU5hQ_.js} +0 -0
- /package/dist/app/assets/{index.es267-DtFQj3wx.js → index.es346-DtFQj3wx.js} +0 -0
- /package/dist/app/assets/{index.es268-m2LEI-9-.js → index.es347-m2LEI-9-.js} +0 -0
- /package/dist/app/assets/{index.es269-BoXegm-a.js → index.es348-BoXegm-a.js} +0 -0
- /package/dist/app/assets/{index.es270-B9wLZaAG.js → index.es349-B9wLZaAG.js} +0 -0
- /package/dist/app/assets/{index.es271-ClGRhx96.js → index.es350-ClGRhx96.js} +0 -0
- /package/dist/app/assets/{index.es272-DEIpsLCJ.js → index.es351-DEIpsLCJ.js} +0 -0
- /package/dist/app/assets/{index.es273-BgYniUM_.js → index.es352-BgYniUM_.js} +0 -0
- /package/dist/app/assets/{index.es274-COcR7UxN.js → index.es353-COcR7UxN.js} +0 -0
- /package/dist/app/assets/{index.es275-BjQB5zDj.js → index.es354-BjQB5zDj.js} +0 -0
- /package/dist/app/assets/{index.es276-C-nORZOA.js → index.es355-C-nORZOA.js} +0 -0
- /package/dist/app/assets/{index.es280-BX77sIaO.js → index.es359-BX77sIaO.js} +0 -0
- /package/dist/app/assets/{index.es282-B-DoSBHF.js → index.es361-B-DoSBHF.js} +0 -0
- /package/dist/app/assets/{index.es283-bCA53EVm.js → index.es362-bCA53EVm.js} +0 -0
- /package/dist/app/assets/{index.es284-w-ucz2PV.js → index.es363-w-ucz2PV.js} +0 -0
- /package/dist/app/assets/{index.es285-Dayu4EKP.js → index.es364-Dayu4EKP.js} +0 -0
- /package/dist/app/assets/{index.es287-DKXYxT9g.js → index.es366-DKXYxT9g.js} +0 -0
- /package/dist/app/assets/{index.es290-DfxzS6Rs.js → index.es369-DfxzS6Rs.js} +0 -0
- /package/dist/app/assets/{index.es291-SKMF96pI.js → index.es370-SKMF96pI.js} +0 -0
- /package/dist/app/assets/{index.es292-ajMbGru0.js → index.es371-ajMbGru0.js} +0 -0
- /package/dist/app/assets/{index.es293--30QC5Em.js → index.es372--30QC5Em.js} +0 -0
- /package/dist/app/assets/{index.es296-B430Bg39.js → index.es375-B430Bg39.js} +0 -0
- /package/dist/app/assets/{index.es300-CM8KxXT1.js → index.es379-CM8KxXT1.js} +0 -0
- /package/dist/app/assets/{index.es301-B1SYOhNW.js → index.es380-B1SYOhNW.js} +0 -0
- /package/dist/app/assets/{index.es303-DkBy-JyN.js → index.es382-DkBy-JyN.js} +0 -0
- /package/dist/app/assets/{index.es307-BILxekzW.js → index.es386-BILxekzW.js} +0 -0
- /package/dist/app/assets/{index.es308-C5wWYbrZ.js → index.es387-C5wWYbrZ.js} +0 -0
- /package/dist/app/assets/{index.es309-HzYwdGDm.js → index.es388-HzYwdGDm.js} +0 -0
- /package/dist/app/assets/{index.es310-T-Tgc4AT.js → index.es389-T-Tgc4AT.js} +0 -0
- /package/dist/app/assets/{index.es311-ifBTmRxC.js → index.es390-ifBTmRxC.js} +0 -0
- /package/dist/app/assets/{index.es316-BMj5Y0dO.js → index.es395-BMj5Y0dO.js} +0 -0
- /package/dist/app/assets/{index.es318-BjABl1g7.js → index.es397-BjABl1g7.js} +0 -0
- /package/dist/app/assets/{index.es319-xI-RfyKK.js → index.es398-xI-RfyKK.js} +0 -0
- /package/dist/app/assets/{index.es320-ySlJ1b_l.js → index.es399-ySlJ1b_l.js} +0 -0
- /package/dist/app/assets/{index.es323-BQoSv7ci.js → index.es402-BQoSv7ci.js} +0 -0
- /package/dist/app/assets/{index.es324-w8dY5SsB.js → index.es403-w8dY5SsB.js} +0 -0
- /package/dist/app/assets/{index.es325-TU54ms6u.js → index.es404-TU54ms6u.js} +0 -0
- /package/dist/app/assets/{index.es326-DREVFZK8.js → index.es405-DREVFZK8.js} +0 -0
- /package/dist/app/assets/{index.es327-BfivnA6A.js → index.es406-BfivnA6A.js} +0 -0
- /package/dist/app/assets/{index.es328-P4WzXJd0.js → index.es407-P4WzXJd0.js} +0 -0
- /package/dist/app/assets/{index.es329-BAng5TT0.js → index.es408-BAng5TT0.js} +0 -0
- /package/dist/app/assets/{index.es331-B5lbUyaz.js → index.es410-B5lbUyaz.js} +0 -0
- /package/dist/app/assets/{index.es332-mebxcVVE.js → index.es411-mebxcVVE.js} +0 -0
- /package/dist/app/assets/{index.es334-XBlWyCtg.js → index.es413-XBlWyCtg.js} +0 -0
- /package/dist/app/assets/{index.es335-BfCpw3nA.js → index.es414-BfCpw3nA.js} +0 -0
- /package/dist/app/assets/{index.es337-Cc5clBb7.js → index.es416-Cc5clBb7.js} +0 -0
- /package/dist/app/assets/{index.es338-IuBKFhSY.js → index.es417-IuBKFhSY.js} +0 -0
- /package/dist/app/assets/{index.es340-Du5NY7AG.js → index.es419-Du5NY7AG.js} +0 -0
- /package/dist/app/assets/{index.es341-Bvotw-X0.js → index.es420-Bvotw-X0.js} +0 -0
- /package/dist/app/assets/{index.es342-UIAJJxZW.js → index.es421-UIAJJxZW.js} +0 -0
- /package/dist/app/assets/{index.es344-D9-PGadD.js → index.es423-D9-PGadD.js} +0 -0
- /package/dist/app/assets/{index.es346-sdHcTMYB.js → index.es425-sdHcTMYB.js} +0 -0
- /package/dist/app/assets/{index.es347-Ci6OQyBP.js → index.es426-Ci6OQyBP.js} +0 -0
- /package/dist/app/assets/{index.es348-BC5c_5Pe.js → index.es427-BC5c_5Pe.js} +0 -0
- /package/dist/app/assets/{index.es349-Tz6hzZYG.js → index.es428-Tz6hzZYG.js} +0 -0
- /package/dist/app/assets/{index.es350-DB_GagMm.js → index.es429-DB_GagMm.js} +0 -0
- /package/dist/app/assets/{index.es351-DLbgOhZU.js → index.es430-DLbgOhZU.js} +0 -0
- /package/dist/app/assets/{index.es352-B0XVJmRM.js → index.es431-B0XVJmRM.js} +0 -0
- /package/dist/app/assets/{index.es355-shcSOmrb.js → index.es434-shcSOmrb.js} +0 -0
- /package/dist/app/assets/{index.es356-D4Tzg5kh.js → index.es435-D4Tzg5kh.js} +0 -0
- /package/dist/app/assets/{index.es357-Deuh7S70.js → index.es436-Deuh7S70.js} +0 -0
- /package/dist/app/assets/{index.es358-BUEGK8hf.js → index.es437-BUEGK8hf.js} +0 -0
- /package/dist/app/assets/{index.es359-BNioltXt.js → index.es438-BNioltXt.js} +0 -0
- /package/dist/app/assets/{index.es360-JqZropPD.js → index.es439-JqZropPD.js} +0 -0
- /package/dist/app/assets/{index.es363-LKU2TuZ1.js → index.es442-LKU2TuZ1.js} +0 -0
- /package/dist/app/assets/{index.es364-BFLt1xDp.js → index.es443-BFLt1xDp.js} +0 -0
- /package/dist/app/assets/{index.es365-DKykz6zU.js → index.es444-DKykz6zU.js} +0 -0
- /package/dist/app/assets/{index.es366-B3ZDOciz.js → index.es445-B3ZDOciz.js} +0 -0
- /package/dist/app/assets/{index.es367-CSHBycmS.js → index.es446-CSHBycmS.js} +0 -0
- /package/dist/app/assets/{index.es368-BIEUsx6d.js → index.es447-BIEUsx6d.js} +0 -0
- /package/dist/app/assets/{index.es369-B48N-Iqd.js → index.es448-B48N-Iqd.js} +0 -0
- /package/dist/app/assets/{index.es370-BY-TUvya.js → index.es449-BY-TUvya.js} +0 -0
- /package/dist/app/assets/{index.es371-zocC4JxJ.js → index.es450-zocC4JxJ.js} +0 -0
- /package/dist/app/assets/{index.es373-Cza_XSSt.js → index.es452-Cza_XSSt.js} +0 -0
- /package/dist/app/assets/{index.es374-Bg-kzb6g.js → index.es453-Bg-kzb6g.js} +0 -0
- /package/dist/app/assets/{index.es375-DhUJRlN_.js → index.es454-DhUJRlN_.js} +0 -0
- /package/dist/app/assets/{index.es377-C8lEn-DE.js → index.es456-C8lEn-DE.js} +0 -0
- /package/dist/app/assets/{index.es378-DhMKtDLN.js → index.es457-DhMKtDLN.js} +0 -0
- /package/dist/app/assets/{index.es379-CwjWoCRV.js → index.es458-CwjWoCRV.js} +0 -0
- /package/dist/app/assets/{index.es380-CzouJOBO.js → index.es459-CzouJOBO.js} +0 -0
- /package/dist/app/assets/{index.es381-B1bQXN8T.js → index.es460-B1bQXN8T.js} +0 -0
- /package/dist/app/assets/{index.es383-5LuOXUq_.js → index.es462-5LuOXUq_.js} +0 -0
- /package/dist/app/assets/{index.es384-DWJ3fJO_.js → index.es463-DWJ3fJO_.js} +0 -0
- /package/dist/app/assets/{index.es385-DJlmqQ1C.js → index.es464-DJlmqQ1C.js} +0 -0
- /package/dist/app/assets/{index.es386-QhoSD0DR.js → index.es465-QhoSD0DR.js} +0 -0
- /package/dist/app/assets/{index.es389-Be6lgOlo.js → index.es468-Be6lgOlo.js} +0 -0
- /package/dist/app/assets/{index.es391-BJ4Li9vH.js → index.es470-BJ4Li9vH.js} +0 -0
- /package/dist/app/assets/{index.es392-DQVVAn-B.js → index.es471-DQVVAn-B.js} +0 -0
- /package/dist/app/assets/{index.es393-BJGe-b2p.js → index.es472-BJGe-b2p.js} +0 -0
- /package/dist/app/assets/{index.es395-BLhTXw86.js → index.es474-BLhTXw86.js} +0 -0
- /package/dist/app/assets/{index.es397-atvbtKCR.js → index.es476-atvbtKCR.js} +0 -0
- /package/dist/app/assets/{index.es399-DkLiglaE.js → index.es478-DkLiglaE.js} +0 -0
- /package/dist/app/assets/{index.es400-C1w2a3ep.js → index.es479-C1w2a3ep.js} +0 -0
- /package/dist/app/assets/{index.es403-Cf8iN4DR.js → index.es482-Cf8iN4DR.js} +0 -0
- /package/dist/app/assets/{index.es404-COK4E0Yg.js → index.es483-COK4E0Yg.js} +0 -0
- /package/dist/app/assets/{index.es405-BknIz3MU.js → index.es484-BknIz3MU.js} +0 -0
- /package/dist/app/assets/{index.es407-BeQkCIfX.js → index.es486-BeQkCIfX.js} +0 -0
- /package/dist/app/assets/{index.es409-BSxZ-RaX.js → index.es488-BSxZ-RaX.js} +0 -0
- /package/dist/app/assets/{index.es410-C7L56vO4.js → index.es489-C7L56vO4.js} +0 -0
- /package/dist/app/assets/{index.es411-CUnW07Te.js → index.es490-CUnW07Te.js} +0 -0
- /package/dist/app/assets/{index.es412-C1XDQQGZ.js → index.es491-C1XDQQGZ.js} +0 -0
- /package/dist/app/assets/{index.es413-CQjiPCtT.js → index.es492-CQjiPCtT.js} +0 -0
- /package/dist/app/assets/{index.es414-DQ1-QYvQ.js → index.es493-DQ1-QYvQ.js} +0 -0
- /package/dist/app/assets/{index.es416-BbSNqyBO.js → index.es495-BbSNqyBO.js} +0 -0
- /package/dist/app/assets/{index.es418-CB2ApiWb.js → index.es497-CB2ApiWb.js} +0 -0
- /package/dist/app/assets/{index.es420-B_m7g4N7.js → index.es499-B_m7g4N7.js} +0 -0
- /package/dist/app/assets/{index.es421-B6W0miNI.js → index.es500-B6W0miNI.js} +0 -0
- /package/dist/app/assets/{index.es422-BMR_PYu6.js → index.es501-BMR_PYu6.js} +0 -0
- /package/dist/app/assets/{index.es424-Dj6nwHGl.js → index.es503-Dj6nwHGl.js} +0 -0
- /package/dist/app/assets/{index.es425-BpWG_bgh.js → index.es504-BpWG_bgh.js} +0 -0
- /package/dist/app/assets/{index.es426-BVUVsWT6.js → index.es505-BVUVsWT6.js} +0 -0
- /package/dist/app/assets/{index.es427-CAQ2eGtk.js → index.es506-CAQ2eGtk.js} +0 -0
- /package/dist/app/assets/{index.es428-BFOHcciG.js → index.es507-BFOHcciG.js} +0 -0
- /package/dist/app/assets/{index.es429-CdO5JTpU.js → index.es508-CdO5JTpU.js} +0 -0
- /package/dist/app/assets/{index.es430-CJaU5se_.js → index.es509-CJaU5se_.js} +0 -0
- /package/dist/app/assets/{index.es431-DYoNaHQp.js → index.es510-DYoNaHQp.js} +0 -0
- /package/dist/app/assets/{index.es432-m4uW47V2.js → index.es511-m4uW47V2.js} +0 -0
- /package/dist/app/assets/{index.es435-nyqBNV6O.js → index.es514-nyqBNV6O.js} +0 -0
- /package/dist/app/assets/{index.es436-C6j12Q_x.js → index.es515-C6j12Q_x.js} +0 -0
- /package/dist/app/assets/{index.es437-7A4Fjokl.js → index.es516-7A4Fjokl.js} +0 -0
- /package/dist/app/assets/{index.es438-CB0Krxn9.js → index.es517-CB0Krxn9.js} +0 -0
- /package/dist/app/assets/{index.es439-DCE3LsBG.js → index.es518-DCE3LsBG.js} +0 -0
- /package/dist/app/assets/{index.es440-C3FkfJm5.js → index.es519-C3FkfJm5.js} +0 -0
- /package/dist/app/assets/{index.es443-CVw76BM1.js → index.es522-CVw76BM1.js} +0 -0
- /package/dist/app/assets/{index.es444-HnGAYVZD.js → index.es523-HnGAYVZD.js} +0 -0
- /package/dist/app/assets/{index.es445-BVz_zdnA.js → index.es524-BVz_zdnA.js} +0 -0
- /package/dist/app/assets/{index.es446-C3khCPGq.js → index.es525-C3khCPGq.js} +0 -0
- /package/dist/app/assets/{index.es447-D-2ljcwZ.js → index.es526-D-2ljcwZ.js} +0 -0
- /package/dist/app/assets/{index.es448-Cv9koXgw.js → index.es527-Cv9koXgw.js} +0 -0
- /package/dist/app/assets/{index.es449-CD_QflpE.js → index.es528-CD_QflpE.js} +0 -0
- /package/dist/app/assets/{index.es450-DRW-0cLl.js → index.es529-DRW-0cLl.js} +0 -0
- /package/dist/app/assets/{index.es451-C-_shW-Y.js → index.es530-C-_shW-Y.js} +0 -0
- /package/dist/app/assets/{index.es452-LGGdnPYs.js → index.es531-LGGdnPYs.js} +0 -0
- /package/dist/app/assets/{index.es453-C3mMm8J8.js → index.es532-C3mMm8J8.js} +0 -0
- /package/dist/app/assets/{index.es454-BzJJZx-M.js → index.es533-BzJJZx-M.js} +0 -0
- /package/dist/app/assets/{index.es455-BXkSAIEj.js → index.es534-BXkSAIEj.js} +0 -0
- /package/dist/app/assets/{index.es456-BgDCqdQA.js → index.es535-BgDCqdQA.js} +0 -0
- /package/dist/app/assets/{index.es457-C8M2exoo.js → index.es536-C8M2exoo.js} +0 -0
- /package/dist/app/assets/{index.es458-DHJKELXO.js → index.es537-DHJKELXO.js} +0 -0
- /package/dist/app/assets/{index.es459-Cuk6v7N8.js → index.es538-Cuk6v7N8.js} +0 -0
- /package/dist/app/assets/{index.es460-DH5Ifo-i.js → index.es539-DH5Ifo-i.js} +0 -0
- /package/dist/app/assets/{index.es461-E3gJ1_iC.js → index.es540-E3gJ1_iC.js} +0 -0
- /package/dist/app/assets/{index.es462-DAi9KRSo.js → index.es541-DAi9KRSo.js} +0 -0
- /package/dist/app/assets/{index.es463-D7oLnXFd.js → index.es542-D7oLnXFd.js} +0 -0
- /package/dist/app/assets/{index.es464-BfjtVDDH.js → index.es543-BfjtVDDH.js} +0 -0
- /package/dist/app/assets/{index.es465-DnULxvSX.js → index.es544-DnULxvSX.js} +0 -0
- /package/dist/app/assets/{index.es466-CkXjmgJE.js → index.es545-CkXjmgJE.js} +0 -0
- /package/dist/app/assets/{index.es467-CfQXZHmo.js → index.es546-CfQXZHmo.js} +0 -0
- /package/dist/app/assets/{index.es468-DWedfzmr.js → index.es547-DWedfzmr.js} +0 -0
- /package/dist/app/assets/{index.es469-DUszq2jm.js → index.es548-DUszq2jm.js} +0 -0
- /package/dist/app/assets/{index.es470-B7mTdjB0.js → index.es549-B7mTdjB0.js} +0 -0
- /package/dist/app/assets/{index.es471-D5KoaKCx.js → index.es550-D5KoaKCx.js} +0 -0
- /package/dist/app/assets/{index.es472-BfHTSMKl.js → index.es551-BfHTSMKl.js} +0 -0
- /package/dist/app/assets/{index.es473-B0m2ddpp.js → index.es552-B0m2ddpp.js} +0 -0
- /package/dist/app/assets/{index.es474-CyktbL80.js → index.es553-CyktbL80.js} +0 -0
- /package/dist/app/assets/{index.es475-Csfq5Kiy.js → index.es554-Csfq5Kiy.js} +0 -0
- /package/dist/app/assets/{index.es476-CafNBF8u.js → index.es555-CafNBF8u.js} +0 -0
- /package/dist/app/assets/{index.es477-CTRr51gU.js → index.es556-CTRr51gU.js} +0 -0
- /package/dist/app/assets/{index.es478-D4h5O-jR.js → index.es557-D4h5O-jR.js} +0 -0
- /package/dist/app/assets/{index.es479-C39BiMTA.js → index.es558-C39BiMTA.js} +0 -0
- /package/dist/app/assets/{index.es480-Ddv68eIx.js → index.es559-Ddv68eIx.js} +0 -0
- /package/dist/app/assets/{index.es481-GBQ2dnAY.js → index.es560-GBQ2dnAY.js} +0 -0
- /package/dist/app/assets/{index.es482-PoHY5YXO.js → index.es561-PoHY5YXO.js} +0 -0
- /package/dist/app/assets/{index.es483-3e1v2bzS.js → index.es562-3e1v2bzS.js} +0 -0
- /package/dist/app/assets/{index.es484-CS3Unz2-.js → index.es563-CS3Unz2-.js} +0 -0
- /package/dist/app/assets/{index.es485-bN70gL4F.js → index.es564-bN70gL4F.js} +0 -0
- /package/dist/app/assets/{index.es486-CmCqftbK.js → index.es565-CmCqftbK.js} +0 -0
- /package/dist/app/assets/{index.es487-Ds-gbosJ.js → index.es566-Ds-gbosJ.js} +0 -0
- /package/dist/app/assets/{index.es488-CjDtw9vr.js → index.es567-CjDtw9vr.js} +0 -0
- /package/dist/app/assets/{index.es489-BthQWCQV.js → index.es568-BthQWCQV.js} +0 -0
- /package/dist/app/assets/{index.es490-DqwNpetd.js → index.es569-DqwNpetd.js} +0 -0
- /package/dist/app/assets/{index.es491-Bw305WKR.js → index.es570-Bw305WKR.js} +0 -0
- /package/dist/app/assets/{index.es492-DXbdFlpD.js → index.es571-DXbdFlpD.js} +0 -0
- /package/dist/app/assets/{index.es493-L9t79GZl.js → index.es572-L9t79GZl.js} +0 -0
- /package/dist/app/assets/{index.es494-CbfX1IO0.js → index.es573-CbfX1IO0.js} +0 -0
- /package/dist/app/assets/{index.es495-DBQeEorK.js → index.es574-DBQeEorK.js} +0 -0
- /package/dist/app/assets/{index.es496-BEBZ7ncR.js → index.es575-BEBZ7ncR.js} +0 -0
- /package/dist/app/assets/{index.es497-Bkuqu6BP.js → index.es576-Bkuqu6BP.js} +0 -0
- /package/dist/app/assets/{index.es498-D0r3Knsf.js → index.es577-D0r3Knsf.js} +0 -0
- /package/dist/app/assets/{index.es499-CVO1_9PV.js → index.es578-CVO1_9PV.js} +0 -0
|
@@ -1,676 +0,0 @@
|
|
|
1
|
-
import{c as I0,g as Mp}from"./vendor-c5ypKtDW.js";function qp(a,d){for(var y=0;y<d.length;y++){const m=d[y];if(typeof m!="string"&&!Array.isArray(m)){for(const h in m)if(h!=="default"&&!(h in a)){const u=Object.getOwnPropertyDescriptor(m,h);u&&Object.defineProperty(a,h,u.get?u:{enumerable:!0,get:()=>m[h]})}}}return Object.freeze(Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}))}var Cr={},ct={},Or={},Kn={},Ma;function L0(){return Ma||(Ma=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.MALLOY_INTERFACE_TYPES=void 0,Kn.MALLOY_INTERFACE_TYPES={Aggregate:{type:"struct",name:"Aggregate",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},Annotation:{type:"struct",name:"Annotation",fields:{value:{type:"string",optional:!1,array:!1}}},AnonymousQueryInfo:{type:"struct",name:"AnonymousQueryInfo",fields:{schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},ArrayCell:{type:"struct",name:"ArrayCell",fields:{array_value:{type:"Cell",array:!0,optional:!1}}},ArrayType:{type:"struct",name:"ArrayType",fields:{element_type:{type:"AtomicType",optional:!1,array:!1}}},AtomicType:{type:"union",name:"AtomicType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType"}},BooleanCell:{type:"struct",name:"BooleanCell",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanLiteral:{type:"struct",name:"BooleanLiteral",fields:{boolean_value:{type:"boolean",optional:!1,array:!1}}},BooleanType:{type:"struct",name:"BooleanType",fields:{}},CalculateInfo:{type:"struct",name:"CalculateInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},CalculateOperation:{type:"struct",name:"CalculateOperation",fields:{name:{type:"string",optional:!1,array:!1},field:{type:"Field",optional:!1,array:!1}}},Cell:{type:"union",name:"Cell",options:{string_cell:"StringCell",boolean_cell:"BooleanCell",date_cell:"DateCell",timestamp_cell:"TimestampCell",number_cell:"NumberCell",json_cell:"JSONCell",record_cell:"RecordCell",array_cell:"ArrayCell",null_cell:"NullCell",sql_native_cell:"SQLNativeCell"}},CompileModelRequest:{type:"struct",name:"CompileModelRequest",fields:{model_url:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileModelResponse:{type:"struct",name:"CompileModelResponse",fields:{model:{type:"ModelInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompileQueryRequest:{type:"struct",name:"CompileQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!0,array:!1},query_malloy:{type:"string",optional:!0,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileQueryResponse:{type:"struct",name:"CompileQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},translations:{type:"Translation",array:!0,optional:!0},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompileSourceRequest:{type:"struct",name:"CompileSourceRequest",fields:{model_url:{type:"string",optional:!1,array:!1},name:{type:"string",optional:!1,array:!1},extend_model_url:{type:"string",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},CompileSourceResponse:{type:"struct",name:"CompileSourceResponse",fields:{source:{type:"SourceInfo",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},CompilerNeeds:{type:"struct",name:"CompilerNeeds",fields:{table_schemas:{type:"SQLTable",array:!0,optional:!0},sql_schemas:{type:"SQLQuery",array:!0,optional:!0},files:{type:"File",array:!0,optional:!0},connections:{type:"Connection",array:!0,optional:!0},translations:{type:"Translation",array:!0,optional:!0}}},Connection:{type:"struct",name:"Connection",fields:{name:{type:"string",optional:!1,array:!1},dialect:{type:"string",optional:!0,array:!1}}},Data:{type:"union",name:"Data",options:{record_cell:"RecordCell",array_cell:"ArrayCell"}},DateCell:{type:"struct",name:"DateCell",fields:{date_value:{type:"string",optional:!1,array:!1}}},DateLiteral:{type:"struct",name:"DateLiteral",fields:{date_value:{type:"string",optional:!1,array:!1},granularity:{type:"DateTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},DateTimeframe:{type:"enum",name:"DateTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5}},DateType:{type:"struct",name:"DateType",fields:{timeframe:{type:"DateTimeframe",optional:!0,array:!1}}},DimensionInfo:{type:"struct",name:"DimensionInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},DocumentPosition:{type:"struct",name:"DocumentPosition",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},DocumentRange:{type:"struct",name:"DocumentRange",fields:{start:{type:"DocumentPosition",optional:!1,array:!1},end:{type:"DocumentPosition",optional:!1,array:!1}}},DrillOperation:{type:"struct",name:"DrillOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},Expression:{type:"union",name:"Expression",options:{field_reference:"Reference",time_truncation:"TimeTruncationFieldReference",filtered_field:"FilteredField",literal_value:"LiteralValueExpression",moving_average:"MovingAverage"}},Field:{type:"struct",name:"Field",fields:{expression:{type:"Expression",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},FieldInfo:{type:"union",name:"FieldInfo",options:{dimension:"DimensionInfo",measure:"MeasureInfo",join:"JoinInfo",view:"ViewInfo",calculate:"CalculateInfo"}},File:{type:"struct",name:"File",fields:{url:{type:"string",optional:!1,array:!1},contents:{type:"string",optional:!0,array:!1},invalidation_key:{type:"string",optional:!0,array:!1}}},Filter:{type:"union",name:"Filter",options:{filter_string:"FilterStringApplication",literal_equality:"LiteralEqualityComparison"}},FilterExpressionLiteral:{type:"struct",name:"FilterExpressionLiteral",fields:{filter_expression_value:{type:"string",optional:!1,array:!1}}},FilterExpressionType:{type:"struct",name:"FilterExpressionType",fields:{filter_type:{type:"FilterableType",optional:!1,array:!1}}},FilterOperation:{type:"struct",name:"FilterOperation",fields:{filter:{type:"Filter",optional:!1,array:!1}}},FilterStringApplication:{type:"struct",name:"FilterStringApplication",fields:{expression:{type:"Expression",optional:!1,array:!1},filter:{type:"string",optional:!1,array:!1}}},FilterableType:{type:"union",name:"FilterableType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",date_type:"DateType",timestamp_type:"TimestampType"}},FilteredField:{type:"struct",name:"FilteredField",fields:{field_reference:{type:"Reference",optional:!1,array:!1},where:{type:"FilterOperation",array:!0,optional:!1}}},GroupBy:{type:"struct",name:"GroupBy",fields:{name:{type:"string",optional:!0,array:!1},field:{type:"Field",optional:!1,array:!1}}},JSONCell:{type:"struct",name:"JSONCell",fields:{json_value:{type:"string",optional:!1,array:!1}}},JSONType:{type:"struct",name:"JSONType",fields:{}},JoinInfo:{type:"struct",name:"JoinInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},relationship:{type:"Relationship",optional:!1,array:!1}}},Limit:{type:"struct",name:"Limit",fields:{limit:{type:"number",optional:!1,array:!1}}},LiteralEqualityComparison:{type:"struct",name:"LiteralEqualityComparison",fields:{expression:{type:"Expression",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},LiteralValue:{type:"union",name:"LiteralValue",options:{string_literal:"StringLiteral",number_literal:"NumberLiteral",date_literal:"DateLiteral",timestamp_literal:"TimestampLiteral",boolean_literal:"BooleanLiteral",null_literal:"NullLiteral",filter_expression_literal:"FilterExpressionLiteral"}},LiteralValueExpression:{type:"struct",name:"LiteralValueExpression",fields:{literal_value:{type:"LiteralValue",optional:!1,array:!1}}},Location:{type:"struct",name:"Location",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"Range",optional:!1,array:!1}}},LogMessage:{type:"struct",name:"LogMessage",fields:{url:{type:"string",optional:!1,array:!1},range:{type:"DocumentRange",optional:!1,array:!1},severity:{type:"LogSeverity",optional:!1,array:!1},message:{type:"string",optional:!1,array:!1}}},LogSeverity:{type:"enum",name:"LogSeverity",values:{debug:1,info:2,warn:3,error:4}},MeasureInfo:{type:"struct",name:"MeasureInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"AtomicType",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ModelEntryValue:{type:"union",name:"ModelEntryValue",options:{source:"SourceInfo",query:"QueryInfo"}},ModelInfo:{type:"struct",name:"ModelInfo",fields:{entries:{type:"ModelEntryValue",array:!0,optional:!1},annotations:{type:"Annotation",array:!0,optional:!0},anonymous_queries:{type:"AnonymousQueryInfo",array:!0,optional:!1}}},MovingAverage:{type:"struct",name:"MovingAverage",fields:{field_reference:{type:"Reference",optional:!1,array:!1},rows_preceding:{type:"number",optional:!0,array:!1},rows_following:{type:"number",optional:!0,array:!1},partition_fields:{type:"Reference",array:!0,optional:!0}}},Nest:{type:"struct",name:"Nest",fields:{name:{type:"string",optional:!0,array:!1},view:{type:"View",optional:!1,array:!1}}},NullCell:{type:"struct",name:"NullCell",fields:{}},NullLiteral:{type:"struct",name:"NullLiteral",fields:{}},NumberCell:{type:"struct",name:"NumberCell",fields:{number_value:{type:"number",optional:!1,array:!1}}},NumberLiteral:{type:"struct",name:"NumberLiteral",fields:{number_value:{type:"number",optional:!1,array:!1}}},NumberSubtype:{type:"enum",name:"NumberSubtype",values:{integer:1,decimal:2}},NumberType:{type:"struct",name:"NumberType",fields:{subtype:{type:"NumberSubtype",optional:!0,array:!1}}},OrderBy:{type:"struct",name:"OrderBy",fields:{field_reference:{type:"Reference",optional:!1,array:!1},direction:{type:"OrderByDirection",optional:!0,array:!1}}},OrderByDirection:{type:"enum",name:"OrderByDirection",values:{asc:1,desc:2}},ParameterInfo:{type:"struct",name:"ParameterInfo",fields:{name:{type:"string",optional:!1,array:!1},type:{type:"ParameterType",optional:!1,array:!1},default_value:{type:"LiteralValue",optional:!0,array:!1}}},ParameterType:{type:"union",name:"ParameterType",options:{string_type:"StringType",boolean_type:"BooleanType",number_type:"NumberType",json_type:"JSONType",sql_native_type:"SQLNativeType",date_type:"DateType",timestamp_type:"TimestampType",array_type:"ArrayType",record_type:"RecordType",filter_expression_type:"FilterExpressionType"}},ParameterValue:{type:"struct",name:"ParameterValue",fields:{name:{type:"string",optional:!1,array:!1},value:{type:"LiteralValue",optional:!1,array:!1}}},Position:{type:"struct",name:"Position",fields:{line:{type:"number",optional:!1,array:!1},character:{type:"number",optional:!1,array:!1}}},Query:{type:"struct",name:"Query",fields:{definition:{type:"QueryDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},QueryArrow:{type:"struct",name:"QueryArrow",fields:{source:{type:"QueryArrowSource",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},QueryArrowSource:{type:"union",name:"QueryArrowSource",options:{refinement:"QueryRefinement",source_reference:"Reference"}},QueryDefinition:{type:"union",name:"QueryDefinition",options:{arrow:"QueryArrow",query_reference:"Reference",refinement:"QueryRefinement"}},QueryInfo:{type:"struct",name:"QueryInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"Query",optional:!0,array:!1},code:{type:"string",optional:!0,array:!1},location:{type:"Location",optional:!0,array:!1}}},QueryRefinement:{type:"struct",name:"QueryRefinement",fields:{base:{type:"QueryDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},Range:{type:"struct",name:"Range",fields:{start:{type:"Position",optional:!1,array:!1},end:{type:"Position",optional:!1,array:!1}}},RecordCell:{type:"struct",name:"RecordCell",fields:{record_value:{type:"Cell",array:!0,optional:!1}}},RecordType:{type:"struct",name:"RecordType",fields:{fields:{type:"DimensionInfo",array:!0,optional:!1}}},Reference:{type:"struct",name:"Reference",fields:{name:{type:"string",optional:!1,array:!1},path:{type:"string",array:!0,optional:!0},parameters:{type:"ParameterValue",array:!0,optional:!0}}},Relationship:{type:"enum",name:"Relationship",values:{one:1,many:2,cross:3}},Result:{type:"struct",name:"Result",fields:{data:{type:"Data",optional:!0,array:!1},schema:{type:"Schema",optional:!1,array:!1},sql:{type:"string",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},model_annotations:{type:"Annotation",array:!0,optional:!0},query_timezone:{type:"string",optional:!0,array:!1},source_annotations:{type:"Annotation",array:!0,optional:!0}}},RunIndexQueryRequest:{type:"struct",name:"RunIndexQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},source_name:{type:"string",optional:!1,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunIndexQueryResponse:{type:"struct",name:"RunIndexQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},RunQueryRequest:{type:"struct",name:"RunQueryRequest",fields:{model_url:{type:"string",optional:!1,array:!1},query:{type:"Query",optional:!0,array:!1},query_malloy:{type:"string",optional:!0,array:!1},default_row_limit:{type:"number",optional:!0,array:!1},exclude_references:{type:"boolean",optional:!0,array:!1},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1}}},RunQueryResponse:{type:"struct",name:"RunQueryResponse",fields:{result:{type:"Result",optional:!0,array:!1},default_row_limit_added:{type:"number",optional:!0,array:!1},logs:{type:"LogMessage",array:!0,optional:!0},compiler_needs:{type:"CompilerNeeds",optional:!0,array:!1},timing_info:{type:"TimingInfo",optional:!0,array:!1}}},SQLNativeCell:{type:"struct",name:"SQLNativeCell",fields:{sql_native_value:{type:"string",optional:!1,array:!1}}},SQLNativeType:{type:"struct",name:"SQLNativeType",fields:{sql_type:{type:"string",optional:!0,array:!1}}},SQLQuery:{type:"struct",name:"SQLQuery",fields:{sql:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},SQLTable:{type:"struct",name:"SQLTable",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!0,array:!1},connection_name:{type:"string",optional:!1,array:!1}}},Schema:{type:"struct",name:"Schema",fields:{fields:{type:"FieldInfo",array:!0,optional:!1}}},SourceInfo:{type:"struct",name:"SourceInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},parameters:{type:"ParameterInfo",array:!0,optional:!0}}},StringCell:{type:"struct",name:"StringCell",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringLiteral:{type:"struct",name:"StringLiteral",fields:{string_value:{type:"string",optional:!1,array:!1}}},StringType:{type:"struct",name:"StringType",fields:{}},TimeTruncationFieldReference:{type:"struct",name:"TimeTruncationFieldReference",fields:{field_reference:{type:"Reference",optional:!1,array:!1},truncation:{type:"TimestampTimeframe",optional:!1,array:!1}}},TimestampCell:{type:"struct",name:"TimestampCell",fields:{timestamp_value:{type:"string",optional:!1,array:!1}}},TimestampLiteral:{type:"struct",name:"TimestampLiteral",fields:{timestamp_value:{type:"string",optional:!1,array:!1},granularity:{type:"TimestampTimeframe",optional:!0,array:!1},timezone:{type:"string",optional:!0,array:!1}}},TimestampTimeframe:{type:"enum",name:"TimestampTimeframe",values:{year:1,quarter:2,month:3,week:4,day:5,hour:6,minute:7,second:8}},TimestampType:{type:"struct",name:"TimestampType",fields:{timeframe:{type:"TimestampTimeframe",optional:!0,array:!1}}},TimingInfo:{type:"struct",name:"TimingInfo",fields:{name:{type:"string",optional:!1,array:!1},duration_ms:{type:"number",optional:!1,array:!1},detailed_timing:{type:"TimingInfo",array:!0,optional:!0}}},Translation:{type:"struct",name:"Translation",fields:{url:{type:"string",optional:!1,array:!1},compiled_model_json:{type:"string",optional:!0,array:!1}}},View:{type:"struct",name:"View",fields:{definition:{type:"ViewDefinition",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0}}},ViewArrow:{type:"struct",name:"ViewArrow",fields:{source:{type:"ViewDefinition",optional:!1,array:!1},view:{type:"ViewDefinition",optional:!1,array:!1}}},ViewDefinition:{type:"union",name:"ViewDefinition",options:{arrow:"ViewArrow",view_reference:"Reference",refinement:"ViewRefinement",segment:"ViewSegment"}},ViewInfo:{type:"struct",name:"ViewInfo",fields:{name:{type:"string",optional:!1,array:!1},schema:{type:"Schema",optional:!1,array:!1},annotations:{type:"Annotation",array:!0,optional:!0},definition:{type:"View",optional:!0,array:!1}}},ViewOperation:{type:"union",name:"ViewOperation",options:{group_by:"GroupBy",aggregate:"Aggregate",order_by:"OrderBy",limit:"Limit",where:"FilterOperation",nest:"Nest",having:"FilterOperation",drill:"DrillOperation",calculate:"CalculateOperation"}},ViewRefinement:{type:"struct",name:"ViewRefinement",fields:{base:{type:"ViewDefinition",optional:!1,array:!1},refinement:{type:"ViewDefinition",optional:!1,array:!1}}},ViewSegment:{type:"struct",name:"ViewSegment",fields:{operations:{type:"ViewOperation",array:!0,optional:!1}}}}),Kn}var Jn={},Ui={},Zn={},qa;function jp(){return qa||(qa=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.RESERVED_WORDS=void 0,Zn.RESERVED_WORDS=["accept","aggregate","declare","dimension","except","explore","group_by","having","index","join_cross","join_one","join_many","limit","measure","nest","order_by","primary_key","project","query","rename","sample","source","sql","turduck","top","where","all","as","asc","avg","boolean","by","case","cast","condition","count","date","day","days","desc","distinct","else","end","exclude","false","for","from","from_sql","has","hour","hours","import","is","json","last","max","min","minute","minutes","month","months","not","now","null","number","on","or","pick","quarter","quarters","second","seconds","string","sum","table","then","this","timestamp","to","true","turtle","week","weeks","when","with","year","years","ungrouped"]),Zn}var ja;function $p(){if(ja)return Ui;ja=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.maybeQuoteIdentifier=y;const a=jp();function d(m){const h=!m.match(/^[A-Za-z_][A-Za-z_0-9]*$/),u=a.RESERVED_WORDS.includes(m.toLowerCase());return h||u}function y(m){const h=m.split(".");for(let u=0;u<h.length;u++)d(h[u])&&(h[u]=`\`${h[u]}\``);return h.join(".")}return Ui}var $a;function Up(){if($a)return Jn;$a=1,Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.queryToMalloy=d,Jn.filterToMalloy=y;const a=$p();function d(b,{tabWidth:R}={tabWidth:2}){const B=v(b);return o(B,{tabWidth:R})}function y(b,{tabWidth:R}={tabWidth:2}){const B=T(b);return o(B,{tabWidth:R})}const m=Symbol("indent"),h=Symbol("newline"),u=Symbol("outdent"),r=Symbol("optional_newline_indent");function o(b,{tabWidth:R}={tabWidth:2}){let B="",V=0,G=!0;for(const k of b)if(k===h)B+=`
|
|
2
|
-
`,G=!0;else if(k===u)V--;else if(k===m)V++;else{if(k===r)continue;G&&(B+=" ".repeat(V*R),G=!1),B+=k}return B}function t(b,R,B,V){var G;if(R.includes(h))return[b,h,m,...R,h,u,B];const U=((G=V?.spaces)!==null&&G!==void 0?G:!0)?" ":"";return[b,U,...R,U,B]}function i(b){return{contents:b,quoteCharacter:'"'}}function e(b,R){const B=[];for(let V=0;V<b.length;V++){const G=b[V];B.push(G),V<b.length-1&&B.push(R)}return B}function s(b){var R,B;switch(b.kind){case"filter_expression_literal":return[pe(b.filter_expression_value)];case"boolean_literal":return[b.boolean_value.toString()];case"string_literal":{const{contents:V,quoteCharacter:G}=i(b.string_value);return[G,V,G]}case"number_literal":return[b.number_value.toString()];case"null_literal":return["null"];case"date_literal":return[c(l(b.date_value),(R=b.granularity)!==null&&R!==void 0?R:"day",b.timezone)];case"timestamp_literal":return[c(l(b.timestamp_value),(B=b.granularity)!==null&&B!==void 0?B:"second",b.timezone)]}}function l(b){let R;if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d):(\d\d)/.exec(b)){const[B,V,G,k,U,K,oe]=R;return[V,G,k,U,K,oe]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d):(\d\d)/.exec(b)){const[B,V,G,k,U,K]=R;return[V,G,k,U,K,"00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d) (\d\d)(?:00)?/.exec(b)){const[B,V,G,k,U]=R;return[V,G,k,U,"00","00"]}else if(R=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(b)){const[B,V,G,k]=R;return[V,G,k,"00","00","00"]}else if(R=/(\d\d\d\d)-(\d\d)/.exec(b)){const[B,V,G]=R;return[V,G,"01","00","00","00"]}else if(R=/(\d\d\d\d)/.exec(b)){const[B,V]=R;return[V,"01","01","00","00","00"]}return["1970","01","01","00","00","00"]}function c([b,R,B,V,G,k],U,K){switch(U){case"year":return`@${b}`;case"quarter":{const oe=Math.floor(+R/3)+1;return`@${b}-Q${oe}`}case"month":return`@${b}-${R}`;case"week":return`@${b}-${R}-${B}-WK`;case"day":return`@${b}-${R}-${B}`;case"hour":return`@${b}-${R}-${B} ${V}`;case"minute":return`@${b}-${R}-${B} ${V}:${G}`;case"second":return K!==void 0?`@${b}-${R}-${B} ${V}:${G}:${k}[${K}]`:`@${b}-${R}-${B} ${V}:${G}:${k}`;default:throw new Error("Unknown timeframe.")}}function p(b){var R;const B=[];for(const V of(R=b.path)!==null&&R!==void 0?R:[])B.push((0,a.maybeQuoteIdentifier)(V)),B.push(".");if(B.push((0,a.maybeQuoteIdentifier)(b.name)),b.parameters){const V=[];for(let G=0;G<b.parameters.length;G++){const k=b.parameters[G];V.push((0,a.maybeQuoteIdentifier)(k.name)),V.push(" is "),V.push(...s(k.value)),G<b.parameters.length-1&&V.push(",",h)}B.push(...t("(",V,")",{spaces:!1}))}return B}function v(b){const R=[];return R.push(...F(b.annotations)),R.push("run: "),R.push(...g(b.definition)),R}function x(b){const R=[];switch(b.kind){case"source_reference":{R.push(...p(b));break}case"refinement":R.push(...g(b));break}return R}function g(b){const R=[];switch(b.kind){case"arrow":{R.push(...x(b.source)),R.push(" -> "),R.push(..._(b.view));break}case"query_reference":{R.push(...p(b));break}case"refinement":{const B=g(b.base);b.base.kind==="arrow"?R.push(...t("(",B,")",{spaces:!1})):R.push(...B),R.push(" + "),R.push(..._(b.refinement));break}}return R}function _(b){const R=[];switch(b.kind){case"arrow":{R.push(..._(b.source)),R.push(" -> "),R.push(..._(b.view));break}case"view_reference":{R.push(...p(b));break}case"refinement":{R.push(..._(b.base)),R.push(" + "),R.push(..._(b.refinement));break}case"segment":{R.push(...A(b));break}}return R}function A(b){if(b.operations.length===0)return["{ }"];const R=b.operations.length>1,B=[];for(let V=0;V<b.operations.length;V++){const G=b.operations[V],k=[G];for(;V<b.operations.length-1;){const U=b.operations[V+1];if(U.kind===G.kind)k.push(U),V++;else break}B.push(...E(k)),R&&V<b.operations.length-1&&B.push(h)}return t("{",B,"}")}function E(b){switch(b[0].kind){case"aggregate":return Y(b,"aggregate");case"group_by":return Y(b,"group_by");case"order_by":return L(b);case"nest":return W(b);case"limit":return re(b);case"where":return fe(b);case"having":return J(b);case"drill":return ie(b);case"calculate":return Y(b,"calculate")}}function D(b,R,B=""){const V=[];V.push(`${b}:`);const G=R.length>1||R.some(k=>k.includes(h));G?V.push(h,m):V.push(" ");for(let k=0;k<R.length;k++){const U=R[k];V.push(...U),R.length>1&&k<R.length-1&&V.push(B),G&&k<R.length-1&&V.push(h)}return G&&V.push(u),V}function N(b){const R=[];return R.push(...P(b.expression)),R}function w(b){return b}function P(b){var R;switch(b.kind){case"field_reference":return p(b);case"time_truncation":return[...p(b.field_reference),".",b.truncation];case"filtered_field":return[...p(b.field_reference),...t(" {",fe(b.where),"}")];case"literal_value":return s(b.literal_value);case"moving_average":{const B=["avg_moving",...t("(",[...p(b.field_reference),b.rows_preceding!==void 0?`, ${b.rows_preceding}`:", 0",b.rows_following!==void 0?`, ${b.rows_following}`:""],")",{spaces:!1})];return!((R=b.partition_fields)===null||R===void 0)&&R.length&&B.push(...t(" {",["partition_by",": ",...e(b.partition_fields.flatMap(V=>p(V)),", ")],"}")),B}}}function j(b,R=!1){const B=[];return R||B.push(...F(b.field.annotations)),b.name&&(B.push((0,a.maybeQuoteIdentifier)(b.name)),B.push(" is ")),B.push(...N(b.field)),B}function Y(b,R){const B=[],V=b.length===1;return V&&B.push(...F(b[0].field.annotations)),B.push(...D(R,b.map(G=>j(G,V)))),B}function L(b){return D("order_by",b.map(M),",")}function M(b){const R=[];return R.push(...p(b.field_reference)),b.direction&&(R.push(" "),R.push(b.direction)),R}function W(b){const R=[],B=b.length===1;return B&&R.push(...F(b[0].view.annotations)),R.push(...D("nest",b.map(V=>Z(V,B)))),R}function Z(b,R=!1){const B=[];return R||B.push(...F(b.view.annotations)),b.name&&(B.push((0,a.maybeQuoteIdentifier)(b.name)),B.push(" is ")),B.push(...I(b.view)),B}function I(b){return _(b.definition)}function Q(b){return[`limit: ${b.limit}`]}function re(b){const R=[];for(let B=0;B<b.length;B++)B!==0&&R.push(h),R.push(...Q(b[B]));return R}function fe(b){return D("where",b.map(C),",")}function ie(b){return D("drill",b.map(C),",")}function J(b){return D("having",b.map(C),",")}const te=["`","'",'"'];function pe(b){let R,B;for(const V of te){const G=O(b,V);if(G===b)return`f${V}${b}${V}`;(B===void 0||G.length<B.length)&&(R=V,B=G)}return`f${R}${B}${R}`}function O(b,R){let B="";for(let V=0;V<b.length;V++)b.slice(V).startsWith(R)?(B+="\\"+R,V+=R.length):(B+=b[V],b[V]==="\\"&&(B+=b[++V]));return B}function T(b){switch(b.kind){case"filter_string":return[...P(b.expression)," ~ ",pe(b.filter)];case"literal_equality":return[...P(b.expression)," = ",...s(b.value)]}}function C(b){return T(b.filter)}function F(b){return b?b.flatMap(q):[]}function q(b){return[b.value.trim(),h]}return Jn}var Dr={},Ua;function Vp(){if(Ua)return Dr;Ua=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.nestUnions=d,Dr.unnestUnions=y,Dr.convertFromThrift=m,Dr.convertToThrift=u;const a=L0();function d(r){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(d);{const o={};let t;for(const i in r)i==="kind"?t=r[i]:o[i]=d(r[i]);return t===void 0?o:{[t]:o}}}function y(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(t=>y(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0){const e=y(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=y(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}function m(r,o){if(r==null)return r;if(typeof r=="string"||typeof r=="boolean")return r;if(typeof r=="number"){if(o==="number")return r;const t=h(o);if(t.type!=="enum")throw new Error(`Found a number where a ${o} was expected`);const i=Object.entries(t.values).find(([,e])=>e===r);if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i[0]}else{if(Array.isArray(r))return r.map(t=>m(t,o));{const t=h(o);if(t.type==="union"){for(const i in t.options)if(r[i]!==void 0&&r[i]!==null){const e=m(r[i],t.options[i]);if(typeof e=="object")return{kind:i,...e}}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=m(r[e],s.type)}return i}else throw new Error(`Cannot unnest unions in an enum type ${o}`)}}}function h(r){const o=a.MALLOY_INTERFACE_TYPES[r];if(o===void 0)throw new Error(`Unknown Malloy interface type ${r}`);return o}function u(r,o){if(r==null)return r;if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string"){if(o==="string")return r;const t=h(o);if(t.type==="enum"){const i=t.values[r];if(i===void 0)throw new Error(`${r} is not a valid enum value for ${o}`);return i}}else{if(Array.isArray(r))return r.map(t=>u(t,o));{const t=h(o);if(t.type==="union"){const i=r.kind,e=t.options[i];if(e===void 0)throw new Error(`${i} is not a valid union of ${o}`);const s=h(e);if(s.type!=="struct")throw new Error("Union fields must be structs");const l={};for(const c in r){if(c==="kind")continue;const p=s.fields[c];l[c]=u(r[c],p.type)}return{[i]:l}}else if(t.type==="struct"){const i={};for(const e in r){const s=t.fields[e];if(s===void 0)throw new Error(`Unknown field ${e} in ${o}`);i[e]=u(r[e],s.type)}return i}}}}return Dr}var Va;function zp(){return Va||(Va=1,function(a){var d=Or&&Or.__createBinding||(Object.create?function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}:function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]}),y=Or&&Or.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)};Object.defineProperty(a,"__esModule",{value:!0}),a.thingy4sddfdfsd=a.thingy4sdfsd=a.thingy4dfdsfs=a.thingy4asdfas=a.thingy4asdfasdf=a.thingy3dfdf=a.thingy3=a.thingy2asdf=a.thingyssdfg=a.thingy123r=a.thingy1=a.res=a.test=a.convertToThrift=a.convertFromThrift=a.unnestUnions=a.nestUnions=a.filterToMalloy=a.queryToMalloy=void 0,y(L0(),a);var m=Up();Object.defineProperty(a,"queryToMalloy",{enumerable:!0,get:function(){return m.queryToMalloy}}),Object.defineProperty(a,"filterToMalloy",{enumerable:!0,get:function(){return m.filterToMalloy}});var h=Vp();Object.defineProperty(a,"nestUnions",{enumerable:!0,get:function(){return h.nestUnions}}),Object.defineProperty(a,"unnestUnions",{enumerable:!0,get:function(){return h.unnestUnions}}),Object.defineProperty(a,"convertFromThrift",{enumerable:!0,get:function(){return h.convertFromThrift}}),Object.defineProperty(a,"convertToThrift",{enumerable:!0,get:function(){return h.convertToThrift}}),a.test={entries:[{kind:"source",name:"flights",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"boolean_type"},annotations:[{value:"# foo=1"}]},{kind:"dimension",name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}},{kind:"dimension",name:"arr_rec",type:{kind:"array_type",element_type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}}},{kind:"dimension",name:"rec",type:{kind:"record_type",fields:[{name:"arr",type:{kind:"array_type",element_type:{kind:"boolean_type"}}}]}},{kind:"join",name:"carriers",relationship:"one",schema:{fields:[{kind:"dimension",name:"code",type:{kind:"string_type"}}]}},{kind:"view",name:"by_carrier",schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]}}]},parameters:[{name:"param",type:{kind:"number_type"},default_value:{kind:"number_literal",number_value:7}}]}],anonymous_queries:[]},a.res={connection_name:"foo",data:{kind:"array_cell",array_value:[{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"UA"},{kind:"number_cell",number_value:12341234}]},{kind:"record_cell",record_value:[{kind:"string_cell",string_value:"AA"},{kind:"number_cell",number_value:2343}]}]},schema:{fields:[{kind:"dimension",name:"carrier",type:{kind:"string_type"}},{kind:"dimension",name:"flight_count",type:{kind:"number_type"}}]},sql:"SELECT * ..."},a.thingy1={definition:{kind:"query_reference",name:"flights_by_carrier"}},a.thingy123r={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingyssdfg={definition:{kind:"refinement",base:{kind:"query_reference",name:"flights"},refinement:{kind:"view_reference",name:"by_carrier"}}},a.thingy2asdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:"carrier"},filter:"WN"}}]}}}},a.thingy3={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}}},a.thingy3dfdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"view_reference",name:"top10"}}}},a.thingy4asdfasdf={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"group_by",field:{expression:{kind:"field_reference",name:"foo"}}}]}}},a.thingy4asdfas={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"view_reference",name:"by_carrier"}}},a.thingy4dfdsfs={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"refinement",base:{kind:"view_reference",name:"by_carrier"},refinement:{kind:"segment",operations:[{kind:"limit",limit:10}]}}}},a.thingy4sdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[{kind:"group_by",field:{expression:{kind:"field_reference",name:"carrier"}}},{kind:"limit",limit:10}]}}},a.thingy4sddfdfsd={definition:{kind:"arrow",source:{kind:"source_reference",name:"flights"},view:{kind:"segment",operations:[]}}}}(Or)),Or}var Xe={},ei={},wr={},ft={},Ke={},za;function ce(){if(za)return Ke;za=1;/*!
|
|
3
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
4
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
5
|
-
*/Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.SuppressWarnings=Ke.Override=Ke.Nullable=Ke.NotNull=void 0;function a(h,u,r){}Ke.NotNull=a;function d(h,u,r){}Ke.Nullable=d;function y(h,u,r){}Ke.Override=y;function m(h){return(u,r,o)=>{}}return Ke.SuppressWarnings=m,Ke}var Ha;function Hp(){if(Ha)return ft;Ha=1;/*!
|
|
6
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
7
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
8
|
-
*/var a=ft&&ft.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=ft&&ft.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.AbstractParseTreeVisitor=void 0;const y=ce();let m=class{visit(u){return u.accept(this)}visitChildren(u){let r=this.defaultResult(),o=u.childCount;for(let t=0;t<o&&this.shouldVisitNextChild(u,r);t++){let e=u.getChild(t).accept(this);r=this.aggregateResult(r,e)}return r}visitTerminal(u){return this.defaultResult()}visitErrorNode(u){return this.defaultResult()}aggregateResult(u,r){return r}shouldVisitNextChild(u,r){return!0}};return a([y.Override,d(0,y.NotNull)],m.prototype,"visit",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitChildren",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitTerminal",null),a([y.Override,d(0,y.NotNull)],m.prototype,"visitErrorNode",null),a([d(0,y.NotNull)],m.prototype,"shouldVisitNextChild",null),ft.AbstractParseTreeVisitor=m,ft}var Rr={},Pr={},Fr={},Ga;function Ve(){if(Ga)return Fr;Ga=1;/*!
|
|
9
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
10
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
11
|
-
*/var a=Fr&&Fr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.Interval=void 0;const d=ce(),y=1e3;let m=class Ye{constructor(u,r){this.a=u,this.b=r}static get INVALID(){return Ye._INVALID}static of(u,r){return u!==r||u<0||u>y?new Ye(u,r):(Ye.cache[u]==null&&(Ye.cache[u]=new Ye(u,u)),Ye.cache[u])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(u){return u===this?!0:u instanceof Ye?this.a===u.a&&this.b===u.b:!1}hashCode(){let u=23;return u=u*31+this.a,u=u*31+this.b,u}startsBeforeDisjoint(u){return this.a<u.a&&this.b<u.a}startsBeforeNonDisjoint(u){return this.a<=u.a&&this.b>=u.a}startsAfter(u){return this.a>u.a}startsAfterDisjoint(u){return this.a>u.b}startsAfterNonDisjoint(u){return this.a>u.a&&this.a<=u.b}disjoint(u){return this.startsBeforeDisjoint(u)||this.startsAfterDisjoint(u)}adjacent(u){return this.a===u.b+1||this.b===u.a-1}properlyContains(u){return u.a>=this.a&&u.b<=this.b}union(u){return Ye.of(Math.min(this.a,u.a),Math.max(this.b,u.b))}intersection(u){return Ye.of(Math.max(this.a,u.a),Math.min(this.b,u.b))}differenceNotProperlyContained(u){let r;return u.startsBeforeNonDisjoint(this)?r=Ye.of(Math.max(this.a,u.b+1),this.b):u.startsAfterNonDisjoint(this)&&(r=Ye.of(this.a,u.a-1)),r}toString(){return this.a+".."+this.b}};return m._INVALID=new m(-1,-2),m.cache=new Array(y+1),a([d.Override],m.prototype,"equals",null),a([d.Override],m.prototype,"hashCode",null),a([d.Override],m.prototype,"toString",null),Fr.Interval=m,Fr}var mo={},yo={},Ya;function gr(){return Ya||(Ya=1,function(a){/*!
|
|
12
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
13
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
14
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.IntStream=void 0,function(d){d.EOF=-1,d.UNKNOWN_SOURCE_NAME="<unknown>"}(a.IntStream||(a.IntStream={}))}(yo)),yo}var Wa;function Ie(){return Wa||(Wa=1,function(a){/*!
|
|
15
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
16
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
17
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Token=void 0;const d=gr();(function(y){y.INVALID_TYPE=0,y.EPSILON=-2,y.MIN_USER_TOKEN_TYPE=1,y.EOF=d.IntStream.EOF,y.DEFAULT_CHANNEL=0,y.HIDDEN_CHANNEL=1,y.MIN_USER_CHANNEL_VALUE=2})(a.Token||(a.Token={}))}(mo)),mo}var Qa;function _r(){if(Qa)return Pr;Qa=1;/*!
|
|
18
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
19
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
20
|
-
*/var a=Pr&&Pr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.TerminalNode=void 0;const d=Ve(),y=ce(),m=Ie();let h=class{constructor(r){this._symbol=r}getChild(r){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(r){this._parent=r}get payload(){return this._symbol}get sourceInterval(){let r=this._symbol.tokenIndex;return new d.Interval(r,r)}get childCount(){return 0}accept(r){return r.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(r){return this.toString()}toString(){return this._symbol.type===m.Token.EOF?"<EOF>":this._symbol.text||""}};return a([y.Override],h.prototype,"getChild",null),a([y.Override],h.prototype,"parent",null),a([y.Override],h.prototype,"setParent",null),a([y.Override],h.prototype,"payload",null),a([y.Override],h.prototype,"sourceInterval",null),a([y.Override],h.prototype,"childCount",null),a([y.Override],h.prototype,"accept",null),a([y.Override],h.prototype,"text",null),a([y.Override],h.prototype,"toStringTree",null),a([y.Override],h.prototype,"toString",null),Pr.TerminalNode=h,Pr}var Xa;function Ri(){if(Xa)return Rr;Xa=1;/*!
|
|
21
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
22
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
23
|
-
*/var a=Rr&&Rr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.ErrorNode=void 0;const d=ce(),y=_r();let m=class extends y.TerminalNode{constructor(u){super(u)}accept(u){return u.visitErrorNode(this)}};return a([d.Override],m.prototype,"accept",null),Rr.ErrorNode=m,Rr}var go={},Ka;function Gp(){if(Ka)return go;Ka=1;/*!
|
|
24
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
25
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
26
|
-
*/return Object.defineProperty(go,"__esModule",{value:!0}),go}var _o={},Ja;function Yp(){if(Ja)return _o;Ja=1;/*!
|
|
27
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
28
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
29
|
-
*/return Object.defineProperty(_o,"__esModule",{value:!0}),_o}var ti={},Za;function Wp(){if(Za)return ti;Za=1;/*!
|
|
30
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
31
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
32
|
-
*/Object.defineProperty(ti,"__esModule",{value:!0}),ti.ParseTreeProperty=void 0;let a=class{constructor(y="ParseTreeProperty"){this._symbol=Symbol(y)}get(y){return y[this._symbol]}set(y,m){y[this._symbol]=m}removeFrom(y){let m=y[this._symbol];return delete y[this._symbol],m}};return ti.ParseTreeProperty=a,ti}var Ao={},eu;function Qp(){if(eu)return Ao;eu=1;/*!
|
|
33
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
34
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
35
|
-
*/return Object.defineProperty(Ao,"__esModule",{value:!0}),Ao}var vo={},ri={},tu;function Pi(){if(tu)return ri;tu=1;/*!
|
|
36
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
37
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
38
|
-
*/Object.defineProperty(ri,"__esModule",{value:!0}),ri.RuleNode=void 0;let a=class{};return ri.RuleNode=a,ri}var ru;function Xp(){return ru||(ru=1,function(a){/*!
|
|
39
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
40
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
41
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreeWalker=void 0;const d=Ri(),y=_r(),m=Pi();class h{walk(r,o){let t=[],i=[],e=o,s=0;for(;e;){if(e instanceof d.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof y.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),i.push(s),s=0,e=e.getChild(0);continue}do{if(e instanceof m.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,s=0;break}let l=t[t.length-1];if(s++,e=s<l.childCount?l.getChild(s):void 0,e)break;e=t.pop(),s=i.pop()}while(e)}}enterRule(r,o){let t=o.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,o){let t=o.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}a.ParseTreeWalker=h,function(u){u.DEFAULT=new u}(h=a.ParseTreeWalker||(a.ParseTreeWalker={}))}(vo)),vo}var Eo={},nu;function Kp(){if(nu)return Eo;nu=1;/*!
|
|
42
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
43
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
44
|
-
*/return Object.defineProperty(Eo,"__esModule",{value:!0}),Eo}var So={},iu;function Jp(){if(iu)return So;iu=1;/*!
|
|
45
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
46
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
47
|
-
*/return Object.defineProperty(So,"__esModule",{value:!0}),So}var pt={},Ir={},ni={},ht={},To={exports:{}},bo={},No={},Co={},Oo,ou;function ha(){return ou||(ou=1,Oo=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var d={},y=Symbol("test"),m=Object(y);if(typeof y=="string"||Object.prototype.toString.call(y)!=="[object Symbol]"||Object.prototype.toString.call(m)!=="[object Symbol]")return!1;var h=42;d[y]=h;for(var u in d)return!1;if(typeof Object.keys=="function"&&Object.keys(d).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(d).length!==0)return!1;var r=Object.getOwnPropertySymbols(d);if(r.length!==1||r[0]!==y||!Object.prototype.propertyIsEnumerable.call(d,y))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(d,y);if(o.value!==h||o.enumerable!==!0)return!1}return!0}),Oo}var Do,su;function Zi(){if(su)return Do;su=1;var a=ha();return Do=function(){return a()&&!!Symbol.toStringTag},Do}var wo,au;function xa(){return au||(au=1,wo=Object),wo}var Ro,uu;function Zp(){return uu||(uu=1,Ro=Error),Ro}var Po,lu;function eh(){return lu||(lu=1,Po=EvalError),Po}var Fo,cu;function th(){return cu||(cu=1,Fo=RangeError),Fo}var Io,fu;function rh(){return fu||(fu=1,Io=ReferenceError),Io}var Lo,pu;function B0(){return pu||(pu=1,Lo=SyntaxError),Lo}var Bo,hu;function Fi(){return hu||(hu=1,Bo=TypeError),Bo}var ko,xu;function nh(){return xu||(xu=1,ko=URIError),ko}var Mo,du;function ih(){return du||(du=1,Mo=Math.abs),Mo}var qo,mu;function oh(){return mu||(mu=1,qo=Math.floor),qo}var jo,yu;function sh(){return yu||(yu=1,jo=Math.max),jo}var $o,gu;function ah(){return gu||(gu=1,$o=Math.min),$o}var Uo,_u;function uh(){return _u||(_u=1,Uo=Math.pow),Uo}var Vo,Au;function lh(){return Au||(Au=1,Vo=Math.round),Vo}var zo,vu;function ch(){return vu||(vu=1,zo=Number.isNaN||function(d){return d!==d}),zo}var Ho,Eu;function fh(){if(Eu)return Ho;Eu=1;var a=ch();return Ho=function(y){return a(y)||y===0?y:y<0?-1:1},Ho}var Go,Su;function ph(){return Su||(Su=1,Go=Object.getOwnPropertyDescriptor),Go}var Yo,Tu;function zn(){if(Tu)return Yo;Tu=1;var a=ph();if(a)try{a([],"length")}catch{a=null}return Yo=a,Yo}var Wo,bu;function eo(){if(bu)return Wo;bu=1;var a=Object.defineProperty||!1;if(a)try{a({},"a",{value:1})}catch{a=!1}return Wo=a,Wo}var Qo,Nu;function hh(){if(Nu)return Qo;Nu=1;var a=typeof Symbol<"u"&&Symbol,d=ha();return Qo=function(){return typeof a!="function"||typeof Symbol!="function"||typeof a("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:d()},Qo}var Xo,Cu;function k0(){return Cu||(Cu=1,Xo=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Xo}var Ko,Ou;function M0(){if(Ou)return Ko;Ou=1;var a=xa();return Ko=a.getPrototypeOf||null,Ko}var Jo,Du;function xh(){if(Du)return Jo;Du=1;var a="Function.prototype.bind called on incompatible ",d=Object.prototype.toString,y=Math.max,m="[object Function]",h=function(t,i){for(var e=[],s=0;s<t.length;s+=1)e[s]=t[s];for(var l=0;l<i.length;l+=1)e[l+t.length]=i[l];return e},u=function(t,i){for(var e=[],s=i,l=0;s<t.length;s+=1,l+=1)e[l]=t[s];return e},r=function(o,t){for(var i="",e=0;e<o.length;e+=1)i+=o[e],e+1<o.length&&(i+=t);return i};return Jo=function(t){var i=this;if(typeof i!="function"||d.apply(i)!==m)throw new TypeError(a+i);for(var e=u(arguments,1),s,l=function(){if(this instanceof s){var g=i.apply(this,h(e,arguments));return Object(g)===g?g:this}return i.apply(t,h(e,arguments))},c=y(0,i.length-e.length),p=[],v=0;v<c;v++)p[v]="$"+v;if(s=Function("binder","return function ("+r(p,",")+"){ return binder.apply(this,arguments); }")(l),i.prototype){var x=function(){};x.prototype=i.prototype,s.prototype=new x,x.prototype=null}return s},Jo}var Zo,wu;function Ii(){if(wu)return Zo;wu=1;var a=xh();return Zo=Function.prototype.bind||a,Zo}var es,Ru;function da(){return Ru||(Ru=1,es=Function.prototype.call),es}var ts,Pu;function ma(){return Pu||(Pu=1,ts=Function.prototype.apply),ts}var rs,Fu;function dh(){return Fu||(Fu=1,rs=typeof Reflect<"u"&&Reflect&&Reflect.apply),rs}var ns,Iu;function q0(){if(Iu)return ns;Iu=1;var a=Ii(),d=ma(),y=da(),m=dh();return ns=m||a.call(y,d),ns}var is,Lu;function ya(){if(Lu)return is;Lu=1;var a=Ii(),d=Fi(),y=da(),m=q0();return is=function(u){if(u.length<1||typeof u[0]!="function")throw new d("a function is required");return m(a,y,u)},is}var os,Bu;function mh(){if(Bu)return os;Bu=1;var a=ya(),d=zn(),y;try{y=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var m=!!y&&d&&d(Object.prototype,"__proto__"),h=Object,u=h.getPrototypeOf;return os=m&&typeof m.get=="function"?a([m.get]):typeof u=="function"?function(o){return u(o==null?o:h(o))}:!1,os}var ss,ku;function ga(){if(ku)return ss;ku=1;var a=k0(),d=M0(),y=mh();return ss=a?function(h){return a(h)}:d?function(h){if(!h||typeof h!="object"&&typeof h!="function")throw new TypeError("getProto: not an object");return d(h)}:y?function(h){return y(h)}:null,ss}var as,Mu;function j0(){if(Mu)return as;Mu=1;var a=Function.prototype.call,d=Object.prototype.hasOwnProperty,y=Ii();return as=y.call(a,d),as}var us,qu;function _a(){if(qu)return us;qu=1;var a,d=xa(),y=Zp(),m=eh(),h=th(),u=rh(),r=B0(),o=Fi(),t=nh(),i=ih(),e=oh(),s=sh(),l=ah(),c=uh(),p=lh(),v=fh(),x=Function,g=function(R){try{return x('"use strict"; return ('+R+").constructor;")()}catch{}},_=zn(),A=eo(),E=function(){throw new o},D=_?function(){try{return arguments.callee,E}catch{try{return _(arguments,"callee").get}catch{return E}}}():E,N=hh()(),w=ga(),P=M0(),j=k0(),Y=ma(),L=da(),M={},W=typeof Uint8Array>"u"||!w?a:w(Uint8Array),Z={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?a:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?a:ArrayBuffer,"%ArrayIteratorPrototype%":N&&w?w([][Symbol.iterator]()):a,"%AsyncFromSyncIteratorPrototype%":a,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?a:Atomics,"%BigInt%":typeof BigInt>"u"?a:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?a:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?a:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?a:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":y,"%eval%":eval,"%EvalError%":m,"%Float16Array%":typeof Float16Array>"u"?a:Float16Array,"%Float32Array%":typeof Float32Array>"u"?a:Float32Array,"%Float64Array%":typeof Float64Array>"u"?a:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?a:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?a:Int8Array,"%Int16Array%":typeof Int16Array>"u"?a:Int16Array,"%Int32Array%":typeof Int32Array>"u"?a:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":N&&w?w(w([][Symbol.iterator]())):a,"%JSON%":typeof JSON=="object"?JSON:a,"%Map%":typeof Map>"u"?a:Map,"%MapIteratorPrototype%":typeof Map>"u"||!N||!w?a:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":d,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?a:Promise,"%Proxy%":typeof Proxy>"u"?a:Proxy,"%RangeError%":h,"%ReferenceError%":u,"%Reflect%":typeof Reflect>"u"?a:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?a:Set,"%SetIteratorPrototype%":typeof Set>"u"||!N||!w?a:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?a:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":N&&w?w(""[Symbol.iterator]()):a,"%Symbol%":N?Symbol:a,"%SyntaxError%":r,"%ThrowTypeError%":D,"%TypedArray%":W,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?a:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?a:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?a:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?a:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?a:WeakMap,"%WeakRef%":typeof WeakRef>"u"?a:WeakRef,"%WeakSet%":typeof WeakSet>"u"?a:WeakSet,"%Function.prototype.call%":L,"%Function.prototype.apply%":Y,"%Object.defineProperty%":A,"%Object.getPrototypeOf%":P,"%Math.abs%":i,"%Math.floor%":e,"%Math.max%":s,"%Math.min%":l,"%Math.pow%":c,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":j};if(w)try{null.error}catch(R){var I=w(w(R));Z["%Error.prototype%"]=I}var Q=function R(B){var V;if(B==="%AsyncFunction%")V=g("async function () {}");else if(B==="%GeneratorFunction%")V=g("function* () {}");else if(B==="%AsyncGeneratorFunction%")V=g("async function* () {}");else if(B==="%AsyncGenerator%"){var G=R("%AsyncGeneratorFunction%");G&&(V=G.prototype)}else if(B==="%AsyncIteratorPrototype%"){var k=R("%AsyncGenerator%");k&&w&&(V=w(k.prototype))}return Z[B]=V,V},re={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fe=Ii(),ie=j0(),J=fe.call(L,Array.prototype.concat),te=fe.call(Y,Array.prototype.splice),pe=fe.call(L,String.prototype.replace),O=fe.call(L,String.prototype.slice),T=fe.call(L,RegExp.prototype.exec),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,q=function(B){var V=O(B,0,1),G=O(B,-1);if(V==="%"&&G!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(G==="%"&&V!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var k=[];return pe(B,C,function(U,K,oe,le){k[k.length]=oe?pe(le,F,"$1"):K||U}),k},b=function(B,V){var G=B,k;if(ie(re,G)&&(k=re[G],G="%"+k[0]+"%"),ie(Z,G)){var U=Z[G];if(U===M&&(U=Q(G)),typeof U>"u"&&!V)throw new o("intrinsic "+B+" exists, but is not available. Please file an issue!");return{alias:k,name:G,value:U}}throw new r("intrinsic "+B+" does not exist!")};return us=function(B,V){if(typeof B!="string"||B.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof V!="boolean")throw new o('"allowMissing" argument must be a boolean');if(T(/^%?[^%]*%?$/,B)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=q(B),k=G.length>0?G[0]:"",U=b("%"+k+"%",V),K=U.name,oe=U.value,le=!1,he=U.alias;he&&(k=he[0],te(G,J([0,1],he)));for(var X=1,se=!0;X<G.length;X+=1){var de=G[X],Ce=O(de,0,1),Re=O(de,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||Re==='"'||Re==="'"||Re==="`")&&Ce!==Re)throw new r("property names with quotes must have matching quotes");if((de==="constructor"||!se)&&(le=!0),k+="."+de,K="%"+k+"%",ie(Z,K))oe=Z[K];else if(oe!=null){if(!(de in oe)){if(!V)throw new o("base intrinsic for "+B+" exists, but the property is not available.");return}if(_&&X+1>=G.length){var H=_(oe,de);se=!!H,se&&"get"in H&&!("originalValue"in H.get)?oe=H.get:oe=oe[de]}else se=ie(oe,de),oe=oe[de];se&&!le&&(Z[K]=oe)}}return oe},us}var ls,ju;function Hn(){if(ju)return ls;ju=1;var a=_a(),d=ya(),y=d([a("%String.prototype.indexOf%")]);return ls=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d([r]):r},ls}var cs,$u;function yh(){if($u)return cs;$u=1;var a=Zi()(),d=Hn(),y=d("Object.prototype.toString"),m=function(o){return a&&o&&typeof o=="object"&&Symbol.toStringTag in o?!1:y(o)==="[object Arguments]"},h=function(o){return m(o)?!0:o!==null&&typeof o=="object"&&"length"in o&&typeof o.length=="number"&&o.length>=0&&y(o)!=="[object Array]"&&"callee"in o&&y(o.callee)==="[object Function]"},u=function(){return m(arguments)}();return m.isLegacyArguments=h,cs=u?m:h,cs}var fs,Uu;function gh(){if(Uu)return fs;Uu=1;var a=Hn(),d=Zi()(),y=j0(),m=zn(),h;if(d){var u=a("RegExp.prototype.exec"),r={},o=function(){throw r},t={toString:o,valueOf:o};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=o),h=function(l){if(!l||typeof l!="object")return!1;var c=m(l,"lastIndex"),p=c&&y(c,"value");if(!p)return!1;try{u(l,t)}catch(v){return v===r}}}else{var i=a("Object.prototype.toString"),e="[object RegExp]";h=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:i(l)===e}}return fs=h,fs}var ps,Vu;function _h(){if(Vu)return ps;Vu=1;var a=Hn(),d=gh(),y=a("RegExp.prototype.exec"),m=Fi();return ps=function(u){if(!d(u))throw new m("`regex` must be a RegExp");return function(o){return y(u,o)!==null}},ps}var hs,zu;function Ah(){if(zu)return hs;zu=1;var a=Hn(),d=_h(),y=d(/^\s*(?:function)?\*/),m=Zi()(),h=ga(),u=a("Object.prototype.toString"),r=a("Function.prototype.toString"),o=function(){if(!m)return!1;try{return Function("return function*() {}")()}catch{}},t;return hs=function(e){if(typeof e!="function")return!1;if(y(r(e)))return!0;if(!m){var s=u(e);return s==="[object GeneratorFunction]"}if(!h)return!1;if(typeof t>"u"){var l=o();t=l?h(l):!1}return h(e)===t},hs}var xs,Hu;function vh(){if(Hu)return xs;Hu=1;var a=Function.prototype.toString,d=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,y,m;if(typeof d=="function"&&typeof Object.defineProperty=="function")try{y=Object.defineProperty({},"length",{get:function(){throw m}}),m={},d(function(){throw 42},null,y)}catch(_){_!==m&&(d=null)}else d=null;var h=/^\s*class\b/,u=function(A){try{var E=a.call(A);return h.test(E)}catch{return!1}},r=function(A){try{return u(A)?!1:(a.call(A),!0)}catch{return!1}},o=Object.prototype.toString,t="[object Object]",i="[object Function]",e="[object GeneratorFunction]",s="[object HTMLAllCollection]",l="[object HTML document.all class]",c="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var g=document.all;o.call(g)===o.call(document.all)&&(x=function(A){if((v||!A)&&(typeof A>"u"||typeof A=="object"))try{var E=o.call(A);return(E===s||E===l||E===c||E===t)&&A("")==null}catch{}return!1})}return xs=d?function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;try{d(A,null,y)}catch(E){if(E!==m)return!1}return!u(A)&&r(A)}:function(A){if(x(A))return!0;if(!A||typeof A!="function"&&typeof A!="object")return!1;if(p)return r(A);if(u(A))return!1;var E=o.call(A);return E!==i&&E!==e&&!/^\[object HTML/.test(E)?!1:r(A)},xs}var ds,Gu;function Eh(){if(Gu)return ds;Gu=1;var a=vh(),d=Object.prototype.toString,y=Object.prototype.hasOwnProperty,m=function(t,i,e){for(var s=0,l=t.length;s<l;s++)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))},h=function(t,i,e){for(var s=0,l=t.length;s<l;s++)e==null?i(t.charAt(s),s,t):i.call(e,t.charAt(s),s,t)},u=function(t,i,e){for(var s in t)y.call(t,s)&&(e==null?i(t[s],s,t):i.call(e,t[s],s,t))};function r(o){return d.call(o)==="[object Array]"}return ds=function(t,i,e){if(!a(i))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=e),r(t)?m(t,i,s):typeof t=="string"?h(t,i,s):u(t,i,s)},ds}var ms,Yu;function Sh(){return Yu||(Yu=1,ms=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),ms}var ys,Wu;function Th(){if(Wu)return ys;Wu=1;var a=Sh(),d=typeof globalThis>"u"?I0:globalThis;return ys=function(){for(var m=[],h=0;h<a.length;h++)typeof d[a[h]]=="function"&&(m[m.length]=a[h]);return m},ys}var gs={exports:{}},_s,Qu;function $0(){if(Qu)return _s;Qu=1;var a=eo(),d=B0(),y=Fi(),m=zn();return _s=function(u,r,o){if(!u||typeof u!="object"&&typeof u!="function")throw new y("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new y("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new y("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new y("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new y("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new y("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!m&&m(u,r);if(a)a(u,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:o,writable:i===null&&l?l.writable:!i});else if(s||!t&&!i&&!e)u[r]=o;else throw new d("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_s}var As,Xu;function U0(){if(Xu)return As;Xu=1;var a=eo(),d=function(){return!!a};return d.hasArrayLengthDefineBug=function(){if(!a)return null;try{return a([],"length",{value:1}).length!==1}catch{return!0}},As=d,As}var vs,Ku;function bh(){if(Ku)return vs;Ku=1;var a=_a(),d=$0(),y=U0()(),m=zn(),h=Fi(),u=a("%Math.floor%");return vs=function(o,t){if(typeof o!="function")throw new h("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||u(t)!==t)throw new h("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],e=!0,s=!0;if("length"in o&&m){var l=m(o,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(s=!1)}return(e||s||!i)&&(y?d(o,"length",t,!0,!0):d(o,"length",t)),o},vs}var Es,Ju;function Nh(){if(Ju)return Es;Ju=1;var a=Ii(),d=ma(),y=q0();return Es=function(){return y(a,d,arguments)},Es}var Zu;function to(){return Zu||(Zu=1,function(a){var d=bh(),y=eo(),m=ya(),h=Nh();a.exports=function(r){var o=m(arguments),t=r.length-(arguments.length-1);return d(o,1+(t>0?t:0),!0)},y?y(a.exports,"apply",{value:h}):a.exports.apply=h}(gs)),gs.exports}var Ss,el;function V0(){if(el)return Ss;el=1;var a=Eh(),d=Th(),y=to(),m=Hn(),h=zn(),u=ga(),r=m("Object.prototype.toString"),o=Zi()(),t=typeof globalThis>"u"?I0:globalThis,i=d(),e=m("String.prototype.slice"),s=m("Array.prototype.indexOf",!0)||function(x,g){for(var _=0;_<x.length;_+=1)if(x[_]===g)return _;return-1},l={__proto__:null};o&&h&&u?a(i,function(v){var x=new t[v];if(Symbol.toStringTag in x&&u){var g=u(x),_=h(g,Symbol.toStringTag);if(!_&&g){var A=u(g);_=h(A,Symbol.toStringTag)}l["$"+v]=y(_.get)}}):a(i,function(v){var x=new t[v],g=x.slice||x.set;g&&(l["$"+v]=y(g))});var c=function(x){var g=!1;return a(l,function(_,A){if(!g)try{"$"+_(x)===A&&(g=e(A,1))}catch{}}),g},p=function(x){var g=!1;return a(l,function(_,A){if(!g)try{_(x),g=e(A,1)}catch{}}),g};return Ss=function(x){if(!x||typeof x!="object")return!1;if(!o){var g=e(r(x),8,-1);return s(i,g)>-1?g:g!=="Object"?!1:p(x)}return h?c(x):null},Ss}var Ts,tl;function Ch(){if(tl)return Ts;tl=1;var a=V0();return Ts=function(y){return!!a(y)},Ts}var rl;function Oh(){return rl||(rl=1,function(a){var d=yh(),y=Ah(),m=V0(),h=Ch();function u(X){return X.call.bind(X)}var r=typeof BigInt<"u",o=typeof Symbol<"u",t=u(Object.prototype.toString),i=u(Number.prototype.valueOf),e=u(String.prototype.valueOf),s=u(Boolean.prototype.valueOf);if(r)var l=u(BigInt.prototype.valueOf);if(o)var c=u(Symbol.prototype.valueOf);function p(X,se){if(typeof X!="object")return!1;try{return se(X),!0}catch{return!1}}a.isArgumentsObject=d,a.isGeneratorFunction=y,a.isTypedArray=h;function v(X){return typeof Promise<"u"&&X instanceof Promise||X!==null&&typeof X=="object"&&typeof X.then=="function"&&typeof X.catch=="function"}a.isPromise=v;function x(X){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(X):h(X)||O(X)}a.isArrayBufferView=x;function g(X){return m(X)==="Uint8Array"}a.isUint8Array=g;function _(X){return m(X)==="Uint8ClampedArray"}a.isUint8ClampedArray=_;function A(X){return m(X)==="Uint16Array"}a.isUint16Array=A;function E(X){return m(X)==="Uint32Array"}a.isUint32Array=E;function D(X){return m(X)==="Int8Array"}a.isInt8Array=D;function N(X){return m(X)==="Int16Array"}a.isInt16Array=N;function w(X){return m(X)==="Int32Array"}a.isInt32Array=w;function P(X){return m(X)==="Float32Array"}a.isFloat32Array=P;function j(X){return m(X)==="Float64Array"}a.isFloat64Array=j;function Y(X){return m(X)==="BigInt64Array"}a.isBigInt64Array=Y;function L(X){return m(X)==="BigUint64Array"}a.isBigUint64Array=L;function M(X){return t(X)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function W(X){return typeof Map>"u"?!1:M.working?M(X):X instanceof Map}a.isMap=W;function Z(X){return t(X)==="[object Set]"}Z.working=typeof Set<"u"&&Z(new Set);function I(X){return typeof Set>"u"?!1:Z.working?Z(X):X instanceof Set}a.isSet=I;function Q(X){return t(X)==="[object WeakMap]"}Q.working=typeof WeakMap<"u"&&Q(new WeakMap);function re(X){return typeof WeakMap>"u"?!1:Q.working?Q(X):X instanceof WeakMap}a.isWeakMap=re;function fe(X){return t(X)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function ie(X){return fe(X)}a.isWeakSet=ie;function J(X){return t(X)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer<"u"&&J(new ArrayBuffer);function te(X){return typeof ArrayBuffer>"u"?!1:J.working?J(X):X instanceof ArrayBuffer}a.isArrayBuffer=te;function pe(X){return t(X)==="[object DataView]"}pe.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&pe(new DataView(new ArrayBuffer(1),0,1));function O(X){return typeof DataView>"u"?!1:pe.working?pe(X):X instanceof DataView}a.isDataView=O;var T=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function C(X){return t(X)==="[object SharedArrayBuffer]"}function F(X){return typeof T>"u"?!1:(typeof C.working>"u"&&(C.working=C(new T)),C.working?C(X):X instanceof T)}a.isSharedArrayBuffer=F;function q(X){return t(X)==="[object AsyncFunction]"}a.isAsyncFunction=q;function b(X){return t(X)==="[object Map Iterator]"}a.isMapIterator=b;function R(X){return t(X)==="[object Set Iterator]"}a.isSetIterator=R;function B(X){return t(X)==="[object Generator]"}a.isGeneratorObject=B;function V(X){return t(X)==="[object WebAssembly.Module]"}a.isWebAssemblyCompiledModule=V;function G(X){return p(X,i)}a.isNumberObject=G;function k(X){return p(X,e)}a.isStringObject=k;function U(X){return p(X,s)}a.isBooleanObject=U;function K(X){return r&&p(X,l)}a.isBigIntObject=K;function oe(X){return o&&p(X,c)}a.isSymbolObject=oe;function le(X){return G(X)||k(X)||U(X)||K(X)||oe(X)}a.isBoxedPrimitive=le;function he(X){return typeof Uint8Array<"u"&&(te(X)||F(X))}a.isAnyArrayBuffer=he,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(X){Object.defineProperty(a,X,{enumerable:!1,value:function(){throw new Error(X+" is not supported in userland")}})})}(Co)),Co}var bs,nl;function Dh(){return nl||(nl=1,bs=function(d){return d&&typeof d=="object"&&typeof d.copy=="function"&&typeof d.fill=="function"&&typeof d.readUInt8=="function"}),bs}var Vi={exports:{}},il;function wh(){return il||(il=1,typeof Object.create=="function"?Vi.exports=function(d,y){y&&(d.super_=y,d.prototype=Object.create(y.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}))}:Vi.exports=function(d,y){if(y){d.super_=y;var m=function(){};m.prototype=y.prototype,d.prototype=new m,d.prototype.constructor=d}}),Vi.exports}var ol;function Vn(){return ol||(ol=1,function(a){var d={},y=Object.getOwnPropertyDescriptors||function(T){for(var C=Object.keys(T),F={},q=0;q<C.length;q++)F[C[q]]=Object.getOwnPropertyDescriptor(T,C[q]);return F},m=/%[sdj%]/g;a.format=function(O){if(!N(O)){for(var T=[],C=0;C<arguments.length;C++)T.push(o(arguments[C]));return T.join(" ")}for(var C=1,F=arguments,q=F.length,b=String(O).replace(m,function(B){if(B==="%%")return"%";if(C>=q)return B;switch(B){case"%s":return String(F[C++]);case"%d":return Number(F[C++]);case"%j":try{return JSON.stringify(F[C++])}catch{return"[Circular]"}default:return B}}),R=F[C];C<q;R=F[++C])A(R)||!Y(R)?b+=" "+R:b+=" "+o(R);return b},a.deprecate=function(O,T){if(typeof process<"u"&&process.noDeprecation===!0)return O;if(typeof process>"u")return function(){return a.deprecate(O,T).apply(this,arguments)};var C=!1;function F(){if(!C){if(process.throwDeprecation)throw new Error(T);process.traceDeprecation?console.trace(T):console.error(T),C=!0}return O.apply(this,arguments)}return F};var h={},u=/^$/;if(d.NODE_DEBUG){var r=d.NODE_DEBUG;r=r.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),u=new RegExp("^"+r+"$","i")}a.debuglog=function(O){if(O=O.toUpperCase(),!h[O])if(u.test(O)){var T=process.pid;h[O]=function(){var C=a.format.apply(a,arguments);console.error("%s %d: %s",O,T,C)}}else h[O]=function(){};return h[O]};function o(O,T){var C={seen:[],stylize:i};return arguments.length>=3&&(C.depth=arguments[2]),arguments.length>=4&&(C.colors=arguments[3]),_(T)?C.showHidden=T:T&&a._extend(C,T),P(C.showHidden)&&(C.showHidden=!1),P(C.depth)&&(C.depth=2),P(C.colors)&&(C.colors=!1),P(C.customInspect)&&(C.customInspect=!0),C.colors&&(C.stylize=t),s(C,O,C.depth)}a.inspect=o,o.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function t(O,T){var C=o.styles[T];return C?"\x1B["+o.colors[C][0]+"m"+O+"\x1B["+o.colors[C][1]+"m":O}function i(O,T){return O}function e(O){var T={};return O.forEach(function(C,F){T[C]=!0}),T}function s(O,T,C){if(O.customInspect&&T&&W(T.inspect)&&T.inspect!==a.inspect&&!(T.constructor&&T.constructor.prototype===T)){var F=T.inspect(C,O);return N(F)||(F=s(O,F,C)),F}var q=l(O,T);if(q)return q;var b=Object.keys(T),R=e(b);if(O.showHidden&&(b=Object.getOwnPropertyNames(T)),M(T)&&(b.indexOf("message")>=0||b.indexOf("description")>=0))return c(T);if(b.length===0){if(W(T)){var B=T.name?": "+T.name:"";return O.stylize("[Function"+B+"]","special")}if(j(T))return O.stylize(RegExp.prototype.toString.call(T),"regexp");if(L(T))return O.stylize(Date.prototype.toString.call(T),"date");if(M(T))return c(T)}var V="",G=!1,k=["{","}"];if(g(T)&&(G=!0,k=["[","]"]),W(T)){var U=T.name?": "+T.name:"";V=" [Function"+U+"]"}if(j(T)&&(V=" "+RegExp.prototype.toString.call(T)),L(T)&&(V=" "+Date.prototype.toUTCString.call(T)),M(T)&&(V=" "+c(T)),b.length===0&&(!G||T.length==0))return k[0]+V+k[1];if(C<0)return j(T)?O.stylize(RegExp.prototype.toString.call(T),"regexp"):O.stylize("[Object]","special");O.seen.push(T);var K;return G?K=p(O,T,C,R,b):K=b.map(function(oe){return v(O,T,C,R,oe,G)}),O.seen.pop(),x(K,V,k)}function l(O,T){if(P(T))return O.stylize("undefined","undefined");if(N(T)){var C="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(C,"string")}if(D(T))return O.stylize(""+T,"number");if(_(T))return O.stylize(""+T,"boolean");if(A(T))return O.stylize("null","null")}function c(O){return"["+Error.prototype.toString.call(O)+"]"}function p(O,T,C,F,q){for(var b=[],R=0,B=T.length;R<B;++R)ie(T,String(R))?b.push(v(O,T,C,F,String(R),!0)):b.push("");return q.forEach(function(V){V.match(/^\d+$/)||b.push(v(O,T,C,F,V,!0))}),b}function v(O,T,C,F,q,b){var R,B,V;if(V=Object.getOwnPropertyDescriptor(T,q)||{value:T[q]},V.get?V.set?B=O.stylize("[Getter/Setter]","special"):B=O.stylize("[Getter]","special"):V.set&&(B=O.stylize("[Setter]","special")),ie(F,q)||(R="["+q+"]"),B||(O.seen.indexOf(V.value)<0?(A(C)?B=s(O,V.value,null):B=s(O,V.value,C-1),B.indexOf(`
|
|
48
|
-
`)>-1&&(b?B=B.split(`
|
|
49
|
-
`).map(function(G){return" "+G}).join(`
|
|
50
|
-
`).slice(2):B=`
|
|
51
|
-
`+B.split(`
|
|
52
|
-
`).map(function(G){return" "+G}).join(`
|
|
53
|
-
`))):B=O.stylize("[Circular]","special")),P(R)){if(b&&q.match(/^\d+$/))return B;R=JSON.stringify(""+q),R.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(R=R.slice(1,-1),R=O.stylize(R,"name")):(R=R.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),R=O.stylize(R,"string"))}return R+": "+B}function x(O,T,C){var F=O.reduce(function(q,b){return b.indexOf(`
|
|
54
|
-
`)>=0,q+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return F>60?C[0]+(T===""?"":T+`
|
|
55
|
-
`)+" "+O.join(`,
|
|
56
|
-
`)+" "+C[1]:C[0]+T+" "+O.join(", ")+" "+C[1]}a.types=Oh();function g(O){return Array.isArray(O)}a.isArray=g;function _(O){return typeof O=="boolean"}a.isBoolean=_;function A(O){return O===null}a.isNull=A;function E(O){return O==null}a.isNullOrUndefined=E;function D(O){return typeof O=="number"}a.isNumber=D;function N(O){return typeof O=="string"}a.isString=N;function w(O){return typeof O=="symbol"}a.isSymbol=w;function P(O){return O===void 0}a.isUndefined=P;function j(O){return Y(O)&&I(O)==="[object RegExp]"}a.isRegExp=j,a.types.isRegExp=j;function Y(O){return typeof O=="object"&&O!==null}a.isObject=Y;function L(O){return Y(O)&&I(O)==="[object Date]"}a.isDate=L,a.types.isDate=L;function M(O){return Y(O)&&(I(O)==="[object Error]"||O instanceof Error)}a.isError=M,a.types.isNativeError=M;function W(O){return typeof O=="function"}a.isFunction=W;function Z(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}a.isPrimitive=Z,a.isBuffer=Dh();function I(O){return Object.prototype.toString.call(O)}function Q(O){return O<10?"0"+O.toString(10):O.toString(10)}var re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function fe(){var O=new Date,T=[Q(O.getHours()),Q(O.getMinutes()),Q(O.getSeconds())].join(":");return[O.getDate(),re[O.getMonth()],T].join(" ")}a.log=function(){console.log("%s - %s",fe(),a.format.apply(a,arguments))},a.inherits=wh(),a._extend=function(O,T){if(!T||!Y(T))return O;for(var C=Object.keys(T),F=C.length;F--;)O[C[F]]=T[C[F]];return O};function ie(O,T){return Object.prototype.hasOwnProperty.call(O,T)}var J=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;a.promisify=function(T){if(typeof T!="function")throw new TypeError('The "original" argument must be of type Function');if(J&&T[J]){var C=T[J];if(typeof C!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(C,J,{value:C,enumerable:!1,writable:!1,configurable:!0}),C}function C(){for(var F,q,b=new Promise(function(V,G){F=V,q=G}),R=[],B=0;B<arguments.length;B++)R.push(arguments[B]);R.push(function(V,G){V?q(V):F(G)});try{T.apply(this,R)}catch(V){q(V)}return b}return Object.setPrototypeOf(C,Object.getPrototypeOf(T)),J&&Object.defineProperty(C,J,{value:C,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(C,y(T))},a.promisify.custom=J;function te(O,T){if(!O){var C=new Error("Promise was rejected with a falsy value");C.reason=O,O=C}return T(O)}function pe(O){if(typeof O!="function")throw new TypeError('The "original" argument must be of type Function');function T(){for(var C=[],F=0;F<arguments.length;F++)C.push(arguments[F]);var q=C.pop();if(typeof q!="function")throw new TypeError("The last argument must be of type Function");var b=this,R=function(){return q.apply(b,arguments)};O.apply(this,C).then(function(B){process.nextTick(R.bind(null,null,B))},function(B){process.nextTick(te.bind(null,B,R))})}return Object.setPrototypeOf(T,Object.getPrototypeOf(O)),Object.defineProperties(T,y(O)),T}a.callbackify=pe}(No)),No}var sl;function z0(){if(sl)return bo;sl=1;function a(_){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},a(_)}function d(_,A,E){return Object.defineProperty(_,"prototype",{writable:!1}),_}function y(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}function m(_,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(A&&A.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),A&&h(_,A)}function h(_,A){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(D,N){return D.__proto__=N,D},h(_,A)}function u(_){var A=t();return function(){var D=i(_),N;if(A){var w=i(this).constructor;N=Reflect.construct(D,arguments,w)}else N=D.apply(this,arguments);return r(this,N)}}function r(_,A){if(A&&(a(A)==="object"||typeof A=="function"))return A;if(A!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(_)}function o(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function i(_){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(_)}var e={},s,l;function c(_,A,E){E||(E=Error);function D(w,P,j){return typeof A=="string"?A:A(w,P,j)}var N=function(w){m(j,w);var P=u(j);function j(Y,L,M){var W;return y(this,j),W=P.call(this,D(Y,L,M)),W.code=_,W}return d(j)}(E);e[_]=N}function p(_,A){if(Array.isArray(_)){var E=_.length;return _=_.map(function(D){return String(D)}),E>2?"one of ".concat(A," ").concat(_.slice(0,E-1).join(", "),", or ")+_[E-1]:E===2?"one of ".concat(A," ").concat(_[0]," or ").concat(_[1]):"of ".concat(A," ").concat(_[0])}else return"of ".concat(A," ").concat(String(_))}function v(_,A,E){return _.substr(0,A.length)===A}function x(_,A,E){return(E===void 0||E>_.length)&&(E=_.length),_.substring(E-A.length,E)===A}function g(_,A,E){return typeof E!="number"&&(E=0),E+A.length>_.length?!1:_.indexOf(A,E)!==-1}return c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",function(_,A,E){s===void 0&&(s=Ue()),s(typeof _=="string","'name' must be a string");var D;typeof A=="string"&&v(A,"not ")?(D="must not be",A=A.replace(/^not /,"")):D="must be";var N;if(x(_," argument"))N="The ".concat(_," ").concat(D," ").concat(p(A,"type"));else{var w=g(_,".")?"property":"argument";N='The "'.concat(_,'" ').concat(w," ").concat(D," ").concat(p(A,"type"))}return N+=". Received type ".concat(a(E)),N},TypeError),c("ERR_INVALID_ARG_VALUE",function(_,A){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=Vn());var D=l.inspect(A);return D.length>128&&(D="".concat(D.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(E,". Received ").concat(D)},TypeError),c("ERR_INVALID_RETURN_VALUE",function(_,A,E){var D;return E&&E.constructor&&E.constructor.name?D="instance of ".concat(E.constructor.name):D="type ".concat(a(E)),"Expected ".concat(_,' to be returned from the "').concat(A,'"')+" function but got ".concat(D,".")},TypeError),c("ERR_MISSING_ARGS",function(){for(var _=arguments.length,A=new Array(_),E=0;E<_;E++)A[E]=arguments[E];s===void 0&&(s=Ue()),s(A.length>0,"At least one arg needs to be specified");var D="The ",N=A.length;switch(A=A.map(function(w){return'"'.concat(w,'"')}),N){case 1:D+="".concat(A[0]," argument");break;case 2:D+="".concat(A[0]," and ").concat(A[1]," arguments");break;default:D+=A.slice(0,N-1).join(", "),D+=", and ".concat(A[N-1]," arguments");break}return"".concat(D," must be specified")},TypeError),bo.codes=e,bo}var Ns,al;function Rh(){if(al)return Ns;al=1;function a(ie,J){var te=Object.keys(ie);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(ie);J&&(pe=pe.filter(function(O){return Object.getOwnPropertyDescriptor(ie,O).enumerable})),te.push.apply(te,pe)}return te}function d(ie){for(var J=1;J<arguments.length;J++){var te=arguments[J]!=null?arguments[J]:{};J%2?a(Object(te),!0).forEach(function(pe){y(ie,pe,te[pe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ie,Object.getOwnPropertyDescriptors(te)):a(Object(te)).forEach(function(pe){Object.defineProperty(ie,pe,Object.getOwnPropertyDescriptor(te,pe))})}return ie}function y(ie,J,te){return J=r(J),J in ie?Object.defineProperty(ie,J,{value:te,enumerable:!0,configurable:!0,writable:!0}):ie[J]=te,ie}function m(ie,J){if(!(ie instanceof J))throw new TypeError("Cannot call a class as a function")}function h(ie,J){for(var te=0;te<J.length;te++){var pe=J[te];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ie,r(pe.key),pe)}}function u(ie,J,te){return J&&h(ie.prototype,J),Object.defineProperty(ie,"prototype",{writable:!1}),ie}function r(ie){var J=o(ie,"string");return _(J)==="symbol"?J:String(J)}function o(ie,J){if(_(ie)!=="object"||ie===null)return ie;var te=ie[Symbol.toPrimitive];if(te!==void 0){var pe=te.call(ie,J);if(_(pe)!=="object")return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ie)}function t(ie,J){if(typeof J!="function"&&J!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(J&&J.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),Object.defineProperty(ie,"prototype",{writable:!1}),J&&x(ie,J)}function i(ie){var J=p();return function(){var pe=g(ie),O;if(J){var T=g(this).constructor;O=Reflect.construct(pe,arguments,T)}else O=pe.apply(this,arguments);return e(this,O)}}function e(ie,J){if(J&&(_(J)==="object"||typeof J=="function"))return J;if(J!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return s(ie)}function s(ie){if(ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}function l(ie){var J=typeof Map=="function"?new Map:void 0;return l=function(pe){if(pe===null||!v(pe))return pe;if(typeof pe!="function")throw new TypeError("Super expression must either be null or a function");if(typeof J<"u"){if(J.has(pe))return J.get(pe);J.set(pe,O)}function O(){return c(pe,arguments,g(this).constructor)}return O.prototype=Object.create(pe.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),x(O,pe)},l(ie)}function c(ie,J,te){return p()?c=Reflect.construct.bind():c=function(O,T,C){var F=[null];F.push.apply(F,T);var q=Function.bind.apply(O,F),b=new q;return C&&x(b,C.prototype),b},c.apply(null,arguments)}function p(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(ie){return Function.toString.call(ie).indexOf("[native code]")!==-1}function x(ie,J){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pe,O){return pe.__proto__=O,pe},x(ie,J)}function g(ie){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(te){return te.__proto__||Object.getPrototypeOf(te)},g(ie)}function _(ie){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J},_(ie)}var A=Vn(),E=A.inspect,D=z0(),N=D.codes.ERR_INVALID_ARG_TYPE;function w(ie,J,te){return(te===void 0||te>ie.length)&&(te=ie.length),ie.substring(te-J.length,te)===J}function P(ie,J){if(J=Math.floor(J),ie.length==0||J==0)return"";var te=ie.length*J;for(J=Math.floor(Math.log(J)/Math.log(2));J;)ie+=ie,J--;return ie+=ie.substring(0,te-ie.length),ie}var j="",Y="",L="",M="",W={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Z=10;function I(ie){var J=Object.keys(ie),te=Object.create(Object.getPrototypeOf(ie));return J.forEach(function(pe){te[pe]=ie[pe]}),Object.defineProperty(te,"message",{value:ie.message}),te}function Q(ie){return E(ie,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function re(ie,J,te){var pe="",O="",T=0,C="",F=!1,q=Q(ie),b=q.split(`
|
|
57
|
-
`),R=Q(J).split(`
|
|
58
|
-
`),B=0,V="";if(te==="strictEqual"&&_(ie)==="object"&&_(J)==="object"&&ie!==null&&J!==null&&(te="strictEqualObject"),b.length===1&&R.length===1&&b[0]!==R[0]){var G=b[0].length+R[0].length;if(G<=Z){if((_(ie)!=="object"||ie===null)&&(_(J)!=="object"||J===null)&&(ie!==0||J!==0))return"".concat(W[te],`
|
|
59
|
-
|
|
60
|
-
`)+"".concat(b[0]," !== ").concat(R[0],`
|
|
61
|
-
`)}else if(te!=="strictEqualObject"){var k=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(G<k){for(;b[0][B]===R[0][B];)B++;B>2&&(V=`
|
|
62
|
-
`.concat(P(" ",B),"^"),B=0)}}}for(var U=b[b.length-1],K=R[R.length-1];U===K&&(B++<2?C=`
|
|
63
|
-
`.concat(U).concat(C):pe=U,b.pop(),R.pop(),!(b.length===0||R.length===0));)U=b[b.length-1],K=R[R.length-1];var oe=Math.max(b.length,R.length);if(oe===0){var le=q.split(`
|
|
64
|
-
`);if(le.length>30)for(le[26]="".concat(j,"...").concat(M);le.length>27;)le.pop();return"".concat(W.notIdentical,`
|
|
65
|
-
|
|
66
|
-
`).concat(le.join(`
|
|
67
|
-
`),`
|
|
68
|
-
`)}B>3&&(C=`
|
|
69
|
-
`.concat(j,"...").concat(M).concat(C),F=!0),pe!==""&&(C=`
|
|
70
|
-
`.concat(pe).concat(C),pe="");var he=0,X=W[te]+`
|
|
71
|
-
`.concat(Y,"+ actual").concat(M," ").concat(L,"- expected").concat(M),se=" ".concat(j,"...").concat(M," Lines skipped");for(B=0;B<oe;B++){var de=B-T;if(b.length<B+1)de>1&&B>2&&(de>4?(O+=`
|
|
72
|
-
`.concat(j,"...").concat(M),F=!0):de>3&&(O+=`
|
|
73
|
-
`.concat(R[B-2]),he++),O+=`
|
|
74
|
-
`.concat(R[B-1]),he++),T=B,pe+=`
|
|
75
|
-
`.concat(L,"-").concat(M," ").concat(R[B]),he++;else if(R.length<B+1)de>1&&B>2&&(de>4?(O+=`
|
|
76
|
-
`.concat(j,"...").concat(M),F=!0):de>3&&(O+=`
|
|
77
|
-
`.concat(b[B-2]),he++),O+=`
|
|
78
|
-
`.concat(b[B-1]),he++),T=B,O+=`
|
|
79
|
-
`.concat(Y,"+").concat(M," ").concat(b[B]),he++;else{var Ce=R[B],Re=b[B],H=Re!==Ce&&(!w(Re,",")||Re.slice(0,-1)!==Ce);H&&w(Ce,",")&&Ce.slice(0,-1)===Re&&(H=!1,Re+=","),H?(de>1&&B>2&&(de>4?(O+=`
|
|
80
|
-
`.concat(j,"...").concat(M),F=!0):de>3&&(O+=`
|
|
81
|
-
`.concat(b[B-2]),he++),O+=`
|
|
82
|
-
`.concat(b[B-1]),he++),T=B,O+=`
|
|
83
|
-
`.concat(Y,"+").concat(M," ").concat(Re),pe+=`
|
|
84
|
-
`.concat(L,"-").concat(M," ").concat(Ce),he+=2):(O+=pe,pe="",(de===1||B===0)&&(O+=`
|
|
85
|
-
`.concat(Re),he++))}if(he>20&&B<oe-2)return"".concat(X).concat(se,`
|
|
86
|
-
`).concat(O,`
|
|
87
|
-
`).concat(j,"...").concat(M).concat(pe,`
|
|
88
|
-
`)+"".concat(j,"...").concat(M)}return"".concat(X).concat(F?se:"",`
|
|
89
|
-
`).concat(O).concat(pe).concat(C).concat(V)}var fe=function(ie,J){t(pe,ie);var te=i(pe);function pe(O){var T;if(m(this,pe),_(O)!=="object"||O===null)throw new N("options","Object",O);var C=O.message,F=O.operator,q=O.stackStartFn,b=O.actual,R=O.expected,B=Error.stackTraceLimit;if(Error.stackTraceLimit=0,C!=null)T=te.call(this,String(C));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(j="\x1B[34m",Y="\x1B[32m",M="\x1B[39m",L="\x1B[31m"):(j="",Y="",M="",L="")),_(b)==="object"&&b!==null&&_(R)==="object"&&R!==null&&"stack"in b&&b instanceof Error&&"stack"in R&&R instanceof Error&&(b=I(b),R=I(R)),F==="deepStrictEqual"||F==="strictEqual")T=te.call(this,re(b,R,F));else if(F==="notDeepStrictEqual"||F==="notStrictEqual"){var V=W[F],G=Q(b).split(`
|
|
90
|
-
`);if(F==="notStrictEqual"&&_(b)==="object"&&b!==null&&(V=W.notStrictEqualObject),G.length>30)for(G[26]="".concat(j,"...").concat(M);G.length>27;)G.pop();G.length===1?T=te.call(this,"".concat(V," ").concat(G[0])):T=te.call(this,"".concat(V,`
|
|
91
|
-
|
|
92
|
-
`).concat(G.join(`
|
|
93
|
-
`),`
|
|
94
|
-
`))}else{var k=Q(b),U="",K=W[F];F==="notDeepEqual"||F==="notEqual"?(k="".concat(W[F],`
|
|
95
|
-
|
|
96
|
-
`).concat(k),k.length>1024&&(k="".concat(k.slice(0,1021),"..."))):(U="".concat(Q(R)),k.length>512&&(k="".concat(k.slice(0,509),"...")),U.length>512&&(U="".concat(U.slice(0,509),"...")),F==="deepEqual"||F==="equal"?k="".concat(K,`
|
|
97
|
-
|
|
98
|
-
`).concat(k,`
|
|
99
|
-
|
|
100
|
-
should equal
|
|
101
|
-
|
|
102
|
-
`):U=" ".concat(F," ").concat(U)),T=te.call(this,"".concat(k).concat(U))}return Error.stackTraceLimit=B,T.generatedMessage=!C,Object.defineProperty(s(T),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),T.code="ERR_ASSERTION",T.actual=b,T.expected=R,T.operator=F,Error.captureStackTrace&&Error.captureStackTrace(s(T),q),T.stack,T.name="AssertionError",e(T)}return u(pe,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:J,value:function(T,C){return E(this,d(d({},C),{},{customInspect:!1,depth:0}))}}]),pe}(l(Error),E.custom);return Ns=fe,Ns}var Cs,ul;function H0(){if(ul)return Cs;ul=1;var a=Object.prototype.toString;return Cs=function(y){var m=a.call(y),h=m==="[object Arguments]";return h||(h=m!=="[object Array]"&&y!==null&&typeof y=="object"&&typeof y.length=="number"&&y.length>=0&&a.call(y.callee)==="[object Function]"),h},Cs}var Os,ll;function Ph(){if(ll)return Os;ll=1;var a;if(!Object.keys){var d=Object.prototype.hasOwnProperty,y=Object.prototype.toString,m=H0(),h=Object.prototype.propertyIsEnumerable,u=!h.call({toString:null},"toString"),r=h.call(function(){},"prototype"),o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(l){var c=l.constructor;return c&&c.prototype===l},i={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=function(){if(typeof window>"u")return!1;for(var l in window)try{if(!i["$"+l]&&d.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{t(window[l])}catch{return!0}}catch{return!0}return!1}(),s=function(l){if(typeof window>"u"||!e)return t(l);try{return t(l)}catch{return!1}};a=function(c){var p=c!==null&&typeof c=="object",v=y.call(c)==="[object Function]",x=m(c),g=p&&y.call(c)==="[object String]",_=[];if(!p&&!v&&!x)throw new TypeError("Object.keys called on a non-object");var A=r&&v;if(g&&c.length>0&&!d.call(c,0))for(var E=0;E<c.length;++E)_.push(String(E));if(x&&c.length>0)for(var D=0;D<c.length;++D)_.push(String(D));else for(var N in c)!(A&&N==="prototype")&&d.call(c,N)&&_.push(String(N));if(u)for(var w=s(c),P=0;P<o.length;++P)!(w&&o[P]==="constructor")&&d.call(c,o[P])&&_.push(o[P]);return _}}return Os=a,Os}var Ds,cl;function G0(){if(cl)return Ds;cl=1;var a=Array.prototype.slice,d=H0(),y=Object.keys,m=y?function(r){return y(r)}:Ph(),h=Object.keys;return m.shim=function(){if(Object.keys){var r=function(){var o=Object.keys(arguments);return o&&o.length===arguments.length}(1,2);r||(Object.keys=function(t){return d(t)?h(a.call(t)):h(t)})}else Object.keys=m;return Object.keys||m},Ds=m,Ds}var ws,fl;function Fh(){if(fl)return ws;fl=1;var a=G0(),d=ha()(),y=Hn(),m=xa(),h=y("Array.prototype.push"),u=y("Object.prototype.propertyIsEnumerable"),r=d?m.getOwnPropertySymbols:null;return ws=function(t,i){if(t==null)throw new TypeError("target must be an object");var e=m(t);if(arguments.length===1)return e;for(var s=1;s<arguments.length;++s){var l=m(arguments[s]),c=a(l),p=d&&(m.getOwnPropertySymbols||r);if(p)for(var v=p(l),x=0;x<v.length;++x){var g=v[x];u(l,g)&&h(c,g)}for(var _=0;_<c.length;++_){var A=c[_];if(u(l,A)){var E=l[A];e[A]=E}}}return e},ws}var Rs,pl;function Ih(){if(pl)return Rs;pl=1;var a=Fh(),d=function(){if(!Object.assign)return!1;for(var m="abcdefghijklmnopqrst",h=m.split(""),u={},r=0;r<h.length;++r)u[h[r]]=h[r];var o=Object.assign({},u),t="";for(var i in o)t+=i;return m!==t},y=function(){if(!Object.assign||!Object.preventExtensions)return!1;var m=Object.preventExtensions({1:2});try{Object.assign(m,"xy")}catch{return m[1]==="y"}return!1};return Rs=function(){return!Object.assign||d()||y()?a:Object.assign},Rs}var Ps,hl;function Y0(){if(hl)return Ps;hl=1;var a=function(d){return d!==d};return Ps=function(y,m){return y===0&&m===0?1/y===1/m:!!(y===m||a(y)&&a(m))},Ps}var Fs,xl;function Aa(){if(xl)return Fs;xl=1;var a=Y0();return Fs=function(){return typeof Object.is=="function"?Object.is:a},Fs}var Is,dl;function Lh(){if(dl)return Is;dl=1;var a=_a(),d=to(),y=d(a("String.prototype.indexOf"));return Is=function(h,u){var r=a(h,!!u);return typeof r=="function"&&y(h,".prototype.")>-1?d(r):r},Is}var Ls,ml;function ro(){if(ml)return Ls;ml=1;var a=G0(),d=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",y=Object.prototype.toString,m=Array.prototype.concat,h=$0(),u=function(i){return typeof i=="function"&&y.call(i)==="[object Function]"},r=U0()(),o=function(i,e,s,l){if(e in i){if(l===!0){if(i[e]===s)return}else if(!u(l)||!l())return}r?h(i,e,s,!0):h(i,e,s)},t=function(i,e){var s=arguments.length>2?arguments[2]:{},l=a(e);d&&(l=m.call(l,Object.getOwnPropertySymbols(e)));for(var c=0;c<l.length;c+=1)o(i,l[c],e[l[c]],s[l[c]])};return t.supportsDescriptors=!!r,Ls=t,Ls}var Bs,yl;function Bh(){if(yl)return Bs;yl=1;var a=Aa(),d=ro();return Bs=function(){var m=a();return d(Object,{is:m},{is:function(){return Object.is!==m}}),m},Bs}var ks,gl;function kh(){if(gl)return ks;gl=1;var a=ro(),d=to(),y=Y0(),m=Aa(),h=Bh(),u=d(m(),Object);return a(u,{getPolyfill:m,implementation:y,shim:h}),ks=u,ks}var Ms,_l;function W0(){return _l||(_l=1,Ms=function(d){return d!==d}),Ms}var qs,Al;function Q0(){if(Al)return qs;Al=1;var a=W0();return qs=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:a},qs}var js,vl;function Mh(){if(vl)return js;vl=1;var a=ro(),d=Q0();return js=function(){var m=d();return a(Number,{isNaN:m},{isNaN:function(){return Number.isNaN!==m}}),m},js}var $s,El;function qh(){if(El)return $s;El=1;var a=to(),d=ro(),y=W0(),m=Q0(),h=Mh(),u=a(m(),Number);return d(u,{getPolyfill:m,implementation:y,shim:h}),$s=u,$s}var Us,Sl;function jh(){if(Sl)return Us;Sl=1;function a(H,ee){return u(H)||h(H,ee)||y(H,ee)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y(H,ee){if(H){if(typeof H=="string")return m(H,ee);var xe=Object.prototype.toString.call(H).slice(8,-1);if(xe==="Object"&&H.constructor&&(xe=H.constructor.name),xe==="Map"||xe==="Set")return Array.from(H);if(xe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(xe))return m(H,ee)}}function m(H,ee){(ee==null||ee>H.length)&&(ee=H.length);for(var xe=0,ge=new Array(ee);xe<ee;xe++)ge[xe]=H[xe];return ge}function h(H,ee){var xe=H==null?null:typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(xe!=null){var ge,_e,be,Te,De=[],Pe=!0,Le=!1;try{if(be=(xe=xe.call(H)).next,ee!==0)for(;!(Pe=(ge=be.call(xe)).done)&&(De.push(ge.value),De.length!==ee);Pe=!0);}catch(ae){Le=!0,_e=ae}finally{try{if(!Pe&&xe.return!=null&&(Te=xe.return(),Object(Te)!==Te))return}finally{if(Le)throw _e}}return De}}function u(H){if(Array.isArray(H))return H}function r(H){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},r(H)}var o=/a/g.flags!==void 0,t=function(ee){var xe=[];return ee.forEach(function(ge){return xe.push(ge)}),xe},i=function(ee){var xe=[];return ee.forEach(function(ge,_e){return xe.push([_e,ge])}),xe},e=Object.is?Object.is:kh(),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:qh();function c(H){return H.call.bind(H)}var p=c(Object.prototype.hasOwnProperty),v=c(Object.prototype.propertyIsEnumerable),x=c(Object.prototype.toString),g=Vn().types,_=g.isAnyArrayBuffer,A=g.isArrayBufferView,E=g.isDate,D=g.isMap,N=g.isRegExp,w=g.isSet,P=g.isNativeError,j=g.isBoxedPrimitive,Y=g.isNumberObject,L=g.isStringObject,M=g.isBooleanObject,W=g.isBigIntObject,Z=g.isSymbolObject,I=g.isFloat32Array,Q=g.isFloat64Array;function re(H){if(H.length===0||H.length>10)return!0;for(var ee=0;ee<H.length;ee++){var xe=H.charCodeAt(ee);if(xe<48||xe>57)return!0}return H.length===10&&H>=Math.pow(2,32)}function fe(H){return Object.keys(H).filter(re).concat(s(H).filter(Object.prototype.propertyIsEnumerable.bind(H)))}/*!
|
|
104
|
-
* The buffer module from node.js, for the browser.
|
|
105
|
-
*
|
|
106
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
107
|
-
* @license MIT
|
|
108
|
-
*/function ie(H,ee){if(H===ee)return 0;for(var xe=H.length,ge=ee.length,_e=0,be=Math.min(xe,ge);_e<be;++_e)if(H[_e]!==ee[_e]){xe=H[_e],ge=ee[_e];break}return xe<ge?-1:ge<xe?1:0}var J=!0,te=!1,pe=0,O=1,T=2,C=3;function F(H,ee){return o?H.source===ee.source&&H.flags===ee.flags:RegExp.prototype.toString.call(H)===RegExp.prototype.toString.call(ee)}function q(H,ee){if(H.byteLength!==ee.byteLength)return!1;for(var xe=0;xe<H.byteLength;xe++)if(H[xe]!==ee[xe])return!1;return!0}function b(H,ee){return H.byteLength!==ee.byteLength?!1:ie(new Uint8Array(H.buffer,H.byteOffset,H.byteLength),new Uint8Array(ee.buffer,ee.byteOffset,ee.byteLength))===0}function R(H,ee){return H.byteLength===ee.byteLength&&ie(new Uint8Array(H),new Uint8Array(ee))===0}function B(H,ee){return Y(H)?Y(ee)&&e(Number.prototype.valueOf.call(H),Number.prototype.valueOf.call(ee)):L(H)?L(ee)&&String.prototype.valueOf.call(H)===String.prototype.valueOf.call(ee):M(H)?M(ee)&&Boolean.prototype.valueOf.call(H)===Boolean.prototype.valueOf.call(ee):W(H)?W(ee)&&BigInt.prototype.valueOf.call(H)===BigInt.prototype.valueOf.call(ee):Z(ee)&&Symbol.prototype.valueOf.call(H)===Symbol.prototype.valueOf.call(ee)}function V(H,ee,xe,ge){if(H===ee)return H!==0?!0:xe?e(H,ee):!0;if(xe){if(r(H)!=="object")return typeof H=="number"&&l(H)&&l(ee);if(r(ee)!=="object"||H===null||ee===null||Object.getPrototypeOf(H)!==Object.getPrototypeOf(ee))return!1}else{if(H===null||r(H)!=="object")return ee===null||r(ee)!=="object"?H==ee:!1;if(ee===null||r(ee)!=="object")return!1}var _e=x(H),be=x(ee);if(_e!==be)return!1;if(Array.isArray(H)){if(H.length!==ee.length)return!1;var Te=fe(H),De=fe(ee);return Te.length!==De.length?!1:k(H,ee,xe,ge,O,Te)}if(_e==="[object Object]"&&(!D(H)&&D(ee)||!w(H)&&w(ee)))return!1;if(E(H)){if(!E(ee)||Date.prototype.getTime.call(H)!==Date.prototype.getTime.call(ee))return!1}else if(N(H)){if(!N(ee)||!F(H,ee))return!1}else if(P(H)||H instanceof Error){if(H.message!==ee.message||H.name!==ee.name)return!1}else if(A(H)){if(!xe&&(I(H)||Q(H))){if(!q(H,ee))return!1}else if(!b(H,ee))return!1;var Pe=fe(H),Le=fe(ee);return Pe.length!==Le.length?!1:k(H,ee,xe,ge,pe,Pe)}else{if(w(H))return!w(ee)||H.size!==ee.size?!1:k(H,ee,xe,ge,T);if(D(H))return!D(ee)||H.size!==ee.size?!1:k(H,ee,xe,ge,C);if(_(H)){if(!R(H,ee))return!1}else if(j(H)&&!B(H,ee))return!1}return k(H,ee,xe,ge,pe)}function G(H,ee){return ee.filter(function(xe){return v(H,xe)})}function k(H,ee,xe,ge,_e,be){if(arguments.length===5){be=Object.keys(H);var Te=Object.keys(ee);if(be.length!==Te.length)return!1}for(var De=0;De<be.length;De++)if(!p(ee,be[De]))return!1;if(xe&&arguments.length===5){var Pe=s(H);if(Pe.length!==0){var Le=0;for(De=0;De<Pe.length;De++){var ae=Pe[De];if(v(H,ae)){if(!v(ee,ae))return!1;be.push(ae),Le++}else if(v(ee,ae))return!1}var ve=s(ee);if(Pe.length!==ve.length&&G(ee,ve).length!==Le)return!1}else{var Ee=s(ee);if(Ee.length!==0&&G(ee,Ee).length!==0)return!1}}if(be.length===0&&(_e===pe||_e===O&&H.length===0||H.size===0))return!0;if(ge===void 0)ge={val1:new Map,val2:new Map,position:0};else{var z=ge.val1.get(H);if(z!==void 0){var f=ge.val2.get(ee);if(f!==void 0)return z===f}ge.position++}ge.val1.set(H,ge.position),ge.val2.set(ee,ge.position);var S=de(H,ee,xe,be,ge,_e);return ge.val1.delete(H),ge.val2.delete(ee),S}function U(H,ee,xe,ge){for(var _e=t(H),be=0;be<_e.length;be++){var Te=_e[be];if(V(ee,Te,xe,ge))return H.delete(Te),!0}return!1}function K(H){switch(r(H)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":H=+H;case"number":if(l(H))return!1}return!0}function oe(H,ee,xe){var ge=K(xe);return ge??(ee.has(ge)&&!H.has(ge))}function le(H,ee,xe,ge,_e){var be=K(xe);if(be!=null)return be;var Te=ee.get(be);return Te===void 0&&!ee.has(be)||!V(ge,Te,!1,_e)?!1:!H.has(be)&&V(ge,Te,!1,_e)}function he(H,ee,xe,ge){for(var _e=null,be=t(H),Te=0;Te<be.length;Te++){var De=be[Te];if(r(De)==="object"&&De!==null)_e===null&&(_e=new Set),_e.add(De);else if(!ee.has(De)){if(xe||!oe(H,ee,De))return!1;_e===null&&(_e=new Set),_e.add(De)}}if(_e!==null){for(var Pe=t(ee),Le=0;Le<Pe.length;Le++){var ae=Pe[Le];if(r(ae)==="object"&&ae!==null){if(!U(_e,ae,xe,ge))return!1}else if(!xe&&!H.has(ae)&&!U(_e,ae,xe,ge))return!1}return _e.size===0}return!0}function X(H,ee,xe,ge,_e,be){for(var Te=t(H),De=0;De<Te.length;De++){var Pe=Te[De];if(V(xe,Pe,_e,be)&&V(ge,ee.get(Pe),_e,be))return H.delete(Pe),!0}return!1}function se(H,ee,xe,ge){for(var _e=null,be=i(H),Te=0;Te<be.length;Te++){var De=a(be[Te],2),Pe=De[0],Le=De[1];if(r(Pe)==="object"&&Pe!==null)_e===null&&(_e=new Set),_e.add(Pe);else{var ae=ee.get(Pe);if(ae===void 0&&!ee.has(Pe)||!V(Le,ae,xe,ge)){if(xe||!le(H,ee,Pe,Le,ge))return!1;_e===null&&(_e=new Set),_e.add(Pe)}}}if(_e!==null){for(var ve=i(ee),Ee=0;Ee<ve.length;Ee++){var z=a(ve[Ee],2),f=z[0],S=z[1];if(r(f)==="object"&&f!==null){if(!X(_e,H,f,S,xe,ge))return!1}else if(!xe&&(!H.has(f)||!V(H.get(f),S,!1,ge))&&!X(_e,H,f,S,!1,ge))return!1}return _e.size===0}return!0}function de(H,ee,xe,ge,_e,be){var Te=0;if(be===T){if(!he(H,ee,xe,_e))return!1}else if(be===C){if(!se(H,ee,xe,_e))return!1}else if(be===O)for(;Te<H.length;Te++)if(p(H,Te)){if(!p(ee,Te)||!V(H[Te],ee[Te],xe,_e))return!1}else{if(p(ee,Te))return!1;for(var De=Object.keys(H);Te<De.length;Te++){var Pe=De[Te];if(!p(ee,Pe)||!V(H[Pe],ee[Pe],xe,_e))return!1}return De.length===Object.keys(ee).length}for(Te=0;Te<ge.length;Te++){var Le=ge[Te];if(!V(H[Le],ee[Le],xe,_e))return!1}return!0}function Ce(H,ee){return V(H,ee,te)}function Re(H,ee){return V(H,ee,J)}return Us={isDeepEqual:Ce,isDeepStrictEqual:Re},Us}var Tl;function Ue(){if(Tl)return To.exports;Tl=1;function a(T){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},a(T)}function d(T,C,F){return Object.defineProperty(T,"prototype",{writable:!1}),T}function y(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")}var m=z0(),h=m.codes,u=h.ERR_AMBIGUOUS_ARGUMENT,r=h.ERR_INVALID_ARG_TYPE,o=h.ERR_INVALID_ARG_VALUE,t=h.ERR_INVALID_RETURN_VALUE,i=h.ERR_MISSING_ARGS,e=Rh(),s=Vn(),l=s.inspect,c=Vn().types,p=c.isPromise,v=c.isRegExp,x=Ih()(),g=Aa()(),_=Lh()("RegExp.prototype.test"),A,E;function D(){var T=jh();A=T.isDeepEqual,E=T.isDeepStrictEqual}var N=!1,w=To.exports=M,P={};function j(T){throw T.message instanceof Error?T.message:new e(T)}function Y(T,C,F,q,b){var R=arguments.length,B;if(R===0)B="Failed";else if(R===1)F=T,T=void 0;else{if(N===!1){N=!0;var V=process.emitWarning?process.emitWarning:console.warn.bind(console);V("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}R===2&&(q="!=")}if(F instanceof Error)throw F;var G={actual:T,expected:C,operator:q===void 0?"fail":q,stackStartFn:b||Y};F!==void 0&&(G.message=F);var k=new e(G);throw B&&(k.message=B,k.generatedMessage=!0),k}w.fail=Y,w.AssertionError=e;function L(T,C,F,q){if(!F){var b=!1;if(C===0)b=!0,q="No value argument passed to `assert.ok()`";else if(q instanceof Error)throw q;var R=new e({actual:F,expected:!0,message:q,operator:"==",stackStartFn:T});throw R.generatedMessage=b,R}}function M(){for(var T=arguments.length,C=new Array(T),F=0;F<T;F++)C[F]=arguments[F];L.apply(void 0,[M,C.length].concat(C))}w.ok=M,w.equal=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");C!=F&&j({actual:C,expected:F,message:q,operator:"==",stackStartFn:T})},w.notEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");C==F&&j({actual:C,expected:F,message:q,operator:"!=",stackStartFn:T})},w.deepEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),A(C,F)||j({actual:C,expected:F,message:q,operator:"deepEqual",stackStartFn:T})},w.notDeepEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),A(C,F)&&j({actual:C,expected:F,message:q,operator:"notDeepEqual",stackStartFn:T})},w.deepStrictEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),E(C,F)||j({actual:C,expected:F,message:q,operator:"deepStrictEqual",stackStartFn:T})},w.notDeepStrictEqual=W;function W(T,C,F){if(arguments.length<2)throw new i("actual","expected");A===void 0&&D(),E(T,C)&&j({actual:T,expected:C,message:F,operator:"notDeepStrictEqual",stackStartFn:W})}w.strictEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");g(C,F)||j({actual:C,expected:F,message:q,operator:"strictEqual",stackStartFn:T})},w.notStrictEqual=function T(C,F,q){if(arguments.length<2)throw new i("actual","expected");g(C,F)&&j({actual:C,expected:F,message:q,operator:"notStrictEqual",stackStartFn:T})};var Z=d(function T(C,F,q){var b=this;y(this,T),F.forEach(function(R){R in C&&(q!==void 0&&typeof q[R]=="string"&&v(C[R])&&_(C[R],q[R])?b[R]=q[R]:b[R]=C[R])})});function I(T,C,F,q,b,R){if(!(F in T)||!E(T[F],C[F])){if(!q){var B=new Z(T,b),V=new Z(C,b,T),G=new e({actual:B,expected:V,operator:"deepStrictEqual",stackStartFn:R});throw G.actual=T,G.expected=C,G.operator=R.name,G}j({actual:T,expected:C,message:q,operator:R.name,stackStartFn:R})}}function Q(T,C,F,q){if(typeof C!="function"){if(v(C))return _(C,T);if(arguments.length===2)throw new r("expected",["Function","RegExp"],C);if(a(T)!=="object"||T===null){var b=new e({actual:T,expected:C,message:F,operator:"deepStrictEqual",stackStartFn:q});throw b.operator=q.name,b}var R=Object.keys(C);if(C instanceof Error)R.push("name","message");else if(R.length===0)throw new o("error",C,"may not be an empty object");return A===void 0&&D(),R.forEach(function(B){typeof T[B]=="string"&&v(C[B])&&_(C[B],T[B])||I(T,C,B,F,R,q)}),!0}return C.prototype!==void 0&&T instanceof C?!0:Error.isPrototypeOf(C)?!1:C.call({},T)===!0}function re(T){if(typeof T!="function")throw new r("fn","Function",T);try{T()}catch(C){return C}return P}function fe(T){return p(T)||T!==null&&a(T)==="object"&&typeof T.then=="function"&&typeof T.catch=="function"}function ie(T){return Promise.resolve().then(function(){var C;if(typeof T=="function"){if(C=T(),!fe(C))throw new t("instance of Promise","promiseFn",C)}else if(fe(T))C=T;else throw new r("promiseFn",["Function","Promise"],T);return Promise.resolve().then(function(){return C}).then(function(){return P}).catch(function(F){return F})})}function J(T,C,F,q){if(typeof F=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],F);if(a(C)==="object"&&C!==null){if(C.message===F)throw new u("error/message",'The error message "'.concat(C.message,'" is identical to the message.'))}else if(C===F)throw new u("error/message",'The error "'.concat(C,'" is identical to the message.'));q=F,F=void 0}else if(F!=null&&a(F)!=="object"&&typeof F!="function")throw new r("error",["Object","Error","Function","RegExp"],F);if(C===P){var b="";F&&F.name&&(b+=" (".concat(F.name,")")),b+=q?": ".concat(q):".";var R=T.name==="rejects"?"rejection":"exception";j({actual:void 0,expected:F,operator:T.name,message:"Missing expected ".concat(R).concat(b),stackStartFn:T})}if(F&&!Q(C,F,q,T))throw C}function te(T,C,F,q){if(C!==P){if(typeof F=="string"&&(q=F,F=void 0),!F||Q(C,F)){var b=q?": ".concat(q):".",R=T.name==="doesNotReject"?"rejection":"exception";j({actual:C,expected:F,operator:T.name,message:"Got unwanted ".concat(R).concat(b,`
|
|
109
|
-
`)+'Actual message: "'.concat(C&&C.message,'"'),stackStartFn:T})}throw C}}w.throws=function T(C){for(var F=arguments.length,q=new Array(F>1?F-1:0),b=1;b<F;b++)q[b-1]=arguments[b];J.apply(void 0,[T,re(C)].concat(q))},w.rejects=function T(C){for(var F=arguments.length,q=new Array(F>1?F-1:0),b=1;b<F;b++)q[b-1]=arguments[b];return ie(C).then(function(R){return J.apply(void 0,[T,R].concat(q))})},w.doesNotThrow=function T(C){for(var F=arguments.length,q=new Array(F>1?F-1:0),b=1;b<F;b++)q[b-1]=arguments[b];te.apply(void 0,[T,re(C)].concat(q))},w.doesNotReject=function T(C){for(var F=arguments.length,q=new Array(F>1?F-1:0),b=1;b<F;b++)q[b-1]=arguments[b];return ie(C).then(function(R){return te.apply(void 0,[T,R].concat(q))})},w.ifError=function T(C){if(C!=null){var F="ifError got unwanted exception: ";a(C)==="object"&&typeof C.message=="string"?C.message.length===0&&C.constructor?F+=C.constructor.name:F+=C.message:F+=l(C);var q=new e({actual:C,expected:null,operator:"ifError",message:F,stackStartFn:T}),b=C.stack;if(typeof b=="string"){var R=b.split(`
|
|
110
|
-
`);R.shift();for(var B=q.stack.split(`
|
|
111
|
-
`),V=0;V<R.length;V++){var G=B.indexOf(R[V]);if(G!==-1){B=B.slice(0,G);break}}q.stack="".concat(B.join(`
|
|
112
|
-
`),`
|
|
113
|
-
`).concat(R.join(`
|
|
114
|
-
`))}throw q}};function pe(T,C,F,q,b){if(!v(C))throw new r("regexp","RegExp",C);var R=b==="match";if(typeof T!="string"||_(C,T)!==R){if(F instanceof Error)throw F;var B=!F;F=F||(typeof T!="string"?'The "string" argument must be of type string. Received type '+"".concat(a(T)," (").concat(l(T),")"):(R?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(l(C),`. Input:
|
|
115
|
-
|
|
116
|
-
`).concat(l(T),`
|
|
117
|
-
`));var V=new e({actual:T,expected:C,message:F,operator:b,stackStartFn:q});throw V.generatedMessage=B,V}}w.match=function T(C,F,q){pe(C,F,q,T,"match")},w.doesNotMatch=function T(C,F,q){pe(C,F,q,T,"doesNotMatch")};function O(){for(var T=arguments.length,C=new Array(T),F=0;F<T;F++)C[F]=arguments[F];L.apply(void 0,[O,C.length].concat(C))}return w.strict=x(O,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict,To.exports}var Lr={},Vs={},bl;function ke(){return bl||(bl=1,function(a){/*!
|
|
118
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
119
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
120
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.MurmurHash=void 0,function(d){function m(t=0){return t}d.initialize=m;function h(t,i){i==null?i=0:typeof i=="string"?i=o(i):typeof i=="object"&&(i=i.hashCode());let x=i;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}d.update=h;function u(t,i){return t=t^i*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}d.finish=u;function r(t,i=0){let e=m(i),s=0;for(let l of t)e=h(e,l),s++;return e=u(e,s),e}d.hashCode=r;function o(t){let i=t.length;if(i===0)return 0;let e=0;for(let s=0;s<i;s++){let l=t.charCodeAt(s);e=(e<<5>>>0)-e+l,e|=0}return e}}(a.MurmurHash||(a.MurmurHash={}))}(Vs)),Vs}var Br={},Nl;function at(){if(Nl)return Br;Nl=1;/*!
|
|
121
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
122
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
123
|
-
*/var a=Br&&Br.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Br,"__esModule",{value:!0}),Br.ObjectEqualityComparator=void 0;const d=ce();let y=class{hashCode(h){return h==null?0:h.hashCode()}equals(h,u){return h==null?u==null:h.equals(u)}};return y.INSTANCE=new y,a([d.Override],y.prototype,"hashCode",null),a([d.Override],y.prototype,"equals",null),Br.ObjectEqualityComparator=y,Br}var Cl;function $h(){if(Cl)return Lr;Cl=1;/*!
|
|
124
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
125
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
126
|
-
*/var a=Lr&&Lr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DefaultEqualityComparator=void 0;const d=ce(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?y.MurmurHash.hashCode([r]):m.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,o){return r==null?o==null:typeof r=="string"||typeof r=="number"?r===o:m.ObjectEqualityComparator.INSTANCE.equals(r,o)}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Lr.DefaultEqualityComparator=h,Lr}var Ol;function Ar(){if(Ol)return ht;Ol=1;/*!
|
|
127
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
128
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
129
|
-
*/var a=ht&&ht.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=ht&&ht.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(ht,"__esModule",{value:!0}),ht.Array2DHashSet=void 0;const y=Ue(),m=$h(),h=ce(),u=ke(),r=16,o=.75;let t=class Gi{constructor(e,s=r){if(this.n=0,this.threshold=Math.floor(r*o),e instanceof Gi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let c=this.buckets[l];c&&(this.buckets[l]=c.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||m.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(s)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let s=this.getBucket(e),l=this.buckets[s];if(!l)return l=[e],this.buckets[s]=l,this.n++,e;for(let c of l)if(this.comparator.equals(c,e))return c;return l.push(e),this.n++,e}get(e){if(e==null)return e;let s=this.getBucket(e),l=this.buckets[s];if(l){for(let c of l)if(this.comparator.equals(c,e))return c}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=u.MurmurHash.initialize();for(let s of this.buckets)if(s!=null)for(let l of s){if(l==null)break;e=u.MurmurHash.update(e,this.comparator.hashCode(l))}return e=u.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Gi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,s=this.buckets.length*2,l=this.createBuckets(s);this.buckets=l,this.threshold=Math.floor(s*o);let c=this.size;for(let p of e)if(p)for(let v of p){let x=this.getBucket(v),g=this.buckets[x];g||(g=[],this.buckets[x]=g),g.push(v)}y(this.n===c)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let s=0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;e[s++]=c}return e}containsAll(e){if(e instanceof Gi){let s=e;for(let l of s.buckets)if(l!=null)for(let c of l){if(c==null)break;if(!this.containsFast(this.asElementType(c)))return!1}}else for(let s of e)if(!this.containsFast(this.asElementType(s)))return!1;return!0}addAll(e){let s=!1;for(let l of e)this.getOrAdd(l)!==l&&(s=!0);return s}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*o)}toString(){if(this.size===0)return"{}";let e="{",s=!0;for(let l of this.buckets)if(l!=null)for(let c of l){if(c==null)break;s?s=!1:e+=", ",e+=c.toString()}return e+="}",e}toTableString(){let e="";for(let s of this.buckets){if(s==null){e+=`null
|
|
130
|
-
`;continue}e+="[";let l=!0;for(let c of s)l?l=!1:e+=" ",c==null?e+="_":e+=c.toString();e+=`]
|
|
131
|
-
`}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return a([h.NotNull],t.prototype,"comparator",void 0),a([h.Override],t.prototype,"hashCode",null),a([h.Override],t.prototype,"equals",null),a([h.Override],t.prototype,"add",null),a([h.Override],t.prototype,"size",null),a([h.Override],t.prototype,"isEmpty",null),a([h.Override],t.prototype,"contains",null),a([d(0,h.Nullable)],t.prototype,"containsFast",null),a([h.Override],t.prototype,Symbol.iterator,null),a([h.Override],t.prototype,"toArray",null),a([h.Override],t.prototype,"containsAll",null),a([h.Override],t.prototype,"addAll",null),a([h.Override],t.prototype,"clear",null),a([h.Override],t.prototype,"toString",null),a([h.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),a([h.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),ht.Array2DHashSet=t,ht}var Dl;function Gn(){if(Dl)return ni;Dl=1;/*!
|
|
132
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
133
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
134
|
-
*/Object.defineProperty(ni,"__esModule",{value:!0}),ni.Array2DHashMap=void 0;const a=Ar();class d{constructor(h){this.keyComparator=h}hashCode(h){return this.keyComparator.hashCode(h.key)}equals(h,u){return this.keyComparator.equals(h.key,u.key)}}let y=class ia{constructor(h){h instanceof ia?this.backingStore=new a.Array2DHashSet(h.backingStore):this.backingStore=new a.Array2DHashSet(new d(h))}clear(){this.backingStore.clear()}containsKey(h){return this.backingStore.contains({key:h})}get(h){let u=this.backingStore.get({key:h});if(u)return u.value}get isEmpty(){return this.backingStore.isEmpty}put(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?(o=r.value,r.value=u):this.backingStore.add({key:h,value:u}),o}putIfAbsent(h,u){let r=this.backingStore.get({key:h,value:u}),o;return r?o=r.value:this.backingStore.add({key:h,value:u}),o}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(h){return h instanceof ia?this.backingStore.equals(h.backingStore):!1}};return ni.Array2DHashMap=y,ni}var xt={},kr={},Mr={},wl;function no(){if(wl)return Mr;wl=1;/*!
|
|
135
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
136
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
137
|
-
*/var a=Mr&&Mr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.ArrayEqualityComparator=void 0;const d=ce(),y=ke(),m=at();let h=class{hashCode(r){return r==null?0:y.MurmurHash.hashCode(r,0)}equals(r,o){if(r==null)return o==null;if(o==null||r.length!==o.length)return!1;for(let t=0;t<r.length;t++)if(!m.ObjectEqualityComparator.INSTANCE.equals(r[t],o[t]))return!1;return!0}};return h.INSTANCE=new h,a([d.Override],h.prototype,"hashCode",null),a([d.Override],h.prototype,"equals",null),Mr.ArrayEqualityComparator=h,Mr}var dt={},ii={},oi={},Rl;function dr(){return Rl||(Rl=1,function(a){/*!
|
|
138
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
139
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
140
|
-
*/var d=oi&&oi.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNState=void 0;const y=ce();let m=class oa{constructor(){this.stateNumber=oa.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(u){return u instanceof oa?this.stateNumber===u.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(u,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=u.isEpsilon;else if(this.epsilonOnlyTransitions!==u.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,u)}transition(u){return this.transitions[u]}setTransition(u,r){this.transitions[u]=r}removeTransition(u){return this.transitions.splice(u,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(u){this.ruleIndex=u}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(u){return this.optimizedTransitions[u]}addOptimizedTransition(u){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(u)}setOptimizedTransition(u,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[u]=r}removeOptimizedTransition(u){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(u,1)}};d([y.Override],m.prototype,"hashCode",null),d([y.Override],m.prototype,"equals",null),d([y.Override],m.prototype,"toString",null),a.ATNState=m,function(h){h.INVALID_STATE_NUMBER=-1}(m=a.ATNState||(a.ATNState={}))}(oi)),oi}var Pl;function kn(){if(Pl)return ii;Pl=1;/*!
|
|
141
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
142
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
143
|
-
*/Object.defineProperty(ii,"__esModule",{value:!0}),ii.DecisionState=void 0;const a=dr();let d=class extends a.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return ii.DecisionState=d,ii}var qr={},zs={},Fl;function va(){return Fl||(Fl=1,function(a){/*!
|
|
144
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
145
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
146
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Arrays=void 0,function(d){function y(u,r,o,t){return m(u,o!==void 0?o:0,t!==void 0?t:u.length,r)}d.binarySearch=y;function m(u,r,o,t){let i=r,e=o-1;for(;i<=e;){let s=i+e>>>1,l=u[s];if(l<t)i=s+1;else if(l>t)e=s-1;else return s}return-(i+1)}function h(u){let r="[",o=!0;for(let t of u)o?o=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}d.toString=h}(a.Arrays||(a.Arrays={}))}(zs)),zs}var si={},Il;function Ea(){return Il||(Il=1,function(a){/*!
|
|
147
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
148
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
149
|
-
*/var d=si&&si.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionContextCache=void 0;const y=Gn(),m=ce(),h=at(),u=ot(),r=Ue();let o=class sa{constructor(i=!0){this.contexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.childContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.joinContexts=new y.Array2DHashMap(h.ObjectEqualityComparator.INSTANCE),this.enableCache=i}getAsCached(i){if(!this.enableCache)return i;let e=this.contexts.get(i);return e||(e=i,this.contexts.put(i,i)),e}getChild(i,e){if(!this.enableCache)return i.getChild(e);let s=new sa.PredictionContextAndInt(i,e),l=this.childContexts.get(s);return l||(l=i.getChild(e),l=this.getAsCached(l),this.childContexts.put(s,l)),l}join(i,e){if(!this.enableCache)return u.PredictionContext.join(i,e,this);let s=new sa.IdentityCommutativePredictionContextOperands(i,e),l=this.joinContexts.get(s);return l||(l=u.PredictionContext.join(i,e,this),l=this.getAsCached(l),this.joinContexts.put(s,l),l)}};a.PredictionContextCache=o,o.UNCACHED=new o(!1),function(t){class i{constructor(l,c){this.obj=l,this.value=c}equals(l){if(l instanceof i){if(l===this)return!0}else return!1;let c=l;return this.value===c.value&&(this.obj===c.obj||this.obj!=null&&this.obj.equals(c.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}d([m.Override],i.prototype,"equals",null),d([m.Override],i.prototype,"hashCode",null),t.PredictionContextAndInt=i;class e{constructor(l,c){r(l!=null),r(c!=null),this._x=l,this._y=c}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let c=l;return this._x===c._x&&this._y===c._y||this._x===c._y&&this._y===c._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}d([m.Override],e.prototype,"equals",null),d([m.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e}(o=a.PredictionContextCache||(a.PredictionContextCache={}))}(si)),si}var Ll;function ot(){return Ll||(Ll=1,function(a){/*!
|
|
150
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
151
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
152
|
-
*/var d=qr&&qr.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},y=qr&&qr.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SingletonPredictionContext=a.PredictionContext=void 0;const m=Gn(),h=Ar(),u=va(),r=ke(),o=ce(),t=Ea(),i=Ue(),e=1;let s=class $e{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,g){let _=r.MurmurHash.initialize(e);return _=r.MurmurHash.update(_,x),_=r.MurmurHash.update(_,g),_=r.MurmurHash.finish(_,2),_}static calculateHashCode(x,g){let _=r.MurmurHash.initialize(e);for(let A of x)_=r.MurmurHash.update(_,A);for(let A of g)_=r.MurmurHash.update(_,A);return _=r.MurmurHash.finish(_,2*x.length),_}static fromRuleContext(x,g,_=!0){if(g.isEmpty)return _?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let A;g._parent?A=$e.fromRuleContext(x,g._parent,_):A=_?$e.EMPTY_FULL:$e.EMPTY_LOCAL;let D=x.states[g.invokingState].transition(0);return A.getChild(D.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,g,_=t.PredictionContextCache.UNCACHED){if(x===g)return x;if(x.isEmpty)return $e.isEmptyLocal(x)?x:$e.addEmptyContext(g);if(g.isEmpty)return $e.isEmptyLocal(g)?g:$e.addEmptyContext(x);let A=x.size,E=g.size;if(A===1&&E===1&&x.getReturnState(0)===g.getReturnState(0)){let M=_.join(x.getParent(0),g.getParent(0));return M===x.getParent(0)?x:M===g.getParent(0)?g:M.getChild(x.getReturnState(0))}let D=0,N=new Array(A+E),w=new Array(N.length),P=0,j=0,Y=!0,L=!0;for(;P<A&&j<E;)x.getReturnState(P)===g.getReturnState(j)?(N[D]=_.join(x.getParent(P),g.getParent(j)),w[D]=x.getReturnState(P),Y=Y&&N[D]===x.getParent(P),L=L&&N[D]===g.getParent(j),P++,j++):x.getReturnState(P)<g.getReturnState(j)?(N[D]=x.getParent(P),w[D]=x.getReturnState(P),L=!1,P++):(i(g.getReturnState(j)<x.getReturnState(P)),N[D]=g.getParent(j),w[D]=g.getReturnState(j),Y=!1,j++),D++;for(;P<A;)N[D]=x.getParent(P),w[D]=x.getReturnState(P),P++,L=!1,D++;for(;j<E;)N[D]=g.getParent(j),w[D]=g.getReturnState(j),j++,Y=!1,D++;return Y?x:L?g:(D<N.length&&(N=N.slice(0,D),w=w.slice(0,D)),N.length===0?$e.EMPTY_FULL:N.length===1?new p(N[0],w[0]):new c(N,w))}static isEmptyLocal(x){return x===$e.EMPTY_LOCAL}static getCachedContext(x,g,_){if(x.isEmpty)return x;let A=_.get(x);if(A)return A;if(A=g.get(x),A)return _.put(x,A),A;let E=!1,D=new Array(x.size);for(let w=0;w<D.length;w++){let P=$e.getCachedContext(x.getParent(w),g,_);if(E||P!==x.getParent(w)){if(!E){D=new Array(x.size);for(let j=0;j<x.size;j++)D[j]=x.getParent(j);E=!0}D[w]=P}}if(!E)return A=g.putIfAbsent(x,x),_.put(x,A??x),x;let N;if(D.length===1)N=new p(D[0],x.getReturnState(0));else{let w=new Array(x.size);for(let P=0;P<x.size;P++)w[P]=x.getReturnState(P);N=new c(D,w,x.hashCode())}return A=g.putIfAbsent(N,N),_.put(N,A||N),_.put(x,A||N),N}appendSingleContext(x,g){return this.appendContext($e.EMPTY_FULL.getChild(x),g)}getChild(x){return new p(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,g,_=$e.EMPTY_FULL){let A=[];e:for(let E=0;;E++){let D=0,N=!0,w=this,P=g,j="";for(j+="[";!w.isEmpty&&w!==_;){let Y=0;if(w.size>0){let L=1;for(;1<<L>>>0<w.size;)L++;let M=(1<<L>>>0)-1;if(Y=E>>D&M,N=N&&Y>=w.size-1,Y>=w.size)continue e;D+=L}if(x){j.length>1&&(j+=" ");let M=x.atn.states[P],W=x.ruleNames[M.ruleIndex];j+=W}else w.getReturnState(Y)!==$e.EMPTY_FULL_STATE_KEY&&(w.isEmpty||(j.length>1&&(j+=" "),j+=w.getReturnState(Y)));P=w.getReturnState(Y),w=w.getParent(Y)}if(j+="]",A.push(j),N)break}return A}};d([o.Override],s.prototype,"hashCode",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"join",null),d([y(0,o.NotNull),y(1,o.NotNull),y(2,o.NotNull)],s,"getCachedContext",null),a.PredictionContext=s;class l extends s{constructor(x){super(s.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,g){return g.getChild(this,x)}appendContext(x,g){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,g,_){return["[]"]}}d([o.Override],l.prototype,"addEmptyContext",null),d([o.Override],l.prototype,"removeEmptyContext",null),d([o.Override],l.prototype,"getParent",null),d([o.Override],l.prototype,"getReturnState",null),d([o.Override],l.prototype,"findReturnState",null),d([o.Override],l.prototype,"size",null),d([o.Override],l.prototype,"appendSingleContext",null),d([o.Override],l.prototype,"appendContext",null),d([o.Override],l.prototype,"isEmpty",null),d([o.Override],l.prototype,"hasEmpty",null),d([o.Override],l.prototype,"equals",null),d([o.Override],l.prototype,"toStrings",null);let c=class Bn extends s{constructor(x,g,_){super(_||s.calculateHashCode(x,g)),i(x.length===g.length),i(g.length>1||g[0]!==s.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=g}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return u.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===s.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),g=this.returnStates.slice(0);return x.push(s.EMPTY_FULL),g.push(s.EMPTY_FULL_STATE_KEY),new Bn(x,g)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new p(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),g=this.returnStates.slice(0,this.returnStates.length-1);return new Bn(x,g)}}appendContext(x,g){return Bn.appendContextImpl(this,x,new s.IdentityHashMap)}static appendContextImpl(x,g,_){if(g.isEmpty){if(s.isEmptyLocal(g)){if(x.hasEmpty)return s.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(g.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let A=_.get(x);if(!A){if(x.isEmpty)A=g;else{let E=x.size;x.hasEmpty&&E--;let D=new Array(E),N=new Array(E);for(let w=0;w<E;w++)N[w]=x.getReturnState(w);for(let w=0;w<E;w++)D[w]=Bn.appendContextImpl(x.getParent(w),g,_);D.length===1?A=new p(D[0],N[0]):(i(D.length>1),A=new Bn(D,N)),x.hasEmpty&&(A=s.join(A,g))}_.put(x,A)}return A}equals(x){if(this===x)return!0;if(!(x instanceof Bn)||this.hashCode()!==x.hashCode())return!1;let g=x;return this.equalsImpl(g,new h.Array2DHashSet)}equalsImpl(x,g){let _=[],A=[];for(_.push(this),A.push(x);;){let E=_.pop(),D=A.pop();if(!E||!D)break;let N=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(E,D);if(!g.add(N))continue;let w=N.x.size;if(w===0){if(!N.x.equals(N.y))return!1;continue}let P=N.y.size;if(w!==P)return!1;for(let j=0;j<w;j++){if(N.x.getReturnState(j)!==N.y.getReturnState(j))return!1;let Y=N.x.getParent(j),L=N.y.getParent(j);if(Y.hashCode()!==L.hashCode())return!1;Y!==L&&(_.push(Y),A.push(L))}}return!0}};d([o.NotNull],c.prototype,"parents",void 0),d([o.NotNull],c.prototype,"returnStates",void 0),d([o.Override],c.prototype,"getParent",null),d([o.Override],c.prototype,"getReturnState",null),d([o.Override],c.prototype,"findReturnState",null),d([o.Override],c.prototype,"size",null),d([o.Override],c.prototype,"isEmpty",null),d([o.Override],c.prototype,"hasEmpty",null),d([o.Override],c.prototype,"addEmptyContext",null),d([o.Override],c.prototype,"removeEmptyContext",null),d([o.Override],c.prototype,"appendContext",null),d([o.Override],c.prototype,"equals",null),c=d([y(0,o.NotNull)],c);let p=class X0 extends s{constructor(x,g){super(s.calculateSingleHashCode(x,g)),this.parent=x,this.returnState=g}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,g){return g.getChild(this.parent.appendContext(x,g),this.returnState)}addEmptyContext(){let x=[this.parent,s.EMPTY_FULL],g=[this.returnState,s.EMPTY_FULL_STATE_KEY];return new c(x,g)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof X0))return!1;let g=x;return this.hashCode()!==g.hashCode()?!1:this.returnState===g.returnState&&this.parent.equals(g.parent)}};d([o.NotNull],p.prototype,"parent",void 0),d([o.Override],p.prototype,"getParent",null),d([o.Override],p.prototype,"getReturnState",null),d([o.Override],p.prototype,"findReturnState",null),d([o.Override],p.prototype,"size",null),d([o.Override],p.prototype,"isEmpty",null),d([o.Override],p.prototype,"hasEmpty",null),d([o.Override],p.prototype,"appendContext",null),d([o.Override],p.prototype,"addEmptyContext",null),d([o.Override],p.prototype,"removeEmptyContext",null),d([o.Override],p.prototype,"equals",null),p=d([y(0,o.NotNull)],p),a.SingletonPredictionContext=p,function(v){v.EMPTY_LOCAL=new l(!1),v.EMPTY_FULL=new l(!0),v.EMPTY_LOCAL_STATE_KEY=-2147483648,v.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends m.Array2DHashMap{constructor(){super(g.INSTANCE)}}v.IdentityHashMap=x;class g{IdentityEqualityComparator(){}hashCode(A){return A.hashCode()}equals(A,E){return A===E}}g.INSTANCE=new g,d([o.Override],g.prototype,"hashCode",null),d([o.Override],g.prototype,"equals",null),v.IdentityEqualityComparator=g}(s=a.PredictionContext||(a.PredictionContext={}))}(qr)),qr}var jr={},ze={},Bl;function ut(){if(Bl)return ze;Bl=1;/*!
|
|
153
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
154
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
155
|
-
*/Object.defineProperty(ze,"__esModule",{value:!0}),ze.toCharArray=ze.toMap=ze.equals=ze.join=ze.escapeWhitespace=void 0;function a(u,r){return r?u.replace(/ /,"·"):u.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}ze.escapeWhitespace=a;function d(u,r){let o="",t=!0;for(let i of u)t?t=!1:o+=r,o+=i;return o}ze.join=d;function y(u,r){return u===r?!0:u===void 0||r===void 0?!1:u.equals(r)}ze.equals=y;function m(u){let r=new Map;for(let o=0;o<u.length;o++)r.set(u[o],o);return r}ze.toMap=m;function h(u){if(typeof u=="string"){let r=new Uint16Array(u.length);for(let o=0;o<u.length;o++)r[o]=u.charCodeAt(o);return r}else return u.toCharArray()}return ze.toCharArray=h,ze}var kl;function Yn(){return kl||(kl=1,function(a){/*!
|
|
156
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
157
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
158
|
-
*/var d=jr&&jr.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},y=jr&&jr.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SemanticContext=void 0;const m=Ar(),h=no(),u=ke(),r=ce(),o=at(),t=ut();function i(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)<0&&(c=p)}return c}function e(l){let c;for(let p of l){if(c===void 0){c=p;continue}c.compareTo(p)>0&&(c=p)}return c}let s=class We{static get NONE(){return We._NONE===void 0&&(We._NONE=new We.Predicate),We._NONE}evalPrecedence(c,p){return this}static and(c,p){if(!c||c===We.NONE)return p;if(p===We.NONE)return c;let v=new We.AND(c,p);return v.opnds.length===1?v.opnds[0]:v}static or(c,p){if(!c)return p;if(c===We.NONE||p===We.NONE)return We.NONE;let v=new We.OR(c,p);return v.opnds.length===1?v.opnds[0]:v}};a.SemanticContext=s,function(l){function v(D){let N=[];for(let w=0;w<D.length;w++){let P=D[w];P instanceof l.PrecedencePredicate&&(N.push(P),D.splice(w,1),w--)}return N}class x extends l{constructor(N=-1,w=-1,P=!1){super(),this.ruleIndex=N,this.predIndex=w,this.isCtxDependent=P}eval(N,w){let P=this.isCtxDependent?w:void 0;return N.sempred(P,this.ruleIndex,this.predIndex)}hashCode(){let N=u.MurmurHash.initialize();return N=u.MurmurHash.update(N,this.ruleIndex),N=u.MurmurHash.update(N,this.predIndex),N=u.MurmurHash.update(N,this.isCtxDependent?1:0),N=u.MurmurHash.finish(N,3),N}equals(N){return N instanceof x?this===N?!0:this.ruleIndex===N.ruleIndex&&this.predIndex===N.predIndex&&this.isCtxDependent===N.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}d([r.Override],x.prototype,"eval",null),d([r.Override],x.prototype,"hashCode",null),d([r.Override],x.prototype,"equals",null),d([r.Override],x.prototype,"toString",null),l.Predicate=x;class g extends l{constructor(N){super(),this.precedence=N}eval(N,w){return N.precpred(w,this.precedence)}evalPrecedence(N,w){if(N.precpred(w,this.precedence))return l.NONE}compareTo(N){return this.precedence-N.precedence}hashCode(){let N=1;return N=31*N+this.precedence,N}equals(N){return N instanceof g?this===N?!0:this.precedence===N.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}d([r.Override],g.prototype,"eval",null),d([r.Override],g.prototype,"evalPrecedence",null),d([r.Override],g.prototype,"compareTo",null),d([r.Override],g.prototype,"hashCode",null),d([r.Override],g.prototype,"equals",null),d([r.Override],g.prototype,"toString",null),l.PrecedencePredicate=g;class _ extends l{}l.Operator=_;let A=class Yi extends _{constructor(N,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);N instanceof Yi?P.addAll(N.opnds):P.add(N),w instanceof Yi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),Y=e(j);Y&&this.opnds.push(Y)}get operands(){return this.opnds}equals(N){return this===N?!0:N instanceof Yi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,N.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,40363613)}eval(N,w){for(let P of this.opnds)if(!P.eval(N,w))return!1;return!0}evalPrecedence(N,w){let P=!1,j=[];for(let L of this.opnds){let M=L.evalPrecedence(N,w);if(P=P||M!==L,M==null)return;M!==l.NONE&&j.push(M)}if(!P)return this;if(j.length===0)return l.NONE;let Y=j[0];for(let L=1;L<j.length;L++)Y=l.and(Y,j[L]);return Y}toString(){return t.join(this.opnds,"&&")}};d([r.Override],A.prototype,"operands",null),d([r.Override],A.prototype,"equals",null),d([r.Override],A.prototype,"hashCode",null),d([r.Override],A.prototype,"eval",null),d([r.Override],A.prototype,"evalPrecedence",null),d([r.Override],A.prototype,"toString",null),A=d([y(0,r.NotNull),y(1,r.NotNull)],A),l.AND=A;let E=class Wi extends _{constructor(N,w){super();let P=new m.Array2DHashSet(o.ObjectEqualityComparator.INSTANCE);N instanceof Wi?P.addAll(N.opnds):P.add(N),w instanceof Wi?P.addAll(w.opnds):P.add(w),this.opnds=P.toArray();let j=v(this.opnds),Y=i(j);Y&&this.opnds.push(Y)}get operands(){return this.opnds}equals(N){return this===N?!0:N instanceof Wi?h.ArrayEqualityComparator.INSTANCE.equals(this.opnds,N.opnds):!1}hashCode(){return u.MurmurHash.hashCode(this.opnds,486279973)}eval(N,w){for(let P of this.opnds)if(P.eval(N,w))return!0;return!1}evalPrecedence(N,w){let P=!1,j=[];for(let L of this.opnds){let M=L.evalPrecedence(N,w);if(P=P||M!==L,M===l.NONE)return l.NONE;M&&j.push(M)}if(!P)return this;if(j.length===0)return;let Y=j[0];for(let L=1;L<j.length;L++)Y=l.or(Y,j[L]);return Y}toString(){return t.join(this.opnds,"||")}};d([r.Override],E.prototype,"operands",null),d([r.Override],E.prototype,"equals",null),d([r.Override],E.prototype,"hashCode",null),d([r.Override],E.prototype,"eval",null),d([r.Override],E.prototype,"evalPrecedence",null),d([r.Override],E.prototype,"toString",null),E=d([y(0,r.NotNull),y(1,r.NotNull)],E),l.OR=E}(s=a.SemanticContext||(a.SemanticContext={}))}(jr)),jr}var Ml;function io(){if(Ml)return dt;Ml=1;/*!
|
|
159
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
160
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
161
|
-
*/var a=dt&&dt.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=dt&&dt.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.ATNConfig=void 0;const y=Gn(),m=kn(),h=ke(),u=ce(),r=at(),o=ot(),t=Yn(),i=Ue(),e=2147483648;let s=class bi{constructor(x,g,_){typeof g=="number"?(i((g&16777215)===g),this._state=x,this.altAndOuterContextDepth=g,this._context=_):(this._state=x,this.altAndOuterContextDepth=g.altAndOuterContextDepth,this._context=_)}static create(x,g,_,A=t.SemanticContext.NONE,E){return A!==t.SemanticContext.NONE?E!=null?new p(E,A,x,g,_,!1):new l(A,x,g,_):E!=null?new c(E,x,g,_,!1):new bi(x,g,_)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){i(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,g,_){return _==null?this.transformImpl(x,this._context,this.semanticContext,g,this.lexerActionExecutor):_ instanceof o.PredictionContext?this.transformImpl(x,_,this.semanticContext,g,this.lexerActionExecutor):_ instanceof t.SemanticContext?this.transformImpl(x,this._context,_,g,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,g,_)}transformImpl(x,g,_,A,E){let D=A&&bi.checkNonGreedyDecision(this,x);return _!==t.SemanticContext.NONE?E!=null||D?new p(E,_,x,this,g,D):new l(_,x,this,g):E!=null||D?new c(E,x,this,g,D):new bi(x,this,g)}static checkNonGreedyDecision(x,g){return x.hasPassedThroughNonGreedyDecision||g instanceof m.DecisionState&&g.nonGreedy}appendContext(x,g){if(typeof x=="number"){let _=this.context.appendSingleContext(x,g);return this.transform(this.state,!1,_)}else{let _=this.context.appendContext(x,g);return this.transform(this.state,!1,_)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let g=[],_=[];for(g.push(this.context),_.push(x.context);;){let A=g.pop(),E=_.pop();if(!A||!E)break;if(A===E)return!0;if(A.size<E.size)return!1;if(E.isEmpty)return A.hasEmpty;for(let D=0;D<E.size;D++){let N=A.findReturnState(E.getReturnState(D));if(N<0)return!1;g.push(A.getParent(N)),_.push(E.getParent(D))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=~e}equals(x){return this===x?!0:x instanceof bi?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=h.MurmurHash.initialize(7);return x=h.MurmurHash.update(x,this.state.stateNumber),x=h.MurmurHash.update(x,this.alt),x=h.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=h.MurmurHash.update(x,this.context),x=h.MurmurHash.update(x,this.semanticContext),x=h.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=h.MurmurHash.update(x,this.lexerActionExecutor),x=h.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
|
|
162
|
-
`,x+=`rankdir=LR;
|
|
163
|
-
`;let g=new y.Array2DHashMap(o.PredictionContext.IdentityEqualityComparator.INSTANCE),_=[];function A(E){let D=g.size,N=g.putIfAbsent(E,D);return N??(_.push(E),D)}for(_.push(this.context),g.put(this.context,0);;){let E=_.pop();if(!E)break;for(let D=0;D<E.size;D++)x+=" s"+A(E),x+="->",x+="s"+A(E.getParent(D)),x+='[label="'+E.getReturnState(D)+`"];
|
|
164
|
-
`}return x+=`}
|
|
165
|
-
`,x.toString()}toString(x,g,_){_==null&&(_=g!=null),g==null&&(g=!0);let A="",E;_?E=this.context.toStrings(x,this.state.stateNumber):E=["?"];let D=!0;for(let N of E)D?D=!1:A+=", ",A+="(",A+=this.state,g&&(A+=",",A+=this.alt),this.context&&(A+=",",A+=N),this.semanticContext!==t.SemanticContext.NONE&&(A+=",",A+=this.semanticContext),this.reachesIntoOuterContext&&(A+=",up="+this.outerContextDepth),A+=")";return A.toString()}};a([u.NotNull],s.prototype,"_state",void 0),a([u.NotNull],s.prototype,"_context",void 0),a([u.NotNull],s.prototype,"state",null),a([u.NotNull,d(0,u.NotNull)],s.prototype,"context",null),a([u.NotNull],s.prototype,"semanticContext",null),a([u.Override],s.prototype,"clone",null),a([d(0,u.NotNull),d(2,u.NotNull)],s.prototype,"transformImpl",null),a([u.Override],s.prototype,"equals",null),a([u.Override],s.prototype,"hashCode",null),a([d(0,u.NotNull),d(3,u.NotNull)],s,"create",null),s=a([d(0,u.NotNull),d(2,u.NotNull)],s),dt.ATNConfig=s;let l=class extends s{constructor(x,g,_,A){typeof _=="number"?super(g,_,A):super(g,_,A),this._semanticContext=x}get semanticContext(){return this._semanticContext}};a([u.NotNull],l.prototype,"_semanticContext",void 0),a([u.Override],l.prototype,"semanticContext",null),l=a([d(1,u.NotNull),d(2,u.NotNull)],l);let c=class extends s{constructor(x,g,_,A,E){if(typeof _=="number")super(g,_,A);else if(super(g,_,A),_.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=E}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};a([u.Override],c.prototype,"lexerActionExecutor",null),a([u.Override],c.prototype,"hasPassedThroughNonGreedyDecision",null),c=a([d(1,u.NotNull),d(2,u.NotNull)],c);let p=class extends l{constructor(x,g,_,A,E,D){typeof A=="number"?super(g,_,A,E):super(g,_,A,E),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=D}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return a([u.Override],p.prototype,"lexerActionExecutor",null),a([u.Override],p.prototype,"hasPassedThroughNonGreedyDecision",null),p=a([d(1,u.NotNull),d(2,u.NotNull)],p),dt}var ai={},ql;function vr(){if(ql)return ai;ql=1;/*!
|
|
166
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
167
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
168
|
-
*/Object.defineProperty(ai,"__esModule",{value:!0}),ai.BitSet=void 0;const a=Vn(),d=ke(),y=new Uint16Array(0);function m(s){return s>>>4}function h(s){return s*16}function u(s){let l=1;for(let c=0;c<16;c++){if((s&l)!==0)return c;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(s){let l=32768;for(let c=15;c>=0;c--){if((s&l)!==0)return c;l=l>>>1}throw new RangeError("No specified bit found")}function o(s,l){return s&=15,l&=15,s===l?1<<s>>>0:65535>>>15-l^65535>>>16-s}const t=new Uint8Array(65536);for(let s=0;s<16;s++){const l=1<<s>>>0;let c=0;for(;c<t.length;){c+=l;for(let p=0;p<l;p++)t[c]++,c++}}let i=class Ni{constructor(l){if(!l)this.data=y;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(m(l-1)+1)}else if(l instanceof Ni)this.data=l.data.slice(0);else{let c=-1;for(let p of l)c<p&&(c=p);this.data=new Uint16Array(m(c-1)+1);for(let p of l)this.set(p)}}and(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g])!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}andNot(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length);let x=-1;for(let g=0;g<v;g++)(c[g]&=p[g]^65535)!==0&&(x=g);x===-1&&(this.data=y),x<c.length-1&&(this.data=c.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,c=l.length;let p=0;for(let v=0;v<c;v++)p+=t[l[v]];return p}clear(l,c){l==null?this.data.fill(0):c==null?this.set(l,!1):this.set(l,c,!1)}flip(l,c){if(c==null&&(c=l),l<0||c<l)throw new RangeError;let p=m(l);const v=m(c);if(p===v)this.data[p]^=o(l,c);else{for(this.data[p++]^=o(l,15);p<v;)this.data[p++]^=65535;this.data[p++]^=o(0,c)}}get(l,c){if(c===void 0)return!!(this.data[m(l)]&o(l,l));{let p=new Ni(c+1);for(let v=l;v<=c;v++)p.set(v,this.get(v));return p}}intersects(l){let c=Math.min(this.length(),l.length());if(c===0)return!1;let p=m(c-1);for(let v=0;v<=p;v++)if((this.data[v]&l.data[v])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(h(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=65535^o(l,15);if((c[v]|x)===65535){for(v++,x=0;v<p&&c[v]===65535;v++);if(v===p)return-1}return h(v)+u((c[v]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);if(v>p)return-1;let x=o(l,15);if((c[v]&x)===0){for(v++,x=65535;v<p&&c[v]===0;v++);if(v>=p)return-1}return h(v)+u(c[v]&x)}or(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]|p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=65535^o(0,l);if((c[v]|x)===65535){for(x=0,v--;v>=0&&c[v]===65535;v--);if(v<0)return-1}return h(v)+r((c[v]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const c=this.data,p=c.length;let v=m(l);v>=p&&(v=p-1);let x=o(0,l);if((c[v]&x)===0){for(v--,x=65535;v>=0&&c[v]===0;v--);if(v<0)return-1}return h(v)+r(c[v]&x)}set(l,c,p){if(c===void 0?(c=l,p=!0):typeof c=="boolean"&&(p=c,c=l),p===void 0&&(p=!0),l<0||l>c)throw new RangeError;let v=m(l),x=m(c);if(p&&x>=this.data.length){let g=new Uint16Array(x+1);this.data.forEach((_,A)=>g[A]=_),this.data=g}else if(!p){if(v>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,c=this.data.length*16-1)}if(v===x)this._setBits(v,p,o(l,c));else{for(this._setBits(v++,p,o(l,15));v<x;)this.data[v++]=p?65535:0;this._setBits(v,p,o(0,c))}}_setBits(l,c,p){c?this.data[l]|=p:this.data[l]&=65535^p}get size(){return this.data.byteLength*8}hashCode(){return d.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Ni))return!1;const c=this.length();if(c!==l.length())return!1;if(c===0)return!0;let p=m(c-1);for(let v=0;v<=p;v++)if(this.data[v]!==l.data[v])return!1;return!0}toString(){let l="{",c=!0;for(let p=this.nextSetBit(0);p>=0;p=this.nextSetBit(p+1))c?c=!1:l+=", ",l+=p;return l+="}",l}xor(l){const c=this.data,p=l.data,v=Math.min(c.length,p.length),x=Math.max(c.length,p.length),g=c.length===x?c:new Uint16Array(x);let _=-1;for(let E=0;E<v;E++)(g[E]=c[E]^p[E])!==0&&(_=E);const A=c.length>p.length?c:p;for(let E=v;E<x;E++)(g[E]=A[E])!==0&&(_=E);_===-1?this.data=y:g.length===_+1?this.data=g:this.data=g.slice(0,_+1)}clone(){return new Ni(this)}[Symbol.iterator](){return new e(this.data)}[a.inspect.custom](){return"BitSet "+this.toString()}};ai.BitSet=i;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const c=h(this.index)+u(l);return this.mask=o(c+1,15),{done:!1,value:c}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return ai}var jl;function Li(){if(jl)return kr;jl=1;/*!
|
|
169
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
170
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
171
|
-
*/var a=kr&&kr.__decorate||function(g,_,A,E){var D=arguments.length,N=D<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(N=(D<3?w(N):D>3?w(_,A,N):w(_,A))||N);return D>3&&N&&Object.defineProperty(_,A,N),N};Object.defineProperty(kr,"__esModule",{value:!0}),kr.ATNConfigSet=void 0;const d=Gn(),y=Ar(),m=no(),h=lt(),u=io(),r=vr(),o=ce(),t=at(),i=ot(),e=Ea(),s=Yn(),l=Ue(),c=ut();class p{hashCode(_){return _.state^_.alt}equals(_,A){return _.state===A.state&&_.alt===A.alt}}p.INSTANCE=new p;function v(g){return g?new d.Array2DHashMap(g):new d.Array2DHashMap(p.INSTANCE)}let x=class aa{constructor(_,A){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(A?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(A||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new r.BitSet;for(let A of this)_.set(A.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");l(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_}getStates(){let _=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let A of this.configs)_.add(A.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let A of this.configs)A.context=_.atn.getCachedContext(A.context)}clone(_){let A=new aa(this,_);return!_&&this.isReadOnly&&A.addAll(this.configs),A}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof u.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let A=_,E=this.getKey(A),D=this.mergedConfigs.get(E);if(D!=null&&this.canMerge(A,E,D))return D.contains(A);for(let N of this.unmerged)if(N.contains(_))return!0}else for(let A of this.configs)if(A.contains(_))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(_,A){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!_.reachesIntoOuterContext),A==null&&(A=e.PredictionContextCache.UNCACHED);let E,D=this.getKey(_),N=this.mergedConfigs.get(D);if(E=N==null,N!=null&&this.canMerge(_,D,N)){N.outerContextDepth=Math.max(N.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(N.isPrecedenceFilterSuppressed=!0);let w=i.PredictionContext.join(N.context,_.context,A);return this.updatePropertiesForMergedConfig(_),N.context===w?!1:(N.context=w,!0)}for(let w=0;w<this.unmerged.length;w++){let P=this.unmerged[w];if(this.canMerge(_,D,P)){P.outerContextDepth=Math.max(P.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(P.isPrecedenceFilterSuppressed=!0);let j=i.PredictionContext.join(P.context,_.context,A);return this.updatePropertiesForMergedConfig(_),P.context===j?!1:(P.context=j,E&&(this.mergedConfigs.put(D,P),this.unmerged.splice(w,1)),!0)}}return this.configs.push(_),E?this.mergedConfigs.put(D,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!s.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(_,A,E){return _.state.stateNumber!==E.state.stateNumber||A.alt!==E.alt?!1:_.semanticContext.equals(E.semanticContext)}getKey(_){return{state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let A of _)if(!(A instanceof u.ATNConfig)||!this.contains(A))return!1;return!0}addAll(_,A){this.ensureWritable();let E=!1;for(let D of _)this.add(D,A)&&(E=!0);return E}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=h.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(_){return this===_?!0:_ instanceof aa?this.outermostConfigSet===_.outermostConfigSet&&c.equals(this._conflictInfo,_._conflictInfo)&&m.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^m.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let A="",E=this.configs.slice(0);E.sort((D,N)=>D.alt!==N.alt?D.alt-N.alt:D.state.stateNumber!==N.state.stateNumber?D.state.stateNumber-N.state.stateNumber:D.semanticContext.toString().localeCompare(N.semanticContext.toString())),A+="[";for(let D=0;D<E.length;D++)D>0&&(A+=", "),A+=E[D].toString(void 0,!0,_);return A+="]",this._hasSemanticContext&&(A+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==h.ATN.INVALID_ALT_NUMBER&&(A+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(A+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(A+="*")),this._dipsIntoOuterContext&&(A+=",dipsIntoOuterContext"),A.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return a([o.NotNull],x.prototype,"getRepresentedAlternatives",null),a([o.Override],x.prototype,"size",null),a([o.Override],x.prototype,"isEmpty",null),a([o.Override],x.prototype,"contains",null),a([o.Override],x.prototype,Symbol.iterator,null),a([o.Override],x.prototype,"toArray",null),a([o.Override],x.prototype,"containsAll",null),a([o.Override],x.prototype,"clear",null),a([o.Override],x.prototype,"equals",null),a([o.Override],x.prototype,"hashCode",null),kr.ATNConfigSet=x,kr}var $r={},Ur={},Vr={},$l;function oo(){return $l||($l=1,function(a){/*!
|
|
172
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
173
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
174
|
-
*/var d=Vr&&Vr.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},y=Vr&&Vr.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DFAState=void 0;const m=lt(),h=vr(),u=ke(),r=ce(),o=ot(),t=Ue();let i=class K0{constructor(s){this.stateNumber=-1,this.configs=s,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(s){return this.isContextSensitive?this.contextSymbols.get(s):!1}setContextSymbol(s){t(this.isContextSensitive),this.contextSymbols.set(s)}setContextSensitive(s){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new h.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(s){this._acceptStateInfo=s}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:m.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(s){return this.edges.get(s)}setTarget(s,l){this.edges.set(s,l)}getEdgeMap(){return this.edges}getContextTarget(s){return s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.get(s)}setContextTarget(s,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");s===o.PredictionContext.EMPTY_FULL_STATE_KEY&&(s=-1),this.contextEdges.set(s,l)}getContextEdgeMap(){let s=new Map(this.contextEdges),l=s.get(-1);if(l!==void 0)if(s.size===1){let c=new Map;return c.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l),c}else s.delete(-1),s.set(o.PredictionContext.EMPTY_FULL_STATE_KEY,l);return s}hashCode(){let s=u.MurmurHash.initialize(7);return s=u.MurmurHash.update(s,this.configs.hashCode()),s=u.MurmurHash.finish(s,1),s}equals(s){if(this===s)return!0;if(!(s instanceof K0))return!1;let l=s;return this.configs.equals(l.configs)}toString(){let s="";return s+=this.stateNumber+":"+this.configs,this.isAcceptState&&(s+="=>",this.predicates?s+=this.predicates:s+=this.prediction),s.toString()}};d([r.NotNull],i.prototype,"configs",void 0),d([r.NotNull],i.prototype,"edges",void 0),d([r.NotNull],i.prototype,"contextEdges",void 0),d([r.Override],i.prototype,"hashCode",null),d([r.Override],i.prototype,"equals",null),d([r.Override],i.prototype,"toString",null),a.DFAState=i,function(e){let s=class{constructor(c,p){this.alt=p,this.pred=c}toString(){return"("+this.pred+", "+this.alt+")"}};d([r.NotNull],s.prototype,"pred",void 0),d([r.Override],s.prototype,"toString",null),s=d([y(0,r.NotNull)],s),e.PredPrediction=s}(i=a.DFAState||(a.DFAState={}))}(Vr)),Vr}var Ul;function so(){return Ul||(Ul=1,function(a){/*!
|
|
175
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
176
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
177
|
-
*/var d=Ur&&Ur.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},y=Ur&&Ur.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATNSimulator=void 0;const m=Li(),h=oo(),u=ce(),r=ot();let o=class Ci{constructor(i){this.atn=i}static get ERROR(){return Ci._ERROR||(Ci._ERROR=new h.DFAState(new m.ATNConfigSet),Ci._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Ci._ERROR}clearDFA(){this.atn.clearDFA()}};d([u.NotNull],o.prototype,"atn",void 0),d([u.NotNull],o,"ERROR",null),o=d([y(0,u.NotNull)],o),a.ATNSimulator=o,o=a.ATNSimulator||(a.ATNSimulator={}),a.ATNSimulator=o}(Ur)),Ur}var mt={},ui={},Vl;function J0(){if(Vl)return ui;Vl=1;/*!
|
|
178
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
179
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
180
|
-
*/Object.defineProperty(ui,"__esModule",{value:!0}),ui.ConsoleErrorListener=void 0;let a=class{syntaxError(y,m,h,u,r,o){console.error(`line ${h}:${u} ${r}`)}};return ui.ConsoleErrorListener=a,a.INSTANCE=new a,ui}var yt={},zl;function Sa(){if(zl)return yt;zl=1;/*!
|
|
181
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
182
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
183
|
-
*/var a=yt&&yt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=yt&&yt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.ProxyErrorListener=void 0;const y=ce();let m=class{constructor(u){if(this.delegates=u,!u)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(u,r,o,t,i,e){this.delegates.forEach(s=>{s.syntaxError&&s.syntaxError(u,r,o,t,i,e)})}};return a([y.Override,d(0,y.NotNull),d(4,y.NotNull)],m.prototype,"syntaxError",null),yt.ProxyErrorListener=m,yt}var Hl;function Bi(){if(Hl)return mt;Hl=1;/*!
|
|
184
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
185
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
186
|
-
*/var a=mt&&mt.__decorate||function(t,i,e,s){var l=arguments.length,c=l<3?i:s===null?s=Object.getOwnPropertyDescriptor(i,e):s,p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(t,i,e,s);else for(var v=t.length-1;v>=0;v--)(p=t[v])&&(c=(l<3?p(c):l>3?p(i,e,c):p(i,e))||c);return l>3&&c&&Object.defineProperty(i,e,c),c},d=mt&&mt.__param||function(t,i){return function(e,s){i(e,s,t)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Recognizer=void 0;const y=J0(),m=Sa(),h=ce(),u=Ie(),r=ut();let o=class Oi{constructor(){this._listeners=[y.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let i=this.vocabulary,e=Oi.tokenTypeMapCache.get(i);if(e==null){let s=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let c=i.getLiteralName(l);c!=null&&s.set(c,l);let p=i.getSymbolicName(l);p!=null&&s.set(p,l)}s.set("EOF",u.Token.EOF),e=s,Oi.tokenTypeMapCache.set(i,e)}return e}getRuleIndexMap(){let i=this.ruleNames;if(i==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=Oi.ruleIndexMapCache.get(i);return e==null&&(e=r.toMap(i),Oi.ruleIndexMapCache.set(i,e)),e}getTokenType(i){let e=this.getTokenTypeMap().get(i);return e??u.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(i){this._interp=i}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(i){let e=i.getOffendingToken();if(!e)return"";let s=e.line,l=e.charPositionInLine;return"line "+s+":"+l}addErrorListener(i){if(!i)throw new TypeError("listener must not be null");this._listeners.push(i)}removeErrorListener(i){let e=this._listeners.indexOf(i);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new m.ProxyErrorListener(this.getErrorListeners())}sempred(i,e,s){return!0}precpred(i,e){return!0}action(i,e,s){}get state(){return this._stateNumber}set state(i){this._stateNumber=i}};return o.EOF=-1,o.tokenTypeMapCache=new WeakMap,o.ruleIndexMapCache=new WeakMap,a([h.SuppressWarnings("serial"),h.NotNull],o.prototype,"_listeners",void 0),a([h.NotNull],o.prototype,"getTokenTypeMap",null),a([h.NotNull],o.prototype,"getRuleIndexMap",null),a([h.NotNull],o.prototype,"serializedATN",null),a([h.NotNull],o.prototype,"atn",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"interpreter",null),a([h.NotNull,d(0,h.NotNull)],o.prototype,"getErrorHeader",null),a([d(0,h.NotNull)],o.prototype,"addErrorListener",null),a([d(0,h.NotNull)],o.prototype,"removeErrorListener",null),a([h.NotNull],o.prototype,"getErrorListeners",null),mt.Recognizer=o,mt}var zr={},Gl;function Er(){if(Gl)return zr;Gl=1;/*!
|
|
187
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
188
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
189
|
-
*/var a=zr&&zr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(zr,"__esModule",{value:!0}),zr.VocabularyImpl=void 0;const d=ce(),y=Ie();let m=class{constructor(u,r,o){this.literalNames=u,this.symbolicNames=r,this.displayNames=o,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(u){if(u>=0&&u<this.literalNames.length)return this.literalNames[u]}getSymbolicName(u){if(u>=0&&u<this.symbolicNames.length)return this.symbolicNames[u];if(u===y.Token.EOF)return"EOF"}getDisplayName(u){if(u>=0&&u<this.displayNames.length){let t=this.displayNames[u];if(t)return t}let r=this.getLiteralName(u);if(r)return r;let o=this.getSymbolicName(u);return o||String(u)}};return m.EMPTY_VOCABULARY=new m([],[],[]),a([d.NotNull],m.prototype,"literalNames",void 0),a([d.NotNull],m.prototype,"symbolicNames",void 0),a([d.NotNull],m.prototype,"displayNames",void 0),a([d.Override],m.prototype,"maxTokenType",null),a([d.Override],m.prototype,"getLiteralName",null),a([d.Override],m.prototype,"getSymbolicName",null),a([d.Override,d.NotNull],m.prototype,"getDisplayName",null),a([d.NotNull],m,"EMPTY_VOCABULARY",void 0),zr.VocabularyImpl=m,zr}var Yl;function Z0(){if(Yl)return $r;Yl=1;/*!
|
|
190
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
191
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
192
|
-
*/var a=$r&&$r.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty($r,"__esModule",{value:!0}),$r.DFASerializer=void 0;const d=so(),y=ce(),m=ot(),h=Bi(),u=Er();let r=class{constructor(t,i,e,s){i instanceof h.Recognizer?(e=i.ruleNames,s=i.atn,i=i.vocabulary):i||(i=u.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=i,this.ruleNames=e,this.atn=s}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((s,l)=>s.stateNumber-l.stateNumber);for(let s of e){let l=s.getEdgeMap(),c=[...l.keys()].sort((x,g)=>x-g),p=s.getContextEdgeMap(),v=[...p.keys()].sort((x,g)=>x-g);for(let x of c){let g=l.get(x);if((g==null||g===d.ATNSimulator.ERROR)&&!s.isContextSymbol(x))continue;let _=!1;t+=this.getStateString(s)+"-"+this.getEdgeLabel(x)+"->",s.isContextSymbol(x)&&(t+="!",_=!0);let A=g;A&&A.stateNumber!==d.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(A)+`
|
|
193
|
-
`:_&&(t+=`ctx
|
|
194
|
-
`)}if(s.isContextSensitive)for(let x of v)t+=this.getStateString(s)+"-"+this.getContextLabel(x)+"->"+this.getStateString(p.get(x))+`
|
|
195
|
-
`}}let i=t;return i.length===0?"":i}getContextLabel(t){if(t===m.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===m.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===d.ATNSimulator.ERROR)return"ERROR";let i=t.stateNumber,e="s"+i;if(t.isAcceptState&&(t.predicates?e=":s"+i+"=>"+t.predicates:e=":s"+i+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let s of t.configs)if(s.reachesIntoOuterContext){e+="*";break}}return e}};return a([y.NotNull],r.prototype,"dfa",void 0),a([y.NotNull],r.prototype,"vocabulary",void 0),a([y.Override],r.prototype,"toString",null),$r.DFASerializer=r,$r}var gt={},Wl;function Uh(){if(Wl)return gt;Wl=1;/*!
|
|
196
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
197
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
198
|
-
*/var a=gt&>.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=gt&>.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.LexerDFASerializer=void 0;const y=Z0(),m=ce(),h=Er();let u=class extends y.DFASerializer{constructor(o){super(o,h.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(o){return"'"+String.fromCodePoint(o)+"'"}};return a([m.Override,m.NotNull],u.prototype,"getEdgeLabel",null),u=a([d(0,m.NotNull)],u),gt.LexerDFASerializer=u,gt}var Hr={},Hs={},Ql;function qe(){return Ql||(Ql=1,function(a){/*!
|
|
199
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
200
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
201
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.ATNStateType=void 0,function(d){d[d.INVALID_TYPE=0]="INVALID_TYPE",d[d.BASIC=1]="BASIC",d[d.RULE_START=2]="RULE_START",d[d.BLOCK_START=3]="BLOCK_START",d[d.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",d[d.STAR_BLOCK_START=5]="STAR_BLOCK_START",d[d.TOKEN_START=6]="TOKEN_START",d[d.RULE_STOP=7]="RULE_STOP",d[d.BLOCK_END=8]="BLOCK_END",d[d.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",d[d.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",d[d.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",d[d.LOOP_END=12]="LOOP_END"}(a.ATNStateType||(a.ATNStateType={}))}(Hs)),Hs}var Xl;function Ta(){if(Xl)return Hr;Xl=1;/*!
|
|
202
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
203
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
204
|
-
*/var a=Hr&&Hr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.StarLoopEntryState=void 0;const d=qe(),y=vr(),m=kn(),h=ce();let u=class extends m.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new y.BitSet}get stateType(){return d.ATNStateType.STAR_LOOP_ENTRY}};return a([h.Override],u.prototype,"stateType",null),Hr.StarLoopEntryState=u,Hr}var Kl;function ep(){if(Kl)return xt;Kl=1;/*!
|
|
205
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
206
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
207
|
-
*/var a=xt&&xt.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=xt&&xt.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.DFA=void 0;const y=Ar(),m=Li(),h=Z0(),u=oo(),r=Uh(),o=ce(),t=at(),i=Ta(),e=Er();let s=class{constructor(c,p=0){if(this.states=new y.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!c.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=c,this.atn=c.atn,this.decision=p;let v=!1;c instanceof i.StarLoopEntryState&&c.precedenceRuleDecision&&(v=!0,this.s0=new u.DFAState(new m.ATNConfigSet),this.s0full=new u.DFAState(new m.ATNConfigSet)),this.precedenceDfa=v}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(c,p){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return p?this.s0full.getTarget(c):this.s0.getTarget(c)}setPrecedenceStartState(c,p,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");c<0||(p?this.s0full.setTarget(c,v):this.s0.setTarget(c,v))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(c){return c.stateNumber=this.nextStateNumber++,this.states.getOrAdd(c)}toString(c,p){if(c||(c=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let v;return p?v=new h.DFASerializer(this,c,p,this.atnStartState.atn):v=new h.DFASerializer(this,c),v.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return a([o.NotNull],s.prototype,"states",void 0),a([o.NotNull],s.prototype,"atnStartState",void 0),a([o.NotNull],s.prototype,"atn",void 0),s=a([d(0,o.NotNull)],s),xt.DFA=s,xt}var _t={},Gr={},Jl;function ba(){if(Jl)return Gr;Jl=1;/*!
|
|
208
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
209
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
210
|
-
*/var a=Gr&&Gr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.IntegerList=void 0;const d=va(),y=ce(),m=new Int32Array(0),h=4,u=(1<<31>>>0)-1-8;let r=class Qi{constructor(t){if(!t)this._data=m,this._size=0;else if(t instanceof Qi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=m,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=m,this._size=0;for(let i of t)this.add(i)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Qi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let i=0;for(let e of t)this._data[this._size+i]=e,i++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let i=0;i<this._size;i++)if(this._data[i]===t)return!0;return!1}set(t,i){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=i,e}removeAt(t){let i=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,i}removeRange(t,i){if(t<0||i<0||t>this._size||i>this._size||t>i)throw RangeError();this._data.copyWithin(i,t,this._size),this._data.fill(0,this._size-(i-t),this._size),this._size-=i-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Qi)||this._size!==t._size)return!1;for(let i=0;i<this._size;i++)if(this._data[i]!==t._data[i])return!1;return!0}hashCode(){let t=1;for(let i=0;i<this._size;i++)t=31*t+this._data[i];return t}toString(){return this._data.toString()}binarySearch(t,i,e){if(i===void 0&&(i=0),e===void 0&&(e=this._size),i<0||e<0||i>this._size||e>this._size)throw new RangeError;if(i>e)throw new RangeError;return d.Arrays.binarySearch(this._data,t,i,e)}ensureCapacity(t){if(t<0||t>u)throw new RangeError;let i;for(this._data.length===0?i=h:i=this._data.length;i<t;)i=i*2,(i<0||i>u)&&(i=u);let e=new Int32Array(i);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),i=0,e=!1;for(let s=0;s<this._size;s++){let l=this._data[s];if(l>=0&&l<65536){t[i]=l,i++;continue}if(!e){let p=new Uint16Array(this.charArraySize());p.set(t,0),t=p,e=!0}let c=String.fromCodePoint(l);t[i]=c.charCodeAt(0),t[i+1]=c.charCodeAt(1),i+=2}return t}charArraySize(){let t=0;for(let i=0;i<this._size;i++)t+=this._data[i]>=65536?2:1;return t}};return a([y.NotNull],r.prototype,"_data",void 0),a([y.Override],r.prototype,"equals",null),a([y.Override],r.prototype,"hashCode",null),a([y.Override],r.prototype,"toString",null),Gr.IntegerList=r,Gr}var Yr={},li={},At={},Zl;function ki(){if(Zl)return At;Zl=1;/*!
|
|
211
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
212
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
213
|
-
*/var a=At&&At.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=At&&At.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(At,"__esModule",{value:!0}),At.CommonToken=void 0;const y=Ve(),m=ce(),h=Ie();let u=class Di{constructor(o,t,i=Di.EMPTY_SOURCE,e=h.Token.DEFAULT_CHANNEL,s=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=h.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=o,this.source=i,this._channel=e,this.start=s,this.stop=l,i.source!=null&&(this._line=i.source.line,this._charPositionInLine=i.source.charPositionInLine)}static fromToken(o){let t=new Di(o.type,void 0,Di.EMPTY_SOURCE,o.channel,o.startIndex,o.stopIndex);return t._line=o.line,t.index=o.tokenIndex,t._charPositionInLine=o.charPositionInLine,o instanceof Di?(t._text=o._text,t.source=o.source):(t._text=o.text,t.source={source:o.tokenSource,stream:o.inputStream}),t}get type(){return this._type}set type(o){this._type=o}get line(){return this._line}set line(o){this._line=o}get text(){if(this._text!=null)return this._text;let o=this.inputStream;if(o==null)return;let t=o.size;return this.start<t&&this.stop<t?o.getText(y.Interval.of(this.start,this.stop)):"<EOF>"}set text(o){this._text=o}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(o){this._charPositionInLine=o}get channel(){return this._channel}set channel(o){this._channel=o}get startIndex(){return this.start}set startIndex(o){this.start=o}get stopIndex(){return this.stop}set stopIndex(o){this.stop=o}get tokenIndex(){return this.index}set tokenIndex(o){this.index=o}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(o){let t="";this._channel>0&&(t=",channel="+this._channel);let i=this.text;i!=null?(i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t")):i="<no text>";let e=String(this._type);return o&&(e=o.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+i+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return u.EMPTY_SOURCE={source:void 0,stream:void 0},a([m.NotNull],u.prototype,"source",void 0),a([m.Override],u.prototype,"type",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"text",null),a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"channel",null),a([m.Override],u.prototype,"startIndex",null),a([m.Override],u.prototype,"stopIndex",null),a([m.Override],u.prototype,"tokenIndex",null),a([m.Override],u.prototype,"tokenSource",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"toString",null),a([d(0,m.NotNull)],u,"fromToken",null),u=a([d(2,m.NotNull)],u),At.CommonToken=u,At}var ec;function Na(){return ec||(ec=1,function(a){/*!
|
|
214
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
215
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
216
|
-
*/var d=li&&li.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.CommonTokenFactory=void 0;const y=ki(),m=Ve(),h=ce();let u=class{constructor(o=!1){this.copyText=o}create(o,t,i,e,s,l,c,p){let v=new y.CommonToken(t,i,o,e,s,l);return v.line=c,v.charPositionInLine=p,i==null&&this.copyText&&o.stream!=null&&(v.text=o.stream.getText(m.Interval.of(s,l))),v}createSimple(o,t){return new y.CommonToken(o,t)}};d([h.Override],u.prototype,"create",null),d([h.Override],u.prototype,"createSimple",null),a.CommonTokenFactory=u,function(r){r.DEFAULT=new r}(u=a.CommonTokenFactory||(a.CommonTokenFactory={}))}(li)),li}var ci={},tc;function tp(){if(tc)return ci;tc=1;/*!
|
|
217
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
218
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
219
|
-
*/Object.defineProperty(ci,"__esModule",{value:!0}),ci.IntegerStack=void 0;const a=ba();let d=class extends a.IntegerList{constructor(m){super(m)}push(m){this.add(m)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return ci.IntegerStack=d,ci}var Wr={},fi={},rc;function rp(){if(rc)return fi;rc=1;/*!
|
|
220
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
221
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
222
|
-
*/Object.defineProperty(fi,"__esModule",{value:!0}),fi.AcceptStateInfo=void 0;let a=class{constructor(y,m){this._prediction=y,this._lexerActionExecutor=m}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return fi.AcceptStateInfo=a,fi}var vt={},Et={},nc;function Vh(){if(nc)return Et;nc=1;/*!
|
|
223
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
224
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
225
|
-
*/var a=Et&&Et.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Et&&Et.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.LexerIndexedCustomAction=void 0;const y=ke(),m=ce();let h=class np{constructor(r,o){this._offset=r,this._action=o}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this._offset),r=y.MurmurHash.update(r,this._action),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof np?this._offset===r._offset&&this._action.equals(r._action):!1}};return a([m.NotNull],h.prototype,"action",null),a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),h=a([d(1,m.NotNull)],h),Et.LexerIndexedCustomAction=h,Et}var ic;function zh(){if(ic)return vt;ic=1;/*!
|
|
226
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
227
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
228
|
-
*/var a=vt&&vt.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=vt&&vt.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.LexerActionExecutor=void 0;const y=no(),m=Vh(),h=ke(),u=ce();let r=class wi{constructor(t){this._lexerActions=t;let i=h.MurmurHash.initialize();for(let e of t)i=h.MurmurHash.update(i,e);this.cachedHashCode=h.MurmurHash.finish(i,t.length)}static append(t,i){if(!t)return new wi([i]);let e=t._lexerActions.slice(0);return e.push(i),new wi(e)}fixOffsetBeforeMatch(t){let i;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof m.LexerIndexedCustomAction)&&(i||(i=this._lexerActions.slice(0)),i[e]=new m.LexerIndexedCustomAction(t,this._lexerActions[e]));return i?new wi(i):this}get lexerActions(){return this._lexerActions}execute(t,i,e){let s=!1,l=i.index;try{for(let c of this._lexerActions){if(c instanceof m.LexerIndexedCustomAction){let p=c.offset;i.seek(e+p),c=c.action,s=e+p!==l}else c.isPositionDependent&&(i.seek(l),s=!1);c.execute(t)}}finally{s&&i.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof wi?this.cachedHashCode===t.cachedHashCode&&y.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return a([u.NotNull],r.prototype,"_lexerActions",void 0),a([u.NotNull],r.prototype,"lexerActions",null),a([d(0,u.NotNull)],r.prototype,"execute",null),a([u.Override],r.prototype,"hashCode",null),a([u.Override],r.prototype,"equals",null),a([u.NotNull,d(1,u.NotNull)],r,"append",null),r=a([d(0,u.NotNull)],r),vt.LexerActionExecutor=r,vt}var St={},pi={},oc;function Sr(){if(oc)return pi;oc=1;/*!
|
|
229
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
230
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
231
|
-
*/Object.defineProperty(pi,"__esModule",{value:!0}),pi.RecognitionException=void 0;let a=class extends Error{constructor(y,m,h,u){super(u),this._offendingState=-1,this._recognizer=y,this.input=m,this.ctx=h,y&&(this._offendingState=y.state)}get offendingState(){return this._offendingState}setOffendingState(y){this._offendingState=y}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(y){if(!(y&&y!==this._recognizer))return this.offendingToken}setOffendingToken(y,m){y===this._recognizer&&(this.offendingToken=m)}get recognizer(){return this._recognizer}};return pi.RecognitionException=a,pi}var sc;function ao(){if(sc)return St;sc=1;/*!
|
|
232
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
233
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
234
|
-
*/var a=St&&St.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=St&&St.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(St,"__esModule",{value:!0}),St.LexerNoViableAltException=void 0;const y=Sr(),m=ce(),h=Ve(),u=ut();let r=class extends y.RecognitionException{constructor(t,i,e,s){super(t,i),this._startIndex=e,this._deadEndConfigs=s}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(h.Interval.of(this._startIndex,this._startIndex)),t=u.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return a([m.Override],r.prototype,"inputStream",null),a([m.Override],r.prototype,"toString",null),r=a([d(1,m.NotNull)],r),St.LexerNoViableAltException=r,St}var Qr={},ac;function Hh(){if(ac)return Qr;ac=1;/*!
|
|
235
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
236
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
237
|
-
*/var a=Qr&&Qr.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.OrderedATNConfigSet=void 0;const d=Li(),y=ce();let m=class ip extends d.ATNConfigSet{constructor(u,r){u!=null&&r!=null?super(u,r):super()}clone(u){let r=new ip(this,u);return!u&&this.isReadOnly&&r.addAll(this),r}getKey(u){return{state:0,alt:u.hashCode()}}canMerge(u,r,o){return u.equals(o)}};return a([y.Override],m.prototype,"clone",null),a([y.Override],m.prototype,"getKey",null),a([y.Override],m.prototype,"canMerge",null),Qr.OrderedATNConfigSet=m,Qr}var Xr={},uc;function Mi(){if(uc)return Xr;uc=1;/*!
|
|
238
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
239
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
240
|
-
*/var a=Xr&&Xr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.RuleStopState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{get nonStopStateNumber(){return-1}get stateType(){return y.ATNStateType.RULE_STOP}};return a([m.Override],h.prototype,"nonStopStateNumber",null),a([m.Override],h.prototype,"stateType",null),Xr.RuleStopState=h,Xr}var lc;function uo(){return lc||(lc=1,function(a){/*!
|
|
241
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
242
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
243
|
-
*/var d=Wr&&Wr.__decorate||function(D,N,w,P){var j=arguments.length,Y=j<3?N:P===null?P=Object.getOwnPropertyDescriptor(N,w):P,L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(D,N,w,P);else for(var M=D.length-1;M>=0;M--)(L=D[M])&&(Y=(j<3?L(Y):j>3?L(N,w,Y):L(N,w))||Y);return j>3&&Y&&Object.defineProperty(N,w,Y),Y},y=Wr&&Wr.__param||function(D,N){return function(w,P){N(w,P,D)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerATNSimulator=void 0;const m=rp(),h=lt(),u=io(),r=Li(),o=so(),t=oo(),i=Ve(),e=gr(),s=Tr(),l=zh(),c=ao(),p=ce(),v=Hh(),x=ot(),g=Mi(),_=Ie(),A=Ue();let E=class He extends o.ATNSimulator{constructor(N,w){super(N),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE,this.prevAccept=new He.SimState,this.recog=w}copyState(N){this._charPositionInLine=N.charPositionInLine,this._line=N._line,this.mode=N.mode,this.startIndex=N.startIndex}match(N,w){this.mode=w;let P=N.mark();try{this.startIndex=N.index,this.prevAccept.reset();let j=this.atn.modeToDFA[w].s0;return j==null?this.matchATN(N):this.execATN(N,j)}finally{N.release(P)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=s.Lexer.DEFAULT_MODE}matchATN(N){let w=this.atn.modeToStartState[this.mode];He.debug&&console.log(`matchATN mode ${this.mode} start: ${w}`);let P=this.mode,j=this.computeStartState(N,w),Y=j.hasSemanticContext;Y&&(j.hasSemanticContext=!1);let L=this.addDFAState(j);if(!Y){let W=this.atn.modeToDFA[this.mode];W.s0?L=W.s0:W.s0=L}let M=this.execATN(N,L);return He.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[P].toLexerString()}`),M}execATN(N,w){He.debug&&console.log(`start state closure=${w.configs}`),w.isAcceptState&&this.captureSimState(this.prevAccept,N,w);let P=N.LA(1),j=w;for(;;){He.debug&&console.log(`execATN loop starting closure: ${j.configs}`);let Y=this.getExistingTargetState(j,P);if(Y==null&&(Y=this.computeTargetState(N,j,P)),Y===o.ATNSimulator.ERROR||(P!==e.IntStream.EOF&&this.consume(N),Y.isAcceptState&&(this.captureSimState(this.prevAccept,N,Y),P===e.IntStream.EOF)))break;P=N.LA(1),j=Y}return this.failOrAccept(this.prevAccept,N,j.configs,P)}getExistingTargetState(N,w){let P=N.getTarget(w);return He.debug&&P!=null&&console.log("reuse state "+N.stateNumber+" edge to "+P.stateNumber),P}computeTargetState(N,w,P){let j=new v.OrderedATNConfigSet;return this.getReachableConfigSet(N,w.configs,j,P),j.isEmpty?(j.hasSemanticContext||this.addDFAEdge(w,P,o.ATNSimulator.ERROR),o.ATNSimulator.ERROR):this.addDFAEdge(w,P,j)}failOrAccept(N,w,P,j){if(N.dfaState!=null){let Y=N.dfaState.lexerActionExecutor;return this.accept(w,Y,this.startIndex,N.index,N.line,N.charPos),N.dfaState.prediction}else{if(j===e.IntStream.EOF&&w.index===this.startIndex)return _.Token.EOF;throw new c.LexerNoViableAltException(this.recog,w,this.startIndex,P)}}getReachableConfigSet(N,w,P,j){let Y=h.ATN.INVALID_ALT_NUMBER;for(let L of w){let M=L.alt===Y;if(M&&L.hasPassedThroughNonGreedyDecision)continue;He.debug&&console.log(`testing ${this.getTokenName(j)} at ${L.toString(this.recog,!0)}`);let W=L.state.numberOfOptimizedTransitions;for(let Z=0;Z<W;Z++){let I=L.state.getOptimizedTransition(Z),Q=this.getReachableTarget(I,j);if(Q!=null){let re=L.lexerActionExecutor,fe;re!=null?(re=re.fixOffsetBeforeMatch(N.index-this.startIndex),fe=L.transform(Q,!0,re)):(A(L.lexerActionExecutor==null),fe=L.transform(Q,!0));let ie=j===e.IntStream.EOF;if(this.closure(N,fe,P,M,!0,ie)){Y=L.alt;break}}}}}accept(N,w,P,j,Y,L){He.debug&&console.log(`ACTION ${w}`),N.seek(j),this._line=Y,this._charPositionInLine=L,w!=null&&this.recog!=null&&w.execute(this.recog,N,P)}getReachableTarget(N,w){if(N.matches(w,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE))return N.target}computeStartState(N,w){let P=x.PredictionContext.EMPTY_FULL,j=new v.OrderedATNConfigSet;for(let Y=0;Y<w.numberOfTransitions;Y++){let L=w.transition(Y).target,M=u.ATNConfig.create(L,Y+1,P);this.closure(N,M,j,!1,!1,!1)}return j}closure(N,w,P,j,Y,L){if(He.debug&&console.log("closure("+w.toString(this.recog,!0)+")"),w.state instanceof g.RuleStopState){He.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[w.state.ruleIndex]} rule stop ${w}`):console.log(`closure at rule stop ${w}`));let W=w.context;if(W.isEmpty)return P.add(w),!0;W.hasEmpty&&(P.add(w.transform(w.state,!0,x.PredictionContext.EMPTY_FULL)),j=!0);for(let Z=0;Z<W.size;Z++){let I=W.getReturnState(Z);if(I===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let Q=W.getParent(Z),re=this.atn.states[I],fe=w.transform(re,!1,Q);j=this.closure(N,fe,P,j,Y,L)}return j}w.state.onlyHasEpsilonTransitions||(!j||!w.hasPassedThroughNonGreedyDecision)&&P.add(w);let M=w.state;for(let W=0;W<M.numberOfOptimizedTransitions;W++){let Z=M.getOptimizedTransition(W),I=this.getEpsilonTarget(N,w,Z,P,Y,L);I!=null&&(j=this.closure(N,I,P,j,Y,L))}return j}getEpsilonTarget(N,w,P,j,Y,L){let M;switch(P.serializationType){case 3:let W=P;if(this.optimize_tail_calls&&W.optimizedTailCall&&!w.context.hasEmpty)M=w.transform(P.target,!0);else{let I=w.context.getChild(W.followState.stateNumber);M=w.transform(P.target,!0,I)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let Z=P;He.debug&&console.log("EVAL rule "+Z.ruleIndex+":"+Z.predIndex),j.hasSemanticContext=!0,this.evaluatePredicate(N,Z.ruleIndex,Z.predIndex,Y)?M=w.transform(P.target,!0):M=void 0;break;case 6:if(w.context.hasEmpty){let I=l.LexerActionExecutor.append(w.lexerActionExecutor,this.atn.lexerActions[P.actionIndex]);M=w.transform(P.target,!0,I);break}else{M=w.transform(P.target,!0);break}case 1:M=w.transform(P.target,!0);break;case 5:case 2:case 7:if(L&&P.matches(e.IntStream.EOF,s.Lexer.MIN_CHAR_VALUE,s.Lexer.MAX_CHAR_VALUE)){M=w.transform(P.target,!1);break}M=void 0;break;default:M=void 0;break}return M}evaluatePredicate(N,w,P,j){if(this.recog==null)return!0;if(!j)return this.recog.sempred(void 0,w,P);let Y=this._charPositionInLine,L=this._line,M=N.index,W=N.mark();try{return this.consume(N),this.recog.sempred(void 0,w,P)}finally{this._charPositionInLine=Y,this._line=L,N.seek(M),N.release(W)}}captureSimState(N,w,P){N.index=w.index,N.line=this._line,N.charPos=this._charPositionInLine,N.dfaState=P}addDFAEdge(N,w,P){if(P instanceof r.ATNConfigSet){let j=P.hasSemanticContext;j&&(P.hasSemanticContext=!1);let Y=this.addDFAState(P);return j||this.addDFAEdge(N,w,Y),Y}else He.debug&&console.log("EDGE "+N+" -> "+P+" upon "+String.fromCharCode(w)),N?.setTarget(w,P)}addDFAState(N){A(!N.hasSemanticContext);let w=new t.DFAState(N),P=this.atn.modeToDFA[this.mode].states.get(w);if(P!=null)return P;N.optimizeConfigs(this);let j=new t.DFAState(N.clone(!0)),Y;for(let L of N)if(L.state instanceof g.RuleStopState){Y=L;break}if(Y!=null){let L=this.atn.ruleToTokenType[Y.state.ruleIndex],M=Y.lexerActionExecutor;j.acceptStateInfo=new m.AcceptStateInfo(L,M)}return this.atn.modeToDFA[this.mode].addState(j)}getDFA(N){return this.atn.modeToDFA[N]}getText(N){return N.getText(i.Interval.of(this.startIndex,N.index-1))}get line(){return this._line}set line(N){this._line=N}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(N){this._charPositionInLine=N}consume(N){N.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,N.consume()}getTokenName(N){return N===-1?"EOF":"'"+String.fromCharCode(N)+"'"}};d([p.NotNull],E.prototype,"prevAccept",void 0),d([y(0,p.NotNull)],E.prototype,"copyState",null),d([y(0,p.NotNull)],E.prototype,"match",null),d([p.Override],E.prototype,"reset",null),d([y(0,p.NotNull)],E.prototype,"matchATN",null),d([y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"execATN",null),d([y(0,p.NotNull)],E.prototype,"getExistingTargetState",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeTargetState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"getReachableConfigSet",null),d([y(0,p.NotNull)],E.prototype,"accept",null),d([p.NotNull,y(0,p.NotNull),y(1,p.NotNull)],E.prototype,"computeStartState",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"closure",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull),y(3,p.NotNull)],E.prototype,"getEpsilonTarget",null),d([y(0,p.NotNull)],E.prototype,"evaluatePredicate",null),d([y(0,p.NotNull),y(1,p.NotNull),y(2,p.NotNull)],E.prototype,"captureSimState",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"addDFAState",null),d([p.NotNull],E.prototype,"getDFA",null),d([p.NotNull,y(0,p.NotNull)],E.prototype,"getText",null),d([y(0,p.NotNull)],E.prototype,"consume",null),d([p.NotNull],E.prototype,"getTokenName",null),E=d([y(0,p.NotNull)],E),a.LexerATNSimulator=E,function(D){D.debug=!1,D.dfa_debug=!1;class N{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}D.SimState=N}(E=a.LexerATNSimulator||(a.LexerATNSimulator={})),a.LexerATNSimulator=E}(Wr)),Wr}var cc;function Tr(){if(cc)return Yr;cc=1;/*!
|
|
244
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
245
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
246
|
-
*/var a=Yr&&Yr.__decorate||function(s,l,c,p){var v=arguments.length,x=v<3?l:p===null?p=Object.getOwnPropertyDescriptor(l,c):p,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(s,l,c,p);else for(var _=s.length-1;_>=0;_--)(g=s[_])&&(x=(v<3?g(x):v>3?g(l,c,x):g(l,c))||x);return v>3&&x&&Object.defineProperty(l,c,x),x};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.Lexer=void 0;const d=Na(),y=tp(),m=Ve(),h=gr(),u=uo(),r=ao(),o=ce(),t=Bi(),i=Ie();let e=class mr extends t.Recognizer{constructor(l){super(),this._factory=d.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new y.IntegerStack,this._mode=mr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return i.Token.DEFAULT_CHANNEL}static get HIDDEN(){return i.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=i.Token.INVALID_TYPE,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=mr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=i.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=i.Token.INVALID_TYPE;let c;try{c=this.interpreter.match(this._input,this._mode)}catch(p){if(p instanceof r.LexerNoViableAltException)this.notifyListeners(p),this.recover(p),c=mr.SKIP;else throw p}if(this._input.LA(1)===h.IntStream.EOF&&(this._hitEOF=!0),this._type===i.Token.INVALID_TYPE&&(this._type=c),this._type===mr.SKIP)continue e}while(this._type===mr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=mr.SKIP}more(){this._type=mr.MORE}mode(l){this._mode=l}pushMode(l){u.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return u.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,c=this.line,p=this._factory.create(this._tokenFactorySourcePair,i.Token.EOF,void 0,i.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,c,l);return this.emit(p),p}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],c=this.nextToken();for(;c.type!==i.Token.EOF;)l.push(c),c=this.nextToken();return l}notifyListeners(l){let c=this._input.getText(m.Interval.of(this._tokenStartCharIndex,this._input.index)),p="token recognition error at: '"+this.getErrorDisplay(c)+"'",v=this.getErrorListenerDispatch();v.syntaxError&&v.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,p,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case i.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==h.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,a([o.Override],e.prototype,"nextToken",null),a([o.Override],e.prototype,"tokenFactory",null),a([o.Override],e.prototype,"inputStream",null),a([o.Override],e.prototype,"sourceName",null),a([o.Override],e.prototype,"line",null),a([o.Override],e.prototype,"charPositionInLine",null),Yr.Lexer=e,Yr}var fc;function Mn(){if(fc)return _t;fc=1;/*!
|
|
247
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
248
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
249
|
-
*/var a=_t&&_t.__decorate||function(e,s,l,c){var p=arguments.length,v=p<3?s:c===null?c=Object.getOwnPropertyDescriptor(s,l):c,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,l,c);else for(var g=e.length-1;g>=0;g--)(x=e[g])&&(v=(p<3?x(v):p>3?x(s,l,v):x(s,l))||v);return p>3&&v&&Object.defineProperty(s,l,v),v},d=_t&&_t.__param||function(e,s){return function(l,c){s(l,c,e)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.IntervalSet=void 0;const y=no(),m=ba(),h=Ve(),u=Tr(),r=ke(),o=ce(),t=Ie();let i=class Fe{constructor(s){this.readonly=!1,s!=null?this._intervals=s.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Fe._COMPLETE_CHAR_SET===void 0&&(Fe._COMPLETE_CHAR_SET=Fe.of(u.Lexer.MIN_CHAR_VALUE,u.Lexer.MAX_CHAR_VALUE),Fe._COMPLETE_CHAR_SET.setReadonly(!0)),Fe._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Fe._EMPTY_SET==null&&(Fe._EMPTY_SET=new Fe,Fe._EMPTY_SET.setReadonly(!0)),Fe._EMPTY_SET}static of(s,l=s){let c=new Fe;return c.add(s,l),c}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(s,l=s){this.addRange(h.Interval.of(s,l))}addRange(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(s.b<s.a)){for(let l=0;l<this._intervals.length;l++){let c=this._intervals[l];if(s.equals(c))return;if(s.adjacent(c)||!s.disjoint(c)){let p=s.union(c);for(this._intervals[l]=p;l<this._intervals.length-1;){l++;let v=this._intervals[l];if(!p.adjacent(v)&&p.disjoint(v))break;this._intervals.splice(l,1),l--,this._intervals[l]=p.union(v)}return}if(s.startsBeforeDisjoint(c)){this._intervals.splice(l,0,s);return}}this._intervals.push(s)}}static or(s){let l=new Fe;for(let c of s)l.addAll(c);return l}addAll(s){if(s==null)return this;if(s instanceof Fe){let l=s,c=l._intervals.length;for(let p=0;p<c;p++){let v=l._intervals[p];this.add(v.a,v.b)}}else for(let l of s.toArray())this.add(l);return this}complementRange(s,l){return this.complement(Fe.of(s,l))}complement(s){if(s.isNil)return Fe.EMPTY_SET;let l;return s instanceof Fe?l=s:(l=new Fe,l.addAll(s)),l.subtract(this)}subtract(s){if(s==null||s.isNil)return new Fe(this._intervals);if(s instanceof Fe)return Fe.subtract(this,s);let l=new Fe;return l.addAll(s),Fe.subtract(this,l)}static subtract(s,l){if(s.isNil)return new Fe;let c=new Fe(s._intervals);if(l.isNil)return c;let p=0,v=0;for(;p<c._intervals.length&&v<l._intervals.length;){let x=c._intervals[p],g=l._intervals[v];if(g.b<x.a){v++;continue}if(g.a>x.b){p++;continue}let _,A;if(g.a>x.a&&(_=new h.Interval(x.a,g.a-1)),g.b<x.b&&(A=new h.Interval(g.b+1,x.b)),_)if(A){c._intervals[p]=_,c._intervals.splice(p+1,0,A),p++,v++;continue}else{c._intervals[p]=_,p++;continue}else if(A){c._intervals[p]=A,v++;continue}else{c._intervals.splice(p,1);continue}}return c}or(s){let l=new Fe;return l.addAll(this),l.addAll(s),l}and(s){if(s.isNil)return new Fe;let l=this._intervals,c=s._intervals,p,v=l.length,x=c.length,g=0,_=0;for(;g<v&&_<x;){let A=l[g],E=c[_];A.startsBeforeDisjoint(E)?g++:E.startsBeforeDisjoint(A)?_++:A.properlyContains(E)?(p||(p=new Fe),p.addRange(A.intersection(E)),_++):E.properlyContains(A)?(p||(p=new Fe),p.addRange(A.intersection(E)),g++):A.disjoint(E)||(p||(p=new Fe),p.addRange(A.intersection(E)),A.startsAfterNonDisjoint(E)?_++:E.startsAfterNonDisjoint(A)&&g++)}return p||new Fe}contains(s){let l=this._intervals.length,c=0,p=l-1;for(;c<=p;){let v=c+p>>1,x=this._intervals[v],g=x.a;if(x.b<s)c=v+1;else if(g>s)p=v-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let s=r.MurmurHash.initialize();for(let l of this._intervals)s=r.MurmurHash.update(s,l.a),s=r.MurmurHash.update(s,l.b);return s=r.MurmurHash.finish(s,this._intervals.length*2),s}equals(s){return s==null||!(s instanceof Fe)?!1:y.ArrayEqualityComparator.INSTANCE.equals(this._intervals,s._intervals)}toString(s=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;v===x?v===t.Token.EOF?l+="<EOF>":s?l+="'"+String.fromCodePoint(v)+"'":l+=v:s?l+="'"+String.fromCodePoint(v)+"'..'"+String.fromCodePoint(x)+"'":l+=v+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(s){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let c=!0;for(let p of this._intervals){c?c=!1:l+=", ";let v=p.a,x=p.b;if(v===x)l+=this.elementName(s,v);else for(let g=v;g<=x;g++)g>v&&(l+=", "),l+=this.elementName(s,g)}return this.size>1&&(l+="}"),l}elementName(s,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":s.getDisplayName(l)}get size(){let s=0,l=this._intervals.length;if(l===1){let c=this._intervals[0];return c.b-c.a+1}for(let c=0;c<l;c++){let p=this._intervals[c];s+=p.b-p.a+1}return s}toIntegerList(){let s=new m.IntegerList(this.size),l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.add(g)}return s}toSet(){let s=new Set;for(let l of this._intervals){let c=l.a,p=l.b;for(let v=c;v<=p;v++)s.add(v)}return s}toArray(){let s=new Array,l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;for(let g=v;g<=x;g++)s.push(g)}return s}remove(s){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let c=0;c<l;c++){let p=this._intervals[c],v=p.a,x=p.b;if(s<v)break;if(s===v&&s===x){this._intervals.splice(c,1);break}if(s===v){this._intervals[c]=h.Interval.of(p.a+1,p.b);break}if(s===x){this._intervals[c]=h.Interval.of(p.a,p.b-1);break}if(s>v&&s<x){let g=p.b;this._intervals[c]=h.Interval.of(p.a,s-1),this.add(s+1,g)}}}get isReadonly(){return this.readonly}setReadonly(s){if(this.readonly&&!s)throw new Error("can't alter readonly IntervalSet");this.readonly=s}};return a([o.Override],i.prototype,"addAll",null),a([o.Override],i.prototype,"complement",null),a([o.Override],i.prototype,"subtract",null),a([o.Override],i.prototype,"or",null),a([o.Override],i.prototype,"and",null),a([o.Override],i.prototype,"contains",null),a([o.Override],i.prototype,"isNil",null),a([o.Override],i.prototype,"hashCode",null),a([o.Override],i.prototype,"equals",null),a([d(0,o.NotNull)],i.prototype,"toStringVocabulary",null),a([o.NotNull,d(0,o.NotNull)],i.prototype,"elementName",null),a([o.Override],i.prototype,"size",null),a([o.Override],i.prototype,"remove",null),a([o.NotNull],i,"of",null),a([o.NotNull],i,"subtract",null),_t.IntervalSet=i,_t}var Kr={},Jr={},pc;function sp(){if(pc)return Jr;pc=1;/*!
|
|
250
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
251
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
252
|
-
*/var a=Jr&&Jr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.BasicState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BASIC}};return a([m.Override],h.prototype,"stateType",null),Jr.BasicState=h,Jr}var hc;function ap(){if(hc)return Kr;hc=1;/*!
|
|
253
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
254
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
255
|
-
*/var a=Kr&&Kr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.InvalidState=void 0;const d=qe(),y=sp(),m=ce();let h=class extends y.BasicState{get stateType(){return d.ATNStateType.INVALID_TYPE}};return a([m.Override],h.prototype,"stateType",null),Kr.InvalidState=h,Kr}var Tt={},hi={},bt={},xc;function br(){if(xc)return bt;xc=1;/*!
|
|
256
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
257
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
258
|
-
*/var a=bt&&bt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=bt&&bt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Transition=void 0;const y=ce();let m=class{constructor(u){if(u==null)throw new Error("target cannot be null.");this.target=u}get isEpsilon(){return!1}get label(){}};return m.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],a([y.NotNull],m.prototype,"target",void 0),m=a([d(0,y.NotNull)],m),bt.Transition=m,bt}var dc;function Ca(){if(dc)return hi;dc=1;/*!
|
|
259
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
260
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
261
|
-
*/Object.defineProperty(hi,"__esModule",{value:!0}),hi.AbstractPredicateTransition=void 0;const a=br();let d=class extends a.Transition{constructor(m){super(m)}};return hi.AbstractPredicateTransition=d,hi}var Nt={},Ct={},mc;function Oa(){if(mc)return Ct;mc=1;/*!
|
|
262
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
263
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
264
|
-
*/var a=Ct&&Ct.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=Ct&&Ct.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.SetTransition=void 0;const y=Mn(),m=ce(),h=Ie(),u=br();let r=class extends u.Transition{constructor(t,i){super(t),i==null&&(i=y.IntervalSet.of(h.Token.INVALID_TYPE)),this.set=i}get serializationType(){return 7}get label(){return this.set}matches(t,i,e){return this.set.contains(t)}toString(){return this.set.toString()}};return a([m.NotNull],r.prototype,"set",void 0),a([m.Override],r.prototype,"serializationType",null),a([m.Override,m.NotNull],r.prototype,"label",null),a([m.Override],r.prototype,"matches",null),a([m.Override,m.NotNull],r.prototype,"toString",null),r=a([d(0,m.NotNull),d(1,m.Nullable)],r),Ct.SetTransition=r,Ct}var yc;function Da(){if(yc)return Nt;yc=1;/*!
|
|
265
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
266
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
267
|
-
*/var a=Nt&&Nt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Nt&&Nt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.NotSetTransition=void 0;const y=ce(),m=Oa();let h=class extends m.SetTransition{constructor(r,o){super(r,o)}get serializationType(){return 8}matches(r,o,t){return r>=o&&r<=t&&!super.matches(r,o,t)}toString(){return"~"+super.toString()}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull),d(1,y.Nullable)],h),Nt.NotSetTransition=h,Nt}var Ot={},gc;function wa(){if(gc)return Ot;gc=1;/*!
|
|
268
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
269
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
270
|
-
*/var a=Ot&&Ot.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ot&&Ot.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.RuleTransition=void 0;const y=ce(),m=br();let h=class extends m.Transition{constructor(r,o,t,i){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=o,this.precedence=t,this.followState=i}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,o,t){return!1}};return a([y.NotNull],h.prototype,"followState",void 0),a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),h=a([d(0,y.NotNull),d(3,y.NotNull)],h),Ot.RuleTransition=h,Ot}var Dt={},_c;function up(){if(_c)return Dt;_c=1;/*!
|
|
271
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
272
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
273
|
-
*/var a=Dt&&Dt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Dt&&Dt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.WildcardTransition=void 0;const y=ce(),m=br();let h=class extends m.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,o,t){return r>=o&&r<=t}toString(){return"."}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Dt.WildcardTransition=h,Dt}var Ac;function Gh(){if(Ac)return Tt;Ac=1;/*!
|
|
274
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
275
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
276
|
-
*/var a=Tt&&Tt.__decorate||function(x,g,_,A){var E=arguments.length,D=E<3?g:A===null?A=Object.getOwnPropertyDescriptor(g,_):A,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,g,_,A);else for(var w=x.length-1;w>=0;w--)(N=x[w])&&(D=(E<3?N(D):E>3?N(g,_,D):N(g,_))||D);return E>3&&D&&Object.defineProperty(g,_,D),D},d=Tt&&Tt.__param||function(x,g){return function(_,A){g(_,A,x)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.LL1Analyzer=void 0;const y=Ca(),m=Ar(),h=io(),u=vr(),r=Mn(),o=ce(),t=Da(),i=at(),e=ot(),s=Mi(),l=wa(),c=Ie(),p=up();let v=class ua{constructor(g){this.atn=g}getDecisionLookahead(g){if(g==null)return;let _=new Array(g.numberOfTransitions);for(let A=0;A<g.numberOfTransitions;A++){let E=new r.IntervalSet;_[A]=E;let D=new m.Array2DHashSet(i.ObjectEqualityComparator.INSTANCE);this._LOOK(g.transition(A).target,void 0,e.PredictionContext.EMPTY_LOCAL,E,D,new u.BitSet,!1,!1),(E.size===0||E.contains(ua.HIT_PRED))&&(E=void 0,_[A]=E)}return _}LOOK(g,_,A){if(A===void 0){if(g.atn==null)throw new Error("Illegal state");A=g.atn.ruleToStopState[g.ruleIndex]}else A===null&&(A=void 0);let E=new r.IntervalSet;return this._LOOK(g,A,_,E,new m.Array2DHashSet,new u.BitSet,!0,!0),E}_LOOK(g,_,A,E,D,N,w,P){let j=h.ATNConfig.create(g,0,A);if(!D.add(j))return;if(g===_){if(e.PredictionContext.isEmptyLocal(A)){E.add(c.Token.EPSILON);return}else if(A.isEmpty){P&&E.add(c.Token.EOF);return}}if(g instanceof s.RuleStopState){if(A.isEmpty&&!e.PredictionContext.isEmptyLocal(A)){P&&E.add(c.Token.EOF);return}let L=N.get(g.ruleIndex);try{N.clear(g.ruleIndex);for(let M=0;M<A.size;M++){if(A.getReturnState(M)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let W=this.atn.states[A.getReturnState(M)];this._LOOK(W,_,A.getParent(M),E,D,N,w,P)}}finally{L&&N.set(g.ruleIndex)}}let Y=g.numberOfTransitions;for(let L=0;L<Y;L++){let M=g.transition(L);if(M instanceof l.RuleTransition){if(N.get(M.ruleIndex))continue;let W=A.getChild(M.followState.stateNumber);try{N.set(M.ruleIndex),this._LOOK(M.target,_,W,E,D,N,w,P)}finally{N.clear(M.ruleIndex)}}else if(M instanceof y.AbstractPredicateTransition)w?this._LOOK(M.target,_,A,E,D,N,w,P):E.add(ua.HIT_PRED);else if(M.isEpsilon)this._LOOK(M.target,_,A,E,D,N,w,P);else if(M instanceof p.WildcardTransition)E.addAll(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let W=M.label;W!=null&&(M instanceof t.NotSetTransition&&(W=W.complement(r.IntervalSet.of(c.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),E.addAll(W))}}}};return v.HIT_PRED=c.Token.INVALID_TYPE,a([o.NotNull],v.prototype,"atn",void 0),a([o.NotNull,d(0,o.NotNull),d(1,o.NotNull)],v.prototype,"LOOK",null),a([d(0,o.NotNull),d(2,o.NotNull),d(3,o.NotNull),d(4,o.NotNull),d(5,o.NotNull)],v.prototype,"_LOOK",null),v=a([d(0,o.NotNull)],v),Tt.LL1Analyzer=v,Tt}var vc;function lt(){return vc||(vc=1,function(a){/*!
|
|
277
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
278
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
279
|
-
*/var d=Ir&&Ir.__decorate||function(p,v,x,g){var _=arguments.length,A=_<3?v:g===null?g=Object.getOwnPropertyDescriptor(v,x):g,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(p,v,x,g);else for(var D=p.length-1;D>=0;D--)(E=p[D])&&(A=(_<3?E(A):_>3?E(v,x,A):E(v,x))||A);return _>3&&A&&Object.defineProperty(v,x,A),A},y=Ir&&Ir.__param||function(p,v){return function(x,g){v(x,g,p)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ATN=void 0;const m=Gn(),h=ep(),u=Mn(),r=ap(),o=Gh(),t=ce(),i=at(),e=ot(),s=Ie(),l=Ue();let c=class{constructor(v,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new m.Array2DHashMap(i.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=v,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let v=0;v<this.decisionToDFA.length;v++)this.decisionToDFA[v]=new h.DFA(this.decisionToState[v],v);this.modeToDFA=new Array(this.modeToStartState.length);for(let v=0;v<this.modeToDFA.length;v++)this.modeToDFA[v]=new h.DFA(this.modeToStartState[v]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(v){return e.PredictionContext.getCachedContext(v,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(v,x){return x?new o.LL1Analyzer(this).LOOK(v,x):(v.nextTokenWithinRule||(v.nextTokenWithinRule=this.nextTokens(v,e.PredictionContext.EMPTY_LOCAL),v.nextTokenWithinRule.setReadonly(!0)),v.nextTokenWithinRule)}addState(v){v.atn=this,v.stateNumber=this.states.length,this.states.push(v)}removeState(v){let x=new r.InvalidState;x.atn=this,x.stateNumber=v.stateNumber,this.states[v.stateNumber]=x}defineMode(v,x){this.modeNameToStartState.set(v,x),this.modeToStartState.push(x),this.modeToDFA.push(new h.DFA(x)),this.defineDecisionState(x)}defineDecisionState(v){return this.decisionToState.push(v),v.decision=this.decisionToState.length-1,this.decisionToDFA.push(new h.DFA(v,v.decision)),v.decision}getDecisionState(v){if(this.decisionToState.length>0)return this.decisionToState[v]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(v,x){if(v<0||v>=this.states.length)throw new RangeError("Invalid state number.");let g=x,_=this.states[v],A=this.nextTokens(_);if(!A.contains(s.Token.EPSILON))return A;let E=new u.IntervalSet;for(E.addAll(A),E.remove(s.Token.EPSILON);g!=null&&g.invokingState>=0&&A.contains(s.Token.EPSILON);){let N=this.states[g.invokingState].transition(0);A=this.nextTokens(N.followState),E.addAll(A),E.remove(s.Token.EPSILON),g=g._parent}return A.contains(s.Token.EPSILON)&&E.add(s.Token.EOF),E}};d([t.NotNull],c.prototype,"states",void 0),d([t.NotNull],c.prototype,"decisionToState",void 0),d([t.NotNull],c.prototype,"modeNameToStartState",void 0),d([t.NotNull],c.prototype,"modeToStartState",void 0),d([t.NotNull],c.prototype,"decisionToDFA",void 0),d([t.NotNull],c.prototype,"modeToDFA",void 0),d([t.NotNull],c.prototype,"nextTokens",null),d([y(0,t.NotNull)],c.prototype,"removeState",null),d([y(0,t.NotNull),y(1,t.NotNull)],c.prototype,"defineMode",null),d([y(0,t.NotNull)],c.prototype,"defineDecisionState",null),d([t.NotNull],c.prototype,"getExpectedTokens",null),c=d([y(0,t.NotNull)],c),a.ATN=c,function(p){p.INVALID_ALT_NUMBER=0}(c=a.ATN||(a.ATN={})),a.ATN=c}(Ir)),Ir}var Je={},Zr={},Ec;function lp(){if(Ec)return Zr;Ec=1;/*!
|
|
280
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
281
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
282
|
-
*/var a=Zr&&Zr.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.ATNDeserializationOptions=void 0;const d=ce();let y=class Un{constructor(h){this.readOnly=!1,h?(this.verifyATN=h.verifyATN,this.generateRuleBypassTransitions=h.generateRuleBypassTransitions,this.optimize=h.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return Un._defaultOptions==null&&(Un._defaultOptions=new Un,Un._defaultOptions.makeReadOnly()),Un._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(h){this.throwIfReadOnly(),this.verifyATN=h}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(h){this.throwIfReadOnly(),this.generateRuleBypassTransitions=h}get isOptimize(){return this.optimize}set isOptimize(h){this.throwIfReadOnly(),this.optimize=h}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return a([d.NotNull],y,"defaultOptions",null),Zr.ATNDeserializationOptions=y,Zr}var wt={},Rt={},Sc;function cp(){if(Sc)return Rt;Sc=1;/*!
|
|
283
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
284
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
285
|
-
*/var a=Rt&&Rt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Rt&&Rt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ActionTransition=void 0;const y=ce(),m=br();let h=class extends m.Transition{constructor(r,o,t=-1,i=!1){super(r),this.ruleIndex=o,this.actionIndex=t,this.isCtxDependent=i}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Rt.ActionTransition=h,Rt}var Pt={},Tc;function fp(){if(Tc)return Pt;Tc=1;/*!
|
|
286
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
287
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
288
|
-
*/var a=Pt&&Pt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Pt&&Pt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.AtomTransition=void 0;const y=Mn(),m=ce(),h=br();let u=class extends h.Transition{constructor(o,t){super(o),this._label=t}get serializationType(){return 5}get label(){return y.IntervalSet.of(this._label)}matches(o,t,i){return this._label===o}toString(){return String(this.label)}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Pt.AtomTransition=u,Pt}var en={},xi={},bc;function lo(){if(bc)return xi;bc=1;/*!
|
|
289
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
290
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
291
|
-
*/Object.defineProperty(xi,"__esModule",{value:!0}),xi.BlockStartState=void 0;const a=kn();let d=class extends a.DecisionState{};return xi.BlockStartState=d,xi}var Nc;function Yh(){if(Nc)return en;Nc=1;/*!
|
|
292
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
293
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
294
|
-
*/var a=en&&en.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(en,"__esModule",{value:!0}),en.BasicBlockStartState=void 0;const d=qe(),y=lo(),m=ce();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),en.BasicBlockStartState=h,en}var tn={},Cc;function Wh(){if(Cc)return tn;Cc=1;/*!
|
|
295
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
296
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
297
|
-
*/var a=tn&&tn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(tn,"__esModule",{value:!0}),tn.BlockEndState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.BLOCK_END}};return a([m.Override],h.prototype,"stateType",null),tn.BlockEndState=h,tn}var Ft={},Oc;function Qh(){if(Oc)return Ft;Oc=1;/*!
|
|
298
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
299
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
300
|
-
*/var a=Ft&&Ft.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Ft&&Ft.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.EpsilonTransition=void 0;const y=ce(),m=br();let h=class extends m.Transition{constructor(r,o=-1){super(r),this._outermostPrecedenceReturn=o}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,o,t){return!1}toString(){return"epsilon"}};return a([y.Override],h.prototype,"serializationType",null),a([y.Override],h.prototype,"isEpsilon",null),a([y.Override],h.prototype,"matches",null),a([y.Override,y.NotNull],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),Ft.EpsilonTransition=h,Ft}var It={},Dc;function Xh(){if(Dc)return It;Dc=1;/*!
|
|
301
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
302
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
303
|
-
*/var a=It&&It.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=It&&It.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(It,"__esModule",{value:!0}),It.LexerChannelAction=void 0;const y=ke(),m=ce();let h=class pp{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._channel),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof pp?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),It.LexerChannelAction=h,It}var Lt={},wc;function Kh(){if(wc)return Lt;wc=1;/*!
|
|
304
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
305
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
306
|
-
*/var a=Lt&&Lt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Lt&&Lt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.LexerCustomAction=void 0;const y=ke(),m=ce();let h=class hp{constructor(r,o){this._ruleIndex=r,this._actionIndex=o}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._ruleIndex),r=y.MurmurHash.update(r,this._actionIndex),y.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof hp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),Lt.LexerCustomAction=h,Lt}var Bt={},Rc;function Jh(){if(Rc)return Bt;Rc=1;/*!
|
|
307
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
308
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
309
|
-
*/var a=Bt&&Bt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Bt&&Bt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.LexerModeAction=void 0;const y=ke(),m=ce();let h=class xp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof xp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Bt.LexerModeAction=h,Bt}var rn={},Pc;function Zh(){return Pc||(Pc=1,function(a){/*!
|
|
310
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
311
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
312
|
-
*/var d=rn&&rn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=rn&&rn.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerMoreAction=void 0;const m=ke(),h=ce();let u=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(o){o.more()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"more"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerMoreAction=u,function(r){r.INSTANCE=new r}(u=a.LexerMoreAction||(a.LexerMoreAction={}))}(rn)),rn}var nn={},Fc;function ex(){return Fc||(Fc=1,function(a){/*!
|
|
313
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
314
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
315
|
-
*/var d=nn&&nn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=nn&&nn.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerPopModeAction=void 0;const m=ke(),h=ce();let u=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(o){o.popMode()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"popMode"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerPopModeAction=u,function(r){r.INSTANCE=new r}(u=a.LexerPopModeAction||(a.LexerPopModeAction={}))}(nn)),nn}var kt={},Ic;function tx(){if(Ic)return kt;Ic=1;/*!
|
|
316
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
317
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
318
|
-
*/var a=kt&&kt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=kt&&kt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.LexerPushModeAction=void 0;const y=ke(),m=ce();let h=class dp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._mode),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof dp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),kt.LexerPushModeAction=h,kt}var on={},Lc;function rx(){return Lc||(Lc=1,function(a){/*!
|
|
319
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
320
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
321
|
-
*/var d=on&&on.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},y=on&&on.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(a,"__esModule",{value:!0}),a.LexerSkipAction=void 0;const m=ke(),h=ce();let u=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(o){o.skip()}hashCode(){let o=m.MurmurHash.initialize();return o=m.MurmurHash.update(o,this.actionType),m.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return"skip"}};d([h.Override],u.prototype,"actionType",null),d([h.Override],u.prototype,"isPositionDependent",null),d([h.Override,y(0,h.NotNull)],u.prototype,"execute",null),d([h.Override],u.prototype,"hashCode",null),d([h.Override],u.prototype,"equals",null),d([h.Override],u.prototype,"toString",null),a.LexerSkipAction=u,function(r){r.INSTANCE=new r}(u=a.LexerSkipAction||(a.LexerSkipAction={}))}(on)),on}var Mt={},Bc;function nx(){if(Bc)return Mt;Bc=1;/*!
|
|
322
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
323
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
324
|
-
*/var a=Mt&&Mt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Mt&&Mt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.LexerTypeAction=void 0;const y=ke(),m=ce();let h=class mp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=y.MurmurHash.initialize();return r=y.MurmurHash.update(r,this.actionType),r=y.MurmurHash.update(r,this._type),y.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof mp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return a([m.Override],h.prototype,"actionType",null),a([m.Override],h.prototype,"isPositionDependent",null),a([m.Override,d(0,m.NotNull)],h.prototype,"execute",null),a([m.Override],h.prototype,"hashCode",null),a([m.Override],h.prototype,"equals",null),a([m.Override],h.prototype,"toString",null),Mt.LexerTypeAction=h,Mt}var sn={},kc;function yp(){if(kc)return sn;kc=1;/*!
|
|
325
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
326
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
327
|
-
*/var a=sn&&sn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(sn,"__esModule",{value:!0}),sn.LoopEndState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{get stateType(){return y.ATNStateType.LOOP_END}};return a([m.Override],h.prototype,"stateType",null),sn.LoopEndState=h,sn}var qt={},an={},Mc;function ix(){if(Mc)return an;Mc=1;/*!
|
|
328
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
329
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
330
|
-
*/var a=an&&an.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(an,"__esModule",{value:!0}),an.ConflictInfo=void 0;const d=ce(),y=ut();let m=class gp{constructor(u,r){this._conflictedAlts=u,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(u){return u===this?!0:u instanceof gp?this.isExact===u.isExact&&y.equals(this.conflictedAlts,u.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return a([d.Override],m.prototype,"equals",null),a([d.Override],m.prototype,"hashCode",null),an.ConflictInfo=m,an}var un={},qc;function co(){if(qc)return un;qc=1;/*!
|
|
331
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
332
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
333
|
-
*/var a=un&&un.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(un,"__esModule",{value:!0}),un.NoViableAltException=void 0;const d=$i(),y=Sr(),m=ce();let h=class extends y.RecognitionException{constructor(r,o,t,i,e,s){r instanceof d.Parser&&(o===void 0&&(o=r.inputStream),t===void 0&&(t=r.currentToken),i===void 0&&(i=r.currentToken),s===void 0&&(s=r.context)),super(r,o,s),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,i)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return a([m.NotNull],h.prototype,"_startToken",void 0),un.NoViableAltException=h,un}var ln={},cn={},jc;function Ap(){if(jc)return cn;jc=1;/*!
|
|
334
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
335
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
336
|
-
*/var a=cn&&cn.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(cn,"__esModule",{value:!0}),cn.RuleContext=void 0;const d=lt(),y=Bi(),m=Pi(),h=Ve(),u=ce(),r=Nr(),o=st();let t=class _p extends m.RuleNode{constructor(e,s){super(),this._parent=e,this.invokingState=s??-1}static getChildContext(e,s){return new _p(e,s)}depth(){let e=0,s=this;for(;s;)s=s._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return h.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let s=0;s<this.childCount;s++)e+=this.getChild(s).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return d.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,s){const l=e instanceof y.Recognizer?e.ruleNames:e;s=s||o.ParserRuleContext.emptyContext();let c="",p=this;for(c+="[";p&&p!==s;){if(!l)p.isEmpty||(c+=p.invokingState);else{let v=p.ruleIndex,x=v>=0&&v<l.length?l[v]:v.toString();c+=x}p._parent&&(l||!p._parent.isEmpty)&&(c+=" "),p=p._parent}return c+="]",c.toString()}};return a([u.Override],t.prototype,"sourceInterval",null),a([u.Override],t.prototype,"ruleContext",null),a([u.Override],t.prototype,"parent",null),a([u.Override],t.prototype,"setParent",null),a([u.Override],t.prototype,"payload",null),a([u.Override],t.prototype,"text",null),a([u.Override],t.prototype,"getChild",null),a([u.Override],t.prototype,"childCount",null),a([u.Override],t.prototype,"accept",null),a([u.Override],t.prototype,"toStringTree",null),cn.RuleContext=t,cn}var $c;function st(){if($c)return ln;$c=1;/*!
|
|
337
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
338
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
339
|
-
*/var a=ln&&ln.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l};Object.defineProperty(ln,"__esModule",{value:!0}),ln.ParserRuleContext=void 0;const d=Ri(),y=Ve(),m=ce(),h=Ap(),u=_r();let r=class la extends h.RuleContext{constructor(t,i){i==null?super():super(t,i)}static emptyContext(){return la.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let i of t.children)i instanceof d.ErrorNode&&this.addChild(i)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof u.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof h.RuleContext){this.addAnyChild(t);return}else return t=new u.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof d.ErrorNode){const i=t;return i.setParent(this),this.addAnyChild(i)}else{const i=t;let e=new d.ErrorNode(i);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof la)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,i){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(i==null)return this.children[t];let e=this.tryGetChild(t,i);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,i){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof i&&(e++,e===t))return s}getToken(t,i){let e=this.tryGetToken(t,i);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,i){if(!this.children||i<0||i>=this.children.length)return;let e=-1;for(let s of this.children)if(s instanceof u.TerminalNode&&s.symbol.type===t&&(e++,e===i))return s}getTokens(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof u.TerminalNode&&e.symbol.type===t&&i.push(e);return i}get ruleContext(){return this}getRuleContext(t,i){return this.getChild(t,i)}tryGetRuleContext(t,i){return this.tryGetChild(t,i)}getRuleContexts(t){let i=[];if(!this.children)return i;for(let e of this.children)e instanceof t&&i.push(e);return i}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?y.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):y.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):y.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,a([m.Override],r.prototype,"parent",null),a([m.Override],r.prototype,"childCount",null),a([m.Override],r.prototype,"sourceInterval",null),ln.ParserRuleContext=r,ln}var di={},Uc;function ox(){return Uc||(Uc=1,function(a){/*!
|
|
340
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
341
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
342
|
-
*/var d=di&&di.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(a,"__esModule",{value:!0}),a.PredictionMode=void 0;const y=Gn(),m=ke(),h=ce(),u=Mi();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(a.PredictionMode||(a.PredictionMode={})),function(r){class o extends y.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let c=m.MurmurHash.initialize(7);return c=m.MurmurHash.update(c,l.state.stateNumber),c=m.MurmurHash.update(c,l.context),c=m.MurmurHash.finish(c,2),c}equals(l,c){return l===c?!0:l==null||c==null?!1:l.state.stateNumber===c.state.stateNumber&&l.context.equals(c.context)}}t.INSTANCE=new t,d([h.Override],t.prototype,"hashCode",null),d([h.Override],t.prototype,"equals",null);function i(s){for(let l of s)if(l.state instanceof u.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=i;function e(s){for(let l of s)if(!(l.state instanceof u.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e}(a.PredictionMode||(a.PredictionMode={}))}(di)),di}var jt={},Vc;function vp(){if(Vc)return jt;Vc=1;/*!
|
|
343
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
344
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
345
|
-
*/var a=jt&&jt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=jt&&jt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.SimulatorState=void 0;const y=ce(),m=st();let h=class{constructor(r,o,t,i){this.outerContext=r??m.ParserRuleContext.emptyContext(),this.s0=o,this.useContext=t,this.remainingOuterContext=i}};return h=a([d(1,y.NotNull)],h),jt.SimulatorState=h,jt}var zc;function qi(){if(zc)return qt;zc=1;/*!
|
|
346
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
347
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
348
|
-
*/var a=qt&&qt.__decorate||function(pe,O,T,C){var F=arguments.length,q=F<3?O:C===null?C=Object.getOwnPropertyDescriptor(O,T):C,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(pe,O,T,C);else for(var R=pe.length-1;R>=0;R--)(b=pe[R])&&(q=(F<3?b(q):F>3?b(O,T,q):b(O,T))||q);return F>3&&q&&Object.defineProperty(O,T,q),q},d=qt&&qt.__param||function(pe,O){return function(T,C){O(T,C,pe)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.ParserATNSimulator=void 0;const y=rp(),m=cp(),h=Ar(),u=va(),r=lt(),o=io(),t=Li(),i=so(),e=qe(),s=fp(),l=vr(),c=ix(),p=kn(),v=oo(),x=ba(),g=Ve(),_=gr(),A=ce(),E=Da(),D=co(),N=at(),w=st(),P=ot(),j=Ea(),Y=ox(),L=Mi(),M=wa(),W=Yn(),Z=Oa(),I=vp(),Q=Ie(),re=Er(),fe=Ue(),ie=65535,J=-2147483648;let te=class Ne extends i.ATNSimulator{constructor(O,T){super(O),this.predictionMode=Y.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=T}getPredictionMode(){return this.predictionMode}setPredictionMode(O){this.predictionMode=O}reset(){}adaptivePredict(O,T,C,F){F===void 0&&(F=!1);let q=this.atn.decisionToDFA[T];if(fe(q!=null),this.optimize_ll1&&!q.isPrecedenceDfa&&!q.isEmpty){let V=O.LA(1);if(V>=0&&V<=65535){let G=(T<<16>>>0)+V,k=this.atn.LL1Table.get(G);if(k!=null)return k}}this.dfa=q,this.force_global_context?F=!0:this.always_try_local_context||(F=F||q.isContextSensitive),this.userWantsCtxSensitive=F||this.predictionMode!==Y.PredictionMode.SLL&&C!=null&&!this.atn.decisionToState[T].sll,C==null&&(C=w.ParserRuleContext.emptyContext());let b;q.isEmpty||(b=this.getStartState(q,O,C,F)),b==null&&(C==null&&(C=w.ParserRuleContext.emptyContext()),Ne.debug&&console.log("ATN decision "+q.decision+" exec LA(1)=="+this.getLookaheadName(O)+", outerContext="+C.toString(this._parser)),b=this.computeStartState(q,C,F));let R=O.mark(),B=O.index;try{let V=this.execDFA(q,O,B,b);return Ne.debug&&console.log("DFA after predictATN: "+q.toString(this._parser.vocabulary,this._parser.ruleNames)),V}finally{this.dfa=void 0,O.seek(B),O.release(R)}}getStartState(O,T,C,F){if(!F)if(O.isPrecedenceDfa){let R=O.getPrecedenceStartState(this._parser.precedence,!1);return R==null?void 0:new I.SimulatorState(C,R,!1,C)}else return O.s0==null?void 0:new I.SimulatorState(C,O.s0,!1,C);if(!this.enable_global_context_dfa)return;let q=C;fe(C!=null);let b;for(O.isPrecedenceDfa?b=O.getPrecedenceStartState(this._parser.precedence,!0):b=O.s0full;q!=null&&b!=null&&b.isContextSensitive;)q=this.skipTailCalls(q),b=b.getContextTarget(this.getReturnState(q)),q.isEmpty?fe(b==null||!b.isContextSensitive):q=q.parent;if(b!=null)return new I.SimulatorState(C,b,F,q)}execDFA(O,T,C,F){let q=F.outerContext;Ne.dfa_debug&&console.log("DFA decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(T)+", outerContext="+q.toString(this._parser)),Ne.dfa_debug&&console.log(O.toString(this._parser.vocabulary,this._parser.ruleNames));let b=F.s0,R=T.LA(1),B=F.remainingOuterContext;for(;;){if(Ne.dfa_debug&&console.log("DFA state "+b.stateNumber+" LA(1)=="+this.getLookaheadName(T)),F.useContext)for(;b.isContextSymbol(R);){let k;if(B!=null&&(B=this.skipTailCalls(B),k=b.getContextTarget(this.getReturnState(B))),k==null){let U=new I.SimulatorState(F.outerContext,b,F.useContext,B);return this.execATN(O,T,C,U)}fe(B!=null),B=B.parent,b=k}if(this.isAcceptState(b,F.useContext)){b.predicates!=null?Ne.dfa_debug&&console.log("accept "+b):Ne.dfa_debug&&console.log("accept; predict "+b.prediction+" in state "+b.stateNumber);break}fe(!this.isAcceptState(b,F.useContext));let G=this.getExistingTargetState(b,R);if(G==null){Ne.dfa_debug&&R>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(R));let k;if(Ne.dfa_debug){let K=g.Interval.of(C,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(K)+" at DFA state "+b.stateNumber)}let U=new I.SimulatorState(q,b,F.useContext,B);return k=this.execATN(O,T,C,U),Ne.dfa_debug&&console.log("back from DFA update, alt="+k+`, dfa=
|
|
349
|
-
`+O.toString(this._parser.vocabulary,this._parser.ruleNames)),Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+k),k}else if(G===i.ATNSimulator.ERROR){let k=new I.SimulatorState(q,b,F.useContext,B);return this.handleNoViableAlt(T,C,k)}b=G,!this.isAcceptState(b,F.useContext)&&R!==_.IntStream.EOF&&(T.consume(),R=T.LA(1))}if(!F.useContext&&b.configs.conflictInfo!=null&&O.atnStartState instanceof p.DecisionState&&!(!this.userWantsCtxSensitive||!b.configs.dipsIntoOuterContext&&b.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&T.index===C)){fe(!F.useContext);let G,k=b.predicates;if(k!=null){let U=T.index;if(U!==C&&T.seek(C),G=this.evalSemanticContext(k,q,!0),G.cardinality()===1)return G.nextSetBit(0);U!==C&&T.seek(U)}if(this.reportAmbiguities){let U=new I.SimulatorState(q,b,F.useContext,B);this.reportAttemptingFullContext(O,G,U,C,T.index)}return T.seek(C),this.adaptivePredict(T,O.decision,q,!0)}let V=b.predicates;if(V!=null){let G=T.index;C!==G&&T.seek(C);let k=this.evalSemanticContext(V,q,this.reportAmbiguities&&this.predictionMode===Y.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(k.cardinality()){case 0:throw this.noViableAlt(T,q,b.configs,C);case 1:return k.nextSetBit(0);default:return C!==G&&T.seek(G),this.reportAmbiguity(O,b,C,G,b.configs.isExactConflict,k,b.configs),k.nextSetBit(0)}}return Ne.dfa_debug&&console.log("DFA decision "+O.decision+" predicts "+b.prediction),b.prediction}isAcceptState(O,T){return O.isAcceptState?O.configs.conflictingAlts==null?!0:T&&this.predictionMode===Y.PredictionMode.LL_EXACT_AMBIG_DETECTION?O.configs.isExactConflict:!0:!1}execATN(O,T,C,F){Ne.debug&&console.log("execATN decision "+O.decision+" exec LA(1)=="+this.getLookaheadName(T));let q=F.outerContext,b=F.useContext,R=T.LA(1),B=F,V=new j.PredictionContextCache;for(;;){let G=this.computeReachSet(O,B,R,V);if(G==null)return this.setDFAEdge(B.s0,T.LA(1),i.ATNSimulator.ERROR),this.handleNoViableAlt(T,C,B);let k=G.s0;if(fe(k.isAcceptState||k.prediction===r.ATN.INVALID_ALT_NUMBER),fe(k.isAcceptState||k.configs.conflictInfo==null),this.isAcceptState(k,b)){let U=k.configs.conflictingAlts,K=U==null?k.prediction:r.ATN.INVALID_ALT_NUMBER;if(K!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&T.index===C&&!O.isPrecedenceDfa&&G.outerContext===G.remainingOuterContext&&O.decision>=0&&!k.configs.hasSemanticContext&&R>=0&&R<=ie){let le=(O.decision<<16>>>0)+R;this.atn.LL1Table.set(le,K)}b&&this.always_try_local_context&&this.reportContextSensitivity(O,K,G,C,T.index)}K=k.prediction;let oe=U!=null&&this.userWantsCtxSensitive;if(oe&&(oe=!b&&(k.configs.dipsIntoOuterContext||!k.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||T.index!==C)),k.configs.hasSemanticContext){let le=k.predicates;if(le!=null){let he=T.index;switch(he!==C&&T.seek(C),U=this.evalSemanticContext(le,q,oe||this.reportAmbiguities),U.cardinality()){case 0:throw this.noViableAlt(T,q,k.configs,C);case 1:return U.nextSetBit(0)}he!==C&&T.seek(he)}}if(oe){fe(!b),fe(this.isAcceptState(k,!1)),Ne.debug&&console.log("RETRY with outerContext="+q);let le=this.computeStartState(O,q,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(O,U,G,C,T.index),T.seek(C),this.execATN(O,T,C,le)}else return U!=null&&(this.reportAmbiguities&&U.cardinality()>1&&this.reportAmbiguity(O,k,C,T.index,k.configs.isExactConflict,U,k.configs),K=U.nextSetBit(0)),K}B=G,R!==_.IntStream.EOF&&(T.consume(),R=T.LA(1))}}handleNoViableAlt(O,T,C){if(C.s0!=null){let F=new l.BitSet,q=0;for(let b of C.s0.configs)(b.reachesIntoOuterContext||b.state instanceof L.RuleStopState)&&(F.set(b.alt),q=Math.max(q,b.alt));switch(F.cardinality()){case 0:break;case 1:return F.nextSetBit(0);default:if(!C.s0.configs.hasSemanticContext)return F.nextSetBit(0);let b=new t.ATNConfigSet;for(let B of C.s0.configs)(B.reachesIntoOuterContext||B.state instanceof L.RuleStopState)&&b.add(B);let R=this.getPredsForAmbigAlts(F,b,q);if(R!=null){let B=this.getPredicatePredictions(F,R);if(B!=null){let V=O.index;try{O.seek(T);let G=this.evalSemanticContext(B,C.outerContext,!1);if(!G.isEmpty)return G.nextSetBit(0)}finally{O.seek(V)}}}return F.nextSetBit(0)}}throw this.noViableAlt(O,C.outerContext,C.s0.configs,T)}computeReachSet(O,T,C,F){let q=T.useContext,b=T.remainingOuterContext,R=T.s0;if(q)for(;R.isContextSymbol(C);){let G;if(b!=null&&(b=this.skipTailCalls(b),G=R.getContextTarget(this.getReturnState(b))),G==null)break;fe(b!=null),b=b.parent,R=G}if(fe(!this.isAcceptState(R,q)),this.isAcceptState(R,q))return new I.SimulatorState(T.outerContext,R,q,b);let B=R,V=this.getExistingTargetState(B,C);if(V==null){let G=this.computeTargetState(O,B,b,C,q,F);V=G[0],b=G[1]}if(V!==i.ATNSimulator.ERROR)return fe(!q||!V.configs.dipsIntoOuterContext),new I.SimulatorState(T.outerContext,V,q,b)}getExistingTargetState(O,T){return O.getTarget(T)}computeTargetState(O,T,C,F,q,b){let R=T.configs.toArray(),B,V=new t.ATNConfigSet,G;do{let U=!q||C!=null;U||(V.isOutermostConfigSet=!0);let K=new t.ATNConfigSet,oe;for(let X of R){if(Ne.debug&&console.log("testing "+this.getTokenName(F)+" at "+X.toString()),X.state instanceof L.RuleStopState){fe(X.context.isEmpty),(q&&!X.reachesIntoOuterContext||F===_.IntStream.EOF)&&(oe==null&&(oe=[]),oe.push(X));continue}let se=X.state.numberOfOptimizedTransitions;for(let de=0;de<se;de++){let Ce=X.state.getOptimizedTransition(de),Re=this.getReachableTarget(X,Ce,F);Re!=null&&K.add(X.transform(Re,!1),b)}}if(this.optimize_unique_closure&&oe==null&&F!==Q.Token.EOF&&K.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){K.isOutermostConfigSet=V.isOutermostConfigSet,V=K;break}let le=!1,he=F===Q.Token.EOF;if(this.closure(K,V,le,U,b,he),G=V.dipsIntoOuterContext,F===_.IntStream.EOF&&(V=this.removeAllConfigsNotInRuleStopState(V,b)),oe!=null&&(!q||!Y.PredictionMode.hasConfigInRuleStopState(V))){fe(oe.length>0);for(let X of oe)V.add(X,b)}if(q&&G){V.clear(),C=C,C=this.skipTailCalls(C);let X=this.getReturnState(C);if(B==null&&(B=new x.IntegerList),C.isEmpty?C=void 0:C=C.parent,B.add(X),X!==P.PredictionContext.EMPTY_FULL_STATE_KEY)for(let se=0;se<R.length;se++)R[se]=R[se].appendContext(X,b)}}while(q&&G);return V.isEmpty?(this.setDFAEdge(T,F,i.ATNSimulator.ERROR),[i.ATNSimulator.ERROR,C]):[this.addDFAEdge(O,T,F,B,V,b),C]}removeAllConfigsNotInRuleStopState(O,T){if(Y.PredictionMode.allConfigsInRuleStopStates(O))return O;let C=new t.ATNConfigSet;for(let F of O)F.state instanceof L.RuleStopState&&C.add(F,T);return C}computeStartState(O,T,C){let F=O.isPrecedenceDfa?O.getPrecedenceStartState(this._parser.precedence,C):C?O.s0full:O.s0;if(F!=null){if(!C)return new I.SimulatorState(T,F,C,T);F.setContextSensitive(this.atn)}O.decision;let q=O.atnStartState,b=0,R=T,B=C?P.PredictionContext.EMPTY_FULL:P.PredictionContext.EMPTY_LOCAL,V=new j.PredictionContextCache;if(C){if(!this.enable_global_context_dfa)for(;R!=null;)R.isEmpty?(b=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(b=this.getReturnState(R),B=B.appendSingleContext(b,V),R=R.parent);for(;F!=null&&F.isContextSensitive&&R!=null;){let k;if(R=this.skipTailCalls(R),R.isEmpty?(k=F.getContextTarget(P.PredictionContext.EMPTY_FULL_STATE_KEY),b=P.PredictionContext.EMPTY_FULL_STATE_KEY,R=void 0):(b=this.getReturnState(R),k=F.getContextTarget(b),B=B.appendSingleContext(b,V),R=R.parent),k==null)break;F=k}}if(F!=null&&!F.isContextSensitive)return new I.SimulatorState(T,F,C,R);let G=new t.ATNConfigSet;for(;;){let k=new t.ATNConfigSet,U=q.numberOfTransitions;for(let se=0;se<U;se++){let de=q.transition(se).target;k.add(o.ATNConfig.create(de,se+1,B))}let K=R!=null;K||(G.isOutermostConfigSet=!0),this.closure(k,G,!0,K,V,!1);let le=G.dipsIntoOuterContext,he;if(C&&!this.enable_global_context_dfa){F=this.addDFAState(O,G,V);break}else F==null?O.isPrecedenceDfa?(G=this.applyPrecedenceFilter(G,T,V),he=this.addDFAState(O,G,V),O.setPrecedenceStartState(this._parser.precedence,C,he)):(he=this.addDFAState(O,G,V),C?O.s0full?he=O.s0full:O.s0full=he:O.s0?he=O.s0:O.s0=he):(O.isPrecedenceDfa&&(G=this.applyPrecedenceFilter(G,T,V)),he=this.addDFAState(O,G,V),F.setContextTarget(b,he));if(F=he,!C||!le)break;he.setContextSensitive(this.atn),R=R,G.clear(),R=this.skipTailCalls(R);let X=this.getReturnState(R);R.isEmpty?R=void 0:R=R.parent,X!==P.PredictionContext.EMPTY_FULL_STATE_KEY&&(B=B.appendSingleContext(X,V)),b=X}return new I.SimulatorState(T,F,C,R)}applyPrecedenceFilter(O,T,C){let F=new Map,q=new t.ATNConfigSet;for(let b of O){if(b.alt!==1)continue;let R=b.semanticContext.evalPrecedence(this._parser,T);R!=null&&(F.set(b.state.stateNumber,b.context),R!==b.semanticContext?q.add(b.transform(b.state,!1,R),C):q.add(b,C))}for(let b of O)if(b.alt!==1){if(!b.isPrecedenceFilterSuppressed){let R=F.get(b.state.stateNumber);if(R!=null&&R.equals(b.context))continue}q.add(b,C)}return q}getReachableTarget(O,T,C){if(T.matches(C,0,this.atn.maxTokenType))return T.target}predicateDFAState(O,T,C){let F=this.getConflictingAltsFromConfigSet(T);if(!F)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");Ne.debug&&console.log("predicateDFAState "+O);let q=this.getPredsForAmbigAlts(F,T,C),b;return q!=null&&(b=this.getPredicatePredictions(F,q),O.predicates=b),b}getPredsForAmbigAlts(O,T,C){let F=new Array(C+1),q=F.length;for(let B of T)O.get(B.alt)&&(F[B.alt]=W.SemanticContext.or(F[B.alt],B.semanticContext));let b=0;for(let B=0;B<q;B++)F[B]==null?F[B]=W.SemanticContext.NONE:F[B]!==W.SemanticContext.NONE&&b++;let R=F;return b===0&&(R=void 0),Ne.debug&&console.log("getPredsForAmbigAlts result "+(R?u.Arrays.toString(R):"undefined")),R}getPredicatePredictions(O,T){let C=[],F=!1;for(let q=1;q<T.length;q++){let b=T[q];fe(b!=null),O!=null&&O.get(q)&&b===W.SemanticContext.NONE?C.push(new v.DFAState.PredPrediction(b,q)):b!==W.SemanticContext.NONE&&(F=!0,C.push(new v.DFAState.PredPrediction(b,q)))}if(F)return C}evalSemanticContext(O,T,C){let F=new l.BitSet;for(let q of O){if(q.pred===W.SemanticContext.NONE){if(F.set(q.alt),!C)break;continue}let b=this.evalSemanticContextImpl(q.pred,T,q.alt);if((Ne.debug||Ne.dfa_debug)&&console.log("eval pred "+q+"="+b),b&&((Ne.debug||Ne.dfa_debug)&&console.log("PREDICT "+q.alt),F.set(q.alt),!C))break}return F}evalSemanticContextImpl(O,T,C){return O.eval(this._parser,T)}closure(O,T,C,F,q,b){q==null&&(q=j.PredictionContextCache.UNCACHED);let R=O,B=new h.Array2DHashSet(N.ObjectEqualityComparator.INSTANCE);for(;R.size>0;){let V=new t.ATNConfigSet;for(let G of R)this.closureImpl(G,T,V,B,C,F,q,0,b);R=V}}closureImpl(O,T,C,F,q,b,R,B,V){if(Ne.debug&&console.log("closure("+O.toString(this._parser,!0)+")"),O.state instanceof L.RuleStopState)if(O.context.isEmpty)if(b)Ne.debug&&console.log("FALLING off rule "+this.getRuleName(O.state.ruleIndex)),O.context===P.PredictionContext.EMPTY_FULL?O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL):!O.reachesIntoOuterContext&&P.PredictionContext.isEmptyLocal(O.context)&&T.add(O,R);else{T.add(O,R);return}else{let k=O.context.hasEmpty,U=O.context.size-(k?1:0);for(let K=0;K<U;K++){let oe=O.context.getParent(K),le=this.atn.states[O.context.getReturnState(K)],he=o.ATNConfig.create(le,O.alt,oe,O.semanticContext);he.outerContextDepth=O.outerContextDepth,he.isPrecedenceFilterSuppressed=O.isPrecedenceFilterSuppressed,fe(B>J),this.closureImpl(he,T,C,F,q,b,R,B-1,V)}if(!k||!b)return;O=O.transform(O.state,!1,P.PredictionContext.EMPTY_LOCAL)}let G=O.state;G.onlyHasEpsilonTransitions||(T.add(O,R),Ne.debug&&console.log("added config "+T));for(let k=0;k<G.numberOfOptimizedTransitions;k++){if(k===0&&G.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&G.precedenceRuleDecision&&!O.context.hasEmpty){let le=G,he=!0;for(let X=0;X<O.context.size;X++)if(!le.precedenceLoopbackStates.get(O.context.getReturnState(X))){he=!1;break}if(he)continue}let U=G.getOptimizedTransition(k),K=!(U instanceof m.ActionTransition)&&q,oe=this.getEpsilonTarget(O,U,K,B===0,R,V);if(oe!=null){if(U instanceof M.RuleTransition&&C!=null&&!q){C.add(oe,R);continue}let le=B;if(O.state instanceof L.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&U.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(oe.isPrecedenceFilterSuppressed=!0),oe.outerContextDepth=oe.outerContextDepth+1,!F.add(oe))continue;fe(le>J),le--,Ne.debug&&console.log("dips into outer ctx: "+oe)}else if(U instanceof M.RuleTransition)this.optimize_tail_calls&&U.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?(fe(oe.context===O.context),le===0&&(le--,!this.tail_call_preserves_sll&&P.PredictionContext.isEmptyLocal(O.context)&&(oe.outerContextDepth=oe.outerContextDepth+1))):le>=0&&le++;else if(!U.isEpsilon&&!F.add(oe))continue;this.closureImpl(oe,T,C,F,K,b,R,le,V)}}}getRuleName(O){return this._parser!=null&&O>=0?this._parser.ruleNames[O]:"<rule "+O+">"}getEpsilonTarget(O,T,C,F,q,b){switch(T.serializationType){case 3:return this.ruleTransition(O,T,q);case 10:return this.precedenceTransition(O,T,C,F);case 4:return this.predTransition(O,T,C,F);case 6:return this.actionTransition(O,T);case 1:return O.transform(T.target,!1);case 5:case 2:case 7:return b&&T.matches(Q.Token.EOF,0,1)?O.transform(T.target,!1):void 0;default:return}}actionTransition(O,T){return Ne.debug&&console.log("ACTION edge "+T.ruleIndex+":"+T.actionIndex),O.transform(T.target,!1)}precedenceTransition(O,T,C,F){Ne.debug&&(console.log("PRED (collectPredicates="+C+") "+T.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let q;if(C&&F){let b=W.SemanticContext.and(O.semanticContext,T.predicate);q=O.transform(T.target,!1,b)}else q=O.transform(T.target,!1);return Ne.debug&&console.log("config from pred transition="+q),q}predTransition(O,T,C,F){Ne.debug&&(console.log("PRED (collectPredicates="+C+") "+T.ruleIndex+":"+T.predIndex+", ctx dependent="+T.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let q;if(C&&(!T.isCtxDependent||T.isCtxDependent&&F)){let b=W.SemanticContext.and(O.semanticContext,T.predicate);q=O.transform(T.target,!1,b)}else q=O.transform(T.target,!1);return Ne.debug&&console.log("config from pred transition="+q),q}ruleTransition(O,T,C){Ne.debug&&console.log("CALL rule "+this.getRuleName(T.target.ruleIndex)+", ctx="+O.context);let F=T.followState,q;return this.optimize_tail_calls&&T.optimizedTailCall&&(!this.tail_call_preserves_sll||!P.PredictionContext.isEmptyLocal(O.context))?q=O.context:C!=null?q=C.getChild(O.context,F.stateNumber):q=O.context.getChild(F.stateNumber),O.transform(T.target,!1,q)}isConflicted(O,T){if(O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||O.size<=1)return;let C=O.toArray();C.sort(Ne.STATE_ALT_SORT_COMPARATOR);let F=!O.dipsIntoOuterContext,q=new l.BitSet,b=C[0].alt;q.set(b);let R=C[0].state.nonStopStateNumber;for(let U of C){let K=U.state.nonStopStateNumber;if(K!==R){if(U.alt!==b)return;R=K}}let B;if(F){R=C[0].state.nonStopStateNumber,B=new l.BitSet;let U=b;for(let oe of C){if(oe.state.nonStopStateNumber!==R)break;let le=oe.alt;B.set(le),U=le}R=C[0].state.nonStopStateNumber;let K=b;for(let oe of C){let le=oe.state.nonStopStateNumber,he=oe.alt;if(le!==R){if(K!==U){F=!1;break}R=le,K=b}else if(he!==K){if(he!==B.nextSetBit(K+1)){F=!1;break}K=he}}}R=C[0].state.nonStopStateNumber;let V=0,G=0,k=C[0].context;for(let U=1;U<C.length;U++){let K=C[U];if(K.alt!==b||K.state.nonStopStateNumber!==R)break;G=U,k=T.join(k,C[U].context)}for(let U=G+1;U<C.length;U++){let K=C[U],oe=K.state;if(q.set(K.alt),oe.nonStopStateNumber!==R){R=oe.nonStopStateNumber,V=U,G=U,k=K.context;for(let de=V+1;de<C.length;de++){let Ce=C[de];if(Ce.alt!==b||Ce.state.nonStopStateNumber!==R)break;G=de,k=T.join(k,Ce.context)}U=G;continue}let le=K.context,he=K.alt,X=U;for(let de=X+1;de<C.length;de++){let Ce=C[de];if(Ce.alt!==he||Ce.state.nonStopStateNumber!==R)break;X=de,le=T.join(le,Ce.context)}U=X;let se=T.join(k,le);if(!k.equals(se))return;F=F&&k.equals(le)}return new c.ConflictInfo(q,F)}getConflictingAltsFromConfigSet(O){let T=O.conflictingAlts;return T==null&&O.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(T=new l.BitSet,T.set(O.uniqueAlt)),T}getTokenName(O){if(O===Q.Token.EOF)return"EOF";let C=(this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(O);return C===String(O)?C:C+"<"+O+">"}getLookaheadName(O){return this.getTokenName(O.LA(1))}dumpDeadEndConfigs(O){console.log("dead end configs: ");let T=O.deadEndConfigs;if(T)for(let C of T){let F="no edges";if(C.state.numberOfOptimizedTransitions>0){let q=C.state.getOptimizedTransition(0);q instanceof s.AtomTransition?F="Atom "+this.getTokenName(q._label):q instanceof Z.SetTransition&&(F=(q instanceof E.NotSetTransition?"~":"")+"Set "+q.set.toString())}console.log(C.toString(this._parser,!0)+":"+F)}}noViableAlt(O,T,C,F){return new D.NoViableAltException(this._parser,O,O.get(F),O.LT(1),C,T)}getUniqueAlt(O){let T=r.ATN.INVALID_ALT_NUMBER;for(let C of O)if(T===r.ATN.INVALID_ALT_NUMBER)T=C.alt;else if(C.alt!==T)return r.ATN.INVALID_ALT_NUMBER;return T}configWithAltAtStopState(O,T){for(let C of O)if(C.alt===T&&C.state instanceof L.RuleStopState)return!0;return!1}addDFAEdge(O,T,C,F,q,b){fe(F==null||F.isEmpty||O.isContextSensitive);let R=T,B=this.addDFAState(O,q,b);if(F!=null)for(let V of F.toArray()){if(V===P.PredictionContext.EMPTY_FULL_STATE_KEY&&R.configs.isOutermostConfigSet)continue;R.setContextSensitive(this.atn),R.setContextSymbol(C);let G=R.getContextTarget(V);if(G!=null){R=G;continue}G=this.addDFAContextState(O,R.configs,V,b),fe(V!==P.PredictionContext.EMPTY_FULL_STATE_KEY||G.configs.isOutermostConfigSet),R.setContextTarget(V,G),R=G}return Ne.debug&&console.log("EDGE "+R+" -> "+B+" upon "+this.getTokenName(C)),this.setDFAEdge(R,C,B),Ne.debug&&console.log(`DFA=
|
|
350
|
-
`+O.toString(this._parser!=null?this._parser.vocabulary:re.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),B}setDFAEdge(O,T,C){O?.setTarget(T,C)}addDFAContextState(O,T,C,F){if(C!==P.PredictionContext.EMPTY_FULL_STATE_KEY){let q=new t.ATNConfigSet;for(let b of T)q.add(b.appendContext(C,F));return this.addDFAState(O,q,F)}else return fe(!T.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),T=T.clone(!0),T.isOutermostConfigSet=!0,this.addDFAState(O,T,F)}addDFAState(O,T,C){let F=this.enable_global_context_dfa||!T.isOutermostConfigSet;if(F){T.isReadOnly||T.optimizeConfigs(this);let V=this.createDFAState(O,T),G=O.states.get(V);if(G!=null)return G}T.isReadOnly||T.conflictInfo==null&&(T.conflictInfo=this.isConflicted(T,C));let q=this.createDFAState(O,T.clone(!0)),b=this.atn.getDecisionState(O.decision),R=this.getUniqueAlt(T);if(R!==r.ATN.INVALID_ALT_NUMBER)q.acceptStateInfo=new y.AcceptStateInfo(R);else if(T.conflictingAlts!=null){let V=T.conflictingAlts;V&&(q.acceptStateInfo=new y.AcceptStateInfo(V.nextSetBit(0)))}if(q.isAcceptState&&T.hasSemanticContext&&this.predicateDFAState(q,T,b.numberOfTransitions),!F)return q;let B=O.addState(q);return Ne.debug&&B===q&&console.log("adding new DFA state: "+q),B}createDFAState(O,T){return new v.DFAState(T)}reportAttemptingFullContext(O,T,C,F,q){if(Ne.debug||Ne.retry_debug){let b=g.Interval.of(F,q);console.log("reportAttemptingFullContext decision="+O.decision+":"+C.s0.configs+", input="+this._parser.inputStream.getText(b))}if(this._parser!=null){let b=this._parser.getErrorListenerDispatch();b.reportAttemptingFullContext&&b.reportAttemptingFullContext(this._parser,O,F,q,T,C)}}reportContextSensitivity(O,T,C,F,q){if(Ne.debug||Ne.retry_debug){let b=g.Interval.of(F,q);console.log("reportContextSensitivity decision="+O.decision+":"+C.s0.configs+", input="+this._parser.inputStream.getText(b))}if(this._parser!=null){let b=this._parser.getErrorListenerDispatch();b.reportContextSensitivity&&b.reportContextSensitivity(this._parser,O,F,q,T,C)}}reportAmbiguity(O,T,C,F,q,b,R){if(Ne.debug||Ne.retry_debug){let B=g.Interval.of(C,F);console.log("reportAmbiguity "+b+":"+R+", input="+this._parser.inputStream.getText(B))}if(this._parser!=null){let B=this._parser.getErrorListenerDispatch();B.reportAmbiguity&&B.reportAmbiguity(this._parser,O,C,F,q,b,R)}}getReturnState(O){return O.isEmpty?P.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[O.invokingState].transition(0).followState.stateNumber}skipTailCalls(O){if(!this.optimize_tail_calls)return O;for(;!O.isEmpty;){let T=this.atn.states[O.invokingState];if(fe(T.numberOfTransitions===1&&T.transition(0).serializationType===3),!T.transition(0).tailCall)break;O=O.parent}return O}get parser(){return this._parser}};return te.debug=!1,te.dfa_debug=!1,te.retry_debug=!1,te.STATE_ALT_SORT_COMPARATOR=(pe,O)=>{let T=pe.state.nonStopStateNumber-O.state.nonStopStateNumber;return T!==0||(T=pe.alt-O.alt,T!==0)?T:0},a([A.NotNull],te.prototype,"predictionMode",void 0),a([A.NotNull],te.prototype,"getPredictionMode",null),a([d(0,A.NotNull)],te.prototype,"setPredictionMode",null),a([A.Override],te.prototype,"reset",null),a([d(0,A.NotNull)],te.prototype,"adaptivePredict",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],te.prototype,"getStartState",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],te.prototype,"execDFA",null),a([d(0,A.NotNull),d(1,A.NotNull),d(3,A.NotNull)],te.prototype,"execATN",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"handleNoViableAlt",null),a([d(0,A.NotNull)],te.prototype,"getExistingTargetState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"computeTargetState",null),a([A.NotNull,d(0,A.NotNull)],te.prototype,"removeAllConfigsNotInRuleStopState",null),a([A.NotNull],te.prototype,"computeStartState",null),a([A.NotNull,d(0,A.NotNull)],te.prototype,"applyPrecedenceFilter",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getReachableTarget",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getPredsForAmbigAlts",null),a([d(0,A.NotNull)],te.prototype,"evalSemanticContext",null),a([d(0,A.NotNull)],te.prototype,"evalSemanticContextImpl",null),a([d(1,A.NotNull),d(4,A.Nullable)],te.prototype,"closure",null),a([d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable),d(3,A.NotNull),d(6,A.NotNull)],te.prototype,"closureImpl",null),a([A.NotNull],te.prototype,"getRuleName",null),a([d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"getEpsilonTarget",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"actionTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"precedenceTransition",null),a([A.Nullable,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"predTransition",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.Nullable)],te.prototype,"ruleTransition",null),a([d(0,A.NotNull)],te.prototype,"isConflicted",null),a([A.NotNull],te.prototype,"getTokenName",null),a([d(0,A.NotNull)],te.prototype,"dumpDeadEndConfigs",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(2,A.NotNull)],te.prototype,"noViableAlt",null),a([d(0,A.NotNull)],te.prototype,"getUniqueAlt",null),a([d(0,A.NotNull)],te.prototype,"configWithAltAtStopState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull),d(4,A.NotNull)],te.prototype,"addDFAEdge",null),a([d(0,A.Nullable),d(2,A.Nullable)],te.prototype,"setDFAEdge",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"addDFAContextState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"addDFAState",null),a([A.NotNull,d(0,A.NotNull),d(1,A.NotNull)],te.prototype,"createDFAState",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"reportAttemptingFullContext",null),a([d(0,A.NotNull),d(2,A.NotNull)],te.prototype,"reportContextSensitivity",null),a([d(0,A.NotNull),d(5,A.NotNull),d(6,A.NotNull)],te.prototype,"reportAmbiguity",null),te=a([d(0,A.NotNull)],te),qt.ParserATNSimulator=te,qt}var fn={},Hc;function sx(){if(Hc)return fn;Hc=1;/*!
|
|
351
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
352
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
353
|
-
*/var a=fn&&fn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(fn,"__esModule",{value:!0}),fn.PlusBlockStartState=void 0;const d=qe(),y=lo(),m=ce();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.PLUS_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),fn.PlusBlockStartState=h,fn}var pn={},Gc;function ax(){if(Gc)return pn;Gc=1;/*!
|
|
354
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
355
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
356
|
-
*/var a=pn&&pn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(pn,"__esModule",{value:!0}),pn.PlusLoopbackState=void 0;const d=qe(),y=kn(),m=ce();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.PLUS_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),pn.PlusLoopbackState=h,pn}var $t={},Yc;function ux(){if(Yc)return $t;Yc=1;/*!
|
|
357
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
358
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
359
|
-
*/var a=$t&&$t.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=$t&&$t.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.PrecedencePredicateTransition=void 0;const y=Ca(),m=ce(),h=Yn();let u=class extends y.AbstractPredicateTransition{constructor(o,t){super(o),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),$t.PrecedencePredicateTransition=u,$t}var Ut={},Wc;function Ep(){if(Wc)return Ut;Wc=1;/*!
|
|
360
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
361
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
362
|
-
*/var a=Ut&&Ut.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Ut&&Ut.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.PredicateTransition=void 0;const y=Ca(),m=ce(),h=Yn();let u=class extends y.AbstractPredicateTransition{constructor(o,t,i,e){super(o),this.ruleIndex=t,this.predIndex=i,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(o,t,i){return!1}get predicate(){return new h.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override],u.prototype,"isEpsilon",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Ut.PredicateTransition=u,Ut}var Vt={},Qc;function lx(){if(Qc)return Vt;Qc=1;/*!
|
|
363
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
364
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
365
|
-
*/var a=Vt&&Vt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Vt&&Vt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.RangeTransition=void 0;const y=Mn(),m=ce(),h=br();let u=class extends h.Transition{constructor(o,t,i){super(o),this.from=t,this.to=i}get serializationType(){return 2}get label(){return y.IntervalSet.of(this.from,this.to)}matches(o,t,i){return o>=this.from&&o<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return a([m.Override],u.prototype,"serializationType",null),a([m.Override,m.NotNull],u.prototype,"label",null),a([m.Override],u.prototype,"matches",null),a([m.Override,m.NotNull],u.prototype,"toString",null),u=a([d(0,m.NotNull)],u),Vt.RangeTransition=u,Vt}var hn={},Xc;function cx(){if(Xc)return hn;Xc=1;/*!
|
|
366
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
367
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
368
|
-
*/var a=hn&&hn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(hn,"__esModule",{value:!0}),hn.RuleStartState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return y.ATNStateType.RULE_START}};return a([m.Override],h.prototype,"stateType",null),hn.RuleStartState=h,hn}var xn={},Kc;function fx(){if(Kc)return xn;Kc=1;/*!
|
|
369
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
370
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
371
|
-
*/var a=xn&&xn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(xn,"__esModule",{value:!0}),xn.StarBlockStartState=void 0;const d=qe(),y=lo(),m=ce();let h=class extends y.BlockStartState{get stateType(){return d.ATNStateType.STAR_BLOCK_START}};return a([m.Override],h.prototype,"stateType",null),xn.StarBlockStartState=h,xn}var dn={},Jc;function px(){if(Jc)return dn;Jc=1;/*!
|
|
372
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
373
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
374
|
-
*/var a=dn&&dn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(dn,"__esModule",{value:!0}),dn.StarLoopbackState=void 0;const d=dr(),y=qe(),m=ce();let h=class extends d.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return y.ATNStateType.STAR_LOOP_BACK}};return a([m.Override],h.prototype,"stateType",null),dn.StarLoopbackState=h,dn}var mn={},Zc;function hx(){if(Zc)return mn;Zc=1;/*!
|
|
375
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
376
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
377
|
-
*/var a=mn&&mn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(mn,"__esModule",{value:!0}),mn.TokensStartState=void 0;const d=qe(),y=kn(),m=ce();let h=class extends y.DecisionState{get stateType(){return d.ATNStateType.TOKEN_START}};return a([m.Override],h.prototype,"stateType",null),mn.TokensStartState=h,mn}var mi={},ef;function xx(){if(ef)return mi;ef=1;/*!
|
|
378
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
379
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
380
|
-
*/Object.defineProperty(mi,"__esModule",{value:!0}),mi.UUID=void 0;const a=ke();let d=class ca{constructor(m,h,u,r){this.data=new Uint32Array(4),this.data[0]=m,this.data[1]=h,this.data[2]=u,this.data[3]=r}static fromString(m){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(m))throw new Error("Incorrectly formatted UUID");let h=m.split("-"),u=parseInt(h[0],16),r=(parseInt(h[1],16)<<16>>>0)+parseInt(h[2],16),o=(parseInt(h[3],16)<<16>>>0)+parseInt(h[4].substr(0,4),16),t=parseInt(h[4].substr(-8),16);return new ca(u,r,o,t)}hashCode(){return a.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(m){return m===this?!0:m instanceof ca?this.data[0]===m.data[0]&&this.data[1]===m.data[1]&&this.data[2]===m.data[2]&&this.data[3]===m.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return mi.UUID=d,mi}var tf;function fo(){if(tf)return wt;tf=1;/*!
|
|
381
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
382
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
383
|
-
*/var a=wt&&wt.__decorate||function(G,k,U,K){var oe=arguments.length,le=oe<3?k:K===null?K=Object.getOwnPropertyDescriptor(k,U):K,he;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")le=Reflect.decorate(G,k,U,K);else for(var X=G.length-1;X>=0;X--)(he=G[X])&&(le=(oe<3?he(le):oe>3?he(k,U,le):he(k,U))||le);return oe>3&&le&&Object.defineProperty(k,U,le),le},d=wt&&wt.__param||function(G,k){return function(U,K){k(U,K,G)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.ATNDeserializer=void 0;const y=cp(),m=Ar(),h=lt(),u=lp(),r=qe(),o=fp(),t=Yh(),i=sp(),e=vr(),s=Wh(),l=lo(),c=kn(),p=ep(),v=Qh(),x=Mn(),g=ap(),_=Xh(),A=Kh(),E=Jh(),D=Zh(),N=ex(),w=tx(),P=rx(),j=nx(),Y=yp(),L=ce(),M=Da(),W=qi(),Z=sx(),I=ax(),Q=ux(),re=Ep(),fe=lx(),ie=cx(),J=Mi(),te=wa(),pe=Oa(),O=fx(),T=px(),C=Ta(),F=Ie(),q=hx(),b=xx(),R=up();var B;(function(G){G[G.UNICODE_BMP=0]="UNICODE_BMP",G[G.UNICODE_SMP=1]="UNICODE_SMP"})(B||(B={}));let V=class Ae{constructor(k){k===void 0&&(k=u.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=k}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(k,U){let K=Ae.SUPPORTED_UUIDS.findIndex(oe=>oe.equals(k));return K<0?!1:Ae.SUPPORTED_UUIDS.findIndex(oe=>oe.equals(U))>=K}static getUnicodeDeserializer(k){return k===0?{readUnicode:(U,K)=>Ae.toInt(U[K]),size:1}:{readUnicode:(U,K)=>Ae.toInt32(U,K),size:2}}deserialize(k){k=k.slice(0);for(let ae=1;ae<k.length;ae++)k[ae]=k[ae]-2&65535;let U=0,K=Ae.toInt(k[U++]);if(K!==Ae.SERIALIZED_VERSION){let ae=`Could not deserialize ATN with version ${K} (expected ${Ae.SERIALIZED_VERSION}).`;throw new Error(ae)}let oe=Ae.toUUID(k,U);if(U+=8,Ae.SUPPORTED_UUIDS.findIndex(ae=>ae.equals(oe))<0){let ae=`Could not deserialize ATN with UUID ${oe} (expected ${Ae.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(ae)}let le=Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,oe),he=Ae.toInt(k[U++]),X=Ae.toInt(k[U++]),se=new h.ATN(he,X),de=[],Ce=[],Re=Ae.toInt(k[U++]);for(let ae=0;ae<Re;ae++){let ve=Ae.toInt(k[U++]);if(ve===r.ATNStateType.INVALID_TYPE){se.addState(new g.InvalidState);continue}let Ee=Ae.toInt(k[U++]);Ee===65535&&(Ee=-1);let z=this.stateFactory(ve,Ee);if(ve===r.ATNStateType.LOOP_END){let f=Ae.toInt(k[U++]);de.push([z,f])}else if(z instanceof l.BlockStartState){let f=Ae.toInt(k[U++]);Ce.push([z,f])}se.addState(z)}for(let ae of de)ae[0].loopBackState=se.states[ae[1]];for(let ae of Ce)ae[0].endState=se.states[ae[1]];let H=Ae.toInt(k[U++]);for(let ae=0;ae<H;ae++){let ve=Ae.toInt(k[U++]);se.states[ve].nonGreedy=!0}let ee=Ae.toInt(k[U++]);for(let ae=0;ae<ee;ae++){let ve=Ae.toInt(k[U++]);se.states[ve].sll=!0}let xe=Ae.toInt(k[U++]);for(let ae=0;ae<xe;ae++){let ve=Ae.toInt(k[U++]);se.states[ve].isPrecedenceRule=!0}let ge=Ae.toInt(k[U++]);se.grammarType===0&&(se.ruleToTokenType=new Int32Array(ge)),se.ruleToStartState=new Array(ge);for(let ae=0;ae<ge;ae++){let ve=Ae.toInt(k[U++]),Ee=se.states[ve];if(Ee.leftFactored=Ae.toInt(k[U++])!==0,se.ruleToStartState[ae]=Ee,se.grammarType===0){let z=Ae.toInt(k[U++]);z===65535&&(z=F.Token.EOF),se.ruleToTokenType[ae]=z,Ae.isFeatureSupported(Ae.ADDED_LEXER_ACTIONS,oe)||Ae.toInt(k[U++])}}se.ruleToStopState=new Array(ge);for(let ae of se.states)ae instanceof J.RuleStopState&&(se.ruleToStopState[ae.ruleIndex]=ae,se.ruleToStartState[ae.ruleIndex].stopState=ae);let _e=Ae.toInt(k[U++]);for(let ae=0;ae<_e;ae++){let ve=Ae.toInt(k[U++]);se.modeToStartState.push(se.states[ve])}se.modeToDFA=new Array(_e);for(let ae=0;ae<_e;ae++)se.modeToDFA[ae]=new p.DFA(se.modeToStartState[ae]);let be=[];U=this.deserializeSets(k,U,be,Ae.getUnicodeDeserializer(0)),Ae.isFeatureSupported(Ae.ADDED_UNICODE_SMP,oe)&&(U=this.deserializeSets(k,U,be,Ae.getUnicodeDeserializer(1)));let Te=Ae.toInt(k[U++]);for(let ae=0;ae<Te;ae++){let ve=Ae.toInt(k[U]),Ee=Ae.toInt(k[U+1]),z=Ae.toInt(k[U+2]),f=Ae.toInt(k[U+3]),S=Ae.toInt(k[U+4]),$=Ae.toInt(k[U+5]),ue=this.edgeFactory(se,z,ve,Ee,f,S,$,be);se.states[ve].addTransition(ue),U+=6}let De=new m.Array2DHashSet({hashCode:ae=>ae.stopState^ae.returnState^ae.outermostPrecedenceReturn,equals:(ae,ve)=>ae.stopState===ve.stopState&&ae.returnState===ve.returnState&&ae.outermostPrecedenceReturn===ve.outermostPrecedenceReturn}),Pe=[];for(let ae of se.states){let ve=ae.ruleIndex>=0&&se.ruleToStartState[ae.ruleIndex].leftFactored;for(let Ee=0;Ee<ae.numberOfTransitions;Ee++){let z=ae.transition(Ee);if(!(z instanceof te.RuleTransition))continue;let f=z;if(!se.ruleToStartState[f.target.ruleIndex].leftFactored&&ve)continue;let $=-1;se.ruleToStartState[f.target.ruleIndex].isPrecedenceRule&&f.precedence===0&&($=f.target.ruleIndex);let ue={stopState:f.target.ruleIndex,returnState:f.followState.stateNumber,outermostPrecedenceReturn:$};De.add(ue)&&Pe.push(ue)}}for(let ae of Pe){let ve=new v.EpsilonTransition(se.states[ae.returnState],ae.outermostPrecedenceReturn);se.ruleToStopState[ae.stopState].addTransition(ve)}for(let ae of se.states){if(ae instanceof l.BlockStartState){if(ae.endState===void 0)throw new Error("IllegalStateException");if(ae.endState.startState!==void 0)throw new Error("IllegalStateException");ae.endState.startState=ae}if(ae instanceof I.PlusLoopbackState){let ve=ae;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof Z.PlusBlockStartState&&(z.loopBackState=ve)}}else if(ae instanceof T.StarLoopbackState){let ve=ae;for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee).target;z instanceof C.StarLoopEntryState&&(z.loopBackState=ve)}}}let Le=Ae.toInt(k[U++]);for(let ae=1;ae<=Le;ae++){let ve=Ae.toInt(k[U++]),Ee=se.states[ve];se.decisionToState.push(Ee),Ee.decision=ae-1}if(se.grammarType===0)if(le){se.lexerActions=new Array(Ae.toInt(k[U++]));for(let ae=0;ae<se.lexerActions.length;ae++){let ve=Ae.toInt(k[U++]),Ee=Ae.toInt(k[U++]);Ee===65535&&(Ee=-1);let z=Ae.toInt(k[U++]);z===65535&&(z=-1);let f=this.lexerActionFactory(ve,Ee,z);se.lexerActions[ae]=f}}else{let ae=[];for(let ve of se.states)for(let Ee=0;Ee<ve.numberOfTransitions;Ee++){let z=ve.transition(Ee);if(!(z instanceof y.ActionTransition))continue;let f=z.ruleIndex,S=z.actionIndex,$=new A.LexerCustomAction(f,S);ve.setTransition(Ee,new y.ActionTransition(z.target,f,ae.length,!1)),ae.push($)}se.lexerActions=ae}this.markPrecedenceDecisions(se),se.decisionToDFA=new Array(Le);for(let ae=0;ae<Le;ae++)se.decisionToDFA[ae]=new p.DFA(se.decisionToState[ae],ae);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(se),this.deserializationOptions.isGenerateRuleBypassTransitions&&se.grammarType===1){se.ruleToTokenType=new Int32Array(se.ruleToStartState.length);for(let ae=0;ae<se.ruleToStartState.length;ae++)se.ruleToTokenType[ae]=se.maxTokenType+ae+1;for(let ae=0;ae<se.ruleToStartState.length;ae++){let ve=new t.BasicBlockStartState;ve.ruleIndex=ae,se.addState(ve);let Ee=new s.BlockEndState;Ee.ruleIndex=ae,se.addState(Ee),ve.endState=Ee,se.defineDecisionState(ve),Ee.startState=ve;let z,f;if(se.ruleToStartState[ae].isPrecedenceRule){z=void 0;for(let $ of se.states){if($.ruleIndex!==ae||!($ instanceof C.StarLoopEntryState))continue;let ue=$.transition($.numberOfTransitions-1).target;if(ue instanceof Y.LoopEndState&&ue.epsilonOnlyTransitions&&ue.transition(0).target instanceof J.RuleStopState){z=$;break}}if(!z)throw new Error("Couldn't identify final state of the precedence rule prefix section.");f=z.loopBackState.transition(0)}else z=se.ruleToStopState[ae];for(let $ of se.states)for(let ue=0;ue<$.numberOfTransitions;ue++){let me=$.transition(ue);me!==f&&me.target===z&&(me.target=Ee)}for(;se.ruleToStartState[ae].numberOfTransitions>0;){let $=se.ruleToStartState[ae].removeTransition(se.ruleToStartState[ae].numberOfTransitions-1);ve.addTransition($)}se.ruleToStartState[ae].addTransition(new v.EpsilonTransition(ve)),Ee.addTransition(new v.EpsilonTransition(z));let S=new i.BasicState;se.addState(S),S.addTransition(new o.AtomTransition(Ee,se.ruleToTokenType[ae])),ve.addTransition(new v.EpsilonTransition(S))}this.deserializationOptions.isVerifyATN&&this.verifyATN(se)}if(this.deserializationOptions.isOptimize){for(;;){let ae=0;ae+=Ae.inlineSetRules(se),ae+=Ae.combineChainedEpsilons(se);let ve=se.grammarType===0;if(ae+=Ae.optimizeSets(se,ve),ae===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(se)}return Ae.identifyTailCalls(se),se}deserializeSets(k,U,K,oe){let le=Ae.toInt(k[U++]);for(let he=0;he<le;he++){let X=Ae.toInt(k[U]);U++;let se=new x.IntervalSet;K.push(se),Ae.toInt(k[U++])!==0&&se.add(-1);for(let Ce=0;Ce<X;Ce++){let Re=oe.readUnicode(k,U);U+=oe.size;let H=oe.readUnicode(k,U);U+=oe.size,se.add(Re,H)}}return U}markPrecedenceDecisions(k){let U=new Map;for(let K of k.states)if(K instanceof C.StarLoopEntryState&&k.ruleToStartState[K.ruleIndex].isPrecedenceRule){let oe=K.transition(K.numberOfTransitions-1).target;oe instanceof Y.LoopEndState&&oe.epsilonOnlyTransitions&&oe.transition(0).target instanceof J.RuleStopState&&(U.set(K.ruleIndex,K),K.precedenceRuleDecision=!0,K.precedenceLoopbackStates=new e.BitSet(k.states.length))}for(let K of U)for(let oe of k.ruleToStopState[K[0]].getTransitions())oe.serializationType!==1||oe.outermostPrecedenceReturn!==-1||K[1].precedenceLoopbackStates.set(oe.target.stateNumber)}verifyATN(k){for(let U of k.states)if(this.checkCondition(U!==void 0,"ATN states should not be undefined."),U.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(U.onlyHasEpsilonTransitions||U.numberOfTransitions<=1),U instanceof Z.PlusBlockStartState&&this.checkCondition(U.loopBackState!==void 0),U instanceof C.StarLoopEntryState){let K=U;if(this.checkCondition(K.loopBackState!==void 0),this.checkCondition(K.numberOfTransitions===2),K.transition(0).target instanceof O.StarBlockStartState)this.checkCondition(K.transition(1).target instanceof Y.LoopEndState),this.checkCondition(!K.nonGreedy);else if(K.transition(0).target instanceof Y.LoopEndState)this.checkCondition(K.transition(1).target instanceof O.StarBlockStartState),this.checkCondition(K.nonGreedy);else throw new Error("IllegalStateException")}if(U instanceof T.StarLoopbackState&&(this.checkCondition(U.numberOfTransitions===1),this.checkCondition(U.transition(0).target instanceof C.StarLoopEntryState)),U instanceof Y.LoopEndState&&this.checkCondition(U.loopBackState!==void 0),U instanceof ie.RuleStartState&&this.checkCondition(U.stopState!==void 0),U instanceof l.BlockStartState&&this.checkCondition(U.endState!==void 0),U instanceof s.BlockEndState&&this.checkCondition(U.startState!==void 0),U instanceof c.DecisionState){let K=U;this.checkCondition(K.numberOfTransitions<=1||K.decision>=0)}else this.checkCondition(U.numberOfTransitions<=1||U instanceof J.RuleStopState)}}checkCondition(k,U){if(!k)throw new Error("IllegalStateException: "+U)}static inlineSetRules(k){let U=0,K=new Array(k.ruleToStartState.length);for(let oe=0;oe<k.ruleToStartState.length;oe++){let he=k.ruleToStartState[oe];for(;he.onlyHasEpsilonTransitions&&he.numberOfOptimizedTransitions===1&&he.getOptimizedTransition(0).serializationType===1;)he=he.getOptimizedTransition(0).target;if(he.numberOfOptimizedTransitions!==1)continue;let X=he.getOptimizedTransition(0),se=X.target;if(!(X.isEpsilon||!se.onlyHasEpsilonTransitions||se.numberOfOptimizedTransitions!==1||!(se.getOptimizedTransition(0).target instanceof J.RuleStopState)))switch(X.serializationType){case 5:case 2:case 7:K[oe]=X;break;case 8:case 9:continue;default:continue}}for(let oe of k.states){if(oe.ruleIndex<0)continue;let le;for(let he=0;he<oe.numberOfOptimizedTransitions;he++){let X=oe.getOptimizedTransition(he);if(!(X instanceof te.RuleTransition)){le!==void 0&&le.push(X);continue}let se=X,de=K[se.target.ruleIndex];if(de===void 0){le!==void 0&&le.push(X);continue}if(le===void 0){le=[];for(let H=0;H<he;H++)le.push(oe.getOptimizedTransition(he))}U++;let Ce=se.followState,Re=new i.BasicState;switch(Re.setRuleIndex(Ce.ruleIndex),k.addState(Re),le.push(new v.EpsilonTransition(Re)),de.serializationType){case 5:Re.addTransition(new o.AtomTransition(Ce,de._label));break;case 2:Re.addTransition(new fe.RangeTransition(Ce,de.from,de.to));break;case 7:Re.addTransition(new pe.SetTransition(Ce,de.label));break;default:throw new Error("UnsupportedOperationException")}}if(le!==void 0){if(oe.isOptimized)for(;oe.numberOfOptimizedTransitions>0;)oe.removeOptimizedTransition(oe.numberOfOptimizedTransitions-1);for(let he of le)oe.addOptimizedTransition(he)}}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" rule invocations by inlining sets."),U}static combineChainedEpsilons(k){let U=0;for(let K of k.states){if(!K.onlyHasEpsilonTransitions||K instanceof J.RuleStopState)continue;let oe;e:for(let le=0;le<K.numberOfOptimizedTransitions;le++){let he=K.getOptimizedTransition(le),X=he.target;if(he.serializationType!==1||he.outermostPrecedenceReturn!==-1||X.stateType!==r.ATNStateType.BASIC||!X.onlyHasEpsilonTransitions){oe!==void 0&&oe.push(he);continue e}for(let se=0;se<X.numberOfOptimizedTransitions;se++)if(X.getOptimizedTransition(se).serializationType!==1||X.getOptimizedTransition(se).outermostPrecedenceReturn!==-1){oe!==void 0&&oe.push(he);continue e}if(U++,oe===void 0){oe=[];for(let se=0;se<le;se++)oe.push(K.getOptimizedTransition(se))}for(let se=0;se<X.numberOfOptimizedTransitions;se++){let de=X.getOptimizedTransition(se).target;oe.push(new v.EpsilonTransition(de))}}if(oe!==void 0){if(K.isOptimized)for(;K.numberOfOptimizedTransitions>0;)K.removeOptimizedTransition(K.numberOfOptimizedTransitions-1);for(let le of oe)K.addOptimizedTransition(le)}}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" transitions by combining chained epsilon transitions."),U}static optimizeSets(k,U){if(U)return 0;let K=0,oe=k.decisionToState;for(let le of oe){let he=new x.IntervalSet;for(let H=0;H<le.numberOfOptimizedTransitions;H++){let ee=le.getOptimizedTransition(H);if(!(ee instanceof v.EpsilonTransition)||ee.target.numberOfOptimizedTransitions!==1)continue;let xe=ee.target.getOptimizedTransition(0);xe.target instanceof s.BlockEndState&&(xe instanceof M.NotSetTransition||(xe instanceof o.AtomTransition||xe instanceof fe.RangeTransition||xe instanceof pe.SetTransition)&&he.add(H))}if(he.size<=1)continue;let X=[];for(let H=0;H<le.numberOfOptimizedTransitions;H++)he.contains(H)||X.push(le.getOptimizedTransition(H));let se=le.getOptimizedTransition(he.minElement).target.getOptimizedTransition(0).target,de=new x.IntervalSet;for(let H of he.intervals)for(let ee=H.a;ee<=H.b;ee++){let xe=le.getOptimizedTransition(ee).target.getOptimizedTransition(0);if(xe instanceof M.NotSetTransition)throw new Error("Not yet implemented.");de.addAll(xe.label)}let Ce;if(de.intervals.length===1)if(de.size===1)Ce=new o.AtomTransition(se,de.minElement);else{let H=de.intervals[0];Ce=new fe.RangeTransition(se,H.a,H.b)}else Ce=new pe.SetTransition(se,de);let Re=new i.BasicState;if(Re.setRuleIndex(le.ruleIndex),k.addState(Re),Re.addTransition(Ce),X.push(new v.EpsilonTransition(Re)),K+=le.numberOfOptimizedTransitions-X.length,le.isOptimized)for(;le.numberOfOptimizedTransitions>0;)le.removeOptimizedTransition(le.numberOfOptimizedTransitions-1);for(let H of X)le.addOptimizedTransition(H)}return W.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+K+" paths by collapsing sets."),K}static identifyTailCalls(k){for(let U of k.states){for(let K=0;K<U.numberOfTransitions;K++){let oe=U.transition(K);oe instanceof te.RuleTransition&&(oe.tailCall=this.testTailCall(k,oe,!1),oe.optimizedTailCall=this.testTailCall(k,oe,!0))}if(U.isOptimized)for(let K=0;K<U.numberOfOptimizedTransitions;K++){let oe=U.getOptimizedTransition(K);oe instanceof te.RuleTransition&&(oe.tailCall=this.testTailCall(k,oe,!1),oe.optimizedTailCall=this.testTailCall(k,oe,!0))}}}static testTailCall(k,U,K){if(!K&&U.tailCall||K&&U.optimizedTailCall)return!0;let oe=new e.BitSet(k.states.length),le=[];for(le.push(U.followState);;){let he=le.pop();if(!he)break;if(oe.get(he.stateNumber)||he instanceof J.RuleStopState)continue;if(!he.onlyHasEpsilonTransitions)return!1;let X=K?he.numberOfOptimizedTransitions:he.numberOfTransitions;for(let se=0;se<X;se++){let de=K?he.getOptimizedTransition(se):he.transition(se);if(de.serializationType!==1)return!1;le.push(de.target)}}return!0}static toInt(k){return k}static toInt32(k,U){return(k[U]|k[U+1]<<16)>>>0}static toUUID(k,U){let K=Ae.toInt32(k,U),oe=Ae.toInt32(k,U+2),le=Ae.toInt32(k,U+4),he=Ae.toInt32(k,U+6);return new b.UUID(he,le,oe,K)}edgeFactory(k,U,K,oe,le,he,X,se){let de=k.states[oe];switch(U){case 1:return new v.EpsilonTransition(de);case 2:return X!==0?new fe.RangeTransition(de,F.Token.EOF,he):new fe.RangeTransition(de,le,he);case 3:return new te.RuleTransition(k.states[le],he,X,de);case 4:return new re.PredicateTransition(de,le,he,X!==0);case 10:return new Q.PrecedencePredicateTransition(de,le);case 5:return X!==0?new o.AtomTransition(de,F.Token.EOF):new o.AtomTransition(de,le);case 6:return new y.ActionTransition(de,le,he,X!==0);case 7:return new pe.SetTransition(de,se[le]);case 8:return new M.NotSetTransition(de,se[le]);case 9:return new R.WildcardTransition(de)}throw new Error("The specified transition type is not valid.")}stateFactory(k,U){let K;switch(k){case r.ATNStateType.INVALID_TYPE:return new g.InvalidState;case r.ATNStateType.BASIC:K=new i.BasicState;break;case r.ATNStateType.RULE_START:K=new ie.RuleStartState;break;case r.ATNStateType.BLOCK_START:K=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:K=new Z.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:K=new O.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:K=new q.TokensStartState;break;case r.ATNStateType.RULE_STOP:K=new J.RuleStopState;break;case r.ATNStateType.BLOCK_END:K=new s.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:K=new T.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:K=new C.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:K=new I.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:K=new Y.LoopEndState;break;default:let oe=`The specified state type ${k} is not valid.`;throw new Error(oe)}return K.ruleIndex=U,K}lexerActionFactory(k,U,K){switch(k){case 0:return new _.LexerChannelAction(U);case 1:return new A.LexerCustomAction(U,K);case 2:return new E.LexerModeAction(U);case 3:return D.LexerMoreAction.INSTANCE;case 4:return N.LexerPopModeAction.INSTANCE;case 5:return new w.LexerPushModeAction(U);case 6:return P.LexerSkipAction.INSTANCE;case 7:return new j.LexerTypeAction(U);default:let oe=`The specified lexer action type ${k} is not valid.`;throw new Error(oe)}}};return V.BASE_SERIALIZED_UUID=b.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),V.ADDED_LEXER_ACTIONS=b.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),V.ADDED_UNICODE_SMP=b.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),V.SUPPORTED_UUIDS=[V.BASE_SERIALIZED_UUID,V.ADDED_LEXER_ACTIONS,V.ADDED_UNICODE_SMP],V.SERIALIZED_UUID=V.ADDED_UNICODE_SMP,a([L.NotNull],V.prototype,"deserializationOptions",void 0),a([d(0,L.NotNull)],V.prototype,"deserialize",null),a([d(0,L.NotNull)],V.prototype,"markPrecedenceDecisions",null),a([L.NotNull,d(0,L.NotNull)],V.prototype,"edgeFactory",null),wt.ATNDeserializer=V,wt}var zt={},Ht={},rf;function po(){if(rf)return Ht;rf=1;/*!
|
|
384
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
385
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
386
|
-
*/var a=Ht&&Ht.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Ht&&Ht.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.FailedPredicateException=void 0;const y=Sr(),m=ce(),h=Ep();let u=class Sp extends y.RecognitionException{constructor(o,t,i){super(o,o.inputStream,o.context,Sp.formatMessage(t,i));let s=o.interpreter.atn.states[o.state].transition(0);s instanceof h.PredicateTransition?(this._ruleIndex=s.ruleIndex,this._predicateIndex=s.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(o,o.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(o,t){return t||`failed predicate: {${o}}?`}};return a([m.NotNull],u,"formatMessage",null),u=a([d(0,m.NotNull)],u),Ht.FailedPredicateException=u,Ht}var Gt={},nf;function ho(){if(nf)return Gt;nf=1;/*!
|
|
387
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
388
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
389
|
-
*/var a=Gt&&Gt.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=Gt&&Gt.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.InputMismatchException=void 0;const y=Sr(),m=ce();let h=class extends y.RecognitionException{constructor(r,o,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),o!==void 0&&this.setOffendingState(o),this.setOffendingToken(r,r.currentToken)}};return h=a([d(0,m.NotNull)],h),Gt.InputMismatchException=h,Gt}var of;function Ra(){if(of)return zt;of=1;/*!
|
|
390
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
391
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
392
|
-
*/var a=zt&&zt.__decorate||function(l,c,p,v){var x=arguments.length,g=x<3?c:v===null?v=Object.getOwnPropertyDescriptor(c,p):v,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(l,c,p,v);else for(var A=l.length-1;A>=0;A--)(_=l[A])&&(g=(x<3?_(g):x>3?_(c,p,g):_(c,p))||g);return x>3&&g&&Object.defineProperty(c,p,g),g},d=zt&&zt.__param||function(l,c){return function(p,v){c(p,v,l)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.DefaultErrorStrategy=void 0;const y=dr(),m=qe(),h=po(),u=ho(),r=Mn(),o=co(),t=ot(),i=Ie(),e=ce();let s=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER}reset(c){this.endErrorCondition(c)}beginErrorCondition(c){this.errorRecoveryMode=!0}inErrorRecoveryMode(c){return this.errorRecoveryMode}endErrorCondition(c){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(c){this.endErrorCondition(c)}reportError(c,p){this.inErrorRecoveryMode(c)||(this.beginErrorCondition(c),p instanceof o.NoViableAltException?this.reportNoViableAlternative(c,p):p instanceof u.InputMismatchException?this.reportInputMismatch(c,p):p instanceof h.FailedPredicateException?this.reportFailedPredicate(c,p):(console.error(`unknown recognition error type: ${p}`),this.notifyErrorListeners(c,p.toString(),p)))}notifyErrorListeners(c,p,v){let x=v.getOffendingToken(c);x===void 0&&(x=null),c.notifyErrorListeners(p,x,v)}recover(c,p){this.lastErrorIndex===c.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(c.state)&&c.consume(),this.lastErrorIndex=c.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(c.state);let v=this.getErrorRecoverySet(c);this.consumeUntil(c,v)}sync(c){let p=c.interpreter.atn.states[c.state];if(this.inErrorRecoveryMode(c))return;let x=c.inputStream.LA(1),g=c.atn.nextTokens(p);if(g.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=y.ATNState.INVALID_STATE_NUMBER;return}if(g.contains(i.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=c.context,this.nextTokensState=c.state);return}switch(p.stateType){case m.ATNStateType.BLOCK_START:case m.ATNStateType.STAR_BLOCK_START:case m.ATNStateType.PLUS_BLOCK_START:case m.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(c))return;throw new u.InputMismatchException(c);case m.ATNStateType.PLUS_LOOP_BACK:case m.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(c);let A=c.getExpectedTokens().or(this.getErrorRecoverySet(c));this.consumeUntil(c,A);break}}reportNoViableAlternative(c,p){let v=c.inputStream,x;v?p.startToken.type===i.Token.EOF?x="<EOF>":x=v.getTextFromRange(p.startToken,p.getOffendingToken()):x="<unknown input>";let g="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(c,g,p)}reportInputMismatch(c,p){let v=p.expectedTokens,x=v?v.toStringVocabulary(c.vocabulary):"",g="mismatched input "+this.getTokenErrorDisplay(p.getOffendingToken(c))+" expecting "+x;this.notifyErrorListeners(c,g,p)}reportFailedPredicate(c,p){let x="rule "+c.ruleNames[c.context.ruleIndex]+" "+p.message;this.notifyErrorListeners(c,x,p)}reportUnwantedToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,v=this.getTokenErrorDisplay(p),x=this.getExpectedTokens(c),g="extraneous input "+v+" expecting "+x.toStringVocabulary(c.vocabulary);c.notifyErrorListeners(g,p,void 0)}reportMissingToken(c){if(this.inErrorRecoveryMode(c))return;this.beginErrorCondition(c);let p=c.currentToken,x="missing "+this.getExpectedTokens(c).toStringVocabulary(c.vocabulary)+" at "+this.getTokenErrorDisplay(p);c.notifyErrorListeners(x,p,void 0)}recoverInline(c){let p=this.singleTokenDeletion(c);if(p)return c.consume(),p;if(this.singleTokenInsertion(c))return this.getMissingSymbol(c);throw this.nextTokensContext===void 0?new u.InputMismatchException(c):new u.InputMismatchException(c,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(c){let p=c.inputStream.LA(1),x=c.interpreter.atn.states[c.state].transition(0).target,g=c.interpreter.atn;return g.nextTokens(x,t.PredictionContext.fromRuleContext(g,c.context)).contains(p)?(this.reportMissingToken(c),!0):!1}singleTokenDeletion(c){let p=c.inputStream.LA(2);if(this.getExpectedTokens(c).contains(p)){this.reportUnwantedToken(c),c.consume();let x=c.currentToken;return this.reportMatch(c),x}}getMissingSymbol(c){let p=c.currentToken,v=this.getExpectedTokens(c),x=i.Token.INVALID_TYPE;v.isNil||(x=v.minElement);let g;x===i.Token.EOF?g="<missing EOF>":g="<missing "+c.vocabulary.getDisplayName(x)+">";let _=p,A=c.inputStream.tryLT(-1);return _.type===i.Token.EOF&&A!=null&&(_=A),this.constructToken(c.inputStream.tokenSource,x,g,_)}constructToken(c,p,v,x){let g=c.tokenFactory,_=x.tokenSource,A=_?_.inputStream:void 0;return g.create({source:c,stream:A},p,v,i.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(c){return c.getExpectedTokens()}getTokenErrorDisplay(c){if(!c)return"<no token>";let p=this.getSymbolText(c);return p||(this.getSymbolType(c)===i.Token.EOF?p="<EOF>":p=`<${this.getSymbolType(c)}>`),this.escapeWSAndQuote(p)}getSymbolText(c){return c.text}getSymbolType(c){return c.type}escapeWSAndQuote(c){return c=c.replace(`
|
|
393
|
-
`,"\\n"),c=c.replace("\r","\\r"),c=c.replace(" ","\\t"),"'"+c+"'"}getErrorRecoverySet(c){let p=c.interpreter.atn,v=c.context,x=new r.IntervalSet;for(;v&&v.invokingState>=0;){let _=p.states[v.invokingState].transition(0),A=p.nextTokens(_.followState);x.addAll(A),v=v._parent}return x.remove(i.Token.EPSILON),x}consumeUntil(c,p){let v=c.inputStream.LA(1);for(;v!==i.Token.EOF&&!p.contains(v);)c.consume(),v=c.inputStream.LA(1)}};return a([e.Override],s.prototype,"reset",null),a([d(0,e.NotNull)],s.prototype,"beginErrorCondition",null),a([e.Override],s.prototype,"inErrorRecoveryMode",null),a([d(0,e.NotNull)],s.prototype,"endErrorCondition",null),a([e.Override],s.prototype,"reportMatch",null),a([e.Override],s.prototype,"reportError",null),a([d(0,e.NotNull)],s.prototype,"notifyErrorListeners",null),a([e.Override],s.prototype,"recover",null),a([e.Override],s.prototype,"sync",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportNoViableAlternative",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportInputMismatch",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"reportFailedPredicate",null),a([d(0,e.NotNull)],s.prototype,"reportUnwantedToken",null),a([d(0,e.NotNull)],s.prototype,"reportMissingToken",null),a([e.Override],s.prototype,"recoverInline",null),a([d(0,e.NotNull)],s.prototype,"singleTokenInsertion",null),a([d(0,e.NotNull)],s.prototype,"singleTokenDeletion",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getMissingSymbol",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getExpectedTokens",null),a([d(0,e.NotNull)],s.prototype,"getSymbolText",null),a([d(0,e.NotNull)],s.prototype,"getSymbolType",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"escapeWSAndQuote",null),a([e.NotNull,d(0,e.NotNull)],s.prototype,"getErrorRecoverySet",null),a([d(0,e.NotNull),d(1,e.NotNull)],s.prototype,"consumeUntil",null),zt.DefaultErrorStrategy=s,zt}var Yt={},sf;function dx(){if(sf)return Yt;sf=1;/*!
|
|
394
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
395
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
396
|
-
*/var a=Yt&&Yt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Yt&&Yt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.ParseInfo=void 0;const y=ce();let m=class{constructor(u){this.atnSimulator=u}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let u=this.atnSimulator.getDecisionInfo(),r=[];for(let o=0;o<u.length;o++)u[o].LL_Fallback>0&&r.push(o);return r}getTotalTimeInPrediction(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.timeInPrediction;return r}getTotalSLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let u=this.atnSimulator.getDecisionInfo(),r=0;for(let o of u)r+=o.SLL_ATNTransitions,r+=o.LL_ATNTransitions;return r}getDFASize(u){if(u)return this.atnSimulator.atn.decisionToDFA[u].states.size;{let r=0,o=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<o.length;t++)r+=this.getDFASize(t);return r}}};return a([y.NotNull],m.prototype,"getDecisionInfo",null),a([y.NotNull],m.prototype,"getLLDecisions",null),m=a([d(0,y.NotNull)],m),Yt.ParseInfo=m,Yt}var yn={},af;function Tp(){if(af)return yn;af=1;/*!
|
|
397
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
398
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
399
|
-
*/var a=yn&&yn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(yn,"__esModule",{value:!0}),yn.ProxyParserErrorListener=void 0;const d=Sa(),y=ce();let m=class extends d.ProxyErrorListener{constructor(u){super(u)}reportAmbiguity(u,r,o,t,i,e,s){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(u,r,o,t,i,e,s)})}reportAttemptingFullContext(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportAttemptingFullContext&&s.reportAttemptingFullContext(u,r,o,t,i,e)})}reportContextSensitivity(u,r,o,t,i,e){this.getDelegates().forEach(s=>{s.reportContextSensitivity&&s.reportContextSensitivity(u,r,o,t,i,e)})}};return a([y.Override],m.prototype,"reportAmbiguity",null),a([y.Override],m.prototype,"reportAttemptingFullContext",null),a([y.Override],m.prototype,"reportContextSensitivity",null),yn.ProxyParserErrorListener=m,yn}var gn={},_n={},yi={},uf;function bp(){if(uf)return yi;uf=1;/*!
|
|
400
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
401
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
402
|
-
*/Object.defineProperty(yi,"__esModule",{value:!0}),yi.ParseCancellationException=void 0;let a=class extends Error{constructor(y){super(y.message),this.cause=y,this.stack=y.stack}getCause(){return this.cause}};return yi.ParseCancellationException=a,yi}var lf;function Np(){if(lf)return _n;lf=1;/*!
|
|
403
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
404
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
405
|
-
*/var a=_n&&_n.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(_n,"__esModule",{value:!0}),_n.BailErrorStrategy=void 0;const d=Ra(),y=ho(),m=ce(),h=bp();let u=class extends d.DefaultErrorStrategy{recover(o,t){for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}recoverInline(o){let t=new y.InputMismatchException(o);for(let i=o.context;i;i=i.parent)i.exception=t;throw new h.ParseCancellationException(t)}sync(o){}};return a([m.Override],u.prototype,"recover",null),a([m.Override],u.prototype,"recoverInline",null),a([m.Override],u.prototype,"sync",null),_n.BailErrorStrategy=u,_n}var Gs={},Ys={},Wt={},cf;function mx(){if(cf)return Wt;cf=1;/*!
|
|
406
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
407
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
408
|
-
*/Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.isSupplementaryCodePoint=Wt.isLowSurrogate=Wt.isHighSurrogate=void 0;function a(m){return m>=55296&&m<=56319}Wt.isHighSurrogate=a;function d(m){return m>=56320&&m<=57343}Wt.isLowSurrogate=d;function y(m){return m>=65536}return Wt.isSupplementaryCodePoint=y,Wt}var ff;function Cp(){return ff||(ff=1,function(a){/*!
|
|
409
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
410
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
411
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.CodePointBuffer=void 0;const d=Ue(),y=mx();class m{constructor(u,r){this.buffer=u,this._position=0,this._size=r}static withArray(u){return new m(u,u.length)}get position(){return this._position}set position(u){if(u<0||u>this._size)throw new RangeError;this._position=u}get remaining(){return this._size-this.position}get(u){return this.buffer[u]}array(){return this.buffer.slice(0,this._size)}static builder(u){return new m.Builder(u)}}a.CodePointBuffer=m,function(h){let u;(function(o){o[o.BYTE=0]="BYTE",o[o.CHAR=1]="CHAR",o[o.INT=2]="INT"})(u||(u={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new h(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let i=32-Math.clz32(t-1);return Math.pow(2,i)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let i=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(i);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(p<=255)l[c]=p;else if(t=t.subarray(e,s),this.position=c,y.isHighSurrogate(p)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,c++}this.position=c}appendArrayChar(t){d(this.prevHighSurrogate===-1);let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];if(!y.isHighSurrogate(p))l[c]=p;else{t=t.subarray(e,s),this.position=c,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,c++}this.position=c}appendArrayInt(t){let i=t,e=0,s=t.length,l=this.buffer,c=this.position;for(;e<s;){let p=i[e];e++,this.prevHighSurrogate!==-1?y.isLowSurrogate(p)?(l[c]=String.fromCharCode(this.prevHighSurrogate,p).codePointAt(0),c++,this.prevHighSurrogate=-1):(l[c]=this.prevHighSurrogate,c++,y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++,this.prevHighSurrogate=-1)):y.isHighSurrogate(p)?this.prevHighSurrogate=p:(l[c]=p,c++)}this.prevHighSurrogate!==-1&&(l[c]=this.prevHighSurrogate,c++),this.position=c}byteToCharBuffer(t){let i=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=i}byteToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}charToIntBuffer(t){let i=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));i.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=i}}h.Builder=r}(m=a.CodePointBuffer||(a.CodePointBuffer={}))}(Ys)),Ys}var An={},pf;function Dp(){if(pf)return An;pf=1;/*!
|
|
412
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
413
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
414
|
-
*/var a=An&&An.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(An,"__esModule",{value:!0}),An.CodePointCharStream=void 0;const d=Ue(),y=gr(),m=Ve(),h=ce();let u=class Op{constructor(o,t,i,e){d(t===0),this._array=o,this._size=i,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(o,t){return(t===void 0||t.length===0)&&(t=y.IntStream.UNKNOWN_SOURCE_NAME),new Op(o.array(),o.position,o.remaining,t)}consume(){if(this._size-this._position===0)throw d(this.LA(1)===y.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(o){}seek(o){this._position=o}get sourceName(){return this._name}toString(){return this.getText(m.Interval.of(0,this.size-1))}LA(o){let t;switch(Math.sign(o)){case-1:return t=this.index+o,t<0?y.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+o-1,t>=this.size?y.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(o){const t=Math.min(o.a,this.size),i=Math.min(o.b-o.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+i))):String.fromCharCode(...Array.from(this._array.subarray(t,t+i)))}};return a([h.Override],u.prototype,"consume",null),a([h.Override],u.prototype,"index",null),a([h.Override],u.prototype,"size",null),a([h.Override],u.prototype,"mark",null),a([h.Override],u.prototype,"release",null),a([h.Override],u.prototype,"seek",null),a([h.Override],u.prototype,"sourceName",null),a([h.Override],u.prototype,"toString",null),a([h.Override],u.prototype,"LA",null),a([h.Override],u.prototype,"getText",null),An.CodePointCharStream=u,An}var hf;function Pa(){return hf||(hf=1,function(a){/*!
|
|
415
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
416
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
417
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.CharStreams=void 0;const d=Cp(),y=Dp(),m=gr();(function(h){function u(r,o){(o===void 0||o.length===0)&&(o=m.IntStream.UNKNOWN_SOURCE_NAME);let t=d.CodePointBuffer.builder(r.length),i=new Uint16Array(r.length);for(let e=0;e<r.length;e++)i[e]=r.charCodeAt(e);return t.append(i),y.CodePointCharStream.fromBuffer(t.build(),o)}h.fromString=u})(a.CharStreams||(a.CharStreams={}))}(Gs)),Gs}var Qt={},Xt={},xf;function wp(){if(xf)return Xt;xf=1;/*!
|
|
418
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
419
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
420
|
-
*/var a=Xt&&Xt.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p},d=Xt&&Xt.__param||function(i,e){return function(s,l){e(s,l,i)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.BufferedTokenStream=void 0;const y=Ue(),m=ki(),h=Ve(),u=Tr(),r=ce(),o=Ie();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===o.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){y(e>=0);let s=e-this.tokens.length+1;return s>0?this.fetch(s)>=s:!0}fetch(e){if(this.fetchedEOF)return 0;for(let s=0;s<e;s++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===o.Token.EOF)return this.fetchedEOF=!0,s+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,s){if(e<0||s<0)return[];this.lazyInit();let l=new Array;s>=this.tokens.length&&(s=this.tokens.length-1);for(let c=e;c<=s;c++){let p=this.tokens[c];if(p.type===o.Token.EOF)break;l.push(p)}return l}LA(e){let s=this.LT(e);return s?s.type:o.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let s=this.tryLT(e);if(s===void 0)throw new RangeError("requested lookback index out of range");return s}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let s=this.p+e-1;return this.sync(s),s>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[s]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,s,l){if(this.lazyInit(),e===void 0)return y(s===void 0&&l===void 0),this.tokens;if(s===void 0&&(s=this.tokens.length-1),e<0||s>=this.tokens.length||s<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+s+" not in 0.."+(this.tokens.length-1));if(e>s)return[];if(l===void 0)return this.tokens.slice(e,s+1);typeof l=="number"&&(l=new Set().add(l));let c=l,p=this.tokens.slice(e,s+1);return p=p.filter(v=>c.has(v.type)),p}nextTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==s;){if(l.type===o.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,s){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===o.Token.EOF||l.channel===s)return e;e--}return e}getHiddenTokensToRight(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,u.Lexer.DEFAULT_TOKEN_CHANNEL),c,p=e+1;return l===-1?c=this.size-1:c=l,this.filterForChannel(p,c,s)}getHiddenTokensToLeft(e,s=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,u.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let c=l+1,p=e-1;return this.filterForChannel(c,p,s)}filterForChannel(e,s,l){let c=new Array;for(let p=e;p<=s;p++){let v=this.tokens[p];l===-1?v.channel!==u.Lexer.DEFAULT_TOKEN_CHANNEL&&c.push(v):v.channel===l&&c.push(v)}return c}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=h.Interval.of(0,this.size-1):e instanceof h.Interval||(e=e.sourceInterval);let s=e.a,l=e.b;if(s<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let c="";for(let p=s;p<=l;p++){let v=this.tokens[p];if(v.type===o.Token.EOF)break;c+=v.text}return c.toString()}getTextFromRange(e,s){return this.isToken(e)&&this.isToken(s)?this.getText(h.Interval.of(e.tokenIndex,s.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof m.CommonToken}isToken(e){return e instanceof m.CommonToken}};return a([r.NotNull],t.prototype,"_tokenSource",void 0),a([r.Override],t.prototype,"tokenSource",null),a([r.Override],t.prototype,"index",null),a([r.Override],t.prototype,"mark",null),a([r.Override],t.prototype,"release",null),a([r.Override],t.prototype,"seek",null),a([r.Override],t.prototype,"size",null),a([r.Override],t.prototype,"consume",null),a([r.Override],t.prototype,"get",null),a([r.Override],t.prototype,"LA",null),a([r.NotNull,r.Override],t.prototype,"LT",null),a([r.Override],t.prototype,"sourceName",null),a([r.NotNull,r.Override],t.prototype,"getText",null),a([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=a([d(0,r.NotNull)],t),Xt.BufferedTokenStream=t,Xt}var df;function Fa(){if(df)return Qt;df=1;/*!
|
|
421
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
422
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
423
|
-
*/var a=Qt&&Qt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Qt&&Qt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.CommonTokenStream=void 0;const y=wp(),m=ce(),h=Ie();let u=class extends y.BufferedTokenStream{constructor(o,t=h.Token.DEFAULT_CHANNEL){super(o),this.channel=t}adjustSeekIndex(o){return this.nextTokenOnChannel(o,this.channel)}tryLB(o){if(this.p-o<0)return;let t=this.p,i=1;for(;i<=o&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),i++;if(!(t<0))return this.tokens[t]}tryLT(o){if(this.lazyInit(),o===0)throw new RangeError("0 is not a valid lookahead index");if(o<0)return this.tryLB(-o);let t=this.p,i=1;for(;i<o;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),i++;return this.tokens[t]}getNumberOfOnChannelTokens(){let o=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&o++,t.type===h.Token.EOF)break;return o}};return a([m.Override],u.prototype,"adjustSeekIndex",null),a([m.Override],u.prototype,"tryLB",null),a([m.Override],u.prototype,"tryLT",null),u=a([d(0,m.NotNull)],u),Qt.CommonTokenStream=u,Qt}var Kt={},mf;function Rp(){if(mf)return Kt;mf=1;/*!
|
|
424
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
425
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
426
|
-
*/var a=Kt&&Kt.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=Kt&&Kt.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ListTokenSource=void 0;const y=Na(),m=ce(),h=Ie();let u=class{constructor(o,t){if(this.i=0,this._factory=y.CommonTokenFactory.DEFAULT,o==null)throw new Error("tokens cannot be null");this.tokens=o,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.text;if(t!=null){let i=t.lastIndexOf(`
|
|
427
|
-
`);if(i>=0)return t.length-i-1}return o.charPositionInLine+o.stopIndex-o.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let t=-1;if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1].stopIndex;e!==-1&&(t=e+1)}let i=Math.max(-1,t-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},h.Token.EOF,"EOF",h.Token.DEFAULT_CHANNEL,t,i,this.line,this.charPositionInLine)}return this.eofToken}let o=this.tokens[this.i];return this.i===this.tokens.length-1&&o.type===h.Token.EOF&&(this.eofToken=o),this.i++,o}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let o=this.tokens[this.tokens.length-1],t=o.line,i=o.text;if(i!=null)for(let e=0;e<i.length;e++)i.charAt(e)===`
|
|
428
|
-
`&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let o=this.inputStream;return o!=null?o.sourceName:"List"}set tokenFactory(o){this._factory=o}get tokenFactory(){return this._factory}};return a([m.Override],u.prototype,"charPositionInLine",null),a([m.Override],u.prototype,"nextToken",null),a([m.Override],u.prototype,"line",null),a([m.Override],u.prototype,"inputStream",null),a([m.Override],u.prototype,"sourceName",null),a([m.Override,m.NotNull,d(0,m.NotNull)],u.prototype,"tokenFactory",null),u=a([d(0,m.NotNull)],u),Kt.ListTokenSource=u,Kt}var gi={},yf;function yx(){if(yf)return gi;yf=1;/*!
|
|
429
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
430
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
431
|
-
*/Object.defineProperty(gi,"__esModule",{value:!0}),gi.MultiMap=void 0;let a=class extends Map{constructor(){super()}map(y,m){let h=super.get(y);h||(h=[],super.set(y,h)),h.push(m)}getPairs(){let y=[];return this.forEach((m,h)=>{m.forEach(u=>{y.push([h,u])})}),y}};return gi.MultiMap=a,gi}var Jt={},vn={},gf;function Pp(){if(gf)return vn;gf=1;/*!
|
|
432
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
433
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
434
|
-
*/var a=vn&&vn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(vn,"__esModule",{value:!0}),vn.InterpreterRuleContext=void 0;const d=ce(),y=st();let m=class extends y.ParserRuleContext{constructor(u,r,o){o!==void 0?super(r,o):super(),this._ruleIndex=u}get ruleIndex(){return this._ruleIndex}};return a([d.Override],m.prototype,"ruleIndex",null),vn.InterpreterRuleContext=m,vn}var _f;function Fp(){if(_f)return Jt;_f=1;/*!
|
|
435
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
436
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
437
|
-
*/var a=Jt&&Jt.__decorate||function(g,_,A,E){var D=arguments.length,N=D<3?_:E===null?E=Object.getOwnPropertyDescriptor(_,A):E,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,_,A,E);else for(var P=g.length-1;P>=0;P--)(w=g[P])&&(N=(D<3?w(N):D>3?w(_,A,N):w(_,A))||N);return D>3&&N&&Object.defineProperty(_,A,N),N},d=Jt&&Jt.__param||function(g,_){return function(A,E){_(A,E,g)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.ParserInterpreter=void 0;const y=dr(),m=qe(),h=vr(),u=po(),r=ho(),o=Pp(),t=yp(),i=ce(),e=ce(),s=$i(),l=qi(),c=Sr(),p=Ta(),v=Ie();let x=class fa extends s.Parser{constructor(_,A,E,D,N){if(super(_ instanceof fa?_.inputStream:N),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,_ instanceof fa){let w=_;this._grammarFileName=w._grammarFileName,this._atn=w._atn,this.pushRecursionContextStates=w.pushRecursionContextStates,this._ruleNames=w._ruleNames,this._vocabulary=w._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{A=A,E=E,D=D,this._grammarFileName=_,this._atn=D,this._ruleNames=E.slice(0),this._vocabulary=A,this.pushRecursionContextStates=new h.BitSet(D.states.length);for(let w of D.states)w instanceof p.StarLoopEntryState&&w.precedenceRuleDecision&&this.pushRecursionContextStates.set(w.stateNumber);this.interpreter=new l.ParserATNSimulator(D,this)}}reset(_){_===void 0?super.reset():super.reset(_),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(_){let A=this._atn.ruleToStartState[_];for(this._rootContext=this.createInterpreterRuleContext(void 0,y.ATNState.INVALID_STATE_NUMBER,_),A.isPrecedenceRule?this.enterRecursionRule(this._rootContext,A.stateNumber,_,0):this.enterRule(this._rootContext,A.stateNumber,_);;){let E=this.atnState;switch(E.stateType){case m.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(A.isPrecedenceRule){let D=this._ctx,N=this._parentContextStack.pop();return this.unrollRecursionContexts(N[0]),D}else return this.exitRule(),this._rootContext;this.visitRuleStopState(E);break;default:try{this.visitState(E)}catch(D){if(D instanceof c.RecognitionException)this.state=this._atn.ruleToStopState[E.ruleIndex].stateNumber,this.context.exception=D,this.errorHandler.reportError(this,D),this.recover(D);else throw D}break}}}enterRecursionRule(_,A,E,D){this._parentContextStack.push([this._ctx,_.invokingState]),super.enterRecursionRule(_,A,E,D)}get atnState(){return this._atn.states[this.state]}visitState(_){let A=1;_.numberOfTransitions>1&&(A=this.visitDecisionState(_));let E=_.transition(A-1);switch(E.serializationType){case 1:if(this.pushRecursionContextStates.get(_.stateNumber)&&!(E.target instanceof t.LoopEndState)){let Y=this._parentContextStack[this._parentContextStack.length-1],L=this.createInterpreterRuleContext(Y[0],Y[1],this._ctx.ruleIndex);this.pushNewRecursionContext(L,this._atn.ruleToStartState[_.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(E._label);break;case 2:case 7:case 8:E.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let D=E.target,N=D.ruleIndex,w=this.createInterpreterRuleContext(this._ctx,_.stateNumber,N);D.isPrecedenceRule?this.enterRecursionRule(w,D.stateNumber,N,E.precedence):this.enterRule(w,E.target.stateNumber,N);break;case 4:let P=E;if(!this.sempred(this._ctx,P.ruleIndex,P.predIndex))throw new u.FailedPredicateException(this);break;case 6:let j=E;this.action(this._ctx,j.ruleIndex,j.actionIndex);break;case 10:if(!this.precpred(this._ctx,E.precedence)){let Y=E.precedence;throw new u.FailedPredicateException(this,`precpred(_ctx, ${Y})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=E.target.stateNumber}visitDecisionState(_){let A;this.errorHandler.sync(this);let E=_.decision;return E===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(A=this.overrideDecisionAlt,this.overrideDecisionReached=!0):A=this.interpreter.adaptivePredict(this._input,E,this._ctx),A}createInterpreterRuleContext(_,A,E){return new o.InterpreterRuleContext(E,_,A)}visitRuleStopState(_){if(this._atn.ruleToStartState[_.ruleIndex].isPrecedenceRule){let D=this._parentContextStack.pop();this.unrollRecursionContexts(D[0]),this.state=D[1]}else this.exitRule();let E=this._atn.states[this.state].transition(0);this.state=E.followState.stateNumber}addDecisionOverride(_,A,E){this.overrideDecision=_,this.overrideDecisionInputIndex=A,this.overrideDecisionAlt=E}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(_){let A=this._input.index;if(this.errorHandler.recover(this,_),this._input.index===A){let E=_.getOffendingToken();if(!E)throw new Error("Expected exception to have an offending token");let D=E.tokenSource,N=D!==void 0?D.inputStream:void 0,w={source:D,stream:N};if(_ instanceof r.InputMismatchException){let P=_.expectedTokens;if(P===void 0)throw new Error("Expected the exception to provide expected tokens");let j=v.Token.INVALID_TYPE;P.isNil||(j=P.minElement);let Y=this.tokenFactory.create(w,j,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,Y))}else{E.tokenSource;let P=this.tokenFactory.create(w,v.Token.INVALID_TYPE,E.text,v.Token.DEFAULT_CHANNEL,-1,-1,E.line,E.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,P))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return a([i.NotNull],x.prototype,"_vocabulary",void 0),a([e.Override],x.prototype,"reset",null),a([e.Override],x.prototype,"atn",null),a([e.Override],x.prototype,"vocabulary",null),a([e.Override],x.prototype,"ruleNames",null),a([e.Override],x.prototype,"grammarFileName",null),a([e.Override],x.prototype,"enterRecursionRule",null),x=a([d(1,i.NotNull)],x),Jt.ParserInterpreter=x,Jt}var Zt={},Af;function gx(){if(Af)return Zt;Af=1;/*!
|
|
438
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
439
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
440
|
-
*/var a=Zt&&Zt.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=Zt&&Zt.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.ParseTreeMatch=void 0;const y=ce();let m=class{constructor(u,r,o,t){if(!u)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!o)throw new Error("labels cannot be null");this._tree=u,this._pattern=r,this._labels=o,this._mismatchedNode=t}get(u){let r=this._labels.get(u);if(!(!r||r.length===0))return r[r.length-1]}getAll(u){const r=this._labels.get(u);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return a([y.NotNull,d(0,y.NotNull)],m.prototype,"getAll",null),a([y.NotNull],m.prototype,"labels",null),a([y.NotNull],m.prototype,"pattern",null),a([y.NotNull],m.prototype,"tree",null),a([y.Override],m.prototype,"toString",null),m=a([d(0,y.NotNull),d(1,y.NotNull),d(2,y.NotNull)],m),Zt.ParseTreeMatch=m,Zt}var er={},_i={},Ai={},vf;function _x(){if(vf)return Ai;vf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.XPathLexer=void 0;const a=fo(),d=Tr(),y=uo(),m=Er(),h=ut();let u=class Ge extends d.Lexer{constructor(o){super(o),this._interp=new y.LexerATNSimulator(Ge._ATN,this)}get vocabulary(){return Ge.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ge.ruleNames}get serializedATN(){return Ge._serializedATN}get channelNames(){return Ge.channelNames}get modeNames(){return Ge.modeNames}action(o,t,i){switch(t){case 4:this.ID_action(o,i);break}}ID_action(o,t){switch(t){case 0:let i=this.text;i.charAt(0)===i.charAt(0).toUpperCase()?this.type=Ge.TOKEN_REF:this.type=Ge.RULE_REF;break}}static get _ATN(){return Ge.__ATN||(Ge.__ATN=new a.ATNDeserializer().deserialize(h.toCharArray(Ge._serializedATN))),Ge.__ATN}};return Ai.XPathLexer=u,u.TOKEN_REF=1,u.RULE_REF=2,u.ANYWHERE=3,u.ROOT=4,u.WILDCARD=5,u.BANG=6,u.ID=7,u.STRING=8,u.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],u.modeNames=["DEFAULT_MODE"],u.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],u._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],u._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],u.VOCABULARY=new m.VocabularyImpl(u._LITERAL_NAMES,u._SYMBOLIC_NAMES,[]),u._serializedATNSegments=2,u._serializedATNSegment0=`줝쪺֍꾺体؇쉁
|
|
441
|
-
2\b \x07 \x07\b \b \x07
|
|
442
|
-
\f"\v\x07\x07\b\b \x07 ,
|
|
443
|
-
\f /\v -
|
|
444
|
-
\x07\x07 \b\v \r
|
|
445
|
-
ʶ
|
|
446
|
-
2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂ͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՛՛գ։ֿׁׁ֓׃ׄ׆ׇגײ״؇ؒ؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑݏ߂߷ࠂࡂࢢࢶࢸࢿࣖ॥२ॱॳঅইকপবলসা্য়ৡ২৳ਃਅਇਕਪਬਲਵਸਾਾੀ੍ਜ਼ਫ਼੨ઃઅઇએઑઓકપબલવષાેૉો્ૢ૨૱ૻૻଃଅଇକପବଲଵଷା୍ୟୡ୨ୱ୳୳அஇஐஒஔஜஞஞபரீைொௌ௨௱ంఅఇఎఐఒఔపబిెైొౌౘౚౢ౨ಂಅಇಎಐಒಔಪಬವಷಾೆೈೊೌೠೠೢ೨ೱೳഃഅഇഎഐഒഔ഼ിെൈൊൌൖ൙ൡ൨൱ർඁඅඇගඳඵලෂෑූෘෘේ෨෴ฃโ๐๒๛ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່໊໒ໞ༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፟፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜢ᜶ᝂᝢᝮᝰᝲគ៕៙៙២᠍᠐᠒ᠢᢂᢲᤂᤠᤢᤲ᥈ᥲᦂᦲ᧒ᨂᨢ᩠ᩢ᪁᪒᪩᪩ᪿ᪲ᬂ᭒᭛᭭᭵ᮂᰂ᱂ᱏ᱿ᲂ᳔᳖᳒᳸ᳺᴂ᷽᷷ἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾‑‰⁁⁂⁖⁖ⁱ₁₁ₒ⃒⃞⃣⃣⃧℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮⴂⴧⴲⶁⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゛゜ゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒꙂ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣒꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲꥢꦂ꧂꧑ꧢꨀꨂꩂ꩒ꩢ꩸ꩼꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯲갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ!!2;C\aac|ィᅣᅩᅯᅵ�\r(*<>?AOR_üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼΟυϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵ਼ੁੁંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂೂဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌኑኟኡኪኲዬዲዻጂጅጇጎጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂᜟᜭᜲᢢᣫᤁᤁ᫂ᰂᰊᰌ᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍퟐ\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։גײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާߌ߬߶߷ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংইকপবলসিিয়ৡৣ৲৳ਇਕਪਬਲਵਸਜ਼ਫ਼ੴ੶ઇએઑઓકપબલવષિિૢૣૻૻଇକପବଲଵଷିିୟୡୣ୳୳அஅஇஐஒஔஜஞஞபரఇఎఐఒఔపబిిౚౢౣಂಂಇಎಐಒಔಪಬವಷಿಿೠೠೢೣೳഇഎഐഒഔ഼ിിൖ൘ൡൣർඁඇගඳඵලෂฃาิีโ่ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີໂໆ່່ໞ༂༂གཉཋྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙ᠢᢂᢆᢉᢪᢲᤂᤠᥒᥲᦂᦲᨂᨘᨢᩖ᪩᪩ᬈᭇᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳳ᳷᳸ᴂ᷁ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂꫝ꫟ꫢꫬꫴ꫶ꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂ힲퟍ車全flﬕײַײַﬡשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͷΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਂਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂစ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌኑኟኡኪኲዠጇጎጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂᢢᣡᤁᤁ᫂ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈`,u._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
|
|
447
|
-
\b\r\x07" !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,u._serializedATN=h.join([u._serializedATNSegment0,u._serializedATNSegment1],""),Ai}var En={},Ef;function Ax(){if(Ef)return En;Ef=1;/*!
|
|
448
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
449
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
450
|
-
*/var a=En&&En.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(En,"__esModule",{value:!0}),En.XPathLexerErrorListener=void 0;const d=ce();let y=class{syntaxError(h,u,r,o,t,i){}};return a([d.Override],y.prototype,"syntaxError",null),En.XPathLexerErrorListener=y,En}var Sn={},Tn={},Sf;function Wn(){if(Sf)return Tn;Sf=1;/*!
|
|
451
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
452
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
453
|
-
*/var a=Tn&&Tn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.XPathElement=void 0;const d=ce();let y=class{constructor(h){this.nodeName=h,this.invert=!1}toString(){let h=this.invert?"!":"";return Object.constructor.name+"["+h+this.nodeName+"]"}};return a([d.Override],y.prototype,"toString",null),Tn.XPathElement=y,Tn}var Tf;function vx(){if(Tf)return Sn;Tf=1;/*!
|
|
454
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
455
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
456
|
-
*/var a=Sn&&Sn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.XPathRuleAnywhereElement=void 0;const d=ce(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.ruleIndex=o}evaluate(r){return y.Trees.findAllRuleNodes(r,this.ruleIndex)}};return a([d.Override],h.prototype,"evaluate",null),Sn.XPathRuleAnywhereElement=h,Sn}var bn={},bf;function Ex(){if(bf)return bn;bf=1;/*!
|
|
457
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
458
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
459
|
-
*/var a=bn&&bn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(bn,"__esModule",{value:!0}),bn.XPathRuleElement=void 0;const d=st(),y=ce(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.ruleIndex=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof d.ParserRuleContext&&(i.ruleIndex===this.ruleIndex&&!this.invert||i.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(i);return t}};return a([y.Override],u.prototype,"evaluate",null),bn.XPathRuleElement=u,bn}var Nn={},Nf;function Sx(){if(Nf)return Nn;Nf=1;/*!
|
|
460
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
461
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
462
|
-
*/var a=Nn&&Nn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.XPathTokenAnywhereElement=void 0;const d=ce(),y=Nr(),m=Wn();let h=class extends m.XPathElement{constructor(r,o){super(r),this.tokenType=o}evaluate(r){return y.Trees.findAllTokenNodes(r,this.tokenType)}};return a([d.Override],h.prototype,"evaluate",null),Nn.XPathTokenAnywhereElement=h,Nn}var Cn={},Cf;function Tx(){if(Cf)return Cn;Cf=1;/*!
|
|
463
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
464
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
465
|
-
*/var a=Cn&&Cn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.XPathTokenElement=void 0;const d=ce(),y=_r(),m=Nr(),h=Wn();let u=class extends h.XPathElement{constructor(o,t){super(o),this.tokenType=t}evaluate(o){let t=[];for(let i of m.Trees.getChildren(o))i instanceof y.TerminalNode&&(i.symbol.type===this.tokenType&&!this.invert||i.symbol.type!==this.tokenType&&this.invert)&&t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),Cn.XPathTokenElement=u,Cn}var On={},Of;function bx(){if(Of)return On;Of=1;/*!
|
|
466
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
467
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
468
|
-
*/var a=On&&On.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(On,"__esModule",{value:!0}),On.XPathWildcardAnywhereElement=void 0;const d=ce(),y=Nr(),m=Ia(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){return this.invert?[]:y.Trees.getDescendants(o)}};return a([d.Override],u.prototype,"evaluate",null),On.XPathWildcardAnywhereElement=u,On}var Dn={},Df;function Nx(){if(Df)return Dn;Df=1;/*!
|
|
469
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
470
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
471
|
-
*/var a=Dn&&Dn.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.XPathWildcardElement=void 0;const d=ce(),y=Nr(),m=Ia(),h=Wn();let u=class extends h.XPathElement{constructor(){super(m.XPath.WILDCARD)}evaluate(o){let t=[];if(this.invert)return t;for(let i of y.Trees.getChildren(o))t.push(i);return t}};return a([d.Override],u.prototype,"evaluate",null),Dn.XPathWildcardElement=u,Dn}var wf;function Ia(){if(wf)return _i;wf=1;/*!
|
|
472
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
473
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
474
|
-
*/Object.defineProperty(_i,"__esModule",{value:!0}),_i.XPath=void 0;const a=Pa(),d=Fa(),y=ao(),m=st(),h=Ie(),u=_x(),r=Ax(),o=vx(),t=Ex(),i=Sx(),e=Tx(),s=bx(),l=Nx();let c=class Ip{constructor(v,x){this.parser=v,this.path=x,this.elements=this.split(x)}split(v){let x=new u.XPathLexer(a.CharStreams.fromString(v));x.recover=N=>{throw N},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let g=new d.CommonTokenStream(x);try{g.fill()}catch(N){if(N instanceof y.LexerNoViableAltException){let P="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+v+"' -- "+N.message;throw new RangeError(P)}throw N}let _=g.getTokens(),A=[],E=_.length,D=0;e:for(;D<E;){let N=_[D],w;switch(N.type){case u.XPathLexer.ROOT:case u.XPathLexer.ANYWHERE:let P=N.type===u.XPathLexer.ANYWHERE;D++,w=_[D];let j=w.type===u.XPathLexer.BANG;j&&(D++,w=_[D]);let Y=this.getXPathElement(w,P);Y.invert=j,A.push(Y),D++;break;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.RULE_REF:case u.XPathLexer.WILDCARD:A.push(this.getXPathElement(N,!1)),D++;break;case h.Token.EOF:break e;default:throw new Error("Unknowth path element "+N)}}return A}getXPathElement(v,x){if(v.type===h.Token.EOF)throw new Error("Missing path element at end of path");let g=v.text;if(g==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(g),A=this.parser.getRuleIndex(g);switch(v.type){case u.XPathLexer.WILDCARD:return x?new s.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case u.XPathLexer.TOKEN_REF:case u.XPathLexer.STRING:if(_===h.Token.INVALID_TYPE)throw new Error(g+" at index "+v.startIndex+" isn't a valid token name");return x?new i.XPathTokenAnywhereElement(g,_):new e.XPathTokenElement(g,_);default:if(A===-1)throw new Error(g+" at index "+v.startIndex+" isn't a valid rule name");return x?new o.XPathRuleAnywhereElement(g,A):new t.XPathRuleElement(g,A)}}static findAll(v,x,g){return new Ip(g,x).evaluate(v)}evaluate(v){let x=new m.ParserRuleContext;x.addChild(v);let g=new Set([x]),_=0;for(;_<this.elements.length;){let A=new Set;for(let E of g)E.childCount>0&&this.elements[_].evaluate(E).forEach(A.add,A);_++,g=A}return g}};return _i.XPath=c,c.WILDCARD="*",c.NOT="!",_i}var Rf;function Cx(){if(Rf)return er;Rf=1;/*!
|
|
475
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
476
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
477
|
-
*/var a=er&&er.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=er&&er.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(er,"__esModule",{value:!0}),er.ParseTreePattern=void 0;const y=ce(),m=Ia();let h=class{constructor(r,o,t,i){this._matcher=r,this._patternRuleIndex=t,this._pattern=o,this._patternTree=i}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,o){let t=m.XPath.findAll(r,o,this._matcher.parser),i=[];for(let e of t){let s=this.match(e);s.succeeded&&i.push(s)}return i}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return a([y.NotNull],h.prototype,"_pattern",void 0),a([y.NotNull],h.prototype,"_patternTree",void 0),a([y.NotNull],h.prototype,"_matcher",void 0),a([y.NotNull,d(0,y.NotNull)],h.prototype,"match",null),a([d(0,y.NotNull)],h.prototype,"matches",null),a([y.NotNull,d(0,y.NotNull),d(1,y.NotNull)],h.prototype,"findAll",null),a([y.NotNull],h.prototype,"matcher",null),a([y.NotNull],h.prototype,"pattern",null),a([y.NotNull],h.prototype,"patternTree",null),h=a([d(0,y.NotNull),d(1,y.NotNull),d(3,y.NotNull)],h),er.ParseTreePattern=h,er}var tr={},Pf;function Ox(){if(Pf)return tr;Pf=1;/*!
|
|
478
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
479
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
480
|
-
*/var a=tr&&tr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=tr&&tr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.RuleTagToken=void 0;const y=ce(),m=Ie();let h=class{constructor(r,o,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=o,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return m.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return a([y.NotNull],h.prototype,"ruleName",null),a([y.Override],h.prototype,"channel",null),a([y.Override],h.prototype,"text",null),a([y.Override],h.prototype,"type",null),a([y.Override],h.prototype,"line",null),a([y.Override],h.prototype,"charPositionInLine",null),a([y.Override],h.prototype,"tokenIndex",null),a([y.Override],h.prototype,"startIndex",null),a([y.Override],h.prototype,"stopIndex",null),a([y.Override],h.prototype,"tokenSource",null),a([y.Override],h.prototype,"inputStream",null),a([y.Override],h.prototype,"toString",null),h=a([d(0,y.NotNull)],h),tr.RuleTagToken=h,tr}var wn={},vi={},Ff;function Lp(){if(Ff)return vi;Ff=1;/*!
|
|
481
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
482
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
483
|
-
*/Object.defineProperty(vi,"__esModule",{value:!0}),vi.Chunk=void 0;let a=class{};return vi.Chunk=a,vi}var If;function Dx(){if(If)return wn;If=1;/*!
|
|
484
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
485
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
486
|
-
*/var a=wn&&wn.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i};Object.defineProperty(wn,"__esModule",{value:!0}),wn.TagChunk=void 0;const d=Lp(),y=ce();let m=class extends d.Chunk{constructor(u,r){if(super(),u==null||u.length===0)throw new Error("tag cannot be null or empty");this._tag=u,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return a([y.NotNull],m.prototype,"tag",null),a([y.Override],m.prototype,"toString",null),wn.TagChunk=m,wn}var rr={},Lf;function wx(){if(Lf)return rr;Lf=1;/*!
|
|
487
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
488
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
489
|
-
*/var a=rr&&rr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=rr&&rr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.TextChunk=void 0;const y=Lp(),m=ce();let h=class extends y.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return a([m.NotNull],h.prototype,"_text",void 0),a([m.NotNull],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),rr.TextChunk=h,rr}var nr={},Bf;function Rx(){if(Bf)return nr;Bf=1;/*!
|
|
490
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
491
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
492
|
-
*/var a=nr&&nr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=nr&&nr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.TokenTagToken=void 0;const y=ki(),m=ce();let h=class extends y.CommonToken{constructor(r,o,t){super(o),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return a([m.NotNull],h.prototype,"_tokenName",void 0),a([m.NotNull],h.prototype,"tokenName",null),a([m.Override],h.prototype,"text",null),a([m.Override],h.prototype,"toString",null),h=a([d(0,m.NotNull)],h),nr.TokenTagToken=h,nr}var kf;function Px(){return kf||(kf=1,function(a){/*!
|
|
493
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
494
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
495
|
-
*/var d=gn&&gn.__decorate||function(w,P,j,Y){var L=arguments.length,M=L<3?P:Y===null?Y=Object.getOwnPropertyDescriptor(P,j):Y,W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,P,j,Y);else for(var Z=w.length-1;Z>=0;Z--)(W=w[Z])&&(M=(L<3?W(M):L>3?W(P,j,M):W(P,j))||M);return L>3&&M&&Object.defineProperty(P,j,M),M},y=gn&&gn.__param||function(w,P){return function(j,Y){P(j,Y,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ParseTreePatternMatcher=void 0;const m=Np(),h=Pa(),u=Fa(),r=Rp(),o=yx(),t=ce(),i=bp(),e=Fp(),s=st(),l=gx(),c=Cx(),p=Sr(),v=Pi(),x=Ox(),g=Dx(),_=_r(),A=wx(),E=Ie(),D=Rx();let N=class pa{constructor(P,j){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=P,this._parser=j}setDelimiters(P,j,Y){if(!P)throw new Error("start cannot be null or empty");if(!j)throw new Error("stop cannot be null or empty");this.start=P,this.stop=j,this.escape=Y,this.escapeRE=new RegExp(Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(P,j,Y=0){if(typeof j=="string"){let L=this.compile(j,Y);return this.matches(P,L)}else{let L=new o.MultiMap;return!this.matchImpl(P,j.patternTree,L)}}match(P,j,Y=0){if(typeof j=="string"){let L=this.compile(j,Y);return this.match(P,L)}else{let L=new o.MultiMap,M=this.matchImpl(P,j.patternTree,L);return new l.ParseTreeMatch(P,j,L,M)}}compile(P,j){let Y=this.tokenize(P),L=new r.ListTokenSource(Y),M=new u.CommonTokenStream(L);const W=this._parser;let Z=new e.ParserInterpreter(W.grammarFileName,W.vocabulary,W.ruleNames,W.getATNWithBypassAlts(),M),I;try{Z.errorHandler=new m.BailErrorStrategy,I=Z.parse(j)}catch(Q){throw Q instanceof i.ParseCancellationException?Q.getCause():Q instanceof p.RecognitionException?Q:Q instanceof Error?new pa.CannotInvokeStartRule(Q):Q}if(M.LA(1)!==E.Token.EOF)throw new pa.StartRuleDoesNotConsumeFullPattern;return new c.ParseTreePattern(this,P,j,I)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(P,j,Y){if(!P)throw new TypeError("tree cannot be null");if(!j)throw new TypeError("patternTree cannot be null");if(P instanceof _.TerminalNode&&j instanceof _.TerminalNode){let L;if(P.symbol.type===j.symbol.type)if(j.symbol instanceof D.TokenTagToken){let M=j.symbol;Y.map(M.tokenName,P);const W=M.label;W&&Y.map(W,P)}else P.text===j.text||L||(L=P);else L||(L=P);return L}if(P instanceof s.ParserRuleContext&&j instanceof s.ParserRuleContext){let L,M=this.getRuleTagToken(j);if(M){if(P.ruleContext.ruleIndex===j.ruleContext.ruleIndex){Y.map(M.ruleName,P);const Z=M.label;Z&&Y.map(Z,P)}else L||(L=P);return L}if(P.childCount!==j.childCount)return L||(L=P),L;let W=P.childCount;for(let Z=0;Z<W;Z++){let I=this.matchImpl(P.getChild(Z),j.getChild(Z),Y);if(I)return I}return L}return P}getRuleTagToken(P){if(P instanceof v.RuleNode&&P.childCount===1&&P.getChild(0)instanceof _.TerminalNode){let j=P.getChild(0);if(j.symbol instanceof x.RuleTagToken)return j.symbol}}tokenize(P){let j=this.split(P),Y=[];for(let L of j)if(L instanceof g.TagChunk){let M=L;const W=M.tag.substr(0,1);if(W===W.toUpperCase()){let Z=this._parser.getTokenType(M.tag);if(Z===E.Token.INVALID_TYPE)throw new Error("Unknown token "+M.tag+" in pattern: "+P);let I=new D.TokenTagToken(M.tag,Z,M.label);Y.push(I)}else if(W===W.toLowerCase()){let Z=this._parser.getRuleIndex(M.tag);if(Z===-1)throw new Error("Unknown rule "+M.tag+" in pattern: "+P);let I=this._parser.getATNWithBypassAlts().ruleToTokenType[Z];Y.push(new x.RuleTagToken(M.tag,I,M.label))}else throw new Error("invalid tag: "+M.tag+" in pattern: "+P)}else{let M=L;this._lexer.inputStream=h.CharStreams.fromString(M.text);let W=this._lexer.nextToken();for(;W.type!==E.Token.EOF;)Y.push(W),W=this._lexer.nextToken()}return Y}split(P){let j=0,Y=P.length,L=[],M=[],W=[];for(;j<Y;)j===P.indexOf(this.escape+this.start,j)?j+=this.escape.length+this.start.length:j===P.indexOf(this.escape+this.stop,j)?j+=this.escape.length+this.stop.length:j===P.indexOf(this.start,j)?(M.push(j),j+=this.start.length):j===P.indexOf(this.stop,j)?(W.push(j),j+=this.stop.length):j++;if(M.length>W.length)throw new Error("unterminated tag in pattern: "+P);if(M.length<W.length)throw new Error("missing start tag in pattern: "+P);let Z=M.length;for(let I=0;I<Z;I++)if(M[I]>=W[I])throw new Error("tag delimiters out of order in pattern: "+P);if(Z===0){let I=P.substring(0,Y);L.push(new A.TextChunk(I))}if(Z>0&&M[0]>0){let I=P.substring(0,M[0]);L.push(new A.TextChunk(I))}for(let I=0;I<Z;I++){let Q=P.substring(M[I]+this.start.length,W[I]),re=Q,fe,ie=Q.indexOf(":");if(ie>=0&&(fe=Q.substring(0,ie),re=Q.substring(ie+1,Q.length)),L.push(new g.TagChunk(re,fe)),I+1<Z){let J=P.substring(W[I]+this.stop.length,M[I+1]);L.push(new A.TextChunk(J))}}if(Z>0){let I=W[Z-1]+this.stop.length;if(I<Y){let Q=P.substring(I,Y);L.push(new A.TextChunk(Q))}}for(let I=0;I<L.length;I++){let Q=L[I];if(Q instanceof A.TextChunk){let re=Q.text.replace(this.escapeRE,"");re.length<Q.text.length&&(L[I]=new A.TextChunk(re))}}return L}};d([t.NotNull,y(1,t.NotNull)],N.prototype,"match",null),d([t.NotNull],N.prototype,"lexer",null),d([t.NotNull],N.prototype,"parser",null),d([y(0,t.NotNull),y(1,t.NotNull),y(2,t.NotNull)],N.prototype,"matchImpl",null),a.ParseTreePatternMatcher=N,function(w){class P extends Error{constructor(L){super(`CannotInvokeStartRule: ${L}`),this.error=L}}w.CannotInvokeStartRule=P;class j extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}w.StartRuleDoesNotConsumeFullPattern=j}(N=a.ParseTreePatternMatcher||(a.ParseTreePatternMatcher={}))}(gn)),gn}var ir={},sr={},ar={},Mf;function ji(){if(Mf)return ar;Mf=1;/*!
|
|
496
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
497
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
498
|
-
*/var a=ar&&ar.__decorate||function(h,u,r,o){var t=arguments.length,i=t<3?u:o===null?o=Object.getOwnPropertyDescriptor(u,r):o,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(h,u,r,o);else for(var s=h.length-1;s>=0;s--)(e=h[s])&&(i=(t<3?e(i):t>3?e(u,r,i):e(u,r))||i);return t>3&&i&&Object.defineProperty(u,r,i),i},d=ar&&ar.__param||function(h,u){return function(r,o){u(r,o,h)}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.DecisionEventInfo=void 0;const y=ce();let m=class{constructor(u,r,o,t,i,e){this.decision=u,this.fullCtx=e,this.stopIndex=i,this.input=o,this.startIndex=t,this.state=r}};return a([y.NotNull],m.prototype,"input",void 0),m=a([d(2,y.NotNull)],m),ar.DecisionEventInfo=m,ar}var qf;function Fx(){if(qf)return sr;qf=1;/*!
|
|
499
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
500
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
501
|
-
*/var a=sr&&sr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=sr&&sr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.AmbiguityInfo=void 0;const y=ji(),m=ce();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s){super(r,o,i,e,s,o.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return a([m.NotNull],h.prototype,"ambigAlts",void 0),a([m.NotNull],h.prototype,"ambiguousAlternatives",null),h=a([d(1,m.NotNull),d(2,m.NotNull),d(3,m.NotNull)],h),sr.AmbiguityInfo=h,sr}var ur={},jf;function Ix(){if(jf)return ur;jf=1;/*!
|
|
502
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
503
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
504
|
-
*/var a=ur&&ur.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=ur&&ur.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.ContextSensitivityInfo=void 0;const y=ji(),m=ce();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,!0)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),ur.ContextSensitivityInfo=h,ur}var Rn={},$f;function Lx(){if($f)return Rn;$f=1;/*!
|
|
505
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
506
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
507
|
-
*/var a=Rn&&Rn.__decorate||function(m,h,u,r){var o=arguments.length,t=o<3?h:r===null?r=Object.getOwnPropertyDescriptor(h,u):r,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(m,h,u,r);else for(var e=m.length-1;e>=0;e--)(i=m[e])&&(t=(o<3?i(t):o>3?i(h,u,t):i(h,u))||t);return o>3&&t&&Object.defineProperty(h,u,t),t};Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.DecisionInfo=void 0;const d=ce();let y=class{constructor(h){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=h}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return a([d.Override],y.prototype,"toString",null),Rn.DecisionInfo=y,Rn}var lr={},Uf;function Bx(){if(Uf)return lr;Uf=1;/*!
|
|
508
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
509
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
510
|
-
*/var a=lr&&lr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=lr&&lr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(lr,"__esModule",{value:!0}),lr.ErrorInfo=void 0;const y=ji(),m=ce();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e){super(r,o,t,i,e,o.useContext)}};return h=a([d(1,m.NotNull),d(2,m.NotNull)],h),lr.ErrorInfo=h,lr}var cr={},Vf;function kx(){if(Vf)return cr;Vf=1;/*!
|
|
511
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
512
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
513
|
-
*/var a=cr&&cr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=cr&&cr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.LookaheadEventInfo=void 0;const y=ji(),m=ce();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l){super(r,o,i,e,s,l),this.predictedAlt=t}};return h=a([d(3,m.NotNull)],h),cr.LookaheadEventInfo=h,cr}var fr={},zf;function Mx(){if(zf)return fr;zf=1;/*!
|
|
514
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
515
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
516
|
-
*/var a=fr&&fr.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e},d=fr&&fr.__param||function(u,r){return function(o,t){r(o,t,u)}};Object.defineProperty(fr,"__esModule",{value:!0}),fr.PredicateEvalInfo=void 0;const y=ji(),m=ce();let h=class extends y.DecisionEventInfo{constructor(r,o,t,i,e,s,l,c){super(o,r,t,i,e,r.useContext),this.semctx=s,this.evalResult=l,this.predictedAlt=c}};return h=a([d(0,m.NotNull),d(2,m.NotNull),d(5,m.NotNull)],h),fr.PredicateEvalInfo=h,fr}var Hf;function Gf(){if(Hf)return ir;Hf=1;/*!
|
|
517
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
518
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
519
|
-
*/var a=ir&&ir.__decorate||function(v,x,g,_){var A=arguments.length,E=A<3?x:_===null?_=Object.getOwnPropertyDescriptor(x,g):_,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(v,x,g,_);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(E=(A<3?D(E):A>3?D(x,g,E):D(x,g))||E);return A>3&&E&&Object.defineProperty(x,g,E),E},d=ir&&ir.__param||function(v,x){return function(g,_){x(g,_,v)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.ProfilingATNSimulator=void 0;const y=Fx(),m=lt(),h=so(),u=Ix(),r=Lx(),o=Bx(),t=ce(),i=kx(),e=qi(),s=Mx(),l=Yn(),c=vp();let p=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let g=0;g<this.numDecisions;g++)this.decisions.push(new r.DecisionInfo(g))}adaptivePredict(x,g,_,A){if(A!==void 0)return super.adaptivePredict(x,g,_,A);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=g,this.currentState=void 0,this.conflictingAltResolvedBySLL=m.ATN.INVALID_ALT_NUMBER;let E=process.hrtime(),D=super.adaptivePredict(x,g,_),N=process.hrtime(),w=(N[0]-E[0])*1e9;w===0?w=N[1]-E[1]:w+=1e9-E[1]+N[1],this.decisions[g].timeInPrediction+=w,this.decisions[g].invocations++;let P=this._sllStopIndex-this._startIndex+1;if(this.decisions[g].SLL_TotalLook+=P,this.decisions[g].SLL_MinLook=this.decisions[g].SLL_MinLook===0?P:Math.min(this.decisions[g].SLL_MinLook,P),P>this.decisions[g].SLL_MaxLook&&(this.decisions[g].SLL_MaxLook=P,this.decisions[g].SLL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,D,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let j=this._llStopIndex-this._startIndex+1;this.decisions[g].LL_TotalLook+=j,this.decisions[g].LL_MinLook=this.decisions[g].LL_MinLook===0?j:Math.min(this.decisions[g].LL_MinLook,j),j>this.decisions[g].LL_MaxLook&&(this.decisions[g].LL_MaxLook=j,this.decisions[g].LL_MaxLookEvent=new i.LookaheadEventInfo(g,void 0,D,x,this._startIndex,this._llStopIndex,!0))}return D}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,g,_,A){let E=super.getStartState(x,g,_,A);return this.currentState=E,E}computeStartState(x,g,_){let A=super.computeStartState(x,g,_);return this.currentState=A,A}computeReachSet(x,g,_,A){if(this._input===void 0)throw new Error("Invalid state");let E=super.computeReachSet(x,g,_,A);return E==null&&this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,g,this._input,this._startIndex,this._input.index)),this.currentState=E,E}getExistingTargetState(x,g){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let _=super.getExistingTargetState(x,g);if(_!=null&&(this.currentState=new c.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===h.ATNSimulator.ERROR)){let A=new c.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new o.ErrorInfo(this.currentDecision,A,this._input,this._startIndex,this._input.index))}return _}computeTargetState(x,g,_,A,E,D){let N=super.computeTargetState(x,g,_,A,E,D);return E?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,N}evalSemanticContextImpl(x,g,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let A=super.evalSemanticContextImpl(x,g,_);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let D=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new s.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,D,x,A,_))}return A}reportContextSensitivity(x,g,_,A,E){if(this._input===void 0)throw new Error("Invalid state");g!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,_,this._input,A,E)),super.reportContextSensitivity(x,g,_,A,E)}reportAttemptingFullContext(x,g,_,A,E){g!=null?this.conflictingAltResolvedBySLL=g.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,g,_,A,E)}reportAmbiguity(x,g,_,A,E,D,N){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let w;D!=null?w=D.nextSetBit(0):w=N.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==m.ATN.INVALID_ALT_NUMBER&&w!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new u.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,A)),this.decisions[this.currentDecision].ambiguities.push(new y.AmbiguityInfo(this.currentDecision,this.currentState,D,this._input,_,A)),super.reportAmbiguity(x,g,_,A,E,D,N)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return a([t.Override,d(0,t.NotNull)],p.prototype,"adaptivePredict",null),a([t.Override],p.prototype,"getStartState",null),a([t.Override],p.prototype,"computeStartState",null),a([t.Override],p.prototype,"computeReachSet",null),a([t.Override],p.prototype,"getExistingTargetState",null),a([t.Override],p.prototype,"computeTargetState",null),a([t.Override],p.prototype,"evalSemanticContextImpl",null),a([t.Override],p.prototype,"reportContextSensitivity",null),a([t.Override],p.prototype,"reportAttemptingFullContext",null),a([t.Override,d(0,t.NotNull),d(5,t.NotNull),d(6,t.NotNull)],p.prototype,"reportAmbiguity",null),ir.ProfilingATNSimulator=p,ir}var Yf;function $i(){if(Yf)return Je;Yf=1;/*!
|
|
520
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
521
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
522
|
-
*/var a=Je&&Je.__decorate||function(A,E,D,N){var w=arguments.length,P=w<3?E:N===null?N=Object.getOwnPropertyDescriptor(E,D):N,j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(A,E,D,N);else for(var Y=A.length-1;Y>=0;Y--)(j=A[Y])&&(P=(w<3?j(P):w>3?j(E,D,P):j(E,D))||P);return w>3&&P&&Object.defineProperty(E,D,P),P},d=Je&&Je.__param||function(A,E){return function(D,N){E(D,N,A)}},y=Je&&Je.__awaiter||function(A,E,D,N){function w(P){return P instanceof D?P:new D(function(j){j(P)})}return new(D||(D=Promise))(function(P,j){function Y(W){try{M(N.next(W))}catch(Z){j(Z)}}function L(W){try{M(N.throw(W))}catch(Z){j(Z)}}function M(W){W.done?P(W.value):w(W.value).then(Y,L)}M((N=N.apply(A,E||[])).next())})};Object.defineProperty(Je,"__esModule",{value:!0}),Je.Parser=void 0;const m=ut(),h=lp(),u=fo(),r=Ra(),o=Ri(),t=tp(),i=Tr(),e=ce(),s=dx(),l=qi(),c=Tp(),p=Bi(),v=_r(),x=Ie();class g{constructor(E,D){this.ruleNames=E,this.tokenStream=D}enterEveryRule(E){console.log("enter "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(E){console.log("exit "+this.ruleNames[E.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(E){}visitTerminal(E){let D=E.parent.ruleContext,N=E.symbol;console.log("consume "+N+" rule "+this.ruleNames[D.ruleIndex])}}a([e.Override],g.prototype,"enterEveryRule",null),a([e.Override],g.prototype,"exitEveryRule",null),a([e.Override],g.prototype,"visitErrorNode",null),a([e.Override],g.prototype,"visitTerminal",null);let _=class Xi extends p.Recognizer{constructor(E){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=E}reset(E){(E===void 0||E)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let D=this.interpreter;D?.reset()}match(E){let D=this.currentToken;return D.type===E?(E===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(D=this._errHandler.recoverInline(this),this._buildParseTrees&&D.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,D))),D}matchWildcard(){let E=this.currentToken;return E.type>0?(this._errHandler.reportMatch(this),this.consume()):(E=this._errHandler.recoverInline(this),this._buildParseTrees&&E.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,E))),E}set buildParseTree(E){this._buildParseTrees=E}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(E){if(E==null)throw new TypeError("listener cannot be null");this._parseListeners.push(E)}removeParseListener(E){let D=this._parseListeners.findIndex(N=>N===E);D!==-1&&this._parseListeners.splice(D,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let E of this._parseListeners)E.enterEveryRule&&E.enterEveryRule(this._ctx),this._ctx.enterRule(E)}triggerExitRuleEvent(){for(let E=this._parseListeners.length-1;E>=0;E--){let D=this._parseListeners[E];this._ctx.exitRule(D),D.exitEveryRule&&D.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let E=this.serializedATN;if(E==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let D=Xi.bypassAltsAtnCache.get(E);if(D==null){let N=new h.ATNDeserializationOptions;N.isGenerateRuleBypassTransitions=!0,D=new u.ATNDeserializer(N).deserialize(m.toCharArray(E)),Xi.bypassAltsAtnCache.set(E,D)}return D}compileParseTreePattern(E,D,N){return y(this,void 0,void 0,function*(){if(!N){if(this.inputStream){let Y=this.inputStream.tokenSource;Y instanceof i.Lexer&&(N=Y)}if(!N)throw new Error("Parser can't discover a lexer to use")}let w=N,P=yield Promise.resolve().then(()=>Px());return new P.ParseTreePatternMatcher(w,this).compile(E,D)})}get errorHandler(){return this._errHandler}set errorHandler(E){this._errHandler=E}get inputStream(){return this._input}set inputStream(E){this.reset(!1),this._input=E}get currentToken(){return this._input.LT(1)}notifyErrorListeners(E,D,N){D===void 0?D=this.currentToken:D===null&&(D=void 0),this._syntaxErrors++;let w=-1,P=-1;D!=null&&(w=D.line,P=D.charPositionInLine);let j=this.getErrorListenerDispatch();j.syntaxError&&j.syntaxError(this,D,w,P,E,N)}consume(){let E=this.currentToken;E.type!==Xi.EOF&&this.inputStream.consume();let D=this._parseListeners.length!==0;if(this._buildParseTrees||D)if(this._errHandler.inErrorRecoveryMode(this)){let N=this._ctx.addErrorNode(this.createErrorNode(this._ctx,E));if(D)for(let w of this._parseListeners)w.visitErrorNode&&w.visitErrorNode(N)}else{let N=this.createTerminalNode(this._ctx,E);if(this._ctx.addChild(N),D)for(let w of this._parseListeners)w.visitTerminal&&w.visitTerminal(N)}return E}createTerminalNode(E,D){return new v.TerminalNode(D)}createErrorNode(E,D){return new o.ErrorNode(D)}addContextToParseTree(){let E=this._ctx._parent;E?.addChild(this._ctx)}enterRule(E,D,N){this.state=D,this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(E,D,N){if(this.state=D,this._buildParseTrees){let w=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),w._parent=E,E.addChild(w)}this._ctx=E,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(E,D){if(E.altNumber=D,this._buildParseTrees&&this._ctx!==E){let N=this._ctx._parent;N!=null&&(N.removeLastChild(),N.addChild(E))}this._ctx=E}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(E,D,N,w){this.state=D,this._precedenceStack.push(w),this._ctx=E,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(E,D,N){let w=this._ctx;w._parent=E,w.invokingState=D,w._stop=this._input.tryLT(-1),this._ctx=E,this._ctx._start=w._start,this._buildParseTrees&&this._ctx.addChild(w),this.triggerEnterRuleEvent()}unrollRecursionContexts(E){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let D=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==E;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=E;D._parent=E,this._buildParseTrees&&E!=null&&E.addChild(D)}getInvokingContext(E){let D=this._ctx;for(;D&&D.ruleIndex!==E;)D=D._parent;return D}get context(){return this._ctx}set context(E){this._ctx=E}precpred(E,D){return D>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new c.ProxyParserErrorListener(this.getErrorListeners())}inContext(E){return!1}isExpectedToken(E){let D=this.interpreter.atn,N=this._ctx,w=D.states[this.state],P=D.nextTokens(w);if(P.contains(E))return!0;if(!P.contains(x.Token.EPSILON))return!1;for(;N!=null&&N.invokingState>=0&&P.contains(x.Token.EPSILON);){let Y=D.states[N.invokingState].transition(0);if(P=D.nextTokens(Y.followState),P.contains(E))return!0;N=N._parent}return!!(P.contains(x.Token.EPSILON)&&E===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let E=this.interpreter.atn,D=E.states[this.state];return E.nextTokens(D)}getRuleIndex(E){let D=this.getRuleIndexMap().get(E);return D??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(E=this._ctx){let D=E,N=this.ruleNames,w=[];for(;D!=null;){let P=D.ruleIndex;P<0?w.push("n/a"):w.push(N[P]),D=D._parent}return w}getDFAStrings(){let E=[];for(let D of this._interp.atn.decisionToDFA)E.push(D.toString(this.vocabulary,this.ruleNames));return E}dumpDFA(){let E=!1;for(let D of this._interp.atn.decisionToDFA)D.isEmpty||(E&&console.log(),console.log("Decision "+D.decision+":"),process.stdout.write(D.toString(this.vocabulary,this.ruleNames)),E=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>Gf()).then(E=>{let D=this.interpreter;if(D instanceof E.ProfilingATNSimulator)return new s.ParseInfo(D)})}setProfile(E){return y(this,void 0,void 0,function*(){let D=yield Promise.resolve().then(()=>Gf()),N=this.interpreter;E?N instanceof D.ProfilingATNSimulator||(this.interpreter=new D.ProfilingATNSimulator(this)):N instanceof D.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(N.getPredictionMode())})}set isTrace(E){E?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new g(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return _.bypassAltsAtnCache=new Map,a([e.NotNull],_.prototype,"_errHandler",void 0),a([e.NotNull],_.prototype,"match",null),a([e.NotNull],_.prototype,"matchWildcard",null),a([e.NotNull],_.prototype,"getParseListeners",null),a([d(0,e.NotNull)],_.prototype,"addParseListener",null),a([e.NotNull],_.prototype,"getATNWithBypassAlts",null),a([e.NotNull,d(0,e.NotNull)],_.prototype,"errorHandler",null),a([e.Override],_.prototype,"inputStream",null),a([e.NotNull],_.prototype,"currentToken",null),a([d(0,e.NotNull)],_.prototype,"enterRule",null),a([e.Override,d(0,e.Nullable)],_.prototype,"precpred",null),a([e.Override],_.prototype,"getErrorListenerDispatch",null),a([e.NotNull],_.prototype,"getExpectedTokens",null),a([e.NotNull],_.prototype,"getExpectedTokensWithinCurrentRule",null),a([e.Override],_.prototype,"parseInfo",null),Je.Parser=_,Je}var Wf;function Nr(){if(Wf)return pt;Wf=1;/*!
|
|
523
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
524
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
525
|
-
*/var a=pt&&pt.__decorate||function(c,p,v,x){var g=arguments.length,_=g<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,v):x,A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(c,p,v,x);else for(var E=c.length-1;E>=0;E--)(A=c[E])&&(_=(g<3?A(_):g>3?A(p,v,_):A(p,v))||_);return g>3&&_&&Object.defineProperty(p,v,_),_},d=pt&&pt.__param||function(c,p){return function(v,x){p(v,x,c)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.Trees=void 0;const y=lt(),m=ki(),h=Ri(),u=ce(),r=$i(),o=st(),t=Pi(),i=_r(),e=Ie(),s=ut();let l=class yr{static toStringTree(p,v){let x;v instanceof r.Parser?x=v.ruleNames:x=v;let g=s.escapeWhitespace(this.getNodeText(p,x),!1);if(p.childCount===0)return g;let _="";_+="(",g=s.escapeWhitespace(this.getNodeText(p,x),!1),_+=g,_+=" ";for(let A=0;A<p.childCount;A++)A>0&&(_+=" "),_+=this.toStringTree(p.getChild(A),x);return _+=")",_}static getNodeText(p,v){let x;if(v instanceof r.Parser)x=v.ruleNames;else if(v)x=v;else{let g=p.payload;return typeof g.text=="string"?g.text:p.payload.toString()}if(p instanceof t.RuleNode){let g=p.ruleContext,_=g.ruleIndex,A=x[_],E=g.altNumber;return E!==y.ATN.INVALID_ALT_NUMBER?A+":"+E:A}else{if(p instanceof h.ErrorNode)return p.toString();if(p instanceof i.TerminalNode)return p.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(p){let v=[];for(let x=0;x<p.childCount;x++)v.push(p.getChild(x));return v}static getAncestors(p){let v=[],x=p.parent;for(;x;)v.unshift(x),x=x.parent;return v}static isAncestorOf(p,v){if(!p||!v||!p.parent)return!1;let x=v.parent;for(;x;){if(p===x)return!0;x=x.parent}return!1}static findAllTokenNodes(p,v){return yr.findAllNodes(p,v,!0)}static findAllRuleNodes(p,v){return yr.findAllNodes(p,v,!1)}static findAllNodes(p,v,x){let g=[];return yr._findAllNodes(p,v,x,g),g}static _findAllNodes(p,v,x,g){x&&p instanceof i.TerminalNode?p.symbol.type===v&&g.push(p):!x&&p instanceof o.ParserRuleContext&&p.ruleIndex===v&&g.push(p);for(let _=0;_<p.childCount;_++)yr._findAllNodes(p.getChild(_),v,x,g)}static getDescendants(p){let v=[];function x(g){v.push(g);const _=g.childCount;for(let A=0;A<_;A++)x(g.getChild(A))}return x(p),v}static getRootOfSubtreeEnclosingRegion(p,v,x){let g=p.childCount;for(let _=0;_<g;_++){let A=p.getChild(_),E=yr.getRootOfSubtreeEnclosingRegion(A,v,x);if(E)return E}if(p instanceof o.ParserRuleContext){let _=p.stop;if(v>=p.start.tokenIndex&&(_==null||x<=_.tokenIndex))return p}}static stripChildrenOutOfRange(p,v,x,g){if(!p)return;let _=p.childCount;for(let A=0;A<_;A++){let E=p.getChild(A),D=E.sourceInterval;if(E instanceof o.ParserRuleContext&&(D.b<x||D.a>g)&&yr.isAncestorOf(E,v)){let N=new m.CommonToken(e.Token.INVALID_TYPE,"...");p.children[A]=new i.TerminalNode(N)}}}static findNodeSuchThat(p,v){if(v(p))return p;let x=p.childCount;for(let g=0;g<x;g++){let _=yr.findNodeSuchThat(p.getChild(g),v);if(_!==void 0)return _}}};return a([d(0,u.NotNull)],l,"toStringTree",null),a([u.NotNull,d(0,u.NotNull)],l,"getAncestors",null),a([d(0,u.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),pt.Trees=l,pt}var Qf;function qx(){return Qf||(Qf=1,function(a){/*!
|
|
526
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
527
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
528
|
-
*/var d=wr&&wr.__createBinding||(Object.create?function(m,h,u,r){r===void 0&&(r=u),Object.defineProperty(m,r,{enumerable:!0,get:function(){return h[u]}})}:function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]}),y=wr&&wr.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(Hp(),a),y(Ri(),a),y(Gp(),a),y(Yp(),a),y(Wp(),a),y(Qp(),a),y(Xp(),a),y(Pi(),a),y(Kp(),a),y(_r(),a),y(Jp(),a),y(Nr(),a)}(wr)),wr}var Ze={},Xf;function jx(){if(Xf)return Ze;Xf=1;var a=Ze&&Ze.__createBinding||(Object.create?function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}:function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]}),d=Ze&&Ze.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),y=Ze&&Ze.__importStar||function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&a(s,e,l[c]);return d(s,e),s}}();Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.MalloyTagLexer=void 0;const m=fo(),h=Tr(),u=uo(),r=Er(),o=y(ut());let t=class it extends h.Lexer{get vocabulary(){return it.VOCABULARY}constructor(e){super(e),this._interp=new u.LexerATNSimulator(it._ATN,this)}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return it.ruleNames}get serializedATN(){return it._serializedATN}get channelNames(){return it.channelNames}get modeNames(){return it.modeNames}static get _ATN(){return it.__ATN||(it.__ATN=new m.ATNDeserializer().deserialize(o.toCharArray(it._serializedATN))),it.__ATN}};return Ze.MalloyTagLexer=t,t.MINUS_DOTTY=1,t.DOTTY=2,t.DOT=3,t.MINUS=4,t.EQ=5,t.RF_BEG=6,t.RF_END=7,t.PR_BEG=8,t.PR_END=9,t.AR_BEG=10,t.COMMA=11,t.AR_END=12,t.SQ_STRING=13,t.DQ_STRING=14,t.BQ_STRING=15,t.NUMERIC_LITERAL=16,t.BARE_STRING=17,t.COMMENT=18,t.WHITE_SPACE=19,t.UNEXPECTED_CHAR=20,t.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],t.modeNames=["DEFAULT_MODE"],t.ruleNames=["MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","ID_CHAR","DIGIT","HEX","UNICODE","SAFE_NON_QUOTE","ESCAPED","SQ_STRING","DQ_STRING","BQ_STRING","INTEGER_LITERAL","EXPONENT","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],t._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],t.VOCABULARY=new r.VocabularyImpl(t._LITERAL_NAMES,t._SYMBOLIC_NAMES,[]),t._serializedATN=`줝쪺֍꾺体؇쉁Í\b \x07 \x07\b \b
|
|
529
|
-
|
|
530
|
-
\v \v\f \f\r \r \x1B \x1B \x07\x07\x07\b\b
|
|
531
|
-
|
|
532
|
-
\v\v\f\f\r\r\x07r
|
|
533
|
-
\fu\v\x07~
|
|
534
|
-
\f\v\x07
|
|
535
|
-
\f\v
|
|
536
|
-
|
|
537
|
-
\r
|
|
538
|
-
|
|
539
|
-
\r£
|
|
540
|
-
§
|
|
541
|
-
\r¨¬
|
|
542
|
-
°
|
|
543
|
-
²
|
|
544
|
-
¶
|
|
545
|
-
\r·\x1B\x1B\x07\x1B¼
|
|
546
|
-
\x1B\f\x1B\x1B¿\v\x1B\x1B\x1B\x1B\x1BÆ
|
|
547
|
-
\rǽ\x07 \v\x07\r\b
|
|
548
|
-
\v\f\r\x1B!#%')+-/13579\v2;2;CHch\x07!$$))^^bb$$bb))bb$$))GGgg--//\v\r""ʇC\\aac|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰͇͇ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։ֲֿׁׁ׃ׄ׆ׇגײ״ؒآٙٛ١ٰەۗ۞ۣ۪ۯ۱ۼ۾܁܁ܒ݁ݏߌ߬߶߷ࠂ࠙ࠜࡂ࡚ࢢࢶࢸࢿࣲࣖ࣡ࣥ࣫ऽिॎॐ॒ॗ॥ॳঅইকপবলসি্ৎয়ৡ৲৳ਃਅਇਕਪਬਲਵਸੀ੍ਜ਼ਫ਼ੲઃઅઇએઑઓકપબલવષિેૉો્ૢૻૻଃଅଇକପବଲଵଷି୍ୟୡ୳୳அஇஐஒஔஜஞஞபரீைொௌంఅఇఎఐఒఔపబిెైొౌౘౚౢಂಅಇಎಐಒಔಪಬವಷಿೆೈೊೌೠೠೢೳഃഅഇഎഐഒഔ഼ിെൈൊൌൎൖ൙ൡർඁඅඇගඳඵලෂෑූෘෘේ෴ฃโ่๏๏ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່ໞ༂༂གཉཋཱིྃྊྙྛ྾ဂး််ွ၁ၒၤၧၪၰႈ႐႐႞႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፡፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐ᜕ᜢ᜵ᝂᝢᝮᝰᝲគ឵ី៊៙៙ᠢᢂᢲᤂᤠᤢᤲ᤺ᥒᥲᦂᦲᨂᨢ᩠ᩣ᩶᪩᪩ᬂᬵᬷᭅᭇᮂ᮫ᮮ᮱ᮼᯧᯩ᯳ᰂ᰷ᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳵ᳷᳸ᴂ᷁ᷩ᷶ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊Ⓒ⓫ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꙶ꙽ꚁ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎ꠩ꡂ꡵ꢂꣅꣴ꣹ꣽꣽꣿꣿꤌ꤬ꤲꥢꦂꦴꦶ꧁꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꩂꩢ꩸ꩼꩼꪀꫀꫂꫂꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͼΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂဂ၇ႄႺგცᄂᄴᅒᅴᅸᅸᆂᇁᇃᇆᇜᇜᇞᇞሂሓሕሶሹሹቀቀኂኈኊኊኌኑኟኡኪኲዪጂጅጇጎጒጕጪጬጲጴጵጷጻጿፆፉፊፍፎፒፒፙፙ፟፥ᐂᑃᑅᑇᑉᑌᒂᓃᓆᓇᓉᓉᖂᖷᖺᗀᗚᗟᘂᙀᙂᙂᙆᙆᚂᚷᜂᜟᜬᢢᣡᤁᤁ᫂ᰂᰊᰌ᱀᱂᱂ᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欸歂歅步歹歿殑漂潆潒澀澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛베베퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟Ý\x07 \v\r')+13579;@\x07D F\vH\rJMOQSUW\x1BY[]!_#g%i'l)x+-/1±3µ5¹7Å9Ë;<\x07/<=\x070=>\x070>?\x070?@A\x070AB\x070BC\x070CDE\x070E\bFG\x07/G
|
|
549
|
-
HI\x07?I\fJK\x07&KL\x07*LMN\x07+NOP\x07}PQR\x07RST\x07]TUV\x07.VWX\x07_XYZ \vZ[\\ \\]^ ^ _\`\x07^\`a\x07wabbccddeeff"gh
|
|
550
|
-
h$ij\x07^jk\vk&ls\x07)mr!nr%or#pr qmqnqoqprusqsttvusvw\x07)w(x\x07$y~!z~%{~#|~ }y}z}{}|~}\x07$*\x07b
!%# \x07
\x07b, . \b 0¡£-¢¡¢££¤¤¦\x07¥§¦¥§¨¨¦¨©©«ª¬/«ª«¬¬²¯-®°/¯®¯°°²±¢±²2³¶´¶\x1Bµ³µ´¶··µ·¸¸4¹½\x07%º¼\v»º¼¿½¾½»¾À¿½ÀÁ\x07ÁÂÂÃ\b\x1BÃ6ÄÆ
|
|
551
|
-
ÅÄÆÇÇÅÇÈÈÉÉÊ\bÊ8ËÌ\vÌ:qs}¢¨«¯±µ·½Ç\b`,Ze}var Oe={},Kf;function $x(){if(Kf)return Oe;Kf=1;var a=Oe&&Oe.__createBinding||(Object.create?function(Z,I,Q,re){re===void 0&&(re=Q);var fe=Object.getOwnPropertyDescriptor(I,Q);(!fe||("get"in fe?!I.__esModule:fe.writable||fe.configurable))&&(fe={enumerable:!0,get:function(){return I[Q]}}),Object.defineProperty(Z,re,fe)}:function(Z,I,Q,re){re===void 0&&(re=Q),Z[re]=I[Q]}),d=Oe&&Oe.__setModuleDefault||(Object.create?function(Z,I){Object.defineProperty(Z,"default",{enumerable:!0,value:I})}:function(Z,I){Z.default=I}),y=Oe&&Oe.__importStar||function(){var Z=function(I){return Z=Object.getOwnPropertyNames||function(Q){var re=[];for(var fe in Q)Object.prototype.hasOwnProperty.call(Q,fe)&&(re[re.length]=fe);return re},Z(I)};return function(I){if(I&&I.__esModule)return I;var Q={};if(I!=null)for(var re=Z(I),fe=0;fe<re.length;fe++)re[fe]!=="default"&&a(Q,I,re[fe]);return d(Q,I),Q}}();Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.PropertiesContext=Oe.ArrayValueContext=Oe.ReferenceContext=Oe.ArrayElementContext=Oe.EqValueContext=Oe.PropNameContext=Oe.IdentifierContext=Oe.StringContext=Oe.TagEmptyContext=Oe.TagDefContext=Oe.TagUpdatePropertiesContext=Oe.TagReplacePropertiesContext=Oe.TagEqContext=Oe.TagSpecContext=Oe.TagLineContext=Oe.MalloyTagParser=void 0;const m=lt(),h=fo(),u=po(),r=co(),o=$i(),t=st(),i=qi(),e=Sr(),s=Ie(),l=Er(),c=y(ut());let p=class ye extends o.Parser{get vocabulary(){return ye.VOCABULARY}get grammarFileName(){return"MalloyTag.g4"}get ruleNames(){return ye.ruleNames}get serializedATN(){return ye._serializedATN}createFailedPredicateException(I,Q){return new u.FailedPredicateException(this,I,Q)}constructor(I){super(I),this._interp=new i.ParserATNSimulator(ye._ATN,this)}tagLine(){let I=new v(this._ctx,this.state);this.enterRule(I,0,ye.RULE_tagLine);let Q;try{this.enterOuterAlt(I,1);{for(this.state=23,this._errHandler.sync(this),Q=this._input.LA(1);(Q&-32)===0&&(1<<Q&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=20,this.tagSpec(),this.state=25,this._errHandler.sync(this),Q=this._input.LA(1);this.state=26,this.match(ye.EOF)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}tagSpec(){let I=new x(this._ctx,this.state);this.enterRule(I,2,ye.RULE_tagSpec);let Q;try{switch(this.state=49,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,4,this._ctx)){case 1:I=new g(I),this.enterOuterAlt(I,1),this.state=28,this.propName(),this.state=29,this.match(ye.EQ),this.state=30,this.eqValue(),this.state=32,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.PR_BEG&&(this.state=31,this.properties());break;case 2:I=new _(I),this.enterOuterAlt(I,2),this.state=34,this.propName(),this.state=35,this.match(ye.EQ),this.state=37,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.DOTTY&&(this.state=36,this.match(ye.DOTTY)),this.state=39,this.properties();break;case 3:I=new A(I),this.enterOuterAlt(I,3),this.state=41,this.propName(),this.state=42,this.properties();break;case 4:I=new E(I),this.enterOuterAlt(I,4),this.state=45,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.MINUS&&(this.state=44,this.match(ye.MINUS)),this.state=47,this.propName();break;case 5:I=new D(I),this.enterOuterAlt(I,5),this.state=48,this.match(ye.MINUS_DOTTY);break}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}string(){let I=new N(this._ctx,this.state);this.enterRule(I,4,ye.RULE_string);let Q;try{this.enterOuterAlt(I,1),this.state=51,Q=this._input.LA(1),(Q&-32)===0&&(1<<Q&(1<<ye.SQ_STRING|1<<ye.DQ_STRING|1<<ye.NUMERIC_LITERAL|1<<ye.BARE_STRING))!==0?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}identifier(){let I=new w(this._ctx,this.state);this.enterRule(I,6,ye.RULE_identifier);let Q;try{this.enterOuterAlt(I,1),this.state=53,Q=this._input.LA(1),Q===ye.BQ_STRING||Q===ye.BARE_STRING?(this._input.LA(1)===s.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}propName(){let I=new P(this._ctx,this.state);this.enterRule(I,8,ye.RULE_propName);let Q;try{for(this.enterOuterAlt(I,1),this.state=55,this.identifier(),this.state=60,this._errHandler.sync(this),Q=this._input.LA(1);Q===ye.DOT;)this.state=56,this.match(ye.DOT),this.state=57,this.identifier(),this.state=62,this._errHandler.sync(this),Q=this._input.LA(1)}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}eqValue(){let I=new j(this._ctx,this.state);this.enterRule(I,10,ye.RULE_eqValue);try{switch(this.state=66,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=63,this.string();break;case ye.AR_BEG:this.enterOuterAlt(I,2),this.state=64,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,3),this.state=65,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(Q){if(Q instanceof e.RecognitionException)I.exception=Q,this._errHandler.reportError(this,Q),this._errHandler.recover(this,Q);else throw Q}finally{this.exitRule()}return I}arrayElement(){let I=new Y(this._ctx,this.state);this.enterRule(I,12,ye.RULE_arrayElement);let Q;try{switch(this.state=75,this._errHandler.sync(this),this._input.LA(1)){case ye.SQ_STRING:case ye.DQ_STRING:case ye.NUMERIC_LITERAL:case ye.BARE_STRING:this.enterOuterAlt(I,1),this.state=68,this.string(),this.state=70,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.PR_BEG&&(this.state=69,this.properties());break;case ye.PR_BEG:this.enterOuterAlt(I,2),this.state=72,this.properties();break;case ye.AR_BEG:this.enterOuterAlt(I,3),this.state=73,this.arrayValue();break;case ye.RF_BEG:this.enterOuterAlt(I,4),this.state=74,this.reference();break;default:throw new r.NoViableAltException(this)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}reference(){let I=new L(this._ctx,this.state);this.enterRule(I,14,ye.RULE_reference);try{this.enterOuterAlt(I,1),this.state=77,this.match(ye.RF_BEG),this.state=78,this.propName(),this.state=79,this.match(ye.RF_END)}catch(Q){if(Q instanceof e.RecognitionException)I.exception=Q,this._errHandler.reportError(this,Q),this._errHandler.recover(this,Q);else throw Q}finally{this.exitRule()}return I}arrayValue(){let I=new M(this._ctx,this.state);this.enterRule(I,16,ye.RULE_arrayValue);let Q;try{let re;switch(this.state=97,this._errHandler.sync(this),this.interpreter.adaptivePredict(this._input,11,this._ctx)){case 1:this.enterOuterAlt(I,1);{for(this.state=81,this.match(ye.AR_BEG),this.state=82,this.arrayElement(),this.state=87,this._errHandler.sync(this),re=this.interpreter.adaptivePredict(this._input,9,this._ctx);re!==2&&re!==m.ATN.INVALID_ALT_NUMBER;)re===1&&(this.state=83,this.match(ye.COMMA),this.state=84,this.arrayElement()),this.state=89,this._errHandler.sync(this),re=this.interpreter.adaptivePredict(this._input,9,this._ctx);this.state=91,this._errHandler.sync(this),Q=this._input.LA(1),Q===ye.COMMA&&(this.state=90,this.match(ye.COMMA)),this.state=93,this.match(ye.AR_END)}break;case 2:this.enterOuterAlt(I,2),this.state=95,this.match(ye.AR_BEG),this.state=96,this.match(ye.AR_END);break}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}properties(){let I=new W(this._ctx,this.state);this.enterRule(I,18,ye.RULE_properties);let Q;try{this.enterOuterAlt(I,1);{switch(this.state=99,this.match(ye.PR_BEG),this.state=107,this._errHandler.sync(this),this._input.LA(1)){case ye.DOTTY:this.state=100,this.match(ye.DOTTY);break;case ye.MINUS_DOTTY:case ye.MINUS:case ye.PR_END:case ye.BQ_STRING:case ye.BARE_STRING:for(this.state=104,this._errHandler.sync(this),Q=this._input.LA(1);(Q&-32)===0&&(1<<Q&(1<<ye.MINUS_DOTTY|1<<ye.MINUS|1<<ye.BQ_STRING|1<<ye.BARE_STRING))!==0;)this.state=101,this.tagSpec(),this.state=106,this._errHandler.sync(this),Q=this._input.LA(1);break;default:throw new r.NoViableAltException(this)}this.state=109,this.match(ye.PR_END)}}catch(re){if(re instanceof e.RecognitionException)I.exception=re,this._errHandler.reportError(this,re),this._errHandler.recover(this,re);else throw re}finally{this.exitRule()}return I}static get _ATN(){return ye.__ATN||(ye.__ATN=new h.ATNDeserializer().deserialize(c.toCharArray(ye._serializedATN))),ye.__ATN}};Oe.MalloyTagParser=p,p.MINUS_DOTTY=1,p.DOTTY=2,p.DOT=3,p.MINUS=4,p.EQ=5,p.RF_BEG=6,p.RF_END=7,p.PR_BEG=8,p.PR_END=9,p.AR_BEG=10,p.COMMA=11,p.AR_END=12,p.SQ_STRING=13,p.DQ_STRING=14,p.BQ_STRING=15,p.NUMERIC_LITERAL=16,p.BARE_STRING=17,p.COMMENT=18,p.WHITE_SPACE=19,p.UNEXPECTED_CHAR=20,p.RULE_tagLine=0,p.RULE_tagSpec=1,p.RULE_string=2,p.RULE_identifier=3,p.RULE_propName=4,p.RULE_eqValue=5,p.RULE_arrayElement=6,p.RULE_reference=7,p.RULE_arrayValue=8,p.RULE_properties=9,p.ruleNames=["tagLine","tagSpec","string","identifier","propName","eqValue","arrayElement","reference","arrayValue","properties"],p._LITERAL_NAMES=[void 0,"'-...'","'...'","'.'","'-'","'='","'$('","')'","'{'","'}'","'['","','","']'"],p._SYMBOLIC_NAMES=[void 0,"MINUS_DOTTY","DOTTY","DOT","MINUS","EQ","RF_BEG","RF_END","PR_BEG","PR_END","AR_BEG","COMMA","AR_END","SQ_STRING","DQ_STRING","BQ_STRING","NUMERIC_LITERAL","BARE_STRING","COMMENT","WHITE_SPACE","UNEXPECTED_CHAR"],p.VOCABULARY=new l.VocabularyImpl(p._LITERAL_NAMES,p._SYMBOLIC_NAMES,[]),p._serializedATN=`줝쪺֍꾺体؇쉁r \x07 \x07\b \b
|
|
552
|
-
|
|
553
|
-
\v \v\x07
|
|
554
|
-
\f\x1B\v#
|
|
555
|
-
(
|
|
556
|
-
0
|
|
557
|
-
4
|
|
558
|
-
\x07=
|
|
559
|
-
\f@\v\x07\x07\x07\x07E
|
|
560
|
-
\x07\b\b\bI
|
|
561
|
-
\b\b\b\b\bN
|
|
562
|
-
\b
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
\x07
|
|
567
|
-
X
|
|
568
|
-
|
|
569
|
-
\f
|
|
570
|
-
|
|
571
|
-
[\v
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
^
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
d
|
|
582
|
-
|
|
583
|
-
\v\v\v\x07\vi
|
|
584
|
-
\v\f\v\vl\v\v\vn
|
|
585
|
-
\v\v\v\v\f\b
|
|
586
|
-
\f{35\b7
|
|
587
|
-
9\fDMOce\x1B\x1B\x07
|
|
588
|
-
\x07\x07 "\f\x07!#\v"!"##4$%
|
|
589
|
-
%'\x07\x07&(\x07'&'(())*\v*4+,
|
|
590
|
-
,-\v-4.0\x07/./00114
|
|
591
|
-
24\x0733$3+3/32456 6\x0778 8 9>\b:;\x07;=\b<:=@><>??\v@>AEBE
|
|
592
|
-
CE DADBDCE\rFHGI\vHGHIINJN\vKN
|
|
593
|
-
LN MFMJMKMLNOP\x07\bPQ
|
|
594
|
-
QR\x07 RST\x07\fTY\bUV\x07\rVX\bWUX[YWYZZ][Y\\^\x07\r]\\]^^__\`\x07\`dab\x07\fbd\x07cScadem\x07
|
|
595
|
-
fn\x07gihgiljhjkknljmfmjnoop\x07\vp"'/3>DHMY]cjm`;class v extends t.ParserRuleContext{EOF(){return this.getToken(p.EOF,0)}tagSpec(I){return I===void 0?this.getRuleContexts(x):this.getRuleContext(I,x)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_tagLine}accept(I){return I.visitTagLine?I.visitTagLine(this):I.visitChildren(this)}}Oe.TagLineContext=v;class x extends t.ParserRuleContext{constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_tagSpec}copyFrom(I){super.copyFrom(I)}}Oe.TagSpecContext=x;class g extends x{propName(){return this.getRuleContext(0,P)}EQ(){return this.getToken(p.EQ,0)}eqValue(){return this.getRuleContext(0,j)}properties(){return this.tryGetRuleContext(0,W)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagEq?I.visitTagEq(this):I.visitChildren(this)}}Oe.TagEqContext=g;class _ extends x{propName(){return this.getRuleContext(0,P)}EQ(){return this.getToken(p.EQ,0)}properties(){return this.getRuleContext(0,W)}DOTTY(){return this.tryGetToken(p.DOTTY,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagReplaceProperties?I.visitTagReplaceProperties(this):I.visitChildren(this)}}Oe.TagReplacePropertiesContext=_;class A extends x{propName(){return this.getRuleContext(0,P)}properties(){return this.getRuleContext(0,W)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagUpdateProperties?I.visitTagUpdateProperties(this):I.visitChildren(this)}}Oe.TagUpdatePropertiesContext=A;class E extends x{propName(){return this.getRuleContext(0,P)}MINUS(){return this.tryGetToken(p.MINUS,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagDef?I.visitTagDef(this):I.visitChildren(this)}}Oe.TagDefContext=E;class D extends x{MINUS_DOTTY(){return this.getToken(p.MINUS_DOTTY,0)}constructor(I){super(I.parent,I.invokingState),this.copyFrom(I)}accept(I){return I.visitTagEmpty?I.visitTagEmpty(this):I.visitChildren(this)}}Oe.TagEmptyContext=D;class N extends t.ParserRuleContext{SQ_STRING(){return this.tryGetToken(p.SQ_STRING,0)}DQ_STRING(){return this.tryGetToken(p.DQ_STRING,0)}BARE_STRING(){return this.tryGetToken(p.BARE_STRING,0)}NUMERIC_LITERAL(){return this.tryGetToken(p.NUMERIC_LITERAL,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_string}accept(I){return I.visitString?I.visitString(this):I.visitChildren(this)}}Oe.StringContext=N;class w extends t.ParserRuleContext{BQ_STRING(){return this.tryGetToken(p.BQ_STRING,0)}BARE_STRING(){return this.tryGetToken(p.BARE_STRING,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_identifier}accept(I){return I.visitIdentifier?I.visitIdentifier(this):I.visitChildren(this)}}Oe.IdentifierContext=w;class P extends t.ParserRuleContext{identifier(I){return I===void 0?this.getRuleContexts(w):this.getRuleContext(I,w)}DOT(I){return I===void 0?this.getTokens(p.DOT):this.getToken(p.DOT,I)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_propName}accept(I){return I.visitPropName?I.visitPropName(this):I.visitChildren(this)}}Oe.PropNameContext=P;class j extends t.ParserRuleContext{string(){return this.tryGetRuleContext(0,N)}arrayValue(){return this.tryGetRuleContext(0,M)}reference(){return this.tryGetRuleContext(0,L)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_eqValue}accept(I){return I.visitEqValue?I.visitEqValue(this):I.visitChildren(this)}}Oe.EqValueContext=j;class Y extends t.ParserRuleContext{string(){return this.tryGetRuleContext(0,N)}properties(){return this.tryGetRuleContext(0,W)}arrayValue(){return this.tryGetRuleContext(0,M)}reference(){return this.tryGetRuleContext(0,L)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_arrayElement}accept(I){return I.visitArrayElement?I.visitArrayElement(this):I.visitChildren(this)}}Oe.ArrayElementContext=Y;class L extends t.ParserRuleContext{RF_BEG(){return this.getToken(p.RF_BEG,0)}propName(){return this.getRuleContext(0,P)}RF_END(){return this.getToken(p.RF_END,0)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_reference}accept(I){return I.visitReference?I.visitReference(this):I.visitChildren(this)}}Oe.ReferenceContext=L;class M extends t.ParserRuleContext{AR_BEG(){return this.getToken(p.AR_BEG,0)}arrayElement(I){return I===void 0?this.getRuleContexts(Y):this.getRuleContext(I,Y)}AR_END(){return this.getToken(p.AR_END,0)}COMMA(I){return I===void 0?this.getTokens(p.COMMA):this.getToken(p.COMMA,I)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_arrayValue}accept(I){return I.visitArrayValue?I.visitArrayValue(this):I.visitChildren(this)}}Oe.ArrayValueContext=M;class W extends t.ParserRuleContext{PR_BEG(){return this.getToken(p.PR_BEG,0)}PR_END(){return this.getToken(p.PR_END,0)}DOTTY(){return this.tryGetToken(p.DOTTY,0)}tagSpec(I){return I===void 0?this.getRuleContexts(x):this.getRuleContext(I,x)}constructor(I,Q){super(I,Q)}get ruleIndex(){return p.RULE_properties}accept(I){return I.visitProperties?I.visitProperties(this):I.visitChildren(this)}}return Oe.PropertiesContext=W,Oe}var Pn={},Ws={},Jf;function Ux(){if(Jf)return Ws;Jf=1;/*!
|
|
596
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
597
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
598
|
-
*/return Object.defineProperty(Ws,"__esModule",{value:!0}),Ws}var Qs={},Zf;function Vx(){if(Zf)return Qs;Zf=1;/*!
|
|
599
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
600
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
601
|
-
*/return Object.defineProperty(Qs,"__esModule",{value:!0}),Qs}var Fn={},e0;function zx(){if(e0)return Fn;e0=1;/*!
|
|
602
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
603
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
604
|
-
*/var a=Fn&&Fn.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.ANTLRInputStream=void 0;const d=Ue(),y=ce(),m=gr();let h=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw d(this.LA(1)===m.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?m.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let o=r.a,t=r.b;t>=this.n&&(t=this.n-1);let i=t-o+1;return o>=this.n?"":this.data.substr(o,i)}get sourceName(){return this.name?this.name:m.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return a([y.Override],h.prototype,"consume",null),a([y.Override],h.prototype,"LA",null),a([y.Override],h.prototype,"index",null),a([y.Override],h.prototype,"size",null),a([y.Override],h.prototype,"mark",null),a([y.Override],h.prototype,"release",null),a([y.Override],h.prototype,"seek",null),a([y.Override],h.prototype,"getText",null),a([y.Override],h.prototype,"sourceName",null),a([y.Override],h.prototype,"toString",null),Fn.ANTLRInputStream=h,Fn}var Xs={},t0;function Hx(){if(t0)return Xs;t0=1;/*!
|
|
605
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
606
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
607
|
-
*/return Object.defineProperty(Xs,"__esModule",{value:!0}),Xs}var Ks={},r0;function Gx(){return r0||(r0=1,function(a){/*!
|
|
608
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
609
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
610
|
-
*/Object.defineProperty(a,"__esModule",{value:!0}),a.Dependents=void 0,function(d){d[d.SELF=0]="SELF",d[d.PARENTS=1]="PARENTS",d[d.CHILDREN=2]="CHILDREN",d[d.ANCESTORS=3]="ANCESTORS",d[d.DESCENDANTS=4]="DESCENDANTS",d[d.SIBLINGS=5]="SIBLINGS",d[d.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",d[d.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",d[d.PRECEEDING=8]="PRECEEDING",d[d.FOLLOWING=9]="FOLLOWING"}(a.Dependents||(a.Dependents={}))}(Ks)),Ks}var pr={},n0;function Yx(){if(n0)return pr;n0=1;/*!
|
|
611
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
612
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
613
|
-
*/var a=pr&&pr.__decorate||function(r,o,t,i){var e=arguments.length,s=e<3?o:i===null?i=Object.getOwnPropertyDescriptor(o,t):i,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,o,t,i);else for(var c=r.length-1;c>=0;c--)(l=r[c])&&(s=(e<3?l(s):e>3?l(o,t,s):l(o,t))||s);return e>3&&s&&Object.defineProperty(o,t,s),s},d=pr&&pr.__param||function(r,o){return function(t,i){o(t,i,r)}};Object.defineProperty(pr,"__esModule",{value:!0}),pr.DiagnosticErrorListener=void 0;const y=vr(),m=ce(),h=Ve();let u=class{constructor(o=!0){this.exactOnly=o,this.exactOnly=o}syntaxError(o,t,i,e,s,l){}reportAmbiguity(o,t,i,e,s,l,c){if(this.exactOnly&&!s)return;let p=this.getDecisionDescription(o,t),v=this.getConflictingAlts(l,c),x=o.inputStream.getText(h.Interval.of(i,e)),g=`reportAmbiguity d=${p}: ambigAlts=${v}, input='${x}'`;o.notifyErrorListeners(g)}reportAttemptingFullContext(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportAttemptingFullContext d=${c}, input='${p}'`;o.notifyErrorListeners(v)}reportContextSensitivity(o,t,i,e,s,l){let c=this.getDecisionDescription(o,t),p=o.inputStream.getText(h.Interval.of(i,e)),v=`reportContextSensitivity d=${c}, input='${p}'`;o.notifyErrorListeners(v)}getDecisionDescription(o,t){let i=t.decision,e=t.atnStartState.ruleIndex,s=o.ruleNames;if(e<0||e>=s.length)return i.toString();let l=s[e];return l?`${i} (${l})`:i.toString()}getConflictingAlts(o,t){if(o!=null)return o;let i=new y.BitSet;for(let e of t)i.set(e.alt);return i}};return a([m.Override],u.prototype,"syntaxError",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(6,m.NotNull)],u.prototype,"reportAmbiguity",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportAttemptingFullContext",null),a([m.Override,d(0,m.NotNull),d(1,m.NotNull),d(5,m.NotNull)],u.prototype,"reportContextSensitivity",null),a([d(0,m.NotNull),d(1,m.NotNull)],u.prototype,"getDecisionDescription",null),a([m.NotNull,d(1,m.NotNull)],u.prototype,"getConflictingAlts",null),pr.DiagnosticErrorListener=u,pr}var hr={},i0;function Wx(){if(i0)return hr;i0=1;/*!
|
|
614
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
615
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
616
|
-
*/var a=hr&&hr.__decorate||function(o,t,i,e){var s=arguments.length,l=s<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,i):e,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(o,t,i,e);else for(var p=o.length-1;p>=0;p--)(c=o[p])&&(l=(s<3?c(l):s>3?c(t,i,l):c(t,i))||l);return s>3&&l&&Object.defineProperty(t,i,l),l},d=hr&&hr.__param||function(o,t){return function(i,e){t(i,e,o)}};Object.defineProperty(hr,"__esModule",{value:!0}),hr.LexerInterpreter=void 0;const y=Tr(),m=uo(),h=ce(),u=ce();let r=class extends y.Lexer{constructor(t,i,e,s,l,c,p){if(super(p),c.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=c,this._ruleNames=e.slice(0),this._channelNames=s.slice(0),this._modeNames=l.slice(0),this._vocabulary=i,this._interp=new m.LexerATNSimulator(c,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return a([h.NotNull],r.prototype,"_vocabulary",void 0),a([u.Override],r.prototype,"atn",null),a([u.Override],r.prototype,"grammarFileName",null),a([u.Override],r.prototype,"ruleNames",null),a([u.Override],r.prototype,"channelNames",null),a([u.Override],r.prototype,"modeNames",null),a([u.Override],r.prototype,"vocabulary",null),r=a([d(1,h.NotNull)],r),hr.LexerInterpreter=r,hr}var Js={},o0;function Qx(){if(o0)return Js;o0=1;/*!
|
|
617
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
618
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
619
|
-
*/return Object.defineProperty(Js,"__esModule",{value:!0}),Js}var In={},s0;function Xx(){if(s0)return In;s0=1;/*!
|
|
620
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
621
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
622
|
-
*/var a=In&&In.__decorate||function(u,r,o,t){var i=arguments.length,e=i<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,o):t,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(u,r,o,t);else for(var l=u.length-1;l>=0;l--)(s=u[l])&&(e=(i<3?s(e):i>3?s(r,o,e):s(r,o))||e);return i>3&&e&&Object.defineProperty(r,o,e),e};Object.defineProperty(In,"__esModule",{value:!0}),In.RuleContextWithAltNum=void 0;const d=lt(),y=ce(),m=st();let h=class extends m.ParserRuleContext{constructor(r,o){o!==void 0?super(r,o):super(),this._altNumber=d.ATN.INVALID_ALT_NUMBER}get altNumber(){return this._altNumber}set altNumber(r){this._altNumber=r}};return a([y.Override],h.prototype,"altNumber",null),In.RuleContextWithAltNum=h,In}var Ei={},a0;function Kx(){if(a0)return Ei;a0=1;/*!
|
|
623
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
624
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
625
|
-
*/Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.RuleDependency=void 0;function a(d){return(y,m,h)=>{}}return Ei.RuleDependency=a,Ei}var Si={},u0;function Jx(){if(u0)return Si;u0=1;/*!
|
|
626
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
627
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
628
|
-
*/Object.defineProperty(Si,"__esModule",{value:!0}),Si.RuleVersion=void 0;function a(d){return(y,m,h)=>{}}return Si.RuleVersion=a,Si}var Zs={},l0;function Zx(){if(l0)return Zs;l0=1;/*!
|
|
629
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
630
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
631
|
-
*/return Object.defineProperty(Zs,"__esModule",{value:!0}),Zs}var ea={},c0;function ed(){if(c0)return ea;c0=1;/*!
|
|
632
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
633
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
634
|
-
*/return Object.defineProperty(ea,"__esModule",{value:!0}),ea}var ta={},f0;function td(){if(f0)return ta;f0=1;/*!
|
|
635
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
636
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
637
|
-
*/return Object.defineProperty(ta,"__esModule",{value:!0}),ta}var xr={},p0;function rd(){if(p0)return xr;p0=1;/*!
|
|
638
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
639
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
640
|
-
*/var a=xr&&xr.__decorate||function(i,e,s,l){var c=arguments.length,p=c<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,s):l,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,e,s,l);else for(var x=i.length-1;x>=0;x--)(v=i[x])&&(p=(c<3?v(p):c>3?v(e,s,p):v(e,s))||p);return c>3&&p&&Object.defineProperty(e,s,p),p};Object.defineProperty(xr,"__esModule",{value:!0}),xr.RewriteOperation=xr.TokenStreamRewriter=void 0;const d=Ve(),y=ce(),m=Ie();let h=class Qe{constructor(e){this.tokens=e,this.programs=new Map,this.programs.set(Qe.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map}getTokenStream(){return this.tokens}rollback(e,s=Qe.DEFAULT_PROGRAM_NAME){let l=this.programs.get(s);l!=null&&this.programs.set(s,l.slice(Qe.MIN_TOKEN_INDEX,e))}deleteProgram(e=Qe.DEFAULT_PROGRAM_NAME){this.rollback(Qe.MIN_TOKEN_INDEX,e)}insertAfter(e,s,l=Qe.DEFAULT_PROGRAM_NAME){let c;typeof e=="number"?c=e:c=e.tokenIndex;let p=this.getProgram(l),v=new o(this.tokens,c,p.length,s);p.push(v)}insertBefore(e,s,l=Qe.DEFAULT_PROGRAM_NAME){let c;typeof e=="number"?c=e:c=e.tokenIndex;let p=this.getProgram(l),v=new r(this.tokens,c,p.length,s);p.push(v)}replaceSingle(e,s){typeof e=="number"?this.replace(e,e,s):this.replace(e,e,s)}replace(e,s,l,c=Qe.DEFAULT_PROGRAM_NAME){if(typeof e!="number"&&(e=e.tokenIndex),typeof s!="number"&&(s=s.tokenIndex),e>s||e<0||s<0||s>=this.tokens.size)throw new RangeError(`replace: range invalid: ${e}..${s}(size=${this.tokens.size})`);let p=this.getProgram(c),v=new t(this.tokens,e,s,p.length,l);p.push(v)}delete(e,s,l=Qe.DEFAULT_PROGRAM_NAME){s===void 0&&(s=e),typeof e=="number"?this.replace(e,s,"",l):this.replace(e,s,"",l)}getLastRewriteTokenIndex(e=Qe.DEFAULT_PROGRAM_NAME){let s=this.lastRewriteTokenIndexes.get(e);return s??-1}setLastRewriteTokenIndex(e,s){this.lastRewriteTokenIndexes.set(e,s)}getProgram(e){let s=this.programs.get(e);return s==null&&(s=this.initializeProgram(e)),s}initializeProgram(e){let s=[];return this.programs.set(e,s),s}getText(e,s=Qe.DEFAULT_PROGRAM_NAME){let l;e instanceof d.Interval?l=e:l=d.Interval.of(0,this.tokens.size-1),typeof e=="string"&&(s=e);let c=this.programs.get(s),p=l.a,v=l.b;if(v>this.tokens.size-1&&(v=this.tokens.size-1),p<0&&(p=0),c==null||c.length===0)return this.tokens.getText(l);let x=[],g=this.reduceToSingleOperationPerIndex(c),_=p;for(;_<=v&&_<this.tokens.size;){let A=g.get(_);g.delete(_);let E=this.tokens.get(_);A==null?(E.type!==m.Token.EOF&&x.push(String(E.text)),_++):_=A.execute(x)}if(v===this.tokens.size-1)for(let A of g.values())A.index>=this.tokens.size-1&&x.push(A.text.toString());return x.join("")}reduceToSingleOperationPerIndex(e){for(let l=0;l<e.length;l++){let c=e[l];if(c==null||!(c instanceof t))continue;let p=c,v=this.getKindOfOps(e,r,l);for(let g of v)g.index===p.index?(e[g.instructionIndex]=void 0,p.text=g.text.toString()+(p.text!=null?p.text.toString():"")):g.index>p.index&&g.index<=p.lastIndex&&(e[g.instructionIndex]=void 0);let x=this.getKindOfOps(e,t,l);for(let g of x){if(g.index>=p.index&&g.lastIndex<=p.lastIndex){e[g.instructionIndex]=void 0;continue}let _=g.lastIndex<p.index||g.index>p.lastIndex;if(g.text==null&&p.text==null&&!_)e[g.instructionIndex]=void 0,p.index=Math.min(g.index,p.index),p.lastIndex=Math.max(g.lastIndex,p.lastIndex);else if(!_)throw new Error(`replace op boundaries of ${p} overlap with previous ${g}`)}}for(let l=0;l<e.length;l++){let c=e[l];if(c==null||!(c instanceof r))continue;let p=c,v=this.getKindOfOps(e,r,l);for(let g of v)g.index===p.index&&(g instanceof o?(p.text=this.catOpText(g.text,p.text),e[g.instructionIndex]=void 0):g instanceof r&&(p.text=this.catOpText(p.text,g.text),e[g.instructionIndex]=void 0));let x=this.getKindOfOps(e,t,l);for(let g of x){if(p.index===g.index){g.text=this.catOpText(p.text,g.text),e[l]=void 0;continue}if(p.index>=g.index&&p.index<=g.lastIndex)throw new Error(`insert op ${p} within boundaries of previous ${g}`)}}let s=new Map;for(let l of e)if(l!=null){if(s.get(l.index)!=null)throw new Error("should only be one op per index");s.set(l.index,l)}return s}catOpText(e,s){let l="",c="";return e!=null&&(l=e.toString()),s!=null&&(c=s.toString()),l+c}getKindOfOps(e,s,l){let c=[];for(let p=0;p<l&&p<e.length;p++){let v=e[p];v!=null&&v instanceof s&&c.push(v)}return c}};xr.TokenStreamRewriter=h,h.DEFAULT_PROGRAM_NAME="default",h.PROGRAM_INIT_SIZE=100,h.MIN_TOKEN_INDEX=0;class u{constructor(e,s,l,c){this.tokens=e,this.instructionIndex=l,this.index=s,this.text=c===void 0?"":c}execute(e){return this.index}toString(){let e=this.constructor.name,s=e.indexOf("$");return e=e.substring(s+1,e.length),"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}a([y.Override],u.prototype,"toString",null),xr.RewriteOperation=u;class r extends u{constructor(e,s,l,c){super(e,s,l,c)}execute(e){return e.push(this.text.toString()),this.tokens.get(this.index).type!==m.Token.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}a([y.Override],r.prototype,"execute",null);class o extends r{constructor(e,s,l,c){super(e,s+1,l,c)}}class t extends u{constructor(e,s,l,c,p){super(e,s,c,p),this.lastIndex=l}execute(e){return this.text!=null&&e.push(this.text.toString()),this.lastIndex+1}toString(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}return a([y.Override],t.prototype,"execute",null),a([y.Override],t.prototype,"toString",null),xr}var ra={},h0;function nd(){if(h0)return ra;h0=1;/*!
|
|
641
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
642
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
643
|
-
*/return Object.defineProperty(ra,"__esModule",{value:!0}),ra}var na={},x0;function id(){if(x0)return na;x0=1;/*!
|
|
644
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
645
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
646
|
-
*/return Object.defineProperty(na,"__esModule",{value:!0}),na}var d0;function od(){return d0||(d0=1,function(a){/*!
|
|
647
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
648
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
649
|
-
*/var d=Pn&&Pn.__createBinding||(Object.create?function(m,h,u,r){r===void 0&&(r=u),Object.defineProperty(m,r,{enumerable:!0,get:function(){return h[u]}})}:function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]}),y=Pn&&Pn.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(Ux(),a),y(Vx(),a),y(zx(),a),y(Np(),a),y(wp(),a),y(Hx(),a),y(Pa(),a),y(Cp(),a),y(Dp(),a),y(ki(),a),y(Na(),a),y(Fa(),a),y(J0(),a),y(Ra(),a),y(Gx(),a),y(Yx(),a),y(po(),a),y(ho(),a),y(Pp(),a),y(gr(),a),y(Tr(),a),y(Wx(),a),y(ao(),a),y(Rp(),a),y(co(),a),y($i(),a),y(Qx(),a),y(Fp(),a),y(st(),a),y(Sa(),a),y(Tp(),a),y(Sr(),a),y(Bi(),a),y(Ap(),a),y(Xx(),a),y(Kx(),a),y(Jx(),a),y(Ie(),a),y(Zx(),a),y(ed(),a),y(td(),a),y(rd(),a),y(nd(),a),y(Er(),a),y(id(),a)}(Pn)),Pn}var zi={},m0;function Bp(){if(m0)return zi;m0=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.parseString=d;var a;(function(y){y[y.Normal=0]="Normal",y[y.ReverseVirgule=1]="ReverseVirgule",y[y.Unicode=2]="Unicode"})(a||(a={}));function d(y,m=""){let h=y.slice(m.length),u=a.Normal;m.length&&(h=h.slice(0,-m.length));let r="",o="";for(const t of h)switch(u){case a.Normal:{t==="\\"?u=a.ReverseVirgule:r+=t;break}case a.ReverseVirgule:{let i=t;if(t==="u"){u=a.Unicode,o="";continue}t==="b"?i="\b":t==="f"?i="\f":t==="n"?i=`
|
|
650
|
-
`:t==="r"?i="\r":t==="t"&&(i=" "),r+=i,u=a.Normal;break}case a.Unicode:"ABCDEFabcdef0123456789".includes(t)?(o+=t,o.length===4&&(r+=String.fromCharCode(parseInt(o,16)),u=a.Normal)):u=a.Normal}return r}return zi}var y0;function sd(){if(y0)return ei;y0=1,Object.defineProperty(ei,"__esModule",{value:!0}),ei.Tag=void 0;const a=qx(),d=jx(),y=$x(),m=od(),h=Bp();class u{static tagFrom(c={}){return c instanceof u?c:new u(c)}static id(c){let p=u.ids.get(c);return p===void 0&&(p=u.nextTagId,u.ids.set(c,p),u.nextTagId+=1),p}peek(c=0){const p=" ".repeat(c);let v=`#${u.id(this)}`;if(this.properties===void 0&&this.eq&&typeof this.eq=="string")return v+`=${this.eq}`;if(v+=" {",this.eq&&(typeof this.eq=="string"?v+=`
|
|
651
|
-
${p} =: ${this.eq}`:v+=`
|
|
652
|
-
${p} =: [
|
|
653
|
-
${p} ${this.eq.map(x=>u.tagFrom(x).peek(c+4)).join(`
|
|
654
|
-
${p} `)}
|
|
655
|
-
${p} ]`),this.properties)for(const x in this.properties){const g=u.tagFrom(this.properties[x]);v+=`
|
|
656
|
-
${p} ${x}: ${g.peek(c+2)}`}return v+=`
|
|
657
|
-
${p}}`,v}static fromTagLine(c,p=0,v,...x){return e(c,v,x,p)}static fromTagLines(c,p,...v){const x=[];let g=p;for(let _=0;_<c.length;_++){const A=c[_],E=e(A,g,v,_);g=E.tag,x.push(...E.log)}return{tag:g,log:x}}constructor(c={}){c.eq&&(this.eq=c.eq),c.properties&&(this.properties=c.properties),c.deleted&&(this.deleted=c.deleted),c.prefix&&(this.prefix=c.prefix)}static withPrefix(c){return new u({prefix:c})}tag(...c){return this.find(c)}text(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(typeof v=="string")return v}numeric(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(typeof v=="string"){const x=Number.parseFloat(v);if(!Number.isNaN(x))return x}}bare(...c){const p=this.find(c);if(p!==void 0)return p.properties===void 0||Object.entries(p.properties).length===0}get dict(){const c={};if(this.properties)for(const p in this.properties)c[p]=u.tagFrom(this.properties[p]);return c}array(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.map(x=>typeof x=="string"?new u({eq:x}):u.tagFrom(x))}textArray(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.reduce((x,g)=>typeof g.eq=="string"?x.concat(g.eq):x,[])}numericArray(...c){var p;const v=(p=this.find(c))===null||p===void 0?void 0:p.eq;if(!(v===void 0||typeof v=="string"))return v.reduce((x,g)=>{if(typeof g.eq=="string"){const _=Number.parseFloat(g.eq);if(!Number.isNaN(_))return x.concat(_)}return x},[])}getProperties(){return this.properties===void 0&&(this.properties={}),this.properties}clone(){return new u(structuredClone(this))}static escapeString(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n")}static escapeProp(c){return c.replace(/\\/g,"\\\\").replace(/`/g,"\\`")}static quoteAndEscape(c,p=!1){return c.match(/^[0-9A-Za-z_]+$/)?c:p?`\`${u.escapeProp(c)}\``:`"${u.escapeString(c)}"`}toString(){var c;let p=(c=this.prefix)!==null&&c!==void 0?c:"# ";function v(_){var A;const E=Object.keys((A=_.properties)!==null&&A!==void 0?A:{});for(let D=0;D<E.length;D++)g(E[D],_.properties[E[D]]),D<E.length-1&&(p+=" ")}function x(_,A=!1){if(_.eq!==void 0)if(A||(p+=" = "),Array.isArray(_.eq)){p+="[";for(let E=0;E<_.eq.length;E++)x(_.eq[E],!0),E!==_.eq.length-1&&(p+=", ");p+="]"}else p+=u.quoteAndEscape(`${_.eq}`);if(_.properties){const E=Object.keys(_.properties);!A&&E.length===1&&!E.some(D=>{var N;return((N=_.properties)!==null&&N!==void 0?N:{})[D].deleted})&&_.eq===void 0?(p+=".",v(_)):((!A||_.eq!==void 0)&&(p+=" "),p+="{ ",v(_),p+=" }")}}function g(_,A){if(A.deleted){p+=`-${u.quoteAndEscape(_,!0)}`;return}p+=u.quoteAndEscape(_,!0),x(A)}return v(this),p+=`
|
|
658
|
-
`,p}find(c){var p;let v=u.tagFrom(this);for(const x of c)if(typeof x=="number"){if(v.eq===void 0||!Array.isArray(v.eq)||v.eq.length<=x)return;v=u.tagFrom(v.eq[x])}else{const g=(p=v.properties)!==null&&p!==void 0?p:{};if(x in g)v=u.tagFrom(g[x]);else return}return v.deleted?void 0:v}has(...c){return this.find(c)!==void 0}set(c,p=null){const v=u.tagFrom(this);let x=v;for(const g of c)if(typeof g=="number"){if(x.eq===void 0||!Array.isArray(x.eq))x.eq=Array.from({length:g+1}).map(_=>({}));else if(x.eq.length<=g){const _=x.eq,A=Array.from({length:g+1}).map((E,D)=>D<_.length?_[D]:{});x.eq=A}x=x.eq[g]}else{const _=x.properties;_===void 0?(x.properties={[g]:{}},x=x.properties[g]):g in _?(x=_[g],x.deleted&&(x.deleted=!1)):(_[g]={},x=_[g])}return p===null?x.eq=void 0:typeof p=="string"?x.eq=p:typeof p=="number"?x.eq=p.toString():Array.isArray(p)&&(x.eq=p.map(g=>({eq:typeof g=="string"?g:g.toString()}))),v}delete(...c){return this.remove(c,!1)}unset(...c){return this.remove(c,!0)}remove(c,p=!1){var v;const x=u.tagFrom(this);let g=x;for(const A of c.slice(0,c.length-1))if(typeof A=="number"){if(g.eq===void 0||!Array.isArray(g.eq)){if(!p)return x;g.eq=Array.from({length:A}).map(E=>({}))}else if(g.eq.length<=A){if(!p)return x;const E=g.eq,D=Array.from({length:A}).map((N,w)=>w<E.length?E[w]:{});g.eq=D}g=g.eq[A]}else{const E=g.properties;if(E===void 0){if(!p)return x;g.properties={[A]:{}},g=g.properties[A]}else if(A in E)g=E[A];else{if(!p)return x;E[A]={},g=E[A]}}const _=c[c.length-1];return typeof _=="string"?g.properties&&_ in g.properties?delete g.properties[_]:p&&((v=g.properties)!==null&&v!==void 0||(g.properties={}),g.properties[_]={deleted:!0}):Array.isArray(g.eq)&&g.eq.splice(_,1),x}}ei.Tag=u,u.ids=new Map,u.nextTagId=1e3;class r{constructor(c){this.line=c,this.log=[]}syntaxError(c,p,v,x,g,_){const A={code:"tag-parse-syntax-error",message:g,line:this.line,offset:x};this.log.push(A)}semanticError(c,p,v){const x={code:p,message:v,line:this.line,offset:c.start.charPositionInLine};this.log.push(x)}}function o(l){const c=l.buildOn;return c instanceof u?c:new u}function t(l,c){var p,v;let x=l.getProperties();for(const g of c.slice(0,c.length-1)){let _;x[g]===void 0?(_=new u({}),x[g]=_):((p=(v=x[g]).properties)!==null&&p!==void 0||(v.properties={}),_=u.tagFrom(x[g])),x=_.getProperties()}return[c[c.length-1],x]}function i(l){return l.SQ_STRING()||l.DQ_STRING()?(0,h.parseString)(l.text,l.text[0]):l.text}function e(l,c,p,v){if(l[0]==="#"){const P=l.indexOf(" ");P>0?l=l.slice(P):l=""}const x=m.CharStreams.fromString(l),g=new d.MalloyTagLexer(x),_=new m.CommonTokenStream(g),A=new r(v),E=new y.MalloyTagParser(_);E.removeErrorListeners(),E.addErrorListener(A);const D=E.tagLine();return{tag:new s(p,A).tagLineToTag(D,c),log:A.log}}class s extends a.AbstractParseTreeVisitor{constructor(c=[],p){super(),this.scopes=[],this.msgLog=p,this.scopes.unshift(...c)}defaultResult(){return new u}visitString(c){return new u({eq:i(c)})}getPropName(c){return c.identifier().map(p=>p.BARE_STRING()?p.text:(0,h.parseString)(p.text,p.text[0]))}getTags(c,p){for(const v of c)v.buildOn=p,this.visit(v);return p}tagLineToTag(c,p){return p=p?.clone()||new u({}),this.scopes.unshift(p),this.getTags(c.tagSpec(),p),p}visitTagLine(c){throw new Error("INTERNAL: ERROR: Call tagLineToTag, not vistTagLine")}visitProperties(c){return this.getTags(c.tagSpec(),o(c))}visitArrayValue(c){return new u({eq:this.getArray(c)})}getArray(c){return c.arrayElement().map(p=>this.visit(p))}visitArrayElement(c){const p=c.properties(),v=p?this.visitProperties(p):void 0,x=c.string();let g=x?i(x):void 0;const _=c.arrayValue();if(_&&(g=this.getArray(_)),v)return g!==void 0&&(v.eq=g),v;const A=c.reference();return A?this.visitReference(A):new u({eq:g})}visitReference(c){const p=this.getPropName(c.propName());for(const v of this.scopes)if(v.has(p[0])){const x=v.tag(...p);if(x)return x.clone();break}return this.msgLog.semanticError(c,"tag-property-not-found",`Reference to undefined property ${p.join(".")}`),this.defaultResult()}visitTagEq(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=this.visit(c.eqValue()),A=c.properties();if(A)if(A.DOTTY()===void 0){const E=this.visitProperties(A).dict;g[x]={..._,properties:E}}else g[x]={...g[x],..._};else g[x]=_;return p}visitTagReplaceProperties(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=c.properties(),A=this.visitProperties(_);return c.DOTTY()===void 0?g[x]={properties:A.dict}:g[x].properties=A.dict,p}visitTagUpdateProperties(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v),_=c.properties();_.buildOn=u.tagFrom(g[x]);const A=this.visitProperties(_),E=g[x]||new u({}),D={...E.properties,...A.dict};return g[x]={...E,properties:D},p}visitTagDef(c){const p=o(c),v=this.getPropName(c.propName()),[x,g]=t(p,v);return c.MINUS()?g[x]={deleted:!0}:g[x]=new u({}),p}visitTagEmpty(c){const p=c.buildOn;return p.properties={},p}}return ei}var g0;function ad(){return g0||(g0=1,function(a){var d=Xe&&Xe.__createBinding||(Object.create?function(u,r,o,t){t===void 0&&(t=o);var i=Object.getOwnPropertyDescriptor(r,o);(!i||("get"in i?!r.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(u,t,i)}:function(u,r,o,t){t===void 0&&(t=o),u[t]=r[o]}),y=Xe&&Xe.__setModuleDefault||(Object.create?function(u,r){Object.defineProperty(u,"default",{enumerable:!0,value:r})}:function(u,r){u.default=r}),m=Xe&&Xe.__exportStar||function(u,r){for(var o in u)o!=="default"&&!Object.prototype.hasOwnProperty.call(r,o)&&d(r,u,o)},h=Xe&&Xe.__importStar||function(){var u=function(r){return u=Object.getOwnPropertyNames||function(o){var t=[];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[t.length]=i);return t},u(r)};return function(r){if(r&&r.__esModule)return r;var o={};if(r!=null)for(var t=u(r),i=0;i<t.length;i++)t[i]!=="default"&&d(o,r,t[i]);return y(o,r),o}}();Object.defineProperty(a,"__esModule",{value:!0}),a.ParseUtil=void 0,m(sd(),a),a.ParseUtil=h(Bp())}(Xe)),Xe}var Ln={},et={},_0;function Qn(){if(_0)return et;_0=1,Object.defineProperty(et,"__esModule",{value:!0}),et.isChainOp=a,et.isStringCondition=d,et.isStringFilter=y,et.isBooleanFilter=m,et.isNumberFilter=h,et.isTemporalFilter=u,et.isFilterExpression=r,et.isFilterable=o;function a(t){return["and","or",","].includes(t)}function d(t){return["starts","ends","contains","="].includes(t.operator)}function y(t){return"operator"in t&&typeof t.operator=="string"&&["starts","ends","contains","=","~","null","empty","and","or",",","()"].includes(t.operator)}function m(t){return"operator"in t&&typeof t.operator=="string"&&["null","true","false","false_or_null"].includes(t.operator)}function h(t){return"operator"in t&&typeof t.operator=="string"&&["range","<=",">=","!=","=",">","<","and","or","()","null"].includes(t.operator)}function u(t){return"operator"in t&&typeof t.operator=="string"&&["literal","before","after","to","for","in","and","or","in_last","this","last","next","()","null"].includes(t.operator)}function r(t){return!!t&&"operator"in t}function o(t){return["string","number","boolean","timestamp","date"].includes(t)}return et}var Ti={},A0;function ud(){return A0||(A0=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.BooleanFilterExpression=void 0,Ti.BooleanFilterExpression={parse(a){var d;if(a.match(/^\s*$/))return{parsed:null,log:[]};const y={parsed:null,log:[]};let m=a.toLowerCase().trim().replace(/\s\s+/," "),h=!1;if(m.startsWith("not ")&&(h=!0,m=m.slice(4)),m==="true")y.parsed={operator:"true"};else if(m==="false")y.parsed={operator:"false_or_null"};else if(m==="=false")y.parsed={operator:"false"};else if(m==="null")y.parsed={operator:"null"};else if(m==="not null")y.parsed={operator:"null",not:!0};else{const u=a.match(/[^\s]/),r=u&&(d=u.index)!==null&&d!==void 0?d:0;y.log=[{message:"Illegal boolean filter. Must be one of true,false,=false,null,not null",severity:"error",startIndex:r,endIndex:r+a.length-1}]}return h&&y.parsed&&(y.parsed.not=!0),y},unparse(a){if(a===null)return"";const d=a.not?"not ":"";switch(a.operator){case"true":case"null":return d+a.operator;case"false_or_null":return d+"false";case"false":return d+"=false"}}}),Ti}var tt={},Ki={exports:{}},ld=Ki.exports,v0;function La(){return v0||(v0=1,function(a){(function(d,y){a.exports?a.exports=y():d.nearley=y()})(ld,function(){function d(i,e,s){return this.id=++d.highestId,this.name=i,this.symbols=e,this.postprocess=s,this}d.highestId=0,d.prototype.toString=function(i){var e=typeof i>"u"?this.symbols.map(t).join(" "):this.symbols.slice(0,i).map(t).join(" ")+" ● "+this.symbols.slice(i).map(t).join(" ");return this.name+" → "+e};function y(i,e,s,l){this.rule=i,this.dot=e,this.reference=s,this.data=[],this.wantedBy=l,this.isComplete=this.dot===i.symbols.length}y.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},y.prototype.nextState=function(i){var e=new y(this.rule,this.dot+1,this.reference,this.wantedBy);return e.left=this,e.right=i,e.isComplete&&(e.data=e.build(),e.right=void 0),e},y.prototype.build=function(){var i=[],e=this;do i.push(e.right.data),e=e.left;while(e.left);return i.reverse(),i},y.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,r.fail))};function m(i,e){this.grammar=i,this.index=e,this.states=[],this.wants={},this.scannable=[],this.completed={}}m.prototype.process=function(i){for(var e=this.states,s=this.wants,l=this.completed,c=0;c<e.length;c++){var p=e[c];if(p.isComplete){if(p.finish(),p.data!==r.fail){for(var v=p.wantedBy,x=v.length;x--;){var g=v[x];this.complete(g,p)}if(p.reference===this.index){var _=p.rule.name;(this.completed[_]=this.completed[_]||[]).push(p)}}}else{var _=p.rule.symbols[p.dot];if(typeof _!="string"){this.scannable.push(p);continue}if(s[_]){if(s[_].push(p),l.hasOwnProperty(_))for(var A=l[_],x=0;x<A.length;x++){var E=A[x];this.complete(p,E)}}else s[_]=[p],this.predict(_)}}},m.prototype.predict=function(i){for(var e=this.grammar.byName[i]||[],s=0;s<e.length;s++){var l=e[s],c=this.wants[i],p=new y(l,0,this.index,c);this.states.push(p)}},m.prototype.complete=function(i,e){var s=i.nextState(e);this.states.push(s)};function h(i,e){this.rules=i,this.start=e||this.rules[0].name;var s=this.byName={};this.rules.forEach(function(l){s.hasOwnProperty(l.name)||(s[l.name]=[]),s[l.name].push(l)})}h.fromCompiled=function(l,e){var s=l.Lexer;l.ParserStart&&(e=l.ParserStart,l=l.ParserRules);var l=l.map(function(p){return new d(p.name,p.symbols,p.postprocess)}),c=new h(l,e);return c.lexer=s,c};function u(){this.reset("")}u.prototype.reset=function(i,e){this.buffer=i,this.index=0,this.line=e?e.line:1,this.lastLineBreak=e?-e.col:0},u.prototype.next=function(){if(this.index<this.buffer.length){var i=this.buffer[this.index++];return i===`
|
|
659
|
-
`&&(this.line+=1,this.lastLineBreak=this.index),{value:i}}},u.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},u.prototype.formatError=function(i,e){var s=this.buffer;if(typeof s=="string"){var l=s.split(`
|
|
660
|
-
`).slice(Math.max(0,this.line-5),this.line),c=s.indexOf(`
|
|
661
|
-
`,this.index);c===-1&&(c=s.length);var p=this.index-this.lastLineBreak,v=String(this.line).length;return e+=" at line "+this.line+" col "+p+`:
|
|
662
|
-
|
|
663
|
-
`,e+=l.map(function(g,_){return x(this.line-l.length+_+1,v)+" "+g},this).join(`
|
|
664
|
-
`),e+=`
|
|
665
|
-
`+x("",v+p)+`^
|
|
666
|
-
`,e}else return e+" at index "+(this.index-1);function x(g,_){var A=String(g);return Array(_-A.length+1).join(" ")+A}};function r(i,e,s){if(i instanceof h)var l=i,s=e;else var l=h.fromCompiled(i,e);this.grammar=l,this.options={keepHistory:!1,lexer:l.lexer||new u};for(var c in s||{})this.options[c]=s[c];this.lexer=this.options.lexer,this.lexerState=void 0;var p=new m(l,0);this.table=[p],p.wants[l.start]=[],p.predict(l.start),p.process(),this.current=0}r.fail={},r.prototype.feed=function(i){var e=this.lexer;e.reset(i,this.lexerState);for(var s;;){try{if(s=e.next(),!s)break}catch(w){var v=new m(this.grammar,this.current+1);this.table.push(v);var l=new Error(this.reportLexerError(w));throw l.offset=this.current,l.token=w.token,l}var c=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var p=this.current+1,v=new m(this.grammar,p);this.table.push(v);for(var x=s.text!==void 0?s.text:s.value,g=e.constructor===u?s.value:s,_=c.scannable,A=_.length;A--;){var E=_[A],D=E.rule.symbols[E.dot];if(D.test?D.test(g):D.type?D.type===s.type:D.literal===x){var N=E.nextState({data:g,token:s,isToken:!0,reference:p-1});v.states.push(N)}}if(v.process(),v.states.length===0){var l=new Error(this.reportError(s));throw l.offset=this.current,l.token=s,l}this.options.keepHistory&&(c.lexerState=e.save()),this.current++}return c&&(this.lexerState=e.save()),this.results=this.finish(),this},r.prototype.reportLexerError=function(i){var e,s,l=i.token;return l?(e="input "+JSON.stringify(l.text[0])+" (lexer error)",s=this.lexer.formatError(l,"Syntax error")):(e="input (lexer error)",s=i.message),this.reportErrorCommon(s,e)},r.prototype.reportError=function(i){var e=(i.type?i.type+" token: ":"")+JSON.stringify(i.value!==void 0?i.value:i),s=this.lexer.formatError(i,"Syntax error");return this.reportErrorCommon(s,e)},r.prototype.reportErrorCommon=function(i,e){var s=[];s.push(i);var l=this.table.length-2,c=this.table[l],p=c.states.filter(function(x){var g=x.rule.symbols[x.dot];return g&&typeof g!="string"});if(p.length===0)s.push("Unexpected "+e+`. I did not expect any more input. Here is the state of my parse table:
|
|
667
|
-
`),this.displayStateStack(c.states,s);else{s.push("Unexpected "+e+`. Instead, I was expecting to see one of the following:
|
|
668
|
-
`);var v=p.map(function(x){return this.buildFirstStateStack(x,[])||[x]},this);v.forEach(function(x){var g=x[0],_=g.rule.symbols[g.dot],A=this.getSymbolDisplay(_);s.push("A "+A+" based on:"),this.displayStateStack(x,s)},this)}return s.push(""),s.join(`
|
|
669
|
-
`)},r.prototype.displayStateStack=function(i,e){for(var s,l=0,c=0;c<i.length;c++){var p=i[c],v=p.rule.toString(p.dot);v===s?l++:(l>0&&e.push(" ^ "+l+" more lines identical to this"),l=0,e.push(" "+v)),s=v}},r.prototype.getSymbolDisplay=function(i){return o(i)},r.prototype.buildFirstStateStack=function(i,e){if(e.indexOf(i)!==-1)return null;if(i.wantedBy.length===0)return[i];var s=i.wantedBy[0],l=[i].concat(e),c=this.buildFirstStateStack(s,l);return c===null?null:[i].concat(c)},r.prototype.save=function(){var i=this.table[this.current];return i.lexerState=this.lexerState,i},r.prototype.restore=function(i){var e=i.index;this.current=e,this.table[e]=i,this.table.splice(e+1),this.lexerState=i.lexerState,this.results=this.finish()},r.prototype.rewind=function(i){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[i])},r.prototype.finish=function(){var i=[],e=this.grammar.start,s=this.table[this.table.length-1];return s.states.forEach(function(l){l.rule.name===e&&l.dot===l.rule.symbols.length&&l.reference===0&&l.data!==r.fail&&i.push(l)}),i.map(function(l){return l.data})};function o(i){var e=typeof i;if(e==="string")return i;if(e==="object"){if(i.literal)return JSON.stringify(i.literal);if(i instanceof RegExp)return"character matching "+i;if(i.type)return i.type+" token";if(i.test)return"token matching "+String(i.test);throw new Error("Unknown symbol type: "+i)}}function t(i){var e=typeof i;if(e==="string")return i;if(e==="object"){if(i.literal)return JSON.stringify(i.literal);if(i instanceof RegExp)return i.toString();if(i.type)return"%"+i.type;if(i.test)return"<"+String(i.test)+">";throw new Error("Unknown symbol type: "+i)}}return{Parser:r,Grammar:h,Rule:d}})}(Ki)),Ki.exports}var qn={},Ji={exports:{}},cd=Ji.exports,E0;function Ba(){return E0||(E0=1,function(a){(function(d,y){a.exports?a.exports=y():d.moo=y()})(cd,function(){var d=Object.prototype.hasOwnProperty,y=Object.prototype.toString,m=typeof new RegExp().sticky=="boolean";function h(L){return L&&y.call(L)==="[object RegExp]"}function u(L){return L&&typeof L=="object"&&!h(L)&&!Array.isArray(L)}function r(L){return L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(L){var M=new RegExp("|"+L);return M.exec("").length-1}function t(L){return"("+L+")"}function i(L){if(!L.length)return"(?!)";var M=L.map(function(W){return"(?:"+W+")"}).join("|");return"(?:"+M+")"}function e(L){if(typeof L=="string")return"(?:"+r(L)+")";if(h(L)){if(L.ignoreCase)throw new Error("RegExp /i flag not allowed");if(L.global)throw new Error("RegExp /g flag is implied");if(L.sticky)throw new Error("RegExp /y flag is implied");if(L.multiline)throw new Error("RegExp /m flag is implied");return L.source}else throw new Error("Not a pattern: "+L)}function s(L,M){return L.length>M?L:Array(M-L.length+1).join(" ")+L}function l(L,M){for(var W=L.length,Z=0;;){var I=L.lastIndexOf(`
|
|
670
|
-
`,W-1);if(I===-1||(Z++,W=I,Z===M)||W===0)break}var Q=Z<M?0:W+1;return L.substring(Q).split(`
|
|
671
|
-
`)}function c(L){for(var M=Object.getOwnPropertyNames(L),W=[],Z=0;Z<M.length;Z++){var I=M[Z],Q=L[I],re=[].concat(Q);if(I==="include"){for(var fe=0;fe<re.length;fe++)W.push({include:re[fe]});continue}var ie=[];re.forEach(function(J){u(J)?(ie.length&&W.push(v(I,ie)),W.push(v(I,J)),ie=[]):ie.push(J)}),ie.length&&W.push(v(I,ie))}return W}function p(L){for(var M=[],W=0;W<L.length;W++){var Z=L[W];if(Z.include){for(var I=[].concat(Z.include),Q=0;Q<I.length;Q++)M.push({include:I[Q]});continue}if(!Z.type)throw new Error("Rule has no type: "+JSON.stringify(Z));M.push(v(Z.type,Z))}return M}function v(L,M){if(u(M)||(M={match:M}),M.include)throw new Error("Matching rules cannot also include states");var W={defaultType:L,lineBreaks:!!M.error||!!M.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var Z in M)d.call(M,Z)&&(W[Z]=M[Z]);if(typeof W.type=="string"&&L!==W.type)throw new Error("Type transform cannot be a string (type '"+W.type+"' for token '"+L+"')");var I=W.match;return W.match=Array.isArray(I)?I:I?[I]:[],W.match.sort(function(Q,re){return h(Q)&&h(re)?0:h(re)?-1:h(Q)?1:re.length-Q.length}),W}function x(L){return Array.isArray(L)?p(L):c(L)}var g=v("error",{lineBreaks:!0,shouldThrow:!0});function _(L,M){for(var W=null,Z=Object.create(null),I=!0,Q=null,re=[],fe=[],ie=0;ie<L.length;ie++)L[ie].fallback&&(I=!1);for(var ie=0;ie<L.length;ie++){var J=L[ie];if(J.include)throw new Error("Inheritance is not allowed in stateless lexers");if(J.error||J.fallback){if(W)throw!J.fallback==!W.fallback?new Error("Multiple "+(J.fallback?"fallback":"error")+" rules not allowed (for token '"+J.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+J.defaultType+"')");W=J}var te=J.match.slice();if(I)for(;te.length&&typeof te[0]=="string"&&te[0].length===1;){var pe=te.shift();Z[pe.charCodeAt(0)]=J}if(J.pop||J.push||J.next){if(!M)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+J.defaultType+"')");if(J.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+J.defaultType+"')")}if(te.length!==0){I=!1,re.push(J);for(var O=0;O<te.length;O++){var T=te[O];if(h(T)){if(Q===null)Q=T.unicode;else if(Q!==T.unicode&&J.fallback===!1)throw new Error("If one rule is /u then all must be")}}var C=i(te.map(e)),F=new RegExp(C);if(F.test(""))throw new Error("RegExp matches empty string: "+F);var q=o(C);if(q>0)throw new Error("RegExp has capture groups: "+F+`
|
|
672
|
-
Use (?: … ) instead`);if(!J.lineBreaks&&F.test(`
|
|
673
|
-
`))throw new Error("Rule should declare lineBreaks: "+F);fe.push(t(C))}}var b=W&&W.fallback,R=m&&!b?"ym":"gm",B=m||b?"":"|";Q===!0&&(R+="u");var V=new RegExp(i(fe)+B,R);return{regexp:V,groups:re,fast:Z,error:W||g}}function A(L){var M=_(x(L));return new w({start:M},"start")}function E(L,M,W){var Z=L&&(L.push||L.next);if(Z&&!W[Z])throw new Error("Missing state '"+Z+"' (in token '"+L.defaultType+"' of state '"+M+"')");if(L&&L.pop&&+L.pop!=1)throw new Error("pop must be 1 (in token '"+L.defaultType+"' of state '"+M+"')")}function D(L,M){var W=L.$all?x(L.$all):[];delete L.$all;var Z=Object.getOwnPropertyNames(L);M||(M=Z[0]);for(var I=Object.create(null),Q=0;Q<Z.length;Q++){var re=Z[Q];I[re]=x(L[re]).concat(W)}for(var Q=0;Q<Z.length;Q++)for(var re=Z[Q],fe=I[re],ie=Object.create(null),J=0;J<fe.length;J++){var te=fe[J];if(te.include){var pe=[J,1];if(te.include!==re&&!ie[te.include]){ie[te.include]=!0;var O=I[te.include];if(!O)throw new Error("Cannot include nonexistent state '"+te.include+"' (in state '"+re+"')");for(var T=0;T<O.length;T++){var C=O[T];fe.indexOf(C)===-1&&pe.push(C)}}fe.splice.apply(fe,pe),J--}}for(var F=Object.create(null),Q=0;Q<Z.length;Q++){var re=Z[Q];F[re]=_(I[re],!0)}for(var Q=0;Q<Z.length;Q++){for(var q=Z[Q],b=F[q],R=b.groups,J=0;J<R.length;J++)E(R[J],q,F);for(var B=Object.getOwnPropertyNames(b.fast),J=0;J<B.length;J++)E(b.fast[B[J]],q,F)}return new w(F,M)}function N(L){for(var M=typeof Map<"u",W=M?new Map:Object.create(null),Z=Object.getOwnPropertyNames(L),I=0;I<Z.length;I++){var Q=Z[I],re=L[Q],fe=Array.isArray(re)?re:[re];fe.forEach(function(ie){if(typeof ie!="string")throw new Error("keyword must be string (in keyword '"+Q+"')");M?W.set(ie,Q):W[ie]=Q})}return function(ie){return M?W.get(ie):W[ie]}}var w=function(L,M){this.startState=M,this.states=L,this.buffer="",this.stack=[],this.reset()};w.prototype.reset=function(L,M){return this.buffer=L||"",this.index=0,this.line=M?M.line:1,this.col=M?M.col:1,this.queuedToken=M?M.queuedToken:null,this.queuedText=M?M.queuedText:"",this.queuedThrow=M?M.queuedThrow:null,this.setState(M?M.state:this.startState),this.stack=M&&M.stack?M.stack.slice():[],this},w.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},w.prototype.setState=function(L){if(!(!L||this.state===L)){this.state=L;var M=this.states[L];this.groups=M.groups,this.error=M.error,this.re=M.regexp,this.fast=M.fast}},w.prototype.popState=function(){this.setState(this.stack.pop())},w.prototype.pushState=function(L){this.stack.push(this.state),this.setState(L)};var P=m?function(L,M){return L.exec(M)}:function(L,M){var W=L.exec(M);return W[0].length===0?null:W};w.prototype._getGroup=function(L){for(var M=this.groups.length,W=0;W<M;W++)if(L[W+1]!==void 0)return this.groups[W];throw new Error("Cannot find token type for matched text")};function j(){return this.value}if(w.prototype.next=function(){var L=this.index;if(this.queuedGroup){var M=this._token(this.queuedGroup,this.queuedText,L);return this.queuedGroup=null,this.queuedText="",M}var W=this.buffer;if(L!==W.length){var re=this.fast[W.charCodeAt(L)];if(re)return this._token(re,W.charAt(L),L);var Z=this.re;Z.lastIndex=L;var I=P(Z,W),Q=this.error;if(I==null)return this._token(Q,W.slice(L,W.length),L);var re=this._getGroup(I),fe=I[0];return Q.fallback&&I.index!==L?(this.queuedGroup=re,this.queuedText=fe,this._token(Q,W.slice(L,I.index),L)):this._token(re,fe,L)}},w.prototype._token=function(L,M,W){var Z=0;if(L.lineBreaks){var I=/\n/g,Q=1;if(M===`
|
|
674
|
-
`)Z=1;else for(;I.exec(M);)Z++,Q=I.lastIndex}var re={type:typeof L.type=="function"&&L.type(M)||L.defaultType,value:typeof L.value=="function"?L.value(M):M,text:M,toString:j,offset:W,lineBreaks:Z,line:this.line,col:this.col},fe=M.length;if(this.index+=fe,this.line+=Z,Z!==0?this.col=fe-Q+1:this.col+=fe,L.shouldThrow){var ie=new Error(this.formatError(re,"invalid syntax"));throw ie}return L.pop?this.popState():L.push?this.pushState(L.push):L.next&&this.setState(L.next),re},typeof Symbol<"u"&&Symbol.iterator){var Y=function(L){this.lexer=L};Y.prototype.next=function(){var L=this.lexer.next();return{value:L,done:!L}},Y.prototype[Symbol.iterator]=function(){return this},w.prototype[Symbol.iterator]=function(){return new Y(this)}}return w.prototype.formatError=function(L,M){if(L==null)var W=this.buffer.slice(this.index),L={text:W,offset:this.index,lineBreaks:W.indexOf(`
|
|
675
|
-
`)===-1?0:1,line:this.line,col:this.col};var Z=2,I=Math.max(L.line-Z,1),Q=L.line+Z,re=String(Q).length,fe=l(this.buffer,this.line-L.line+Z+1).slice(0,5),ie=[];ie.push(M+" at line "+L.line+" col "+L.col+":"),ie.push("");for(var J=0;J<fe.length;J++){var te=fe[J],pe=I+J;ie.push(s(String(pe),re)+" "+te),pe===L.line&&ie.push(s("",re+L.col+1)+"^")}return ie.join(`
|
|
676
|
-
`)},w.prototype.clone=function(){return new w(this.states,this.state)},w.prototype.has=function(L){return!0},{compile:A,states:D,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:N}})}(Ji)),Ji.exports}var je={},S0;function xo(){if(S0)return je;S0=1,Object.defineProperty(je,"__esModule",{value:!0}),je.maybeNot=d,je.unescape=y,je.escape=m,je.matchOp=u,je.conjoin=o,je.joinNumbers=t,je.mkRange=i,je.mkValues=e,je.numNot=s,je.temporalNot=l,je.joinTemporal=c,je.timeLiteral=p,je.mkUnits=v;const a=Qn();function d(x){const[g,_]=x;return g&&_&&(0,a.isStringFilter)(_)?{..._,not:!0}:_}function y(x){return x.replace(/\\(.)/g,"$1")}function m(x){const g=x.toLowerCase();return g==="null"||g==="empty"?"\\"+x:x.replace(/([,; |()\\%_-])/g,"\\$1")}function h(x){let g=!1,_=!1,A=0,E=!1;const D=x.length;for(let N=0;N<D;N+=1){const w=x[N];if(w===" "||w===" "){A+=1;continue}A=0,w==="%"?(E=!0,N===0&&(g=!0),_=!0):(_=!1,w==="\\"?N+=1:w==="_"&&(E=!0))}return{hasLike:E,percentEnd:_&&D>1,percentStart:g&&D>1,endSpace:A}}function u(x){let g=x.trimStart();const{hasLike:_,percentEnd:A,percentStart:E,endSpace:D}=h(g);if(D>0&&(g=g.slice(0,-D)),_){if(E&&A){const N=g.slice(1,-1);if(!h(N).hasLike&&N.length>0)return{operator:"contains",values:[y(N)]}}else if(A){const N=g.slice(0,-1);if(!h(N).hasLike)return{operator:"starts",values:[y(N)]}}else if(E){const N=g.slice(1);if(!h(N).hasLike)return{operator:"ends",values:[y(N)]}}return{operator:"~",escaped_values:[g]}}return g.toLowerCase()==="null"?{operator:"null"}:g.toLowerCase()==="empty"?{operator:"empty"}:{operator:"=",values:[y(g)]}}function r(x,g){var _,A;return x.operator===g.operator&&((_=x.not)!==null&&_!==void 0?_:!1)===((A=g.not)!==null&&A!==void 0?A:!1)}function o(x,g,_){if(g=g.toLowerCase(),(0,a.isStringFilter)(x)&&(0,a.isStringFilter)(_)){if(g===","){if(x.operator==="~"&&r(x,_))return{...x,escaped_values:[...x.escaped_values,..._.escaped_values]};if((0,a.isStringCondition)(x)&&r(x,_))return{...x,values:[...x.values,..._.values]}}const A=g===","?",":g==="|"?"or":g===";"?"and":void 0;if(A)return x.operator===A?{...x,members:[...x.members,_]}:{operator:A,members:[x,_]}}return null}function t(x,g,_){if(g=g.toLowerCase(),(0,a.isNumberFilter)(x)&&(0,a.isNumberFilter)(_)){if(g==="or"&&x.operator==="="&&r(x,_)){const A={operator:"=",values:[...x.values,..._.values]};return x.not&&(A.not=!0),A}if(g==="and"||g==="or")return x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}}return null}function i(x,g,_,A){return{operator:"range",startValue:g,startOperator:x==="("?">":">=",endValue:_,endOperator:A===")"?"<":"<="}}function e(x,g){return{values:[x,...g]}}function s(x,g){return(0,a.isNumberFilter)(x)&&g?x.operator==="="?{operator:"!=",values:x.values}:x.operator==="!="?{operator:"=",values:x.values}:{...x,not:!0}:x}function l(x,g){return(0,a.isTemporalFilter)(x)&&g?{...x,not:!0}:x}function c(x,g,_){return g=g.toLowerCase(),(0,a.isTemporalFilter)(x)&&(0,a.isTemporalFilter)(_)&&(g==="and"||g==="or")?x.operator===g?{...x,members:[...x.members,_]}:{operator:g,members:[x,_]}:null}function p(x,g){const _={moment:"literal",literal:x};return g&&(_.units=g),_}function v(x){switch(x.toLowerCase()){case"second":case"seconds":return"second";case"minute":case"minutes":return"minute";case"hour":case"hours":return"hour";case"day":case"days":return"day";case"week":case"weeks":return"week";case"month":case"months":return"month";case"quarter":case"quarters":return"quarter";case"year":case"years":return"year"}}return je}var T0;function fd(){if(T0)return qn;T0=1;var a=qn&&qn.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qn,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",obrack:"[",cbrack:"]",comma:",",op:/<=|>=|<|>/,ne:"!=",eq:"=",float:/-?(?:\d+)?\.\d+(?:[Ee][+-]?\d+)?/,numberE:/-?\d+[Ee][+-]?\d+/,integer:/-?\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"numberFilter",symbols:["numberFilter","conjunction","numberUnary"],postprocess:([t,i,e])=>(0,m.joinNumbers)(t,i[0].text,e)},{name:"numberFilter",symbols:["numberUnary"],postprocess:t=>t[0]},{name:"numberUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"numberUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"numberUnary",symbols:["numberUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.numNot)(i,t)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause$ebnf$1",symbols:[]},{name:"clause$ebnf$1",symbols:["clause$ebnf$1","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:["N","clause$ebnf$1"],postprocess:([t,i])=>({operator:"=",...(0,m.mkValues)(t,i)})},{name:"clause$ebnf$2",symbols:[]},{name:"clause$ebnf$2",symbols:["clause$ebnf$2","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("eq")?{type:"eq"}:eq,"N","clause$ebnf$2"],postprocess:([t,i,e])=>({operator:"=",...(0,m.mkValues)(i,e)})},{name:"clause$ebnf$3",symbols:[]},{name:"clause$ebnf$3",symbols:["clause$ebnf$3","numberList"],postprocess:t=>t[0].concat([t[1]])},{name:"clause",symbols:[u.has("ne")?{type:"ne"}:ne,"N","clause$ebnf$3"],postprocess:([t,i,e])=>({operator:"!=",...(0,m.mkValues)(i,e)})},{name:"clause",symbols:[u.has("op")?{type:"op"}:op,"N"],postprocess:([t,i])=>({operator:t.text,values:[i]})},{name:"clause",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"numberFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"clause",symbols:["openInterval","N",u.has("TO")?{type:"TO"}:TO,"N","closeInterval"],postprocess:([t,i,e,s,l])=>(0,m.mkRange)(t[0].text,i,s,l[0].text)},{name:"numberList",symbols:[u.has("comma")?{type:"comma"}:comma,"N"],postprocess:([t,i])=>i},{name:"closeInterval",symbols:[u.has("cbrack")?{type:"cbrack"}:cbrack]},{name:"closeInterval",symbols:[u.has("cparen")?{type:"cparen"}:cparen]},{name:"openInterval",symbols:[u.has("obrack")?{type:"obrack"}:obrack]},{name:"openInterval",symbols:[u.has("oparen")?{type:"oparen"}:oparen]},{name:"N$subexpression$1",symbols:[u.has("float")?{type:"float"}:float]},{name:"N$subexpression$1",symbols:[u.has("numberE")?{type:"numberE"}:numberE]},{name:"N$subexpression$1",symbols:[u.has("integer")?{type:"integer"}:integer]},{name:"N",symbols:["N$subexpression$1"],postprocess:([t])=>t[0].text},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"numberFilter"};return qn.default=o,qn}var Hi={},b0;function ka(){if(b0)return Hi;b0=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.run_parser=d;const a=Qn();function d(y,m){try{m.feed(y);const u=m.finish()[0];return(0,a.isFilterExpression)(u)?{parsed:u,log:[]}:{parsed:null,log:[]}}catch(h){let u=h.message,r=1,o=y.length;if(h.token){const t=h.token;r=t.col,o=t.text.length;const e=h.message.match(/(?<=A ).*(?= based on:)/g).map(s=>s.replace(/\s+token/i,""));u=`Unexpected ${t.type} token "${t.value}"`,e&&e.length&&(u+=` Tokens expected: ${[...new Set(e)]}`)}return{parsed:null,log:[{message:u,startIndex:r-1,endIndex:r-1+o-1,severity:"error"}]}}}return Hi}var N0;function pd(){return N0||(N0=1,function(a){var d=tt&&tt.__createBinding||(Object.create?function(i,e,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(e,s);(!c||("get"in c?!e.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return e[s]}}),Object.defineProperty(i,l,c)}:function(i,e,s,l){l===void 0&&(l=s),i[l]=e[s]}),y=tt&&tt.__setModuleDefault||(Object.create?function(i,e){Object.defineProperty(i,"default",{enumerable:!0,value:e})}:function(i,e){i.default=e}),m=tt&&tt.__importStar||function(){var i=function(e){return i=Object.getOwnPropertyNames||function(s){var l=[];for(var c in s)Object.prototype.hasOwnProperty.call(s,c)&&(l[l.length]=c);return l},i(e)};return function(e){if(e&&e.__esModule)return e;var s={};if(e!=null)for(var l=i(e),c=0;c<l.length;c++)l[c]!=="default"&&d(s,e,l[c]);return y(s,e),s}}(),h=tt&&tt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(a,"__esModule",{value:!0}),a.NumberFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(fd()),t=ka();a.NumberFilterExpression={parse(i){if(i.match(/^\s*$/))return{parsed:null,log:[]};const e=new r.Parser(r.Grammar.fromCompiled(o.default)),s=(0,t.run_parser)(i,e);return s.parsed&&(0,u.isNumberFilter)(s.parsed)?{parsed:s.parsed,log:[]}:{parsed:null,log:s.log}},unparse(i){if(i===null)return"";switch(i.operator){case"=":return i.values.join(", ");case"!=":return"!= "+i.values.join(", ");case">":case"<":case"<=":case">=":return i.not?i.values.map(e=>i.operator==="="?`not ${e}`:`not ${i.operator} ${e}`).join(", "):i.values.map(e=>`${i.operator} ${e}`).join(", ");case"range":{const e=i.startOperator===">"?"(":"[",s=i.endOperator==="<"?")":"]",l=`${e}${i.startValue} to ${i.endValue}${s}`;return i.not?`not ${l}`:l}case"null":return i.not?"not null":"null";case"and":case"or":return i.members.map(e=>a.NumberFilterExpression.unparse(e)).join(` ${i.operator} `);case"()":{const e="("+a.NumberFilterExpression.unparse(i.expr)+")";return i.not?"not "+e:e}}return`no unparse for ${JSON.stringify(i)}`}}}(tt)),tt}var rt={},jn={},C0;function hd(){if(C0)return jn;C0=1;var a=jn&&jn.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(jn,"__esModule",{value:!0});function d(o){return o[0]}const y=a(Ba()),m=xo(),h=y.default.compile({WS:/[ \t]+/,comma:",",semi:";",or:"|",open:"(",close:")",minus:"-",matchStr:/(?:\\[^\n]|[^\n,;()|])+/}),u=h.next;h.next=(o=>()=>{for(;;){const t=o.call(h);if(t==null||t.type!=="WS")return t}})(u);const r={Lexer:h,ParserRules:[{name:"stringFilter",symbols:["stringFilter","conjunction","sfUnary"],postprocess:([o,t,i])=>(0,m.conjoin)(o,t[0].text,i)},{name:"stringFilter",symbols:["sfUnary"],postprocess:o=>o[0]},{name:"sfUnary$ebnf$1",symbols:[h.has("minus")?{type:"minus"}:minus],postprocess:d},{name:"sfUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"sfUnary",symbols:["sfUnary$ebnf$1","clause"],postprocess:o=>(0,m.maybeNot)(o)},{name:"parens",symbols:[h.has("open")?{type:"open"}:open,"stringFilter",h.has("close")?{type:"close"}:close],postprocess:([o,t,i])=>({operator:"()",expr:t})},{name:"clause",symbols:[h.has("matchStr")?{type:"matchStr"}:matchStr],postprocess:([o])=>(0,m.matchOp)(o.text)},{name:"clause",symbols:["parens"],postprocess:o=>o[0]},{name:"conjunction",symbols:[h.has("comma")?{type:"comma"}:comma]},{name:"conjunction",symbols:[h.has("semi")?{type:"semi"}:semi]},{name:"conjunction",symbols:[h.has("or")?{type:"or"}:or]}],ParserStart:"stringFilter"};return jn.default=r,jn}var O0;function xd(){return O0||(O0=1,function(a){var d=rt&&rt.__createBinding||(Object.create?function(e,s,l,c){c===void 0&&(c=l);var p=Object.getOwnPropertyDescriptor(s,l);(!p||("get"in p?!s.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return s[l]}}),Object.defineProperty(e,c,p)}:function(e,s,l,c){c===void 0&&(c=l),e[c]=s[l]}),y=rt&&rt.__setModuleDefault||(Object.create?function(e,s){Object.defineProperty(e,"default",{enumerable:!0,value:s})}:function(e,s){e.default=s}),m=rt&&rt.__importStar||function(){var e=function(s){return e=Object.getOwnPropertyNames||function(l){var c=[];for(var p in l)Object.prototype.hasOwnProperty.call(l,p)&&(c[c.length]=p);return c},e(s)};return function(s){if(s&&s.__esModule)return s;var l={};if(s!=null)for(var c=e(s),p=0;p<c.length;p++)c[p]!=="default"&&d(l,s,c[p]);return y(l,s),l}}(),h=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.StringFilterExpression=void 0;const u=Qn(),r=m(La()),o=h(hd()),t=xo(),i=ka();a.StringFilterExpression={parse(e){if(e.match(/^\s*$/))return{parsed:null,log:[]};const s=new r.Parser(r.Grammar.fromCompiled(o.default)),l=(0,i.run_parser)(e,s);return l.parsed&&(0,u.isStringFilter)(l.parsed)?{parsed:l.parsed,log:[]}:{parsed:null,log:l.log}},unparse(e){if(e===null)return"";switch(e.operator){case"=":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)).join(", "):e.values.map(s=>(0,t.escape)(s)).join(", ");case"~":return e.not?e.escaped_values.map(s=>"-"+s).join(", "):e.escaped_values.join(", ");case"starts":return e.not?e.values.map(s=>"-"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>(0,t.escape)(s)+"%").join(", ");case"ends":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)).join(", "):e.values.map(s=>"%"+(0,t.escape)(s)).join(", ");case"contains":return e.not?e.values.map(s=>"-%"+(0,t.escape)(s)+"%").join(", "):e.values.map(s=>"%"+(0,t.escape)(s)+"%").join(", ");case"or":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(" | ");case"and":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join("; ");case",":return e.members.map(s=>a.StringFilterExpression.unparse(s)).join(", ");case"()":{const s="("+a.StringFilterExpression.unparse(e.expr)+")";return e.not?"-"+s:s}case"null":return e.not?"-null":"null";case"empty":return e.not?"-empty":"empty"}}}}(rt)),rt}var nt={},$n={},D0;function dd(){if(D0)return $n;D0=1;var a=$n&&$n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($n,"__esModule",{value:!0});function d(t){return t[0]}const y=a(Ba()),m=xo(),h=y.default.keywords({AND:"and",OR:"or",NOT:"not",NULL_KW:"null",TO:"to",NOW:"now",LAST:"last",THIS:"this",NEXT:"next",AGO:"ago",FROM:"from",BEFORE:"before",AFTER:"after",THROUGH:"through",STARTING:"starting",FOR:"for",TODAY:"today",YESTERDAY:"yesterday",TOMORROW:"tomorrow",SECOND:"second",MINUTE:"minute",HOUR:"hour",DAY:"day",WEEK:"week",MONTH:"month",QUARTER:"quarter",YEAR:"year",SECONDS:"seconds",MINUTES:"minutes",HOURS:"hours",DAYS:"days",WEEKS:"weeks",MONTHS:"months",QUARTERS:"quarters",YEARS:"years",MONDAY:"monday",TUESDAY:"tuesday",WEDNESDAY:"wednesday",THURSDAY:"thursday",FRIDAY:"friday",SATURDAY:"saturday",SUNDAY:"sunday"}),u=y.default.compile({WS:/[ \t]+/,id:{match:/[a-zA-Z]+/,type:t=>h(t.toLowerCase())},oparen:"(",cparen:")",comma:",",literal:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d(?::\d\d(?:[.,]\d*)?)/,lit_week:/\d\d\d\d-\d\d-\d\d-[Ww][Kk]/,lit_quarter:/\d\d\d\d-[qQ][1234]/,lit_min:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d:\d\d/,lit_hour:/\d\d\d\d-\d\d-\d\d[ Tt]\d\d/,lit_day:/\d\d\d\d-\d\d-\d\d/,lit_month:/\d\d\d\d-\d\d/,lit_year:/\d\d\d\d/,n:/\d+/}),r=u.next;u.next=(t=>()=>{for(;;){const i=t.call(u);if(i===void 0||i.type!=="WS")return i}})(r);const o={Lexer:u,ParserRules:[{name:"temporalFilter",symbols:["temporalFilter","conjunction","temporalUnary"],postprocess:([t,i,e])=>(0,m.joinTemporal)(t,i[0].text,e)},{name:"temporalFilter",symbols:["temporalUnary"],postprocess:t=>t[0]},{name:"temporalUnary$ebnf$1",symbols:[u.has("NOT")?{type:"NOT"}:NOT],postprocess:d},{name:"temporalUnary$ebnf$1",symbols:[],postprocess:()=>null},{name:"temporalUnary",symbols:["temporalUnary$ebnf$1","clause"],postprocess:([t,i])=>(0,m.temporalNot)(i,t)},{name:"duration",symbols:["number","unit"],postprocess:([t,i])=>({units:i,n:t})},{name:"number",symbols:[u.has("n")?{type:"n"}:n],postprocess:([t])=>t.text},{name:"number",symbols:[u.has("lityear")?{type:"lityear"}:lityear],postprocess:([t])=>t.text},{name:"unit$subexpression$1",symbols:[u.has("SECOND")?{type:"SECOND"}:SECOND]},{name:"unit$subexpression$1",symbols:[u.has("MINUTE")?{type:"MINUTE"}:MINUTE]},{name:"unit$subexpression$1",symbols:[u.has("HOUR")?{type:"HOUR"}:HOUR]},{name:"unit$subexpression$1",symbols:[u.has("DAY")?{type:"DAY"}:DAY]},{name:"unit$subexpression$1",symbols:[u.has("WEEK")?{type:"WEEK"}:WEEK]},{name:"unit$subexpression$1",symbols:[u.has("MONTH")?{type:"MONTH"}:MONTH]},{name:"unit$subexpression$1",symbols:[u.has("QUARTER")?{type:"QUARTER"}:QUARTER]},{name:"unit$subexpression$1",symbols:[u.has("YEAR")?{type:"YEAR"}:YEAR]},{name:"unit$subexpression$1",symbols:[u.has("SECONDS")?{type:"SECONDS"}:SECONDS]},{name:"unit$subexpression$1",symbols:[u.has("MINUTES")?{type:"MINUTES"}:MINUTES]},{name:"unit$subexpression$1",symbols:[u.has("HOURS")?{type:"HOURS"}:HOURS]},{name:"unit$subexpression$1",symbols:[u.has("DAYS")?{type:"DAYS"}:DAYS]},{name:"unit$subexpression$1",symbols:[u.has("WEEKS")?{type:"WEEKS"}:WEEKS]},{name:"unit$subexpression$1",symbols:[u.has("MONTHS")?{type:"MONTHS"}:MONTHS]},{name:"unit$subexpression$1",symbols:[u.has("QUARTERS")?{type:"QUARTERS"}:QUARTERS]},{name:"unit$subexpression$1",symbols:[u.has("YEARS")?{type:"YEARS"}:YEARS]},{name:"unit",symbols:["unit$subexpression$1"],postprocess:([t])=>(0,m.mkUnits)(t[0].text)},{name:"clause",symbols:[u.has("NULL_KW")?{type:"NULL_KW"}:NULL_KW],postprocess:()=>({operator:"null"})},{name:"clause",symbols:["parens"],postprocess:t=>t[0]},{name:"clause",symbols:["duration"],postprocess:([t])=>({operator:"in_last",...t})},{name:"clause",symbols:[u.has("BEFORE")?{type:"BEFORE"}:BEFORE,"moment"],postprocess:([t,i])=>({operator:"before",before:i})},{name:"clause",symbols:[u.has("STARTING")?{type:"STARTING"}:STARTING,"moment"],postprocess:([t,i])=>({operator:"before",before:i,not:!0})},{name:"clause",symbols:[u.has("AFTER")?{type:"AFTER"}:AFTER,"moment"],postprocess:([t,i])=>({operator:"after",after:i})},{name:"clause",symbols:[u.has("THROUGH")?{type:"THROUGH"}:THROUGH,"moment"],postprocess:([t,i])=>({operator:"after",after:i,not:!0})},{name:"clause",symbols:["moment",u.has("TO")?{type:"TO"}:TO,"moment"],postprocess:([t,i,e])=>({operator:"to",fromMoment:t,toMoment:e})},{name:"clause",symbols:["moment",u.has("FOR")?{type:"FOR"}:FOR,"duration"],postprocess:([t,i,e])=>({...e,operator:"for",begin:t})},{name:"clause$subexpression$1",symbols:[u.has("LAST")?{type:"LAST"}:LAST]},{name:"clause$subexpression$1",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT]},{name:"clause",symbols:["clause$subexpression$1","duration"],postprocess:([t,i])=>({operator:t[0].text,...i})},{name:"clause",symbols:["moment"],postprocess:([t])=>({operator:"in",in:t})},{name:"lastNextThis",symbols:[u.has("THIS")?{type:"THIS"}:THIS],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT],postprocess:([t])=>t.text.toLowerCase()},{name:"lastNextThis",symbols:[u.has("LAST")?{type:"LAST"}:LAST],postprocess:([t])=>t.text.toLowerCase()},{name:"moment",symbols:[u.has("NOW")?{type:"NOW"}:NOW],postprocess:()=>({moment:"now"})},{name:"moment",symbols:["lastNextThis","unit"],postprocess:([t,i])=>({moment:t,units:i})},{name:"moment",symbols:[u.has("TODAY")?{type:"TODAY"}:TODAY],postprocess:()=>({moment:"today"})},{name:"moment",symbols:[u.has("YESTERDAY")?{type:"YESTERDAY"}:YESTERDAY],postprocess:()=>({moment:"yesterday"})},{name:"moment",symbols:[u.has("TOMORROW")?{type:"TOMORROW"}:TOMORROW],postprocess:()=>({moment:"tomorrow"})},{name:"moment",symbols:["duration",u.has("AGO")?{type:"AGO"}:AGO],postprocess:([t,i])=>({moment:"ago",...t})},{name:"moment",symbols:["duration",u.has("FROM")?{type:"FROM"}:FROM,u.has("NOW")?{type:"NOW"}:NOW],postprocess:([t,i])=>({moment:"from_now",...t})},{name:"moment",symbols:[u.has("NEXT")?{type:"NEXT"}:NEXT,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"next"})},{name:"moment",symbols:[u.has("LAST")?{type:"LAST"}:LAST,"weekday"],postprocess:([t,i])=>({moment:i.toLowerCase(),which:"last"})},{name:"moment",symbols:["weekday"],postprocess:([t])=>({moment:t.toLowerCase(),which:"last"})},{name:"moment",symbols:["timeLiteral"],postprocess:t=>t[0]},{name:"timeLiteral",symbols:[u.has("literal")?{type:"literal"}:literal],postprocess:([t])=>(0,m.timeLiteral)(t.text)},{name:"timeLiteral",symbols:[u.has("lit_day")?{type:"lit_day"}:lit_day],postprocess:([t])=>(0,m.timeLiteral)(t.text,"day")},{name:"timeLiteral",symbols:[u.has("lit_min")?{type:"lit_min"}:lit_min],postprocess:([t])=>(0,m.timeLiteral)(t.text,"minute")},{name:"timeLiteral",symbols:[u.has("lit_hour")?{type:"lit_hour"}:lit_hour],postprocess:([t])=>(0,m.timeLiteral)(t.text,"hour")},{name:"timeLiteral",symbols:[u.has("lit_month")?{type:"lit_month"}:lit_month],postprocess:([t])=>(0,m.timeLiteral)(t.text,"month")},{name:"timeLiteral",symbols:[u.has("lit_quarter")?{type:"lit_quarter"}:lit_quarter],postprocess:([t])=>(0,m.timeLiteral)(t.text,"quarter")},{name:"timeLiteral",symbols:[u.has("lit_week")?{type:"lit_week"}:lit_week],postprocess:([t])=>(0,m.timeLiteral)(t.text,"week")},{name:"timeLiteral",symbols:[u.has("lit_year")?{type:"lit_year"}:lit_year],postprocess:([t])=>(0,m.timeLiteral)(t.text,"year")},{name:"weekday$subexpression$1",symbols:[u.has("MONDAY")?{type:"MONDAY"}:MONDAY]},{name:"weekday$subexpression$1",symbols:[u.has("TUESDAY")?{type:"TUESDAY"}:TUESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("WEDNESDAY")?{type:"WEDNESDAY"}:WEDNESDAY]},{name:"weekday$subexpression$1",symbols:[u.has("THURSDAY")?{type:"THURSDAY"}:THURSDAY]},{name:"weekday$subexpression$1",symbols:[u.has("FRIDAY")?{type:"FRIDAY"}:FRIDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SATURDAY")?{type:"SATURDAY"}:SATURDAY]},{name:"weekday$subexpression$1",symbols:[u.has("SUNDAY")?{type:"SUNDAY"}:SUNDAY]},{name:"weekday",symbols:["weekday$subexpression$1"],postprocess:([t])=>t[0].text},{name:"parens",symbols:[u.has("oparen")?{type:"oparen"}:oparen,"temporalFilter",u.has("cparen")?{type:"cparen"}:cparen],postprocess:([t,i,e])=>({operator:"()",expr:i})},{name:"conjunction",symbols:[u.has("OR")?{type:"OR"}:OR]},{name:"conjunction",symbols:[u.has("AND")?{type:"AND"}:AND]}],ParserStart:"temporalFilter"};return $n.default=o,$n}var w0;function md(){return w0||(w0=1,function(a){var d=nt&&nt.__createBinding||(Object.create?function(l,c,p,v){v===void 0&&(v=p);var x=Object.getOwnPropertyDescriptor(c,p);(!x||("get"in x?!c.__esModule:x.writable||x.configurable))&&(x={enumerable:!0,get:function(){return c[p]}}),Object.defineProperty(l,v,x)}:function(l,c,p,v){v===void 0&&(v=p),l[v]=c[p]}),y=nt&&nt.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),m=nt&&nt.__importStar||function(){var l=function(c){return l=Object.getOwnPropertyNames||function(p){var v=[];for(var x in p)Object.prototype.hasOwnProperty.call(p,x)&&(v[v.length]=x);return v},l(c)};return function(c){if(c&&c.__esModule)return c;var p={};if(c!=null)for(var v=l(c),x=0;x<v.length;x++)v[x]!=="default"&&d(p,c,v[x]);return y(p,c),p}}(),h=nt&&nt.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=void 0;const u=Qn(),r=h(dd()),o=m(La()),t=ka();a.TemporalFilterExpression={parse(l){if(l.match(/^\s*$/))return{parsed:null,log:[]};const c=new o.Parser(o.Grammar.fromCompiled(r.default)),p=(0,t.run_parser)(l,c);return p.parsed&&(0,u.isTemporalFilter)(p.parsed)?{parsed:p.parsed,log:[]}:{parsed:null,log:p.log}},unparse(l){if(l===null)return"";switch(l.operator){case"null":return i(l,"null");case"in":return i(l,s(l.in));case"()":return"("+a.TemporalFilterExpression.unparse(l.expr)+")";case"in_last":return i(l,e(l));case"last":case"next":return i(l,`${l.operator} ${e(l)}`);case"before":return`${l.not?"starting":"before"} ${s(l.before)}`;case"after":return`${l.not?"through":"after"} ${s(l.after)}`;case"to":return i(l,`${s(l.fromMoment)} to ${s(l.toMoment)}`);case"for":return i(l,`${s(l.begin)} for ${e(l)}`);case"or":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" or ");case"and":return l.members.map(c=>a.TemporalFilterExpression.unparse(c)).join(" and ")}}};function i(l,c){return"not"in l&&l.not?"not "+c:c}function e(l){return l.n==="1"?`1 ${l.units}`:`${l.n} ${l.units}s`}function s(l){switch(l.moment){case"literal":return l.literal;case"now":case"today":case"yesterday":case"tomorrow":return l.moment;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return l.which==="next"?"next "+l.moment:l.moment;case"this":case"next":case"last":return`${l.moment} ${l.units}`;case"ago":return`${e(l)} ago`;case"from_now":return`${e(l)} from now`}}}(nt)),nt}var R0;function yd(){return R0||(R0=1,function(a){var d=Ln&&Ln.__createBinding||(Object.create?function(o,t,i,e){e===void 0&&(e=i);var s=Object.getOwnPropertyDescriptor(t,i);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(o,e,s)}:function(o,t,i,e){e===void 0&&(e=i),o[e]=t[i]}),y=Ln&&Ln.__exportStar||function(o,t){for(var i in o)i!=="default"&&!Object.prototype.hasOwnProperty.call(t,i)&&d(t,o,i)};Object.defineProperty(a,"__esModule",{value:!0}),a.TemporalFilterExpression=a.StringFilterExpression=a.NumberFilterExpression=a.BooleanFilterExpression=void 0,y(Qn(),a);var m=ud();Object.defineProperty(a,"BooleanFilterExpression",{enumerable:!0,get:function(){return m.BooleanFilterExpression}});var h=pd();Object.defineProperty(a,"NumberFilterExpression",{enumerable:!0,get:function(){return h.NumberFilterExpression}});var u=xd();Object.defineProperty(a,"StringFilterExpression",{enumerable:!0,get:function(){return u.StringFilterExpression}});var r=md();Object.defineProperty(a,"TemporalFilterExpression",{enumerable:!0,get:function(){return r.TemporalFilterExpression}})}(Ln)),Ln}var P0;function gd(){return P0||(P0=1,function(a){var d=ct&&ct.__createBinding||(Object.create?function(z,f,S,$){$===void 0&&($=S);var ue=Object.getOwnPropertyDescriptor(f,S);(!ue||("get"in ue?!f.__esModule:ue.writable||ue.configurable))&&(ue={enumerable:!0,get:function(){return f[S]}}),Object.defineProperty(z,$,ue)}:function(z,f,S,$){$===void 0&&($=S),z[$]=f[S]}),y=ct&&ct.__setModuleDefault||(Object.create?function(z,f){Object.defineProperty(z,"default",{enumerable:!0,value:f})}:function(z,f){z.default=f}),m=ct&&ct.__importStar||function(){var z=function(f){return z=Object.getOwnPropertyNames||function(S){var $=[];for(var ue in S)Object.prototype.hasOwnProperty.call(S,ue)&&($[$.length]=ue);return $},z(f)};return function(f){if(f&&f.__esModule)return f;var S={};if(f!=null)for(var $=z(f),ue=0;ue<$.length;ue++)$[ue]!=="default"&&d(S,f,$[ue]);return y(S,f),S}}();Object.defineProperty(a,"__esModule",{value:!0}),a.ASTAnnotationList=a.ASTLimitViewOperation=a.ASTView=a.ASTFilterWithLiteralEquality=a.ASTFilterWithFilterString=a.ASTFilter=a.ASTCalculateViewOperation=a.ASTHavingViewOperation=a.ASTDrillViewOperation=a.ASTWhereViewOperation=a.ASTNestViewOperation=a.ASTFilteredFieldExpression=a.ASTFilterOperationList=a.ASTFilterOperation=a.ASTMovingAverageExpression=a.ASTFieldReferenceList=a.ASTLiteralValueExpression=a.ASTTimeTruncationExpression=a.ASTReferenceExpression=a.ASTExpression=a.ASTField=a.ASTAggregateViewOperation=a.ASTGroupByViewOperation=a.ASTOrderByViewOperation=a.ASTViewOperation=a.ASTViewOperationList=a.ASTSegmentViewDefinition=a.ASTRefinementViewDefinition=a.ASTArrowViewDefinition=a.ASTReferenceViewDefinition=a.ASTReferenceQueryArrowSource=a.ASTReferenceQueryDefinition=a.ASTRefinementQueryDefinition=a.ASTArrowQueryDefinition=a.ASTQueryDefinition=a.ASTQueryArrowSource=a.ASTUnimplemented=a.ASTFilterExpressionLiteralValue=a.ASTTimestampLiteralValue=a.ASTDateLiteralValue=a.ASTBooleanLiteralValue=a.ASTNumberLiteralValue=a.ASTNullLiteralValue=a.ASTStringLiteralValue=a.ASTLiteralValue=a.ASTParameterValue=a.ASTParameterValueList=a.ASTFieldReference=a.ASTReference=a.ASTQuery=void 0,a.ASTAnnotation=void 0;const h=m(zp()),u=ad(),r=m(yd());class o{constructor(){this.edited=!1}edit(){return this.edited=!0,this._parent&&this._parent.edit(),this}get as(){const f=this;return{Query(){if(f instanceof s)return f;throw new Error("Not an ASTQuery")},Reference(){if(f instanceof l)return f;throw new Error("Not an ASTReference")},ReferenceQueryArrowSource(){if(f instanceof L)return f;throw new Error("Not an ASTReferenceQueryArrowSource")},ParameterValueList(){if(f instanceof p)return f;throw new Error("Not an ASTParameterValueList")},FilterOperation(){if(f instanceof R)return f;throw new Error("Not an ASTFilterOperation")},FilterOperationList(){if(f instanceof B)return f;throw new Error("Not an ASTFilterOperationList")},ParameterValue(){if(f instanceof v)return f;throw new Error("Not an ASTParameterValue")},StringLiteralValue(){if(f instanceof x)return f;throw new Error("Not an ASTStringLiteralValue")},NumberLiteralValue(){if(f instanceof _)return f;throw new Error("Not an ASTNumberLiteralValue")},ViewOperationList(){if(f instanceof ie)return f;throw new Error("Not an ASTViewOperationList")},GroupByViewOperation(){if(f instanceof te)return f;throw new Error("Not an ASTGroupByViewOperation")},AggregateViewOperation(){if(f instanceof pe)return f;throw new Error("Not an ASTAggregateViewOperation")},OrderByViewOperation(){if(f instanceof J)return f;throw new Error("Not an ASTOrderByViewOperation")},Field(){if(f instanceof O)return f;throw new Error("Not an ASTField")},ReferenceExpression(){if(f instanceof T)return f;throw new Error("Not an ASTReferenceExpression")},ReferenceViewDefinition(){if(f instanceof I)return f;throw new Error("Not an ASTReferenceViewDefinition")},ArrowQueryDefinition(){if(f instanceof P)return f;throw new Error("Not an ASTArrowQueryDefinition")},ArrowViewDefinition(){if(f instanceof Q)return f;throw new Error("Not an ASTArrowViewDefinition")},RefinementViewDefinition(){if(f instanceof re)return f;throw new Error("Not an ASTRefinementViewDefinition")},TimeTruncationExpression(){if(f instanceof C)return f;throw new Error("Not an ASTTimeTruncationExpression")},FilteredFieldExpression(){if(f instanceof V)return f;throw new Error("Not an ASTFilteredFieldExpression")},NestViewOperation(){if(f instanceof k)return f;throw new Error("Not an ASTNestViewOperation")},View(){if(f instanceof se)return f;throw new Error("Not an ASTView")},SegmentViewDefinition(){if(f instanceof fe)return f;throw new Error("Not an ASTSegmentViewDefinition")},LimitViewOperation(){if(f instanceof de)return f;throw new Error("Not an ASTLimitViewOperation")},AnnotationList(){if(f instanceof H)return f;throw new Error("Not an ASTAnnotationList")},Annotation(){if(f instanceof ee)return f;throw new Error("Not an ASTAnnotation")}}}get find(){const f=this;return{Query(S){return f.findAny(S).as.Query()},Reference(S){return f.findAny(S).as.Reference()},ReferenceQueryArrowSource(S){return f.findAny(S).as.ReferenceQueryArrowSource()},ParameterValueList(S){return f.findAny(S).as.ParameterValueList()},FilterOperation(S){return f.findAny(S).as.FilterOperation()},FilterOperationList(S){return f.findAny(S).as.FilterOperationList()},ParameterValue(S){return f.findAny(S).as.ParameterValue()},StringLiteralValue(S){return f.findAny(S).as.StringLiteralValue()},NumberLiteralValue(S){return f.findAny(S).as.NumberLiteralValue()},ViewOperationList(S){return f.findAny(S).as.ViewOperationList()},GroupByViewOperation(S){return f.findAny(S).as.GroupByViewOperation()},AggregateViewOperation(S){return f.findAny(S).as.AggregateViewOperation()},OrderByViewOperation(S){return f.findAny(S).as.OrderByViewOperation()},Field(S){return f.findAny(S).as.Field()},ReferenceExpression(S){return f.findAny(S).as.ReferenceExpression()},ReferenceViewDefinition(S){return f.findAny(S).as.ReferenceViewDefinition()},ArrowQueryDefinition(S){return f.findAny(S).as.ArrowQueryDefinition()},ArrowViewDefinition(S){return f.findAny(S).as.ArrowViewDefinition()},RefinementViewDefinition(S){return f.findAny(S).as.RefinementViewDefinition()},TimeTruncationExpression(S){return f.findAny(S).as.TimeTruncationExpression()},FilteredFieldExpression(S){return f.findAny(S).as.FilteredFieldExpression()},NestViewOperation(S){return f.findAny(S).as.NestViewOperation()},View(S){return f.findAny(S).as.View()},SegmentViewDefinition(S){return f.findAny(S).as.SegmentViewDefinition()},LimitViewOperation(S){return f.findAny(S).as.LimitViewOperation()},AnnotationList(S){return f.findAny(S).as.AnnotationList()},Annotation(S){return f.findAny(S).as.Annotation()}}}get parent(){if(this._parent===void 0)throw new Error("This node does not have a parent");return this._parent}set parent(f){this._parent=f}static schemaTryGet(f,S,$){return o._schemaTryGet(f,S,$,!1)}static schemaTryGetDrillField(f,S,$){return o._schemaTryGet(f,S,$,!0)}static _schemaTryGet(f,S,$,ue){let me=f.fields;for(const Be of $??[]){const we=me.find(Me=>Me.name===Be);if(we===void 0)throw new Error(`${Be} not found`);if(we.kind==="join"||ue&&we.kind==="view"){me=we.schema.fields;continue}if(we.kind==="dimension"||we.kind==="measure"){if(we.type.kind==="record_type"){me=we.type.fields.map(Me=>({kind:we.kind,...Me}));continue}else if(we.type.kind==="array_type"&&we.type.element_type.kind==="record_type"){me=we.type.element_type.fields.map(Me=>({kind:we.kind,...Me}));continue}}throw new Error(`${Be} is not a join, record, or repeated record`)}return me.find(Be=>Be.name===S)}static schemaGet(f,S,$){const ue=o.schemaTryGet(f,S,$);if(ue===void 0)throw new Error(`${S} not found`);return ue}static schemaGetDrillField(f,S,$){const ue=o.schemaTryGetDrillField(f,S,$);if(ue===void 0)throw new Error(`${S} not found`);return ue}static schemaMerge(f,S){return{fields:[...f.fields,...S.fields]}}static tagFor(f,S="# "){var $,ue,me;const Se=(ue=($=f.annotations)===null||$===void 0?void 0:$.map(Be=>Be.value))===null||ue===void 0?void 0:ue.filter(Be=>Be.startsWith(S));return(me=u.Tag.fromTagLines(Se??[]).tag)!==null&&me!==void 0?me:new u.Tag}static fieldWasCalculation(f){if(f.kind!=="dimension")throw new Error(`${f.name} could not be an output field, because it is a ${f.kind}, and only dimensions can appear in output schemas`);return o.tagFor(f,"#(malloy) ").has("calculation")}}function t(z){return Array.isArray(z)||typeof z=="string"||typeof z=="number"||typeof z=="boolean"}class i extends o{constructor(f,S){super(),this.node=f,this.children=S,this.originalChildren=[...S],S.forEach($=>$.parent=this)}*iter(){for(let f=0;f<this.length;f++)yield this.index(f)}get length(){return this.children.length}get last(){return this.children[this.children.length-1]}index(f){return this.children[f]}insert(f,S){this.edit(),this.children.splice(S,0,f),f.parent=this}add(f){this.edit(),this.children.push(f),f.parent=this}remove(f){const S=this.children.findIndex($=>$===f);if(S===-1)return this;this.edit(),this.children.splice(S,1)}build(){if(!this.edited)return this.node;const f=this.children.map(S=>S.build());return this.edited=!1,this.originalChildren=[...this.children],this.node=f,f}findAny(f){if(f.length===0)return this;const[S,...$]=f;if(typeof S!="number")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);return this.children[S].findAny($)}findIndex(f){return this.children.findIndex(f)}indexOf(f){return this.children.indexOf(f)}}class e extends o{constructor(f,S){super(),this.node=f,this.children=S;for(const $ in S){const ue=S[$];ue&&!t(ue)&&(ue.parent=this)}}build(){if(!this.edited)return this.node;let f=this.node;for(const S in this.children){const $=this.children[S];$===void 0?f={...f,[S]:void 0}:t($)?this.edited&&(f={...f,[S]:$}):f={...f,[S]:$.build()}}return this.node=f,this.edited=!1,f}findAny(f){if(f.length===0)return this;const[S,...$]=f;if(typeof S!="string")throw new Error(`${this.constructor.name} is a ASTListNode and thus cannot contain a ${S}`);const ue=this.children[S];if(t(ue))throw new Error(`${this.constructor.name}.${S} refers to a basic type, not an ASTNode`);return ue._find($)}}class s extends e{constructor(f){var S,$;let ue=f.source;if(ue===void 0){if(f.model===void 0)throw new Error("Need a model or source");if(f.query){const we=f.query.definition;if(we.kind==="arrow"&&we.source.kind==="source_reference"){const Me=we.source.name;if(ue=f.model.entries.find(Xn=>Xn.name===Me),ue===void 0)throw new Error(`Model does not contain source or query named ${Me}`)}}if(ue===void 0&&(ue=f.model.entries[0]),ue===void 0)throw new Error("Model does not contain any sources or queries")}const me=be(ue),Se=(S=f.query)!==null&&S!==void 0?S:{definition:{kind:"arrow",source:{kind:"source_reference",name:me.name},view:{kind:"segment",operations:[]}}},Be=($=f.model)!==null&&$!==void 0?$:{entries:[me],anonymous_queries:[]};super(Se,{definition:a.ASTQueryDefinition.from(Se.definition),annotations:Se.annotations&&new H(Se.annotations)}),this.model=Be,f.source&&this.setSource(f.source.name)}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get annotations(){return this.children.annotations}reorderFields(f){this.definition.reorderFields(f)}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new H([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}setViewToEmptySegment(){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"segment",operations:[]}}),this.definition.view.as.SegmentViewDefinition()}isRunnable(){return this.definition.isRunnable()}isEmpty(){return this.definition instanceof P&&this.definition.view instanceof fe&&this.definition.view.operations.length===0}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}setSource(f){if(this.definition instanceof P&&this.definition.source instanceof L&&this.definition.source.name===f)return;if(this.model.entries.find($=>$.name===f)===void 0)throw new Error(`Source ${f} is not defined in model`);this.definition=new P({kind:"arrow",source:{kind:"source_reference",name:f},view:this.definition instanceof P?this.definition.view.build():{kind:"segment",operations:[]}})}setQueryHead(f){const S=this.model.entries.find($=>$.name===f);if(S===void 0||S.kind!=="query")throw new Error(`No query named ${f} in the model`);this.definition=new Y({kind:"query_reference",name:f})}getQueryInfo(f){const S=this.model.entries.find($=>$.name===f);if(S===void 0)throw new Error(`Query ${f} is not defined in model`);if(S.kind!=="query")throw new Error(`Model entry ${f} is not a query`);return S}toMalloy(){return h.queryToMalloy(this.build())}build(){return super.build()}setView(f){if(!(this.definition instanceof P))throw new Error("Must set source before setting view");return this.definition=new P({kind:"arrow",source:this.definition.source.build(),view:{kind:"view_reference",name:f}}),this.definition.view.as.ReferenceViewDefinition()}_getInheritedAnnotations(f){var S;return f instanceof Y?(S=this.getQueryInfo(f.name).annotations)!==null&&S!==void 0?S:[]:f instanceof j?this._getInheritedAnnotations(f.base):f instanceof P?f.view.getInheritedAnnotations():[]}getInheritedAnnotations(){return this._getInheritedAnnotations(this.definition)}}a.ASTQuery=s;class l extends e{constructor(f){super(f,{name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.reference=f}get name(){return this.children.name}set name(f){this.edit(),this.children.name=f}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}static getOrAddParameters(f){if(f.parameters)return f.parameters;f.edit();const S=new p([]);return f.parameters=S,S}static setParameter(f,S,$){const ue=l.tryGetParameter(f,S);if(ue!==void 0){ue.value=a.ASTLiteralValue.from(a.ASTLiteralValue.makeLiteral($));return}return f.getOrAddParameters().addParameter(S,$)}static tryGetParameter(f,S){if(f.parameters!==void 0){for(const $ of f.parameters.iter())if($.name===S)return $}}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReference=l;class c extends l{get segment(){const f=this.parent;return f instanceof V||f instanceof C?f.field.segment:f instanceof he||f instanceof X?f.segment:f.list.segment}getReferenceSchema(){return this.parent instanceof J?this.segment.getOutputSchema():this.segment.getInputSchema()}getFieldInfo(){const f=this.getReferenceSchema();return o.schemaGet(f,this.name,this.path)}}a.ASTFieldReference=c;class p extends i{constructor(f){super(f,f.map(S=>new v(S)))}get parameters(){return this.children}addParameter(f,S){this.add(new v({name:f,value:a.ASTLiteralValue.makeLiteral(S)}))}}a.ASTParameterValueList=p;class v extends e{constructor(f){super(f,{name:f.name,value:a.ASTLiteralValue.from(f.value)}),this.parameter=f}get name(){return this.children.name}get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}}a.ASTParameterValue=v,a.ASTLiteralValue={from(z){switch(z.kind){case"string_literal":return new x(z);case"number_literal":return new _(z);case"boolean_literal":return new A(z);case"date_literal":return new E(z);case"timestamp_literal":return new D(z);case"null_literal":return new g(z);case"filter_expression_literal":return new N(z)}},makeLiteral(z){if(z!==null&&typeof z=="object"&&"kind"in z)return z;if(typeof z=="string")return{kind:"string_literal",string_value:z};if(typeof z=="boolean")return{kind:"boolean_literal",boolean_value:z};if(typeof z=="number")return{kind:"number_literal",number_value:z};if(z===null)return{kind:"null_literal"};if("date"in z){const f=z.granularity,S=Pe(z.date);return Te(f)?{kind:"date_literal",date_value:S,granularity:f}:{kind:"timestamp_literal",timestamp_value:S,granularity:f}}throw new Error("Unknown literal type")}};class x extends e{constructor(f){super(f,{kind:f.kind,string_value:f.string_value}),this.node=f,this.kind="string_literal"}get fieldType(){return{kind:"string_type"}}}a.ASTStringLiteralValue=x;class g extends e{constructor(f){super(f,{kind:f.kind}),this.node=f,this.kind="null_literal"}get fieldType(){}}a.ASTNullLiteralValue=g;class _ extends e{constructor(f){super(f,{kind:f.kind,number_value:f.number_value}),this.node=f,this.kind="number_literal"}get fieldType(){return{kind:"number_type",subtype:Number.isInteger(this.children.number_value)?"integer":"decimal"}}}a.ASTNumberLiteralValue=_;class A extends e{constructor(f){super(f,{kind:f.kind,boolean_value:f.boolean_value}),this.node=f,this.kind="boolean_literal"}get fieldType(){return{kind:"boolean_type"}}}a.ASTBooleanLiteralValue=A;class E extends e{constructor(f){super(f,{kind:f.kind,date_value:f.date_value,granularity:f.granularity}),this.node=f,this.kind="date_literal"}get fieldType(){return{kind:"date_type",timeframe:this.children.granularity}}}a.ASTDateLiteralValue=E;class D extends e{constructor(f){super(f,{kind:f.kind,timestamp_value:f.timestamp_value,granularity:f.granularity}),this.node=f,this.kind="timestamp_literal"}get fieldType(){return{kind:"timestamp_type",timeframe:this.children.granularity}}}a.ASTTimestampLiteralValue=D;class N extends e{constructor(f){super(f,{kind:f.kind,filter_expression_value:f.filter_expression_value}),this.node=f,this.kind="filter_expression_literal"}get fieldType(){}}a.ASTFilterExpressionLiteralValue=N;class w extends o{constructor(f){super(),this.node=f}get treeEdited(){return!1}build(){return this.node}findAny(){throw new Error("Tried to find a node from an unimplemented node type")}}a.ASTUnimplemented=w,a.ASTQueryArrowSource={from(z){switch(z.kind){case"refinement":return new j(z);case"source_reference":return new L(z)}}},a.ASTQueryDefinition={from(z){switch(z.kind){case"arrow":return new P(z);case"query_reference":return new Y(z);case"refinement":return new j(z)}}};class P extends e{constructor(f){super(f,{kind:"arrow",source:a.ASTQueryArrowSource.from(f.source),view:M.from(f.view)}),this.node=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}getSourceInfo(){return this.source.getSourceInfo()}getOutputSchema(){return this.view.getRefinementSchema()}isRunnable(){return this.view.isRunnable()&&this.source.isRunnable()}get query(){return this.parent.as.Query()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}reorderFields(f){this.view instanceof fe?this.view.reorderFields(f):this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}}a.ASTArrowQueryDefinition=P;class j extends e{constructor(f){super(f,{kind:"refinement",base:a.ASTQueryDefinition.from(f.base),refinement:M.from(f.refinement)}),this.node=f}get base(){return this.children.base}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}isRunnable(){return!0}get query(){return this.parent.as.Query()}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}getOutputSchema(){const f=this.base.getOutputSchema(),S=this.refinement.getRefinementSchema();return s.schemaMerge(f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.refinement),this.refinement.propagateDown(f)}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getSourceInfo(){return this.base.getSourceInfo()}}a.ASTRefinementQueryDefinition=j;class Y extends e{constructor(f){super(f,{kind:"query_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get query(){return this.parent.as.Query()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getOrAddDefaultSegment(){const f=new j({kind:"refinement",base:this.build(),refinement:{kind:"segment",operations:[]}});return this.query.definition=f,f.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}reorderFields(f){this.query.getOrAddAnnotations().setTagProperty(["field_order"],f)}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}getOutputSchema(){return this.getSourceInfo().schema}getSourceInfo(){const S=this.query.model.entries.find($=>$.name===this.name);if(S===void 0)throw new Error(`Query not found with name ${this.name}`);return S}}a.ASTReferenceQueryDefinition=Y;class L extends e{constructor(f){super(f,{kind:"source_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return this.areRequiredParametersSet()}get name(){return this.children.name}get arrow(){return this.parent.as.ArrowQueryDefinition()}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get path(){return this.children.path}getSourceInfo(){const f=this.arrow.query.model.entries.find(S=>S.name===this.name);if(f===void 0)throw new Error(`No query or source named ${this.name}`);return f}getOrAddDefaultSegment(){if(this.getSourceInfo().kind!=="query")throw new Error(`Cannot refine source ${this.name}`);const S=new j({kind:"refinement",base:{...this.build(),kind:"query_reference"},refinement:{kind:"segment",operations:[]}});return this.arrow.source=S,S.refinement.as.SegmentViewDefinition()}propagateUp(f){}propagateDown(f){}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}get query(){return this.parent.parent.as.Query()}getSourceParameters(){var f;const S=this.getSourceInfo();return S.kind==="query"?[]:(f=S.parameters)!==null&&f!==void 0?f:[]}areRequiredParametersSet(){const f=this.getSourceParameters();for(const S of f){if(S.default_value!==void 0)continue;if(this.tryGetParameter(S.name)===void 0)return!1}return!0}}a.ASTReferenceQueryArrowSource=L;const M={from(z){switch(z.kind){case"arrow":return new Q(z);case"view_reference":return new I(z);case"segment":return new fe(z);case"refinement":return new re(z)}}};function W(z,f){const S=z.parent;S instanceof P?S.view=f:S instanceof j?S.refinement=f:S instanceof se?S.definition=f:S instanceof Q?S.source===z?S.source=f:S.view=f:S.base===z?S.base=f:S.refinement=f}function Z(z,f,S=[]){const $=z.getInputSchema(),ue=s.schemaGet($,f,S);if(ue===void 0)return{isValidViewRefinement:!1,error:`${f} is not defined`};if(ue.kind!=="view")return{isValidViewRefinement:!1,error:`${f} is not a view`};const me=z.getOutputSchema();for(const Se of ue.schema.fields)if(s.schemaTryGet(me,Se.name,[]))return{isValidViewRefinement:!1,error:`Cannot refine with ${f} because stage already has an output field named ${Se.name}`};return{isValidViewRefinement:!0}}class I extends e{constructor(f){super(f,{kind:"view_reference",name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f}isRunnable(){return!0}get name(){return this.children.name}get path(){return this.children.path}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}getOrAddDefaultSegment(){return this.addEmptyRefinement()}addEmptyRefinement(){const f=re.segmentRefinementOf(this.build());return W(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:$}=this.isValidViewRefinement(f,S);if($)throw new Error($);const ue=re.viewRefinementOf(this.build(),f,S);return W(this,ue),ue.refinement.as.ReferenceViewDefinition()}convertToNest(f){const S=M.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}isValidViewRefinement(f,S){return Z(this,f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){return this.name}getViewInfo(){const f=this.getInputSchema(),S=o.schemaGet(f,this.name,this.path);if(S.kind!=="view")throw new Error("Not a view");return S}getRefinementSchema(){return this.getViewInfo().schema}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}getInheritedAnnotations(){var f;return(f=this.getViewInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceViewDefinition=I;class Q extends e{constructor(f){super(f,{kind:"arrow",source:M.from(f.source),view:M.from(f.view)}),this.node=f}isRunnable(){return this.source.isRunnable()&&this.view.isRunnable()}get source(){return this.children.source}set source(f){this.edit(),this.children.source=f}get view(){return this.children.view}set view(f){this.edit(),this.children.view=f,f.parent=this}getOrAddDefaultSegment(){return this.view.getOrAddDefaultSegment()}addEmptyRefinement(){return this.view.addEmptyRefinement()}addViewRefinement(f,S){return this.view.addViewRefinement(f,S)}convertToNest(f){const S=M.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}getInputSchema(){return this.source.getOutputSchema()}getOutputSchema(){return this.view.getRefinementSchema()}getImplicitName(){return this.view.getImplicitName()}getRefinementSchema(){throw new Error("An arrow is not a valid refinement")}isValidViewRefinement(f,S){return Z(this,f,S)}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.view),this.view.propagateDown(f)}getInheritedAnnotations(){return[]}}a.ASTArrowViewDefinition=Q;class re extends e{constructor(f){super(f,{kind:"refinement",base:M.from(f.base),refinement:M.from(f.refinement)}),this.node=f}isRunnable(){return this.getOutputSchema().fields.length>0}get refinement(){return this.children.refinement}set refinement(f){this.edit(),this.children.refinement=f,f.parent=this}get base(){return this.children.base}set base(f){this.edit(),this.children.base=f}convertToNest(f){const S=M.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}getOrAddDefaultSegment(){return this.refinement.getOrAddDefaultSegment()}addEmptyRefinement(){return this.refinement.addEmptyRefinement()}addViewRefinement(f,S){return this.refinement.addViewRefinement(f,S)}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getRefinementSchema(){return o.schemaMerge(this.base.getRefinementSchema(),this.refinement.getRefinementSchema())}getImplicitName(){return this.base.getImplicitName()}isValidViewRefinement(f,S){return Z(this,f,S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){f(this.base),f(this.refinement),this.base.propagateDown(f),this.refinement.propagateDown(f)}getInheritedAnnotations(){return this.base.getInheritedAnnotations()}static viewRefinementOf(f,S,$){return new re({kind:"refinement",base:f,refinement:{kind:"view_reference",name:S,path:$}})}static segmentRefinementOf(f){return new re({kind:"refinement",base:f,refinement:{kind:"segment",operations:[]}})}}a.ASTRefinementViewDefinition=re;class fe extends e{constructor(f){super(f,{kind:"segment",operations:new ie(f.operations)}),this.node=f,this.DEFAULT_INSERTION_ORDER=["group_by","aggregate","drill","where","having","nest","order_by","calculate","limit"]}isRunnable(){let f=!1;for(const S of this.operations.iter()){if(S instanceof pe||S instanceof te)return!0;if(S instanceof k){if(!S.view.definition.isRunnable())return!1;f=!0}}return f}get operations(){return this.children.operations}convertToNest(f){const S=M.from({kind:"segment",operations:[{kind:"nest",name:f,view:{definition:this.build()}}]});W(this,S)}renameOrderBys(f,S){for(const $ of this.operations.iter())$ instanceof J&&$.name===f&&$.setField(S)}propagateUp(f){this.parent.propagateUp(f)}propagateDown(f){}removeOrderBys(f){for(const S of this.operations.iter())S instanceof J&&S.name===f&&S.delete()}reorderFields(f){const S=[],$=[],ue={};let me=!1;for(const we of this.operations.iter()){if((we instanceof pe||we instanceof te||we instanceof k)&&f.includes(we.name)){ue[we.name]=we,me=!0;continue}me?$.push(we):S.push(we)}const Se=[];for(const we of f){const Me=ue[we];if(Me===void 0)throw new Error(`No field named ${we}`);Se.push(Me)}const Be=[...S,...Se,...$];this.operations.items=Be}renameField(f,S){if(f.name===S)return;const $=this.getOutputSchema();if(o.schemaTryGet($,S,[]))throw new Error(`Output already has a field named ${S}`);const ue=f.name;f.name=S,this.propagateUp(me=>{me instanceof fe&&me.renameOrderBys(ue,S)})}addOrderBy(f,S){const $=this.getOutputSchema();try{o.schemaGet($,f,[])}catch{throw new Error(`No such field ${f} in stage output`)}for(const me of this.operations.iter())if(me instanceof J&&me.name===f)return me.direction=S,me;const ue=new J({kind:"order_by",field_reference:{name:f},direction:S});return this.addOperation(ue),ue}addEmptyNest(f){const S=new k({kind:"nest",name:f,view:{definition:{kind:"segment",operations:[]}}});return this.addOperation(S),S}firstIndexOfOperationType(f){return this.operations.findIndex(S=>S.kind===f)}findInsertionPoint(f){const S=this.firstIndexOfOperationType(f);if(S>-1){let me=S;for(;this.operations.index(me)&&this.operations.index(me).kind===f;)me++;return me}const $=this.DEFAULT_INSERTION_ORDER.indexOf(f);if($===-1)throw new Error(`Operation ${f} is not supported for \`findInsertionPoint\``);const ue=this.DEFAULT_INSERTION_ORDER.slice($+1);for(const me of ue){const Se=this.firstIndexOfOperationType(me);if(Se>-1)return Se}return this.operations.length}getFieldNamed(f){const S=this.tryGetFieldNamed(f);if(S===void 0)throw new Error("No such field");return S}hasFieldNamed(f){return this.tryGetFieldNamed(f)!==void 0}hasField(f,S){return this.tryGetField(f,S)!==void 0}getField(f,S){const $=this.tryGetField(f,S);if($===void 0)throw new Error("No such field");return $}tryGetField(f,S){for(const $ of this.operations.iter())if($ instanceof te||$ instanceof pe){const ue=$.field.getReference();if(ue&&ue.name===f&&Le(ue.path,S))return $}else if($ instanceof k){if($.view instanceof I)return $}else if($ instanceof le){const ue=$.expression.field.getReference();if(ue&&ue.name===f&&Le(ue.path,S))return $}}tryGetFieldNamed(f){for(const S of this.operations.iter())if((S instanceof te||S instanceof pe||S instanceof k||S instanceof le)&&S.name===f)return S}getGroupBy(f){for(const S of this.operations.iter())if(S instanceof te&&S.name===f)return S}removeGroupBy(f){var S;return(S=this.getGroupBy(f))===null||S===void 0||S.delete(),this}addGroupBy(f,S=[],$){const ue=this.makeField(f,S,$,"dimension");return this.addOperation(ue),ue}addDrill(f){const S=new K({kind:"drill",...f});return this.addOperation(S),S}addWhere(f,S,$){const ue=Array.isArray(S)?S:[],me=$===void 0?S:$,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,ue);ve(we,me);const Me=new U({kind:"where",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:ue},filter:Se}});return this.addOperation(Me),Me}addHaving(f,S,$){const ue=Array.isArray(S)?S:[],me=$===void 0?S:$,Se=typeof me=="string"?me:ge(me),Be=this.getInputSchema(),we=s.schemaGet(Be,f,ue);ve(we,me);const Me=new oe({kind:"having",filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:ue},filter:Se}});return this.addOperation(Me),Me}addCalculateMovingAverage(f,S,$,ue,me){const Se=new le({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:S,path:$},rows_preceding:ue,rows_following:me}}});return this.addOperation(Se),Se}addTimeGroupBy(f,S,$,ue){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!=="dimension")throw new Error(`Cannot group by non-dimension ${f}`);if(Se.type.kind!==ue)throw new Error(`${f} is not a ${ue}`);const Be=new te({kind:"group_by",field:{expression:{kind:"time_truncation",field_reference:{name:f,path:S},truncation:$}}});return this.addOperation(Be),Be}addDateGroupBy(f,S,$){const ue=$===void 0?S:$,me=$===void 0?[]:S;return this.addTimeGroupBy(f,me,ue,"date_type")}addTimestampGroupBy(f,S,$){const ue=$===void 0?S:$,me=$===void 0?[]:S;return this.addTimeGroupBy(f,me,ue,"timestamp_type")}addAggregate(f,S=[],$){const ue=this.makeField(f,S,$,"measure");return this.addOperation(ue),ue}addNest(f,S){const $=this.makeField(f,[],S,"view");return this.addOperation($),$}makeField(f,S,$,ue){const me=this.getInputSchema(),Se=o.schemaGet(me,f,S);if(Se===void 0)throw new Error(`No such field ${f}`);if(Se.kind!==ue){const Be=Ce(ue),we=ue;throw new Error(`Cannot ${Be} non-${we} ${f}`)}return ue==="dimension"?te.fromReference(f,S,$):ue==="measure"?pe.fromReference(f,S,$):k.fromReference(f,S,$)}addOperation(f){if((f instanceof te||f instanceof pe||f instanceof k||f instanceof le)&&this.hasFieldNamed(f.name))throw new Error(`Query already has a field named ${f.name}`);const S=this.findInsertionPoint(f.kind);return this.operations.insert(f,S),f}getRefinementSchema(){const f=[];for(const S of this.operations.iter())(S instanceof te||S instanceof pe||S instanceof k||S instanceof le)&&f.push(S.getFieldInfo());return{fields:f}}setLimit(f){de.validateLimit(f);const S=[...this.operations.iter()].find(a.ASTViewOperation.isLimit);S?S.limit=f:this.operations.add(new de({kind:"limit",limit:f}))}getOrAddDefaultSegment(){return this}addEmptyRefinement(){const f=re.segmentRefinementOf(this.build());return W(this,f),f.refinement.as.SegmentViewDefinition()}addViewRefinement(f,S){const{error:$}=this.isValidViewRefinement(f,S);if($)throw new Error($);const ue=re.viewRefinementOf(this.build(),f,S);return W(this,ue),ue.refinement.as.ReferenceViewDefinition()}getInputSchema(){return Ee(this.parent)}getOutputSchema(){return this.parent.getOutputSchema()}getImplicitName(){}isValidViewRefinement(f,S){return Z(this,f,S)}getInheritedAnnotations(){return[]}}a.ASTSegmentViewDefinition=fe;class ie extends i{constructor(f){super(f,f.map(S=>a.ASTViewOperation.from(S)))}get items(){return this.children}set items(f){this.edit(),this.children=f}get segment(){return this.parent.as.SegmentViewDefinition()}}a.ASTViewOperationList=ie,a.ASTViewOperation={from(z){switch(z.kind){case"group_by":return new te(z);case"aggregate":return new pe(z);case"order_by":return new J(z);case"nest":return new k(z);case"limit":return new de(z);case"where":return new U(z);case"drill":return new K(z);case"having":return new oe(z);case"calculate":return new le(z)}},isLimit(z){return z instanceof de}};class J extends e{constructor(f){super(f,{kind:"order_by",field_reference:new c(f.field_reference),direction:f.direction}),this.node=f,this.kind="order_by"}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get direction(){return this.children.direction}set direction(f){this.direction!==f&&(this.edit(),this.children.direction=f)}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}setField(f){const S=this.list.segment.getOutputSchema();o.schemaGet(S,f,[]),this.edit(),this.children.field_reference=new c({name:f})}setDirection(f){this.direction=f}}a.ASTOrderByViewOperation=J;class te extends e{constructor(f){super(f,{kind:"group_by",name:f.name,field:new O(f.field)}),this.node=f,this.kind="group_by"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Group by does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}rename(f){this.list.segment.renameField(this,f)}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof fe&&f.removeOrderBys(this.name)})}getFieldInfo(){return{kind:"dimension",name:this.name,type:this.field.type}}get annotations(){return this.field.annotations}set annotations(f){this.edit(),this.field.annotations=f}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}static fromReference(f,S,$){return new te({kind:"group_by",name:$,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTGroupByViewOperation=te;class pe extends e{constructor(f){super(f,{kind:"aggregate",name:f.name,field:new O(f.field)}),this.node=f,this.kind="aggregate"}get field(){return this.children.field}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.field.name;if(S===void 0)throw new Error("Aggregate does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.field.name===f?this.children.name=void 0:this.children.name=f)}get annotations(){return this.field.annotations}rename(f){this.list.segment.renameField(this,f)}convertToCalculateMovingAverage(f,S,$=0,ue=[]){if(!(this.field.expression instanceof T))throw new Error("Cannot convert aggregate to smoothed metric unless it is a field reference");this.list.remove(this);const me=new le({kind:"calculate",name:f,field:{expression:{kind:"moving_average",field_reference:{name:this.field.expression.name,path:this.field.expression.path},rows_preceding:S,rows_following:$,partition_fields:ue.map(Se=>({name:Se}))}}});return this.list.add(me),me}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this),this.list.segment.propagateUp(f=>{f instanceof fe&&f.removeOrderBys(this.name)})}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"dimension",name:this.name,type:this.field.type}}getOrAddAnnotations(){return this.field.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.field.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}addWhere(f,S,$){const ue=Array.isArray(S)?S:[],me=$===void 0?S:$,Se=typeof me=="string"?me:ge(me),Be=this.list.segment.getInputSchema(),we=s.schemaGet(Be,f,ue);ve(we,me);const Me={filter:{kind:"filter_string",expression:{kind:"field_reference",name:f,path:ue},filter:Se}};if(this.field.expression instanceof V)return this.field.expression.where.add(new R(Me)),this.field.expression;if(this.field.expression instanceof T){const Xn=this.field.expression.build();return this.field.expression=new V({kind:"filtered_field",field_reference:{name:Xn.name,path:Xn.path,parameters:Xn.parameters},where:[Me]}),this.field.expression}else throw new Error("This kind of expression does not support addWhere")}static fromReference(f,S,$){return new pe({kind:"aggregate",name:$,field:{expression:{kind:"field_reference",name:f,path:S}}})}}a.ASTAggregateViewOperation=pe;class O extends e{constructor(f){super(f,{expression:a.ASTExpression.from(f.expression),annotations:f.annotations&&new H(f.annotations)}),this.node=f}get expression(){return this.children.expression}set expression(f){this.edit(),this.children.expression=f,f.parent=this}get name(){return this.expression.name}get type(){const f=this.expression.fieldType;if(f===void 0)throw new Error("Field expression does not have a type");return f}get annotations(){return this.children.annotations}set annotations(f){this.edit(),this.children.annotations=f}getReference(){if(!(this.expression instanceof F))return this.expression.getReference()}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new H([]);return this.children.annotations=f,f.parent=this,f}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}get segment(){return this.parent.list.segment}getInheritedAnnotations(){return this.expression.getInheritedAnnotations()}}a.ASTField=O,a.ASTExpression={from(z){switch(z.kind){case"field_reference":return new T(z);case"filtered_field":return new V(z);case"time_truncation":return new C(z);case"literal_value":return new F(z);case"moving_average":return new b(z)}}};class T extends e{constructor(f){super(f,{kind:f.kind,name:f.name,path:f.path,parameters:f.parameters&&new p(f.parameters)}),this.node=f,this.kind="field_reference"}get name(){return this.children.name}get parameters(){return this.children.parameters}set parameters(f){this.edit(),this.children.parameters=f}get segment(){const f=this.parent;if(f instanceof O)return f.segment;if(f instanceof he||f instanceof X)return f.segment;throw new Error("Invalid expression parent")}get path(){return this.children.path}getReference(){return this.build()}getFieldInfo(){const f=this.segment.getInputSchema(),$=this.parent instanceof X&&this.parent.parent instanceof K?o.schemaGetDrillField(f,this.name,this.path):o.schemaGet(f,this.name,this.path);if($.kind!=="dimension"&&$.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return $}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}getOrAddParameters(){return l.getOrAddParameters(this)}setParameter(f,S){return l.setParameter(this,f,S)}tryGetParameter(f){return l.tryGetParameter(this,f)}}a.ASTReferenceExpression=T;class C extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),truncation:f.truncation}),this.node=f,this.kind="time_truncation"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get truncation(){return this.children.truncation}set truncation(f){this.edit(),this.children.truncation=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){const f=this.getFieldInfo();if(f.type.kind==="date_type")return{...f.type,timeframe:G(this.truncation)};if(f.type.kind==="timestamp_type")return{...f.type,timeframe:this.truncation};throw new Error("This type of field cannot have a time truncation")}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTTimeTruncationExpression=C;class F extends e{constructor(f){super(f,{kind:f.kind,literal_value:a.ASTLiteralValue.from(f.literal_value)}),this.node=f,this.kind="time_truncation"}get name(){}get literalValue(){return this.children.literal_value}get fieldType(){return this.literalValue.fieldType}getInheritedAnnotations(){return[]}getFieldInfo(){}}a.ASTLiteralValueExpression=F;class q extends i{constructor(f){super(f,f.map(S=>new c(S)))}}a.ASTFieldReferenceList=q;class b extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),rows_preceding:f.rows_preceding,rows_following:f.rows_following,partition_fields:new q(f.partition_fields||[])}),this.node=f,this.kind="moving_average"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get rowsPreceding(){return this.children.rows_preceding}set rowsPreceding(f){this.edit(),this.children.rows_preceding=f}get rowsFollowing(){return this.children.rows_following}set rowsFollowing(f){this.edit(),this.children.rows_following=f}get name(){return this.fieldReference.name}get field(){return this.parent.as.Field()}get partitionFields(){return this.children.partition_fields}setPartitionFields(f){this.children.partition_fields=new q(f)}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="dimension"&&S.kind!=="measure")throw new Error("Invalid field for ASTReferenceExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTMovingAverageExpression=b;class R extends e{constructor(f){super(f,{filter:a.ASTFilter.from(f.filter)})}get filter(){return this.children.filter}get list(){return this.parent.as.FilterOperationList()}delete(){this.list.remove(this)}}a.ASTFilterOperation=R;class B extends i{constructor(f){super(f,f.map(S=>new R(S)))}get expression(){return this.parent.as.FilteredFieldExpression()}}a.ASTFilterOperationList=B;class V extends e{constructor(f){super(f,{kind:f.kind,field_reference:new c(f.field_reference),where:new B(f.where)}),this.node=f,this.kind="filtered_field"}getReference(){return this.fieldReference.build()}get fieldReference(){return this.children.field_reference}get name(){return this.fieldReference.name}get where(){return this.children.where}get field(){return this.parent.as.Field()}getFieldInfo(){const f=this.field.segment.getInputSchema(),S=o.schemaGet(f,this.name,this.fieldReference.path);if(S.kind!=="measure")throw new Error("Invalid field for ASTFilteredFieldExpression");return S}get fieldType(){return this.getFieldInfo().type}getInheritedAnnotations(){var f;return(f=this.getFieldInfo().annotations)!==null&&f!==void 0?f:[]}}a.ASTFilteredFieldExpression=V;function G(z){switch(z){case"day":case"week":case"month":case"year":case"quarter":return z;default:throw new Error("Invalid date timeframe")}}class k extends e{constructor(f){super(f,{kind:"nest",name:f.name,view:new se(f.view)}),this.node=f,this.kind="nest"}get view(){return this.children.view}get annotations(){return this.view.annotations}get name(){var f;const S=(f=this.children.name)!==null&&f!==void 0?f:this.view.name;if(S===void 0)throw new Error("Nest does not have a name");return S}set name(f){this.name!==f&&(this.edit(),this.view.name===f?this.children.name=void 0:this.children.name=f)}get list(){return this.parent.as.ViewOperationList()}getOrAddAnnotations(){return this.view.getOrAddAnnotations()}getInheritedTag(f="# "){return xe(f,this.view.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}delete(){this.list.remove(this)}rename(f){this.list.segment.renameField(this,f)}getFieldInfo(){return{kind:"view",name:this.name,definition:this.view.build(),schema:this.view.getOutputSchema()}}static fromReference(f,S,$){return new k({kind:"nest",name:$,view:{definition:{kind:"view_reference",name:f,path:S}}})}}a.ASTNestViewOperation=k;class U extends e{constructor(f){super(f,{kind:"where",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="where"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTWhereViewOperation=U;class K extends e{constructor(f){super(f,{kind:"drill",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="drill"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTDrillViewOperation=K;class oe extends e{constructor(f){super(f,{kind:"having",filter:a.ASTFilter.from(f.filter)}),this.node=f,this.kind="having"}get filter(){return this.children.filter}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTHavingViewOperation=oe;class le extends e{constructor(f){super(f,{kind:"calculate",field:new O(f.field),name:f.name}),this.node=f,this.kind="calculate"}get expression(){return this.children.field.expression}set expression(f){this.edit(),this.children.field.expression=f,f.parent=this}get name(){return this.node.name}set name(f){this.name!==f&&(this.edit(),this.node.name=f)}getFieldInfo(){return{annotations:[{value:u.Tag.withPrefix("#(malloy) ").set(["calculation"]).toString()}],kind:"calculate",name:this.name,type:this.expression.fieldType}}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}}a.ASTCalculateViewOperation=le,a.ASTFilter={from(z){switch(z.kind){case"filter_string":return new he(z);case"literal_equality":return new X(z)}},getSegment(z){const f=z.parent;return f instanceof R?f.list.expression.field.segment:f.list.segment}};class he extends e{constructor(f){super(f,{kind:"filter_string",expression:a.ASTExpression.from(f.expression),filter:f.filter}),this.node=f,this.kind="filter_string"}get expression(){return this.children.expression}get filterString(){return this.children.filter}set filterString(f){this.edit(),this.children.filter=f}setFilterString(f){const S=this.getFilterType();_e(this.filterString,S),this.filterString=f}get segment(){return a.ASTFilter.getSegment(this)}getFieldInfo(){const f=this.expression.getFieldInfo();if(f===void 0||f.kind!=="dimension"&&f.kind!=="measure")throw new Error("Invalid field type for filter with filter string");return f}getFilterType(){const f=this.getFieldInfo();return ae(f)}setFilter(f){const S=this.getFilterType();if(S!==f.kind)throw new Error(`Invalid filter: expected type ${S}, got ${f.kind}`);this.filterString=ge(f)}getFilter(){const f=this.getFilterType();return _e(this.filterString,f)}}a.ASTFilterWithFilterString=he;class X extends e{constructor(f){super(f,{kind:"literal_equality",expression:a.ASTExpression.from(f.expression),value:a.ASTLiteralValue.from(f.value)}),this.node=f,this.kind="literal_equality"}get expression(){return this.children.expression}get value(){return this.children.value}get segment(){return a.ASTFilter.getSegment(this)}}a.ASTFilterWithLiteralEquality=X;class se extends e{constructor(f){super(f,{definition:M.from(f.definition),annotations:f.annotations&&new H(f.annotations)}),this.node=f}get definition(){return this.children.definition}set definition(f){this.edit(),this.children.definition=f,f.parent=this}get name(){return this.definition.getImplicitName()}getOrAddDefaultSegment(){return this.definition.getOrAddDefaultSegment()}get nest(){return this.parent.as.NestViewOperation()}getInputSchema(){return this.nest.list.segment.getInputSchema()}getOutputSchema(){return this.definition.getRefinementSchema()}propagateUp(f){this.propagateDown(f)}propagateDown(f){f(this.definition),this.definition.propagateDown(f)}reorderFields(f){this.definition instanceof fe?this.definition.reorderFields(f):this.getOrAddAnnotations().setTagProperty(["field_order"],f)}get annotations(){return this.children.annotations}getOrAddAnnotations(){if(this.annotations)return this.annotations;this.edit();const f=new H([]);return this.children.annotations=f,f.parent=this,f}getInheritedAnnotations(){return this.definition.getInheritedAnnotations()}getInheritedTag(f="# "){return xe(f,this.getInheritedAnnotations())}getIntrinsicTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getIntrinsicTag(f))!==null&&$!==void 0?$:new u.Tag}getTag(f="# "){var S,$;return($=(S=this.annotations)===null||S===void 0?void 0:S.getTag(f))!==null&&$!==void 0?$:this.getInheritedTag(f)}setTagProperty(f,S=null,$="# "){this.getOrAddAnnotations().setTagProperty(f,S,$)}removeTagProperty(f,S="# "){this.getTag().has(...f)&&this.getOrAddAnnotations().removeTagProperty(f,S)}}a.ASTView=se;class de extends e{get limit(){return this.children.limit}set limit(f){de.validateLimit(f),this.edit(),this.children.limit=f}constructor(f){super(f,{kind:f.kind,limit:f.limit}),this.node=f,this.kind="limit"}get list(){return this.parent.as.ViewOperationList()}delete(){this.list.remove(this)}static validateLimit(f){if(!Number.isInteger(f))throw new Error("Limit must be an integer")}}a.ASTLimitViewOperation=de;function Ce(z){switch(z){case"dimension":return"group by";case"measure":return"aggregate";case"view":return"nest";case"join":return"join";case"calculate":return"calculate"}}function Re(z){return z}class H extends i{constructor(f){super(f,f.map(S=>new ee(S)))}get items(){return this.children}getInheritedAnnotations(){return this.parent.getInheritedAnnotations()}getIntrinsicTag(f="# "){return xe(f,this.items)}getTag(f="# "){const S=u.Tag.fromTagLines(this.getInheritedAnnotations().map($=>$.value)).tag;return xe(f,this.items,S)}get annotations(){return this.children.map(f=>f.node)}setTagProperty(f,S=null,$="# "){let ue;for(let me=this.items.length-1;me>=0;me--){const Se=this.index(me);if(Se.hasPrefix($)&&(ue=Se,Se.hasIntrinsicTagProperty(f))){Se.setTagProperty(f,S);return}}ue?ue.setTagProperty(f,S):this.add(new ee({value:new u.Tag({prefix:$}).set(f,S).toString()}))}removeTagProperty(f,S="# "){let $;for(let ue=this.items.length-1;ue>=0;ue--){const me=this.index(ue);if(me.hasPrefix(S)&&($=me,me.hasIntrinsicTagProperty(f))){me.removeTagProperty(f);return}}$?$.removeTagProperty(f):this.add(new ee({value:new u.Tag({prefix:S}).unset(...f).toString()}))}}a.ASTAnnotationList=H;class ee extends e{get value(){return this.children.value}set value(f){this.edit(),this.children.value=f}constructor(f){super(f,{value:f.value}),this.node=f}get list(){return this.parent.as.AnnotationList()}get index(){return this.list.indexOf(this)}delete(){this.list.remove(this)}getIntrinsicTag(){var f;return(f=u.Tag.fromTagLines([this.value]).tag)!==null&&f!==void 0?f:new u.Tag}getTag(){var f,S;const $=this.index===0?(f=u.Tag.fromTagLines(this.list.getInheritedAnnotations().map(ue=>ue.value)).tag)!==null&&f!==void 0?f:new u.Tag:this.list.index(this.index-1).getTag();return(S=u.Tag.fromTagLines([this.value],$).tag)!==null&&S!==void 0?S:new u.Tag}hasPrefix(f){return this.value.startsWith(f)}hasIntrinsicTagProperty(f){return this.getIntrinsicTag().has(...f)}setTagProperty(f,S){this.value=this.getIntrinsicTag().set(f,S).toString()}removeTagProperty(f){this.value=this.getTag().unset(...f).toString()}}a.ASTAnnotation=ee;function xe(z,f=[],S){var $;const me=f.map(Se=>Se.value).filter(Se=>typeof z=="string"?Se.startsWith(z):Se.match(z));return($=u.Tag.fromTagLines(me,S).tag)!==null&&$!==void 0?$:new u.Tag}function ge(z){switch(z.kind){case"string":return r.StringFilterExpression.unparse(z.parsed);case"number":return r.NumberFilterExpression.unparse(z.parsed);case"boolean":return r.BooleanFilterExpression.unparse(z.parsed);case"timestamp":case"date":return r.TemporalFilterExpression.unparse(z.parsed)}}function _e(z,f){function S($){const ue=$.filter(me=>me.severity==="error");if(ue.length!==0)throw new Error(`Invalid Malloy filter string: ${ue[0].message}`)}switch(f){case"string":{const $=r.StringFilterExpression.parse(z);return S($.log),{kind:f,parsed:$.parsed}}case"number":{const $=r.NumberFilterExpression.parse(z);return S($.log),{kind:f,parsed:$.parsed}}case"boolean":{const $=r.BooleanFilterExpression.parse(z);return S($.log),{kind:f,parsed:$.parsed}}case"timestamp":case"date":{const $=r.TemporalFilterExpression.parse(z);return S($.log),{kind:f,parsed:$.parsed}}case"other":throw new Error("Not implemented")}}function be(z){return"kind"in z?z:{...z,kind:"source"}}function Te(z){switch(z){case"year":case"quarter":case"month":case"week":case"day":return!0;default:return!1}}function De(z,f){return z.toString().padStart(f,"0")}function Pe(z){const f=De(z.getUTCFullYear(),4),S=De(z.getUTCMonth()+1,2),$=De(z.getUTCDate(),2),ue=De(z.getUTCHours(),2),me=De(z.getUTCMinutes(),2),Se=De(z.getUTCSeconds(),2);return`${f}-${S}-${$} ${ue}:${me}:${Se}`}function Le(z,f){const S=z??[],$=f??[];return S.length===$.length&&S.every((ue,me)=>ue===$[me])}function ae(z){switch(z.type.kind){case"string_type":return"string";case"boolean_type":return"boolean";case"number_type":return"number";case"date_type":return"date";case"timestamp_type":return"timestamp";default:return"other"}}function ve(z,f){if(z.kind!=="dimension"&&z.kind!=="measure")throw new Error(`Cannot filter by field of type ${z.kind}`);const S=ae(z);if(typeof f=="string")_e(f,S);else if(f.kind!==S)throw new Error(`Invalid filter for field ${z.name}; expected type ${S}, but got ${f.kind}`)}function Ee(z){if(z instanceof P)return z.getSourceInfo().schema;if(z instanceof j)throw new Error("unimplemented");return z.getInputSchema()}}(ct)),ct}var F0;function _d(){return F0||(F0=1,function(a){var d=Cr&&Cr.__createBinding||(Object.create?function(m,h,u,r){r===void 0&&(r=u);var o=Object.getOwnPropertyDescriptor(h,u);(!o||("get"in o?!h.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return h[u]}}),Object.defineProperty(m,r,o)}:function(m,h,u,r){r===void 0&&(r=u),m[r]=h[u]}),y=Cr&&Cr.__exportStar||function(m,h){for(var u in m)u!=="default"&&!Object.prototype.hasOwnProperty.call(h,u)&&d(h,m,u)};Object.defineProperty(a,"__esModule",{value:!0}),y(gd(),a)}(Cr)),Cr}var kp=_d();const Ad=Mp(kp),uy=qp({__proto__:null,default:Ad},[kp]);export{Tr as a,uo as b,Er as c,ut as d,lt as e,po as f,co as g,$i as h,uy as i,st as j,qi as k,Sr as l,Ie as m,qx as n,od as o,Ba as p,La as q,fo as r,kp as s};
|