@elliemae/pui-app-sdk 5.40.3 → 5.40.5
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/demo/{6879.3434f1e9.iframe.bundle.js → 1080.92f6b67a.iframe.bundle.js} +480 -480
- package/demo/1080.92f6b67a.iframe.bundle.js.br +0 -0
- package/demo/1080.92f6b67a.iframe.bundle.js.gz +0 -0
- package/demo/docs/{6879.3434f1e9.iframe.bundle.js → 1080.92f6b67a.iframe.bundle.js} +480 -480
- package/demo/docs/1080.92f6b67a.iframe.bundle.js.br +0 -0
- package/demo/docs/1080.92f6b67a.iframe.bundle.js.gz +0 -0
- package/demo/docs/iframe.html +1 -1
- package/demo/docs/index.html +1 -1
- package/demo/docs/{main.f4b9fb997236ae69d894.manager.bundle.js → main.cfd2e2085f77fe383f8d.manager.bundle.js} +1 -1
- package/demo/docs/{main.f4b9fb997236ae69d894.manager.bundle.js.br → main.cfd2e2085f77fe383f8d.manager.bundle.js.br} +0 -0
- package/demo/docs/{main.f4b9fb997236ae69d894.manager.bundle.js.gz → main.cfd2e2085f77fe383f8d.manager.bundle.js.gz} +0 -0
- package/demo/docs/main.f92b110f.iframe.bundle.js +5 -0
- package/demo/docs/main.f92b110f.iframe.bundle.js.br +0 -0
- package/demo/docs/main.f92b110f.iframe.bundle.js.gz +0 -0
- package/demo/docs/project.json +1 -1
- package/demo/iframe.html +1 -1
- package/demo/index.html +1 -1
- package/demo/{main.f4b9fb997236ae69d894.manager.bundle.js → main.cfd2e2085f77fe383f8d.manager.bundle.js} +1 -1
- package/demo/{main.f4b9fb997236ae69d894.manager.bundle.js.br → main.cfd2e2085f77fe383f8d.manager.bundle.js.br} +0 -0
- package/demo/{main.f4b9fb997236ae69d894.manager.bundle.js.gz → main.cfd2e2085f77fe383f8d.manager.bundle.js.gz} +0 -0
- package/demo/main.f92b110f.iframe.bundle.js +5 -0
- package/demo/main.f92b110f.iframe.bundle.js.br +0 -0
- package/demo/main.f92b110f.iframe.bundle.js.gz +0 -0
- package/demo/project.json +1 -1
- package/dist/cjs/utils/micro-frontend/guest-host-context.js +47 -0
- package/dist/cjs/utils/micro-frontend/guest.js +4 -3
- package/dist/cjs/utils/micro-frontend/host.js +4 -3
- package/dist/cjs/utils/micro-frontend/index.js +4 -1
- package/dist/cjs/utils/micro-frontend/module-so.js +5 -1
- package/dist/cjs/utils/micro-frontend/tests/guest-test-utils.js +27 -0
- package/dist/cjs/view/guest-microapp.js +30 -8
- package/dist/cjs/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +2 -2
- package/dist/esm/utils/micro-frontend/guest-host-context.js +27 -0
- package/dist/esm/utils/micro-frontend/guest.js +4 -3
- package/dist/esm/utils/micro-frontend/host.js +4 -3
- package/dist/esm/utils/micro-frontend/index.js +4 -1
- package/dist/esm/utils/micro-frontend/module-so.js +5 -1
- package/dist/esm/utils/micro-frontend/tests/guest-test-utils.js +7 -0
- package/dist/esm/view/guest-microapp.js +33 -8
- package/dist/esm/view/tests/__snapshots__/micro-iframe-app.test.tsx.snap +2 -2
- package/dist/types/lib/utils/micro-frontend/guest-host-context.d.ts +40 -0
- package/dist/types/lib/utils/micro-frontend/guest.d.ts +2 -1
- package/dist/types/lib/utils/micro-frontend/host.d.ts +2 -1
- package/dist/types/lib/utils/micro-frontend/module-so.d.ts +7 -5
- package/dist/types/lib/utils/micro-frontend/tests/guest-host-context.test.d.ts +1 -0
- package/dist/types/lib/utils/micro-frontend/tests/guest-test-utils.d.ts +2 -0
- package/dist/types/lib/view/guest-microapp.d.ts +12 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/build/docs/404.html +0 -16
- package/build/docs/api/classes/Analytics/index.html +0 -270
- package/build/docs/api/classes/CMicroAppGuest/index.html +0 -261
- package/build/docs/api/classes/CMicroAppHost/index.html +0 -346
- package/build/docs/api/classes/ErrorBoundary/index.html +0 -354
- package/build/docs/api/classes/GuestModule/index.html +0 -148
- package/build/docs/api/functions/AppRoot/index.html +0 -27
- package/build/docs/api/functions/Autocomplete/index.html +0 -22
- package/build/docs/api/functions/CheckBox/index.html +0 -22
- package/build/docs/api/functions/ComboBox/index.html +0 -27
- package/build/docs/api/functions/ComboBoxV3/index.html +0 -22
- package/build/docs/api/functions/ConnectForm/index.html +0 -22
- package/build/docs/api/functions/DateInput/index.html +0 -22
- package/build/docs/api/functions/DatePicker/index.html +0 -27
- package/build/docs/api/functions/DateRangePicker/index.html +0 -22
- package/build/docs/api/functions/DateTimePicker/index.html +0 -22
- package/build/docs/api/functions/Form/index.html +0 -34
- package/build/docs/api/functions/FormItemLayout/index.html +0 -22
- package/build/docs/api/functions/FormLayoutBlockItem/index.html +0 -22
- package/build/docs/api/functions/FormSubmitButton/index.html +0 -22
- package/build/docs/api/functions/InputMask/index.html +0 -22
- package/build/docs/api/functions/InputText/index.html +0 -22
- package/build/docs/api/functions/LargeTextBox/index.html +0 -22
- package/build/docs/api/functions/MaskedInputText/index.html +0 -22
- package/build/docs/api/functions/Page/index.html +0 -22
- package/build/docs/api/functions/Radio/index.html +0 -22
- package/build/docs/api/functions/RadioGroup/index.html +0 -22
- package/build/docs/api/functions/RegisterService/index.html +0 -27
- package/build/docs/api/functions/RenderWithStateAddOns/index.html +0 -22
- package/build/docs/api/functions/RequireAuth/index.html +0 -28
- package/build/docs/api/functions/SessionTimeout/index.html +0 -19
- package/build/docs/api/functions/TextBox/index.html +0 -27
- package/build/docs/api/functions/Toggle/index.html +0 -22
- package/build/docs/api/functions/authSaga/index.html +0 -19
- package/build/docs/api/functions/authorize/index.html +0 -44
- package/build/docs/api/functions/buildModuleParams/index.html +0 -31
- package/build/docs/api/functions/cleanup/index.html +0 -20
- package/build/docs/api/functions/configureStore/index.html +0 -56
- package/build/docs/api/functions/createGuestModule/index.html +0 -39
- package/build/docs/api/functions/createManager/index.html +0 -41
- package/build/docs/api/functions/enableReactAppForHostIntegration/index.html +0 -22
- package/build/docs/api/functions/fetchHostAppData/index.html +0 -24
- package/build/docs/api/functions/fetchUserSettings/index.html +0 -22
- package/build/docs/api/functions/getApiActionCreator/index.html +0 -30
- package/build/docs/api/functions/getAppConfig/index.html +0 -19
- package/build/docs/api/functions/getAppConfigValue/index.html +0 -35
- package/build/docs/api/functions/getAuthHTTPClient/index.html +0 -38
- package/build/docs/api/functions/getAuthorizationHeader/index.html +0 -23
- package/build/docs/api/functions/getHTTPClient/index.html +0 -36
- package/build/docs/api/functions/getHostAppDataByKey/index.html +0 -27
- package/build/docs/api/functions/getLogger/index.html +0 -19
- package/build/docs/api/functions/getMicroFrontEndAppConfig/index.html +0 -23
- package/build/docs/api/functions/getNavigationLinks/index.html +0 -19
- package/build/docs/api/functions/getRedirectUrl/index.html +0 -19
- package/build/docs/api/functions/getSelectField/index.html +0 -33
- package/build/docs/api/functions/getStore/index.html +0 -23
- package/build/docs/api/functions/initServiceWorker/index.html +0 -22
- package/build/docs/api/functions/isCIBuild/index.html +0 -19
- package/build/docs/api/functions/isProd/index.html +0 -19
- package/build/docs/api/functions/isUserAuthorized/index.html +0 -23
- package/build/docs/api/functions/listenStorageEvents/index.html +0 -19
- package/build/docs/api/functions/loadAppConfig/index.html +0 -30
- package/build/docs/api/functions/loadable/index.html +0 -37
- package/build/docs/api/functions/login/index.html +0 -62
- package/build/docs/api/functions/notifyGuestUnloadComplete/index.html +0 -26
- package/build/docs/api/functions/onAuthorizationFailure/index.html +0 -28
- package/build/docs/api/functions/onGuestUnloadStart/index.html +0 -19
- package/build/docs/api/functions/redactPii/index.html +0 -32
- package/build/docs/api/functions/removeDoubleSlash/index.html +0 -22
- package/build/docs/api/functions/removeStorageEvents/index.html +0 -19
- package/build/docs/api/functions/render/index.html +0 -392
- package/build/docs/api/functions/renderHook/index.html +0 -37
- package/build/docs/api/functions/renderWithHostData/index.html +0 -22
- package/build/docs/api/functions/renderWithRedux/index.html +0 -392
- package/build/docs/api/functions/renderWithRouter/index.html +0 -392
- package/build/docs/api/functions/renderWithRouterRedux/index.html +0 -392
- package/build/docs/api/functions/sdkBaseQuery/index.html +0 -37
- package/build/docs/api/functions/sendBAEvent/index.html +0 -34
- package/build/docs/api/functions/sendMessageToHost/index.html +0 -24
- package/build/docs/api/functions/setAppConfig/index.html +0 -27
- package/build/docs/api/functions/setAppConfigValue/index.html +0 -35
- package/build/docs/api/functions/setHostAppData/index.html +0 -25
- package/build/docs/api/functions/setLoginParams/index.html +0 -29
- package/build/docs/api/functions/subscribeToResetSession/index.html +0 -28
- package/build/docs/api/functions/subscribeToSessionExpiry/index.html +0 -28
- package/build/docs/api/functions/subscribeToSessionExpiryWarning/index.html +0 -28
- package/build/docs/api/functions/trackActivity/index.html +0 -31
- package/build/docs/api/functions/useAppDispatch/index.html +0 -24
- package/build/docs/api/functions/useAppMiddleware/index.html +0 -25
- package/build/docs/api/functions/useInjectQuery/index.html +0 -35
- package/build/docs/api/functions/useInjectReducer/index.html +0 -31
- package/build/docs/api/functions/useInjectSaga/index.html +0 -33
- package/build/docs/api/functions/useInjectSideEffect/index.html +0 -25
- package/build/docs/api/functions/useMediaQueryList/index.html +0 -26
- package/build/docs/api/functions/useStateSelector/index.html +0 -38
- package/build/docs/api/functions/useStateSelectorShallow/index.html +0 -39
- package/build/docs/api/functions/waitFor/index.html +0 -27
- package/build/docs/api/functions/waitForElementToBeRemoved/index.html +0 -27
- package/build/docs/api/functions/withAppDecorator/index.html +0 -26
- package/build/docs/api/index.html +0 -29
- package/build/docs/api/interfaces/AppConfig/index.html +0 -46
- package/build/docs/api/interfaces/GuestProps/index.html +0 -86
- package/build/docs/api/interfaces/UseStateSelectorOptions/index.html +0 -25
- package/build/docs/api/type-aliases/AppDispatch/index.html +0 -17
- package/build/docs/api/type-aliases/AppStore/index.html +0 -17
- package/build/docs/api/type-aliases/Await/index.html +0 -20
- package/build/docs/api/type-aliases/EMUI/index.html +0 -62
- package/build/docs/api/type-aliases/HostOptions/index.html +0 -28
- package/build/docs/api/type-aliases/HostProvidedParams/index.html +0 -33
- package/build/docs/api/type-aliases/ModuleOverrides/index.html +0 -47
- package/build/docs/api/type-aliases/OnHostInitCallback/index.html +0 -22
- package/build/docs/api/type-aliases/OnInitCallback/index.html +0 -22
- package/build/docs/api/type-aliases/OnMountCallback/index.html +0 -22
- package/build/docs/api/type-aliases/OnUnMountCallback/index.html +0 -22
- package/build/docs/api/type-aliases/RootState/index.html +0 -17
- package/build/docs/api/type-aliases/SelectStateFieldFunction/index.html +0 -29
- package/build/docs/api/variables/ErrorToast/index.html +0 -17
- package/build/docs/api/variables/FormPropsContext/index.html +0 -24
- package/build/docs/api/variables/GuestMicroApp/index.html +0 -20
- package/build/docs/api/variables/MASK_PIPES/index.html +0 -17
- package/build/docs/api/variables/MASK_TYPES/index.html +0 -17
- package/build/docs/api/variables/MicroApp/index.html +0 -21
- package/build/docs/api/variables/MicroIFrameApp/index.html +0 -21
- package/build/docs/api/variables/NavigationPrompt/index.html +0 -17
- package/build/docs/api/variables/NavigationPromptActions/index.html +0 -22
- package/build/docs/api/variables/Themes/index.html +0 -22
- package/build/docs/api/variables/VisuallyHidden/index.html +0 -17
- package/build/docs/api/variables/WaitMessage/index.html +0 -17
- package/build/docs/api/variables/act/index.html +0 -20
- package/build/docs/api/variables/ariaLive/index.html +0 -17
- package/build/docs/api/variables/auth/index.html +0 -40
- package/build/docs/api/variables/authReducer/index.html +0 -17
- package/build/docs/api/variables/clearSideEffects/index.html +0 -21
- package/build/docs/api/variables/createSideEffect/index.html +0 -19
- package/build/docs/api/variables/decorators/index.html +0 -222
- package/build/docs/api/variables/endSession/index.html +0 -37
- package/build/docs/api/variables/error/index.html +0 -17
- package/build/docs/api/variables/errorMiddleware/index.html +0 -17
- package/build/docs/api/variables/fireEvent/index.html +0 -17
- package/build/docs/api/variables/globalConstants/index.html +0 -22
- package/build/docs/api/variables/history/index.html +0 -17
- package/build/docs/api/variables/httpClientProps/index.html +0 -17
- package/build/docs/api/variables/logout/index.html +0 -22
- package/build/docs/api/variables/memoryHistory/index.html +0 -17
- package/build/docs/api/variables/removeSideEffect/index.html +0 -20
- package/build/docs/api/variables/resetUserIdleTime/index.html +0 -23
- package/build/docs/api/variables/screen/index.html +0 -17
- package/build/docs/api/variables/startSideEffect/index.html +0 -21
- package/build/docs/api/variables/updateBAEventParameters/index.html +0 -27
- package/build/docs/api/variables/useAppSelector/index.html +0 -21
- package/build/docs/api/variables/waitMessageAction/index.html +0 -43
- package/build/docs/api/variables/within/index.html +0 -17
- package/build/docs/assets/css/styles.0fad824b.css +0 -1
- package/build/docs/assets/js/04ee7372.a9b3e0ad.js +0 -1
- package/build/docs/assets/js/05fd5745.f77a9872.js +0 -1
- package/build/docs/assets/js/075aa584.dde55d25.js +0 -1
- package/build/docs/assets/js/0a1bd0e5.3336afb7.js +0 -1
- package/build/docs/assets/js/0f302db7.690bba2c.js +0 -1
- package/build/docs/assets/js/10c70e6f.3a611c9f.js +0 -1
- package/build/docs/assets/js/110b6cba.2039a4be.js +0 -1
- package/build/docs/assets/js/1126.2b1e83b8.js +0 -1
- package/build/docs/assets/js/1127.ce24a599.js +0 -1
- package/build/docs/assets/js/1154937a.58ab70e0.js +0 -1
- package/build/docs/assets/js/1298.f98e394e.js +0 -1
- package/build/docs/assets/js/14efea89.c724a605.js +0 -1
- package/build/docs/assets/js/15f40f8f.62fbc501.js +0 -1
- package/build/docs/assets/js/1617.443ab77e.js +0 -1
- package/build/docs/assets/js/16427680.5a41da14.js +0 -1
- package/build/docs/assets/js/16fba083.0c978e4b.js +0 -1
- package/build/docs/assets/js/1700.bb38b1b9.js +0 -1
- package/build/docs/assets/js/17896441.87af09c7.js +0 -1
- package/build/docs/assets/js/1a5ba401.bdd09a56.js +0 -1
- package/build/docs/assets/js/1ad86f56.5c4d3ed7.js +0 -1
- package/build/docs/assets/js/1cc7c915.18a50af2.js +0 -1
- package/build/docs/assets/js/1dfec420.e8ed9238.js +0 -1
- package/build/docs/assets/js/1fcf59a8.501bb96b.js +0 -1
- package/build/docs/assets/js/2026.f4b8efbd.js +0 -1
- package/build/docs/assets/js/213.07804718.js +0 -1
- package/build/docs/assets/js/2297.998393a9.js +0 -1
- package/build/docs/assets/js/22c6ac39.38c10213.js +0 -1
- package/build/docs/assets/js/242.98ba961c.js +0 -1
- package/build/docs/assets/js/247.f91b8960.js +0 -1
- package/build/docs/assets/js/24b1c163.4390b04b.js +0 -1
- package/build/docs/assets/js/25ae0bf1.3ff15c6f.js +0 -1
- package/build/docs/assets/js/2673.1111af38.js +0 -1
- package/build/docs/assets/js/27c4a013.bceaff37.js +0 -1
- package/build/docs/assets/js/27c8b774.1ec1881a.js +0 -1
- package/build/docs/assets/js/2805.21b4fb8d.js +0 -1
- package/build/docs/assets/js/2b2c5b3b.41587ade.js +0 -1
- package/build/docs/assets/js/3072782a.825cd627.js +0 -1
- package/build/docs/assets/js/3204d46b.7af2b3bd.js +0 -1
- package/build/docs/assets/js/322ec2e7.529db700.js +0 -1
- package/build/docs/assets/js/336f5910.34c060aa.js +0 -1
- package/build/docs/assets/js/3395.f8117aa5.js +0 -1
- package/build/docs/assets/js/3499.2c20c6ff.js +0 -1
- package/build/docs/assets/js/3552.2d0559a3.js +0 -1
- package/build/docs/assets/js/365a2c17.6afbd7ba.js +0 -1
- package/build/docs/assets/js/379bbc32.cfc06360.js +0 -1
- package/build/docs/assets/js/3992.aa5529d1.js +0 -2
- package/build/docs/assets/js/3992.aa5529d1.js.LICENSE.txt +0 -1
- package/build/docs/assets/js/3accd241.850fb650.js +0 -1
- package/build/docs/assets/js/3b0e1261.9caf419d.js +0 -1
- package/build/docs/assets/js/3b333d5b.831324f6.js +0 -1
- package/build/docs/assets/js/3cb0b0a9.99866080.js +0 -1
- package/build/docs/assets/js/3cd01694.04367956.js +0 -1
- package/build/docs/assets/js/4069.77c5dcc9.js +0 -1
- package/build/docs/assets/js/4134.d6069e6e.js +0 -1
- package/build/docs/assets/js/413bfdf1.2e754bf4.js +0 -1
- package/build/docs/assets/js/41f4ce7f.8662231d.js +0 -1
- package/build/docs/assets/js/4257.60660403.js +0 -1
- package/build/docs/assets/js/46eb403d.e5123d24.js +0 -1
- package/build/docs/assets/js/4772.988b91f1.js +0 -1
- package/build/docs/assets/js/4780.8d49dc64.js +0 -1
- package/build/docs/assets/js/47f7a134.2369c86a.js +0 -1
- package/build/docs/assets/js/4884.48d16d5b.js +0 -1
- package/build/docs/assets/js/4acce17e.b84485e3.js +0 -1
- package/build/docs/assets/js/4b10ac31.ffdbb394.js +0 -1
- package/build/docs/assets/js/4eef183e.99934dfe.js +0 -1
- package/build/docs/assets/js/50ae2c89.ea85453c.js +0 -1
- package/build/docs/assets/js/50b500dc.b1dafbf4.js +0 -1
- package/build/docs/assets/js/5113883b.19fc9d2f.js +0 -1
- package/build/docs/assets/js/5196.dda420ed.js +0 -1
- package/build/docs/assets/js/51cd08ce.eedf6a77.js +0 -1
- package/build/docs/assets/js/5248.5442863c.js +0 -1
- package/build/docs/assets/js/533e434c.6a22f28d.js +0 -1
- package/build/docs/assets/js/53defe29.b34f5bfe.js +0 -1
- package/build/docs/assets/js/5428.28b1d8b6.js +0 -1
- package/build/docs/assets/js/54dea6f0.7b5fa5e6.js +0 -1
- package/build/docs/assets/js/550f7dc1.a569914a.js +0 -1
- package/build/docs/assets/js/5575829c.04c44eb2.js +0 -1
- package/build/docs/assets/js/58e12487.6e6066d3.js +0 -1
- package/build/docs/assets/js/59169cbb.2d2d02ce.js +0 -1
- package/build/docs/assets/js/5964.fbd55ce8.js +0 -1
- package/build/docs/assets/js/5968.7a565a4e.js +0 -1
- package/build/docs/assets/js/5c5cf8ae.cf6912f5.js +0 -1
- package/build/docs/assets/js/5ca2639d.8b06c9ea.js +0 -1
- package/build/docs/assets/js/5da011d0.872006f0.js +0 -1
- package/build/docs/assets/js/5e13701d.8a6b7fd6.js +0 -1
- package/build/docs/assets/js/5e7ee35c.01ca7414.js +0 -1
- package/build/docs/assets/js/5e8c322a.0391dec4.js +0 -1
- package/build/docs/assets/js/5e95c892.f11d5bd6.js +0 -1
- package/build/docs/assets/js/5ebc190f.49776b06.js +0 -1
- package/build/docs/assets/js/5f21eb71.536ccef3.js +0 -1
- package/build/docs/assets/js/60781fed.87f57230.js +0 -1
- package/build/docs/assets/js/61b0e64b.c86eca9e.js +0 -1
- package/build/docs/assets/js/61f3b5cc.197d138c.js +0 -1
- package/build/docs/assets/js/62e1e335.d54d1d6e.js +0 -1
- package/build/docs/assets/js/6486.776625d1.js +0 -1
- package/build/docs/assets/js/6611.481d87ff.js +0 -2
- package/build/docs/assets/js/6611.481d87ff.js.LICENSE.txt +0 -9
- package/build/docs/assets/js/6aac2d5c.95d7104d.js +0 -1
- package/build/docs/assets/js/6b345055.f4f6c3b9.js +0 -1
- package/build/docs/assets/js/6b7fcc15.290796d9.js +0 -1
- package/build/docs/assets/js/6ca90961.8833c635.js +0 -1
- package/build/docs/assets/js/6d1f0509.55213557.js +0 -1
- package/build/docs/assets/js/6daa33e8.c1c74588.js +0 -1
- package/build/docs/assets/js/7080.73a89c35.js +0 -1
- package/build/docs/assets/js/7201.26026979.js +0 -1
- package/build/docs/assets/js/7344.12628cac.js +0 -1
- package/build/docs/assets/js/749b3cb7.660b1c4b.js +0 -1
- package/build/docs/assets/js/7516.78c3385c.js +0 -1
- package/build/docs/assets/js/7525.69d857f8.js +0 -1
- package/build/docs/assets/js/7540.ee4aa270.js +0 -1
- package/build/docs/assets/js/78fde597.9598cb2a.js +0 -1
- package/build/docs/assets/js/7985.6aac4971.js +0 -1
- package/build/docs/assets/js/7b224b5a.d21317ac.js +0 -1
- package/build/docs/assets/js/7c822e85.3cc0a954.js +0 -1
- package/build/docs/assets/js/7cde3459.802fae28.js +0 -1
- package/build/docs/assets/js/7d256524.087a46e5.js +0 -1
- package/build/docs/assets/js/7d48b3e7.5d6ce912.js +0 -1
- package/build/docs/assets/js/80392bdc.dbd30f9e.js +0 -1
- package/build/docs/assets/js/8049.5b4457b0.js +0 -1
- package/build/docs/assets/js/805daf1e.305437dc.js +0 -1
- package/build/docs/assets/js/8152.32ad98ca.js +0 -1
- package/build/docs/assets/js/821.19f6a696.js +0 -1
- package/build/docs/assets/js/822e0178.3c0d623a.js +0 -1
- package/build/docs/assets/js/82894961.81f97aaf.js +0 -1
- package/build/docs/assets/js/8290.f0834113.js +0 -1
- package/build/docs/assets/js/8355.bcde11e0.js +0 -1
- package/build/docs/assets/js/8389.b3f6164d.js +0 -1
- package/build/docs/assets/js/8585.e50595e8.js +0 -1
- package/build/docs/assets/js/85dc4c9b.d835c54a.js +0 -1
- package/build/docs/assets/js/8788.c86aea45.js +0 -1
- package/build/docs/assets/js/88a4c043.ca8fd05b.js +0 -1
- package/build/docs/assets/js/90579cbd.0835e6a5.js +0 -1
- package/build/docs/assets/js/90bbfd1d.d0fd53f0.js +0 -1
- package/build/docs/assets/js/9178.f2e05b02.js +0 -1
- package/build/docs/assets/js/9210.b5a9980e.js +0 -1
- package/build/docs/assets/js/9354.77e86f51.js +0 -1
- package/build/docs/assets/js/936.275fbed5.js +0 -1
- package/build/docs/assets/js/9550cc1f.e19e7779.js +0 -1
- package/build/docs/assets/js/9574.c7203040.js +0 -1
- package/build/docs/assets/js/97.d2ed6ba9.js +0 -1
- package/build/docs/assets/js/9852.cf8f89a9.js +0 -1
- package/build/docs/assets/js/9953.90bfd954.js +0 -1
- package/build/docs/assets/js/999f4a99.31e9f0f9.js +0 -1
- package/build/docs/assets/js/99a35e8f.3cb224e6.js +0 -1
- package/build/docs/assets/js/9ab62f73.a44012b0.js +0 -1
- package/build/docs/assets/js/9ea6fe4d.ebd612bc.js +0 -1
- package/build/docs/assets/js/a09470d9.16bfeef9.js +0 -1
- package/build/docs/assets/js/a0eb976e.f6504d94.js +0 -1
- package/build/docs/assets/js/a17fb045.0c651699.js +0 -1
- package/build/docs/assets/js/a2537f00.c241e3f2.js +0 -1
- package/build/docs/assets/js/a29a6e44.58d6b878.js +0 -1
- package/build/docs/assets/js/a3ecf861.0f55d8fd.js +0 -1
- package/build/docs/assets/js/a48fd09c.50989621.js +0 -1
- package/build/docs/assets/js/a6c41565.0821af7d.js +0 -1
- package/build/docs/assets/js/a6c5c03c.0e69962a.js +0 -1
- package/build/docs/assets/js/a769954d.02ea4cc3.js +0 -1
- package/build/docs/assets/js/a7861986.e4d90417.js +0 -1
- package/build/docs/assets/js/a7bd4aaa.3faf623f.js +0 -1
- package/build/docs/assets/js/a8687130.681fc6b9.js +0 -1
- package/build/docs/assets/js/a94703ab.9865def5.js +0 -1
- package/build/docs/assets/js/a9ba6591.bcdf3f9d.js +0 -1
- package/build/docs/assets/js/ab05b3aa.63cf7d9f.js +0 -1
- package/build/docs/assets/js/aba21aa0.4d968e31.js +0 -1
- package/build/docs/assets/js/ac9d64ec.dd98824b.js +0 -1
- package/build/docs/assets/js/aeb9810c.f3c24439.js +0 -1
- package/build/docs/assets/js/b0125fa2.c7fba4da.js +0 -1
- package/build/docs/assets/js/b0ccf0d8.89a4a7e2.js +0 -1
- package/build/docs/assets/js/b1474780.0982f737.js +0 -1
- package/build/docs/assets/js/b2a255cc.df3fdd56.js +0 -1
- package/build/docs/assets/js/b31a5f55.9a4737ac.js +0 -1
- package/build/docs/assets/js/b4285021.67b039a1.js +0 -1
- package/build/docs/assets/js/b784b5bb.7d7bb82c.js +0 -1
- package/build/docs/assets/js/b8c1226b.a92653b3.js +0 -1
- package/build/docs/assets/js/b93b454c.f87b4896.js +0 -1
- package/build/docs/assets/js/bc717899.36b37795.js +0 -1
- package/build/docs/assets/js/bf1a96cc.8abf8470.js +0 -1
- package/build/docs/assets/js/c10ec81d.0dff1cac.js +0 -1
- package/build/docs/assets/js/c254daed.d6764cd8.js +0 -1
- package/build/docs/assets/js/c377a04b.a6a0a334.js +0 -1
- package/build/docs/assets/js/c52b5473.1a1069c1.js +0 -1
- package/build/docs/assets/js/c5e9787b.448cc7d9.js +0 -1
- package/build/docs/assets/js/c7710052.d061cfdd.js +0 -1
- package/build/docs/assets/js/c8a9fc86.daf30d50.js +0 -1
- package/build/docs/assets/js/c90572d4.42231642.js +0 -1
- package/build/docs/assets/js/cfad4bb4.edde6aa3.js +0 -1
- package/build/docs/assets/js/d071c513.a096e87e.js +0 -1
- package/build/docs/assets/js/d0fd4a71.1d53f49d.js +0 -1
- package/build/docs/assets/js/d1d7a857.424e14dc.js +0 -1
- package/build/docs/assets/js/d38c25bf.1430a667.js +0 -1
- package/build/docs/assets/js/d3d37933.d7f15fe8.js +0 -1
- package/build/docs/assets/js/d71e6c8a.f4306e16.js +0 -1
- package/build/docs/assets/js/d9084ecb.61eb0649.js +0 -1
- package/build/docs/assets/js/de3ee31a.0992aa16.js +0 -1
- package/build/docs/assets/js/e0db4c79.6fcade57.js +0 -1
- package/build/docs/assets/js/e4ad89b2.9ca87caa.js +0 -1
- package/build/docs/assets/js/e876cff6.7c7560ed.js +0 -1
- package/build/docs/assets/js/e917d7c9.b54a542b.js +0 -1
- package/build/docs/assets/js/e9f568e8.b96fc01f.js +0 -1
- package/build/docs/assets/js/ea5986e4.ff0e5037.js +0 -1
- package/build/docs/assets/js/eb84a108.be29052f.js +0 -1
- package/build/docs/assets/js/ed6a4585.c5d8bf90.js +0 -1
- package/build/docs/assets/js/f4180cff.dae060fd.js +0 -1
- package/build/docs/assets/js/f7084923.91b0c545.js +0 -1
- package/build/docs/assets/js/f72a372a.4118877c.js +0 -1
- package/build/docs/assets/js/f72c86d0.d74270de.js +0 -1
- package/build/docs/assets/js/f8fa0321.c4c3a620.js +0 -1
- package/build/docs/assets/js/fc7c782f.bc0ad1ab.js +0 -1
- package/build/docs/assets/js/fce396bf.9f7f818c.js +0 -1
- package/build/docs/assets/js/fdb0d9e1.d2893206.js +0 -1
- package/build/docs/assets/js/fed4ae4f.e788c07f.js +0 -1
- package/build/docs/assets/js/fefe9566.113c5960.js +0 -1
- package/build/docs/assets/js/ff0bf96e.e457283e.js +0 -1
- package/build/docs/assets/js/ff6d65a9.39317a08.js +0 -1
- package/build/docs/assets/js/main.7d445fc8.js +0 -2
- package/build/docs/assets/js/main.7d445fc8.js.LICENSE.txt +0 -51
- package/build/docs/assets/js/runtime~main.5c8a1e20.js +0 -1
- package/build/docs/img/favicon.ico +0 -0
- package/build/docs/img/logo.jpeg +0 -0
- package/build/docs/img/logo.svg +0 -22
- package/build/docs/img/readme.md +0 -1
- package/build/docs/index.html +0 -102
- package/build/docs/readme.md +0 -1
- package/build/docs/sitemap.xml +0 -1
- package/build/docs/usage-guide/index.html +0 -580
- package/demo/6879.3434f1e9.iframe.bundle.js.br +0 -0
- package/demo/6879.3434f1e9.iframe.bundle.js.gz +0 -0
- package/demo/docs/6879.3434f1e9.iframe.bundle.js.br +0 -0
- package/demo/docs/6879.3434f1e9.iframe.bundle.js.gz +0 -0
- package/demo/docs/main.703b0e4c.iframe.bundle.js +0 -5
- package/demo/docs/main.703b0e4c.iframe.bundle.js.br +0 -0
- package/demo/docs/main.703b0e4c.iframe.bundle.js.gz +0 -0
- package/demo/main.703b0e4c.iframe.bundle.js +0 -5
- package/demo/main.703b0e4c.iframe.bundle.js.br +0 -0
- package/demo/main.703b0e4c.iframe.bundle.js.gz +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_elliemae_pui_app_sdk=globalThis.webpackChunk_elliemae_pui_app_sdk||[]).push([[9953],{2186(e,t,r){r.d(t,{S:()=>o});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},a=class extends n.dg{static{(0,n.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},s={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.wV,s);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}(0,n.K2)(o,"createArchitectureServices")},7593(e,t,r){r.d(t,{v:()=>s});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.FZ,a);return t.ServiceRegistry.register(r),{shared:t,Info:r}}(0,n.K2)(s,"createInfoServices")},5419(e,t,r){r.d(t,{d:()=>u});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},a=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,s=class extends n.dg{static{(0,n.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=a.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function o(e){const t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){const e={Treemap:t.checkSingleRoot.bind(t)};r.register(e,t)}}(0,n.K2)(o,"registerValidationChecks");var l=class{static{(0,n.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(const n of e.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},c={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new s,"ValueConverter")},validation:{TreemapValidator:(0,n.K2)(()=>new l,"TreemapValidator")}};function u(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.XE,c);return t.ServiceRegistry.register(r),o(r),{shared:t,Treemap:r}}(0,n.K2)(u,"createTreemapServices")},4414(e,t,r){r.d(t,{f:()=>s});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Bg,a);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}(0,n.K2)(s,"createRadarServices")},5170(e,t,r){r.d(t,{$:()=>s});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.p5,a);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}(0,n.K2)(s,"createPacketServices")},6886(e,t,r){r.d(t,{f:()=>o});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},a=class extends n.dg{static{(0,n.K2)(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},s={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new a,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.D_,s);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}(0,n.K2)(o,"createPieServices")},8382(e,t,r){r.d(t,{g:()=>f});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},a=new Set(["cmd","command"]),s=new Set(["evt","event"]),o=new Set(["rmo","readmodel"]),l=new Set(["pcr","processor"]),c=new Set(["ui"]);function u(e){const t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){const e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(e,t)}}(0,n.K2)(u,"registerValidationChecks");var d=class{static{(0,n.K2)(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){0!==e.sourceFrames.length&&(a.has(e.modelEntityType)?this.validateSources(e,new Set([...c,...l]),"command","ui or processor",t):s.has(e.modelEntityType)?this.validateSources(e,a,"event","command",t):o.has(e.modelEntityType)?this.validateSources(e,s,"read model","event",t):l.has(e.modelEntityType)?this.validateSources(e,o,"processor","read model",t):c.has(e.modelEntityType)&&this.validateSources(e,o,"ui","read model",t))}validateSources(e,t,r,n,i){for(const a of e.sourceFrames){const s=a.ref;void 0===s||t.has(s.modelEntityType)||i("error",`A ${r} can only receive input from a ${n}, not from '${s.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},p={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")},validation:{EventModelingValidator:(0,n.K2)(()=>new d,"EventModelingValidator")}};function f(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.x0,p);return t.ServiceRegistry.register(r),u(r),{shared:t,EventModel:r}}(0,n.K2)(f,"createEventModelingServices")},3228(e,t,r){r.d(t,{Bg:()=>fL,CZ:()=>mL,DD:()=>vN,D_:()=>pL,F5:()=>D_,FZ:()=>uL,K2:()=>ze,Tm:()=>TL,WQ:()=>iN,XE:()=>hL,Xr:()=>gL,d$:()=>cL,dg:()=>vL,mR:()=>RL,p5:()=>dL,sr:()=>sL,tG:()=>rN,uM:()=>nN,wV:()=>oL,x0:()=>lL});var n,i,a,s,o,l,c,u,d,p,f,h,m,g,y,v,T,R,$,b,E,C,A,S,k,w,x,N,I,_,P,D,O,L,M,j,F,z,G,q,K,U,W,B,V,H,Y,X,J,Q,Z,ee,te,re,ne,ie,ae,se,oe,le,ce,ue,de,pe,fe,he,me,ge,ye,ve,Te,Re,$e,be,Ee,Ce,Ae,Se,ke,we,xe,Ne,Ie,_e,Pe,De=Object.create,Oe=Object.defineProperty,Le=Object.getOwnPropertyDescriptor,Me=Object.getOwnPropertyNames,je=Object.getPrototypeOf,Fe=Object.prototype.hasOwnProperty,ze=(e,t)=>Oe(e,"name",{value:t,configurable:!0}),Ge=(e,t)=>function(){return t||(0,e[Me(e)[0]])((t={exports:{}}).exports,t),t.exports},qe=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})},Ke=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Me(t))Fe.call(e,i)||i===r||Oe(e,i,{get:()=>t[i],enumerable:!(n=Le(t,i))||n.enumerable});return e},Ue=(e,t,r)=>(Ke(e,t,"default"),r&&Ke(r,t,"default")),We=(e,t,r)=>(r=null!=e?De(je(e)):{},Ke(!t&&e&&e.__esModule?r:Oe(r,"default",{value:e,enumerable:!0}),e)),Be=e=>Ke(Oe({},"__esModule",{value:!0}),e),Ve={};qe(Ve,{AnnotatedTextEdit:()=>A,ChangeAnnotation:()=>E,ChangeAnnotationIdentifier:()=>C,CodeAction:()=>le,CodeActionContext:()=>oe,CodeActionKind:()=>ae,CodeActionTriggerKind:()=>se,CodeDescription:()=>T,CodeLens:()=>ce,Color:()=>d,ColorInformation:()=>p,ColorPresentation:()=>f,Command:()=>$,CompletionItem:()=>B,CompletionItemKind:()=>z,CompletionItemLabelDetails:()=>W,CompletionItemTag:()=>q,CompletionList:()=>V,CreateFile:()=>k,DeleteFile:()=>x,Diagnostic:()=>R,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>v,DocumentHighlight:()=>Z,DocumentHighlightKind:()=>Q,DocumentLink:()=>de,DocumentSymbol:()=>ie,DocumentUri:()=>n,EOL:()=>Ne,FoldingRange:()=>m,FoldingRangeKind:()=>h,FormattingOptions:()=>ue,Hover:()=>Y,InlayHint:()=>be,InlayHintKind:()=>Re,InlayHintLabelPart:()=>$e,InlineCompletionContext:()=>we,InlineCompletionItem:()=>Ce,InlineCompletionList:()=>Ae,InlineCompletionTriggerKind:()=>Se,InlineValueContext:()=>Te,InlineValueEvaluatableExpression:()=>ve,InlineValueText:()=>ge,InlineValueVariableLookup:()=>ye,InsertReplaceEdit:()=>K,InsertTextFormat:()=>G,InsertTextMode:()=>U,Location:()=>c,LocationLink:()=>u,MarkedString:()=>H,MarkupContent:()=>F,MarkupKind:()=>j,OptionalVersionedTextDocumentIdentifier:()=>L,ParameterInformation:()=>X,Position:()=>o,Range:()=>l,RenameFile:()=>w,SelectedCompletionInfo:()=>ke,SelectionRange:()=>pe,SemanticTokenModifiers:()=>he,SemanticTokenTypes:()=>fe,SemanticTokens:()=>me,SignatureInformation:()=>J,StringValue:()=>Ee,SymbolInformation:()=>re,SymbolKind:()=>ee,SymbolTag:()=>te,TextDocument:()=>Ie,TextDocumentEdit:()=>S,TextDocumentIdentifier:()=>D,TextDocumentItem:()=>M,TextEdit:()=>b,URI:()=>i,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>P,WorkspaceEdit:()=>N,WorkspaceFolder:()=>xe,WorkspaceSymbol:()=>ne,integer:()=>a,uinteger:()=>s});var He,Ye,Xe=(He={"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var e,t,r,De,Oe,Le,Me,je,Fe,Ge,qe,Ke,Ue;!function(e){function t(e){return"string"==typeof e}ze(t,"is"),e.is=t}(n||(n={})),function(e){function t(e){return"string"==typeof e}ze(t,"is"),e.is=t}(i||(i={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,ze(t,"is"),e.is=t}(a||(a={})),function(e){function t(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}e.MIN_VALUE=0,e.MAX_VALUE=2147483647,ze(t,"is"),e.is=t}(s||(s={})),function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=s.MAX_VALUE),t===Number.MAX_VALUE&&(t=s.MAX_VALUE),{line:e,character:t}}function r(e){let t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(o||(o={})),function(e){function t(e,t,r,n){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(r)&&Pe.uinteger(n))return{start:o.create(e,t),end:o.create(r,n)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function r(e){let t=e;return Pe.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(l||(l={})),function(e){function t(e,t){return{uri:e,range:t}}function r(e){let t=e;return Pe.objectLiteral(t)&&l.is(t.range)&&(Pe.string(t.uri)||Pe.undefined(t.uri))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(c||(c={})),function(e){function t(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function r(e){let t=e;return Pe.objectLiteral(t)&&l.is(t.targetRange)&&Pe.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||Pe.undefined(t.originSelectionRange))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(u||(u={})),function(e){function t(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(d||(d={})),function(e){function t(e,t){return{range:e,color:t}}function r(e){const t=e;return Pe.objectLiteral(t)&&l.is(t.range)&&d.is(t.color)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(p||(p={})),function(e){function t(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||b.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,b.is))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(f||(f={})),(e=h||(h={})).Comment="comment",e.Imports="imports",e.Region="region",function(e){function t(e,t,r,n,i,a){const s={startLine:e,endLine:t};return Pe.defined(r)&&(s.startCharacter=r),Pe.defined(n)&&(s.endCharacter=n),Pe.defined(i)&&(s.kind=i),Pe.defined(a)&&(s.collapsedText=a),s}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(m||(m={})),function(e){function t(e,t){return{location:e,message:t}}function r(e){let t=e;return Pe.defined(t)&&c.is(t.location)&&Pe.string(t.message)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(g||(g={})),(t=y||(y={})).Error=1,t.Warning=2,t.Information=3,t.Hint=4,(r=v||(v={})).Unnecessary=1,r.Deprecated=2,function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}ze(t,"is"),e.is=t}(T||(T={})),function(e){function t(e,t,r,n,i,a){let s={range:e,message:t};return Pe.defined(r)&&(s.severity=r),Pe.defined(n)&&(s.code=n),Pe.defined(i)&&(s.source=i),Pe.defined(a)&&(s.relatedInformation=a),s}function r(e){var t;let r=e;return Pe.defined(r)&&l.is(r.range)&&Pe.string(r.message)&&(Pe.number(r.severity)||Pe.undefined(r.severity))&&(Pe.integer(r.code)||Pe.string(r.code)||Pe.undefined(r.code))&&(Pe.undefined(r.codeDescription)||Pe.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(r.source)||Pe.undefined(r.source))&&(Pe.undefined(r.relatedInformation)||Pe.typedArray(r.relatedInformation,g.is))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(R||(R={})),function(e){function t(e,t,...r){let n={title:e,command:t};return Pe.defined(r)&&r.length>0&&(n.arguments=r),n}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}($||($={})),function(e){function t(e,t){return{range:e,newText:t}}function r(e,t){return{range:{start:e,end:e},newText:t}}function n(e){return{range:e,newText:""}}function i(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&l.is(t.range)}ze(t,"replace"),e.replace=t,ze(r,"insert"),e.insert=r,ze(n,"del"),e.del=n,ze(i,"is"),e.is=i}(b||(b={})),function(e){function t(e,t,r){const n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n}function r(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(E||(E={})),function(e){function t(e){const t=e;return Pe.string(t)}ze(t,"is"),e.is=t}(C||(C={})),function(e){function t(e,t,r){return{range:e,newText:t,annotationId:r}}function r(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}}function n(e,t){return{range:e,newText:"",annotationId:t}}function i(e){const t=e;return b.is(t)&&(E.is(t.annotationId)||C.is(t.annotationId))}ze(t,"replace"),e.replace=t,ze(r,"insert"),e.insert=r,ze(n,"del"),e.del=n,ze(i,"is"),e.is=i}(A||(A={})),function(e){function t(e,t){return{textDocument:e,edits:t}}function r(e){let t=e;return Pe.defined(t)&&L.is(t.textDocument)&&Array.isArray(t.edits)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(S||(S={})),function(e){function t(e,t,r){let n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(k||(k={})),function(e){function t(e,t,r,n){let i={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i}function r(e){let t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(w||(w={})),function(e){function t(e,t,r){let n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n}function r(e){let t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||C.is(t.annotationId))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(x||(x={})),function(e){function t(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Pe.string(e.kind)?k.is(e)||w.is(e)||x.is(e):S.is(e)))}ze(t,"is"),e.is=t}(N||(N={})),I=class{static{ze(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,i;if(void 0===r?n=b.insert(e,t):C.is(r)?(i=r,n=A.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=A.insert(e,t,i)),this.edits.push(n),void 0!==i)return i}replace(e,t,r){let n,i;if(void 0===r?n=b.replace(e,t):C.is(r)?(i=r,n=A.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=A.replace(e,t,i)),this.edits.push(n),void 0!==i)return i}delete(e,t){let r,n;if(void 0===t?r=b.del(e):C.is(t)?(n=t,r=A.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=A.del(e,n)),this.edits.push(r),void 0!==n)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}},_=class{static{ze(this,"ChangeAnnotations")}constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(C.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error(`Id ${r} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},P=class{static{ze(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new _(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(S.is(e)){const t=new I(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const r=new I(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(L.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let r=this._textEditChanges[t.uri];if(!r){const e=[],n={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(n),r=new I(e,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new I(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new _,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(E.is(t)||C.is(t)?n=t:r=t,void 0===n?i=k.create(e,r):(a=C.is(n)?n:this._changeAnnotations.manage(n),i=k.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}renameFile(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,a,s;if(E.is(r)||C.is(r)?i=r:n=r,void 0===i?a=w.create(e,t,n):(s=C.is(i)?i:this._changeAnnotations.manage(i),a=w.create(e,t,n,s)),this._workspaceEdit.documentChanges.push(a),void 0!==s)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let n,i,a;if(E.is(t)||C.is(t)?n=t:r=t,void 0===n?i=x.create(e,r):(a=C.is(n)?n:this._changeAnnotations.manage(n),i=x.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a}},function(e){function t(e){return{uri:e}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(D||(D={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(O||(O={})),function(e){function t(e,t){return{uri:e,version:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(L||(L={})),function(e){function t(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function r(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(M||(M={})),function(e){function t(t){const r=t;return r===e.PlainText||r===e.Markdown}e.PlainText="plaintext",e.Markdown="markdown",ze(t,"is"),e.is=t}(j||(j={})),function(e){function t(e){const t=e;return Pe.objectLiteral(e)&&j.is(t.kind)&&Pe.string(t.value)}ze(t,"is"),e.is=t}(F||(F={})),(De=z||(z={})).Text=1,De.Method=2,De.Function=3,De.Constructor=4,De.Field=5,De.Variable=6,De.Class=7,De.Interface=8,De.Module=9,De.Property=10,De.Unit=11,De.Value=12,De.Enum=13,De.Keyword=14,De.Snippet=15,De.Color=16,De.File=17,De.Reference=18,De.Folder=19,De.EnumMember=20,De.Constant=21,De.Struct=22,De.Event=23,De.Operator=24,De.TypeParameter=25,(Oe=G||(G={})).PlainText=1,Oe.Snippet=2,(q||(q={})).Deprecated=1,function(e){function t(e,t,r){return{newText:e,insert:t,replace:r}}function r(e){const t=e;return t&&Pe.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(K||(K={})),(Le=U||(U={})).asIs=1,Le.adjustIndentation=2,function(e){function t(e){const t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}ze(t,"is"),e.is=t}(W||(W={})),function(e){function t(e){return{label:e}}ze(t,"create"),e.create=t}(B||(B={})),function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}ze(t,"create"),e.create=t}(V||(V={})),function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function r(e){const t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}ze(t,"fromPlainText"),e.fromPlainText=t,ze(r,"is"),e.is=r}(H||(H={})),function(e){function t(e){let t=e;return!!t&&Pe.objectLiteral(t)&&(F.is(t.contents)||H.is(t.contents)||Pe.typedArray(t.contents,H.is))&&(void 0===e.range||l.is(e.range))}ze(t,"is"),e.is=t}(Y||(Y={})),function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}ze(t,"create"),e.create=t}(X||(X={})),function(e){function t(e,t,...r){let n={label:e};return Pe.defined(t)&&(n.documentation=t),Pe.defined(r)?n.parameters=r:n.parameters=[],n}ze(t,"create"),e.create=t}(J||(J={})),(Me=Q||(Q={})).Text=1,Me.Read=2,Me.Write=3,function(e){function t(e,t){let r={range:e};return Pe.number(t)&&(r.kind=t),r}ze(t,"create"),e.create=t}(Z||(Z={})),(je=ee||(ee={})).File=1,je.Module=2,je.Namespace=3,je.Package=4,je.Class=5,je.Method=6,je.Property=7,je.Field=8,je.Constructor=9,je.Enum=10,je.Interface=11,je.Function=12,je.Variable=13,je.Constant=14,je.String=15,je.Number=16,je.Boolean=17,je.Array=18,je.Object=19,je.Key=20,je.Null=21,je.EnumMember=22,je.Struct=23,je.Event=24,je.Operator=25,je.TypeParameter=26,(te||(te={})).Deprecated=1,function(e){function t(e,t,r,n,i){let a={name:e,kind:t,location:{uri:n,range:r}};return i&&(a.containerName=i),a}ze(t,"create"),e.create=t}(re||(re={})),function(e){function t(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}ze(t,"create"),e.create=t}(ne||(ne={})),function(e){function t(e,t,r,n,i,a){let s={name:e,detail:t,kind:r,range:n,selectionRange:i};return void 0!==a&&(s.children=a),s}function r(e){let t=e;return t&&Pe.string(t.name)&&Pe.number(t.kind)&&l.is(t.range)&&l.is(t.selectionRange)&&(void 0===t.detail||Pe.string(t.detail))&&(void 0===t.deprecated||Pe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ie||(ie={})),(Fe=ae||(ae={})).Empty="",Fe.QuickFix="quickfix",Fe.Refactor="refactor",Fe.RefactorExtract="refactor.extract",Fe.RefactorInline="refactor.inline",Fe.RefactorRewrite="refactor.rewrite",Fe.Source="source",Fe.SourceOrganizeImports="source.organizeImports",Fe.SourceFixAll="source.fixAll",(Ge=se||(se={})).Invoked=1,Ge.Automatic=2,function(e){function t(e,t,r){let n={diagnostics:e};return null!=t&&(n.only=t),null!=r&&(n.triggerKind=r),n}function r(e){let t=e;return Pe.defined(t)&&Pe.typedArray(t.diagnostics,R.is)&&(void 0===t.only||Pe.typedArray(t.only,Pe.string))&&(void 0===t.triggerKind||t.triggerKind===se.Invoked||t.triggerKind===se.Automatic)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(oe||(oe={})),function(e){function t(e,t,r){let n={title:e},i=!0;return"string"==typeof t?(i=!1,n.kind=t):$.is(t)?n.command=t:n.edit=t,i&&void 0!==r&&(n.kind=r),n}function r(e){let t=e;return t&&Pe.string(t.title)&&(void 0===t.diagnostics||Pe.typedArray(t.diagnostics,R.is))&&(void 0===t.kind||Pe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||$.is(t.command))&&(void 0===t.isPreferred||Pe.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(le||(le={})),function(e){function t(e,t){let r={range:e};return Pe.defined(t)&&(r.data=t),r}function r(e){let t=e;return Pe.defined(t)&&l.is(t.range)&&(Pe.undefined(t.command)||$.is(t.command))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ce||(ce={})),function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}function r(e){let t=e;return Pe.defined(t)&&Pe.uinteger(t.tabSize)&&Pe.boolean(t.insertSpaces)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ue||(ue={})),function(e){function t(e,t,r){return{range:e,target:t,data:r}}function r(e){let t=e;return Pe.defined(t)&&l.is(t.range)&&(Pe.undefined(t.target)||Pe.string(t.target))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(de||(de={})),function(e){function t(e,t){return{range:e,parent:t}}function r(t){let r=t;return Pe.objectLiteral(r)&&l.is(r.range)&&(void 0===r.parent||e.is(r.parent))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(pe||(pe={})),(qe=fe||(fe={})).namespace="namespace",qe.type="type",qe.class="class",qe.enum="enum",qe.interface="interface",qe.struct="struct",qe.typeParameter="typeParameter",qe.parameter="parameter",qe.variable="variable",qe.property="property",qe.enumMember="enumMember",qe.event="event",qe.function="function",qe.method="method",qe.macro="macro",qe.keyword="keyword",qe.modifier="modifier",qe.comment="comment",qe.string="string",qe.number="number",qe.regexp="regexp",qe.operator="operator",qe.decorator="decorator",(Ke=he||(he={})).declaration="declaration",Ke.definition="definition",Ke.readonly="readonly",Ke.static="static",Ke.deprecated="deprecated",Ke.abstract="abstract",Ke.async="async",Ke.modification="modification",Ke.documentation="documentation",Ke.defaultLibrary="defaultLibrary",function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}ze(t,"is"),e.is=t}(me||(me={})),function(e){function t(e,t){return{range:e,text:t}}function r(e){const t=e;return null!=t&&l.is(t.range)&&Pe.string(t.text)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ge||(ge={})),function(e){function t(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function r(e){const t=e;return null!=t&&l.is(t.range)&&Pe.boolean(t.caseSensitiveLookup)&&(Pe.string(t.variableName)||void 0===t.variableName)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ye||(ye={})),function(e){function t(e,t){return{range:e,expression:t}}function r(e){const t=e;return null!=t&&l.is(t.range)&&(Pe.string(t.expression)||void 0===t.expression)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(ve||(ve={})),function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}function r(e){const t=e;return Pe.defined(t)&&l.is(e.stoppedLocation)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(Te||(Te={})),function(e){function t(e){return 1===e||2===e}e.Type=1,e.Parameter=2,ze(t,"is"),e.is=t}(Re||(Re={})),function(e){function t(e){return{value:e}}function r(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.tooltip||Pe.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.location||c.is(t.location))&&(void 0===t.command||$.is(t.command))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}($e||($e={})),function(e){function t(e,t,r){const n={position:e,label:t};return void 0!==r&&(n.kind=r),n}function r(e){const t=e;return Pe.objectLiteral(t)&&o.is(t.position)&&(Pe.string(t.label)||Pe.typedArray(t.label,$e.is))&&(void 0===t.kind||Re.is(t.kind))&&void 0===t.textEdits||Pe.typedArray(t.textEdits,b.is)&&(void 0===t.tooltip||Pe.string(t.tooltip)||F.is(t.tooltip))&&(void 0===t.paddingLeft||Pe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Pe.boolean(t.paddingRight))}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(be||(be={})),function(e){function t(e){return{kind:"snippet",value:e}}ze(t,"createSnippet"),e.createSnippet=t}(Ee||(Ee={})),function(e){function t(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}ze(t,"create"),e.create=t}(Ce||(Ce={})),function(e){function t(e){return{items:e}}ze(t,"create"),e.create=t}(Ae||(Ae={})),(Ue=Se||(Se={})).Invoked=0,Ue.Automatic=1,function(e){function t(e,t){return{range:e,text:t}}ze(t,"create"),e.create=t}(ke||(ke={})),function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}ze(t,"create"),e.create=t}(we||(we={})),function(e){function t(e){const t=e;return Pe.objectLiteral(t)&&i.is(t.uri)&&Pe.string(t.name)}ze(t,"is"),e.is=t}(xe||(xe={})),Ne=["\n","\r\n","\r"],function(e){function t(e,t,r,n){return new _e(e,t,r,n)}function r(e){let t=e;return!!(Pe.defined(t)&&Pe.string(t.uri)&&(Pe.undefined(t.languageId)||Pe.string(t.languageId))&&Pe.uinteger(t.lineCount)&&Pe.func(t.getText)&&Pe.func(t.positionAt)&&Pe.func(t.offsetAt))}function n(e,t){let r=e.getText(),n=i(t,(e,t)=>{let r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r}),a=r.length;for(let i=n.length-1;i>=0;i--){let t=n[i],s=e.offsetAt(t.range.start),o=e.offsetAt(t.range.end);if(!(o<=a))throw new Error("Overlapping edit");r=r.substring(0,s)+t.newText+r.substring(o,r.length),a=s}return r}function i(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),a=e.slice(r);i(n,t),i(a,t);let s=0,o=0,l=0;for(;s<n.length&&o<a.length;){let r=t(n[s],a[o]);e[l++]=r<=0?n[s++]:a[o++]}for(;s<n.length;)e[l++]=n[s++];for(;o<a.length;)e[l++]=a[o++];return e}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r,ze(n,"applyEdits"),e.applyEdits=n,ze(i,"mergeSort")}(Ie||(Ie={})),_e=class{static{ze(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,r=!0;for(let n=0;n<t.length;n++){r&&(e.push(n),r=!1);let i=t.charAt(n);r="\r"===i||"\n"===i,"\r"===i&&n+1<t.length&&"\n"===t.charAt(n+1)&&n++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return o.create(0,e);for(;r<n;){let i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}let i=r-1;return o.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(r+e.character,n),r)}get lineCount(){return this.getLineOffsets().length}},function(e){const t=Object.prototype.toString;function r(e){return void 0!==e}function n(e){return void 0===e}function i(e){return!0===e||!1===e}function a(e){return"[object String]"===t.call(e)}function s(e){return"[object Number]"===t.call(e)}function o(e,r,n){return"[object Number]"===t.call(e)&&r<=e&&e<=n}function l(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647}function c(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647}function u(e){return"[object Function]"===t.call(e)}function d(e){return null!==e&&"object"==typeof e}function p(e,t){return Array.isArray(e)&&e.every(t)}ze(r,"defined"),e.defined=r,ze(n,"undefined"),e.undefined=n,ze(i,"boolean"),e.boolean=i,ze(a,"string"),e.string=a,ze(s,"number"),e.number=s,ze(o,"numberRange"),e.numberRange=o,ze(l,"integer"),e.integer=l,ze(c,"uinteger"),e.uinteger=c,ze(u,"func"),e.func=u,ze(d,"objectLiteral"),e.objectLiteral=d,ze(p,"typedArray"),e.typedArray=p}(Pe||(Pe={}))}},function(){return He&&(Ye=(0,He[Me(He)[0]])(He=0)),Ye}),Je=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){var t;function r(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}Object.defineProperty(e,"__esModule",{value:!0}),ze(r,"RAL"),function(e){function r(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}ze(r,"install"),e.install=r}(r||(r={})),e.default=r}}),Qe=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function i(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,ze(t,"boolean"),e.boolean=t,ze(r,"string"),e.string=r,ze(n,"number"),e.number=n,ze(i,"error"),e.error=i,ze(a,"func"),e.func=a,ze(s,"array"),e.array=s,ze(o,"stringArray"),e.stringArray=o}}),Ze=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t,r=Je();!function(e){const t={dispose(){}};e.None=function(){return t}}(t||(e.Event=t={}));var n=class{static{ze(this,"CallbackList")}add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:ze(()=>this.remove(e,t),"dispose")})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n<i;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],n=this._callbacks.slice(0),i=this._contexts.slice(0);for(let s=0,o=n.length;s<o;s++)try{t.push(n[s].apply(i[s],e))}catch(a){(0,r.default)().console.error(a)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{static{ze(this,"Emitter")}constructor(e){this._options=e}get event(){return this._event||(this._event=(t,r,i)=>{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,r);const a={dispose:ze(()=>{this._callbacks&&(this._callbacks.remove(t,r),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(i)&&i.push(a),a}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=i,i._noop=function(){}}}),et=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r=Je(),n=Qe(),i=Ze();!function(e){function t(t){const r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),ze(t,"is"),e.is=t}(t||(e.CancellationToken=t={}));var a=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}),s=class{static{ze(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},o=class{static{ze(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=t.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=t.None}};e.CancellationTokenSource=o}}),tt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t,r,n=Qe();(r=t||(e.ErrorCodes=t={})).ParseError=-32700,r.InvalidRequest=-32600,r.MethodNotFound=-32601,r.InvalidParams=-32602,r.InternalError=-32603,r.jsonrpcReservedErrorRangeStart=-32099,r.serverErrorStart=-32099,r.MessageWriteError=-32099,r.MessageReadError=-32098,r.PendingResponseRejected=-32097,r.ConnectionInactive=-32096,r.ServerNotInitialized=-32002,r.UnknownErrorCode=-32001,r.jsonrpcReservedErrorRangeEnd=-32e3,r.serverErrorEnd=-32e3;var i=class e extends Error{static{ze(this,"ResponseError")}constructor(r,i,a){super(i),this.code=n.number(r)?r:t.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}};e.ResponseError=i;var a=class e{static{ze(this,"ParameterStructures")}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");var s=class{static{ze(this,"AbstractMessageSignature")}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}};e.AbstractMessageSignature=s;var o=class extends s{static{ze(this,"RequestType0")}constructor(e){super(e,0)}};e.RequestType0=o;var l=class extends s{static{ze(this,"RequestType")}constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var c=class extends s{static{ze(this,"RequestType1")}constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.RequestType1=c;var u=class extends s{static{ze(this,"RequestType2")}constructor(e){super(e,2)}};e.RequestType2=u;var d=class extends s{static{ze(this,"RequestType3")}constructor(e){super(e,3)}};e.RequestType3=d;var p=class extends s{static{ze(this,"RequestType4")}constructor(e){super(e,4)}};e.RequestType4=p;var f=class extends s{static{ze(this,"RequestType5")}constructor(e){super(e,5)}};e.RequestType5=f;var h=class extends s{static{ze(this,"RequestType6")}constructor(e){super(e,6)}};e.RequestType6=h;var m=class extends s{static{ze(this,"RequestType7")}constructor(e){super(e,7)}};e.RequestType7=m;var g=class extends s{static{ze(this,"RequestType8")}constructor(e){super(e,8)}};e.RequestType8=g;var y=class extends s{static{ze(this,"RequestType9")}constructor(e){super(e,9)}};e.RequestType9=y;var v=class extends s{static{ze(this,"NotificationType")}constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.NotificationType=v;var T=class extends s{static{ze(this,"NotificationType0")}constructor(e){super(e,0)}};e.NotificationType0=T;var R=class extends s{static{ze(this,"NotificationType1")}constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=R;var $=class extends s{static{ze(this,"NotificationType2")}constructor(e){super(e,2)}};e.NotificationType2=$;var b=class extends s{static{ze(this,"NotificationType3")}constructor(e){super(e,3)}};e.NotificationType3=b;var E=class extends s{static{ze(this,"NotificationType4")}constructor(e){super(e,4)}};e.NotificationType4=E;var C=class extends s{static{ze(this,"NotificationType5")}constructor(e){super(e,5)}};e.NotificationType5=C;var A=class extends s{static{ze(this,"NotificationType6")}constructor(e){super(e,6)}};e.NotificationType6=A;var S=class extends s{static{ze(this,"NotificationType7")}constructor(e){super(e,7)}};e.NotificationType7=S;var k=class extends s{static{ze(this,"NotificationType8")}constructor(e){super(e,8)}};e.NotificationType8=k;var w,x=class extends s{static{ze(this,"NotificationType9")}constructor(e){super(e,9)}};e.NotificationType9=x,function(e){function t(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))}function r(e){const t=e;return t&&n.string(t.method)&&void 0===e.id}function i(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}ze(t,"isRequest"),e.isRequest=t,ze(r,"isNotification"),e.isNotification=r,ze(i,"isResponse"),e.isResponse=i}(w||(e.Message=w={}))}}),rt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t,r,n;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0,(n=r||(e.Touch=r={})).None=0,n.First=1,n.AsOld=n.First,n.Last=2,n.AsNew=n.Last;var i=class{static{ze(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:ze(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:ze(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:ze(()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},"next")};return r}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}};e.LinkedMap=i;var a=class extends i{static{ze(this,"LRUCache")}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=a}}),nt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0,function(e){function t(e){return{dispose:e}}ze(t,"create"),e.create=t}(t||(e.Disposable=t={}))}}),it=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t,r,n=et();(r=t||(t={})).Continue=0,r.Cancelled=1;var i=class{static{ze(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const r=new SharedArrayBuffer(4);new Int32Array(r,0,1)[0]=t.Continue,this.buffers.set(e.id,r),e.$cancellationData=r}async sendCancellation(e,r){const n=this.buffers.get(r);if(void 0===n)return;const i=new Int32Array(n,0,1);Atomics.store(i,0,t.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=i;var a=class{static{ze(this,"SharedArrayBufferCancellationToken")}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===t.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},s=class{static{ze(this,"SharedArrayBufferCancellationTokenSource")}constructor(e){this.token=new a(e)}cancel(){}dispose(){}},o=class{static{ze(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new s(t)}};e.SharedArrayReceiverStrategy=o}}),at=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=Je(),r=class{static{ze(this,"Semaphore")}constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}};e.Semaphore=r}}),st=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t,r=Je(),n=Qe(),i=Ze(),a=at();!function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}ze(t,"is"),e.is=t}(t||(e.MessageReader=t={}));var s,o=class{static{ze(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${n.string(e.message)?e.message:"unknown"}`)}};e.AbstractMessageReader=o,function(e){function t(e){let t,n;const i=new Map;let a;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(a=e.contentTypeDecoder,s.set(a.name,a)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===a&&(a=(0,r.default)().applicationJson.decoder,s.set(a.name,a)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:s}}ze(t,"fromOptions"),e.fromOptions=t}(s||(s={}));var l=class extends o{static{ze(this,"ReadableStreamMessageReader")}constructor(e,t){super(),this.readable=e,this.options=s.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=l}}),ot=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t,r=Je(),n=Qe(),i=at(),a=Ze();!function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}ze(t,"is"),e.is=t}(t||(e.MessageWriter=t={}));var s,o=class{static{ze(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${n.string(e.message)?e.message:"unknown"}`)}};e.AbstractMessageWriter=o,function(e){function t(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}ze(t,"fromOptions"),e.fromOptions=t}(s||(s={}));var l=class extends o{static{ze(this,"WriteableStreamMessageWriter")}constructor(e,t){super(),this.writable=e,this.options=s.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(n){return this.handleError(n,e),Promise.reject(n)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=l}}),lt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=class{static{ze(this,"AbstractMessageBuffer")}constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,i=0;e:for(;r<this._chunks.length;){const e=this._chunks[r];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}i+=e.byteLength,r++}if(4!==t)return;const a=this._read(i+n),s=new Map,o=this.toString(a,"ascii").split("\r\n");if(o.length<2)return s;for(let l=0;l<o.length-2;l++){const t=o[l],r=t.indexOf(":");if(-1===r)throw new Error(`Message header must separate key and value using ':'\n${t}`);const n=t.substr(0,r),i=t.substr(r+1).trim();s.set(e?n.toLowerCase():n,i)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const i=n.slice(0,e);t.set(i,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}};e.AbstractMessageBuffer=t}}),ct=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t,r,n,i=Je(),a=Qe(),s=tt(),o=rt(),l=Ze(),c=et();(t||(t={})).type=new s.NotificationType("$/cancelRequest"),function(e){function t(e){return"string"==typeof e||"number"==typeof e}ze(t,"is"),e.is=t}(r||(e.ProgressToken=r={})),(n||(n={})).type=new s.NotificationType("$/progress");var u,d,p,f,h,m,g,y,v,T,R,$=class{static{ze(this,"ProgressType")}constructor(){}};e.ProgressType=$,function(e){function t(e){return a.func(e)}ze(t,"is"),e.is=t}(u||(u={})),e.NullLogger=Object.freeze({error:ze(()=>{},"error"),warn:ze(()=>{},"warn"),info:ze(()=>{},"info"),log:ze(()=>{},"log")}),(p=d||(e.Trace=d={}))[p.Off=0]="Off",p[p.Messages=1]="Messages",p[p.Compact=2]="Compact",p[p.Verbose=3]="Verbose",(h=f||(e.TraceValues=f={})).Off="off",h.Messages="messages",h.Compact="compact",h.Verbose="verbose",function(e){function t(t){if(!a.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}}function r(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}ze(t,"fromString"),e.fromString=t,ze(r,"toString"),e.toString=r}(d||(e.Trace=d={})),(g=m||(e.TraceFormat=m={})).Text="text",g.JSON="json",function(e){function t(t){return a.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}ze(t,"fromString"),e.fromString=t}(m||(e.TraceFormat=m={})),(y||(e.SetTraceNotification=y={})).type=new s.NotificationType("$/setTrace"),(v||(e.LogTraceNotification=v={})).type=new s.NotificationType("$/logTrace"),(R=T||(e.ConnectionErrors=T={}))[R.Closed=1]="Closed",R[R.Disposed=2]="Disposed",R[R.AlreadyListening=3]="AlreadyListening";var b,E,C,A,S,k,w,x,N,I,_=class e extends Error{static{ze(this,"ConnectionError")}constructor(t,r){super(r),this.code=t,Object.setPrototypeOf(this,e.prototype)}};function P(p,f,h,g){const R=void 0!==h?h:e.NullLogger;let $=0,b=0,C=0;const A="2.0";let S;const x=new Map;let I;const P=new Map,D=new Map;let O,L,M=new o.LinkedMap,j=new Map,F=new Set,z=new Map,G=d.Off,q=m.Text,K=N.New;const U=new l.Emitter,W=new l.Emitter,B=new l.Emitter,V=new l.Emitter,H=new l.Emitter,Y=g&&g.cancellationStrategy?g.cancellationStrategy:k.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function J(e){return null===e?"res-unknown-"+(++C).toString():"res-"+e.toString()}function Q(){return"not-"+(++b).toString()}function Z(e,t){s.Message.isRequest(t)?e.set(X(t.id),t):s.Message.isResponse(t)?e.set(J(t.id),t):e.set(Q(),t)}function ee(e){}function te(){return K===N.Listening}function re(){return K===N.Closed}function ne(){return K===N.Disposed}function ie(){K!==N.New&&K!==N.Listening||(K=N.Closed,W.fire(void 0))}function ae(e){U.fire([e,void 0,void 0])}function se(e){U.fire(e)}function oe(){O||0===M.size||(O=(0,i.default)().timer.setImmediate(()=>{O=void 0,ce()}))}function le(e){s.Message.isRequest(e)?de(e):s.Message.isNotification(e)?fe(e):s.Message.isResponse(e)?pe(e):he(e)}function ce(){if(0===M.size)return;const e=M.shift();try{const t=g?.messageStrategy;w.is(t)?t.handleMessage(e,le):le(e)}finally{oe()}}ze(X,"createRequestQueueKey"),ze(J,"createResponseQueueKey"),ze(Q,"createNotificationQueueKey"),ze(Z,"addMessageToQueue"),ze(ee,"cancelUndispatched"),ze(te,"isListening"),ze(re,"isClosed"),ze(ne,"isDisposed"),ze(ie,"closeHandler"),ze(ae,"readErrorHandler"),ze(se,"writeErrorHandler"),p.onClose(ie),p.onError(ae),f.onClose(ie),f.onError(se),ze(oe,"triggerMessageQueue"),ze(le,"handleMessage"),ze(ce,"processMessageQueue");const ue=ze(e=>{try{if(s.Message.isNotification(e)&&e.method===t.type.method){const t=e.params.id,r=X(t),n=M.get(r);if(s.Message.isRequest(n)){const i=g?.connectionStrategy,a=i&&i.cancelUndispatched?i.cancelUndispatched(n,ee):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return M.delete(r),z.delete(t),a.id=n.id,ve(a,e.method,Date.now()),void f.write(a).catch(()=>R.error("Sending response for canceled message failed."))}const i=z.get(t);if(void 0!==i)return i.cancel(),void Re(e);F.add(t)}Z(M,e)}finally{oe()}},"callback");function de(e){if(ne())return;function t(t,r,n){const i={jsonrpc:A,id:e.id};t instanceof s.ResponseError?i.error=t.toJson():i.result=void 0===t?null:t,ve(i,r,n),f.write(i).catch(()=>R.error("Sending response failed."))}function r(t,r,n){const i={jsonrpc:A,id:e.id,error:t.toJson()};ve(i,r,n),f.write(i).catch(()=>R.error("Sending response failed."))}function n(t,r,n){void 0===t&&(t=null);const i={jsonrpc:A,id:e.id,result:t};ve(i,r,n),f.write(i).catch(()=>R.error("Sending response failed."))}ze(t,"reply"),ze(r,"replyError"),ze(n,"replySuccess"),Te(e);const i=x.get(e.method);let o,l;i&&(o=i.type,l=i.handler);const c=Date.now();if(l||S){const i=e.id??String(Date.now()),d=E.is(Y.receiver)?Y.receiver.createCancellationTokenSource(i):Y.receiver.createCancellationTokenSource(e);null!==e.id&&F.has(e.id)&&d.cancel(),null!==e.id&&z.set(i,d);try{let u;if(l)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,c);u=l(d.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,c);u=l(...e.params,d.token)}else{if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,c);u=l(e.params,d.token)}else S&&(u=S(e.method,e.params,d.token));const p=u;u?p.then?p.then(r=>{z.delete(i),t(r,e.method,c)},t=>{z.delete(i),t instanceof s.ResponseError?r(t,e.method,c):t&&a.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,c):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}):(z.delete(i),t(u,e.method,c)):(z.delete(i),n(u,e.method,c))}catch(u){z.delete(i),u instanceof s.ResponseError?t(u,e.method,c):u&&a.string(u.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${u.message}`),e.method,c):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,c)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,c)}function pe(e){if(!ne())if(null===e.id)e.error?R.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):R.error("Received response message without id. No further error information provided.");else{const r=e.id,n=j.get(r);if($e(e,n),void 0!==n){j.delete(r);try{if(e.error){const t=e.error;n.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");n.resolve(e.result)}}catch(t){t.message?R.error(`Response handler '${n.method}' failed with message: ${t.message}`):R.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}function fe(e){if(ne())return;let i,a;if(e.method===t.type.method){const t=e.params.id;return F.delete(t),void Re(e)}{const t=P.get(e.method);t&&(a=t.handler,i=t.type)}if(a||I)try{if(Re(e),a)if(void 0===e.params)void 0!==i&&0!==i.numberOfParams&&i.parameterStructures!==s.ParameterStructures.byName&&R.error(`Notification ${e.method} defines ${i.numberOfParams} params but received none.`),a();else if(Array.isArray(e.params)){const t=e.params;e.method===n.type.method&&2===t.length&&r.is(t[0])?a({token:t[0],value:t[1]}):(void 0!==i&&(i.parameterStructures===s.ParameterStructures.byName&&R.error(`Notification ${e.method} defines parameters by name but received parameters by position`),i.numberOfParams!==e.params.length&&R.error(`Notification ${e.method} defines ${i.numberOfParams} params but received ${t.length} arguments`)),a(...t))}else void 0!==i&&i.parameterStructures===s.ParameterStructures.byPosition&&R.error(`Notification ${e.method} defines parameters by position but received parameters by name`),a(e.params);else I&&I(e.method,e.params)}catch(o){o.message?R.error(`Notification handler '${e.method}' failed with message: ${o.message}`):R.error(`Notification handler '${e.method}' failed unexpectedly.`)}else B.fire(e)}function he(e){if(!e)return void R.error("Received empty message.");R.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(a.string(t.id)||a.number(t.id)){const e=t.id,r=j.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}function me(e){if(null!=e)switch(G){case d.Verbose:return JSON.stringify(e,null,4);case d.Compact:return JSON.stringify(e);default:return}}function ge(e){if(G!==d.Off&&L)if(q===m.Text){let t;G!==d.Verbose&&G!==d.Compact||!e.params||(t=`Params: ${me(e.params)}\n\n`),L.log(`Sending request '${e.method} - (${e.id})'.`,t)}else be("send-request",e)}function ye(e){if(G!==d.Off&&L)if(q===m.Text){let t;G!==d.Verbose&&G!==d.Compact||(t=e.params?`Params: ${me(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Sending notification '${e.method}'.`,t)}else be("send-notification",e)}function ve(e,t,r){if(G!==d.Off&&L)if(q===m.Text){let n;G!==d.Verbose&&G!==d.Compact||(e.error&&e.error.data?n=`Error data: ${me(e.error.data)}\n\n`:e.result?n=`Result: ${me(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),L.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else be("send-response",e)}function Te(e){if(G!==d.Off&&L)if(q===m.Text){let t;G!==d.Verbose&&G!==d.Compact||!e.params||(t=`Params: ${me(e.params)}\n\n`),L.log(`Received request '${e.method} - (${e.id})'.`,t)}else be("receive-request",e)}function Re(e){if(G!==d.Off&&L&&e.method!==v.type.method)if(q===m.Text){let t;G!==d.Verbose&&G!==d.Compact||(t=e.params?`Params: ${me(e.params)}\n\n`:"No parameters provided.\n\n"),L.log(`Received notification '${e.method}'.`,t)}else be("receive-notification",e)}function $e(e,t){if(G!==d.Off&&L)if(q===m.Text){let r;if(G!==d.Verbose&&G!==d.Compact||(e.error&&e.error.data?r=`Error data: ${me(e.error.data)}\n\n`:e.result?r=`Result: ${me(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";L.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else L.log(`Received response ${e.id} without active response promise.`,r)}else be("receive-response",e)}function be(e,t){if(!L||G===d.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};L.log(r)}function Ee(){if(re())throw new _(T.Closed,"Connection is closed.");if(ne())throw new _(T.Disposed,"Connection is disposed.")}function Ce(){if(te())throw new _(T.AlreadyListening,"Connection is already listening")}function Ae(){if(!te())throw new Error("Call listen() first.")}function Se(e){return void 0===e?null:e}function ke(e){return null===e?void 0:e}function we(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function xe(e,t){switch(e){case s.ParameterStructures.auto:return we(t)?ke(t):[Se(t)];case s.ParameterStructures.byName:if(!we(t))throw new Error("Received parameters by name but param is not an object literal.");return ke(t);case s.ParameterStructures.byPosition:return[Se(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function Ne(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=xe(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<n;e++)r.push(Se(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)r.push(null)}return r}ze(de,"handleRequest"),ze(pe,"handleResponse"),ze(fe,"handleNotification"),ze(he,"handleInvalidMessage"),ze(me,"stringifyTrace"),ze(ge,"traceSendingRequest"),ze(ye,"traceSendingNotification"),ze(ve,"traceSendingResponse"),ze(Te,"traceReceivedRequest"),ze(Re,"traceReceivedNotification"),ze($e,"traceReceivedResponse"),ze(be,"logLSPMessage"),ze(Ee,"throwIfClosedOrDisposed"),ze(Ce,"throwIfListening"),ze(Ae,"throwIfNotListening"),ze(Se,"undefinedToNull"),ze(ke,"nullToUndefined"),ze(we,"isNamedParam"),ze(xe,"computeSingleParam"),ze(Ne,"computeMessageParams");const Ie={sendNotification:ze((e,...t)=>{let r,n;if(Ee(),a.string(e)){r=e;const i=t[0];let a=0,o=s.ParameterStructures.auto;s.ParameterStructures.is(i)&&(a=1,o=i);let l=t.length;const c=l-a;switch(c){case 0:n=void 0;break;case 1:n=xe(o,t[a]);break;default:if(o===s.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);n=t.slice(a,l).map(e=>Se(e))}}else{const i=t;r=e.method,n=Ne(e,i)}const i={jsonrpc:A,method:r,params:n};return ye(i),f.write(i).catch(e=>{throw R.error("Sending notification failed."),e})},"sendNotification"),onNotification:ze((e,t)=>{let r;return Ee(),a.func(e)?I=e:t&&(a.string(e)?(r=e,P.set(e,{type:void 0,handler:t})):(r=e.method,P.set(e.method,{type:e,handler:t}))),{dispose:ze(()=>{void 0!==r?P.delete(r):I=void 0},"dispose")}},"onNotification"),onProgress:ze((e,t,r)=>{if(D.has(t))throw new Error(`Progress handler for token ${t} already registered`);return D.set(t,r),{dispose:ze(()=>{D.delete(t)},"dispose")}},"onProgress"),sendProgress:ze((e,t,r)=>Ie.sendNotification(n.type,{token:t,value:r}),"sendProgress"),onUnhandledProgress:V.event,sendRequest:ze((e,...t)=>{let r,n,i;if(Ee(),Ae(),a.string(e)){r=e;const a=t[0],o=t[t.length-1];let l=0,u=s.ParameterStructures.auto;s.ParameterStructures.is(a)&&(l=1,u=a);let d=t.length;c.CancellationToken.is(o)&&(d-=1,i=o);const p=d-l;switch(p){case 0:n=void 0;break;case 1:n=xe(u,t[l]);break;default:if(u===s.ParameterStructures.byName)throw new Error(`Received ${p} parameters for 'by Name' request parameter structure.`);n=t.slice(l,d).map(e=>Se(e))}}else{const a=t;r=e.method,n=Ne(e,a);const s=e.numberOfParams;i=c.CancellationToken.is(a[s])?a[s]:void 0}const o=$++;let l;i&&(l=i.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(Ie,o);return void 0===e?(R.log(`Received no promise from cancellation strategy when cancelling id ${o}`),Promise.resolve()):e.catch(()=>{R.log(`Sending cancellation messages for id ${o} failed`)})}));const u={jsonrpc:A,id:o,method:r,params:n};return ge(u),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(u),new Promise(async(e,t)=>{const n=ze(t=>{e(t),Y.sender.cleanup(o),l?.dispose()},"resolveWithCleanup"),i=ze(e=>{t(e),Y.sender.cleanup(o),l?.dispose()},"rejectWithCleanup"),a={method:r,timerStart:Date.now(),resolve:n,reject:i};try{await f.write(u),j.set(o,a)}catch(c){throw R.error("Sending request failed."),a.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,c.message?c.message:"Unknown reason")),c}})},"sendRequest"),onRequest:ze((e,t)=>{Ee();let r=null;return u.is(e)?(r=void 0,S=e):a.string(e)?(r=null,void 0!==t&&(r=e,x.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,x.set(e.method,{type:e,handler:t})),{dispose:ze(()=>{null!==r&&(void 0!==r?x.delete(r):S=void 0)},"dispose")}},"onRequest"),hasPendingResponse:ze(()=>j.size>0,"hasPendingResponse"),trace:ze(async(e,t,r)=>{let n=!1,i=m.Text;void 0!==r&&(a.boolean(r)?n=r:(n=r.sendNotification||!1,i=r.traceFormat||m.Text)),G=e,q=i,L=G===d.Off?void 0:t,!n||re()||ne()||await Ie.sendNotification(y.type,{value:d.toString(e)})},"trace"),onError:U.event,onClose:W.event,onUnhandledNotification:B.event,onDispose:H.event,end:ze(()=>{f.end()},"end"),dispose:ze(()=>{if(ne())return;K=N.Disposed,H.fire(void 0);const e=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const t of j.values())t.reject(e);j=new Map,z=new Map,F=new Set,M=new o.LinkedMap,a.func(f.dispose)&&f.dispose(),a.func(p.dispose)&&p.dispose()},"dispose"),listen:ze(()=>{Ee(),Ce(),K=N.Listening,p.listen(ue)},"listen"),inspect:ze(()=>{(0,i.default)().console.log("inspect")},"inspect")};return Ie.onNotification(v.type,e=>{if(G===d.Off||!L)return;const t=G===d.Verbose||G===d.Compact;L.log(e.message,t?e.verbose:void 0)}),Ie.onNotification(n.type,e=>{const t=D.get(e.token);t?t(e.value):V.fire(e)}),Ie}e.ConnectionError=_,function(e){function t(e){const t=e;return t&&a.func(t.cancelUndispatched)}ze(t,"is"),e.is=t}(b||(e.ConnectionStrategy=b={})),function(e){function t(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&a.func(t.createCancellationTokenSource)&&(void 0===t.dispose||a.func(t.dispose))}ze(t,"is"),e.is=t}(E||(e.IdCancellationReceiverStrategy=E={})),function(e){function t(e){const t=e;return t&&"request"===t.kind&&a.func(t.createCancellationTokenSource)&&(void 0===t.dispose||a.func(t.dispose))}ze(t,"is"),e.is=t}(C||(e.RequestCancellationReceiverStrategy=C={})),function(e){function t(e){return E.is(e)||C.is(e)}e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),ze(t,"is"),e.is=t}(A||(e.CancellationReceiverStrategy=A={})),function(e){function r(e){const t=e;return t&&a.func(t.sendCancellation)&&a.func(t.cleanup)}e.Message=Object.freeze({sendCancellation:(e,r)=>e.sendNotification(t.type,{id:r}),cleanup(e){}}),ze(r,"is"),e.is=r}(S||(e.CancellationSenderStrategy=S={})),function(e){function t(e){const t=e;return t&&A.is(t.receiver)&&S.is(t.sender)}e.Message=Object.freeze({receiver:A.Message,sender:S.Message}),ze(t,"is"),e.is=t}(k||(e.CancellationStrategy=k={})),function(e){function t(e){const t=e;return t&&a.func(t.handleMessage)}ze(t,"is"),e.is=t}(w||(e.MessageStrategy=w={})),function(e){function t(e){const t=e;return t&&(k.is(t.cancellationStrategy)||b.is(t.connectionStrategy)||w.is(t.messageStrategy))}ze(t,"is"),e.is=t}(x||(e.ConnectionOptions=x={})),(I=N||(N={}))[I.New=1]="New",I[I.Listening=2]="Listening",I[I.Closed=3]="Closed",I[I.Disposed=4]="Disposed",ze(P,"createMessageConnection"),e.createMessageConnection=P}}),ut=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=tt();Object.defineProperty(e,"Message",{enumerable:!0,get:ze(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:ze(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:ze(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:ze(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:ze(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:ze(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:ze(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:ze(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:ze(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:ze(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:ze(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:ze(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:ze(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:ze(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:ze(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:ze(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:ze(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:ze(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:ze(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:ze(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:ze(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:ze(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:ze(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:ze(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:ze(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:ze(function(){return t.ParameterStructures},"get")});var r=rt();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:ze(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:ze(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:ze(function(){return r.Touch},"get")});var n=nt();Object.defineProperty(e,"Disposable",{enumerable:!0,get:ze(function(){return n.Disposable},"get")});var i=Ze();Object.defineProperty(e,"Event",{enumerable:!0,get:ze(function(){return i.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:ze(function(){return i.Emitter},"get")});var a=et();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:ze(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:ze(function(){return a.CancellationToken},"get")});var s=it();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:ze(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:ze(function(){return s.SharedArrayReceiverStrategy},"get")});var o=st();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:ze(function(){return o.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:ze(function(){return o.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:ze(function(){return o.ReadableStreamMessageReader},"get")});var l=ot();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:ze(function(){return l.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:ze(function(){return l.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:ze(function(){return l.WriteableStreamMessageWriter},"get")});var c=lt();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:ze(function(){return c.AbstractMessageBuffer},"get")});var u=ct();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:ze(function(){return u.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:ze(function(){return u.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:ze(function(){return u.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:ze(function(){return u.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:ze(function(){return u.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:ze(function(){return u.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:ze(function(){return u.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:ze(function(){return u.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:ze(function(){return u.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:ze(function(){return u.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:ze(function(){return u.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:ze(function(){return u.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:ze(function(){return u.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:ze(function(){return u.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:ze(function(){return u.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:ze(function(){return u.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:ze(function(){return u.MessageStrategy},"get")});var d=Je();e.RAL=d.default}}),dt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ut(),r=class e extends t.AbstractMessageBuffer{static{ze(this,"MessageBuffer")}constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{ze(this,"ReadableStreamWrapper")}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),t.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),t.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),t.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}},i=class{static{ze(this,"WritableStreamWrapper")}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),t.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),t.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),t.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:ze(e=>new r(e),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:ze((e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:ze((e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},"decode")})}),stream:Object.freeze({asReadableStream:ze(e=>new n(e),"asReadableStream"),asWritableStream:ze(e=>new i(e),"asWritableStream")}),console:console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:ze(()=>clearTimeout(n),"dispose")}},setImmediate(e,...t){const r=setTimeout(e,0,...t);return{dispose:ze(()=>clearTimeout(r),"dispose")}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:ze(()=>clearInterval(n),"dispose")}}})});function o(){return s}ze(o,"RIL"),function(e){function r(){t.RAL.install(s)}ze(r,"install"),e.install=r}(o||(o={})),e.default=o}}),pt=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:ze(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,dt().default.install();var n=ut();r(ut(),e);var i=class extends n.AbstractMessageReader{static{ze(this,"BrowserMessageReader")}constructor(e){super(),this._onData=new n.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}};e.BrowserMessageReader=i;var a=class extends n.AbstractMessageWriter{static{ze(this,"BrowserMessageWriter")}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function s(e,t,r,i){return void 0===r&&(r=n.NullLogger),n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}e.BrowserMessageWriter=a,ze(s,"createMessageConnection"),e.createMessageConnection=s}}),ft=Ge({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=pt()}}),ht=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t,r,n=pt();(r=t||(e.MessageDirection=t={})).clientToServer="clientToServer",r.serverToClient="serverToClient",r.both="both";var i=class{static{ze(this,"RegistrationType")}constructor(e){this.method=e}};e.RegistrationType=i;var a=class extends n.RequestType0{static{ze(this,"ProtocolRequestType0")}constructor(e){super(e)}};e.ProtocolRequestType0=a;var s=class extends n.RequestType{static{ze(this,"ProtocolRequestType")}constructor(e){super(e,n.ParameterStructures.byName)}};e.ProtocolRequestType=s;var o=class extends n.NotificationType0{static{ze(this,"ProtocolNotificationType0")}constructor(e){super(e)}};e.ProtocolNotificationType0=o;var l=class extends n.NotificationType{static{ze(this,"ProtocolNotificationType")}constructor(e){super(e,n.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),mt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function i(e){return e instanceof Error}function a(e){return"function"==typeof e}function s(e){return Array.isArray(e)}function o(e){return s(e)&&e.every(e=>r(e))}function l(e,t){return Array.isArray(e)&&e.every(t)}function c(e){return null!==e&&"object"==typeof e}Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0,ze(t,"boolean"),e.boolean=t,ze(r,"string"),e.string=r,ze(n,"number"),e.number=n,ze(i,"error"),e.error=i,ze(a,"func"),e.func=a,ze(s,"array"),e.array=s,ze(o,"stringArray"),e.stringArray=o,ze(l,"typedArray"),e.typedArray=l,ze(c,"objectLiteral"),e.objectLiteral=c}}),gt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t,r,n=ht();(r=t||(e.ImplementationRequest=t={})).method="textDocument/implementation",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),yt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t,r,n=ht();(r=t||(e.TypeDefinitionRequest=t={})).method="textDocument/typeDefinition",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),vt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t,r,n,i,a=ht();(r=t||(e.WorkspaceFoldersRequest=t={})).method="workspace/workspaceFolders",r.messageDirection=a.MessageDirection.serverToClient,r.type=new a.ProtocolRequestType0(r.method),(i=n||(e.DidChangeWorkspaceFoldersNotification=n={})).method="workspace/didChangeWorkspaceFolders",i.messageDirection=a.MessageDirection.clientToServer,i.type=new a.ProtocolNotificationType(i.method)}}),Tt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t,r,n=ht();(r=t||(e.ConfigurationRequest=t={})).method="workspace/configuration",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),Rt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t,r,n,i,a=ht();(r=t||(e.DocumentColorRequest=t={})).method="textDocument/documentColor",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(e.ColorPresentationRequest=n={})).method="textDocument/colorPresentation",i.messageDirection=a.MessageDirection.clientToServer,i.type=new a.ProtocolRequestType(i.method)}}),$t=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t,r,n,i,a=ht();(r=t||(e.FoldingRangeRequest=t={})).method="textDocument/foldingRange",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(e.FoldingRangeRefreshRequest=n={})).method="workspace/foldingRange/refresh",i.messageDirection=a.MessageDirection.serverToClient,i.type=new a.ProtocolRequestType0(i.method)}}),bt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t,r,n=ht();(r=t||(e.DeclarationRequest=t={})).method="textDocument/declaration",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Et=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t,r,n=ht();(r=t||(e.SelectionRangeRequest=t={})).method="textDocument/selectionRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Ct=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t,r,n,i,a,s=pt(),o=ht();!function(e){function t(t){return t===e.type}e.type=new s.ProgressType,ze(t,"is"),e.is=t}(t||(e.WorkDoneProgress=t={})),(n=r||(e.WorkDoneProgressCreateRequest=r={})).method="window/workDoneProgress/create",n.messageDirection=o.MessageDirection.serverToClient,n.type=new o.ProtocolRequestType(n.method),(a=i||(e.WorkDoneProgressCancelNotification=i={})).method="window/workDoneProgress/cancel",a.messageDirection=o.MessageDirection.clientToServer,a.type=new o.ProtocolNotificationType(a.method)}}),At=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t,r,n,i,a,s,o=ht();(r=t||(e.CallHierarchyPrepareRequest=t={})).method="textDocument/prepareCallHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(i=n||(e.CallHierarchyIncomingCallsRequest=n={})).method="callHierarchy/incomingCalls",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolRequestType(i.method),(s=a||(e.CallHierarchyOutgoingCallsRequest=a={})).method="callHierarchy/outgoingCalls",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),St=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t,r,n,i,a,s,o,l,c,u,d,p=ht();(t||(e.TokenFormat=t={})).Relative="relative",(n=r||(e.SemanticTokensRegistrationType=r={})).method="textDocument/semanticTokens",n.type=new p.RegistrationType(n.method),(a=i||(e.SemanticTokensRequest=i={})).method="textDocument/semanticTokens/full",a.messageDirection=p.MessageDirection.clientToServer,a.type=new p.ProtocolRequestType(a.method),a.registrationMethod=r.method,(o=s||(e.SemanticTokensDeltaRequest=s={})).method="textDocument/semanticTokens/full/delta",o.messageDirection=p.MessageDirection.clientToServer,o.type=new p.ProtocolRequestType(o.method),o.registrationMethod=r.method,(c=l||(e.SemanticTokensRangeRequest=l={})).method="textDocument/semanticTokens/range",c.messageDirection=p.MessageDirection.clientToServer,c.type=new p.ProtocolRequestType(c.method),c.registrationMethod=r.method,(d=u||(e.SemanticTokensRefreshRequest=u={})).method="workspace/semanticTokens/refresh",d.messageDirection=p.MessageDirection.serverToClient,d.type=new p.ProtocolRequestType0(d.method)}}),kt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t,r,n=ht();(r=t||(e.ShowDocumentRequest=t={})).method="window/showDocument",r.messageDirection=n.MessageDirection.serverToClient,r.type=new n.ProtocolRequestType(r.method)}}),wt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t,r,n=ht();(r=t||(e.LinkedEditingRangeRequest=t={})).method="textDocument/linkedEditingRange",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),xt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t,r,n,i,a,s,o,l,c,u,d,p,f,h,m=ht();(r=t||(e.FileOperationPatternKind=t={})).file="file",r.folder="folder",(i=n||(e.WillCreateFilesRequest=n={})).method="workspace/willCreateFiles",i.messageDirection=m.MessageDirection.clientToServer,i.type=new m.ProtocolRequestType(i.method),(s=a||(e.DidCreateFilesNotification=a={})).method="workspace/didCreateFiles",s.messageDirection=m.MessageDirection.clientToServer,s.type=new m.ProtocolNotificationType(s.method),(l=o||(e.WillRenameFilesRequest=o={})).method="workspace/willRenameFiles",l.messageDirection=m.MessageDirection.clientToServer,l.type=new m.ProtocolRequestType(l.method),(u=c||(e.DidRenameFilesNotification=c={})).method="workspace/didRenameFiles",u.messageDirection=m.MessageDirection.clientToServer,u.type=new m.ProtocolNotificationType(u.method),(p=d||(e.DidDeleteFilesNotification=d={})).method="workspace/didDeleteFiles",p.messageDirection=m.MessageDirection.clientToServer,p.type=new m.ProtocolNotificationType(p.method),(h=f||(e.WillDeleteFilesRequest=f={})).method="workspace/willDeleteFiles",h.messageDirection=m.MessageDirection.clientToServer,h.type=new m.ProtocolRequestType(h.method)}}),Nt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t,r,n,i,a,s,o=ht();(r=t||(e.UniquenessLevel=t={})).document="document",r.project="project",r.group="group",r.scheme="scheme",r.global="global",(i=n||(e.MonikerKind=n={})).$import="import",i.$export="export",i.local="local",(s=a||(e.MonikerRequest=a={})).method="textDocument/moniker",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),It=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t,r,n,i,a,s,o=ht();(r=t||(e.TypeHierarchyPrepareRequest=t={})).method="textDocument/prepareTypeHierarchy",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(i=n||(e.TypeHierarchySupertypesRequest=n={})).method="typeHierarchy/supertypes",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolRequestType(i.method),(s=a||(e.TypeHierarchySubtypesRequest=a={})).method="typeHierarchy/subtypes",s.messageDirection=o.MessageDirection.clientToServer,s.type=new o.ProtocolRequestType(s.method)}}),_t=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t,r,n,i,a=ht();(r=t||(e.InlineValueRequest=t={})).method="textDocument/inlineValue",r.messageDirection=a.MessageDirection.clientToServer,r.type=new a.ProtocolRequestType(r.method),(i=n||(e.InlineValueRefreshRequest=n={})).method="workspace/inlineValue/refresh",i.messageDirection=a.MessageDirection.serverToClient,i.type=new a.ProtocolRequestType0(i.method)}}),Pt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t,r,n,i,a,s,o=ht();(r=t||(e.InlayHintRequest=t={})).method="textDocument/inlayHint",r.messageDirection=o.MessageDirection.clientToServer,r.type=new o.ProtocolRequestType(r.method),(i=n||(e.InlayHintResolveRequest=n={})).method="inlayHint/resolve",i.messageDirection=o.MessageDirection.clientToServer,i.type=new o.ProtocolRequestType(i.method),(s=a||(e.InlayHintRefreshRequest=a={})).method="workspace/inlayHint/refresh",s.messageDirection=o.MessageDirection.serverToClient,s.type=new o.ProtocolRequestType0(s.method)}}),Dt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t,r,n,i,a,s,o,l,c,u=pt(),d=mt(),p=ht();!function(e){function t(e){const t=e;return t&&d.boolean(t.retriggerRequest)}ze(t,"is"),e.is=t}(t||(e.DiagnosticServerCancellationData=t={})),(n=r||(e.DocumentDiagnosticReportKind=r={})).Full="full",n.Unchanged="unchanged",(a=i||(e.DocumentDiagnosticRequest=i={})).method="textDocument/diagnostic",a.messageDirection=p.MessageDirection.clientToServer,a.type=new p.ProtocolRequestType(a.method),a.partialResult=new u.ProgressType,(o=s||(e.WorkspaceDiagnosticRequest=s={})).method="workspace/diagnostic",o.messageDirection=p.MessageDirection.clientToServer,o.type=new p.ProtocolRequestType(o.method),o.partialResult=new u.ProgressType,(c=l||(e.DiagnosticRefreshRequest=l={})).method="workspace/diagnostic/refresh",c.messageDirection=p.MessageDirection.serverToClient,c.type=new p.ProtocolRequestType0(c.method)}}),Ot=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t,r,n,i,a,s,o,l,c,u,d,p,f,h,m,g=(Xe(),Be(Ve)),y=mt(),v=ht();!function(e){function t(e){return 1===e||2===e}e.Markup=1,e.Code=2,ze(t,"is"),e.is=t}(t||(e.NotebookCellKind=t={})),function(e){function t(e,t){const r={executionOrder:e};return!0!==t&&!1!==t||(r.success=t),r}function r(e){const t=e;return y.objectLiteral(t)&&g.uinteger.is(t.executionOrder)&&(void 0===t.success||y.boolean(t.success))}function n(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r,ze(n,"equals"),e.equals=n}(r||(e.ExecutionSummary=r={})),function(e){function n(e,t){return{kind:e,document:t}}function i(e){const r=e;return y.objectLiteral(r)&&t.is(r.kind)&&g.DocumentUri.is(r.document)&&(void 0===r.metadata||y.objectLiteral(r.metadata))}function a(e,t){const n=new Set;return e.document!==t.document&&n.add("document"),e.kind!==t.kind&&n.add("kind"),e.executionSummary!==t.executionSummary&&n.add("executionSummary"),void 0===e.metadata&&void 0===t.metadata||s(e.metadata,t.metadata)||n.add("metadata"),void 0===e.executionSummary&&void 0===t.executionSummary||r.equals(e.executionSummary,t.executionSummary)||n.add("executionSummary"),n}function s(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),n=Array.isArray(t);if(r!==n)return!1;if(r&&n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!s(e[r],t[r]))return!1}if(y.objectLiteral(e)&&y.objectLiteral(t)){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;if(r.sort(),n.sort(),!s(r,n))return!1;for(let i=0;i<r.length;i++){const n=r[i];if(!s(e[n],t[n]))return!1}}return!0}ze(n,"create"),e.create=n,ze(i,"is"),e.is=i,ze(a,"diff"),e.diff=a,ze(s,"equalsMetadata")}(n||(e.NotebookCell=n={})),function(e){function t(e,t,r,n){return{uri:e,notebookType:t,version:r,cells:n}}function r(e){const t=e;return y.objectLiteral(t)&&y.string(t.uri)&&g.integer.is(t.version)&&y.typedArray(t.cells,n.is)}ze(t,"create"),e.create=t,ze(r,"is"),e.is=r}(i||(e.NotebookDocument=i={})),(s=a||(e.NotebookDocumentSyncRegistrationType=a={})).method="notebookDocument/sync",s.messageDirection=v.MessageDirection.clientToServer,s.type=new v.RegistrationType(s.method),(l=o||(e.DidOpenNotebookDocumentNotification=o={})).method="notebookDocument/didOpen",l.messageDirection=v.MessageDirection.clientToServer,l.type=new v.ProtocolNotificationType(l.method),l.registrationMethod=a.method,function(e){function t(e){const t=e;return y.objectLiteral(t)&&g.uinteger.is(t.start)&&g.uinteger.is(t.deleteCount)&&(void 0===t.cells||y.typedArray(t.cells,n.is))}function r(e,t,r){const n={start:e,deleteCount:t};return void 0!==r&&(n.cells=r),n}ze(t,"is"),e.is=t,ze(r,"create"),e.create=r}(c||(e.NotebookCellArrayChange=c={})),(d=u||(e.DidChangeNotebookDocumentNotification=u={})).method="notebookDocument/didChange",d.messageDirection=v.MessageDirection.clientToServer,d.type=new v.ProtocolNotificationType(d.method),d.registrationMethod=a.method,(f=p||(e.DidSaveNotebookDocumentNotification=p={})).method="notebookDocument/didSave",f.messageDirection=v.MessageDirection.clientToServer,f.type=new v.ProtocolNotificationType(f.method),f.registrationMethod=a.method,(m=h||(e.DidCloseNotebookDocumentNotification=h={})).method="notebookDocument/didClose",m.messageDirection=v.MessageDirection.clientToServer,m.type=new v.ProtocolNotificationType(m.method),m.registrationMethod=a.method}}),Lt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t,r,n=ht();(r=t||(e.InlineCompletionRequest=t={})).method="textDocument/inlineCompletion",r.messageDirection=n.MessageDirection.clientToServer,r.type=new n.ProtocolRequestType(r.method)}}),Mt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=ht(),r=(Xe(),Be(Ve)),n=mt(),i=gt();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:ze(function(){return i.ImplementationRequest},"get")});var a=yt();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:ze(function(){return a.TypeDefinitionRequest},"get")});var s=vt();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:ze(function(){return s.WorkspaceFoldersRequest},"get")}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:ze(function(){return s.DidChangeWorkspaceFoldersNotification},"get")});var o=Tt();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:ze(function(){return o.ConfigurationRequest},"get")});var l=Rt();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:ze(function(){return l.DocumentColorRequest},"get")}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:ze(function(){return l.ColorPresentationRequest},"get")});var c=$t();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:ze(function(){return c.FoldingRangeRequest},"get")}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:ze(function(){return c.FoldingRangeRefreshRequest},"get")});var u=bt();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:ze(function(){return u.DeclarationRequest},"get")});var d=Et();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:ze(function(){return d.SelectionRangeRequest},"get")});var p=Ct();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:ze(function(){return p.WorkDoneProgress},"get")}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:ze(function(){return p.WorkDoneProgressCreateRequest},"get")}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:ze(function(){return p.WorkDoneProgressCancelNotification},"get")});var f=At();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:ze(function(){return f.CallHierarchyIncomingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:ze(function(){return f.CallHierarchyOutgoingCallsRequest},"get")}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:ze(function(){return f.CallHierarchyPrepareRequest},"get")});var h=St();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:ze(function(){return h.TokenFormat},"get")}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:ze(function(){return h.SemanticTokensRequest},"get")}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:ze(function(){return h.SemanticTokensDeltaRequest},"get")}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:ze(function(){return h.SemanticTokensRangeRequest},"get")}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:ze(function(){return h.SemanticTokensRefreshRequest},"get")}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:ze(function(){return h.SemanticTokensRegistrationType},"get")});var m=kt();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:ze(function(){return m.ShowDocumentRequest},"get")});var g=wt();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:ze(function(){return g.LinkedEditingRangeRequest},"get")});var y=xt();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:ze(function(){return y.FileOperationPatternKind},"get")}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:ze(function(){return y.DidCreateFilesNotification},"get")}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:ze(function(){return y.WillCreateFilesRequest},"get")}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:ze(function(){return y.DidRenameFilesNotification},"get")}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:ze(function(){return y.WillRenameFilesRequest},"get")}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:ze(function(){return y.DidDeleteFilesNotification},"get")}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:ze(function(){return y.WillDeleteFilesRequest},"get")});var v=Nt();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:ze(function(){return v.UniquenessLevel},"get")}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:ze(function(){return v.MonikerKind},"get")}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:ze(function(){return v.MonikerRequest},"get")});var T=It();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:ze(function(){return T.TypeHierarchyPrepareRequest},"get")}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:ze(function(){return T.TypeHierarchySubtypesRequest},"get")}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:ze(function(){return T.TypeHierarchySupertypesRequest},"get")});var R=_t();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:ze(function(){return R.InlineValueRequest},"get")}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:ze(function(){return R.InlineValueRefreshRequest},"get")});var $=Pt();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:ze(function(){return $.InlayHintRequest},"get")}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:ze(function(){return $.InlayHintResolveRequest},"get")}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:ze(function(){return $.InlayHintRefreshRequest},"get")});var b=Dt();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:ze(function(){return b.DiagnosticServerCancellationData},"get")}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:ze(function(){return b.DocumentDiagnosticReportKind},"get")}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:ze(function(){return b.DocumentDiagnosticRequest},"get")}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:ze(function(){return b.WorkspaceDiagnosticRequest},"get")}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:ze(function(){return b.DiagnosticRefreshRequest},"get")});var E=Ot();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:ze(function(){return E.NotebookCellKind},"get")}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:ze(function(){return E.ExecutionSummary},"get")}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:ze(function(){return E.NotebookCell},"get")}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:ze(function(){return E.NotebookDocument},"get")}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:ze(function(){return E.NotebookDocumentSyncRegistrationType},"get")}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:ze(function(){return E.DidOpenNotebookDocumentNotification},"get")}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:ze(function(){return E.NotebookCellArrayChange},"get")}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:ze(function(){return E.DidChangeNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:ze(function(){return E.DidSaveNotebookDocumentNotification},"get")}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:ze(function(){return E.DidCloseNotebookDocumentNotification},"get")});var C,A,S,k,w,x,N,I,_,P,D,O,L,M,j,F,z,G,q,K,U,W,B,V,H,Y,X,J,Q,Z,ee,te,re,ne,ie,ae,se,oe,le,ce,ue,de,pe,fe,he,me,ge,ye,ve,Te,Re,$e,be,Ee,Ce,Ae,Se,ke,we,xe,Ne,Ie,_e,Pe,De,Oe,Le,Me,je,Fe,Ge,qe,Ke,Ue,We,He,Ye,Je,Qe,Ze,et,tt,rt,nt,it,at,st,ot,lt,ct,ut,dt,pt,ft,Mt,jt,Ft,zt,Gt,qt,Kt,Ut,Wt,Bt,Vt,Ht,Yt,Xt,Jt,Qt,Zt,er,tr,rr,nr,ir,ar,sr,or,lr=Lt();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:ze(function(){return lr.InlineCompletionRequest},"get")}),function(e){function t(e){const t=e;return n.string(t)||n.string(t.language)||n.string(t.scheme)||n.string(t.pattern)}ze(t,"is"),e.is=t}(C||(e.TextDocumentFilter=C={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebookType)||n.string(t.scheme)||n.string(t.pattern))}ze(t,"is"),e.is=t}(A||(e.NotebookDocumentFilter=A={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(n.string(t.notebook)||A.is(t.notebook))&&(void 0===t.language||n.string(t.language))}ze(t,"is"),e.is=t}(S||(e.NotebookCellTextDocumentFilter=S={})),function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!n.string(t)&&!C.is(t)&&!S.is(t))return!1;return!0}ze(t,"is"),e.is=t}(k||(e.DocumentSelector=k={})),(x=w||(e.RegistrationRequest=w={})).method="client/registerCapability",x.messageDirection=t.MessageDirection.serverToClient,x.type=new t.ProtocolRequestType(x.method),(I=N||(e.UnregistrationRequest=N={})).method="client/unregisterCapability",I.messageDirection=t.MessageDirection.serverToClient,I.type=new t.ProtocolRequestType(I.method),(P=_||(e.ResourceOperationKind=_={})).Create="create",P.Rename="rename",P.Delete="delete",(O=D||(e.FailureHandlingKind=D={})).Abort="abort",O.Transactional="transactional",O.TextOnlyTransactional="textOnlyTransactional",O.Undo="undo",(M=L||(e.PositionEncodingKind=L={})).UTF8="utf-8",M.UTF16="utf-16",M.UTF32="utf-32",function(e){function t(e){const t=e;return t&&n.string(t.id)&&t.id.length>0}ze(t,"hasId"),e.hasId=t}(j||(e.StaticRegistrationOptions=j={})),function(e){function t(e){const t=e;return t&&(null===t.documentSelector||k.is(t.documentSelector))}ze(t,"is"),e.is=t}(F||(e.TextDocumentRegistrationOptions=F={})),function(e){function t(e){const t=e;return n.objectLiteral(t)&&(void 0===t.workDoneProgress||n.boolean(t.workDoneProgress))}function r(e){const t=e;return t&&n.boolean(t.workDoneProgress)}ze(t,"is"),e.is=t,ze(r,"hasWorkDoneProgress"),e.hasWorkDoneProgress=r}(z||(e.WorkDoneProgressOptions=z={})),(q=G||(e.InitializeRequest=G={})).method="initialize",q.messageDirection=t.MessageDirection.clientToServer,q.type=new t.ProtocolRequestType(q.method),(K||(e.InitializeErrorCodes=K={})).unknownProtocolVersion=1,(W=U||(e.InitializedNotification=U={})).method="initialized",W.messageDirection=t.MessageDirection.clientToServer,W.type=new t.ProtocolNotificationType(W.method),(V=B||(e.ShutdownRequest=B={})).method="shutdown",V.messageDirection=t.MessageDirection.clientToServer,V.type=new t.ProtocolRequestType0(V.method),(Y=H||(e.ExitNotification=H={})).method="exit",Y.messageDirection=t.MessageDirection.clientToServer,Y.type=new t.ProtocolNotificationType0(Y.method),(J=X||(e.DidChangeConfigurationNotification=X={})).method="workspace/didChangeConfiguration",J.messageDirection=t.MessageDirection.clientToServer,J.type=new t.ProtocolNotificationType(J.method),(Z=Q||(e.MessageType=Q={})).Error=1,Z.Warning=2,Z.Info=3,Z.Log=4,Z.Debug=5,(te=ee||(e.ShowMessageNotification=ee={})).method="window/showMessage",te.messageDirection=t.MessageDirection.serverToClient,te.type=new t.ProtocolNotificationType(te.method),(ne=re||(e.ShowMessageRequest=re={})).method="window/showMessageRequest",ne.messageDirection=t.MessageDirection.serverToClient,ne.type=new t.ProtocolRequestType(ne.method),(ae=ie||(e.LogMessageNotification=ie={})).method="window/logMessage",ae.messageDirection=t.MessageDirection.serverToClient,ae.type=new t.ProtocolNotificationType(ae.method),(oe=se||(e.TelemetryEventNotification=se={})).method="telemetry/event",oe.messageDirection=t.MessageDirection.serverToClient,oe.type=new t.ProtocolNotificationType(oe.method),(ce=le||(e.TextDocumentSyncKind=le={})).None=0,ce.Full=1,ce.Incremental=2,(de=ue||(e.DidOpenTextDocumentNotification=ue={})).method="textDocument/didOpen",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method),function(e){function t(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}function r(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}ze(t,"isIncremental"),e.isIncremental=t,ze(r,"isFull"),e.isFull=r}(pe||(e.TextDocumentContentChangeEvent=pe={})),(he=fe||(e.DidChangeTextDocumentNotification=fe={})).method="textDocument/didChange",he.messageDirection=t.MessageDirection.clientToServer,he.type=new t.ProtocolNotificationType(he.method),(ge=me||(e.DidCloseTextDocumentNotification=me={})).method="textDocument/didClose",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method),(ve=ye||(e.DidSaveTextDocumentNotification=ye={})).method="textDocument/didSave",ve.messageDirection=t.MessageDirection.clientToServer,ve.type=new t.ProtocolNotificationType(ve.method),(Re=Te||(e.TextDocumentSaveReason=Te={})).Manual=1,Re.AfterDelay=2,Re.FocusOut=3,(be=$e||(e.WillSaveTextDocumentNotification=$e={})).method="textDocument/willSave",be.messageDirection=t.MessageDirection.clientToServer,be.type=new t.ProtocolNotificationType(be.method),(Ce=Ee||(e.WillSaveTextDocumentWaitUntilRequest=Ee={})).method="textDocument/willSaveWaitUntil",Ce.messageDirection=t.MessageDirection.clientToServer,Ce.type=new t.ProtocolRequestType(Ce.method),(Se=Ae||(e.DidChangeWatchedFilesNotification=Ae={})).method="workspace/didChangeWatchedFiles",Se.messageDirection=t.MessageDirection.clientToServer,Se.type=new t.ProtocolNotificationType(Se.method),(we=ke||(e.FileChangeType=ke={})).Created=1,we.Changed=2,we.Deleted=3,function(e){function t(e){const t=e;return n.objectLiteral(t)&&(r.URI.is(t.baseUri)||r.WorkspaceFolder.is(t.baseUri))&&n.string(t.pattern)}ze(t,"is"),e.is=t}(xe||(e.RelativePattern=xe={})),(Ie=Ne||(e.WatchKind=Ne={})).Create=1,Ie.Change=2,Ie.Delete=4,(Pe=_e||(e.PublishDiagnosticsNotification=_e={})).method="textDocument/publishDiagnostics",Pe.messageDirection=t.MessageDirection.serverToClient,Pe.type=new t.ProtocolNotificationType(Pe.method),(Oe=De||(e.CompletionTriggerKind=De={})).Invoked=1,Oe.TriggerCharacter=2,Oe.TriggerForIncompleteCompletions=3,(Me=Le||(e.CompletionRequest=Le={})).method="textDocument/completion",Me.messageDirection=t.MessageDirection.clientToServer,Me.type=new t.ProtocolRequestType(Me.method),(Fe=je||(e.CompletionResolveRequest=je={})).method="completionItem/resolve",Fe.messageDirection=t.MessageDirection.clientToServer,Fe.type=new t.ProtocolRequestType(Fe.method),(qe=Ge||(e.HoverRequest=Ge={})).method="textDocument/hover",qe.messageDirection=t.MessageDirection.clientToServer,qe.type=new t.ProtocolRequestType(qe.method),(Ue=Ke||(e.SignatureHelpTriggerKind=Ke={})).Invoked=1,Ue.TriggerCharacter=2,Ue.ContentChange=3,(He=We||(e.SignatureHelpRequest=We={})).method="textDocument/signatureHelp",He.messageDirection=t.MessageDirection.clientToServer,He.type=new t.ProtocolRequestType(He.method),(Je=Ye||(e.DefinitionRequest=Ye={})).method="textDocument/definition",Je.messageDirection=t.MessageDirection.clientToServer,Je.type=new t.ProtocolRequestType(Je.method),(Ze=Qe||(e.ReferencesRequest=Qe={})).method="textDocument/references",Ze.messageDirection=t.MessageDirection.clientToServer,Ze.type=new t.ProtocolRequestType(Ze.method),(tt=et||(e.DocumentHighlightRequest=et={})).method="textDocument/documentHighlight",tt.messageDirection=t.MessageDirection.clientToServer,tt.type=new t.ProtocolRequestType(tt.method),(nt=rt||(e.DocumentSymbolRequest=rt={})).method="textDocument/documentSymbol",nt.messageDirection=t.MessageDirection.clientToServer,nt.type=new t.ProtocolRequestType(nt.method),(at=it||(e.CodeActionRequest=it={})).method="textDocument/codeAction",at.messageDirection=t.MessageDirection.clientToServer,at.type=new t.ProtocolRequestType(at.method),(ot=st||(e.CodeActionResolveRequest=st={})).method="codeAction/resolve",ot.messageDirection=t.MessageDirection.clientToServer,ot.type=new t.ProtocolRequestType(ot.method),(ct=lt||(e.WorkspaceSymbolRequest=lt={})).method="workspace/symbol",ct.messageDirection=t.MessageDirection.clientToServer,ct.type=new t.ProtocolRequestType(ct.method),(dt=ut||(e.WorkspaceSymbolResolveRequest=ut={})).method="workspaceSymbol/resolve",dt.messageDirection=t.MessageDirection.clientToServer,dt.type=new t.ProtocolRequestType(dt.method),(ft=pt||(e.CodeLensRequest=pt={})).method="textDocument/codeLens",ft.messageDirection=t.MessageDirection.clientToServer,ft.type=new t.ProtocolRequestType(ft.method),(jt=Mt||(e.CodeLensResolveRequest=Mt={})).method="codeLens/resolve",jt.messageDirection=t.MessageDirection.clientToServer,jt.type=new t.ProtocolRequestType(jt.method),(zt=Ft||(e.CodeLensRefreshRequest=Ft={})).method="workspace/codeLens/refresh",zt.messageDirection=t.MessageDirection.serverToClient,zt.type=new t.ProtocolRequestType0(zt.method),(qt=Gt||(e.DocumentLinkRequest=Gt={})).method="textDocument/documentLink",qt.messageDirection=t.MessageDirection.clientToServer,qt.type=new t.ProtocolRequestType(qt.method),(Ut=Kt||(e.DocumentLinkResolveRequest=Kt={})).method="documentLink/resolve",Ut.messageDirection=t.MessageDirection.clientToServer,Ut.type=new t.ProtocolRequestType(Ut.method),(Bt=Wt||(e.DocumentFormattingRequest=Wt={})).method="textDocument/formatting",Bt.messageDirection=t.MessageDirection.clientToServer,Bt.type=new t.ProtocolRequestType(Bt.method),(Ht=Vt||(e.DocumentRangeFormattingRequest=Vt={})).method="textDocument/rangeFormatting",Ht.messageDirection=t.MessageDirection.clientToServer,Ht.type=new t.ProtocolRequestType(Ht.method),(Xt=Yt||(e.DocumentRangesFormattingRequest=Yt={})).method="textDocument/rangesFormatting",Xt.messageDirection=t.MessageDirection.clientToServer,Xt.type=new t.ProtocolRequestType(Xt.method),(Qt=Jt||(e.DocumentOnTypeFormattingRequest=Jt={})).method="textDocument/onTypeFormatting",Qt.messageDirection=t.MessageDirection.clientToServer,Qt.type=new t.ProtocolRequestType(Qt.method),(Zt||(e.PrepareSupportDefaultBehavior=Zt={})).Identifier=1,(tr=er||(e.RenameRequest=er={})).method="textDocument/rename",tr.messageDirection=t.MessageDirection.clientToServer,tr.type=new t.ProtocolRequestType(tr.method),(nr=rr||(e.PrepareRenameRequest=rr={})).method="textDocument/prepareRename",nr.messageDirection=t.MessageDirection.clientToServer,nr.type=new t.ProtocolRequestType(nr.method),(ar=ir||(e.ExecuteCommandRequest=ir={})).method="workspace/executeCommand",ar.messageDirection=t.MessageDirection.clientToServer,ar.type=new t.ProtocolRequestType(ar.method),(or=sr||(e.ApplyWorkspaceEditRequest=sr={})).method="workspace/applyEdit",or.messageDirection=t.MessageDirection.serverToClient,or.type=new t.ProtocolRequestType("workspace/applyEdit")}}),jt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=pt();function r(e,r,n,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,r,n,i)}ze(r,"createProtocolConnection"),e.createProtocolConnection=r}}),Ft=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:ze(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(pt(),e),r((Xe(),Be(Ve)),e),r(ht(),e),r(Mt(),e);var n,i,a=jt();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:ze(function(){return a.createProtocolConnection},"get")}),(i=n||(e.LSPErrorCodes=n={})).lspReservedErrorRangeStart=-32899,i.RequestFailed=-32803,i.ServerCancelled=-32802,i.ContentModified=-32801,i.RequestCancelled=-32800,i.lspReservedErrorRangeEnd=-32800}}),zt=Ge({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:ze(function(){return t[r]},"get")}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=ft();function i(e,t,r,i){return(0,n.createMessageConnection)(e,t,r,i)}r(ft(),e),r(Ft(),e),ze(i,"createProtocolConnection"),e.createProtocolConnection=i}}),Gt={};qe(Gt,{AbstractAstReflection:()=>Ht,AbstractCstNode:()=>hk,AbstractLangiumParser:()=>bk,AbstractParserErrorMessageProvider:()=>Ck,AbstractThreadedAsyncParser:()=>Qx,AstUtils:()=>sr,BiMap:()=>_w,Cancellation:()=>ew,CompositeCstNodeImpl:()=>gk,ContextCache:()=>zw,CstNodeBuilder:()=>fk,CstUtils:()=>qt,DEFAULT_TOKENIZE_OPTIONS:()=>gx,DONE_RESULT:()=>rr,DatatypeSymbol:()=>Tk,DefaultAstNodeDescriptionProvider:()=>ax,DefaultAstNodeLocator:()=>ox,DefaultAsyncParser:()=>Jx,DefaultCommentProvider:()=>Xx,DefaultConfigurationProvider:()=>ux,DefaultDocumentBuilder:()=>px,DefaultDocumentValidator:()=>tx,DefaultHydrator:()=>tN,DefaultIndexManager:()=>fx,DefaultJsonSerializer:()=>Hw,DefaultLangiumDocumentFactory:()=>Cw,DefaultLangiumDocuments:()=>Aw,DefaultLangiumProfiler:()=>PN,DefaultLexer:()=>yx,DefaultLexerErrorMessageProvider:()=>mx,DefaultLinker:()=>kw,DefaultNameProvider:()=>xw,DefaultReferenceDescriptionProvider:()=>sx,DefaultReferences:()=>Nw,DefaultScopeComputation:()=>Pw,DefaultScopeProvider:()=>Kw,DefaultServiceRegistry:()=>Yw,DefaultTokenBuilder:()=>Qk,DefaultValueConverter:()=>Zk,DefaultWorkspaceLock:()=>eN,DefaultWorkspaceManager:()=>hx,Deferred:()=>dw,Disposable:()=>cx,DisposableCache:()=>jw,DocumentCache:()=>Gw,DocumentState:()=>$w,DocumentValidator:()=>Jw,EMPTY_SCOPE:()=>Mw,EMPTY_STREAM:()=>tr,EmptyFileSystem:()=>vN,EmptyFileSystemProvider:()=>yN,ErrorWithLocation:()=>Ui,GrammarAST:()=>$r,GrammarUtils:()=>Ki,IndentationAwareLexer:()=>mN,IndentationAwareTokenBuilder:()=>hN,JSDocDocumentationProvider:()=>Yx,LangiumCompletionParser:()=>Sk,LangiumParser:()=>Ek,LangiumParserErrorMessageProvider:()=>Ak,LeafCstNodeImpl:()=>mk,LexingMode:()=>dN,MapScope:()=>Ow,Module:()=>Hx,MultiMap:()=>Iw,MultiMapScope:()=>Lw,OperationCancelled:()=>sw,ParserWorker:()=>Zx,ProfilingTask:()=>DN,Reduction:()=>ir,RefResolving:()=>Sw,RegExpUtils:()=>Vi,RootCstNodeImpl:()=>vk,SimpleCache:()=>Fw,StreamImpl:()=>Qt,StreamScope:()=>Dw,TextDocument:()=>cw,TreeStreamImpl:()=>ar,URI:()=>Tw,UriTrie:()=>Ew,UriUtils:()=>vw,VALIDATE_EACH_NODE:()=>ex,ValidationCategory:()=>Bw,ValidationRegistry:()=>Zw,ValueConverter:()=>Jk,WorkspaceCache:()=>qw,assertCondition:()=>Bi,assertUnreachable:()=>Wi,createCompletionParser:()=>Hk,createDefaultCoreModule:()=>rN,createDefaultSharedCoreModule:()=>nN,createGrammarConfig:()=>is,createLangiumParser:()=>Yk,createParser:()=>Nk,delayNextTick:()=>tw,diagnosticData:()=>Xw,eagerLoad:()=>sN,getDiagnosticRange:()=>rx,indentationBuilderDefaultOptions:()=>fN,inject:()=>iN,interruptAndCheck:()=>lw,isAstNode:()=>Kt,isAstNodeDescription:()=>Bt,isAstNodeWithComment:()=>Uw,isCompositeCstNode:()=>Yt,isIMultiModeLexerDefinition:()=>Tx,isJSDoc:()=>bx,isLeafCstNode:()=>Xt,isLinkingError:()=>Vt,isMultiReference:()=>Wt,isNamed:()=>ww,isOperationCancelled:()=>ow,isReference:()=>Ut,isRootCstNode:()=>Jt,isTokenTypeArray:()=>vx,isTokenTypeDictionary:()=>Rx,loadGrammarFromJson:()=>bN,parseJSDoc:()=>$x,prepareLangiumParser:()=>Xk,setInterruptionPeriod:()=>aw,startCancelableOperation:()=>iw,stream:()=>nr,toDiagnosticData:()=>ix,toDiagnosticSeverity:()=>nx});var qt={};function Kt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function Ut(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function Wt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function Bt(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function Vt(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}qe(qt,{DefaultNameRegexp:()=>Ni,RangeComparison:()=>vi,compareRange:()=>wi,findCommentNode:()=>_i,findDeclarationNodeAtOffset:()=>Ii,findLeafNodeAtOffset:()=>Di,findLeafNodeBeforeOffset:()=>Oi,flattenCst:()=>Ci,getDatatypeNode:()=>bi,getInteriorNodes:()=>zi,getNextNode:()=>ji,getPreviousNode:()=>Mi,getStartlineNode:()=>Fi,inRange:()=>xi,isChildNode:()=>Ai,isCommentNode:()=>Pi,streamCst:()=>Ei,toDocumentSegment:()=>ki,tokenToRange:()=>Si}),ze(Kt,"isAstNode"),ze(Ut,"isReference"),ze(Wt,"isMultiReference"),ze(Bt,"isAstNodeDescription"),ze(Vt,"isLinkingError");var Ht=class{static{ze(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Kt(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const n=r[t];if(void 0!==n)return n;{const n=this.types[e],i=!!n&&n.superTypes.some(e=>this.isSubtype(e,t));return r[t]=i,i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),r=[];for(const n of t)this.isSubtype(n,e)&&r.push(n);return this.allSubtypes[e]=r,r}}};function Yt(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function Xt(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function Jt(e){return Yt(e)&&"string"==typeof e.fullText}ze(Yt,"isCompositeCstNode"),ze(Xt,"isLeafCstNode"),ze(Jt,"isRootCstNode");var Qt=class e{static{ze(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:ze(()=>this.nextFn(e.state),"next"),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do{r=t.next(),void 0!==r.value&&e.push(r.value)}while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(r=>[e?e(r):r,t?t(r):r]);return new Map(r)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return rr})}join(e=","){const t=this.iterator();let r,n="",i=!1;do{r=t.next(),r.done||(i&&(n+=e),n+=Zt(r.value)),i=!0}while(!r.done);return n}indexOf(e,t=0){const r=this.iterator();let n=0,i=r.next();for(;!i.done;){if(n>=t&&i.value===e)return n;i=r.next(),n++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(t){return new e(this.startFn,e=>{const{done:r,value:n}=this.nextFn(e);return r?rr:{done:!1,value:t(n)}})}filter(t){return new e(this.startFn,e=>{let r;do{if(r=this.nextFn(e),!r.done&&t(r.value))return r}while(!r.done);return rr})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const r=this.iterator();let n=t,i=r.next();for(;!i.done;)n=void 0===n?i.value:e(n,i.value),i=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const n=e.next();if(n.done)return r;const i=this.recursiveReduce(e,t,r);return void 0===i?n.value:t(i,n.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,n=t.next();for(;!n.done;){if(e(n.value))return r;n=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:r,value:n}=this.nextFn(e.this);if(!r){const r=t(n);if(!er(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return rr})}flat(t){if(void 0===t&&(t=1),t<=0)return this;const r=t>1?this.flat(t-1):this;return new e(()=>({this:r.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:t,value:n}=r.nextFn(e.this);if(!t){if(!er(n))return{done:!1,value:n};e.iterator=n[Symbol.iterator]()}}while(e.iterator);return rr})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{const e=this.startFn();for(let r=0;r<t;r++){if(this.nextFn(e).done)return e}return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?rr:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let r;do{if(r=this.nextFn(e.internalState),!r.done){const n=t?t(r.value):r.value;if(!e.set.has(n))return e.set.add(n),r}}while(!r.done);return rr})}exclude(e,t){const r=new Set;for(const n of e){const e=t?t(n):n;r.add(e)}return this.filter(e=>{const n=t?t(e):e;return!r.has(n)})}};function Zt(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function er(e){return!!e&&"function"==typeof e[Symbol.iterator]}ze(Zt,"toString"),ze(er,"isIterable");var tr=new Qt(()=>{},()=>rr),rr=Object.freeze({done:!0,value:void 0});function nr(...e){if(1===e.length){const t=e[0];if(t instanceof Qt)return t;if(er(t))return new Qt(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new Qt(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:rr)}return e.length>1?new Qt(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){const r=e[t.collIndex++];er(r)?t.iterator=r[Symbol.iterator]():r&&"number"==typeof r.length&&(t.array=r)}}while(t.iterator||t.array||t.collIndex<e.length);return rr}):tr}ze(nr,"stream");var ir,ar=class extends Qt{static{ze(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const r=e.iterators[e.iterators.length-1].next();if(!r.done)return e.iterators.push(t(r.value)[Symbol.iterator]()),r;e.iterators.pop()}return rr})}iterator(){const e={state:this.startFn(),next:ze(()=>this.nextFn(e.state),"next"),prune:ze(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};!function(e){function t(e){return e.reduce((e,t)=>e+t,0)}function r(e){return e.reduce((e,t)=>e*t,0)}function n(e){return e.reduce((e,t)=>Math.min(e,t))}function i(e){return e.reduce((e,t)=>Math.max(e,t))}ze(t,"sum"),e.sum=t,ze(r,"product"),e.product=r,ze(n,"min"),e.min=n,ze(i,"max"),e.max=i}(ir||(ir={}));var sr={};function or(e,t={}){for(const[r,n]of Object.entries(e))r.startsWith("$")||(Array.isArray(n)?n.forEach((n,i)=>{Kt(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=i,t.deep&&or(n,t))}):Kt(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&or(n,t)))}function lr(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function cr(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function ur(e){const t=dr(e).$document;if(!t)throw new Error("AST node has no document.");return t}function dr(e){for(;e.$container;)e=e.$container;return e}function pr(e){return Ut(e)?e.ref?[e.ref]:[]:Wt(e)?e.items.map(e=>e.ref):[]}function fr(e,t){if(!e)throw new Error("Node must be an AstNode.");const r=t?.range;return new Qt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const n=t.keys[t.keyIndex];if(!n.startsWith("$")){const i=e[n];if(Kt(i)){if(t.keyIndex++,gr(i,r))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){const e=i[t.arrayIndex++];if(Kt(e)&&gr(e,r))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return rr})}function hr(e,t){if(!e)throw new Error("Root node must be an AstNode.");return new ar(e,e=>fr(e,t))}function mr(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!gr(e,t.range)?new ar(e,()=>[]):new ar(e,e=>fr(e,t),{includeRoot:!0})}function gr(e,t){if(!t)return!0;const r=e.$cstNode?.range;return!!r&&xi(r,t)}function yr(e){return new Qt(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){const r=t.keys[t.keyIndex];if(!r.startsWith("$")){const n=e[r];if(Ut(n)||Wt(n))return t.keyIndex++,{done:!1,value:{reference:n,container:e,property:r}};if(Array.isArray(n)){for(;t.arrayIndex<n.length;){const i=t.arrayIndex++,a=n[i];if(Ut(a)||Wt(n))return{done:!1,value:{reference:a,container:e,property:r,index:i}}}t.arrayIndex=0}}t.keyIndex++}return rr})}function vr(e,t){const r=e.getTypeMetaData(t.$type),n=t;for(const i of Object.values(r.properties))void 0!==i.defaultValue&&void 0===n[i.name]&&(n[i.name]=Tr(i.defaultValue))}function Tr(e){return Array.isArray(e)?[...e.map(Tr)]:e}function Rr(e,t,r){const n={$type:e.$type};r&&(r.set(e,n),r.set(n,e));for(const[i,a]of Object.entries(e))if(!i.startsWith("$"))if(Kt(a))n[i]=Rr(a,t,r);else if(Ut(a))n[i]=t(n,i,a.$refNode,a.$refText,a);else if(Array.isArray(a)){const e=[];for(const s of a)Kt(s)?e.push(Rr(s,t,r)):Ut(s)?e.push(t(n,i,s.$refNode,s.$refText,s)):e.push(s);n[i]=e}else n[i]=a;return or(n,{deep:!0}),n}qe(sr,{assignMandatoryProperties:()=>vr,copyAstNode:()=>Rr,findRootNode:()=>dr,getContainerOfType:()=>lr,getDocument:()=>ur,getReferenceNodes:()=>pr,hasContainerOfType:()=>cr,linkContentToContainer:()=>or,streamAllContents:()=>hr,streamAst:()=>mr,streamContents:()=>fr,streamReferences:()=>yr}),ze(or,"linkContentToContainer"),ze(lr,"getContainerOfType"),ze(cr,"hasContainerOfType"),ze(ur,"getDocument"),ze(dr,"findRootNode"),ze(pr,"getReferenceNodes"),ze(fr,"streamContents"),ze(hr,"streamAllContents"),ze(mr,"streamAst"),ze(gr,"isAstNodeInRange"),ze(yr,"streamReferences"),ze(vr,"assignMandatoryProperties"),ze(Tr,"copyDefaultValue"),ze(Rr,"copyAstNode");var $r={};qe($r,{AbstractElement:()=>Er,AbstractParserRule:()=>Ar,AbstractRule:()=>kr,AbstractType:()=>xr,Action:()=>Ir,Alternatives:()=>Pr,ArrayLiteral:()=>Or,ArrayType:()=>Mr,Assignment:()=>Fr,BooleanLiteral:()=>Gr,CharacterRange:()=>Kr,Condition:()=>Wr,Conjunction:()=>Vr,CrossReference:()=>Yr,Disjunction:()=>Jr,EndOfFile:()=>Zr,Grammar:()=>tn,GrammarImport:()=>nn,Group:()=>sn,InferredType:()=>ln,InfixRule:()=>un,InfixRuleOperatorList:()=>pn,InfixRuleOperators:()=>hn,Interface:()=>gn,Keyword:()=>vn,LangiumGrammarAstReflection:()=>Ri,LangiumGrammarTerminals:()=>br,NamedArgument:()=>Rn,NegatedToken:()=>bn,Negation:()=>Cn,NumberLiteral:()=>Sn,Parameter:()=>wn,ParameterReference:()=>Nn,ParserRule:()=>_n,ReferenceType:()=>Dn,RegexToken:()=>Ln,ReturnType:()=>jn,RuleCall:()=>zn,SimpleType:()=>qn,StringLiteral:()=>Un,TerminalAlternatives:()=>Bn,TerminalElement:()=>Hn,TerminalGroup:()=>Xn,TerminalRule:()=>Qn,TerminalRuleCall:()=>ei,Type:()=>ri,TypeAttribute:()=>ii,TypeDefinition:()=>si,UnionType:()=>li,UnorderedGroup:()=>ui,UntilToken:()=>pi,ValueLiteral:()=>hi,Wildcard:()=>gi,isAbstractElement:()=>Cr,isAbstractParserRule:()=>Sr,isAbstractRule:()=>wr,isAbstractType:()=>Nr,isAction:()=>_r,isAlternatives:()=>Dr,isArrayLiteral:()=>Lr,isArrayType:()=>jr,isAssignment:()=>zr,isBooleanLiteral:()=>qr,isCharacterRange:()=>Ur,isCondition:()=>Br,isConjunction:()=>Hr,isCrossReference:()=>Xr,isDisjunction:()=>Qr,isEndOfFile:()=>en,isGrammar:()=>rn,isGrammarImport:()=>an,isGroup:()=>on,isInferredType:()=>cn,isInfixRule:()=>dn,isInfixRuleOperatorList:()=>fn,isInfixRuleOperators:()=>mn,isInterface:()=>yn,isKeyword:()=>Tn,isNamedArgument:()=>$n,isNegatedToken:()=>En,isNegation:()=>An,isNumberLiteral:()=>kn,isParameter:()=>xn,isParameterReference:()=>In,isParserRule:()=>Pn,isReferenceType:()=>On,isRegexToken:()=>Mn,isReturnType:()=>Fn,isRuleCall:()=>Gn,isSimpleType:()=>Kn,isStringLiteral:()=>Wn,isTerminalAlternatives:()=>Vn,isTerminalElement:()=>Yn,isTerminalGroup:()=>Jn,isTerminalRule:()=>Zn,isTerminalRuleCall:()=>ti,isType:()=>ni,isTypeAttribute:()=>ai,isTypeDefinition:()=>oi,isUnionType:()=>ci,isUnorderedGroup:()=>di,isUntilToken:()=>fi,isValueLiteral:()=>mi,isWildcard:()=>yi,reflection:()=>$i});var br={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Er={$type:"AbstractElement",cardinality:"cardinality"};function Cr(e){return $i.isInstance(e,Er.$type)}ze(Cr,"isAbstractElement");var Ar={$type:"AbstractParserRule"};function Sr(e){return $i.isInstance(e,Ar.$type)}ze(Sr,"isAbstractParserRule");var kr={$type:"AbstractRule"};function wr(e){return $i.isInstance(e,kr.$type)}ze(wr,"isAbstractRule");var xr={$type:"AbstractType"};function Nr(e){return $i.isInstance(e,xr.$type)}ze(Nr,"isAbstractType");var Ir={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function _r(e){return $i.isInstance(e,Ir.$type)}ze(_r,"isAction");var Pr={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function Dr(e){return $i.isInstance(e,Pr.$type)}ze(Dr,"isAlternatives");var Or={$type:"ArrayLiteral",elements:"elements"};function Lr(e){return $i.isInstance(e,Or.$type)}ze(Lr,"isArrayLiteral");var Mr={$type:"ArrayType",elementType:"elementType"};function jr(e){return $i.isInstance(e,Mr.$type)}ze(jr,"isArrayType");var Fr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function zr(e){return $i.isInstance(e,Fr.$type)}ze(zr,"isAssignment");var Gr={$type:"BooleanLiteral",true:"true"};function qr(e){return $i.isInstance(e,Gr.$type)}ze(qr,"isBooleanLiteral");var Kr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function Ur(e){return $i.isInstance(e,Kr.$type)}ze(Ur,"isCharacterRange");var Wr={$type:"Condition"};function Br(e){return $i.isInstance(e,Wr.$type)}ze(Br,"isCondition");var Vr={$type:"Conjunction",left:"left",right:"right"};function Hr(e){return $i.isInstance(e,Vr.$type)}ze(Hr,"isConjunction");var Yr={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function Xr(e){return $i.isInstance(e,Yr.$type)}ze(Xr,"isCrossReference");var Jr={$type:"Disjunction",left:"left",right:"right"};function Qr(e){return $i.isInstance(e,Jr.$type)}ze(Qr,"isDisjunction");var Zr={$type:"EndOfFile",cardinality:"cardinality"};function en(e){return $i.isInstance(e,Zr.$type)}ze(en,"isEndOfFile");var tn={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};function rn(e){return $i.isInstance(e,tn.$type)}ze(rn,"isGrammar");var nn={$type:"GrammarImport",path:"path"};function an(e){return $i.isInstance(e,nn.$type)}ze(an,"isGrammarImport");var sn={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function on(e){return $i.isInstance(e,sn.$type)}ze(on,"isGroup");var ln={$type:"InferredType",name:"name"};function cn(e){return $i.isInstance(e,ln.$type)}ze(cn,"isInferredType");var un={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function dn(e){return $i.isInstance(e,un.$type)}ze(dn,"isInfixRule");var pn={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};function fn(e){return $i.isInstance(e,pn.$type)}ze(fn,"isInfixRuleOperatorList");var hn={$type:"InfixRuleOperators",precedences:"precedences"};function mn(e){return $i.isInstance(e,hn.$type)}ze(mn,"isInfixRuleOperators");var gn={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function yn(e){return $i.isInstance(e,gn.$type)}ze(yn,"isInterface");var vn={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function Tn(e){return $i.isInstance(e,vn.$type)}ze(Tn,"isKeyword");var Rn={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};function $n(e){return $i.isInstance(e,Rn.$type)}ze($n,"isNamedArgument");var bn={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function En(e){return $i.isInstance(e,bn.$type)}ze(En,"isNegatedToken");var Cn={$type:"Negation",value:"value"};function An(e){return $i.isInstance(e,Cn.$type)}ze(An,"isNegation");var Sn={$type:"NumberLiteral",value:"value"};function kn(e){return $i.isInstance(e,Sn.$type)}ze(kn,"isNumberLiteral");var wn={$type:"Parameter",name:"name"};function xn(e){return $i.isInstance(e,wn.$type)}ze(xn,"isParameter");var Nn={$type:"ParameterReference",parameter:"parameter"};function In(e){return $i.isInstance(e,Nn.$type)}ze(In,"isParameterReference");var _n={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Pn(e){return $i.isInstance(e,_n.$type)}ze(Pn,"isParserRule");var Dn={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};function On(e){return $i.isInstance(e,Dn.$type)}ze(On,"isReferenceType");var Ln={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Mn(e){return $i.isInstance(e,Ln.$type)}ze(Mn,"isRegexToken");var jn={$type:"ReturnType",name:"name"};function Fn(e){return $i.isInstance(e,jn.$type)}ze(Fn,"isReturnType");var zn={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function Gn(e){return $i.isInstance(e,zn.$type)}ze(Gn,"isRuleCall");var qn={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Kn(e){return $i.isInstance(e,qn.$type)}ze(Kn,"isSimpleType");var Un={$type:"StringLiteral",value:"value"};function Wn(e){return $i.isInstance(e,Un.$type)}ze(Wn,"isStringLiteral");var Bn={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Vn(e){return $i.isInstance(e,Bn.$type)}ze(Vn,"isTerminalAlternatives");var Hn={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function Yn(e){return $i.isInstance(e,Hn.$type)}ze(Yn,"isTerminalElement");var Xn={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Jn(e){return $i.isInstance(e,Xn.$type)}ze(Jn,"isTerminalGroup");var Qn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function Zn(e){return $i.isInstance(e,Qn.$type)}ze(Zn,"isTerminalRule");var ei={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function ti(e){return $i.isInstance(e,ei.$type)}ze(ti,"isTerminalRuleCall");var ri={$type:"Type",name:"name",type:"type"};function ni(e){return $i.isInstance(e,ri.$type)}ze(ni,"isType");var ii={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};function ai(e){return $i.isInstance(e,ii.$type)}ze(ai,"isTypeAttribute");var si={$type:"TypeDefinition"};function oi(e){return $i.isInstance(e,si.$type)}ze(oi,"isTypeDefinition");var li={$type:"UnionType",types:"types"};function ci(e){return $i.isInstance(e,li.$type)}ze(ci,"isUnionType");var ui={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function di(e){return $i.isInstance(e,ui.$type)}ze(di,"isUnorderedGroup");var pi={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function fi(e){return $i.isInstance(e,pi.$type)}ze(fi,"isUntilToken");var hi={$type:"ValueLiteral"};function mi(e){return $i.isInstance(e,hi.$type)}ze(mi,"isValueLiteral");var gi={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function yi(e){return $i.isInstance(e,gi.$type)}ze(yi,"isWildcard");var vi,Ti,Ri=class extends Ht{static{ze(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Er.$type,properties:{cardinality:{name:Er.cardinality}},superTypes:[]},AbstractParserRule:{name:Ar.$type,properties:{},superTypes:[kr.$type,xr.$type]},AbstractRule:{name:kr.$type,properties:{},superTypes:[]},AbstractType:{name:xr.$type,properties:{},superTypes:[]},Action:{name:Ir.$type,properties:{cardinality:{name:Ir.cardinality},feature:{name:Ir.feature},inferredType:{name:Ir.inferredType},operator:{name:Ir.operator},type:{name:Ir.type,referenceType:xr.$type}},superTypes:[Er.$type]},Alternatives:{name:Pr.$type,properties:{cardinality:{name:Pr.cardinality},elements:{name:Pr.elements,defaultValue:[]}},superTypes:[Er.$type]},ArrayLiteral:{name:Or.$type,properties:{elements:{name:Or.elements,defaultValue:[]}},superTypes:[hi.$type]},ArrayType:{name:Mr.$type,properties:{elementType:{name:Mr.elementType}},superTypes:[si.$type]},Assignment:{name:Fr.$type,properties:{cardinality:{name:Fr.cardinality},feature:{name:Fr.feature},operator:{name:Fr.operator},predicate:{name:Fr.predicate},terminal:{name:Fr.terminal}},superTypes:[Er.$type]},BooleanLiteral:{name:Gr.$type,properties:{true:{name:Gr.true,defaultValue:!1}},superTypes:[Wr.$type,hi.$type]},CharacterRange:{name:Kr.$type,properties:{cardinality:{name:Kr.cardinality},left:{name:Kr.left},lookahead:{name:Kr.lookahead},parenthesized:{name:Kr.parenthesized,defaultValue:!1},right:{name:Kr.right}},superTypes:[Hn.$type]},Condition:{name:Wr.$type,properties:{},superTypes:[]},Conjunction:{name:Vr.$type,properties:{left:{name:Vr.left},right:{name:Vr.right}},superTypes:[Wr.$type]},CrossReference:{name:Yr.$type,properties:{cardinality:{name:Yr.cardinality},deprecatedSyntax:{name:Yr.deprecatedSyntax,defaultValue:!1},isMulti:{name:Yr.isMulti,defaultValue:!1},terminal:{name:Yr.terminal},type:{name:Yr.type,referenceType:xr.$type}},superTypes:[Er.$type]},Disjunction:{name:Jr.$type,properties:{left:{name:Jr.left},right:{name:Jr.right}},superTypes:[Wr.$type]},EndOfFile:{name:Zr.$type,properties:{cardinality:{name:Zr.cardinality}},superTypes:[Er.$type]},Grammar:{name:tn.$type,properties:{imports:{name:tn.imports,defaultValue:[]},interfaces:{name:tn.interfaces,defaultValue:[]},isDeclared:{name:tn.isDeclared,defaultValue:!1},name:{name:tn.name},rules:{name:tn.rules,defaultValue:[]},types:{name:tn.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:nn.$type,properties:{path:{name:nn.path}},superTypes:[]},Group:{name:sn.$type,properties:{cardinality:{name:sn.cardinality},elements:{name:sn.elements,defaultValue:[]},guardCondition:{name:sn.guardCondition},predicate:{name:sn.predicate}},superTypes:[Er.$type]},InferredType:{name:ln.$type,properties:{name:{name:ln.name}},superTypes:[xr.$type]},InfixRule:{name:un.$type,properties:{call:{name:un.call},dataType:{name:un.dataType},inferredType:{name:un.inferredType},name:{name:un.name},operators:{name:un.operators},parameters:{name:un.parameters,defaultValue:[]},returnType:{name:un.returnType,referenceType:xr.$type}},superTypes:[Ar.$type]},InfixRuleOperatorList:{name:pn.$type,properties:{associativity:{name:pn.associativity},operators:{name:pn.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:hn.$type,properties:{precedences:{name:hn.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:gn.$type,properties:{attributes:{name:gn.attributes,defaultValue:[]},name:{name:gn.name},superTypes:{name:gn.superTypes,defaultValue:[],referenceType:xr.$type}},superTypes:[xr.$type]},Keyword:{name:vn.$type,properties:{cardinality:{name:vn.cardinality},predicate:{name:vn.predicate},value:{name:vn.value}},superTypes:[Er.$type]},NamedArgument:{name:Rn.$type,properties:{calledByName:{name:Rn.calledByName,defaultValue:!1},parameter:{name:Rn.parameter,referenceType:wn.$type},value:{name:Rn.value}},superTypes:[]},NegatedToken:{name:bn.$type,properties:{cardinality:{name:bn.cardinality},lookahead:{name:bn.lookahead},parenthesized:{name:bn.parenthesized,defaultValue:!1},terminal:{name:bn.terminal}},superTypes:[Hn.$type]},Negation:{name:Cn.$type,properties:{value:{name:Cn.value}},superTypes:[Wr.$type]},NumberLiteral:{name:Sn.$type,properties:{value:{name:Sn.value}},superTypes:[hi.$type]},Parameter:{name:wn.$type,properties:{name:{name:wn.name}},superTypes:[]},ParameterReference:{name:Nn.$type,properties:{parameter:{name:Nn.parameter,referenceType:wn.$type}},superTypes:[Wr.$type]},ParserRule:{name:_n.$type,properties:{dataType:{name:_n.dataType},definition:{name:_n.definition},entry:{name:_n.entry,defaultValue:!1},fragment:{name:_n.fragment,defaultValue:!1},inferredType:{name:_n.inferredType},name:{name:_n.name},parameters:{name:_n.parameters,defaultValue:[]},returnType:{name:_n.returnType,referenceType:xr.$type}},superTypes:[Ar.$type]},ReferenceType:{name:Dn.$type,properties:{isMulti:{name:Dn.isMulti,defaultValue:!1},referenceType:{name:Dn.referenceType}},superTypes:[si.$type]},RegexToken:{name:Ln.$type,properties:{cardinality:{name:Ln.cardinality},lookahead:{name:Ln.lookahead},parenthesized:{name:Ln.parenthesized,defaultValue:!1},regex:{name:Ln.regex}},superTypes:[Hn.$type]},ReturnType:{name:jn.$type,properties:{name:{name:jn.name}},superTypes:[]},RuleCall:{name:zn.$type,properties:{arguments:{name:zn.arguments,defaultValue:[]},cardinality:{name:zn.cardinality},predicate:{name:zn.predicate},rule:{name:zn.rule,referenceType:kr.$type}},superTypes:[Er.$type]},SimpleType:{name:qn.$type,properties:{primitiveType:{name:qn.primitiveType},stringType:{name:qn.stringType},typeRef:{name:qn.typeRef,referenceType:xr.$type}},superTypes:[si.$type]},StringLiteral:{name:Un.$type,properties:{value:{name:Un.value}},superTypes:[hi.$type]},TerminalAlternatives:{name:Bn.$type,properties:{cardinality:{name:Bn.cardinality},elements:{name:Bn.elements,defaultValue:[]},lookahead:{name:Bn.lookahead},parenthesized:{name:Bn.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]},TerminalElement:{name:Hn.$type,properties:{cardinality:{name:Hn.cardinality},lookahead:{name:Hn.lookahead},parenthesized:{name:Hn.parenthesized,defaultValue:!1}},superTypes:[Er.$type]},TerminalGroup:{name:Xn.$type,properties:{cardinality:{name:Xn.cardinality},elements:{name:Xn.elements,defaultValue:[]},lookahead:{name:Xn.lookahead},parenthesized:{name:Xn.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]},TerminalRule:{name:Qn.$type,properties:{definition:{name:Qn.definition},fragment:{name:Qn.fragment,defaultValue:!1},hidden:{name:Qn.hidden,defaultValue:!1},name:{name:Qn.name},type:{name:Qn.type}},superTypes:[kr.$type]},TerminalRuleCall:{name:ei.$type,properties:{cardinality:{name:ei.cardinality},lookahead:{name:ei.lookahead},parenthesized:{name:ei.parenthesized,defaultValue:!1},rule:{name:ei.rule,referenceType:Qn.$type}},superTypes:[Hn.$type]},Type:{name:ri.$type,properties:{name:{name:ri.name},type:{name:ri.type}},superTypes:[xr.$type]},TypeAttribute:{name:ii.$type,properties:{defaultValue:{name:ii.defaultValue},isOptional:{name:ii.isOptional,defaultValue:!1},name:{name:ii.name},type:{name:ii.type}},superTypes:[]},TypeDefinition:{name:si.$type,properties:{},superTypes:[]},UnionType:{name:li.$type,properties:{types:{name:li.types,defaultValue:[]}},superTypes:[si.$type]},UnorderedGroup:{name:ui.$type,properties:{cardinality:{name:ui.cardinality},elements:{name:ui.elements,defaultValue:[]}},superTypes:[Er.$type]},UntilToken:{name:pi.$type,properties:{cardinality:{name:pi.cardinality},lookahead:{name:pi.lookahead},parenthesized:{name:pi.parenthesized,defaultValue:!1},terminal:{name:pi.terminal}},superTypes:[Hn.$type]},ValueLiteral:{name:hi.$type,properties:{},superTypes:[]},Wildcard:{name:gi.$type,properties:{cardinality:{name:gi.cardinality},lookahead:{name:gi.lookahead},parenthesized:{name:gi.parenthesized,defaultValue:!1}},superTypes:[Hn.$type]}}}},$i=new Ri;function bi(e){let t=e,r=!1;for(;t;){const e=lr(t.grammarSource,Pn);if(!e||!e.dataType)return r?t:void 0;t=t.container,r=!0}}function Ei(e){return new ar(e,e=>Yt(e)?e.content:[],{includeRoot:!0})}function Ci(e){return Ei(e).filter(Xt)}function Ai(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function Si(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function ki(e){if(!e)return;const{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function wi(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return vi.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return vi.After;const r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return r&&n?vi.Inside:r?vi.OverlapBack:n?vi.OverlapFront:vi.Outside}function xi(e,t){return wi(e,t)>vi.After}ze(bi,"getDatatypeNode"),ze(Ei,"streamCst"),ze(Ci,"flattenCst"),ze(Ai,"isChildNode"),ze(Si,"tokenToRange"),ze(ki,"toDocumentSegment"),(Ti=vi||(vi={}))[Ti.Before=0]="Before",Ti[Ti.After=1]="After",Ti[Ti.OverlapFront=2]="OverlapFront",Ti[Ti.OverlapBack=3]="OverlapBack",Ti[Ti.Inside=4]="Inside",Ti[Ti.Outside=5]="Outside",ze(wi,"compareRange"),ze(xi,"inRange");var Ni=/^[\w\p{L}]$/u;function Ii(e,t,r=Ni){if(e){if(t>0){const n=t-e.offset,i=e.text.charAt(n);r.test(i)||t--}return Di(e,t)}}function _i(e,t){if(e){const r=Mi(e,!0);if(r&&Pi(r,t))return r;if(Jt(e)){for(let r=e.content.findIndex(e=>!e.hidden)-1;r>=0;r--){const n=e.content[r];if(Pi(n,t))return n}}}}function Pi(e,t){return Xt(e)&&t.includes(e.tokenType.name)}function Di(e,t){if(Xt(e))return e;if(Yt(e)){const r=Li(e,t,!1);if(r)return Di(r,t)}}function Oi(e,t){if(Xt(e))return e;if(Yt(e)){const r=Li(e,t,!0);if(r)return Oi(r,t)}}function Li(e,t,r){let n,i=0,a=e.content.length-1;for(;i<=a;){const s=Math.floor((i+a)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(n=r?o:void 0,i=s+1):a=s-1}return n}function Mi(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);for(;n>0;){n--;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function ji(e,t=!0){for(;e.container;){const r=e.container;let n=r.content.indexOf(e);const i=r.content.length-1;for(;n<i;){n++;const e=r.content[n];if(t||!e.hidden)return e}e=r}}function Fi(e){if(0===e.range.start.character)return e;const t=e.range.start.line;let r,n=e;for(;e.container;){const i=e.container,a=r??i.content.indexOf(e);if(0===a?(e=i,r=void 0):(r=a-1,e=i.content[r]),e.range.start.line!==t)break;n=e}return n}function zi(e,t){const r=Gi(e,t);return r?r.parent.content.slice(r.a+1,r.b):[]}function Gi(e,t){const r=qi(e),n=qi(t);let i;for(let a=0;a<r.length&&a<n.length;a++){const e=r[a],t=n[a];if(e.parent!==t.parent)break;i={parent:e.parent,a:e.index,b:t.index}}return i}function qi(e){const t=[];for(;e.container;){const r=e.container,n=r.content.indexOf(e);t.push({parent:r,index:n}),e=r}return t.reverse()}ze(Ii,"findDeclarationNodeAtOffset"),ze(_i,"findCommentNode"),ze(Pi,"isCommentNode"),ze(Di,"findLeafNodeAtOffset"),ze(Oi,"findLeafNodeBeforeOffset"),ze(Li,"binarySearch"),ze(Mi,"getPreviousNode"),ze(ji,"getNextNode"),ze(Fi,"getStartlineNode"),ze(zi,"getInteriorNodes"),ze(Gi,"getCommonParent"),ze(qi,"getParentChain");var Ki={};qe(Ki,{findAssignment:()=>_a,findNameAssignment:()=>Pa,findNodeForKeyword:()=>Na,findNodeForProperty:()=>ka,findNodesForKeyword:()=>xa,findNodesForKeywordInternal:()=>Ia,findNodesForProperty:()=>Sa,getActionAtElement:()=>Oa,getActionType:()=>Wa,getAllReachableRules:()=>$a,getAllRulesUsedForCrossReferences:()=>Ea,getCrossReferenceTerminal:()=>Ca,getEntryRule:()=>Ta,getExplicitRuleType:()=>Ka,getHiddenRules:()=>Ra,getRuleType:()=>Va,getRuleTypeName:()=>Ba,getTypeName:()=>Ua,isArrayCardinality:()=>Ma,isArrayOperator:()=>ja,isCommentTerminal:()=>Aa,isDataType:()=>Ga,isDataTypeRule:()=>Fa,isOptionalCardinality:()=>La,terminalRegex:()=>Ha});var Ui=class extends Error{static{ze(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function Wi(e,t="Error: Got unexpected value."){throw new Error(t)}function Bi(e,t="Error: Condition is violated."){if(!e)throw new Error(t)}ze(Wi,"assertUnreachable"),ze(Bi,"assertCondition");var Vi={};function Hi(e){return e.charCodeAt(0)}function Yi(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function Xi(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t];e[t]=!0}function Ji(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Qi(){throw Error("Internal Error - Should never get here!")}function Zi(e){return"Character"===e.type}qe(Vi,{NEWLINE_REGEXP:()=>la,escapeRegExp:()=>ga,getTerminalParts:()=>pa,isMultilineComment:()=>fa,isWhitespace:()=>ma,partialMatches:()=>ya,partialRegExp:()=>va,whitespaceCharacters:()=>ha}),ze(Hi,"cc"),ze(Yi,"insertToSet"),ze(Xi,"addFlag"),ze(Ji,"ASSERT_EXISTS"),ze(Qi,"ASSERT_NEVER_REACH_HERE"),ze(Zi,"isCharacter");var ea=[];for(let $L=Hi("0");$L<=Hi("9");$L++)ea.push($L);var ta=[Hi("_")].concat(ea);for(let $L=Hi("a");$L<=Hi("z");$L++)ta.push($L);for(let $L=Hi("A");$L<=Hi("Z");$L++)ta.push($L);var ra=[Hi(" "),Hi("\f"),Hi("\n"),Hi("\r"),Hi("\t"),Hi("\v"),Hi("\t"),Hi("\xa0"),Hi("\u1680"),Hi("\u2000"),Hi("\u2001"),Hi("\u2002"),Hi("\u2003"),Hi("\u2004"),Hi("\u2005"),Hi("\u2006"),Hi("\u2007"),Hi("\u2008"),Hi("\u2009"),Hi("\u200a"),Hi("\u2028"),Hi("\u2029"),Hi("\u202f"),Hi("\u205f"),Hi("\u3000"),Hi("\ufeff")],na=/[0-9a-fA-F]/,ia=/[0-9]/,aa=/[1-9]/,sa=class{static{ze(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Xi(r,"global");break;case"i":Xi(r,"ignoreCase");break;case"m":Xi(r,"multiLine");break;case"u":Xi(r,"unicode");break;case"y":Xi(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}Ji(t);const r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return Qi()}quantifier(e=!1){let t;const r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const r=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:r,atMost:r};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:r,atMost:e}):t={atLeast:r,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Ji(t)}if(!0!==e||void 0!==t)return Ji(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ji(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):Qi()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Hi("\n"),Hi("\r"),Hi("\u2028"),Hi("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=ea;break;case"D":e=ea,t=!0;break;case"s":e=ra;break;case"S":e=ra,t=!0;break;case"w":e=ta;break;case"W":e=ta,t=!0}return Ji(e)?{type:"Set",value:e,complement:t}:Qi()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Hi("\f");break;case"n":e=Hi("\n");break;case"r":e=Hi("\r");break;case"t":e=Hi("\t");break;case"v":e=Hi("\v")}return Ji(e)?{type:"Character",value:e}:Qi()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Hi("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Hi(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Hi(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();t.type;if(Zi(t)&&this.isRangeDash()){this.consumeChar("-");const r=this.classAtom();r.type;if(Zi(r)){if(r.value<t.value)throw Error("Range out of order in character class");e.push({from:t.value,to:r.value})}else Yi(t.value,e),e.push(Hi("-")),Yi(r.value,e)}else Yi(t.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}}classAtom(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:Hi("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;if(this.consumeChar("("),"?"===this.peekChar(0))this.consumeChar("?"),this.consumeChar(":"),e=!1;else this.groupIdx++;const t=this.disjunction();this.consumeChar(")");const r={type:"Group",capturing:e,value:t};return e&&(r.idx=this.groupIdx),r}positiveInteger(){let e=this.popChar();if(!1===aa.test(e))throw Error("Expecting a positive integer");for(;ia.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(!1===ia.test(e))throw Error("Expecting an integer");for(;ia.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:Hi(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return"-"===this.peekChar()&&this.isClassAtom(1)}isDigit(){return ia.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2)||"<"===this.peekChar(2)&&("="===this.peekChar(3)||"!"===this.peekChar(3)));default:return!1}}isQuantifier(){const e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let r=0;r<e;r++){const e=this.popChar();if(!1===na.test(e))throw Error("Expecting a HexDecimal digits");t+=e}return{type:"Character",value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){const e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},oa=class{static{ze(this,"BaseRegExpVisitor")}visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},la=/\r?\n/gm,ca=new sa,ua=class extends oa{static{ze(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=ga(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=Boolean("\n".match(r))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}},da=new ua;function pa(e){try{"string"!=typeof e&&(e=e.source),e=`/${e}/`;const t=ca.pattern(e),r=[];for(const n of t.value.value)da.reset(e),da.visit(n),r.push({start:da.startRegexp,end:da.endRegex});return r}catch{return[]}}function fa(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),da.reset(e),da.visit(ca.pattern(e)),da.multiline}catch{return!1}}ze(pa,"getTerminalParts"),ze(fa,"isMultilineComment");var ha="\f\n\r\t\v \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff".split("");function ma(e){const t="string"==typeof e?new RegExp(e):e;return ha.some(e=>t.test(e))}function ga(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ya(e,t){const r=va(e),n=t.match(r);return!!n&&n[0].length>0}function va(e){"string"==typeof e&&(e=new RegExp(e));const t=e,r=e.source;let n=0;function i(){let e,a="";function s(e){a+=r.substr(n,e),n+=e}function o(e){a+="(?:"+r.substr(n,e)+"|$)",n+=e}for(ze(s,"appendRaw"),ze(o,"appendOptional");n<r.length;)switch(r[n]){case"\\":switch(r[n+1]){case"c":o(3);break;case"x":o(4);break;case"u":t.unicode?"{"===r[n+2]?o(r.indexOf("}",n)-n+1):o(6):o(2);break;case"p":case"P":t.unicode?o(r.indexOf("}",n)-n+1):o(2);break;case"k":o(r.indexOf(">",n)-n+1);break;default:o(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=n,e=e.exec(r)||[],o(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":s(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=n,e=e.exec(r),e?s(e[0].length):o(1);break;case"(":if("?"===r[n+1])switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":e=n,n+=3,i(),a+=r.substr(e,n-e);break;case"<":switch(r[n+3]){case"=":case"!":e=n,n+=4,i(),a+=r.substr(e,n-e);break;default:s(r.indexOf(">",n)-n+1),a+=i()+"|$)"}}else s(1),a+=i()+"|$)";break;case")":return++n,a;default:o(1)}return a}return ze(i,"process"),new RegExp(i(),e.flags)}function Ta(e){return e.rules.find(e=>Pn(e)&&e.entry)}function Ra(e){return e.rules.filter(e=>Zn(e)&&e.hidden)}function $a(e,t){const r=new Set,n=Ta(e);if(!n)return new Set(e.rules);const i=[n].concat(Ra(e));for(const s of i)ba(s,r,t);const a=new Set;for(const s of e.rules)(r.has(s.name)||Zn(s)&&s.hidden)&&a.add(s);return a}function ba(e,t,r){t.add(e.name),hr(e).forEach(e=>{if(Gn(e)||r&&ti(e)){const n=e.rule.ref;n&&!t.has(n.name)&&ba(n,t,r)}})}function Ea(e){const t=new Set;return hr(e).forEach(e=>{Xr(e)&&(Pn(e.type.ref)&&t.add(e.type.ref),cn(e.type.ref)&&Pn(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function Ca(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=Pa(e.type.ref);return t?.terminal}}function Aa(e){return e.hidden&&!ma(Ha(e))}function Sa(e,t){return e&&t?wa(e,t,e.astNode,!0):[]}function ka(e,t,r){if(!e||!t)return;const n=wa(e,t,e.astNode,!0);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function wa(e,t,r,n){if(!n){const r=lr(e.grammarSource,zr);if(r&&r.feature===t)return[e]}return Yt(e)&&e.astNode===r?e.content.flatMap(e=>wa(e,t,r,!1)):[]}function xa(e,t){return e?Ia(e,t,e?.astNode):[]}function Na(e,t,r){if(!e)return;const n=Ia(e,t,e?.astNode);return 0!==n.length?n[r=void 0!==r?Math.max(0,Math.min(r,n.length-1)):0]:void 0}function Ia(e,t,r){if(e.astNode!==r)return[];if(Tn(e.grammarSource)&&e.grammarSource.value===t)return[e];const n=Ei(e).iterator();let i;const a=[];do{if(i=n.next(),!i.done){const e=i.value;e.astNode===r?Tn(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):n.prune()}}while(!i.done);return a}function _a(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=lr(e.grammarSource,zr);if(t)return t;e=e.container}}function Pa(e){let t=e;return cn(t)&&(_r(t.$container)?t=t.$container.$container:Sr(t.$container)?t=t.$container:Wi(t.$container)),Da(e,t,new Map)}function Da(e,t,r){function n(t,n){let i;return lr(t,zr)||(i=Da(n,n,r)),r.set(e,i),i}if(ze(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(const i of hr(t)){if(zr(i)&&"name"===i.feature.toLowerCase())return r.set(e,i),i;if(Gn(i)&&Pn(i.rule.ref))return n(i,i.rule.ref);if(Kn(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function Oa(e){const t=e.$container;if(on(t)){const r=t.elements;for(let t=r.indexOf(e)-1;t>=0;t--){const e=r[t];if(_r(e))return e;{const e=hr(r[t]).find(_r);if(e)return e}}}return Cr(t)?Oa(t):void 0}function La(e,t){return"?"===e||"*"===e||on(t)&&Boolean(t.guardCondition)}function Ma(e){return"*"===e||"+"===e}function ja(e){return"+="===e}function Fa(e){return za(e,new Set)}function za(e,t){if(t.has(e))return!0;t.add(e);for(const r of hr(e))if(Gn(r)){if(!r.rule.ref)return!1;if(Pn(r.rule.ref)&&!za(r.rule.ref,t))return!1;if(dn(r.rule.ref))return!1}else{if(zr(r))return!1;if(_r(r))return!1}return Boolean(e.definition)}function Ga(e){return qa(e.type,new Set)}function qa(e,t){if(t.has(e))return!0;if(t.add(e),jr(e))return!1;if(On(e))return!1;if(ci(e))return e.types.every(e=>qa(e,t));if(Kn(e)){if(void 0!==e.primitiveType)return!0;if(void 0!==e.stringType)return!0;if(void 0!==e.typeRef){const r=e.typeRef.ref;return!!ni(r)&&qa(r.type,t)}return!1}return!1}function Ka(e){if(!Zn(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function Ua(e){if(Sr(e))return Pn(e)&&Fa(e)?e.name:Ka(e)??e.name;if(yn(e)||ni(e)||Fn(e))return e.name;if(_r(e)){const t=Wa(e);if(t)return t}else if(cn(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function Wa(e){return e.inferredType?e.inferredType.name:e.type?.ref?Ua(e.type.ref):void 0}function Ba(e){return Zn(e)?e.type?.name??"string":Pn(e)&&Fa(e)?e.name:Ka(e)??e.name}function Va(e){return Zn(e)?e.type?.name??"string":Ka(e)??e.name}function Ha(e){const t={s:!1,i:!1,u:!1},r=Xa(e.definition,t),n=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(r,n)}ze(ma,"isWhitespace"),ze(ga,"escapeRegExp"),ze(ya,"partialMatches"),ze(va,"partialRegExp"),ze(Ta,"getEntryRule"),ze(Ra,"getHiddenRules"),ze($a,"getAllReachableRules"),ze(ba,"ruleDfs"),ze(Ea,"getAllRulesUsedForCrossReferences"),ze(Ca,"getCrossReferenceTerminal"),ze(Aa,"isCommentTerminal"),ze(Sa,"findNodesForProperty"),ze(ka,"findNodeForProperty"),ze(wa,"findNodesForPropertyInternal"),ze(xa,"findNodesForKeyword"),ze(Na,"findNodeForKeyword"),ze(Ia,"findNodesForKeywordInternal"),ze(_a,"findAssignment"),ze(Pa,"findNameAssignment"),ze(Da,"findNameAssignmentInternal"),ze(Oa,"getActionAtElement"),ze(La,"isOptionalCardinality"),ze(Ma,"isArrayCardinality"),ze(ja,"isArrayOperator"),ze(Fa,"isDataTypeRule"),ze(za,"isDataTypeRuleInternal"),ze(Ga,"isDataType"),ze(qa,"isDataTypeInternal"),ze(Ka,"getExplicitRuleType"),ze(Ua,"getTypeName"),ze(Wa,"getActionType"),ze(Ba,"getRuleTypeName"),ze(Va,"getRuleType"),ze(Ha,"terminalRegex");var Ya=/[\s\S]/.source;function Xa(e,t){if(Vn(e))return Ja(e);if(Jn(e))return Qa(e);if(Ur(e))return ts(e);if(ti(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return ns(Xa(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(En(e))return es(e);if(fi(e))return Za(e);if(Mn(e)){const r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),i=e.regex.substring(r+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),ns(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(yi(e))return ns(Ya,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function Ja(e){return ns(e.elements.map(e=>Xa(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Qa(e){return ns(e.elements.map(e=>Xa(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Za(e){return ns(`${Ya}*?${Xa(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function es(e){return ns(`(?!${Xa(e.terminal)})${Ya}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function ts(e){return e.right?ns(`[${rs(e.left)}-${rs(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):ns(rs(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function rs(e){return ga(e.value)}function ns(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}function is(e){const t=[],r=e.Grammar;for(const n of r.rules)Zn(n)&&Aa(n)&&fa(Ha(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:Ni}}ze(Xa,"abstractElementToRegex"),ze(Ja,"terminalAlternativesToRegex"),ze(Qa,"terminalGroupToRegex"),ze(Za,"untilTokenToRegex"),ze(es,"negateTokenToRegex"),ze(ts,"characterRangeToRegex"),ze(rs,"keywordToRegex"),ze(ns,"withCardinality"),ze(is,"createGrammarConfig");var as="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,ss="object"==typeof self&&self&&self.Object===Object&&self,os=as||ss||Function("return this")(),ls=os.Symbol,cs=Object.prototype,us=cs.hasOwnProperty,ds=cs.toString,ps=ls?ls.toStringTag:void 0;function fs(e){var t=us.call(e,ps),r=e[ps];try{e[ps]=void 0;var n=!0}catch(a){}var i=ds.call(e);return n&&(t?e[ps]=r:delete e[ps]),i}ze(fs,"getRawTag");var hs=fs,ms=Object.prototype.toString;function gs(e){return ms.call(e)}ze(gs,"objectToString");var ys=gs,vs=ls?ls.toStringTag:void 0;function Ts(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":vs&&vs in Object(e)?hs(e):ys(e)}ze(Ts,"baseGetTag");var Rs=Ts;function $s(e){return null!=e&&"object"==typeof e}ze($s,"isObjectLike");var bs=$s;function Es(e){return"symbol"==typeof e||bs(e)&&"[object Symbol]"==Rs(e)}ze(Es,"isSymbol");var Cs=Es;function As(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}ze(As,"arrayMap");var Ss=As,ks=Array.isArray,ws=ls?ls.prototype:void 0,xs=ws?ws.toString:void 0;function Ns(e){if("string"==typeof e)return e;if(ks(e))return Ss(e,Ns)+"";if(Cs(e))return xs?xs.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}ze(Ns,"baseToString");var Is=Ns,_s=/\s/;function Ps(e){for(var t=e.length;t--&&_s.test(e.charAt(t)););return t}ze(Ps,"trimmedEndIndex");var Ds=Ps,Os=/^\s+/;function Ls(e){return e?e.slice(0,Ds(e)+1).replace(Os,""):e}ze(Ls,"baseTrim");var Ms=Ls;function js(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}ze(js,"isObject");var Fs=js,zs=/^[-+]0x[0-9a-f]+$/i,Gs=/^0b[01]+$/i,qs=/^0o[0-7]+$/i,Ks=parseInt;function Us(e){if("number"==typeof e)return e;if(Cs(e))return NaN;if(Fs(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Fs(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ms(e);var r=Gs.test(e);return r||qs.test(e)?Ks(e.slice(2),r?2:8):zs.test(e)?NaN:+e}ze(Us,"toNumber");var Ws=Us,Bs=1/0;function Vs(e){return e?(e=Ws(e))===Bs||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}ze(Vs,"toFinite");var Hs=Vs;function Ys(e){var t=Hs(e),r=t%1;return t==t?r?t-r:t:0}ze(Ys,"toInteger");var Xs=Ys;function Js(e){return e}ze(Js,"identity");var Qs=Js;function Zs(e){if(!Fs(e))return!1;var t=Rs(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}ze(Zs,"isFunction");var eo,to=Zs,ro=os["__core-js_shared__"],no=(eo=/[^.]+$/.exec(ro&&ro.keys&&ro.keys.IE_PROTO||""))?"Symbol(src)_1."+eo:"";function io(e){return!!no&&no in e}ze(io,"isMasked");var ao=io,so=Function.prototype.toString;function oo(e){if(null!=e){try{return so.call(e)}catch(t){}try{return e+""}catch(t){}}return""}ze(oo,"toSource");var lo=oo,co=/^\[object .+?Constructor\]$/,uo=Function.prototype,po=Object.prototype,fo=uo.toString,ho=po.hasOwnProperty,mo=RegExp("^"+fo.call(ho).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function go(e){return!(!Fs(e)||ao(e))&&(to(e)?mo:co).test(lo(e))}ze(go,"baseIsNative");var yo=go;function vo(e,t){return null==e?void 0:e[t]}ze(vo,"getValue");var To=vo;function Ro(e,t){var r=To(e,t);return yo(r)?r:void 0}ze(Ro,"getNative");var $o=Ro,bo=$o(os,"WeakMap"),Eo=Object.create,Co=function(){function e(){}return ze(e,"object"),function(t){if(!Fs(t))return{};if(Eo)return Eo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function Ao(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}ze(Ao,"apply");var So=Ao;function ko(){}ze(ko,"noop");var wo=ko;function xo(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}ze(xo,"copyArray");var No=xo,Io=Date.now;function _o(e){var t=0,r=0;return function(){var n=Io(),i=16-(n-r);if(r=n,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ze(_o,"shortOut");var Po=_o;function Do(e){return function(){return e}}ze(Do,"constant");var Oo=Do,Lo=function(){try{var e=$o(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Mo=Po(Lo?function(e,t){return Lo(e,"toString",{configurable:!0,enumerable:!1,value:Oo(t),writable:!0})}:Qs);function jo(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}ze(jo,"arrayEach");var Fo=jo;function zo(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}ze(zo,"baseFindIndex");var Go=zo;function qo(e){return e!=e}ze(qo,"baseIsNaN");var Ko=qo;function Uo(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}ze(Uo,"strictIndexOf");var Wo=Uo;function Bo(e,t,r){return t==t?Wo(e,t,r):Go(e,Ko,r)}ze(Bo,"baseIndexOf");var Vo=Bo;function Ho(e,t){return!!(null==e?0:e.length)&&Vo(e,t,0)>-1}ze(Ho,"arrayIncludes");var Yo=Ho,Xo=/^(?:0|[1-9]\d*)$/;function Jo(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Xo.test(e))&&e>-1&&e%1==0&&e<t}ze(Jo,"isIndex");var Qo=Jo;function Zo(e,t,r){"__proto__"==t&&Lo?Lo(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}ze(Zo,"baseAssignValue");var el=Zo;function tl(e,t){return e===t||e!=e&&t!=t}ze(tl,"eq");var rl=tl,nl=Object.prototype.hasOwnProperty;function il(e,t,r){var n=e[t];nl.call(e,t)&&rl(n,r)&&(void 0!==r||t in e)||el(e,t,r)}ze(il,"assignValue");var al=il;function sl(e,t,r,n){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=n?n(r[o],e[o],o,r,e):void 0;void 0===l&&(l=e[o]),i?el(r,o,l):al(r,o,l)}return r}ze(sl,"copyObject");var ol=sl,ll=Math.max;function cl(e,t,r){return t=ll(void 0===t?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=ll(n.length-t,0),s=Array(a);++i<a;)s[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(s),So(e,this,o)}}ze(cl,"overRest");var ul=cl;function dl(e,t){return Mo(ul(e,t,Qs),e+"")}ze(dl,"baseRest");var pl=dl;function fl(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}ze(fl,"isLength");var hl=fl;function ml(e){return null!=e&&hl(e.length)&&!to(e)}ze(ml,"isArrayLike");var gl=ml;function yl(e,t,r){if(!Fs(r))return!1;var n=typeof t;return!!("number"==n?gl(r)&&Qo(t,r.length):"string"==n&&t in r)&&rl(r[t],e)}ze(yl,"isIterateeCall");var vl=yl;function Tl(e){return pl(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&vl(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var o=r[n];o&&e(t,o,n,a)}return t})}ze(Tl,"createAssigner");var Rl=Tl,$l=Object.prototype;function bl(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||$l)}ze(bl,"isPrototype");var El=bl;function Cl(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}ze(Cl,"baseTimes");var Al=Cl;function Sl(e){return bs(e)&&"[object Arguments]"==Rs(e)}ze(Sl,"baseIsArguments");var kl=Sl,wl=Object.prototype,xl=wl.hasOwnProperty,Nl=wl.propertyIsEnumerable,Il=kl(function(){return arguments}())?kl:function(e){return bs(e)&&xl.call(e,"callee")&&!Nl.call(e,"callee")},_l=Il;function Pl(){return!1}ze(Pl,"stubFalse");var Dl=Pl,Ol="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ll=Ol&&"object"==typeof module&&module&&!module.nodeType&&module,Ml=Ll&&Ll.exports===Ol?os.Buffer:void 0,jl=(Ml?Ml.isBuffer:void 0)||Dl,Fl={};function zl(e){return bs(e)&&hl(e.length)&&!!Fl[Rs(e)]}Fl["[object Float32Array]"]=Fl["[object Float64Array]"]=Fl["[object Int8Array]"]=Fl["[object Int16Array]"]=Fl["[object Int32Array]"]=Fl["[object Uint8Array]"]=Fl["[object Uint8ClampedArray]"]=Fl["[object Uint16Array]"]=Fl["[object Uint32Array]"]=!0,Fl["[object Arguments]"]=Fl["[object Array]"]=Fl["[object ArrayBuffer]"]=Fl["[object Boolean]"]=Fl["[object DataView]"]=Fl["[object Date]"]=Fl["[object Error]"]=Fl["[object Function]"]=Fl["[object Map]"]=Fl["[object Number]"]=Fl["[object Object]"]=Fl["[object RegExp]"]=Fl["[object Set]"]=Fl["[object String]"]=Fl["[object WeakMap]"]=!1,ze(zl,"baseIsTypedArray");var Gl=zl;function ql(e){return function(t){return e(t)}}ze(ql,"baseUnary");var Kl=ql,Ul="object"==typeof exports&&exports&&!exports.nodeType&&exports,Wl=Ul&&"object"==typeof module&&module&&!module.nodeType&&module,Bl=Wl&&Wl.exports===Ul&&as.process,Vl=function(){try{var e=Wl&&Wl.require&&Wl.require("util").types;return e||Bl&&Bl.binding&&Bl.binding("util")}catch(t){}}(),Hl=Vl&&Vl.isTypedArray,Yl=Hl?Kl(Hl):Gl,Xl=Object.prototype.hasOwnProperty;function Jl(e,t){var r=ks(e),n=!r&&_l(e),i=!r&&!n&&jl(e),a=!r&&!n&&!i&&Yl(e),s=r||n||i||a,o=s?Al(e.length,String):[],l=o.length;for(var c in e)!t&&!Xl.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Qo(c,l))||o.push(c);return o}ze(Jl,"arrayLikeKeys");var Ql=Jl;function Zl(e,t){return function(r){return e(t(r))}}ze(Zl,"overArg");var ec=Zl,tc=ec(Object.keys,Object),rc=Object.prototype.hasOwnProperty;function nc(e){if(!El(e))return tc(e);var t=[];for(var r in Object(e))rc.call(e,r)&&"constructor"!=r&&t.push(r);return t}ze(nc,"baseKeys");var ic=nc;function ac(e){return gl(e)?Ql(e):ic(e)}ze(ac,"keys");var sc=ac,oc=Object.prototype.hasOwnProperty,lc=Rl(function(e,t){if(El(t)||gl(t))ol(t,sc(t),e);else for(var r in t)oc.call(t,r)&&al(e,r,t[r])});function cc(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}ze(cc,"nativeKeysIn");var uc=cc,dc=Object.prototype.hasOwnProperty;function pc(e){if(!Fs(e))return uc(e);var t=El(e),r=[];for(var n in e)("constructor"!=n||!t&&dc.call(e,n))&&r.push(n);return r}ze(pc,"baseKeysIn");var fc=pc;function hc(e){return gl(e)?Ql(e,!0):fc(e)}ze(hc,"keysIn");var mc=hc,gc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yc=/^\w*$/;function vc(e,t){if(ks(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!Cs(e))||(yc.test(e)||!gc.test(e)||null!=t&&e in Object(t))}ze(vc,"isKey");var Tc=vc,Rc=$o(Object,"create");function $c(){this.__data__=Rc?Rc(null):{},this.size=0}ze($c,"hashClear");var bc=$c;function Ec(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}ze(Ec,"hashDelete");var Cc=Ec,Ac=Object.prototype.hasOwnProperty;function Sc(e){var t=this.__data__;if(Rc){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return Ac.call(t,e)?t[e]:void 0}ze(Sc,"hashGet");var kc=Sc,wc=Object.prototype.hasOwnProperty;function xc(e){var t=this.__data__;return Rc?void 0!==t[e]:wc.call(t,e)}ze(xc,"hashHas");var Nc=xc;function Ic(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Rc&&void 0===t?"__lodash_hash_undefined__":t,this}ze(Ic,"hashSet");var _c=Ic;function Pc(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(Pc,"Hash"),Pc.prototype.clear=bc,Pc.prototype.delete=Cc,Pc.prototype.get=kc,Pc.prototype.has=Nc,Pc.prototype.set=_c;var Dc=Pc;function Oc(){this.__data__=[],this.size=0}ze(Oc,"listCacheClear");var Lc=Oc;function Mc(e,t){for(var r=e.length;r--;)if(rl(e[r][0],t))return r;return-1}ze(Mc,"assocIndexOf");var jc=Mc,Fc=Array.prototype.splice;function zc(e){var t=this.__data__,r=jc(t,e);return!(r<0)&&(r==t.length-1?t.pop():Fc.call(t,r,1),--this.size,!0)}ze(zc,"listCacheDelete");var Gc=zc;function qc(e){var t=this.__data__,r=jc(t,e);return r<0?void 0:t[r][1]}ze(qc,"listCacheGet");var Kc=qc;function Uc(e){return jc(this.__data__,e)>-1}ze(Uc,"listCacheHas");var Wc=Uc;function Bc(e,t){var r=this.__data__,n=jc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}ze(Bc,"listCacheSet");var Vc=Bc;function Hc(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(Hc,"ListCache"),Hc.prototype.clear=Lc,Hc.prototype.delete=Gc,Hc.prototype.get=Kc,Hc.prototype.has=Wc,Hc.prototype.set=Vc;var Yc=Hc,Xc=$o(os,"Map");function Jc(){this.size=0,this.__data__={hash:new Dc,map:new(Xc||Yc),string:new Dc}}ze(Jc,"mapCacheClear");var Qc=Jc;function Zc(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}ze(Zc,"isKeyable");var eu=Zc;function tu(e,t){var r=e.__data__;return eu(t)?r["string"==typeof t?"string":"hash"]:r.map}ze(tu,"getMapData");var ru=tu;function nu(e){var t=ru(this,e).delete(e);return this.size-=t?1:0,t}ze(nu,"mapCacheDelete");var iu=nu;function au(e){return ru(this,e).get(e)}ze(au,"mapCacheGet");var su=au;function ou(e){return ru(this,e).has(e)}ze(ou,"mapCacheHas");var lu=ou;function cu(e,t){var r=ru(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}ze(cu,"mapCacheSet");var uu=cu;function du(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(du,"MapCache"),du.prototype.clear=Qc,du.prototype.delete=iu,du.prototype.get=su,du.prototype.has=lu,du.prototype.set=uu;var pu=du;function fu(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=ze(function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s},"memoized");return r.cache=new(fu.Cache||pu),r}ze(fu,"memoize"),fu.Cache=pu;var hu=fu;function mu(e){var t=hu(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}ze(mu,"memoizeCapped");var gu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yu=/\\(\\)?/g,vu=mu(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(gu,function(e,r,n,i){t.push(n?i.replace(yu,"$1"):r||e)}),t});function Tu(e){return null==e?"":Is(e)}ze(Tu,"toString");var Ru=Tu;function $u(e,t){return ks(e)?e:Tc(e,t)?[e]:vu(Ru(e))}ze($u,"castPath");var bu=$u;function Eu(e){if("string"==typeof e||Cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}ze(Eu,"toKey");var Cu=Eu;function Au(e,t){for(var r=0,n=(t=bu(t,e)).length;null!=e&&r<n;)e=e[Cu(t[r++])];return r&&r==n?e:void 0}ze(Au,"baseGet");var Su=Au;function ku(e,t,r){var n=null==e?void 0:Su(e,t);return void 0===n?r:n}ze(ku,"get");var wu=ku;function xu(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}ze(xu,"arrayPush");var Nu=xu,Iu=ls?ls.isConcatSpreadable:void 0;function _u(e){return ks(e)||_l(e)||!!(Iu&&e&&e[Iu])}ze(_u,"isFlattenable");var Pu=_u;function Du(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=Pu),i||(i=[]);++a<s;){var o=e[a];t>0&&r(o)?t>1?Du(o,t-1,r,n,i):Nu(i,o):n||(i[i.length]=o)}return i}ze(Du,"baseFlatten");var Ou=Du;function Lu(e){return(null==e?0:e.length)?Ou(e,1):[]}ze(Lu,"flatten");var Mu=Lu,ju=ec(Object.getPrototypeOf,Object);function Fu(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}ze(Fu,"baseSlice");var zu=Fu;function Gu(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}ze(Gu,"arrayReduce");var qu=Gu;function Ku(){this.__data__=new Yc,this.size=0}ze(Ku,"stackClear");var Uu=Ku;function Wu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}ze(Wu,"stackDelete");var Bu=Wu;function Vu(e){return this.__data__.get(e)}ze(Vu,"stackGet");var Hu=Vu;function Yu(e){return this.__data__.has(e)}ze(Yu,"stackHas");var Xu=Yu;function Ju(e,t){var r=this.__data__;if(r instanceof Yc){var n=r.__data__;if(!Xc||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new pu(n)}return r.set(e,t),this.size=r.size,this}ze(Ju,"stackSet");var Qu=Ju;function Zu(e){var t=this.__data__=new Yc(e);this.size=t.size}ze(Zu,"Stack"),Zu.prototype.clear=Uu,Zu.prototype.delete=Bu,Zu.prototype.get=Hu,Zu.prototype.has=Xu,Zu.prototype.set=Qu;var ed=Zu;function td(e,t){return e&&ol(t,sc(t),e)}ze(td,"baseAssign");var rd=td;function nd(e,t){return e&&ol(t,mc(t),e)}ze(nd,"baseAssignIn");var id=nd,ad="object"==typeof exports&&exports&&!exports.nodeType&&exports,sd=ad&&"object"==typeof module&&module&&!module.nodeType&&module,od=sd&&sd.exports===ad?os.Buffer:void 0,ld=od?od.allocUnsafe:void 0;function cd(e,t){if(t)return e.slice();var r=e.length,n=ld?ld(r):new e.constructor(r);return e.copy(n),n}ze(cd,"cloneBuffer");var ud=cd;function dd(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}ze(dd,"arrayFilter");var pd=dd;function fd(){return[]}ze(fd,"stubArray");var hd=fd,md=Object.prototype.propertyIsEnumerable,gd=Object.getOwnPropertySymbols,yd=gd?function(e){return null==e?[]:(e=Object(e),pd(gd(e),function(t){return md.call(e,t)}))}:hd;function vd(e,t){return ol(e,yd(e),t)}ze(vd,"copySymbols");var Td=vd,Rd=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Nu(t,yd(e)),e=ju(e);return t}:hd;function $d(e,t){return ol(e,Rd(e),t)}ze($d,"copySymbolsIn");var bd=$d;function Ed(e,t,r){var n=t(e);return ks(e)?n:Nu(n,r(e))}ze(Ed,"baseGetAllKeys");var Cd=Ed;function Ad(e){return Cd(e,sc,yd)}ze(Ad,"getAllKeys");var Sd=Ad;function kd(e){return Cd(e,mc,Rd)}ze(kd,"getAllKeysIn");var wd=kd,xd=$o(os,"DataView"),Nd=$o(os,"Promise"),Id=$o(os,"Set"),_d="[object Map]",Pd="[object Promise]",Dd="[object Set]",Od="[object WeakMap]",Ld="[object DataView]",Md=lo(xd),jd=lo(Xc),Fd=lo(Nd),zd=lo(Id),Gd=lo(bo),qd=Rs;(xd&&qd(new xd(new ArrayBuffer(1)))!=Ld||Xc&&qd(new Xc)!=_d||Nd&&qd(Nd.resolve())!=Pd||Id&&qd(new Id)!=Dd||bo&&qd(new bo)!=Od)&&(qd=ze(function(e){var t=Rs(e),r="[object Object]"==t?e.constructor:void 0,n=r?lo(r):"";if(n)switch(n){case Md:return Ld;case jd:return _d;case Fd:return Pd;case zd:return Dd;case Gd:return Od}return t},"getTag"));var Kd=qd,Ud=Object.prototype.hasOwnProperty;function Wd(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Ud.call(e,"index")&&(r.index=e.index,r.input=e.input),r}ze(Wd,"initCloneArray");var Bd=Wd,Vd=os.Uint8Array;function Hd(e){var t=new e.constructor(e.byteLength);return new Vd(t).set(new Vd(e)),t}ze(Hd,"cloneArrayBuffer");var Yd=Hd;function Xd(e,t){var r=t?Yd(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}ze(Xd,"cloneDataView");var Jd=Xd,Qd=/\w*$/;function Zd(e){var t=new e.constructor(e.source,Qd.exec(e));return t.lastIndex=e.lastIndex,t}ze(Zd,"cloneRegExp");var ep=Zd,tp=ls?ls.prototype:void 0,rp=tp?tp.valueOf:void 0;function np(e){return rp?Object(rp.call(e)):{}}ze(np,"cloneSymbol");var ip=np;function ap(e,t){var r=t?Yd(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}ze(ap,"cloneTypedArray");var sp=ap;function op(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return Yd(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return Jd(e,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return sp(e,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return ep(e);case"[object Symbol]":return ip(e)}}ze(op,"initCloneByTag");var lp=op;function cp(e){return"function"!=typeof e.constructor||El(e)?{}:Co(ju(e))}ze(cp,"initCloneObject");var up=cp;function dp(e){return bs(e)&&"[object Map]"==Kd(e)}ze(dp,"baseIsMap");var pp=dp,fp=Vl&&Vl.isMap,hp=fp?Kl(fp):pp;function mp(e){return bs(e)&&"[object Set]"==Kd(e)}ze(mp,"baseIsSet");var gp=mp,yp=Vl&&Vl.isSet,vp=yp?Kl(yp):gp,Tp="[object Arguments]",Rp="[object Function]",$p="[object Object]",bp={};function Ep(e,t,r,n,i,a){var s,o=1&t,l=2&t,c=4&t;if(r&&(s=i?r(e,n,i,a):r(e)),void 0!==s)return s;if(!Fs(e))return e;var u=ks(e);if(u){if(s=Bd(e),!o)return No(e,s)}else{var d=Kd(e),p=d==Rp||"[object GeneratorFunction]"==d;if(jl(e))return ud(e,o);if(d==$p||d==Tp||p&&!i){if(s=l||p?{}:up(e),!o)return l?bd(e,id(s,e)):Td(e,rd(s,e))}else{if(!bp[d])return i?e:{};s=lp(e,d,o)}}a||(a=new ed);var f=a.get(e);if(f)return f;a.set(e,s),vp(e)?e.forEach(function(n){s.add(Ep(n,t,r,n,e,a))}):hp(e)&&e.forEach(function(n,i){s.set(i,Ep(n,t,r,i,e,a))});var h=u?void 0:(c?l?wd:Sd:l?mc:sc)(e);return Fo(h||e,function(n,i){h&&(n=e[i=n]),al(s,i,Ep(n,t,r,i,e,a))}),s}bp[Tp]=bp["[object Array]"]=bp["[object ArrayBuffer]"]=bp["[object DataView]"]=bp["[object Boolean]"]=bp["[object Date]"]=bp["[object Float32Array]"]=bp["[object Float64Array]"]=bp["[object Int8Array]"]=bp["[object Int16Array]"]=bp["[object Int32Array]"]=bp["[object Map]"]=bp["[object Number]"]=bp[$p]=bp["[object RegExp]"]=bp["[object Set]"]=bp["[object String]"]=bp["[object Symbol]"]=bp["[object Uint8Array]"]=bp["[object Uint8ClampedArray]"]=bp["[object Uint16Array]"]=bp["[object Uint32Array]"]=!0,bp["[object Error]"]=bp[Rp]=bp["[object WeakMap]"]=!1,ze(Ep,"baseClone");var Cp=Ep;function Ap(e){return Cp(e,4)}ze(Ap,"clone");var Sp=Ap;function kp(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var a=e[t];a&&(i[n++]=a)}return i}ze(kp,"compact");var wp=kp;function xp(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}ze(xp,"setCacheAdd");var Np=xp;function Ip(e){return this.__data__.has(e)}ze(Ip,"setCacheHas");var _p=Ip;function Pp(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new pu;++t<r;)this.add(e[t])}ze(Pp,"SetCache"),Pp.prototype.add=Pp.prototype.push=Np,Pp.prototype.has=_p;var Dp=Pp;function Op(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}ze(Op,"arraySome");var Lp=Op;function Mp(e,t){return e.has(t)}ze(Mp,"cacheHas");var jp=Mp;function Fp(e,t,r,n,i,a){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&r?new Dp:void 0;for(a.set(e,t),a.set(t,e);++d<o;){var h=e[d],m=t[d];if(n)var g=s?n(m,h,d,t,e,a):n(h,m,d,e,t,a);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!Lp(t,function(e,t){if(!jp(f,t)&&(h===e||i(h,e,r,n,a)))return f.push(t)})){p=!1;break}}else if(h!==m&&!i(h,m,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}ze(Fp,"equalArrays");var zp=Fp;function Gp(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}ze(Gp,"mapToArray");var qp=Gp;function Kp(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}ze(Kp,"setToArray");var Up=Kp,Wp=ls?ls.prototype:void 0,Bp=Wp?Wp.valueOf:void 0;function Vp(e,t,r,n,i,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new Vd(e),new Vd(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return rl(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=qp;case"[object Set]":var l=1&n;if(o||(o=Up),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=zp(o(e),o(t),n,i,a,s);return s.delete(e),u;case"[object Symbol]":if(Bp)return Bp.call(e)==Bp.call(t)}return!1}ze(Vp,"equalByTag");var Hp=Vp,Yp=Object.prototype.hasOwnProperty;function Xp(e,t,r,n,i,a){var s=1&r,o=Sd(e),l=o.length;if(l!=Sd(t).length&&!s)return!1;for(var c=l;c--;){var u=o[c];if(!(s?u in t:Yp.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=s;++c<l;){var m=e[u=o[c]],g=t[u];if(n)var y=s?n(g,m,u,t,e,a):n(m,g,u,e,t,a);if(!(void 0===y?m===g||i(m,g,r,n,a):y)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return a.delete(e),a.delete(t),f}ze(Xp,"equalObjects");var Jp=Xp,Qp="[object Arguments]",Zp="[object Array]",ef="[object Object]",tf=Object.prototype.hasOwnProperty;function rf(e,t,r,n,i,a){var s=ks(e),o=ks(t),l=s?Zp:Kd(e),c=o?Zp:Kd(t),u=(l=l==Qp?ef:l)==ef,d=(c=c==Qp?ef:c)==ef,p=l==c;if(p&&jl(e)){if(!jl(t))return!1;s=!0,u=!1}if(p&&!u)return a||(a=new ed),s||Yl(e)?zp(e,t,r,n,i,a):Hp(e,t,l,r,n,i,a);if(!(1&r)){var f=u&&tf.call(e,"__wrapped__"),h=d&&tf.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return a||(a=new ed),i(m,g,r,n,a)}}return!!p&&(a||(a=new ed),Jp(e,t,r,n,i,a))}ze(rf,"baseIsEqualDeep");var nf=rf;function af(e,t,r,n,i){return e===t||(null==e||null==t||!bs(e)&&!bs(t)?e!=e&&t!=t:nf(e,t,r,n,af,i))}ze(af,"baseIsEqual");var sf=af;function of(e,t,r,n){var i=r.length,a=i,s=!n;if(null==e)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){var l=(o=r[i])[0],c=e[l],u=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var d=new ed;if(n)var p=n(c,u,l,e,t,d);if(!(void 0===p?sf(u,c,3,n,d):p))return!1}}return!0}ze(of,"baseIsMatch");var lf=of;function cf(e){return e==e&&!Fs(e)}ze(cf,"isStrictComparable");var uf=cf;function df(e){for(var t=sc(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,uf(i)]}return t}ze(df,"getMatchData");var pf=df;function ff(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}ze(ff,"matchesStrictComparable");var hf=ff;function mf(e){var t=pf(e);return 1==t.length&&t[0][2]?hf(t[0][0],t[0][1]):function(r){return r===e||lf(r,e,t)}}ze(mf,"baseMatches");var gf=mf;function yf(e,t){return null!=e&&t in Object(e)}ze(yf,"baseHasIn");var vf=yf;function Tf(e,t,r){for(var n=-1,i=(t=bu(t,e)).length,a=!1;++n<i;){var s=Cu(t[n]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++n!=i?a:!!(i=null==e?0:e.length)&&hl(i)&&Qo(s,i)&&(ks(e)||_l(e))}ze(Tf,"hasPath");var Rf=Tf;function $f(e,t){return null!=e&&Rf(e,t,vf)}ze($f,"hasIn");var bf=$f;function Ef(e,t){return Tc(e)&&uf(t)?hf(Cu(e),t):function(r){var n=wu(r,e);return void 0===n&&n===t?bf(r,e):sf(t,n,3)}}ze(Ef,"baseMatchesProperty");var Cf=Ef;function Af(e){return function(t){return null==t?void 0:t[e]}}ze(Af,"baseProperty");var Sf=Af;function kf(e){return function(t){return Su(t,e)}}ze(kf,"basePropertyDeep");var wf=kf;function xf(e){return Tc(e)?Sf(Cu(e)):wf(e)}ze(xf,"property");var Nf=xf;function If(e){return"function"==typeof e?e:null==e?Qs:"object"==typeof e?ks(e)?Cf(e[0],e[1]):gf(e):Nf(e)}ze(If,"baseIteratee");var _f=If;function Pf(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i<a;){var s=e[i];t(n,s,r(s),e)}return n}ze(Pf,"arrayAggregator");var Df=Pf;function Of(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++i];if(!1===r(a[l],l,a))break}return t}}ze(Of,"createBaseFor");var Lf=Of();function Mf(e,t){return e&&Lf(e,t,sc)}ze(Mf,"baseForOwn");var jf=Mf;function Ff(e,t){return function(r,n){if(null==r)return r;if(!gl(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&!1!==n(s[a],a,s););return r}}ze(Ff,"createBaseEach");var zf=Ff(jf);function Gf(e,t,r,n){return zf(e,function(e,i,a){t(n,e,r(e),a)}),n}ze(Gf,"baseAggregator");var qf=Gf;function Kf(e,t){return function(r,n){var i=ks(r)?Df:qf,a=t?t():{};return i(r,e,_f(n,2),a)}}ze(Kf,"createAggregator");var Uf=Kf,Wf=Object.prototype,Bf=Wf.hasOwnProperty,Vf=pl(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&vl(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],s=mc(a),o=-1,l=s.length;++o<l;){var c=s[o],u=e[c];(void 0===u||rl(u,Wf[c])&&!Bf.call(e,c))&&(e[c]=a[c])}return e});function Hf(e){return bs(e)&&gl(e)}ze(Hf,"isArrayLikeObject");var Yf=Hf;function Xf(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}ze(Xf,"arrayIncludesWith");var Jf=Xf;function Qf(e,t,r,n){var i=-1,a=Yo,s=!0,o=e.length,l=[],c=t.length;if(!o)return l;r&&(t=Ss(t,Kl(r))),n?(a=Jf,s=!1):t.length>=200&&(a=jp,s=!1,t=new Dp(t));e:for(;++i<o;){var u=e[i],d=null==r?u:r(u);if(u=n||0!==u?u:0,s&&d==d){for(var p=c;p--;)if(t[p]===d)continue e;l.push(u)}else a(t,d,n)||l.push(u)}return l}ze(Qf,"baseDifference");var Zf=Qf,eh=pl(function(e,t){return Yf(e)?Zf(e,Ou(t,1,Yf,!0)):[]});function th(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}ze(th,"last");var rh=th;function nh(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Xs(t),zu(e,t<0?0:t,n)):[]}ze(nh,"drop");var ih=nh;function ah(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:Xs(t),zu(e,0,(t=n-t)<0?0:t)):[]}ze(ah,"dropRight");var sh=ah;function oh(e){return"function"==typeof e?e:Qs}ze(oh,"castFunction");var lh=oh;function ch(e,t){return(ks(e)?Fo:zf)(e,lh(t))}ze(ch,"forEach");var uh=ch;function dh(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}ze(dh,"arrayEvery");var ph=dh;function fh(e,t){var r=!0;return zf(e,function(e,n,i){return r=!!t(e,n,i)}),r}ze(fh,"baseEvery");var hh=fh;function mh(e,t,r){var n=ks(e)?ph:hh;return r&&vl(e,t,r)&&(t=void 0),n(e,_f(t,3))}ze(mh,"every");var gh=mh;function yh(e,t){var r=[];return zf(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}ze(yh,"baseFilter");var vh=yh;function Th(e,t){return(ks(e)?pd:vh)(e,_f(t,3))}ze(Th,"filter");var Rh=Th;function $h(e){return function(t,r,n){var i=Object(t);if(!gl(t)){var a=_f(r,3);t=sc(t),r=ze(function(e){return a(i[e],e,i)},"predicate")}var s=e(t,r,n);return s>-1?i[a?t[s]:s]:void 0}}ze($h,"createFind");var bh=$h,Eh=Math.max;function Ch(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:Xs(r);return i<0&&(i=Eh(n+i,0)),Go(e,_f(t,3),i)}ze(Ch,"findIndex");var Ah=bh(Ch);function Sh(e){return e&&e.length?e[0]:void 0}ze(Sh,"head");var kh=Sh;function wh(e,t){var r=-1,n=gl(e)?Array(e.length):[];return zf(e,function(e,i,a){n[++r]=t(e,i,a)}),n}ze(wh,"baseMap");var xh=wh;function Nh(e,t){return(ks(e)?Ss:xh)(e,_f(t,3))}ze(Nh,"map");var Ih=Nh;function _h(e,t){return Ou(Ih(e,t),1)}ze(_h,"flatMap");var Ph=_h,Dh=Object.prototype.hasOwnProperty,Oh=Uf(function(e,t,r){Dh.call(e,r)?e[r].push(t):el(e,r,[t])}),Lh=Object.prototype.hasOwnProperty;function Mh(e,t){return null!=e&&Lh.call(e,t)}ze(Mh,"baseHas");var jh=Mh;function Fh(e,t){return null!=e&&Rf(e,t,jh)}ze(Fh,"has");var zh=Fh;function Gh(e){return"string"==typeof e||!ks(e)&&bs(e)&&"[object String]"==Rs(e)}ze(Gh,"isString");var qh=Gh;function Kh(e,t){return Ss(t,function(t){return e[t]})}ze(Kh,"baseValues");var Uh=Kh;function Wh(e){return null==e?[]:Uh(e,sc(e))}ze(Wh,"values");var Bh=Wh,Vh=Math.max;function Hh(e,t,r,n){e=gl(e)?e:Bh(e),r=r&&!n?Xs(r):0;var i=e.length;return r<0&&(r=Vh(i+r,0)),qh(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Vo(e,t,r)>-1}ze(Hh,"includes");var Yh=Hh,Xh=Math.max;function Jh(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:Xs(r);return i<0&&(i=Xh(n+i,0)),Vo(e,t,i)}ze(Jh,"indexOf");var Qh=Jh,Zh=Object.prototype.hasOwnProperty;function em(e){if(null==e)return!0;if(gl(e)&&(ks(e)||"string"==typeof e||"function"==typeof e.splice||jl(e)||Yl(e)||_l(e)))return!e.length;var t=Kd(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(El(e))return!ic(e).length;for(var r in e)if(Zh.call(e,r))return!1;return!0}ze(em,"isEmpty");var tm=em;function rm(e){return bs(e)&&"[object RegExp]"==Rs(e)}ze(rm,"baseIsRegExp");var nm=rm,im=Vl&&Vl.isRegExp,am=im?Kl(im):nm;function sm(e){return void 0===e}ze(sm,"isUndefined");var om=sm;function lm(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ze(lm,"negate");var cm=lm;function um(e,t,r,n){if(!Fs(e))return e;for(var i=-1,a=(t=bu(t,e)).length,s=a-1,o=e;null!=o&&++i<a;){var l=Cu(t[i]),c=r;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(i!=s){var u=o[l];void 0===(c=n?n(u,l,o):void 0)&&(c=Fs(u)?u:Qo(t[i+1])?[]:{})}al(o,l,c),o=o[l]}return e}ze(um,"baseSet");var dm=um;function pm(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var s=t[n],o=Su(e,s);r(o,s)&&dm(a,bu(s,e),o)}return a}ze(pm,"basePickBy");var fm=pm;function hm(e,t){if(null==e)return{};var r=Ss(wd(e),function(e){return[e]});return t=_f(t),fm(e,r,function(e,r){return t(e,r[0])})}ze(hm,"pickBy");var mm=hm;function gm(e,t,r,n,i){return i(e,function(e,i,a){r=n?(n=!1,e):t(r,e,i,a)}),r}ze(gm,"baseReduce");var ym=gm;function vm(e,t,r){var n=ks(e)?qu:ym,i=arguments.length<3;return n(e,_f(t,4),r,i,zf)}ze(vm,"reduce");var Tm=vm;function Rm(e,t){return(ks(e)?pd:vh)(e,cm(_f(t,3)))}ze(Rm,"reject");var $m=Rm;function bm(e,t){var r;return zf(e,function(e,n,i){return!(r=t(e,n,i))}),!!r}ze(bm,"baseSome");var Em=bm;function Cm(e,t,r){var n=ks(e)?Lp:Em;return r&&vl(e,t,r)&&(t=void 0),n(e,_f(t,3))}ze(Cm,"some");var Am=Cm,Sm=Id&&1/Up(new Id([,-0]))[1]==1/0?function(e){return new Id(e)}:wo;function km(e,t,r){var n=-1,i=Yo,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=Jf;else if(a>=200){var c=t?null:Sm(e);if(c)return Up(c);s=!1,i=jp,l=new Dp}else l=t?[]:o;e:for(;++n<a;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,s&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),o.push(u)}else i(l,d,r)||(l!==o&&l.push(d),o.push(u))}return o}ze(km,"baseUniq");var wm=km;function xm(e){return e&&e.length?wm(e):[]}ze(xm,"uniq");var Nm=xm;function Im(e){console&&console.error&&console.error(`Error: ${e}`)}function _m(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function Pm(e){const t=(new Date).getTime(),r=e();return{time:(new Date).getTime()-t,value:r}}function Dm(e){function t(){}ze(t,"FakeConstructor"),t.prototype=e;const r=new t;function n(){return typeof r.bar}return ze(n,"fakeAccess"),n(),n(),e}function Om(e){return Lm(e)?e.LABEL:e.name}function Lm(e){return qh(e.LABEL)&&""!==e.LABEL}ze(Im,"PRINT_ERROR"),ze(_m,"PRINT_WARNING"),ze(Pm,"timer"),ze(Dm,"toFastProperties"),ze(Om,"tokenLabel"),ze(Lm,"hasTokenLabel");var Mm=class{static{ze(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),uh(this.definition,t=>{t.accept(e)})}},jm=class extends Mm{static{ze(this,"NonTerminal")}constructor(e){super([]),this.idx=1,lc(this,mm(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},Fm=class extends Mm{static{ze(this,"Rule")}constructor(e){super(e.definition),this.orgText="",lc(this,mm(e,e=>void 0!==e))}},zm=class extends Mm{static{ze(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,lc(this,mm(e,e=>void 0!==e))}},Gm=class extends Mm{static{ze(this,"Option")}constructor(e){super(e.definition),this.idx=1,lc(this,mm(e,e=>void 0!==e))}},qm=class extends Mm{static{ze(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,lc(this,mm(e,e=>void 0!==e))}},Km=class extends Mm{static{ze(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,lc(this,mm(e,e=>void 0!==e))}},Um=class extends Mm{static{ze(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,lc(this,mm(e,e=>void 0!==e))}},Wm=class extends Mm{static{ze(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,lc(this,mm(e,e=>void 0!==e))}},Bm=class extends Mm{static{ze(this,"Alternation")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,lc(this,mm(e,e=>void 0!==e))}},Vm=class{static{ze(this,"Terminal")}constructor(e){this.idx=1,lc(this,mm(e,e=>void 0!==e))}accept(e){e.visit(this)}};function Hm(e){return Ih(e,Ym)}function Ym(e){function t(e){return Ih(e,Ym)}if(ze(t,"convertDefinition"),e instanceof jm){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return qh(e.label)&&(t.label=e.label),t}if(e instanceof zm)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Gm)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof qm)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Km)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Ym(new Vm({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Wm)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Ym(new Vm({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Um)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Bm)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Vm){const t={type:"Terminal",name:e.terminalType.name,label:Om(e.terminalType),idx:e.idx};qh(e.label)&&(t.terminalLabel=e.label);const r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=am(r)?r.source:r),t}if(e instanceof Fm)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}ze(Hm,"serializeGrammar"),ze(Ym,"serializeProduction");var Xm=class{static{ze(this,"GAstVisitor")}visit(e){const t=e;switch(t.constructor){case jm:return this.visitNonTerminal(t);case zm:return this.visitAlternative(t);case Gm:return this.visitOption(t);case qm:return this.visitRepetitionMandatory(t);case Km:return this.visitRepetitionMandatoryWithSeparator(t);case Wm:return this.visitRepetitionWithSeparator(t);case Um:return this.visitRepetition(t);case Bm:return this.visitAlternation(t);case Vm:return this.visitTerminal(t);case Fm:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function Jm(e){return e instanceof zm||e instanceof Gm||e instanceof Um||e instanceof qm||e instanceof Km||e instanceof Wm||e instanceof Vm||e instanceof Fm}function Qm(e,t=[]){return!!(e instanceof Gm||e instanceof Um||e instanceof Wm)||(e instanceof Bm?Am(e.definition,e=>Qm(e,t)):!(e instanceof jm&&Yh(t,e))&&(e instanceof Mm&&(e instanceof jm&&t.push(e),gh(e.definition,e=>Qm(e,t)))))}function Zm(e){return e instanceof Bm}function eg(e){if(e instanceof jm)return"SUBRULE";if(e instanceof Gm)return"OPTION";if(e instanceof Bm)return"OR";if(e instanceof qm)return"AT_LEAST_ONE";if(e instanceof Km)return"AT_LEAST_ONE_SEP";if(e instanceof Wm)return"MANY_SEP";if(e instanceof Um)return"MANY";if(e instanceof Vm)return"CONSUME";throw Error("non exhaustive match")}ze(Jm,"isSequenceProd"),ze(Qm,"isOptionalProd"),ze(Zm,"isBranchingProd"),ze(eg,"getProductionDslName");var tg=class{static{ze(this,"RestWalker")}walk(e,t=[]){uh(e.definition,(r,n)=>{const i=ih(e.definition,n+1);if(r instanceof jm)this.walkProdRef(r,i,t);else if(r instanceof Vm)this.walkTerminal(r,i,t);else if(r instanceof zm)this.walkFlat(r,i,t);else if(r instanceof Gm)this.walkOption(r,i,t);else if(r instanceof qm)this.walkAtLeastOne(r,i,t);else if(r instanceof Km)this.walkAtLeastOneSep(r,i,t);else if(r instanceof Wm)this.walkManySep(r,i,t);else if(r instanceof Um)this.walkMany(r,i,t);else{if(!(r instanceof Bm))throw Error("non exhaustive match");this.walkOr(r,i,t)}})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){const n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){const n=[new Gm({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){const n=rg(e,t,r);this.walk(e,n)}walkMany(e,t,r){const n=[new Gm({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){const n=rg(e,t,r);this.walk(e,n)}walkOr(e,t,r){const n=t.concat(r);uh(e.definition,e=>{const t=new zm({definition:[e]});this.walk(t,n)})}};function rg(e,t,r){return[new Gm({definition:[new Vm({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function ng(e){if(e instanceof jm)return ng(e.referencedRule);if(e instanceof Vm)return sg(e);if(Jm(e))return ig(e);if(Zm(e))return ag(e);throw Error("non exhaustive match")}function ig(e){let t=[];const r=e.definition;let n,i=0,a=r.length>i,s=!0;for(;a&&s;)n=r[i],s=Qm(n),t=t.concat(ng(n)),i+=1,a=r.length>i;return Nm(t)}function ag(e){const t=Ih(e.definition,e=>ng(e));return Nm(Mu(t))}function sg(e){return[e.terminalType]}ze(rg,"restForRepetitionWithSeparator"),ze(ng,"first"),ze(ig,"firstForSequence"),ze(ag,"firstForBranching"),ze(sg,"firstForTerminal");var og="_~IN~_",lg=class extends tg{static{ze(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const n=ug(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(r),a=ng(new zm({definition:i}));this.follows[n]=a}};function cg(e){const t={};return uh(e,e=>{const r=new lg(e).startWalking();lc(t,r)}),t}function ug(e,t){return e.name+t+og}ze(cg,"computeAllProdsFollows"),ze(ug,"buildBetweenProdsFollowPrefix");var dg={},pg=new sa;function fg(e){const t=e.toString();if(dg.hasOwnProperty(t))return dg[t];{const e=pg.pattern(t);return dg[t]=e,e}}function hg(){dg={}}ze(fg,"getRegExpAst"),ze(hg,"clearRegExpParserCache");var mg="Complement Sets are not supported for first char optimization",gg='Unable to use "first char" lexer optimizations:\n';function yg(e,t=!1){try{const t=fg(e);return vg(t.value,{},t.flags.ignoreCase)}catch(r){if(r.message===mg)t&&_m(`${gg}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";t&&(r="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Im(`${gg}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function vg(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)vg(e.value[i],t,r);break;case"Alternative":const n=e.value;for(let e=0;e<n.length;e++){const i=n[e];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"Lookbehind":case"NegativeLookbehind":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}const a=i;switch(a.type){case"Character":Tg(a.value,t,r);break;case"Set":if(!0===a.complement)throw Error(mg);uh(a.value,e=>{if("number"==typeof e)Tg(e,t,r);else{const n=e;if(!0===r)for(let e=n.from;e<=n.to;e++)Tg(e,t,r);else{for(let e=n.from;e<=n.to&&e<ay;e++)Tg(e,t,r);if(n.to>=ay){const e=n.from>=ay?n.from:ay,r=n.to,i=oy(e),a=oy(r);for(let n=i;n<=a;n++)t[n]=n}}}});break;case"Group":vg(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}const s=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===bg(a)||"Group"!==a.type&&!1===s)break}break;default:throw Error("non exhaustive match!")}return Bh(t)}function Tg(e,t,r){const n=oy(e);t[n]=n,!0===r&&Rg(e,t)}function Rg(e,t){const r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){const e=oy(n.charCodeAt(0));t[e]=e}else{const e=r.toLowerCase();if(e!==r){const r=oy(e.charCodeAt(0));t[r]=r}}}function $g(e,t){return Ah(e.value,e=>{if("number"==typeof e)return Yh(t,e);{const r=e;return void 0!==Ah(t,e=>r.from<=e&&e<=r.to)}})}function bg(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(ks(e.value)?gh(e.value,bg):bg(e.value))}ze(yg,"getOptimizedStartCodesIndices"),ze(vg,"firstCharOptimizedIndices"),ze(Tg,"addOptimizedIdxToResult"),ze(Rg,"handleIgnoreCase"),ze($g,"findCode"),ze(bg,"isWholeOptional");var Eg=class extends oa{static{ze(this,"CharCodeFinder")}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){Yh(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===$g(e,this.targetCharCodes)&&(this.found=!0):void 0!==$g(e,this.targetCharCodes)&&(this.found=!0)}};function Cg(e,t){if(t instanceof RegExp){const r=fg(t),n=new Eg(e);return n.visit(r),n.found}return void 0!==Ah(t,t=>Yh(e,t.charCodeAt(0)))}ze(Cg,"canMatchCharCode");var Ag="PATTERN",Sg="defaultMode",kg="modes",wg="boolean"==typeof new RegExp("(?:)").sticky;function xg(e,t){const r=(t=Vf(t,{useSticky:wg,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:ze((e,t)=>t(),"tracer")})).tracer;let n;r("initCharCodeToOptimizedIndexMap",()=>{ly()}),r("Reject Lexer.NA",()=>{n=$m(e,e=>e[Ag]===wy.NA)});let i,a,s,o,l,c,u,d,p,f,h,m=!1;r("Transform Patterns",()=>{m=!1,i=Ih(n,e=>{const r=e[Ag];if(am(r)){const e=r.source;return 1!==e.length||"^"===e||"$"===e||"."===e||r.ignoreCase?2!==e.length||"\\"!==e[0]||Yh(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?Hg(r):Vg(r):e[1]:e}if(to(r))return m=!0,{exec:r};if("object"==typeof r)return m=!0,r;if("string"==typeof r){if(1===r.length)return r;{const e=r.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),n=new RegExp(e);return t.useSticky?Hg(n):Vg(n)}}throw Error("non exhaustive match")})}),r("misc mapping",()=>{a=Ih(n,e=>e.tokenTypeIdx),s=Ih(n,e=>{const t=e.GROUP;if(t!==wy.SKIPPED){if(qh(t))return t;if(om(t))return!1;throw Error("non exhaustive match")}}),o=Ih(n,e=>{const t=e.LONGER_ALT;if(t){return ks(t)?Ih(t,e=>Qh(n,e)):[Qh(n,t)]}}),l=Ih(n,e=>e.PUSH_MODE),c=Ih(n,e=>zh(e,"POP_MODE"))}),r("Line Terminator Handling",()=>{const e=ny(t.lineTerminatorCharacters);u=Ih(n,e=>!1),"onlyOffset"!==t.positionTracking&&(u=Ih(n,t=>zh(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===ty(t,e)&&Cg(e,t.PATTERN)))}),r("Misc Mapping #2",()=>{d=Ih(n,Qg),p=Ih(i,Zg),f=Tm(n,(e,t)=>{const r=t.GROUP;return qh(r)&&r!==wy.SKIPPED&&(e[r]=[]),e},{}),h=Ih(i,(e,t)=>({pattern:i[t],longerAlt:o[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:s[t],push:l[t],pop:c[t],tokenTypeIdx:a[t],tokenType:n[t]}))});let g=!0,y=[];return t.safeMode||r("First Char Optimization",()=>{y=Tm(n,(e,r,n)=>{if("string"==typeof r.PATTERN){const t=oy(r.PATTERN.charCodeAt(0));iy(e,t,h[n])}else if(ks(r.START_CHARS_HINT)){let t;uh(r.START_CHARS_HINT,r=>{const i=oy("string"==typeof r?r.charCodeAt(0):r);t!==i&&(t=i,iy(e,i,h[n]))})}else if(am(r.PATTERN))if(r.PATTERN.unicode)g=!1,t.ensureOptimizations&&Im(`${gg}\tUnable to analyze < ${r.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=yg(r.PATTERN,t.ensureOptimizations);tm(i)&&(g=!1),uh(i,t=>{iy(e,t,h[n])})}else t.ensureOptimizations&&Im(`${gg}\tTokenType: <${r.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:h,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}function Ng(e,t){let r=[];const n=_g(e);r=r.concat(n.errors);const i=Pg(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(Ig(a)),r=r.concat(Gg(a)),r=r.concat(qg(a,t)),r=r.concat(Kg(a)),r}function Ig(e){let t=[];const r=Rh(e,e=>am(e[Ag]));return t=t.concat(Og(r)),t=t.concat(jg(r)),t=t.concat(Fg(r)),t=t.concat(zg(r)),t=t.concat(Lg(r)),t}function _g(e){const t=Rh(e,e=>!zh(e,Ag));return{errors:Ih(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Cy.MISSING_PATTERN,tokenTypes:[e]})),valid:eh(e,t)}}function Pg(e){const t=Rh(e,e=>{const t=e[Ag];return!(am(t)||to(t)||zh(t,"exec")||qh(t))});return{errors:Ih(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Cy.INVALID_PATTERN,tokenTypes:[e]})),valid:eh(e,t)}}ze(xg,"analyzeTokenTypes"),ze(Ng,"validatePatterns"),ze(Ig,"validateRegExpPattern"),ze(_g,"findMissingPatterns"),ze(Pg,"findInvalidPatterns");var Dg=/[^\\][$]/;function Og(e){class t extends oa{static{ze(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const r=Rh(e,e=>{const r=e.PATTERN;try{const e=fg(r),n=new t;return n.visit(e),n.found}catch(n){return Dg.test(r.source)}});return Ih(r,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Cy.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Lg(e){const t=Rh(e,e=>e.PATTERN.test(""));return Ih(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Cy.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}ze(Og,"findEndOfInputAnchor"),ze(Lg,"findEmptyMatchRegExps");var Mg=/[^\\[][\^]|^\^/;function jg(e){class t extends oa{static{ze(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const r=Rh(e,e=>{const r=e.PATTERN;try{const e=fg(r),n=new t;return n.visit(e),n.found}catch(n){return Mg.test(r.source)}});return Ih(r,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Cy.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Fg(e){const t=Rh(e,e=>{const t=e[Ag];return t instanceof RegExp&&(t.multiline||t.global)});return Ih(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Cy.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function zg(e){const t=[];let r=Ih(e,r=>Tm(e,(e,n)=>(r.PATTERN.source!==n.PATTERN.source||Yh(t,n)||n.PATTERN===wy.NA||(t.push(n),e.push(n)),e),[]));r=wp(r);const n=Rh(r,e=>e.length>1);return Ih(n,e=>{const t=Ih(e,e=>e.name);return{message:`The same RegExp pattern ->${kh(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Cy.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Gg(e){const t=Rh(e,e=>{if(!zh(e,"GROUP"))return!1;const t=e.GROUP;return t!==wy.SKIPPED&&t!==wy.NA&&!qh(t)});return Ih(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Cy.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function qg(e,t){const r=Rh(e,e=>void 0!==e.PUSH_MODE&&!Yh(t,e.PUSH_MODE));return Ih(r,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Cy.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Kg(e){const t=[],r=Tm(e,(e,t,r)=>{const n=t.PATTERN;return n===wy.NA||(qh(n)?e.push({str:n,idx:r,tokenType:t}):am(n)&&Wg(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return uh(e,(e,n)=>{uh(r,({str:r,idx:i,tokenType:a})=>{if(n<i&&Ug(r,e.PATTERN)){const r=`Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:r,type:Cy.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function Ug(e,t){if(am(t)){if(Bg(t))return!1;const r=t.exec(e);return null!==r&&0===r.index}if(to(t))return t(e,0,[],{});if(zh(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Wg(e){return void 0===Ah([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function Bg(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function Vg(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function Hg(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function Yg(e,t,r){const n=[];return zh(e,Sg)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Sg+"> property in its definition\n",type:Cy.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),zh(e,kg)||n.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:Cy.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),zh(e,kg)&&zh(e,Sg)&&!zh(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${Sg}: <${e.defaultMode}>which does not exist\n`,type:Cy.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),zh(e,kg)&&uh(e.modes,(e,t)=>{uh(e,(r,i)=>{if(om(r))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,type:Cy.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(zh(r,"LONGER_ALT")){const i=ks(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];uh(i,i=>{om(i)||Yh(e,i)||n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${t}>\n`,type:Cy.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function Xg(e,t,r){const n=[];let i=!1;const a=wp(Mu(Bh(e.modes))),s=$m(a,e=>e[Ag]===wy.NA),o=ny(r);return t&&uh(s,e=>{const t=ty(e,o);if(!1!==t){const r={message:ry(e,t),type:t.issue,tokenType:e};n.push(r)}else zh(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Cg(o,e.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Cy.NO_LINE_BREAKS_FLAGS}),n}function Jg(e){const t={},r=sc(e);return uh(r,r=>{const n=e[r];if(!ks(n))throw Error("non exhaustive match");t[r]=[]}),t}function Qg(e){const t=e.PATTERN;if(am(t))return!1;if(to(t))return!0;if(zh(t,"exec"))return!0;if(qh(t))return!1;throw Error("non exhaustive match")}function Zg(e){return!(!qh(e)||1!==e.length)&&e.charCodeAt(0)}ze(jg,"findStartOfInputAnchor"),ze(Fg,"findUnsupportedFlags"),ze(zg,"findDuplicatePatterns"),ze(Gg,"findInvalidGroupType"),ze(qg,"findModesThatDoNotExist"),ze(Kg,"findUnreachablePatterns"),ze(Ug,"tryToMatchStrToPattern"),ze(Wg,"noMetaChar"),ze(Bg,"usesLookAheadOrBehind"),ze(Vg,"addStartOfInput"),ze(Hg,"addStickyFlag"),ze(Yg,"performRuntimeChecks"),ze(Xg,"performWarningRuntimeChecks"),ze(Jg,"cloneEmptyGroups"),ze(Qg,"isCustomPattern"),ze(Zg,"isShortPattern");var ey={test:ze(function(e){const t=e.length;for(let r=this.lastIndex;r<t;r++){const t=e.charCodeAt(r);if(10===t)return this.lastIndex=r+1,!0;if(13===t)return 10===e.charCodeAt(r+1)?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function ty(e,t){if(zh(e,"LINE_BREAKS"))return!1;if(am(e.PATTERN)){try{Cg(t,e.PATTERN)}catch(r){return{issue:Cy.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}if(qh(e.PATTERN))return!1;if(Qg(e))return{issue:Cy.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function ry(e,t){if(t.issue===Cy.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Cy.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ny(e){return Ih(e,e=>qh(e)?e.charCodeAt(0):e)}function iy(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}ze(ty,"checkLineBreaksIssues"),ze(ry,"buildLineBreakIssueMessage"),ze(ny,"getCharCodes"),ze(iy,"addToMapOfArrays");var ay=256,sy=[];function oy(e){return e<ay?e:sy[e]}function ly(){if(tm(sy)){sy=new Array(65536);for(let e=0;e<65536;e++)sy[e]=e>255?255+~~(e/255):e}}function cy(e,t){const r=e.tokenTypeIdx;return r===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[r]}function uy(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}ze(oy,"charCodeToOptimizedIndex"),ze(ly,"initCharCodeToOptimizedIndexMap"),ze(cy,"tokenStructuredMatcher"),ze(uy,"tokenStructuredMatcherNoCategories");var dy=1,py={};function fy(e){const t=hy(e);my(t),yy(t),gy(t),uh(t,e=>{e.isParent=e.categoryMatches.length>0})}function hy(e){let t=Sp(e),r=e,n=!0;for(;n;){r=wp(Mu(Ih(r,e=>e.CATEGORIES)));const e=eh(r,t);t=t.concat(e),tm(e)?n=!1:r=e}return t}function my(e){uh(e,e=>{Ty(e)||(py[dy]=e,e.tokenTypeIdx=dy++),Ry(e)&&!ks(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Ry(e)||(e.CATEGORIES=[]),$y(e)||(e.categoryMatches=[]),by(e)||(e.categoryMatchesMap={})})}function gy(e){uh(e,e=>{e.categoryMatches=[],uh(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(py[r].tokenTypeIdx)})})}function yy(e){uh(e,e=>{vy([],e)})}function vy(e,t){uh(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),uh(t.CATEGORIES,r=>{const n=e.concat(t);Yh(n,r)||vy(n,r)})}function Ty(e){return zh(e,"tokenTypeIdx")}function Ry(e){return zh(e,"CATEGORIES")}function $y(e){return zh(e,"categoryMatches")}function by(e){return zh(e,"categoryMatchesMap")}function Ey(e){return zh(e,"tokenTypeIdx")}ze(fy,"augmentTokenTypes"),ze(hy,"expandCategories"),ze(my,"assignTokenDefaultProps"),ze(gy,"assignCategoriesTokensProp"),ze(yy,"assignCategoriesMapProp"),ze(vy,"singleAssignCategoriesToksMap"),ze(Ty,"hasShortKeyProperty"),ze(Ry,"hasCategoriesProperty"),ze($y,"hasExtendingTokensTypesProperty"),ze(by,"hasExtendingTokensTypesMapProperty"),ze(Ey,"isTokenType");var Cy,Ay,Sy={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,r,n,i,a)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`};(Ay=Cy||(Cy={}))[Ay.MISSING_PATTERN=0]="MISSING_PATTERN",Ay[Ay.INVALID_PATTERN=1]="INVALID_PATTERN",Ay[Ay.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",Ay[Ay.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",Ay[Ay.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",Ay[Ay.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",Ay[Ay.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",Ay[Ay.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",Ay[Ay.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",Ay[Ay.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",Ay[Ay.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",Ay[Ay.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",Ay[Ay.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",Ay[Ay.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",Ay[Ay.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",Ay[Ay.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",Ay[Ay.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",Ay[Ay.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";var ky={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Sy,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ky);var wy=class{static{ze(this,"Lexer")}constructor(e,t=ky){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--\x3e <${e}>`);const{time:n,value:i}=Pm(t),a=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=lc({},ky,t);const r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ky.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ey;else if(this.config.lineTerminatorCharacters===ky.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),ks(e)?r={modes:{defaultMode:Sp(e)},defaultMode:Sg}:(n=!1,r=Sp(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Yg(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Xg(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes?r.modes:{},uh(r.modes,(e,t)=>{r.modes[t]=$m(e,e=>om(e))});const i=sc(r.modes);if(uh(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Ng(e,i))}),tm(this.lexerDefinitionErrors)){let n;fy(e),this.TRACE_INIT("analyzeTokenTypes",()=>{n=xg(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=n.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=n.charCodeToPatternIdxToConfig,this.emptyGroups=lc({},this.emptyGroups,n.emptyGroups),this.hasCustom=n.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=n.canBeOptimized}})}),this.defaultMode=r.defaultMode,!tm(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=Ih(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}uh(this.lexerDefinitionWarning,e=>{_m(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(wg?(this.chopInput=Qs,this.match=this.matchWithTest):(this.updateLastIndex=wo,this.match=this.matchWithExec),n&&(this.handleModes=wo),!1===this.trackStartLines&&(this.computeNewColumn=Qs),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=wo),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=Tm(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(t.ensureOptimizations&&!tm(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{hg()}),this.TRACE_INIT("toFastProperties",()=>{Dm(this)})})}tokenize(e,t=this.defaultMode){if(!tm(this.lexerDefinitionErrors)){const e=Ih(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,i,a,s,o,l,c,u,d,p,f,h,m,g;const y=e,v=y.length;let T=0,R=0;const $=this.hasCustom?0:Math.floor(e.length/10),b=new Array($),E=[];let C=this.trackStartLines?1:void 0,A=this.trackStartLines?1:void 0;const S=Jg(this.emptyGroups),k=this.trackStartLines,w=this.config.lineTerminatorsPattern;let x=0,N=[],I=[];const _=[],P=[];let D;function O(){return N}function L(e){const t=oy(e),r=I[t];return void 0===r?P:r}Object.freeze(P),ze(O,"getPossiblePatternsSlow"),ze(L,"getPossiblePatternsOptimized");const M=ze(e=>{if(1===_.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);E.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{_.pop();const e=rh(_);N=this.patternIdxToConfig[e],I=this.charCodeToPatternIdxToConfig[e],x=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=I&&t?L:O}},"pop_mode");function j(e){_.push(e),I=this.charCodeToPatternIdxToConfig[e],N=this.patternIdxToConfig[e],x=N.length,x=N.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=I&&t?L:O}let F;ze(j,"push_mode"),j.call(this,t);const z=this.config.recoveryEnabled;for(;T<v;){o=null;const t=y.charCodeAt(T),$=D(t),I=$.length;for(r=0;r<I;r++){F=$[r];const n=F.pattern;l=null;const u=F.short;if(!1!==u?t===u&&(o=n):!0===F.isCustom?(g=n.exec(y,T,b,S),null!==g?(o=g[0],void 0!==g.payload&&(l=g.payload)):o=null):(this.updateLastIndex(n,T),o=this.match(n,e,T)),null!==o){if(s=F.longerAlt,void 0!==s){const t=s.length;for(i=0;i<t;i++){const t=N[s[i]],r=t.pattern;if(c=null,!0===t.isCustom?(g=r.exec(y,T,b,S),null!==g?(a=g[0],void 0!==g.payload&&(c=g.payload)):a=null):(this.updateLastIndex(r,T),a=this.match(r,e,T)),a&&a.length>o.length){o=a,l=c,F=t;break}}}break}}if(null!==o){if(u=o.length,d=F.group,void 0!==d&&(p=F.tokenTypeIdx,f=this.createTokenInstance(o,T,p,F.tokenType,C,A,u),this.handlePayload(f,l),!1===d?R=this.addToken(b,R,f):S[d].push(f)),e=this.chopInput(e,u),T+=u,A=this.computeNewColumn(A,u),!0===k&&!0===F.canLineTerminator){let e,t,r=0;w.lastIndex=0;do{e=w.test(o),!0===e&&(t=w.lastIndex-1,r++)}while(!0===e);0!==r&&(C+=r,A=u-t,this.updateTokenEndLineColumnLocation(f,d,t,r,C,A,u))}this.handleModes(F,M,j,f)}else{const t=T,r=C,i=A;let a=!1===z;for(;!1===a&&T<v;)for(e=this.chopInput(e,1),T++,n=0;n<x;n++){const t=N[n],r=t.pattern,i=t.short;if(!1!==i?y.charCodeAt(T)===i&&(a=!0):!0===t.isCustom?a=null!==r.exec(y,T,b,S):(this.updateLastIndex(r,T),a=null!==r.exec(e)),!0===a)break}if(h=T-t,A=this.computeNewColumn(A,h),m=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,t,h,r,i,rh(_)),E.push({offset:t,line:r,column:i,length:h,message:m}),!1===z)break}}return this.hasCustom||(b.length=R),{tokens:b,groups:S,errors:E}}handleModes(e,t,r,n){if(!0===e.pop){const i=e.push;t(n),void 0!==i&&r.call(this,i)}else void 0!==e.push&&r.call(this,e.push)}chopInput(e,t){return e.substring(t)}updateLastIndex(e,t){e.lastIndex=t}updateTokenEndLineColumnLocation(e,t,r,n,i,a,s){let o,l;void 0!==t&&(o=r===s-1,l=o?-1:0,1===n&&!0===o||(e.endLine=i+l,e.endColumn=a-1-l))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,r,n){return{image:e,startOffset:t,tokenTypeIdx:r,tokenType:n}}createStartOnlyToken(e,t,r,n,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:r,tokenType:n}}createFullToken(e,t,r,n,i,a,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:r,tokenType:n}}addTokenUsingPush(e,t,r){return e.push(r),t}addTokenUsingMemberAccess(e,t,r){return e[t]=r,++t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){null!==t&&(e.payload=t)}matchWithTest(e,t,r){return!0===e.test(t)?t.substring(r,e.lastIndex):null}matchWithExec(e,t){const r=e.exec(t);return null!==r?r[0]:null}};function xy(e){return Ny(e)?e.LABEL:e.name}function Ny(e){return qh(e.LABEL)&&""!==e.LABEL}wy.SKIPPED="This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",wy.NA=/NOT_APPLICABLE/,ze(xy,"tokenLabel"),ze(Ny,"hasTokenLabel");var Iy="categories",_y="label",Py="group",Dy="push_mode",Oy="pop_mode",Ly="longer_alt",My="line_breaks",jy="start_chars_hint";function Fy(e){return zy(e)}function zy(e){const t=e.pattern,r={};if(r.name=e.name,om(t)||(r.PATTERN=t),zh(e,"parent"))throw"The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";return zh(e,Iy)&&(r.CATEGORIES=e[Iy]),fy([r]),zh(e,_y)&&(r.LABEL=e[_y]),zh(e,Py)&&(r.GROUP=e[Py]),zh(e,Oy)&&(r.POP_MODE=e[Oy]),zh(e,Dy)&&(r.PUSH_MODE=e[Dy]),zh(e,Ly)&&(r.LONGER_ALT=e[Ly]),zh(e,My)&&(r.LINE_BREAKS=e[My]),zh(e,jy)&&(r.START_CHARS_HINT=e[jy]),r}ze(Fy,"createToken"),ze(zy,"createTokenInternal");var Gy=Fy({name:"EOF",pattern:wy.NA});function qy(e,t,r,n,i,a,s,o){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:s,endColumn:o,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ky(e,t){return cy(e,t)}fy([Gy]),ze(qy,"createTokenInstance"),ze(Ky,"tokenMatcher");var Uy={buildMismatchTokenMessage:({expected:e,actual:t,previous:r,ruleName:n})=>`Expecting ${Ny(e)?`--\x3e ${xy(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){const a="Expecting: ",s="\nbut found: '"+kh(t).image+"'";if(n)return a+n+s;{const t=Tm(e,(e,t)=>e.concat(t),[]),r=Ih(t,e=>`[${Ih(e,e=>xy(e)).join(", ")}]`);return a+`one of these possible Token sequences:\n${Ih(r,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){const i="Expecting: ",a="\nbut found: '"+kh(t).image+"'";if(r)return i+r+a;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${Ih(e,e=>`[${Ih(e,e=>xy(e)).join(",")}]`).join(" ,")}>`+a}};Object.freeze(Uy);var Wy={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},By={buildDuplicateFoundError(e,t){function r(e){return e instanceof Vm?e.terminalType.name:e instanceof jm?e.nonTerminalName:""}ze(r,"getExtraProductionArgument");const n=e.name,i=kh(t),a=i.idx,s=eg(i),o=r(i);let l=`->${s}${a>0?a:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=Ih(e.prefixPath,e=>xy(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=Ih(e.prefixPath,e=>xy(e)).join(", "),r=0===e.alternation.idx?"":e.alternation.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n},buildEmptyRepetitionError(e){let t=eg(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${Ih(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof Fm?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Vy(e,t){const r=new Xy(e,t);return r.resolveRefs(),r.errors}ze(Vy,"resolveGrammar");var Hy,Yy,Xy=class extends Xm{static{ze(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){uh(Bh(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:HT.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Jy=class extends tg{static{ze(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Sp(this.path.ruleStack).reverse(),this.occurrenceStack=Sp(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){tm(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Qy=class extends Jy{static{ze(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(r),n=new zm({definition:e});this.possibleTokTypes=ng(n),this.found=!0}}},Zy=class extends tg{static{ze(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ev=class extends Zy{static{ze(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){const e=kh(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vm&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,r)}},tv=class extends Zy{static{ze(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){const e=kh(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vm&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,r)}},rv=class extends Zy{static{ze(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const e=kh(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vm&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,r)}},nv=class extends Zy{static{ze(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const e=kh(t.concat(r));this.result.isEndOfRule=void 0===e,e instanceof Vm&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,r)}};function iv(e,t,r=[]){r=Sp(r);let n=[],i=0;function a(t){return t.concat(ih(e,i+1))}function s(e){const i=iv(a(e),t,r);return n.concat(i)}for(ze(a,"remainingPathWith"),ze(s,"getAlternativesForProd");r.length<t&&i<e.length;){const t=e[i];if(t instanceof zm)return s(t.definition);if(t instanceof jm)return s(t.definition);if(t instanceof Gm)n=s(t.definition);else{if(t instanceof qm){return s(t.definition.concat([new Um({definition:t.definition})]))}if(t instanceof Km){return s([new zm({definition:t.definition}),new Um({definition:[new Vm({terminalType:t.separator})].concat(t.definition)})])}if(t instanceof Wm){const e=t.definition.concat([new Um({definition:[new Vm({terminalType:t.separator})].concat(t.definition)})]);n=s(e)}else if(t instanceof Um){const e=t.definition.concat([new Um({definition:t.definition})]);n=s(e)}else{if(t instanceof Bm)return uh(t.definition,e=>{!1===tm(e.definition)&&(n=s(e.definition))}),n;if(!(t instanceof Vm))throw Error("non exhaustive match");r.push(t.terminalType)}}i++}return n.push({partialPath:r,suffixDef:ih(e,i)}),n}function av(e,t,r,n){const i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE";let o=!1;const l=t.length,c=l-n-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!tm(d);){const e=d.pop();if(e===s){o&&rh(d).idx<=c&&d.pop();continue}const n=e.def,p=e.idx,f=e.ruleStack,h=e.occurrenceStack;if(tm(n))continue;const m=n[0];if(m===i){const e={idx:p,def:ih(n),ruleStack:sh(f),occurrenceStack:sh(h)};d.push(e)}else if(m instanceof Vm)if(p<l-1){const e=p+1;if(r(t[e],m.terminalType)){const t={idx:e,def:ih(n),ruleStack:f,occurrenceStack:h};d.push(t)}}else{if(p!==l-1)throw Error("non exhaustive match");u.push({nextTokenType:m.terminalType,nextTokenOccurrence:m.idx,ruleStack:f,occurrenceStack:h}),o=!0}else if(m instanceof jm){const e=Sp(f);e.push(m.nonTerminalName);const t=Sp(h);t.push(m.idx);const r={idx:p,def:m.definition.concat(a,ih(n)),ruleStack:e,occurrenceStack:t};d.push(r)}else if(m instanceof Gm){const e={idx:p,def:ih(n),ruleStack:f,occurrenceStack:h};d.push(e),d.push(s);const t={idx:p,def:m.definition.concat(ih(n)),ruleStack:f,occurrenceStack:h};d.push(t)}else if(m instanceof qm){const e=new Um({definition:m.definition,idx:m.idx}),t={idx:p,def:m.definition.concat([e],ih(n)),ruleStack:f,occurrenceStack:h};d.push(t)}else if(m instanceof Km){const e=new Vm({terminalType:m.separator}),t=new Um({definition:[e].concat(m.definition),idx:m.idx}),r={idx:p,def:m.definition.concat([t],ih(n)),ruleStack:f,occurrenceStack:h};d.push(r)}else if(m instanceof Wm){const e={idx:p,def:ih(n),ruleStack:f,occurrenceStack:h};d.push(e),d.push(s);const t=new Vm({terminalType:m.separator}),r=new Um({definition:[t].concat(m.definition),idx:m.idx}),i={idx:p,def:m.definition.concat([r],ih(n)),ruleStack:f,occurrenceStack:h};d.push(i)}else if(m instanceof Um){const e={idx:p,def:ih(n),ruleStack:f,occurrenceStack:h};d.push(e),d.push(s);const t=new Um({definition:m.definition,idx:m.idx}),r={idx:p,def:m.definition.concat([t],ih(n)),ruleStack:f,occurrenceStack:h};d.push(r)}else if(m instanceof Bm)for(let t=m.definition.length-1;t>=0;t--){const e={idx:p,def:m.definition[t].definition.concat(ih(n)),ruleStack:f,occurrenceStack:h};d.push(e),d.push(s)}else if(m instanceof zm)d.push({idx:p,def:m.definition.concat(ih(n)),ruleStack:f,occurrenceStack:h});else{if(!(m instanceof Fm))throw Error("non exhaustive match");d.push(sv(m,p,f,h))}}return u}function sv(e,t,r,n){const i=Sp(r);i.push(e.name);const a=Sp(n);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function ov(e){if(e instanceof Gm||"Option"===e)return Hy.OPTION;if(e instanceof Um||"Repetition"===e)return Hy.REPETITION;if(e instanceof qm||"RepetitionMandatory"===e)return Hy.REPETITION_MANDATORY;if(e instanceof Km||"RepetitionMandatoryWithSeparator"===e)return Hy.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Wm||"RepetitionWithSeparator"===e)return Hy.REPETITION_WITH_SEPARATOR;if(e instanceof Bm||"Alternation"===e)return Hy.ALTERNATION;throw Error("non exhaustive match")}function lv(e){const{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,a=ov(n);return a===Hy.ALTERNATION?Tv(t,r,i):Rv(t,r,a,i)}function cv(e,t,r,n,i,a){const s=Tv(e,t,r);return a(s,n,Ev(s)?uy:cy,i)}function uv(e,t,r,n,i,a){const s=Rv(e,t,i,r),o=Ev(s)?uy:cy;return a(s[0],o,n)}function dv(e,t,r,n){const i=e.length,a=gh(e,e=>gh(e,e=>1===e.length));if(t)return function(t){const n=Ih(t,e=>e.GATE);for(let a=0;a<i;a++){const t=e[a],i=t.length,s=n[a];if(void 0===s||!1!==s.call(this))e:for(let e=0;e<i;e++){const n=t[e],i=n.length;for(let e=0;e<i;e++){const t=this.LA(e+1);if(!1===r(t,n[e]))continue e}return a}}};if(a&&!n){const t=Ih(e,e=>Mu(e)),r=Tm(t,(e,t,r)=>(uh(t,t=>{zh(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),uh(t.categoryMatches,t=>{zh(e,t)||(e[t]=r)})}),e),{});return function(){const e=this.LA(1);return r[e.tokenTypeIdx]}}return function(){for(let t=0;t<i;t++){const n=e[t],i=n.length;e:for(let e=0;e<i;e++){const i=n[e],a=i.length;for(let e=0;e<a;e++){const t=this.LA(e+1);if(!1===r(t,i[e]))continue e}return t}}}}function pv(e,t,r){const n=gh(e,e=>1===e.length),i=e.length;if(n&&!r){const t=Mu(e);if(1===t.length&&tm(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=Tm(t,(e,t,r)=>(e[t.tokenTypeIdx]=!0,uh(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let r=0;r<i;r++){const n=e[r],i=n.length;for(let e=0;e<i;e++){const r=this.LA(e+1);if(!1===t(r,n[e]))continue e}return!0}return!1}}ze(iv,"possiblePathsFrom"),ze(av,"nextPossibleTokensAfter"),ze(sv,"expandTopLevelRule"),(Yy=Hy||(Hy={}))[Yy.OPTION=0]="OPTION",Yy[Yy.REPETITION=1]="REPETITION",Yy[Yy.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",Yy[Yy.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",Yy[Yy.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",Yy[Yy.ALTERNATION=5]="ALTERNATION",ze(ov,"getProdType"),ze(lv,"getLookaheadPaths"),ze(cv,"buildLookaheadFuncForOr"),ze(uv,"buildLookaheadFuncForOptionalProd"),ze(dv,"buildAlternativesLookAheadFunc"),ze(pv,"buildSingleAlternativeLookaheadFunction");var fv=class extends tg{static{ze(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)}walkOption(e,t,r){this.checkIsTarget(e,Hy.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Hy.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Hy.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Hy.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Hy.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},hv=class extends Xm{static{ze(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,Hy.OPTION)}visitRepetition(e){this.checkIsTarget(e,Hy.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Hy.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Hy.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Hy.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Hy.ALTERNATION)}};function mv(e){const t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function gv(e){let t=[""];for(let r=0;r<e.length;r++){const n=e[r],i=[];for(let e=0;e<t.length;e++){const r=t[e];i.push(r+"_"+n.tokenTypeIdx);for(let e=0;e<n.categoryMatches.length;e++){const t="_"+n.categoryMatches[e];i.push(r+t)}}t=i}return t}function yv(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;const i=e[n];for(let e=0;e<t.length;e++){if(!0===i[t[e]])return!1}}return!0}function vv(e,t){const r=Ih(e,e=>iv([e],1)),n=mv(r.length),i=Ih(r,e=>{const t={};return uh(e,e=>{const r=gv(e.partialPath);uh(r,e=>{t[e]=!0})}),t});let a=r;for(let s=1;s<=t;s++){const e=a;a=mv(e.length);for(let r=0;r<e.length;r++){const o=e[r];for(let e=0;e<o.length;e++){const l=o[e].partialPath,c=o[e].suffixDef,u=gv(l);if(yv(i,u,r)||tm(c)||l.length===t){const e=n[r];if(!1===$v(e,l)){e.push(l);for(let e=0;e<u.length;e++){const t=u[e];i[r][t]=!0}}}else{const e=iv(c,s+1,l);a[r]=a[r].concat(e),uh(e,e=>{const t=gv(e.partialPath);uh(t,e=>{i[r][e]=!0})})}}}}return n}function Tv(e,t,r,n){const i=new hv(e,Hy.ALTERNATION,n);return t.accept(i),vv(i.result,r)}function Rv(e,t,r,n){const i=new hv(e,r);t.accept(i);const a=i.result,s=new fv(t,e,r).startWalking();return vv([new zm({definition:a}),new zm({definition:s})],n)}function $v(e,t){e:for(let r=0;r<e.length;r++){const n=e[r];if(n.length===t.length){for(let e=0;e<n.length;e++){const r=t[e],i=n[e];if(!1===(r===i||void 0!==i.categoryMatchesMap[r.tokenTypeIdx]))continue e}return!0}}return!1}function bv(e,t){return e.length<t.length&&gh(e,(e,r)=>{const n=t[r];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})}function Ev(e){return gh(e,e=>gh(e,e=>gh(e,e=>tm(e.categoryMatches))))}function Cv(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Ih(t,e=>Object.assign({type:HT.CUSTOM_LOOKAHEAD_VALIDATION},e))}function Av(e,t,r,n){const i=Ph(e,e=>Sv(e,r)),a=qv(e,t,r),s=Ph(e,e=>jv(e,r)),o=Ph(e,t=>Nv(t,e,n,r));return i.concat(a,s,o)}function Sv(e,t){const r=new xv;e.accept(r);const n=r.allProductions,i=Oh(n,kv),a=mm(i,e=>e.length>1);return Ih(Bh(a),r=>{const n=kh(r),i=t.buildDuplicateFoundError(e,r),a=eg(n),s={message:i,type:HT.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:n.idx},o=wv(n);return o&&(s.parameter=o),s})}function kv(e){return`${eg(e)}_#_${e.idx}_#_${wv(e)}`}function wv(e){return e instanceof Vm?e.terminalType.name:e instanceof jm?e.nonTerminalName:""}ze(mv,"initializeArrayOfArrays"),ze(gv,"pathToHashKeys"),ze(yv,"isUniquePrefixHash"),ze(vv,"lookAheadSequenceFromAlternatives"),ze(Tv,"getLookaheadPathsForOr"),ze(Rv,"getLookaheadPathsForOptionalProd"),ze($v,"containsPath"),ze(bv,"isStrictPrefixOfPath"),ze(Ev,"areTokenCategoriesNotUsed"),ze(Cv,"validateLookahead"),ze(Av,"validateGrammar"),ze(Sv,"validateDuplicateProductions"),ze(kv,"identifyProductionForDuplicates"),ze(wv,"getExtraProductionArgument");var xv=class extends Xm{static{ze(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function Nv(e,t,r,n){const i=[];if(Tm(t,(t,r)=>r.name===e.name?t+1:t,0)>1){const t=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:t,type:HT.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Iv(e,t,r){const n=[];let i;return Yh(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:HT.INVALID_RULE_OVERRIDE,ruleName:e})),n}function _v(e,t,r,n=[]){const i=[],a=Pv(t.definition);if(tm(a))return[];{const t=e.name;Yh(a,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:HT.LEFT_RECURSION,ruleName:t});const s=eh(a,n.concat([e])),o=Ph(s,t=>{const i=Sp(n);return i.push(t),_v(e,t,r,i)});return i.concat(o)}}function Pv(e){let t=[];if(tm(e))return t;const r=kh(e);if(r instanceof jm)t.push(r.referencedRule);else if(r instanceof zm||r instanceof Gm||r instanceof qm||r instanceof Km||r instanceof Wm||r instanceof Um)t=t.concat(Pv(r.definition));else if(r instanceof Bm)t=Mu(Ih(r.definition,e=>Pv(e.definition)));else if(!(r instanceof Vm))throw Error("non exhaustive match");const n=Qm(r),i=e.length>1;if(n&&i){const r=ih(e);return t.concat(Pv(r))}return t}ze(Nv,"validateRuleDoesNotAlreadyExist"),ze(Iv,"validateRuleIsOverridden"),ze(_v,"validateNoLeftRecursion"),ze(Pv,"getFirstNoneTerminal");var Dv=class extends Xm{static{ze(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function Ov(e,t){const r=new Dv;e.accept(r);const n=r.alternations;return Ph(n,r=>{const n=sh(r.definition);return Ph(n,(n,i)=>{const a=av([n],[],cy,1);return tm(a)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:i}),type:HT.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:i+1}]:[]})})}function Lv(e,t,r){const n=new Dv;e.accept(n);let i=n.alternations;i=$m(i,e=>!0===e.ignoreAmbiguities);return Ph(i,n=>{const i=n.idx,a=n.maxLookahead||t,s=Tv(i,e,a,n),o=zv(s,n,e,r),l=Gv(s,n,e,r);return o.concat(l)})}ze(Ov,"validateEmptyOrAlternative"),ze(Lv,"validateAmbiguousAlternationAlternatives");var Mv=class extends Xm{static{ze(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function jv(e,t){const r=new Dv;e.accept(r);const n=r.alternations;return Ph(n,r=>r.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:HT.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}]:[])}function Fv(e,t,r){const n=[];return uh(e,e=>{const i=new Mv;e.accept(i);const a=i.allProductions;uh(a,i=>{const a=ov(i),s=i.maxLookahead||t,o=Rv(i.idx,e,a,s)[0];if(tm(Mu(o))){const t=r.buildEmptyRepetitionError({topLevelRule:e,repetition:i});n.push({message:t,type:HT.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),n}function zv(e,t,r,n){const i=[],a=Tm(e,(r,n,a)=>(!0===t.definition[a].ignoreAmbiguities||uh(n,n=>{const s=[a];uh(e,(e,r)=>{a!==r&&$v(e,n)&&!0!==t.definition[r].ignoreAmbiguities&&s.push(r)}),s.length>1&&!$v(i,n)&&(i.push(n),r.push({alts:s,path:n}))}),r),[]);return Ih(a,e=>{const i=Ih(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:HT.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:e.alts}})}function Gv(e,t,r,n){const i=Tm(e,(e,t,r)=>{const n=Ih(t,e=>({idx:r,path:e}));return e.concat(n)},[]);return wp(Ph(i,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const a=e.idx,s=e.path,o=Rh(i,e=>!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<a&&bv(e.path,s));return Ih(o,e=>{const i=[e.idx+1,a+1],s=0===t.idx?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:HT.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:s,alternatives:i}})}))}function qv(e,t,r){const n=[],i=Ih(t,e=>e.name);return uh(e,e=>{const t=e.name;if(Yh(i,t)){const i=r.buildNamespaceConflictError(e);n.push({message:i,type:HT.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),n}function Kv(e){const t=Vf(e,{errMsgProvider:Wy}),r={};return uh(e.rules,e=>{r[e.name]=e}),Vy(r,t.errMsgProvider)}function Uv(e){return Av((e=Vf(e,{errMsgProvider:By})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}ze(jv,"validateTooManyAlts"),ze(Fv,"validateSomeNonEmptyLookaheadPath"),ze(zv,"checkAlternativesAmbiguities"),ze(Gv,"checkPrefixAlternativesAmbiguities"),ze(qv,"checkTerminalAndNoneTerminalsNameSpace"),ze(Kv,"resolveGrammar"),ze(Uv,"validateGrammar");var Wv="MismatchedTokenException",Bv="NoViableAltException",Vv="EarlyExitException",Hv="NotAllInputParsedException",Yv=[Wv,Bv,Vv,Hv];function Xv(e){return Yh(Yv,e.name)}Object.freeze(Yv),ze(Xv,"isRecognitionException");var Jv=class extends Error{static{ze(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Qv=class extends Jv{static{ze(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Wv}},Zv=class extends Jv{static{ze(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Bv}},eT=class extends Jv{static{ze(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=Hv}},tT=class extends Jv{static{ze(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Vv}},rT={},nT="InRuleRecoveryException",iT=class extends Error{static{ze(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=nT}},aT=class{static{ze(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=zh(e,"recoveryEnabled")?e.recoveryEnabled:XT.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=sT)}getTokenToInsert(e){const t=qy(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){const i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[];let o=!1;const l=this.LA(1);let c=this.LA(1);const u=ze(()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),r=new Qv(t,l,this.LA(0));r.resyncedTokens=sh(s),this.SAVE_ERROR(r)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void u();if(r.call(this))return u(),void e.apply(this,t);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!1!==r&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){return this.getTokenToInsert(e)}if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new iT("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(tm(t))return!1;const r=this.LA(1);return void 0!==Ah(t,e=>this.tokenMatcher(r,e))}canRecoverWithSingleTokenDeletion(e){if(!this.canTokenTypeBeDeletedInRecovery(e))return!1;return this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return Yh(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const n=Ah(e,e=>Ky(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return rT;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return Ih(e,(r,n)=>0===n?rT:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[n],inRule:this.shortRuleNameToFullName(e[n-1])})}flattenFollowSet(){const e=Ih(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return Mu(e)}getFollowSetFromFollowKey(e){if(e===rT)return[Gy];const t=e.ruleName+e.idxInCallingRule+og+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Gy)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;!1===this.tokenMatcher(r,e);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return sh(t)}attemptInRepetitionRecovery(e,t,r,n,i,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Sp(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Ih(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function sT(e,t,r,n,i,a,s){const o=this.getKeyForAutomaticLookahead(n,i);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new a(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,u=l.occurrence;const d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===c&&(c=Gy,u=1),void 0!==c&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(c,u,s)&&this.tryInRepetitionRecovery(e,t,r,c)}ze(sT,"attemptInRepetitionRecovery");var oT=1024,lT=1280,cT=1536;function uT(e,t,r){return r|t|e}ze(uT,"getKeyForAutomaticLookahead");var dT=class{static{ze(this,"LLkLookaheadStrategy")}constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:XT.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(tm(t)){const r=this.validateEmptyOrAlternatives(e.rules),n=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...r,...n,...i]}return t}validateNoLeftRecursion(e){return Ph(e,e=>_v(e,e,By))}validateEmptyOrAlternatives(e){return Ph(e,e=>Ov(e,By))}validateAmbiguousAlternationAlternatives(e,t){return Ph(e,e=>Lv(e,t,By))}validateSomeNonEmptyLookaheadPath(e,t){return Fv(e,t,By)}buildLookaheadForAlternation(e){return cv(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,dv)}buildLookaheadForOptional(e){return uv(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ov(e.prodType),pv)}},pT=class{static{ze(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=zh(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:XT.dynamicTokensEnabled,this.maxLookahead=zh(e,"maxLookahead")?e.maxLookahead:XT.maxLookahead,this.lookaheadStrategy=zh(e,"lookaheadStrategy")?e.lookaheadStrategy:new dT({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){uh(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:r,option:n,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:s}=mT(e);uh(t,t=>{const r=0===t.idx?"":t.idx;this.TRACE_INIT(`${eg(t)}${r}`,()=>{const r=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),n=uT(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(n,r)})}),uh(r,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,eg(t))}),uh(n,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,eg(t))}),uh(i,t=>{this.computeLookaheadFunc(e,t.idx,oT,"RepetitionMandatory",t.maxLookahead,eg(t))}),uh(a,t=>{this.computeLookaheadFunc(e,t.idx,cT,"RepetitionMandatoryWithSeparator",t.maxLookahead,eg(t))}),uh(s,t=>{this.computeLookaheadFunc(e,t.idx,lT,"RepetitionWithSeparator",t.maxLookahead,eg(t))})})})}computeLookaheadFunc(e,t,r,n,i,a){this.TRACE_INIT(`${a}${0===t?"":t}`,()=>{const a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),s=uT(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(s,a)})}getKeyForAutomaticLookahead(e,t){return uT(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},fT=class extends Xm{static{ze(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},hT=new fT;function mT(e){hT.reset(),e.accept(hT);const t=hT.dslMethods;return hT.reset(),t}function gT(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset)}function yT(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset==!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function vT(e,t,r){void 0===e.children[r]?e.children[r]=[t]:e.children[r].push(t)}function TT(e,t,r){void 0===e.children[t]?e.children[t]=[r]:e.children[t].push(r)}ze(mT,"collectMethods"),ze(gT,"setNodeLocationOnlyOffset"),ze(yT,"setNodeLocationFull"),ze(vT,"addTerminalToCst"),ze(TT,"addNoneTerminalToCst");var RT,$T;function bT(e,t){Object.defineProperty(e,"name",{enumerable:!1,configurable:!0,writable:!1,value:t})}function ET(e,t){const r=sc(e),n=r.length;for(let i=0;i<n;i++){const n=e[r[i]],a=n.length;for(let e=0;e<a;e++){const r=n[e];void 0===r.tokenTypeIdx&&this[r.name](r.children,t)}}}function CT(e,t){const r=ze(function(){},"derivedConstructor");bT(r,e+"BaseSemantics");const n={visit:ze(function(e,t){if(ks(e)&&(e=e[0]),!om(e))return this[e.name](e.children,t)},"visit"),validateVisitor:ze(function(){const e=ST(this,t);if(!tm(e)){const t=Ih(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function AT(e,t,r){const n=ze(function(){},"derivedConstructor");bT(n,e+"BaseSemanticsWithDefaults");const i=Object.create(r.prototype);return uh(t,e=>{i[e]=ET}),n.prototype=i,n.prototype.constructor=n,n}function ST(e,t){return kT(e,t)}function kT(e,t){const r=Rh(t,t=>!1===to(e[t])),n=Ih(r,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:RT.MISSING_METHOD,methodName:t}));return wp(n)}ze(bT,"defineNameProp"),ze(ET,"defaultVisit"),ze(CT,"createBaseSemanticVisitorConstructor"),ze(AT,"createBaseVisitorConstructorWithDefaults"),($T=RT||(RT={}))[$T.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",$T[$T.MISSING_METHOD=1]="MISSING_METHOD",ze(ST,"validateVisitor"),ze(kT,"validateMissingCstMethods");var wT=class{static{ze(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=zh(e,"nodeLocationTracking")?e.nodeLocationTracking:XT.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=yT,this.setNodeLocationFromNode=yT,this.cstPostRule=wo,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=wo,this.setNodeLocationFromNode=wo,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=gT,this.setNodeLocationFromNode=gT,this.cstPostRule=wo,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=wo,this.setNodeLocationFromNode=wo,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=wo,this.setNodeLocationFromNode=wo,this.cstPostRule=wo,this.setInitialNodeLocation=wo}else this.cstInvocationStateUpdate=wo,this.cstFinallyStateUpdate=wo,this.cstPostTerminal=wo,this.cstPostNonTerminal=wo,this.cstPostRule=wo}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset==!0?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];vT(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];TT(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(om(this.baseCstVisitorConstructor)){const e=CT(this.className,sc(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(om(this.baseCstVisitorWithDefaultsConstructor)){const e=AT(this.className,sc(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},xT=class{static{ze(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):VT}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?VT:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},NT=class{static{ze(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=JT){if(Yh(this.definedRulesNames,e)){const t={message:By.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:HT.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=JT){const n=Iv(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);const i=this.defineRule(e,t,r);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if(Xv(n))return!1;throw n}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Hm(Bh(this.gastProductionsCache))}},IT=class{static{ze(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=uy,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},zh(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(ks(e)){if(tm(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(ks(e))this.tokensMap=Tm(e,(e,t)=>(e[t.name]=t,e),{});else if(zh(e,"modes")&&gh(Mu(Bh(e.modes)),Ey)){const t=Mu(Bh(e.modes)),r=Nm(t);this.tokensMap=Tm(r,(e,t)=>(e[t.name]=t,e),{})}else{if(!Fs(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Sp(e)}this.tokensMap.EOF=Gy;const r=zh(e,"modes")?Mu(Bh(e.modes)):Bh(e),n=gh(r,e=>tm(e.categoryMatches));this.tokenMatcher=n?uy:cy,fy(Bh(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const n=zh(r,"resyncEnabled")?r.resyncEnabled:JT.resyncEnabled,i=zh(r,"recoveryValueFunc")?r.recoveryValueFunc:JT.recoveryValueFunc,a=this.ruleShortNameIdx<<12;let s;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a,s=!0===this.outputCst?ze(function(...r){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,r);const n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}catch(s){return this.invokeRuleCatch(s,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):ze(function(...r){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,r)}catch(s){return this.invokeRuleCatch(s,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst");return Object.assign(s,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,r){const n=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Xv(e)){const t=e;if(i){const n=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(n)){if(t.resyncedTokens=this.reSyncTo(n),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return r(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(n)return this.moveToTerminatedState(),r(e);throw t}throw e}optionInternal(e,t){const r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof e){n=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=ze(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else n=e;if(!0===i.call(this))return n.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(oT,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=ze(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else n=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Hy.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(n);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(n)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,oT,e,rv)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(cT,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const n=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Hy.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{n.call(this);const t=ze(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,n,nv],t,cT,e,nv)}}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n,i=this.getLaFuncFromCache(r);if("function"!=typeof t){n=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=ze(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else n=t;let a=!0;for(;!0===i.call(this)&&!0===a;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,ev,a)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(lT,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const n=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){n.call(this);const t=ze(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,n,tv],t,lT,e,tv)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,cT,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();e.call(this);return this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(256,t),n=ks(e)?e:e.DEF,i=this.getLaFuncFromCache(r).call(this,n);if(void 0!==i){return n[i].ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new eT(t,e))}}subruleInternal(e,t,r){let n;try{const i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(i){throw this.subruleInternalError(i,r,e.ruleName)}}subruleInternalError(e,t,r){throw Xv(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),n=t):this.consumeInternalError(e,t,r)}catch(i){n=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n;const i=this.LA(0);throw n=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Qv(n,t,i))}consumeInternalRecovery(e,t,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;{const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(n){throw n.name===nT?r:n}}}saveRecogState(){const e=this.errors,t=Sp(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Gy)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},_T=class{static{ze(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=zh(e,"errorMessageProvider")?e.errorMessageProvider:XT.errorMessageProvider}SAVE_ERROR(e){if(Xv(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Sp(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Sp(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const n=this.getCurrRuleFullName(),i=Rv(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],a=[];for(let o=1;o<=this.maxLookahead;o++)a.push(this.LA(o));const s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:a,previous:this.LA(0),customUserDescription:r,ruleName:n});throw this.SAVE_ERROR(new tT(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),n=Tv(e,this.getGAstProductions()[r],this.maxLookahead),i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const a=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:i,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Zv(s,this.LA(1),a))}},PT=class{static{ze(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(om(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return av([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=kh(e.ruleStack),r=this.getGAstProductions()[t];return new Qy(r,e).startWalking()}},DT={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(DT);var OT=!0,LT=Math.pow(2,8)-1,MT=Fy({name:"RECORDING_PHASE_TOKEN",pattern:wy.NA});fy([MT]);var jT=qy(MT,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(jT);var FT={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}},zT=class{static{ze(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,r){return this.consumeInternalRecord(t,e,r)},this[`SUBRULE${t}`]=function(t,r){return this.subruleInternalRecord(t,e,r)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return VT}topLevelRuleRecord(e,t){try{const r=new Fm({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(n){throw r}throw r}}optionInternalRecord(e,t){return GT.call(this,Gm,e,t)}atLeastOneInternalRecord(e,t){GT.call(this,qm,t,e)}atLeastOneSepFirstInternalRecord(e,t){GT.call(this,Km,t,e,OT)}manyInternalRecord(e,t){GT.call(this,Um,t,e)}manySepFirstInternalRecord(e,t){GT.call(this,Wm,t,e,OT)}orInternalRecord(e,t){return qT.call(this,e,t)}subruleInternalRecord(e,t,r){if(UT(t),!e||!1===zh(e,"ruleName")){const r=new Error(`<SUBRULE${KT(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=rh(this.recordingProdStack),i=e.ruleName,a=new jm({idx:t,nonTerminalName:i,label:null==r?void 0:r.LABEL,referencedRule:void 0});return n.definition.push(a),this.outputCst?FT:DT}consumeInternalRecord(e,t,r){if(UT(t),!Ty(e)){const r=new Error(`<CONSUME${KT(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw r.KNOWN_RECORDER_ERROR=!0,r}const n=rh(this.recordingProdStack),i=new Vm({idx:t,terminalType:e,label:null==r?void 0:r.LABEL});return n.definition.push(i),jT}};function GT(e,t,r,n=!1){UT(r);const i=rh(this.recordingProdStack),a=to(t)?t:t.DEF,s=new e({definition:[],idx:r});return n&&(s.separator=t.SEP),zh(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),DT}function qT(e,t){UT(t);const r=rh(this.recordingProdStack),n=!1===ks(e),i=!1===n?e:e.DEF,a=new Bm({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});zh(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);const s=Am(i,e=>to(e.GATE));return a.hasPredicates=s,r.definition.push(a),uh(i,e=>{const t=new zm({definition:[]});a.definition.push(t),zh(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:zh(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),DT}function KT(e){return 0===e?"":`${e}`}function UT(e){if(e<0||e>LT){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${LT+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}ze(GT,"recordProd"),ze(qT,"recordOrProd"),ze(KT,"getIdxSuffix"),ze(UT,"assertMethodIdxIsValid");var WT=class{static{ze(this,"PerformanceTracer")}initPerformanceTracer(e){if(zh(e,"traceInitPerf")){const t=e.traceInitPerf,r="number"==typeof t;this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=XT.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${r}--\x3e <${e}>`);const{time:n,value:i}=Pm(t),a=n>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${r}<-- <${e}> time: ${n}ms`),this.traceInitIndent--,i}return t()}};function BT(e,t){t.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(n=>{if("constructor"===n)return;const i=Object.getOwnPropertyDescriptor(r,n);i&&(i.get||i.set)?Object.defineProperty(e.prototype,n,i):e.prototype[n]=t.prototype[n]})})}ze(BT,"applyMixins");var VT=qy(Gy,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(VT);var HT,YT,XT=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Uy,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),JT=Object.freeze({recoveryValueFunc:ze(()=>{},"recoveryValueFunc"),resyncEnabled:!0});function QT(e=void 0){return function(){return e}}(YT=HT||(HT={}))[YT.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",YT[YT.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",YT[YT.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",YT[YT.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",YT[YT.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",YT[YT.LEFT_RECURSION=5]="LEFT_RECURSION",YT[YT.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",YT[YT.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",YT[YT.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",YT[YT.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",YT[YT.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",YT[YT.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",YT[YT.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",YT[YT.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",ze(QT,"EMPTY_ALT");var ZT=class e{static{ze(this,"Parser")}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;const r=this.className;this.TRACE_INIT("toFastProps",()=>{Dm(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),uh(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let r;this.TRACE_INIT(`${e} Rule`,()=>{r=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=r})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Kv({rules:Bh(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(tm(n)&&!1===this.skipValidations){const e=Uv({rules:Bh(this.gastProductionsCache),tokenTypes:Bh(this.tokensMap),errMsgProvider:By,grammarName:r}),t=Cv({lookaheadStrategy:this.lookaheadStrategy,rules:Bh(this.gastProductionsCache),tokenTypes:Bh(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(e,t)}}),tm(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=cg(Bh(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Bh(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Bh(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!tm(this.definitionErrors))throw t=Ih(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${t.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),zh(t,"ignoredIssues"))throw new Error("The <ignoredIssues> IParserConfig property has been deprecated.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=zh(t,"skipValidations")?t.skipValidations:XT.skipValidations}};ZT.DEFER_DEFINITION_ERRORS_HANDLING=!1,BT(ZT,[aT,pT,wT,xT,IT,NT,_T,PT,zT,WT]);var eR=class extends ZT{static{ze(this,"EmbeddedActionsParser")}constructor(e,t=XT){const r=Sp(t);r.outputCst=!1,super(e,r)}};function tR(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}ze(tR,"arrayMap");var rR=tR;function nR(){this.__data__=[],this.size=0}ze(nR,"listCacheClear");var iR=nR;function aR(e,t){return e===t||e!=e&&t!=t}ze(aR,"eq");var sR=aR;function oR(e,t){for(var r=e.length;r--;)if(sR(e[r][0],t))return r;return-1}ze(oR,"assocIndexOf");var lR=oR,cR=Array.prototype.splice;function uR(e){var t=this.__data__,r=lR(t,e);return!(r<0)&&(r==t.length-1?t.pop():cR.call(t,r,1),--this.size,!0)}ze(uR,"listCacheDelete");var dR=uR;function pR(e){var t=this.__data__,r=lR(t,e);return r<0?void 0:t[r][1]}ze(pR,"listCacheGet");var fR=pR;function hR(e){return lR(this.__data__,e)>-1}ze(hR,"listCacheHas");var mR=hR;function gR(e,t){var r=this.__data__,n=lR(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}ze(gR,"listCacheSet");var yR=gR;function vR(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(vR,"ListCache"),vR.prototype.clear=iR,vR.prototype.delete=dR,vR.prototype.get=fR,vR.prototype.has=mR,vR.prototype.set=yR;var TR=vR;function RR(){this.__data__=new TR,this.size=0}ze(RR,"stackClear");var $R=RR;function bR(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}ze(bR,"stackDelete");var ER=bR;function CR(e){return this.__data__.get(e)}ze(CR,"stackGet");var AR=CR;function SR(e){return this.__data__.has(e)}ze(SR,"stackHas");var kR=SR,wR="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,xR="object"==typeof self&&self&&self.Object===Object&&self,NR=wR||xR||Function("return this")(),IR=NR.Symbol,_R=Object.prototype,PR=_R.hasOwnProperty,DR=_R.toString,OR=IR?IR.toStringTag:void 0;function LR(e){var t=PR.call(e,OR),r=e[OR];try{e[OR]=void 0;var n=!0}catch(a){}var i=DR.call(e);return n&&(t?e[OR]=r:delete e[OR]),i}ze(LR,"getRawTag");var MR=LR,jR=Object.prototype.toString;function FR(e){return jR.call(e)}ze(FR,"objectToString");var zR=FR,GR=IR?IR.toStringTag:void 0;function qR(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":GR&&GR in Object(e)?MR(e):zR(e)}ze(qR,"baseGetTag");var KR=qR;function UR(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}ze(UR,"isObject");var WR=UR;function BR(e){if(!WR(e))return!1;var t=KR(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}ze(BR,"isFunction");var VR=BR,HR=NR["__core-js_shared__"],YR=function(){var e=/[^.]+$/.exec(HR&&HR.keys&&HR.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function XR(e){return!!YR&&YR in e}ze(XR,"isMasked");var JR=XR,QR=Function.prototype.toString;function ZR(e){if(null!=e){try{return QR.call(e)}catch(t){}try{return e+""}catch(t){}}return""}ze(ZR,"toSource");var e$=ZR,t$=/^\[object .+?Constructor\]$/,r$=Function.prototype,n$=Object.prototype,i$=r$.toString,a$=n$.hasOwnProperty,s$=RegExp("^"+i$.call(a$).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function o$(e){return!(!WR(e)||JR(e))&&(VR(e)?s$:t$).test(e$(e))}ze(o$,"baseIsNative");var l$=o$;function c$(e,t){return null==e?void 0:e[t]}ze(c$,"getValue");var u$=c$;function d$(e,t){var r=u$(e,t);return l$(r)?r:void 0}ze(d$,"getNative");var p$=d$,f$=p$(NR,"Map"),h$=p$(Object,"create");function m$(){this.__data__=h$?h$(null):{},this.size=0}ze(m$,"hashClear");var g$=m$;function y$(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}ze(y$,"hashDelete");var v$=y$,T$=Object.prototype.hasOwnProperty;function R$(e){var t=this.__data__;if(h$){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return T$.call(t,e)?t[e]:void 0}ze(R$,"hashGet");var $$=R$,b$=Object.prototype.hasOwnProperty;function E$(e){var t=this.__data__;return h$?void 0!==t[e]:b$.call(t,e)}ze(E$,"hashHas");var C$=E$;function A$(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=h$&&void 0===t?"__lodash_hash_undefined__":t,this}ze(A$,"hashSet");var S$=A$;function k$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(k$,"Hash"),k$.prototype.clear=g$,k$.prototype.delete=v$,k$.prototype.get=$$,k$.prototype.has=C$,k$.prototype.set=S$;var w$=k$;function x$(){this.size=0,this.__data__={hash:new w$,map:new(f$||TR),string:new w$}}ze(x$,"mapCacheClear");var N$=x$;function I$(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}ze(I$,"isKeyable");var _$=I$;function P$(e,t){var r=e.__data__;return _$(t)?r["string"==typeof t?"string":"hash"]:r.map}ze(P$,"getMapData");var D$=P$;function O$(e){var t=D$(this,e).delete(e);return this.size-=t?1:0,t}ze(O$,"mapCacheDelete");var L$=O$;function M$(e){return D$(this,e).get(e)}ze(M$,"mapCacheGet");var j$=M$;function F$(e){return D$(this,e).has(e)}ze(F$,"mapCacheHas");var z$=F$;function G$(e,t){var r=D$(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}ze(G$,"mapCacheSet");var q$=G$;function K$(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ze(K$,"MapCache"),K$.prototype.clear=N$,K$.prototype.delete=L$,K$.prototype.get=j$,K$.prototype.has=z$,K$.prototype.set=q$;var U$=K$;function W$(e,t){var r=this.__data__;if(r instanceof TR){var n=r.__data__;if(!f$||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new U$(n)}return r.set(e,t),this.size=r.size,this}ze(W$,"stackSet");var B$=W$;function V$(e){var t=this.__data__=new TR(e);this.size=t.size}ze(V$,"Stack"),V$.prototype.clear=$R,V$.prototype.delete=ER,V$.prototype.get=AR,V$.prototype.has=kR,V$.prototype.set=B$;var H$=V$;function Y$(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}ze(Y$,"setCacheAdd");var X$=Y$;function J$(e){return this.__data__.has(e)}ze(J$,"setCacheHas");var Q$=J$;function Z$(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new U$;++t<r;)this.add(e[t])}ze(Z$,"SetCache"),Z$.prototype.add=Z$.prototype.push=X$,Z$.prototype.has=Q$;var eb=Z$;function tb(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}ze(tb,"arraySome");var rb=tb;function nb(e,t){return e.has(t)}ze(nb,"cacheHas");var ib=nb;function ab(e,t,r,n,i,a){var s=1&r,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&r?new eb:void 0;for(a.set(e,t),a.set(t,e);++d<o;){var h=e[d],m=t[d];if(n)var g=s?n(m,h,d,t,e,a):n(h,m,d,e,t,a);if(void 0!==g){if(g)continue;p=!1;break}if(f){if(!rb(t,function(e,t){if(!ib(f,t)&&(h===e||i(h,e,r,n,a)))return f.push(t)})){p=!1;break}}else if(h!==m&&!i(h,m,r,n,a)){p=!1;break}}return a.delete(e),a.delete(t),p}ze(ab,"equalArrays");var sb=ab,ob=NR.Uint8Array;function lb(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}ze(lb,"mapToArray");var cb=lb;function ub(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}ze(ub,"setToArray");var db=ub,pb=IR?IR.prototype:void 0,fb=pb?pb.valueOf:void 0;function hb(e,t,r,n,i,a,s){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new ob(e),new ob(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return sR(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var o=cb;case"[object Set]":var l=1&n;if(o||(o=db),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var u=sb(o(e),o(t),n,i,a,s);return s.delete(e),u;case"[object Symbol]":if(fb)return fb.call(e)==fb.call(t)}return!1}ze(hb,"equalByTag");var mb=hb;function gb(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}ze(gb,"arrayPush");var yb=gb,vb=Array.isArray;function Tb(e,t,r){var n=t(e);return vb(e)?n:yb(n,r(e))}ze(Tb,"baseGetAllKeys");var Rb=Tb;function $b(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r<n;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}ze($b,"arrayFilter");var bb=$b;function Eb(){return[]}ze(Eb,"stubArray");var Cb=Eb,Ab=Object.prototype.propertyIsEnumerable,Sb=Object.getOwnPropertySymbols,kb=Sb?function(e){return null==e?[]:(e=Object(e),bb(Sb(e),function(t){return Ab.call(e,t)}))}:Cb;function wb(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}ze(wb,"baseTimes");var xb=wb;function Nb(e){return null!=e&&"object"==typeof e}ze(Nb,"isObjectLike");var Ib=Nb;function _b(e){return Ib(e)&&"[object Arguments]"==KR(e)}ze(_b,"baseIsArguments");var Pb=_b,Db=Object.prototype,Ob=Db.hasOwnProperty,Lb=Db.propertyIsEnumerable,Mb=Pb(function(){return arguments}())?Pb:function(e){return Ib(e)&&Ob.call(e,"callee")&&!Lb.call(e,"callee")},jb=Mb;function Fb(){return!1}ze(Fb,"stubFalse");var zb=Fb,Gb="object"==typeof exports&&exports&&!exports.nodeType&&exports,qb=Gb&&"object"==typeof module&&module&&!module.nodeType&&module,Kb=qb&&qb.exports===Gb?NR.Buffer:void 0,Ub=(Kb?Kb.isBuffer:void 0)||zb,Wb=/^(?:0|[1-9]\d*)$/;function Bb(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Wb.test(e))&&e>-1&&e%1==0&&e<t}ze(Bb,"isIndex");var Vb=Bb;function Hb(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}ze(Hb,"isLength");var Yb=Hb,Xb={};function Jb(e){return Ib(e)&&Yb(e.length)&&!!Xb[KR(e)]}Xb["[object Float32Array]"]=Xb["[object Float64Array]"]=Xb["[object Int8Array]"]=Xb["[object Int16Array]"]=Xb["[object Int32Array]"]=Xb["[object Uint8Array]"]=Xb["[object Uint8ClampedArray]"]=Xb["[object Uint16Array]"]=Xb["[object Uint32Array]"]=!0,Xb["[object Arguments]"]=Xb["[object Array]"]=Xb["[object ArrayBuffer]"]=Xb["[object Boolean]"]=Xb["[object DataView]"]=Xb["[object Date]"]=Xb["[object Error]"]=Xb["[object Function]"]=Xb["[object Map]"]=Xb["[object Number]"]=Xb["[object Object]"]=Xb["[object RegExp]"]=Xb["[object Set]"]=Xb["[object String]"]=Xb["[object WeakMap]"]=!1,ze(Jb,"baseIsTypedArray");var Qb=Jb;function Zb(e){return function(t){return e(t)}}ze(Zb,"baseUnary");var eE=Zb,tE="object"==typeof exports&&exports&&!exports.nodeType&&exports,rE=tE&&"object"==typeof module&&module&&!module.nodeType&&module,nE=rE&&rE.exports===tE&&wR.process,iE=function(){try{var e=rE&&rE.require&&rE.require("util").types;return e||nE&&nE.binding&&nE.binding("util")}catch(t){}}(),aE=iE&&iE.isTypedArray,sE=aE?eE(aE):Qb,oE=Object.prototype.hasOwnProperty;function lE(e,t){var r=vb(e),n=!r&&jb(e),i=!r&&!n&&Ub(e),a=!r&&!n&&!i&&sE(e),s=r||n||i||a,o=s?xb(e.length,String):[],l=o.length;for(var c in e)!t&&!oE.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Vb(c,l))||o.push(c);return o}ze(lE,"arrayLikeKeys");var cE=lE,uE=Object.prototype;function dE(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||uE)}ze(dE,"isPrototype");var pE=dE;function fE(e,t){return function(r){return e(t(r))}}ze(fE,"overArg");var hE=fE(Object.keys,Object),mE=Object.prototype.hasOwnProperty;function gE(e){if(!pE(e))return hE(e);var t=[];for(var r in Object(e))mE.call(e,r)&&"constructor"!=r&&t.push(r);return t}ze(gE,"baseKeys");var yE=gE;function vE(e){return null!=e&&Yb(e.length)&&!VR(e)}ze(vE,"isArrayLike");var TE=vE;function RE(e){return TE(e)?cE(e):yE(e)}ze(RE,"keys");var $E=RE;function bE(e){return Rb(e,$E,kb)}ze(bE,"getAllKeys");var EE=bE,CE=Object.prototype.hasOwnProperty;function AE(e,t,r,n,i,a){var s=1&r,o=EE(e),l=o.length;if(l!=EE(t).length&&!s)return!1;for(var c=l;c--;){var u=o[c];if(!(s?u in t:CE.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=s;++c<l;){var m=e[u=o[c]],g=t[u];if(n)var y=s?n(g,m,u,t,e,a):n(m,g,u,e,t,a);if(!(void 0===y?m===g||i(m,g,r,n,a):y)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var v=e.constructor,T=t.constructor;v==T||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof T&&T instanceof T||(f=!1)}return a.delete(e),a.delete(t),f}ze(AE,"equalObjects");var SE=AE,kE=p$(NR,"DataView"),wE=p$(NR,"Promise"),xE=p$(NR,"Set"),NE=p$(NR,"WeakMap"),IE="[object Map]",_E="[object Promise]",PE="[object Set]",DE="[object WeakMap]",OE="[object DataView]",LE=e$(kE),ME=e$(f$),jE=e$(wE),FE=e$(xE),zE=e$(NE),GE=KR;(kE&&GE(new kE(new ArrayBuffer(1)))!=OE||f$&&GE(new f$)!=IE||wE&&GE(wE.resolve())!=_E||xE&&GE(new xE)!=PE||NE&&GE(new NE)!=DE)&&(GE=ze(function(e){var t=KR(e),r="[object Object]"==t?e.constructor:void 0,n=r?e$(r):"";if(n)switch(n){case LE:return OE;case ME:return IE;case jE:return _E;case FE:return PE;case zE:return DE}return t},"getTag"));var qE=GE,KE="[object Arguments]",UE="[object Array]",WE="[object Object]",BE=Object.prototype.hasOwnProperty;function VE(e,t,r,n,i,a){var s=vb(e),o=vb(t),l=s?UE:qE(e),c=o?UE:qE(t),u=(l=l==KE?WE:l)==WE,d=(c=c==KE?WE:c)==WE,p=l==c;if(p&&Ub(e)){if(!Ub(t))return!1;s=!0,u=!1}if(p&&!u)return a||(a=new H$),s||sE(e)?sb(e,t,r,n,i,a):mb(e,t,l,r,n,i,a);if(!(1&r)){var f=u&&BE.call(e,"__wrapped__"),h=d&&BE.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,g=h?t.value():t;return a||(a=new H$),i(m,g,r,n,a)}}return!!p&&(a||(a=new H$),SE(e,t,r,n,i,a))}ze(VE,"baseIsEqualDeep");var HE=VE;function YE(e,t,r,n,i){return e===t||(null==e||null==t||!Ib(e)&&!Ib(t)?e!=e&&t!=t:HE(e,t,r,n,YE,i))}ze(YE,"baseIsEqual");var XE=YE;function JE(e,t,r,n){var i=r.length,a=i,s=!n;if(null==e)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){var l=(o=r[i])[0],c=e[l],u=o[1];if(s&&o[2]){if(void 0===c&&!(l in e))return!1}else{var d=new H$;if(n)var p=n(c,u,l,e,t,d);if(!(void 0===p?XE(u,c,3,n,d):p))return!1}}return!0}ze(JE,"baseIsMatch");var QE=JE;function ZE(e){return e==e&&!WR(e)}ze(ZE,"isStrictComparable");var eC=ZE;function tC(e){for(var t=$E(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,eC(i)]}return t}ze(tC,"getMatchData");var rC=tC;function nC(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}ze(nC,"matchesStrictComparable");var iC=nC;function aC(e){var t=rC(e);return 1==t.length&&t[0][2]?iC(t[0][0],t[0][1]):function(r){return r===e||QE(r,e,t)}}ze(aC,"baseMatches");var sC=aC;function oC(e){return"symbol"==typeof e||Ib(e)&&"[object Symbol]"==KR(e)}ze(oC,"isSymbol");var lC=oC,cC=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uC=/^\w*$/;function dC(e,t){if(vb(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!lC(e))||(uC.test(e)||!cC.test(e)||null!=t&&e in Object(t))}ze(dC,"isKey");var pC=dC;function fC(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=ze(function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,n);return r.cache=a.set(i,s)||a,s},"memoized");return r.cache=new(fC.Cache||U$),r}ze(fC,"memoize"),fC.Cache=U$;var hC=fC;function mC(e){var t=hC(e,function(e){return 500===r.size&&r.clear(),e}),r=t.cache;return t}ze(mC,"memoizeCapped");var gC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yC=/\\(\\)?/g,vC=mC(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(gC,function(e,r,n,i){t.push(n?i.replace(yC,"$1"):r||e)}),t}),TC=IR?IR.prototype:void 0,RC=TC?TC.toString:void 0;function $C(e){if("string"==typeof e)return e;if(vb(e))return rR(e,$C)+"";if(lC(e))return RC?RC.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}ze($C,"baseToString");var bC=$C;function EC(e){return null==e?"":bC(e)}ze(EC,"toString");var CC=EC;function AC(e,t){return vb(e)?e:pC(e,t)?[e]:vC(CC(e))}ze(AC,"castPath");var SC=AC;function kC(e){if("string"==typeof e||lC(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}ze(kC,"toKey");var wC=kC;function xC(e,t){for(var r=0,n=(t=SC(t,e)).length;null!=e&&r<n;)e=e[wC(t[r++])];return r&&r==n?e:void 0}ze(xC,"baseGet");var NC=xC;function IC(e,t,r){var n=null==e?void 0:NC(e,t);return void 0===n?r:n}ze(IC,"get");var _C=IC;function PC(e,t){return null!=e&&t in Object(e)}ze(PC,"baseHasIn");var DC=PC;function OC(e,t,r){for(var n=-1,i=(t=SC(t,e)).length,a=!1;++n<i;){var s=wC(t[n]);if(!(a=null!=e&&r(e,s)))break;e=e[s]}return a||++n!=i?a:!!(i=null==e?0:e.length)&&Yb(i)&&Vb(s,i)&&(vb(e)||jb(e))}ze(OC,"hasPath");var LC=OC;function MC(e,t){return null!=e&&LC(e,t,DC)}ze(MC,"hasIn");var jC=MC;function FC(e,t){return pC(e)&&eC(t)?iC(wC(e),t):function(r){var n=_C(r,e);return void 0===n&&n===t?jC(r,e):XE(t,n,3)}}ze(FC,"baseMatchesProperty");var zC=FC;function GC(e){return e}ze(GC,"identity");var qC=GC;function KC(e){return function(t){return null==t?void 0:t[e]}}ze(KC,"baseProperty");var UC=KC;function WC(e){return function(t){return NC(t,e)}}ze(WC,"basePropertyDeep");var BC=WC;function VC(e){return pC(e)?UC(wC(e)):BC(e)}ze(VC,"property");var HC=VC;function YC(e){return"function"==typeof e?e:null==e?qC:"object"==typeof e?vb(e)?zC(e[0],e[1]):sC(e):HC(e)}ze(YC,"baseIteratee");var XC=YC;function JC(e){return function(t,r,n){for(var i=-1,a=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++i];if(!1===r(a[l],l,a))break}return t}}ze(JC,"createBaseFor");var QC=JC();function ZC(e,t){return e&&QC(e,t,$E)}ze(ZC,"baseForOwn");var eA=ZC;function tA(e,t){return function(r,n){if(null==r)return r;if(!TE(r))return e(r,n);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&!1!==n(s[a],a,s););return r}}ze(tA,"createBaseEach");var rA=tA(eA);function nA(e,t){var r=-1,n=TE(e)?Array(e.length):[];return rA(e,function(e,i,a){n[++r]=t(e,i,a)}),n}ze(nA,"baseMap");var iA=nA;function aA(e,t){return(vb(e)?rR:iA)(e,XC(t,3))}ze(aA,"map");var sA=aA;function oA(e,t){var r=[];return rA(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}ze(oA,"baseFilter");var lA=oA;function cA(e,t){return(vb(e)?bb:lA)(e,XC(t,3))}ze(cA,"filter");var uA=cA;function dA(e,t,r){return`${e.name}_${t}_${r}`}ze(dA,"buildATNKey");var pA=class{static{ze(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},fA=class extends pA{static{ze(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},hA=class extends pA{static{ze(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},mA=class extends pA{static{ze(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};function gA(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};yA(t,e);const r=e.length;for(let n=0;n<r;n++){const r=e[n],i=AA(t,r,r);void 0!==i&&OA(t,r,i)}return t}function yA(e,t){const r=t.length;for(let n=0;n<r;n++){const r=t[n],i=MA(e,r,void 0,{type:2}),a=MA(e,r,void 0,{type:7});i.stop=a,e.ruleToStartState.set(r,i),e.ruleToStopState.set(r,a)}}function vA(e,t,r){return r instanceof Vm?PA(e,t,r.terminalType,r):r instanceof jm?DA(e,t,r):r instanceof Bm?EA(e,t,r):r instanceof Gm?CA(e,t,r):r instanceof Um?TA(e,t,r):r instanceof Wm?RA(e,t,r):r instanceof qm?$A(e,t,r):r instanceof Km?bA(e,t,r):AA(e,t,r)}function TA(e,t,r){const n=MA(e,t,r,{type:5});xA(e,n);return kA(e,t,r,NA(e,t,n,r,AA(e,t,r)))}function RA(e,t,r){const n=MA(e,t,r,{type:5});xA(e,n);return kA(e,t,r,NA(e,t,n,r,AA(e,t,r)),PA(e,t,r.separator,r))}function $A(e,t,r){const n=MA(e,t,r,{type:4});xA(e,n);return SA(e,t,r,NA(e,t,n,r,AA(e,t,r)))}function bA(e,t,r){const n=MA(e,t,r,{type:4});xA(e,n);return SA(e,t,r,NA(e,t,n,r,AA(e,t,r)),PA(e,t,r.separator,r))}function EA(e,t,r){const n=MA(e,t,r,{type:1});xA(e,n);const i=sA(r.definition,r=>vA(e,t,r));return NA(e,t,n,r,...i)}function CA(e,t,r){const n=MA(e,t,r,{type:1});xA(e,n);return wA(e,t,r,NA(e,t,n,r,AA(e,t,r)))}function AA(e,t,r){const n=uA(sA(r.definition,r=>vA(e,t,r)),e=>void 0!==e);return 1===n.length?n[0]:0===n.length?void 0:_A(e,n)}function SA(e,t,r,n,i){const a=n.left,s=n.right,o=MA(e,t,r,{type:11});xA(e,o);const l=MA(e,t,r,{type:12});return a.loopback=o,l.loopback=o,e.decisionMap[dA(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=o,LA(s,o),void 0===i?(LA(o,a),LA(o,l)):(LA(o,l),LA(o,i.left),LA(i.right,a)),{left:a,right:l}}function kA(e,t,r,n,i){const a=n.left,s=n.right,o=MA(e,t,r,{type:10});xA(e,o);const l=MA(e,t,r,{type:12}),c=MA(e,t,r,{type:9});return o.loopback=c,l.loopback=c,LA(o,a),LA(o,l),LA(s,c),void 0!==i?(LA(c,l),LA(c,i.left),LA(i.right,a)):LA(c,o),e.decisionMap[dA(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=o,{left:o,right:l}}function wA(e,t,r,n){const i=n.left;return LA(i,n.right),e.decisionMap[dA(t,"Option",r.idx)]=i,n}function xA(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function NA(e,t,r,n,...i){const a=MA(e,t,n,{type:8,start:r});r.end=a;for(const o of i)void 0!==o?(LA(r,o.left),LA(o.right,a)):LA(r,a);const s={left:r,right:a};return e.decisionMap[dA(t,IA(n),n.idx)]=r,s}function IA(e){if(e instanceof Bm)return"Alternation";if(e instanceof Gm)return"Option";if(e instanceof Um)return"Repetition";if(e instanceof Wm)return"RepetitionWithSeparator";if(e instanceof qm)return"RepetitionMandatory";if(e instanceof Km)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function _A(e,t){const r=t.length;for(let a=0;a<r-1;a++){const r=t[a];let n;1===r.left.transitions.length&&(n=r.left.transitions[0]);const i=n instanceof mA,s=n,o=t[a+1].left;1===r.left.type&&1===r.right.type&&void 0!==n&&(i&&s.followState===r.right||n.target===r.right)?(i?s.followState=o:n.target=o,FA(e,r.right)):LA(r.right,o)}const n=t[0],i=t[r-1];return{left:n.left,right:i.right}}function PA(e,t,r,n){const i=MA(e,t,n,{type:1}),a=MA(e,t,n,{type:1});return jA(i,new fA(a,r)),{left:i,right:a}}function DA(e,t,r){const n=r.referencedRule,i=e.ruleToStartState.get(n),a=MA(e,t,r,{type:1}),s=MA(e,t,r,{type:1});return jA(a,new mA(i,n,s)),{left:a,right:s}}function OA(e,t,r){const n=e.ruleToStartState.get(t);LA(n,r.left);const i=e.ruleToStopState.get(t);LA(r.right,i);return{left:n,right:i}}function LA(e,t){jA(e,new hA(t))}function MA(e,t,r,n){const i=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(i),i}function jA(e,t){0===e.transitions.length&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function FA(e,t){e.states.splice(e.states.indexOf(t),1)}ze(gA,"createATN"),ze(yA,"createRuleStartAndStopATNStates"),ze(vA,"atom"),ze(TA,"repetition"),ze(RA,"repetitionSep"),ze($A,"repetitionMandatory"),ze(bA,"repetitionMandatorySep"),ze(EA,"alternation"),ze(CA,"option"),ze(AA,"block"),ze(SA,"plus"),ze(kA,"star"),ze(wA,"optional"),ze(xA,"defineDecisionState"),ze(NA,"makeAlts"),ze(IA,"getProdType"),ze(_A,"makeBlock"),ze(PA,"tokenRef"),ze(DA,"ruleRef"),ze(OA,"buildRuleHandle"),ze(LA,"epsilon"),ze(MA,"newState"),ze(jA,"addTransition"),ze(FA,"removeState");var zA={},GA=class{static{ze(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const t=qA(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return sA(this.configs,e=>e.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}};function qA(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}function KA(e,t,r){for(var n=-1,i=e.length;++n<i;){var a=e[n],s=t(a);if(null!=s&&(void 0===o?s==s&&!lC(s):r(s,o)))var o=s,l=a}return l}ze(qA,"getATNConfigKey"),ze(KA,"baseExtremum");var UA=KA;function WA(e,t){return e<t}ze(WA,"baseLt");var BA=WA;function VA(e){return e&&e.length?UA(e,qC,BA):void 0}ze(VA,"min");var HA=VA,YA=IR?IR.isConcatSpreadable:void 0;function XA(e){return vb(e)||jb(e)||!!(YA&&e&&e[YA])}ze(XA,"isFlattenable");var JA=XA;function QA(e,t,r,n,i){var a=-1,s=e.length;for(r||(r=JA),i||(i=[]);++a<s;){var o=e[a];t>0&&r(o)?t>1?QA(o,t-1,r,n,i):yb(i,o):n||(i[i.length]=o)}return i}ze(QA,"baseFlatten");var ZA=QA;function eS(e,t){return ZA(sA(e,t),1)}ze(eS,"flatMap");var tS=eS;function rS(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}ze(rS,"baseFindIndex");var nS=rS;function iS(e){return e!=e}ze(iS,"baseIsNaN");var aS=iS;function sS(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}ze(sS,"strictIndexOf");var oS=sS;function lS(e,t,r){return t==t?oS(e,t,r):nS(e,aS,r)}ze(lS,"baseIndexOf");var cS=lS;function uS(e,t){return!!(null==e?0:e.length)&&cS(e,t,0)>-1}ze(uS,"arrayIncludes");var dS=uS;function pS(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}ze(pS,"arrayIncludesWith");var fS=pS;function hS(){}ze(hS,"noop");var mS=hS,gS=xE&&1/db(new xE([,-0]))[1]==1/0?function(e){return new xE(e)}:mS;function yS(e,t,r){var n=-1,i=dS,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=fS;else if(a>=200){var c=t?null:gS(e);if(c)return db(c);s=!1,i=ib,l=new eb}else l=t?[]:o;e:for(;++n<a;){var u=e[n],d=t?t(u):u;if(u=r||0!==u?u:0,s&&d==d){for(var p=l.length;p--;)if(l[p]===d)continue e;t&&l.push(d),o.push(u)}else i(l,d,r)||(l!==o&&l.push(d),o.push(u))}return o}ze(yS,"baseUniq");var vS=yS;function TS(e,t){return e&&e.length?vS(e,XC(t,2)):[]}ze(TS,"uniqBy");var RS=TS;function $S(e){return(null==e?0:e.length)?ZA(e,1):[]}ze($S,"flatten");var bS=$S;function ES(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}ze(ES,"arrayEach");var CS=ES;function AS(e){return"function"==typeof e?e:qC}ze(AS,"castFunction");var SS=AS;function kS(e,t){return(vb(e)?CS:rA)(e,SS(t))}ze(kS,"forEach");var wS=kS,xS=Object.prototype.hasOwnProperty;function NS(e){if(null==e)return!0;if(TE(e)&&(vb(e)||"string"==typeof e||"function"==typeof e.splice||Ub(e)||sE(e)||jb(e)))return!e.length;var t=qE(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(pE(e))return!yE(e).length;for(var r in e)if(xS.call(e,r))return!1;return!0}ze(NS,"isEmpty");var IS=NS;function _S(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}ze(_S,"arrayReduce");var PS=_S;function DS(e,t,r,n,i){return i(e,function(e,i,a){r=n?(n=!1,e):t(r,e,i,a)}),r}ze(DS,"baseReduce");var OS=DS;function LS(e,t,r){var n=vb(e)?PS:OS,i=arguments.length<3;return n(e,XC(t,4),r,i,rA)}ze(LS,"reduce");var MS=LS;function jS(e,t){const r={};return n=>{const i=n.toString();let a=r[i];return void 0!==a||(a={atnStartState:e,decision:t,states:{}},r[i]=a),a}}ze(jS,"createDFACache");var FS=class{static{ze(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;r<t;r++)e+=!0===this.predicates[r]?"1":"0";return e}},zS=new FS,GS=class extends dT{static{ze(this,"LLStarLookaheadStrategy")}constructor(e){var t;super(),this.logging=null!==(t=null==e?void 0:e.logging)&&void 0!==t?t:e=>console.log(e)}initialize(e){this.atn=gA(e.rules),this.dfas=KS(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=dA(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=sA(lv({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>sA(e,e=>e[0]));if(qS(c,!1)&&!i){const e=MS(c,(e,t,r)=>(wS(t,t=>{t&&(e[t.tokenTypeIdx]=r,wS(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var r;const n=this.LA(1),i=e[n.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(r=t[i])||void 0===r?void 0:r.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return n?function(e){const t=new FS,r=void 0===e?0:e.length;for(let i=0;i<r;i++){const r=null==e?void 0:e[i].GATE;t.set(i,void 0===r||r.call(this))}const n=US.call(this,a,l,t,s);return"number"==typeof n?n:void 0}:function(){const e=US.call(this,a,l,zS,s);return"number"==typeof e?e:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:t,rule:r,prodType:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=dA(r,n,t),l=this.atn.decisionMap[o].decision,c=sA(lv({maxLookahead:1,occurrence:t,prodType:n,rule:r}),e=>sA(e,e=>e[0]));if(qS(c)&&c[0][0]&&!i){const e=c[0],t=bS(e);if(1===t.length&&IS(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=MS(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,wS(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=US.call(this,a,l,zS,s);return"object"!=typeof e&&0===e}}};function qS(e,t=!0){const r=new Set;for(const n of e){const e=new Set;for(const i of n){if(void 0===i){if(t)break;return!1}const n=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of n)if(r.has(t)){if(!e.has(t))return!1}else r.add(t),e.add(t)}}return!0}function KS(e){const t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=jS(e.decisionStates[n],n);return r}function US(e,t,r,n){const i=e[t](r);let a=i.start;if(void 0===a){a=nk(i,tk(ik(i.atnStartState))),i.start=a}return WS.apply(this,[i,a,r,n])}function WS(e,t,r,n){let i=t,a=1;const s=[];let o=this.LA(a++);for(;;){let t=JS(i,o);if(void 0===t&&(t=BS.apply(this,[e,i,o,a,r,n])),t===zA)return XS(s,i,o);if(!0===t.isAcceptState)return t.prediction;i=t,s.push(o),o=this.LA(a++)}}function BS(e,t,r,n,i,a){const s=QS(t.configs,r,i);if(0===s.size)return rk(e,t,r,zA),zA;let o=tk(s);const l=ek(s,i);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(ck(s)){const t=HA(s.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,VS.apply(this,[e,n,s.alts,a])}return o=rk(e,t,r,o),o}function VS(e,t,r,n){const i=[];for(let s=1;s<=t;s++)i.push(this.LA(s).tokenType);const a=e.atnStartState;n(HS({topLevelRule:a.rule,ambiguityIndices:r,production:a.production,prefixPath:i}))}function HS(e){const t=sA(e.prefixPath,e=>xy(e)).join(", "),r=0===e.production.idx?"":e.production.idx;let n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${YS(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return n+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",n}function YS(e){if(e instanceof jm)return"SUBRULE";if(e instanceof Gm)return"OPTION";if(e instanceof Bm)return"OR";if(e instanceof qm)return"AT_LEAST_ONE";if(e instanceof Km)return"AT_LEAST_ONE_SEP";if(e instanceof Wm)return"MANY_SEP";if(e instanceof Um)return"MANY";if(e instanceof Vm)return"CONSUME";throw Error("non exhaustive match")}function XS(e,t,r){const n=tS(t.configs.elements,e=>e.state.transitions);return{actualToken:r,possibleTokenTypes:RS(n.filter(e=>e instanceof fA).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function JS(e,t){return e.edges[t.tokenTypeIdx]}function QS(e,t,r){const n=new GA,i=[];for(const s of e.elements){if(!1===r.is(s.alt))continue;if(7===s.state.type){i.push(s);continue}const e=s.state.transitions.length;for(let r=0;r<e;r++){const e=ZS(s.state.transitions[r],t);void 0!==e&&n.add({state:e,alt:s.alt,stack:s.stack})}}let a;if(0===i.length&&1===n.size&&(a=n),void 0===a){a=new GA;for(const e of n.elements)ak(e,a)}if(i.length>0&&!ok(a))for(const s of i)a.add(s);return a}function ZS(e,t){if(e instanceof fA&&Ky(t,e.tokenType))return e.target}function ek(e,t){let r;for(const n of e.elements)if(!0===t.is(n.alt))if(void 0===r)r=n.alt;else if(r!==n.alt)return;return r}function tk(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function rk(e,t,r,n){return n=nk(e,n),t.edges[r.tokenTypeIdx]=n,n}function nk(e,t){if(t===zA)return t;const r=t.configs.key,n=e.states[r];return void 0!==n?n:(t.configs.finalize(),e.states[r]=t,t)}function ik(e){const t=new GA,r=e.transitions.length;for(let n=0;n<r;n++){ak({state:e.transitions[n].target,alt:n,stack:[]},t)}return t}function ak(e,t){const r=e.state;if(7===r.type){if(e.stack.length>0){const r=[...e.stack];ak({state:r.pop(),alt:e.alt,stack:r},t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);const n=r.transitions.length;for(let i=0;i<n;i++){const n=sk(e,r.transitions[i]);void 0!==n&&ak(n,t)}}function sk(e,t){if(t instanceof hA)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof mA){const r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}function ok(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}function lk(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}function ck(e){if(lk(e))return!0;const t=uk(e.elements);return dk(t)&&!pk(t)}function uk(e){const t=new Map;for(const r of e){const e=qA(r,!1);let n=t.get(e);void 0===n&&(n={},t.set(e,n)),n[r.alt]=!0}return t}function dk(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function pk(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}ze(qS,"isLL1Sequence"),ze(KS,"initATNSimulator"),ze(US,"adaptivePredict"),ze(WS,"performLookahead"),ze(BS,"computeLookaheadTarget"),ze(VS,"reportLookaheadAmbiguity"),ze(HS,"buildAmbiguityError"),ze(YS,"getProductionDslName"),ze(XS,"buildAdaptivePredictError"),ze(JS,"getExistingTargetState"),ze(QS,"computeReachSet"),ze(ZS,"getReachableTarget"),ze(ek,"getUniqueAlt"),ze(tk,"newDFAState"),ze(rk,"addDFAEdge"),ze(nk,"addDFAState"),ze(ik,"computeStartState"),ze(ak,"closure"),ze(sk,"getEpsilonTarget"),ze(ok,"hasConfigInRuleStopState"),ze(lk,"allConfigsInRuleStopStates"),ze(ck,"hasConflictTerminatingPrediction"),ze(uk,"getConflictingAltSets"),ze(dk,"hasConflictingAltSet"),ze(pk,"hasStateAssociatedWithOneAlt"),Xe();var fk=class{static{ze(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new vk(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new gk;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new mk(e.startOffset,e.image.length,Si(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){const t=[];for(const i of e){const e=new mk(i.startOffset,i.image.length,Si(i),i.tokenType,!0);e.root=this.rootNode,t.push(e)}let r=this.current,n=!1;if(r.content.length>0)r.content.push(...t);else{for(;r.container;){const e=r.container.content.indexOf(r);if(e>0){r.container.content.splice(e,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infix||(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();0===r?.content.length&&this.removeNode(r)}},hk=class{static{ze(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},mk=class extends hk{static{ze(this,"LeafCstNodeImpl")}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,r,n,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},gk=class extends hk{static{ze(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new yk(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line<r.start.line?r.start:n.end}}return this._rangeCache}return{start:o.create(0,0),end:o.create(0,0)}}get firstNonHiddenNode(){for(const e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},yk=class e extends Array{static{ze(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}},vk=class extends gk{static{ze(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},Tk=Symbol("Datatype");function Rk(e){return e.$type===Tk}ze(Rk,"isDataTypeNode");var $k=ze(e=>e.endsWith("\u200b")?e:e+"\u200b","withRuleSuffix"),bk=class{static{ze(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,r="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new xk(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new wk(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},Ek=class extends bk{static{ze(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new fk,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=this.computeRuleType(e);let n;dn(e)&&(n=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE($k(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,i),Pn(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const t=e.name,r=new Map;for(let n=0;n<e.operators.precedences.length;n++){const t=e.operators.precedences[n];for(const e of t.operators)r.set(e.value,{precedence:n,rightAssoc:"right"===t.associativity})}this.operatorPrecedence.set(t,r)}computeRuleType(e){return dn(e)?Ua(e):e.fragment?void 0:Fa(e)?Tk:Ua(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const n=t.rule?this.allRules.get(t.rule):this.mainRule;if(!n)throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.");const i=this.doParse(n);return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,or(i,{deep:!0}),{value:i,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{const i=!this.isRecording()&&void 0!==e;if(i){const r={$type:e};this.stack.push(r),e===Tk?r.value="":void 0!==t&&(r.$infixName=t)}return r(n),i?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const r=e.startOffset;for(let n=0;n<t.length;n++){if(t[n].startOffset>r)return t.splice(0,n)}return t.splice(0,t.length)}consume(e,t,r){const n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){const e=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(n,r),{assignment:i,crossRef:a}=this.getAssignment(r),s=this.current;if(i){const e=Tn(r)?n.image:this.converter.convert(n.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(Rk(s)){let e=n.image;Tn(r)||(e=this.converter.convert(e,t).toString()),s.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,r,n,i){let a,s;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n));try{s=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(void 0!==s||r||(s=this.construct()),void 0!==s&&a&&a.length>0&&this.performSubruleAssignment(s,n,a))}}performSubruleAssignment(e,t,r){const{assignment:n,crossRef:i}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,i);else if(!n){const t=this.current;if(Rk(t))t.value+=e.toString();else if("object"==typeof e&&e){const r=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(r)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode);this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);const n={$type:e};this.stack.push(n),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):Rk(e)?this.converter.convert(e.value,e.$cstNode):(vr(this.astReflection,e),e)}constructInfix(e,t){const r=e.parts;if(!Array.isArray(r)||0===r.length)return;const n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let i=0,a=-1;for(let h=0;h<n.length;h++){const e=n[h],r=t.get(e)??{precedence:1/0,rightAssoc:!1};r.precedence>a?(a=r.precedence,i=h):r.precedence===a&&(r.rightAssoc||(i=h))}const s=n.slice(0,i),o=n.slice(i+1),l=r.slice(0,i+1),c=r.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},p=this.constructInfix(u,t),f=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:n[i],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=lr(e,zr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&Xr(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,i){const a=this.current;let s;switch(s="single"===i&&"string"==typeof r?this.linker.buildReference(a,t,n,r):"multi"===i&&"string"==typeof r?this.linker.buildMultiReference(a,t,n,r):r,e){case"=":a[t]=s;break;case"?=":a[t]=!0;break;case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(const[n,i]of Object.entries(t)){const t=e[n];void 0===t?e[n]=i:Array.isArray(t)&&Array.isArray(i)&&(i.push(...t),e[n]=i)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},Ck=class{static{ze(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return Uy.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Uy.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Uy.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Uy.buildEarlyExitMessage(e)}},Ak=class extends Ck{static{ze(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},Sk=class extends bk{static{ze(this,"LangiumCompletionParser")}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE($k(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},kk={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Ak},wk=class extends eR{static{ze(this,"ChevrotainWrapper")}constructor(e,t){super(e,{...kk,lookaheadStrategy:t&&"maxLookahead"in t?new dT({maxLookahead:t.maxLookahead}):new GS({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},xk=class extends wk{static{ze(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};function Nk(e,t,r){return Ik({parser:t,tokens:r,ruleNames:new Map},e),t}function Ik(e,t){const r=$a(t,!1),n=nr(t.rules).filter(Pn).filter(e=>r.has(e));for(const a of n){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Pk(t,a.definition))}const i=nr(t.rules).filter(dn).filter(e=>r.has(e));for(const a of i)e.parser.rule(a,_k(e,a))}function _k(e,t){const r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(Zn(r))throw new Error("Cannot use terminal rule in infix expression");const n=t.operators.precedences.flatMap(e=>e.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,s);const o={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},l={...a,$container:s};s.elements.push(o,l);const c=n.map(t=>e.tokens[t.value]).map((t,r)=>({ALT:ze(()=>e.parser.consume(r,t,o),"ALT")}));let u;return t=>{u??(u=Wk(e,r)),e.parser.subrule(0,u,!1,a,t),e.parser.many(0,{DEF:ze(()=>{e.parser.alternatives(0,c),e.parser.subrule(1,u,!1,l,t)},"DEF")})}}function Pk(e,t,r=!1){let n;if(Tn(t))n=Kk(e,t);else if(_r(t))n=Dk(e,t);else if(zr(t))n=Pk(e,t.terminal);else if(Xr(t))n=qk(e,t);else if(Gn(t))n=Ok(e,t);else if(Dr(t))n=jk(e,t);else if(di(t))n=Fk(e,t);else if(on(t))n=zk(e,t);else{if(!en(t))throw new Ui(t.$cstNode,`Unexpected element type: ${t.$type}`);{const r=e.consume++;n=ze(()=>e.parser.consume(r,Gy,t),"method")}}return Uk(e,r?void 0:Gk(t),n,t.cardinality)}function Dk(e,t){const r=Ua(t);return()=>e.parser.action(r,t)}function Ok(e,t){const r=t.rule.ref;if(Sr(r)){const n=e.subrule++,i=Pn(r)&&r.fragment,a=t.arguments.length>0?Lk(r,t.arguments):()=>({});let s;return o=>{s??(s=Wk(e,r)),e.parser.subrule(n,s,i,t,a(o))}}if(Zn(r)){const n=e.consume++,i=Vk(e,r.name);return()=>e.parser.consume(n,i,t)}if(!r)throw new Ui(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);Wi()}function Lk(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Mk(e.value)}));return t=>{const r={};for(const{parameterName:n,predicate:i}of e)n&&(r[n]=i(t));return r}}{const r=t.map(e=>Mk(e.value));return t=>{const n={};for(let i=0;i<r.length;i++)if(i<e.parameters.length){const a=e.parameters[i].name,s=r[i];n[a]=s(t)}return n}}}function Mk(e){if(Qr(e)){const t=Mk(e.left),r=Mk(e.right);return e=>t(e)||r(e)}if(Hr(e)){const t=Mk(e.left),r=Mk(e.right);return e=>t(e)&&r(e)}if(An(e)){const t=Mk(e.value);return e=>!t(e)}if(In(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(qr(e)){const t=Boolean(e.true);return()=>t}Wi()}function jk(e,t){if(1===t.elements.length)return Pk(e,t.elements[0]);{const r=[];for(const i of t.elements){const t={ALT:Pk(e,i,!0)},n=Gk(i);n&&(t.GATE=Mk(n)),r.push(t)}const n=e.or++;return t=>e.parser.alternatives(n,r.map(e=>{const r={ALT:ze(()=>e.ALT(t),"ALT")},n=e.GATE;return n&&(r.GATE=()=>n(t)),r}))}}function Fk(e,t){if(1===t.elements.length)return Pk(e,t.elements[0]);const r=[];for(const o of t.elements){const t={ALT:Pk(e,o,!0)},n=Gk(o);n&&(t.GATE=Mk(n)),r.push(t)}const n=e.or++,i=ze((e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,"idFunc"),a=ze(t=>e.parser.alternatives(n,r.map((r,a)=>{const s={ALT:ze(()=>!0,"ALT")},o=e.parser;s.ALT=()=>{if(r.ALT(t),!o.isRecording()){const e=i(n,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===t?.[a]&&(t[a]=!0)}};const l=r.GATE;return s.GATE=l?()=>l(t):()=>{const e=o.unorderedGroups.get(i(n,o));return!e?.[a]},s})),"alternatives"),s=Uk(e,Gk(t),a,"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(n,e.parser))}}function zk(e,t){const r=t.elements.map(t=>Pk(e,t));return e=>r.forEach(t=>t(e))}function Gk(e){if(on(e))return e.guardCondition}function qk(e,t,r=t.terminal){if(r){if(Gn(r)&&Pn(r.rule.ref)){const n=r.rule.ref,i=e.subrule++;let a;return r=>{a??(a=Wk(e,n)),e.parser.subrule(i,a,!1,t,r)}}if(Gn(r)&&Zn(r.rule.ref)){const n=e.consume++,i=Vk(e,r.rule.ref.name);return()=>e.parser.consume(n,i,t)}if(Tn(r)){const n=e.consume++,i=Vk(e,r.value);return()=>e.parser.consume(n,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const r=Pa(t.type.ref),n=r?.terminal;if(!n)throw new Error("Could not find name assignment for type: "+Ua(t.type.ref));return qk(e,t,n)}}function Kk(e,t){const r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function Uk(e,t,r,n){const i=t&&Mk(t);if(!n){if(i){const t=e.or++;return n=>e.parser.alternatives(t,[{ALT:ze(()=>r(n),"ALT"),GATE:ze(()=>i(n),"GATE")},{ALT:QT(),GATE:ze(()=>!i(n),"GATE")}])}return r}if("*"===n){const t=e.many++;return n=>e.parser.many(t,{DEF:ze(()=>r(n),"DEF"),GATE:i?()=>i(n):void 0})}if("+"===n){const t=e.many++;if(i){const n=e.or++;return a=>e.parser.alternatives(n,[{ALT:ze(()=>e.parser.atLeastOne(t,{DEF:ze(()=>r(a),"DEF")}),"ALT"),GATE:ze(()=>i(a),"GATE")},{ALT:QT(),GATE:ze(()=>!i(a),"GATE")}])}return n=>e.parser.atLeastOne(t,{DEF:ze(()=>r(n),"DEF")})}if("?"===n){const t=e.optional++;return n=>e.parser.optional(t,{DEF:ze(()=>r(n),"DEF"),GATE:i?()=>i(n):void 0})}Wi()}function Wk(e,t){const r=Bk(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function Bk(e,t){if(Sr(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,i=t.$type;for(;!Pn(n);){if(on(n)||Dr(n)||di(n)){i=n.elements.indexOf(r).toString()+":"+i}r=n,n=n.$container}return i=n.name+":"+i,e.ruleNames.set(t,i),i}}function Vk(e,t){const r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function Hk(e){const t=e.Grammar,r=e.parser.Lexer,n=new Sk(e);return Nk(t,n,r.definition),n.finalize(),n}function Yk(e){const t=Xk(e);return t.finalize(),t}function Xk(e){const t=e.Grammar,r=e.parser.Lexer;return Nk(t,new Ek(e),r.definition)}ze(Nk,"createParser"),ze(Ik,"buildRules"),ze(_k,"buildInfixRule"),ze(Pk,"buildElement"),ze(Dk,"buildAction"),ze(Ok,"buildRuleCall"),ze(Lk,"buildRuleCallPredicate"),ze(Mk,"buildPredicate"),ze(jk,"buildAlternatives"),ze(Fk,"buildUnorderedGroup"),ze(zk,"buildGroup"),ze(Gk,"getGuardCondition"),ze(qk,"buildCrossReference"),ze(Kk,"buildKeyword"),ze(Uk,"wrap"),ze(Wk,"getRule"),ze(Bk,"getRuleName"),ze(Vk,"getToken"),ze(Hk,"createCompletionParser"),ze(Yk,"createLangiumParser"),ze(Xk,"prepareLangiumParser");var Jk,Qk=class{static{ze(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){const r=nr($a(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return i.push(...n),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Zn).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=Ha(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=ma(t)?wy.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,r)=>{t.lastIndex=r;return t.exec(e)}}buildKeywordTokens(e,t,r){return e.filter(Sr).flatMap(e=>hr(e).filter(Tn)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(r?.caseInsensitive)))}buildKeywordToken(e,t,r){const n=this.buildKeywordPattern(e,r),i={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof n&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(ga(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,r)=>{const n=r?.PATTERN;return n?.source&&ya("^"+n.source+"$",e.value)&&t.push(r),t},[])}},Zk=class{static{ze(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(Xr(r)&&(r=Ca(r)),Gn(r)){const n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Jk.convertInt(t);case"STRING":return Jk.convertString(t);case"ID":return Jk.convertID(t)}switch(Va(e)?.toLowerCase()){case"number":return Jk.convertNumber(t);case"boolean":return Jk.convertBoolean(t);case"bigint":return Jk.convertBigint(t);case"date":return Jk.convertDate(t);default:return t}}};!function(e){function t(e){let t="";for(let n=1;n<e.length-1;n++){const i=e.charAt(n);if("\\"===i){t+=r(e.charAt(++n))}else t+=i}return t}function r(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}function n(e){return"^"===e.charAt(0)?e.substring(1):e}function i(e){return parseInt(e)}function a(e){return BigInt(e)}function s(e){return new Date(e)}function o(e){return Number(e)}function l(e){return"true"===e.toLowerCase()}ze(t,"convertString"),e.convertString=t,ze(r,"convertEscapeCharacter"),ze(n,"convertID"),e.convertID=n,ze(i,"convertInt"),e.convertInt=i,ze(a,"convertBigint"),e.convertBigint=a,ze(s,"convertDate"),e.convertDate=s,ze(o,"convertNumber"),e.convertNumber=o,ze(l,"convertBoolean"),e.convertBoolean=l}(Jk||(Jk={}));var ew={};function tw(){return new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)})}Ue(ew,We(et(),1)),ze(tw,"delayNextTick");var rw=0,nw=10;function iw(){return rw=performance.now(),new ew.CancellationTokenSource}function aw(e){nw=e}ze(iw,"startCancelableOperation"),ze(aw,"setInterruptionPeriod");var sw=Symbol("OperationCancelled");function ow(e){return e===sw}async function lw(e){if(e===ew.CancellationToken.None)return;const t=performance.now();if(t-rw>=nw&&(rw=t,await tw(),rw=performance.now()),e.isCancellationRequested)throw sw}ze(ow,"isOperationCancelled"),ze(lw,"interruptAndCheck");var cw,uw,dw=class{static{ze(this,"Deferred")}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},pw=class e{static{ze(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(t,r){for(const n of t)if(e.isIncremental(n)){const e=gw(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),a=Math.max(e.end.line,0);let s=this._lineOffsets;const o=hw(n.text,!1,t);if(a-i===o.length)for(let n=0,c=o.length;n<c;n++)s[n+i+1]=o[n];else o.length<1e4?s.splice(i+1,a-i,...o):this._lineOffsets=s=s.slice(0,i+1).concat(o,s.slice(a+1));const l=n.text.length-(r-t);if(0!==l)for(let n=i+1+o.length,c=s.length;n<c;n++)s[n]=s[n]+l}else{if(!e.isFull(n))throw new Error("Unknown change event received");this._content=n.text,this._lineOffsets=void 0}this._version=r}getLineOffsets(){return void 0===this._lineOffsets&&(this._lineOffsets=hw(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);const t=this.getLineOffsets();let r=0,n=t.length;if(0===n)return{line:0,character:e};for(;r<n;){const i=Math.floor((r+n)/2);t[i]>e?n=i:r=i+1}const i=r-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const n=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(r+e.character,n);return this.ensureBeforeEOL(i,r)}ensureBeforeEOL(e,t){for(;e>t&&mw(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}};function fw(e,t){if(e.length<=1)return e;const r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);fw(n,t),fw(i,t);let a=0,s=0,o=0;for(;a<n.length&&s<i.length;){const r=t(n[a],i[s]);e[o++]=r<=0?n[a++]:i[s++]}for(;a<n.length;)e[o++]=n[a++];for(;s<i.length;)e[o++]=i[s++];return e}function hw(e,t,r=0){const n=t?[r]:[];for(let i=0;i<e.length;i++){const t=e.charCodeAt(i);mw(t)&&(13===t&&i+1<e.length&&10===e.charCodeAt(i+1)&&i++,n.push(r+i+1))}return n}function mw(e){return 13===e||10===e}function gw(e){const t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function yw(e){const t=gw(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){function t(e,t,r,n){return new pw(e,t,r,n)}function r(e,t,r){if(e instanceof pw)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function n(e,t){const r=e.getText(),n=fw(t.map(yw),(e,t)=>{const r=e.range.start.line-t.range.start.line;return 0===r?e.range.start.character-t.range.start.character:r});let i=0;const a=[];for(const s of n){const t=e.offsetAt(s.range.start);if(t<i)throw new Error("Overlapping edit");t>i&&a.push(r.substring(i,t)),s.newText.length&&a.push(s.newText),i=e.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}ze(t,"create"),e.create=t,ze(r,"update"),e.update=r,ze(n,"applyEdits"),e.applyEdits=n}(cw||(cw={})),ze(fw,"mergeSort"),ze(hw,"computeLineOffsets"),ze(mw,"isEOL"),ze(gw,"getWellformedRange"),ze(yw,"getWellformedEdit"),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,a=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)r=e.charCodeAt(o);else{if(47===r)break;r=47}if(47===r){if(a===o-1||1===s);else if(a!==o-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=o,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=o,s=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),i=o-a-1;a=o,s=0}else 46===r&&-1!==s?++s:s=-1}return n}ze(t,"e"),ze(r,"r");var n={resolve:ze(function(){for(var e,n="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var s;a>=0?s=arguments[a]:(void 0===e&&(e=process.cwd()),s=e),t(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},"resolve"),normalize:ze(function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},"normalize"),isAbsolute:ze(function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},"isAbsolute"),join:ze(function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},"join"),relative:ze(function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var a=e.length,s=a-i,o=1;o<r.length&&47===r.charCodeAt(o);++o);for(var l=r.length-o,c=s<l?s:l,u=-1,d=0;d<=c;++d){if(d===c){if(l>c){if(47===r.charCodeAt(o+d))return r.slice(o+d+1);if(0===d)return r.slice(o+d)}else s>c&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var p=e.charCodeAt(i+d);if(p!==r.charCodeAt(o+d))break;47===p&&(u=d)}var f="";for(d=i+u+1;d<=a;++d)d!==a&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+r.slice(o+u):(o+=u,47===r.charCodeAt(o)&&++o,r.slice(o))},"relative"),_makeLong:ze(function(e){return e},"_makeLong"),dirname:ze(function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,a=!0,s=e.length-1;s>=1;--s)if(47===(r=e.charCodeAt(s))){if(!a){i=s;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},"dirname"),basename:ze(function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,a=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var o=r.length-1,l=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===l&&(s=!1,l=n+1),o>=0&&(c===r.charCodeAt(o)?-1==--o&&(a=n):(o=-1,a=l))}return i===a?a=l:-1===a&&(a=e.length),e.slice(i,a)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!s){i=n+1;break}}else-1===a&&(s=!1,a=n+1);return-1===a?"":e.slice(i,a)},"basename"),extname:ze(function(e){t(e);for(var r=-1,n=0,i=-1,a=!0,s=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===i&&(a=!1,i=o+1),46===l?-1===r?r=o:1!==s&&(s=1):-1!==r&&(s=-1);else if(!a){n=o+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":e.slice(r,i)},"extname"),format:ze(function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return r=(t=e).dir||t.root,n=t.base||(t.name||"")+(t.ext||""),r?r===t.root?r+n:r+"/"+n:n;var t,r,n},"format"),parse:ze(function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),a=47===i;a?(r.root="/",n=1):n=0;for(var s=-1,o=0,l=-1,c=!0,u=e.length-1,d=0;u>=n;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===s?s=u:1!==d&&(d=1):-1!==s&&(d=-1);else if(!c){o=u+1;break}return-1===s||-1===l||0===d||1===d&&s===l-1&&s===o+1?-1!==l&&(r.base=r.name=0===o&&a?e.slice(1,l):e.slice(o,l)):(0===o&&a?(r.name=e.slice(1,s),r.base=e.slice(1,l)):(r.name=e.slice(o,s),r.base=e.slice(o,l)),r.ext=e.slice(s,l)),o>0?r.dir=e.slice(0,o-1):a&&(r.dir="/"),r},"parse"),sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}ze(r,"r"),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};let i;if(r.r(n),r.d(n,{URI:ze(()=>p,"URI"),Utils:ze(()=>S,"Utils")}),"object"==typeof process)i="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;i=e.indexOf("Windows")>=0}const a=/^\w[\w\d+.-]*$/,s=/^\//,o=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}ze(l,"a");const c="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{ze(this,"l")}static isUri(e){return e instanceof p||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,r,n,i,a=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,a),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,r||c),this.query=n||c,this.fragment=i||c,l(this,a))}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:i,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===r?r=this.authority:null===r&&(r=c),void 0===n?n=this.path:null===n&&(n=c),void 0===i?i=this.query:null===i&&(i=c),void 0===a?a=this.fragment:null===a&&(a=c),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new h(t,r,n,i,a)}static parse(e,t=!1){const r=d.exec(e);return r?new h(r[2]||c,b(r[4]||c),b(r[5]||c),b(r[7]||c),b(r[9]||c),t):new h(c,c,c,c,c)}static file(e){let t=c;if(i&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const r=e.indexOf(u,2);-1===r?(t=e.substring(2),e=u):(t=e.substring(2,r),e=e.substring(r)||u)}return new h("file",t,e,c,c)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return T(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof p)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}const f=i?1:void 0;class h extends p{static{ze(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(e,t,r){let n,i=-1;for(let a=0;a<e.length;a++){const s=e.charCodeAt(a);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||t&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(e.substring(i,a)),i=-1),void 0!==n&&(n+=e.charAt(a));else{void 0===n&&(n=e.substr(0,a));const t=m[s];void 0!==t?(-1!==i&&(n+=encodeURIComponent(e.substring(i,a)),i=-1),n+=t):-1===i&&(i=a)}}return-1!==i&&(n+=encodeURIComponent(e.substring(i))),void 0!==n?n:e}function y(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);35===n||63===n?(void 0===t&&(t=e.substr(0,r)),t+=m[n]):void 0!==t&&(t+=e[r])}return void 0!==t?t:e}function v(e,t){let r;return r=e.authority&&e.path.length>1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(r=r.replace(/\//g,"\\")),r}function T(e,t){const r=t?y:g;let n="",{scheme:i,authority:a,path:s,query:o,fragment:l}=e;if(i&&(n+=i,n+=":"),(a||"file"===i)&&(n+=u,n+=u),a){let e=a.indexOf("@");if(-1!==e){const t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(":"),-1===e?n+=r(t,!1,!1):(n+=r(t.substr(0,e),!1,!1),n+=":",n+=r(t.substr(e+1),!1,!0)),n+="@"}a=a.toLowerCase(),e=a.lastIndexOf(":"),-1===e?n+=r(a,!1,!0):(n+=r(a.substr(0,e),!1,!0),n+=a.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return o&&(n+="?",n+=r(o,!1,!1)),l&&(n+="#",n+=t?l:g(l,!1,!1)),n}function R(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+R(e.substr(3)):e}}ze(g,"m"),ze(y,"y"),ze(v,"v"),ze(T,"b"),ze(R,"C");const $=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function b(e){return e.match($)?e.replace($,e=>R(e)):e}ze(b,"w");var E=r(975);const C=E.posix||E,A="/";var S,k;(k=S||(S={})).joinPath=function(e,...t){return e.with({path:C.join(e.path,...t)})},k.resolvePath=function(e,...t){let r=e.path,n=!1;r[0]!==A&&(r=A+r,n=!0);let i=C.resolve(r,...t);return n&&i[0]===A&&!e.authority&&(i=i.substring(1)),e.with({path:i})},k.dirname=function(e){if(0===e.path.length||e.path===A)return e;let t=C.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},k.basename=function(e){return C.basename(e.path)},k.extname=function(e){return C.extname(e.path)},uw=n})();var vw,{URI:Tw,Utils:Rw}=uw;!function(e){e.basename=Rw.basename,e.dirname=Rw.dirname,e.extname=Rw.extname,e.joinPath=Rw.joinPath,e.resolvePath=Rw.resolvePath;const t="object"==typeof process&&"win32"===process?.platform;function r(e,t){return e?.toString()===t?.toString()}function n(e,r){const n="string"==typeof e?Tw.parse(e).path:e.path,i="string"==typeof r?Tw.parse(r).path:r.path,a=n.split("/").filter(e=>e.length>0),s=i.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),a[0]!==s[0])return i.substring(1)}let o=0;for(;o<a.length&&a[o]===s[o];o++);return"../".repeat(a.length-o)+s.slice(o).join("/")}function i(e){return Tw.parse(e.toString()).toString()}function a(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path;return"/"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),n===r||!(n.length<r.length)&&("/"===n.charAt(r.length)&&n.startsWith(r))}ze(r,"equals"),e.equals=r,ze(n,"relative"),e.relative=n,ze(i,"normalize"),e.normalize=i,ze(a,"contains"),e.contains=a}(vw||(vw={}));var $w,bw,Ew=class{static{ze(this,"UriTrie")}constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return vw.normalize(e)}clear(){this.root.children.clear()}insert(e,t){this.getNode(this.normalizeUri(e),!0).element=t}delete(e){const t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return void 0!==this.getNode(this.normalizeUri(e),!1)?.element}hasNode(e){return void 0!==this.getNode(this.normalizeUri(e),!1)}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);if(r)return{name:r.name,uri:vw.joinPath(Tw.parse(t),r.name).toString(),element:r.element}}findChildren(e){const t=this.normalizeUri(e),r=this.getNode(t,!1);return r?Array.from(r.children.values()).map(e=>({name:e.name,uri:vw.joinPath(Tw.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(vw.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const r=e.split("/");"/"===e.charAt(e.length-1)&&r.pop();let n=this.root;for(const i of r){let e=n.children.get(i);if(!e){if(!t)return;e={name:i,children:new Map,parent:n},n.children.set(i,e)}n=e}return n}collectValues(e){const t=[];e.element&&t.push(e.element);for(const r of e.children.values())t.push(...this.collectValues(r));return t}};(bw=$w||($w={}))[bw.Changed=0]="Changed",bw[bw.Parsed=1]="Parsed",bw[bw.IndexedContent=2]="IndexedContent",bw[bw.ComputedScopes=3]="ComputedScopes",bw[bw.Linked=4]="Linked",bw[bw.IndexedReferences=5]="IndexedReferences",bw[bw.Validated=6]="Validated";var Cw=class{static{ze(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=ew.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??Tw.parse(e.uri),ew.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return ew.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if("string"==typeof t){const n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}if("$model"in t){const r={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(r,e)}{const n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if("string"==typeof t){const n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}{const n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let i;if(r)i={parseResult:e,uri:t,state:$w.Parsed,references:[],textDocument:r};else{const r=this.createTextDocumentGetter(t,n);i={parseResult:e,uri:t,state:$w.Parsed,references:[],get textDocument(){return r()}}}return e.value.$document=i,i}async update(e,t){const r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=$w.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){const r=this.serviceRegistry;let n;return()=>n??(n=cw.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},Aw=class{static{ze(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new Ew,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return nr(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(e=>(this.addDocument(e),e));{const r=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(r),r}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,$w.Changed),r}deleteDocument(e){const t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=$w.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){const t=e.toString(),r=this.documentTrie.findAll(t);for(const n of r)n.state=$w.Changed;return this.documentTrie.delete(t),r}},Sw=Symbol("RefResolving"),kw=class{static{ze(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=ew.CancellationToken.None){if(this.profiler?.isActive("linking")){const r=this.profiler.createTask("linking",this.languageId);r.start();try{for(const n of mr(e.parseResult.value))await lw(t),yr(n).forEach(t=>{const i=`${n.$type}:${t.property}`;r.startSubTask(i);try{this.doLink(t,e)}finally{r.stopSubTask(i)}})}finally{r.stop()}}else for(const r of mr(e.parseResult.value))await lw(t),yr(r).forEach(t=>this.doLink(t,e))}doLink(e,t){const r=e.reference;if("_ref"in r&&void 0===r._ref){r._ref=Sw;try{const t=this.getCandidate(e);if(Vt(t))r._ref=t;else{r._nodeDescription=t;const n=this.loadAstNode(t);r._ref=n??this.createLinkingError(e,t)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);const t=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${t}`}}t.references.push(r)}else if("_items"in r&&void 0===r._items){r._items=Sw;try{const t=this.getCandidates(e),n=[];if(Vt(t))r._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&n.push({ref:t,$nodeDescription:e})}r._items=n}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,r,n){const i=this,a={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Kt(this._ref))return this._ref;if(Bt(this._nodeDescription)){const r=i.loadAstNode(this._nodeDescription);this._ref=r??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=Sw;const r=dr(e).$document,n=i.getLinkedNode({reference:a,container:e,property:t});if(n.error&&r&&r.state<$w.ComputedScopes)return this._ref=void 0;this._ref=n.node??n.error,this._nodeDescription=n.descr,r?.references.push(this)}else this._ref===Sw&&i.throwCyclicReferenceError(e,t,n);return Kt(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return Vt(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,r,n){const i=this,a={$refNode:r,$refText:n,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(void 0===this._items){this._items=Sw;const r=dr(e).$document,n=i.getCandidates({reference:a,container:e,property:t}),s=[];if(Vt(n))this._linkingError=n;else for(const e of n){const t=i.loadAstNode(e);t&&s.push({ref:t,$nodeDescription:e})}this._items=s,r?.references.push(this)}else this._items===Sw&&i.throwCyclicReferenceError(e,t,n);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;return this.items.length>0?void 0:this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if(Vt(t))return{error:t};const r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const r=dr(e.container).$document;r&&r.state<$w.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${r.uri}).`);return{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}};function ww(e){return"string"==typeof e.name}ze(ww,"isNamed");var xw=class{static{ze(this,"DefaultNameProvider")}getName(e){if(ww(e))return e.name}getNameNode(e){return ka(e.$cstNode,"name")}},Nw=class{static{ze(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=mr(e.Grammar).some(e=>Xr(e)&&e.isMulti)}findDeclarations(e){if(e){const t=_a(e),r=e.astNode;if(t&&r){const n=r[t.feature];if(Ut(n)||Wt(n))return pr(n);if(Array.isArray(n))for(const t of n)if((Ut(t)||Wt(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return pr(t)}if(r){const t=this.nameProvider.getNameNode(r);if(t&&(t===e||Ai(e,t)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r)for(const n of yr(r))if(Wt(n.reference)&&n.reference.items.some(t=>t.ref===e))return n.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n)??n.$cstNode;e&&r.push(e)}return r}findReferences(e,t){const r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(e=>vw.equals(e.sourceUri,t.documentUri))),r.push(...n),nr(r)}getSelfReferences(e){const t=this.getSelfNodes(e),r=[];for(const n of t){const e=this.nameProvider.getNameNode(n);if(e){const t=ur(n),i=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:t.uri,sourcePath:i,targetUri:t.uri,targetPath:i,segment:ki(e),local:!0})}}return r}},Iw=class{static{ze(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return ir.sum(nr(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const r=this.map.get(e);if(r){const n=r.indexOf(t);if(n>=0)return 1===r.length?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?nr(t):tr}has(e,t){if(void 0===t)return this.map.has(e);{const r=this.map.get(e);return!!r&&r.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(t=>e(t,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return nr(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return nr(this.map.keys())}values(){return nr(this.map.values()).flat()}entriesGroupedByKey(){return nr(this.map.entries())}},_w=class{static{ze(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}},Pw=class{static{ze(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=ew.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=fr,n=ew.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const a of r(e))await lw(n),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,r){const n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=ew.CancellationToken.None){const r=e.parseResult.value,n=new Iw;for(const i of hr(r))await lw(t),this.addLocalSymbol(i,e,n);return n}addLocalSymbol(e,t,r){const n=e.$container;if(n){const i=this.nameProvider.getName(e);i&&r.add(n,this.descriptions.createDescription(e,i,t))}}},Dw=class{static{ze(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},Ow=class{static{ze(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?nr(n).concat(this.outerScope.getElements(e)):nr(n)}getAllElements(){let e=nr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Lw=class{static{ze(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Iw,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(const n of e){const e=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(e,n)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];return r||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||0===r.length)&&this.outerScope?nr(r).concat(this.outerScope.getElements(e)):nr(r)}getAllElements(){let e=nr(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Mw={getElement(){},getElements:()=>tr,getAllElements:()=>tr},jw=class{static{ze(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Fw=class extends jw{static{ze(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},zw=class extends jw{static{ze(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){const e=r();return n.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},Gw=class extends zw{static{ze(this,"DocumentCache")}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(const r of t)this.clear(r)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{const r=e.concat(t);for(const n of r)this.clear(n)}))}},qw=class extends Fw{static{ze(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},Kw=class{static{ze(this,"DefaultScopeProvider")}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new qw(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),n=ur(e.container).localSymbols;if(n){let i=e.container;do{n.has(i)&&t.push(n.getStream(i).filter(e=>this.reflection.isSubtype(e.type,r))),i=i.$container}while(i)}let i=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)i=this.createScope(t[a],i);return i}createScope(e,t,r){return new Dw(nr(e),t,r)}createScopeForNodes(e,t,r){const n=nr(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new Dw(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Lw(this.indexManager.allElements(e)))}};function Uw(e){return"string"==typeof e.$comment}function Ww(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}ze(Uw,"isAstNodeWithComment"),ze(Ww,"isIntermediateReference");var Bw,Vw,Hw=class{static{ze(this,"DefaultJsonSerializer")}constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const r=t??{},n=t?.replacer,i=ze((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=n?(e,t)=>n(e,t,i):i;try{return this.currentDocument=ur(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:i,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(e)){if(Ut(t)){const e=t.ref,n=r?t.$refText:void 0;if(e){const t=ur(e);let r="";this.currentDocument&&this.currentDocument!==t&&(r=s?s(t.uri,e):t.uri.toString());return{$ref:`${r}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:n}}return{$error:t.error?.message??"Could not resolve reference",$refText:n}}if(Wt(t)){const e=r?t.$refText:void 0,n=[];for(const r of t.items){const e=r.ref,t=ur(r.ref);let i="";this.currentDocument&&this.currentDocument!==t&&(i=s?s(t.uri,e):t.uri.toString());const a=this.astNodeLocator.getAstNodePath(e);n.push(`${i}#${a}`)}return{$refs:n,$refText:e}}if(Kt(t)){let r;if(i&&(r=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!r?.$textRegion||(r.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(r??(r={...t}),r.$sourceText=t.$cstNode?.text),a){r??(r={...t});const e=this.commentProvider.getComment(t);e&&(r.$comment=e.replace(/\r/g,""))}return r??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=ze(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(e.$cstNode){const r=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(n=>{const i=Sa(e.$cstNode,n).map(t);0!==i.length&&(r[n]=i)}),e}}linkNode(e,t,r,n,i,a){for(const[o,l]of Object.entries(e))if(Array.isArray(l))for(let n=0;n<l.length;n++){const i=l[n];Ww(i)?l[n]=this.reviveReference(e,o,t,i,r):Kt(i)&&this.linkNode(i,t,r,e,o,n)}else Ww(l)?e[o]=this.reviveReference(e,o,t,l,r):Kt(l)&&this.linkNode(l,t,r,e,o);const s=e;s.$container=n,s.$containerProperty=i,s.$containerIndex=a}reviveReference(e,t,r,n,i){let a,s=n.$refText,o=n.$error;if(n.$ref){const e=this.getRefNode(r,n.$ref,i.uriConverter);if(Kt(e))return s||(s=this.nameProvider.getName(e)),{$refText:s??"",ref:e};o=e}else if(n.$refs){const e=[];for(const t of n.$refs){const n=this.getRefNode(r,t,i.uriConverter);Kt(n)&&e.push({ref:n})}if(0!==e.length)return{$refText:s??"",items:e};a={$refText:s??"",items:e},o??(o="Could not resolve multi-reference")}return o?(a??(a={$refText:s??"",ref:void 0}),a.error={info:{container:e,property:t,reference:a},message:o},a):void 0}getRefNode(e,t,r){try{const n=t.indexOf("#");if(0===n){const r=this.astNodeLocator.getAstNode(e,t.substring(1));return r||"Could not resolve path: "+t}if(n<0){const e=r?r(t):Tw.parse(t),n=this.langiumDocuments.getDocument(e);return n?n.parseResult.value:"Could not find document for URI: "+t}const i=r?r(t.substring(0,n)):Tw.parse(t.substring(0,n)),a=this.langiumDocuments.getDocument(i);if(!a)return"Could not find document for URI: "+t;if(n===t.length-1)return a.parseResult.value;const s=this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(n+1));return s||"Could not resolve URI: "+t}catch(n){return String(n)}}},Yw=class{static{ze(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){const t=e.LanguageMetaData;for(const r of t.fileExtensions)this.fileExtensionMap.has(r)&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(r,e);if(t.fileNames)for(const r of t.fileNames)this.fileNameMap.has(r)&&console.warn(`The file name ${r} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(r,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const t=this.textDocuments?.get(e)?.languageId;if(void 0!==t){const e=this.languageIdMap.get(t);if(e)return e}const r=vw.extname(e),n=vw.basename(e),i=this.fileNameMap.get(n)??this.fileExtensionMap.get(r);if(!i)throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}};function Xw(e){return{code:e}}ze(Xw,"diagnosticData"),(Vw=Bw||(Bw={})).defaults=["fast","slow","built-in"],Vw.all=Vw.defaults;var Jw,Qw,Zw=class{static{ze(this,"ValidationRegistry")}constructor(e){this.entries=new Iw,this.knownCategories=new Set(Bw.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");this.knownCategories.add(r);for(const[n,i]of Object.entries(e)){const e=i;if(Array.isArray(e))for(const i of e){const e={check:this.wrapValidationException(i,t),category:r};this.addEntry(n,e)}else if("function"==typeof e){const i={check:this.wrapValidationException(e,t),category:r};this.addEntry(n,i)}else Wi()}}wrapValidationException(e,t){return async(r,n,i)=>{await this.handleException(()=>e.call(t,r,n,i),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(i){if(ow(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);r("error",`${t}: ${i instanceof Error?i.message:String(i)}`,{node:n})}}addEntry(e,t){if("AstNode"!==e)for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t);else this.entries.add("AstNode",t)}getChecks(e,t){let r=nr(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(e=>t.includes(e.category))),r.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,i,a,s)=>{await this.handleException(()=>e.call(r,n,i,a,s),t,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},ex=Object.freeze({validateNode:!0,validateChildren:!0}),tx=class{static{ze(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=ew.CancellationToken.None){const n=e.parseResult,i=[];if(await lw(r),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(n,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===Jw.LexingError))return i;if(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===Jw.ParsingError))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===Jw.LinkingError))return i}try{i.push(...await this.validateAst(n.value,t,r))}catch(a){if(ow(a))throw a;console.error("An error occurred during validation:",a)}return await lw(r),i}processLexingErrors(e,t,r){const n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const i of n){const e=i.severity??"error",r={severity:nx(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:ix(e),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,r){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const r={line:t.endLine-1,character:t.endColumn};e={start:r,end:r}}}}else e=Si(n.token);if(e){const r={severity:nx("error"),range:e,message:n.message,data:Xw(Jw.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,r){for(const n of e.references){const e=n.error;if(e){const r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:Jw.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,r))}}}async validateAst(e,t,r=ew.CancellationToken.None){const n=[],i=ze((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=ew.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const a of i)await lw(n),await a(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=ew.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const a=mr(e).iterator();for(const e of a){i.startSubTask(e.$type);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode)try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,r,n)}finally{i.stopSubTask(e.$type)}s.validateChildren||a.prune()}}finally{i.stop()}}else{const i=mr(e).iterator();for(const e of i){await lw(n);const a=this.validateSingleNodeOptions(e,t);if(a.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,r,n)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return ex}async validateAstAfter(e,t,r,n=ew.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const a of i)await lw(n),await a(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:rx(r),severity:nx(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function rx(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=ka(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Na(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function nx(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function ix(e){switch(e){case"error":return Xw(Jw.LexingError);case"warning":return Xw(Jw.LexingWarning);case"info":return Xw(Jw.LexingInfo);case"hint":return Xw(Jw.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}ze(rx,"getDiagnosticRange"),ze(nx,"toDiagnosticSeverity"),ze(ix,"toDiagnosticData"),(Qw=Jw||(Jw={})).LexingError="lexing-error",Qw.LexingWarning="lexing-warning",Qw.LexingInfo="lexing-info",Qw.LexingHint="lexing-hint",Qw.ParsingError="parsing-error",Qw.LinkingError="linking-error";var ax=class{static{ze(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){const n=r??ur(e);t??(t=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let a;const s=ze(()=>a??(a=ki(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:ki(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},sx=class{static{ze(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=ew.CancellationToken.None){const r=[],n=e.parseResult.value;for(const i of mr(n))await lw(t),yr(i).forEach(e=>{e.reference.error||r.push(...this.createInfoDescriptions(e))});return r}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Ut(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Wt(t)&&(r=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const n=ur(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],s=ki(t.$refNode);for(const o of r)a.push({sourceUri:n,sourcePath:i,targetUri:o.documentUri,targetPath:o.path,segment:s,local:vw.equals(o.documentUri,n)});return a}},ox=class{static{ze(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const r=t.indexOf(this.indexSeparator);if(r>0){const n=t.substring(0,r),i=parseInt(t.substring(r+1)),a=e[n];return a?.[i]}return e[t]},e)}},lx={};Ue(lx,We(Ze(),1));var cx,ux=class{static{ze(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new dw,this.onConfigurationSectionUpdateEmitter=new lx.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,r[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},dx=We(zt(),1);!function(e){function t(e){return{dispose:ze(async()=>await e(),"dispose")}}ze(t,"create"),e.create=t}(cx||(cx={}));var px=class{static{ze(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Iw,this.documentPhaseListeners=new Iw,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=$w.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=ew.CancellationToken.None){for(const n of e){const e=n.uri.toString();if(n.state===$w.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(n,$w.IndexedReferences);else if("object"==typeof t.validation){const r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=$w.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=$w.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=ew.CancellationToken.None){this.currentState=$w.Changed;const n=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e)n.push(t.uri),this.cleanUpDeleted(t)}const i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const o of i){let e=this.langiumDocuments.getDocument(o);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),e.state=$w.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,$w.Changed)}const a=nr(i).concat(n).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,$w.ComputedScopes)),await this.emitUpdate(i,n),await lw(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<$w.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(s,this.updateBuildOptions,r)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){const r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set;return nr(void 0===t||!0===t.validation?n:"object"==typeof t.validation?t.validation.categories??n:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t<r;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;r>=0&&!this.hasTextDocument(e[r]);)r--;t<r&&([e[t],e[r]]=[e[r],e[t]])}return e}hasTextDocument(e){return Boolean(this.textDocuments?.get(e.uri))}shouldRelink(e,t){return!!e.references.some(e=>void 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),cx.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case $w.Changed:case $w.Parsed:this.indexManager.removeContent(e.uri);case $w.IndexedContent:e.localSymbols=void 0;case $w.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case $w.Linked:this.indexManager.removeReferences(e.uri);case $w.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case $w.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=$w.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,$w.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,$w.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,$w.ComputedScopes,r,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,r)});const n=e.filter(e=>this.shouldLink(e));await this.runCancelable(n,$w.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(n,$w.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));const i=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(i,$w.Validated,r,async e=>{await this.validate(e,r),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const r of e){const e=r.uri.toString(),n=this.buildState.get(e);n&&!n.completed||this.buildState.set(e,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,n){for(const a of e)a.state<t&&(await lw(r),await n(a),a.state=t,await this.notifyDocumentPhase(a,t,r));const i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),cx.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),cx.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=ew.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){const n=this.langiumDocuments.getDocument(t);return n?n.state>=e?Promise.resolve(t):r.isCancellationRequested?Promise.reject(sw):this.currentState>=e&&e>n.state?Promise.reject(new dx.ResponseError(dx.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${$w[n.state]}, requiring ${$w[e]}, but workspace state is already ${$w[this.currentState]}. Returning undefined.`)):new Promise((n,i)=>{const a=this.onDocumentPhase(e,e=>{vw.equals(e.uri,t)&&(a.dispose(),s.dispose(),n(e.uri))}),s=r.onCancellationRequested(()=>{a.dispose(),s.dispose(),i(sw)})}):Promise.reject(new dx.ResponseError(dx.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(sw):new Promise((r,n)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),r()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),n(sw)})})}async notifyDocumentPhase(e,t,r){const n=this.documentPhaseListeners.get(t).slice();for(const a of n)try{await lw(r),await a(e,r)}catch(i){if(!ow(i))throw i}}async notifyBuildPhase(e,t,r){if(0===e.length)return;const n=this.buildPhaseListeners.get(t).slice();for(const i of n)await lw(r),await i(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),i="object"==typeof n.validation?{...n.validation}:{};i.categories=this.findMissingValidationCategories(e,n);const a=await r.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;const s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=nr(s.result.validationChecks).concat(i.categories).distinct().toArray():s.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},fx=class{static{ze(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new zw,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=ur(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{vw.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),nr(n)}allElements(e,t){let r=nr(this.symbolIndex.keys());return t&&(r=r.filter(e=>!t||t.has(e))),r.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=ew.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=ew.CancellationToken.None){const r=this.serviceRegistry.getServices(e.uri),n=await r.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return!!r&&r.some(e=>!e.local&&t.has(e.targetUri.toString()))}},hx=class{static{ze(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new dw,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=ew.CancellationToken.None){const r=await this.performStartup(e);await lw(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=[],r=ze(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");await this.loadAdditionalDocuments(e,r);const n=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,n)));const i=nr(n).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const r=await this.langiumDocuments.getOrCreateDocument(e);t(r)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Tw.parse(e.uri)}async traverseFolder(e,t){try{const r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=vw.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}},mx=class{static{ze(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return Sy.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return Sy.buildUnableToPopLexerModeMessage(e)}},gx={mode:"full"},yx=class{static{ze(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=Rx(t)?Object.values(t):t,n="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new wy(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=gx){const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Rx(e))return e;const t=Tx(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}};function vx(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function Tx(e){return e&&"modes"in e&&"defaultMode"in e}function Rx(e){return!vx(e)&&!Tx(e)}function $x(e,t,r){let n,i;"string"==typeof e?(i=t,n=r):(i=e.range.start,n=t),i||(i=o.create(0,0));return _x({index:0,tokens:Sx({lines:Ex(e),position:i,options:Fx(n)}),position:i})}function bx(e,t){const r=Fx(t),n=Ex(e);if(0===n.length)return!1;const i=n[0],a=n[n.length-1],s=r.start,o=r.end;return Boolean(s?.exec(i))&&Boolean(o?.exec(a))}function Ex(e){let t="";t="string"==typeof e?e:e.text;return t.split(la)}ze(vx,"isTokenTypeArray"),ze(Tx,"isIMultiModeLexerDefinition"),ze(Rx,"isTokenTypeDictionary"),Xe(),ze($x,"parseJSDoc"),ze(bx,"isJSDoc"),ze(Ex,"getLines");var Cx=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Ax=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Sx(e){const t=[];let r=e.position.line,n=e.position.character;for(let i=0;i<e.lines.length;i++){const a=0===i,s=i===e.lines.length-1;let c=e.lines[i],u=0;if(a&&e.options.start){const t=e.options.start?.exec(c);t&&(u=t.index+t[0].length)}else{const t=e.options.line?.exec(c);t&&(u=t.index+t[0].length)}if(s){const t=e.options.end?.exec(c);t&&(c=c.substring(0,t.index))}c=c.substring(0,Ix(c));if(Nx(c,u)>=c.length){if(t.length>0){const e=o.create(r,n);t.push({type:"break",content:"",range:l.create(e,e)})}}else{Cx.lastIndex=u;const e=Cx.exec(c);if(e){const i=e[0],a=e[1],s=o.create(r,n+u),d=o.create(r,n+u+i.length);t.push({type:"tag",content:a,range:l.create(s,d)}),u+=i.length,u=Nx(c,u)}if(u<c.length){const e=c.substring(u),i=Array.from(e.matchAll(Ax));t.push(...kx(i,e,r,n+u))}}r++,n=0}return t.length>0&&"break"===t[t.length-1].type?t.slice(0,-1):t}function kx(e,t,r,n){const i=[];if(0===e.length){const e=o.create(r,n),a=o.create(r,n+t.length);i.push({type:"text",content:t,range:l.create(e,a)})}else{let a=0;for(const c of e){const e=c.index,s=t.substring(a,e);s.length>0&&i.push({type:"text",content:t.substring(a,e),range:l.create(o.create(r,a+n),o.create(r,e+n))});let u=s.length+1;const d=c[1];if(i.push({type:"inline-tag",content:d,range:l.create(o.create(r,a+u+n),o.create(r,a+u+d.length+n))}),u+=d.length,4===c.length){u+=c[2].length;const e=c[3];i.push({type:"text",content:e,range:l.create(o.create(r,a+u+n),o.create(r,a+u+e.length+n))})}else i.push({type:"text",content:"",range:l.create(o.create(r,a+u+n),o.create(r,a+u+n))});a=e+c[0].length}const s=t.substring(a);s.length>0&&i.push({type:"text",content:s,range:l.create(o.create(r,a+n),o.create(r,a+n+s.length))})}return i}ze(Sx,"tokenize"),ze(kx,"buildInlineTokens");var wx=/\S/,xx=/\s*$/;function Nx(e,t){const r=e.substring(t).match(wx);return r?t+r.index:e.length}function Ix(e){const t=e.match(xx);if(t&&"number"==typeof t.index)return t.index}function _x(e){const t=o.create(e.position.line,e.position.character);if(0===e.tokens.length)return new Gx([],l.create(t,t));const r=[];for(;e.index<e.tokens.length;){const t=Px(e,r[r.length-1]);t&&r.push(t)}const n=r[0]?.range.start??t,i=r[r.length-1]?.range.end??t;return new Gx(r,l.create(n,i))}function Px(e,t){const r=e.tokens[e.index];return"tag"===r.type?Mx(e,!1):"text"===r.type||"inline-tag"===r.type?Ox(e):(Dx(r,t),void e.index++)}function Dx(e,t){if(t){const r=new Bx("",e.range);"inlines"in t?t.inlines.push(r):t.content.inlines.push(r)}}function Ox(e){let t=e.tokens[e.index];const r=t;let n=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Lx(e)),n=t,t=e.tokens[e.index];return new Wx(i,l.create(r.range.start,n.range.end))}function Lx(e){return"inline-tag"===e.tokens[e.index].type?Mx(e,!0):jx(e)}function Mx(e,t){const r=e.tokens[e.index++],n=r.content.substring(1),i=e.tokens[e.index];if("text"===i?.type){if(t){const i=jx(e);return new qx(n,new Wx([i],i.range),t,l.create(r.range.start,i.range.end))}{const i=Ox(e);return new qx(n,i,t,l.create(r.range.start,i.range.end))}}{const e=r.range;return new qx(n,new Wx([],e),t,e)}}function jx(e){const t=e.tokens[e.index++];return new Bx(t.content,t.range)}function Fx(e){if(!e)return Fx({start:"/**",end:"*/",line:"*"});const{start:t,end:r,line:n}=e;return{start:zx(t,!0),end:zx(r,!1),line:zx(n,!0)}}function zx(e,t){if("string"==typeof e||"object"==typeof e){const r="string"==typeof e?ga(e):e.source;return t?new RegExp(`^\\s*${r}`):new RegExp(`\\s*${r}\\s*$`)}return e}ze(Nx,"skipWhitespace"),ze(Ix,"lastCharacter"),ze(_x,"parseJSDocComment"),ze(Px,"parseJSDocElement"),ze(Dx,"appendEmptyLine"),ze(Ox,"parseJSDocText"),ze(Lx,"parseJSDocInline"),ze(Mx,"parseJSDocTag"),ze(jx,"parseJSDocLine"),ze(Fx,"normalizeOptions"),ze(zx,"normalizeOption");var Gx=class{static{ze(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const r=t.toString();e+=Vx(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(0===t.length)t=r.toMarkdown(e);else{const n=r.toMarkdown(e);t+=Vx(t)+n}return t.trim()}},qx=class{static{ze(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const r=Kx(this.name,t,e??{});if("string"==typeof r)return r}let r="";"italic"===e?.tag||void 0===e?.tag?r="*":"bold"===e?.tag?r="**":"bold-italic"===e?.tag&&(r="***");let n=`${r}@${this.name}${r}`;return 1===this.content.inlines.length?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n}\n${t}`),this.inline?`{${n}}`:n}};function Kx(e,t,r){if("linkplain"===e||"linkcode"===e||"link"===e){const n=t.indexOf(" ");let i=t;if(n>0){const e=Nx(t,n);i=t.substring(e),t=t.substring(0,n)}("linkcode"===e||"link"===e&&"code"===r.link)&&(i=`\`${i}\``);return r.renderLink?.(t,i)??Ux(t,i)}}function Ux(e,t){try{return Tw.parse(e,!0),`[${t}](${e})`}catch{return e}}ze(Kx,"renderInlineTag"),ze(Ux,"renderLinkDefault");var Wx=class{static{ze(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;t<this.inlines.length;t++){const r=this.inlines[t],n=this.inlines[t+1];e+=r.toString(),n&&n.range.start.line>r.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let r=0;r<this.inlines.length;r++){const n=this.inlines[r],i=this.inlines[r+1];t+=n.toMarkdown(e),i&&i.range.start.line>n.range.start.line&&(t+="\n")}return t}},Bx=class{static{ze(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function Vx(e){return e.endsWith("\n")?"\n":"\n\n"}ze(Vx,"fillNewlines");var Hx,Yx=class{static{ze(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&bx(t)){return $x(t).toMarkdown({renderLink:ze((t,r)=>this.documentationLinkRenderer(e,t,r),"renderLink"),renderTag:ze(t=>this.documentationTagRenderer(e,t),"renderTag")})}}documentationLinkRenderer(e,t,r){const n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){const e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1;return`[${r}](${n.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const r=ur(e).localSymbols;if(!r)return;let n=e;do{const e=r.getStream(n).find(e=>e.name===t);if(e)return e;n=n.$container}while(n)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},Xx=class{static{ze(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Uw(e)?e.$comment:_i(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},Jx=class{static{ze(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Qx=class{static{ze(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){const e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){const t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){const r=await this.acquireParserWorker(t),n=new dw;let i;const a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{const t=this.hydrator.hydrate(e);n.resolve(t)}).catch(e=>{n.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(e){e.terminate();const t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(const r of this.workerPool)if(r.ready)return r.lock(),r;const t=new dw;return e.onCancellationRequested(()=>{const e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(sw)}),this.queue.push(t),t.promise}},Zx=class{static{ze(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new lx.Emitter,this.deferred=new dw,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{const t=e;this.deferred.resolve(t),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(sw),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new dw,this.sendMessage(e),this.deferred.promise}},eN=class{static{ze(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new ew.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=iw();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=ew.CancellationToken.None){const n=new dw,i={action:t,deferred:n,cancellationToken:r};return e.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:r})=>{try{const n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(n){ow(n)?t.resolve(void 0):t.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},tN=class{static{ze(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new _w,this.tokenTypeIdMap=new _w,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,r=new Map;for(const n of mr(e))t.set(n,{});if(e.$cstNode)for(const n of Ei(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){const e=[];r[n]=e;for(const r of i)Kt(r)?e.push(this.dehydrateAstNode(r,t)):Ut(r)?e.push(this.dehydrateReference(r,t)):e.push(r)}else Kt(i)?r[n]=this.dehydrateAstNode(i,t):Ut(i)?r[n]=this.dehydrateReference(i,t):void 0!==i&&(r[n]=i);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return Jt(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Yt(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):Xt(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const i of mr(e))t.set(i,{});let n;if(e.$cstNode)for(const i of Ei(e.$cstNode)){let e;"fullText"in i?(e=new vk(i.fullText),n=e):"content"in i?e=new gk:"tokenType"in i&&(e=this.hydrateCstLeafNode(i)),e&&(r.set(i,e),e.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){const e=[];r[n]=e;for(const a of i)Kt(a)?e.push(this.setParent(this.hydrateAstNode(a,t),r)):Ut(a)?e.push(this.hydrateReference(a,r,n,t)):e.push(a)}else Kt(i)?r[n]=this.setParent(this.hydrateAstNode(i,t),r):Ut(i)?r[n]=this.hydrateReference(i,r,n,t):void 0!==i&&(r[n]=i);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),Yt(n))for(const i of e.content){const e=this.hydrateCstNode(i,t,r++);n.content.push(e)}return n}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,i=e.startLine,a=e.startColumn,s=e.endLine,o=e.endColumn,l=e.hidden;return new mk(r,n,{start:{line:i,character:a},end:{line:s,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of mr(this.grammar))Cr(t)&&this.grammarElementIdMap.set(t,e++)}};function rN(e){return{documentation:{CommentProvider:ze(e=>new Xx(e),"CommentProvider"),DocumentationProvider:ze(e=>new Yx(e),"DocumentationProvider")},parser:{AsyncParser:ze(e=>new Jx(e),"AsyncParser"),GrammarConfig:ze(e=>is(e),"GrammarConfig"),LangiumParser:ze(e=>Yk(e),"LangiumParser"),CompletionParser:ze(e=>Hk(e),"CompletionParser"),ValueConverter:ze(()=>new Zk,"ValueConverter"),TokenBuilder:ze(()=>new Qk,"TokenBuilder"),Lexer:ze(e=>new yx(e),"Lexer"),ParserErrorMessageProvider:ze(()=>new Ak,"ParserErrorMessageProvider"),LexerErrorMessageProvider:ze(()=>new mx,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:ze(()=>new ox,"AstNodeLocator"),AstNodeDescriptionProvider:ze(e=>new ax(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:ze(e=>new sx(e),"ReferenceDescriptionProvider")},references:{Linker:ze(e=>new kw(e),"Linker"),NameProvider:ze(()=>new xw,"NameProvider"),ScopeProvider:ze(e=>new Kw(e),"ScopeProvider"),ScopeComputation:ze(e=>new Pw(e),"ScopeComputation"),References:ze(e=>new Nw(e),"References")},serializer:{Hydrator:ze(e=>new tN(e),"Hydrator"),JsonSerializer:ze(e=>new Hw(e),"JsonSerializer")},validation:{DocumentValidator:ze(e=>new tx(e),"DocumentValidator"),ValidationRegistry:ze(e=>new Zw(e),"ValidationRegistry")},shared:ze(()=>e.shared,"shared")}}function nN(e){return{ServiceRegistry:ze(e=>new Yw(e),"ServiceRegistry"),workspace:{LangiumDocuments:ze(e=>new Aw(e),"LangiumDocuments"),LangiumDocumentFactory:ze(e=>new Cw(e),"LangiumDocumentFactory"),DocumentBuilder:ze(e=>new px(e),"DocumentBuilder"),IndexManager:ze(e=>new fx(e),"IndexManager"),WorkspaceManager:ze(e=>new hx(e),"WorkspaceManager"),FileSystemProvider:ze(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:ze(()=>new eN,"WorkspaceLock"),ConfigurationProvider:ze(e=>new ux(e),"ConfigurationProvider")},profilers:{}}}function iN(e,t,r,n,i,a,s,o,l){return oN([e,t,r,n,i,a,s,o,l].reduce(uN,{}))}ze(rN,"createDefaultCoreModule"),ze(nN,"createDefaultSharedCoreModule"),(Hx||(Hx={})).merge=(e,t)=>uN(uN({},e),t),ze(iN,"inject");var aN=Symbol("isProxy");function sN(e){if(e&&e[aN])for(const t of Object.values(e))sN(t);return e}function oN(e,t){const r=new Proxy({},{deleteProperty:ze(()=>!1,"deleteProperty"),set:ze(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:ze((n,i)=>i===aN||cN(n,i,e,t||r),"get"),getOwnPropertyDescriptor:ze((n,i)=>(cN(n,i,e,t||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:ze((t,r)=>r in e,"has"),ownKeys:ze(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}ze(sN,"eagerLoad"),ze(oN,"_inject");var lN=Symbol();function cN(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===lN)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in r){const a=r[t];e[t]=lN;try{e[t]="function"==typeof a?a(n):oN(a,n)}catch(i){throw e[t]=i instanceof Error?i:void 0,i}return e[t]}}function uN(e,t){if(t)for(const[r,n]of Object.entries(t))if(null!=n)if("object"==typeof n){const t=e[r];e[r]=uN("object"==typeof t&&null!==t?t:{},n)}else e[r]=n;return e}ze(cN,"_resolve"),ze(uN,"_merge");var dN,pN,fN={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(pN=dN||(dN={})).REGULAR="indentation-sensitive",pN.IGNORE_INDENTATION="ignore-indentation";var hN=class extends Qk{static{ze(this,"IndentationAwareTokenBuilder")}constructor(e=fN){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...fN,...e},this.indentTokenType=Fy({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Fy({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){const r=super.buildTokens(e,t);if(!vx(r))throw new Error("Invalid tokens built by default builder");const{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options;let o,l,c;const u=[];for(const d of r){for(const[e,t]of s)d.name===e?d.PUSH_MODE=dN.IGNORE_INDENTATION:d.name===t&&(d.POP_MODE=!0);d.name===i?o=d:d.name===n?l=d:d.name===a?c=d:u.push(d)}if(!o||!l||!c)throw new Error("Some indentation/whitespace tokens not found!");if(s.length>0){return{modes:{[dN.REGULAR]:[o,l,...u,c],[dN.IGNORE_INDENTATION]:[...u,c]},defaultMode:dN.REGULAR}}return[o,l,c,...u]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return 0===t||"\r\n".includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;const i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,r,n){const i=this.getLineNumber(t,n);return qy(e,r,n,n+r.length,i,i,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:i,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,n);return i<=a?null:(this.indentationStack.push(i),s)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;const{currIndentLevel:i,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,n);if(i>=a)return null;const o=this.indentationStack.lastIndexOf(i);if(-1===o)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:s?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;const l=this.indentationStack.length-o-1,c=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let u=0;u<l;u++){const n=this.createIndentationTokenInstance(this.dedentTokenType,e,"",t-(c-1));r.push(n),this.indentationStack.pop()}return null}buildTerminalToken(e){const t=super.buildTerminalToken(e),{indentTokenName:r,dedentTokenName:n,whitespaceTokenName:i}=this.options;return t.name===r?this.indentTokenType:t.name===n?this.dedentTokenType:t.name===i?Fy({name:i,pattern:this.whitespaceRegExp,group:wy.SKIPPED}):t}flushRemainingDedents(e){const t=[];for(;this.indentationStack.length>1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},mN=class extends yx{static{ze(this,"IndentationAwareLexer")}constructor(e){if(super(e),!(e.parser.TokenBuilder instanceof hN))throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder");this.indentationTokenBuilder=e.parser.TokenBuilder}tokenize(e,t=gx){const r=super.tokenize(e),n=r.report;"full"===t?.mode&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];const{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,s=i.tokenTypeIdx,o=a.tokenTypeIdx,l=[],c=r.tokens.length-1;for(let u=0;u<c;u++){const e=r.tokens[u],t=r.tokens[u+1];e.tokenTypeIdx!==s||t.tokenTypeIdx!==o?l.push(e):u++}return c>=0&&l.push(r.tokens[c]),r.tokens=l,r}},gN={};qe(gN,{AstUtils:()=>sr,BiMap:()=>_w,Cancellation:()=>ew,ContextCache:()=>zw,CstUtils:()=>qt,DONE_RESULT:()=>rr,Deferred:()=>dw,Disposable:()=>cx,DisposableCache:()=>jw,DocumentCache:()=>Gw,EMPTY_STREAM:()=>tr,ErrorWithLocation:()=>Ui,GrammarUtils:()=>Ki,MultiMap:()=>Iw,OperationCancelled:()=>sw,Reduction:()=>ir,RegExpUtils:()=>Vi,SimpleCache:()=>Fw,StreamImpl:()=>Qt,TreeStreamImpl:()=>ar,URI:()=>Tw,UriTrie:()=>Ew,UriUtils:()=>vw,WorkspaceCache:()=>qw,assertCondition:()=>Bi,assertUnreachable:()=>Wi,delayNextTick:()=>tw,interruptAndCheck:()=>lw,isOperationCancelled:()=>ow,loadGrammarFromJson:()=>bN,setInterruptionPeriod:()=>aw,startCancelableOperation:()=>iw,stream:()=>nr}),Ue(gN,lx);var yN=class{static{ze(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},vN={fileSystemProvider:ze(()=>new yN,"fileSystemProvider")},TN={Grammar:ze(()=>{},"Grammar"),LanguageMetaData:ze(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},RN={AstReflection:ze(()=>new Ri,"AstReflection")};function $N(){const e=iN(nN(vN),RN),t=iN(rN({shared:e}),TN);return e.ServiceRegistry.register(t),t}function bN(e){const t=$N(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Tw.parse(`memory:/${r.name??"grammar"}.langium`)),r}ze($N,"createMinimalGrammarServices"),ze(bN,"loadGrammarFromJson"),Ue(Gt,gN);var EN,CN,AN,SN,kN,wN,xN,NN,IN,_N,PN=class{static{ze(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new Iw}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new DN(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);const r=[];for(const a of t.entries.keys()){const e=t.entries.get(a),n=e.reduce((e,t)=>e+t);r.push({name:`${t.identifier}.${a}`,count:e.length,duration:n})}const n=t.duration-r.map(e=>e.duration).reduce((e,t)=>e+t,0);function i(e){return Math.round(100*e)/100}return r.push({name:t.identifier,count:1,duration:n}),r.sort((e,t)=>t.duration-e.duration),ze(i,"Round"),console.table(r.map(e=>({Element:e.name,Count:e.count,"Self %":i(100*e.duration/t.duration),"Time (ms)":i(e.duration)}))),t}getRecords(...e){return 0===e.length?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},DN=class{static{ze(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Iw,this.addRecord=e,this.identifier=t}start(){if(void 0!==this.startTime)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(void 0===this.startTime)throw new Error(`Task "${this.identifier}" was not started.`);if(0!==this.stack.length)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(", ")}.`);const e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){const t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);const r=performance.now()-t.start;void 0!==this.stack.at(-1)&&(this.stack[this.stack.length-1].content+=r);const n=r-t.content;this.entries.add(e,n)}};(EN||(EN={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(CN||(CN={})).Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/},(AN||(AN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(SN||(SN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(kN||(kN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(wN||(wN={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(xN||(xN={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(NN||(NN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},(IN||(IN={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/},(_N||(_N={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/};EN.Terminals,CN.Terminals,AN.Terminals,SN.Terminals,kN.Terminals,wN.Terminals,xN.Terminals,IN.Terminals,NN.Terminals,_N.Terminals;var ON="Accelerator",LN="name",MN="x",jN="y",FN="Anchor",zN="evolution",GN="name",qN="visibility",KN="Annotation",UN="number",WN="text",BN="x",VN="y",HN="Annotations",YN="x",XN="y",JN="Architecture",QN="accDescr",ZN="accTitle",eI="edges",tI="groups",rI="junctions",nI="services",iI="title";ze(function(e){return FO.isInstance(e,JN)},"isArchitecture");var aI="Axis",sI="label",oI="name",lI="Branch",cI="name",uI="order";ze(function(e){return FO.isInstance(e,lI)},"isBranch");var dI="Checkout",pI="branch",fI="CherryPicking",hI="id",mI="parent",gI="tags",yI="ClassDefStatement",vI="className",TI="styleText",RI="Commit",$I="id",bI="message",EI="tags",CI="type";ze(function(e){return FO.isInstance(e,RI)},"isCommit");var AI="Common",SI="accDescr",kI="accTitle",wI="title",xI="Component",NI="decorator",II="evolution",_I="inertia",PI="label",DI="name",OI="visibility",LI="Curve",MI="entries",jI="label",FI="name",zI="Deaccelerator",GI="name",qI="x",KI="y",UI="Decorator",WI="strategy",BI="Direction",VI="accDescr",HI="accTitle",YI="dir",XI="statements",JI="title",QI="Edge",ZI="lhsDir",e_="lhsGroup",t_="lhsId",r_="lhsInto",n_="rhsDir",i_="rhsGroup",a_="rhsId",s_="rhsInto",o_="title",l_="EmDataEntity",c_="dataBlockValue",u_="dataType",d_="name",p_="EmFrame",f_="EmGwt",h_="givenStatements",m_="sourceFrame",g_="thenStatements",y_="whenStatements",v_="EmGwtStatement",T_="entityIdentifier",R_="EmModelEntity",$_="name";ze(function(e){return"rmo"===e||"readmodel"===e||"ui"===e||"cmd"===e||"command"===e||"evt"===e||"event"===e||"pcr"===e||"processor"===e},"isEmModelEntityType");var b_="EmNoteEntity",E_="dataBlockValue",C_="dataType",A_="sourceFrame",S_="EmResetFrame",k_="dataInlineValue",w_="dataReference",x_="dataType",N_="entityIdentifier",I_="modelEntityType",__="name",P_="sourceFrames";function D_(e){return FO.isInstance(e,S_)}ze(D_,"isEmResetFrame");var O_="EmTimeFrame",L_="dataInlineValue",M_="dataReference",j_="dataType",F_="entityIdentifier",z_="modelEntityType",G_="name",q_="sourceFrames",K_="Entry",U_="axis",W_="value",B_="EventModel",V_="accDescr",H_="accTitle",Y_="dataEntities",X_="frames",J_="gwtEntities",Q_="modelEntities",Z_="noteEntities",eP="title",tP="Evolution",rP="stages",nP="EvolutionStage",iP="boundary",aP="name",sP="secondName",oP="Evolve",lP="component",cP="target",uP="GitGraph",dP="accDescr",pP="accTitle",fP="statements",hP="title";ze(function(e){return FO.isInstance(e,uP)},"isGitGraph");var mP="Group",gP="icon",yP="id",vP="in",TP="title",RP="Info",$P="accDescr",bP="accTitle",EP="title";ze(function(e){return FO.isInstance(e,RP)},"isInfo");var CP="Item",AP="classSelector",SP="name",kP="Junction",wP="id",xP="in",NP="Label",IP="negX",_P="negY",PP="offsetX",DP="offsetY",OP="Leaf",LP="classSelector",MP="name",jP="value",FP="Link",zP="arrow",GP="from",qP="fromPort",KP="linkLabel",UP="to",WP="toPort",BP="Merge",VP="branch",HP="id",YP="tags",XP="type";ze(function(e){return FO.isInstance(e,BP)},"isMerge");var JP="Note",QP="evolution",ZP="text",eD="visibility",tD="Option",rD="name",nD="value",iD="Packet",aD="accDescr",sD="accTitle",oD="blocks",lD="title";ze(function(e){return FO.isInstance(e,iD)},"isPacket");var cD="PacketBlock",uD="bits",dD="end",pD="label",fD="start";ze(function(e){return FO.isInstance(e,cD)},"isPacketBlock");var hD="Pie",mD="accDescr",gD="accTitle",yD="sections",vD="showData",TD="title";ze(function(e){return FO.isInstance(e,hD)},"isPie");var RD="PieSection",$D="label",bD="value";ze(function(e){return FO.isInstance(e,RD)},"isPieSection");var ED="Pipeline",CD="components",AD="parent",SD="PipelineComponent",kD="evolution",wD="label",xD="name",ND="Radar",ID="accDescr",_D="accTitle",PD="axes",DD="curves",OD="options",LD="title",MD="Section",jD="classSelector",FD="name",zD="Service",GD="icon",qD="iconText",KD="id",UD="in",WD="title",BD="Size",VD="height",HD="width",YD="Statement",XD="Treemap",JD="accDescr",QD="accTitle",ZD="title",eO="TreemapRows";ze(function(e){return FO.isInstance(e,XD)},"isTreemap");var tO="TreemapRow",rO="indent",nO="item",iO="TreeNode",aO="indent",sO="name",oO="TreeView",lO="accDescr",cO="accTitle",uO="nodes",dO="title",pO="Wardley",fO="accDescr",hO="accelerators",mO="accTitle",gO="anchors",yO="annotation",vO="annotations",TO="components",RO="deaccelerators",$O="evolution",bO="evolves",EO="links",CO="notes",AO="pipelines",SO="size",kO="title";ze(function(e){return FO.isInstance(e,pO)},"isWardley");var wO,xO,NO,IO,_O,PO,DO,OO,LO,MO,jO=class extends Ht{constructor(){super(...arguments),this.types={Accelerator:{name:ON,properties:{name:{name:LN},x:{name:MN},y:{name:jN}},superTypes:[]},Anchor:{name:FN,properties:{evolution:{name:zN},name:{name:GN},visibility:{name:qN}},superTypes:[]},Annotation:{name:KN,properties:{number:{name:UN},text:{name:WN},x:{name:BN},y:{name:VN}},superTypes:[]},Annotations:{name:HN,properties:{x:{name:YN},y:{name:XN}},superTypes:[]},Architecture:{name:JN,properties:{accDescr:{name:QN},accTitle:{name:ZN},edges:{name:eI,defaultValue:[]},groups:{name:tI,defaultValue:[]},junctions:{name:rI,defaultValue:[]},services:{name:nI,defaultValue:[]},title:{name:iI}},superTypes:[]},Axis:{name:aI,properties:{label:{name:sI},name:{name:oI}},superTypes:[]},Branch:{name:lI,properties:{name:{name:cI},order:{name:uI}},superTypes:[YD]},Checkout:{name:dI,properties:{branch:{name:pI}},superTypes:[YD]},CherryPicking:{name:fI,properties:{id:{name:hI},parent:{name:mI},tags:{name:gI,defaultValue:[]}},superTypes:[YD]},ClassDefStatement:{name:yI,properties:{className:{name:vI},styleText:{name:TI}},superTypes:[]},Commit:{name:RI,properties:{id:{name:$I},message:{name:bI},tags:{name:EI,defaultValue:[]},type:{name:CI}},superTypes:[YD]},Common:{name:AI,properties:{accDescr:{name:SI},accTitle:{name:kI},title:{name:wI}},superTypes:[]},Component:{name:xI,properties:{decorator:{name:NI},evolution:{name:II},inertia:{name:_I,defaultValue:!1},label:{name:PI},name:{name:DI},visibility:{name:OI}},superTypes:[]},Curve:{name:LI,properties:{entries:{name:MI,defaultValue:[]},label:{name:jI},name:{name:FI}},superTypes:[]},Deaccelerator:{name:zI,properties:{name:{name:GI},x:{name:qI},y:{name:KI}},superTypes:[]},Decorator:{name:UI,properties:{strategy:{name:WI}},superTypes:[]},Direction:{name:BI,properties:{accDescr:{name:VI},accTitle:{name:HI},dir:{name:YI},statements:{name:XI,defaultValue:[]},title:{name:JI}},superTypes:[uP]},Edge:{name:QI,properties:{lhsDir:{name:ZI},lhsGroup:{name:e_,defaultValue:!1},lhsId:{name:t_},lhsInto:{name:r_,defaultValue:!1},rhsDir:{name:n_},rhsGroup:{name:i_,defaultValue:!1},rhsId:{name:a_},rhsInto:{name:s_,defaultValue:!1},title:{name:o_}},superTypes:[]},EmDataEntity:{name:l_,properties:{dataBlockValue:{name:c_},dataType:{name:u_},name:{name:d_}},superTypes:[]},EmFrame:{name:p_,properties:{},superTypes:[]},EmGwt:{name:f_,properties:{givenStatements:{name:h_,defaultValue:[]},sourceFrame:{name:m_,referenceType:p_},thenStatements:{name:g_,defaultValue:[]},whenStatements:{name:y_,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:v_,properties:{entityIdentifier:{name:T_,referenceType:R_}},superTypes:[]},EmModelEntity:{name:R_,properties:{name:{name:$_}},superTypes:[]},EmNoteEntity:{name:b_,properties:{dataBlockValue:{name:E_},dataType:{name:C_},sourceFrame:{name:A_,referenceType:p_}},superTypes:[]},EmResetFrame:{name:S_,properties:{dataInlineValue:{name:k_},dataReference:{name:w_,referenceType:l_},dataType:{name:x_},entityIdentifier:{name:N_},modelEntityType:{name:I_},name:{name:__},sourceFrames:{name:P_,defaultValue:[],referenceType:p_}},superTypes:[p_]},EmTimeFrame:{name:O_,properties:{dataInlineValue:{name:L_},dataReference:{name:M_,referenceType:l_},dataType:{name:j_},entityIdentifier:{name:F_},modelEntityType:{name:z_},name:{name:G_},sourceFrames:{name:q_,defaultValue:[],referenceType:p_}},superTypes:[p_]},Entry:{name:K_,properties:{axis:{name:U_,referenceType:aI},value:{name:W_}},superTypes:[]},EventModel:{name:B_,properties:{accDescr:{name:V_},accTitle:{name:H_},dataEntities:{name:Y_,defaultValue:[]},frames:{name:X_,defaultValue:[]},gwtEntities:{name:J_,defaultValue:[]},modelEntities:{name:Q_,defaultValue:[]},noteEntities:{name:Z_,defaultValue:[]},title:{name:eP}},superTypes:[]},Evolution:{name:tP,properties:{stages:{name:rP,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:nP,properties:{boundary:{name:iP},name:{name:aP},secondName:{name:sP}},superTypes:[]},Evolve:{name:oP,properties:{component:{name:lP},target:{name:cP}},superTypes:[]},GitGraph:{name:uP,properties:{accDescr:{name:dP},accTitle:{name:pP},statements:{name:fP,defaultValue:[]},title:{name:hP}},superTypes:[]},Group:{name:mP,properties:{icon:{name:gP},id:{name:yP},in:{name:vP},title:{name:TP}},superTypes:[]},Info:{name:RP,properties:{accDescr:{name:$P},accTitle:{name:bP},title:{name:EP}},superTypes:[]},Item:{name:CP,properties:{classSelector:{name:AP},name:{name:SP}},superTypes:[]},Junction:{name:kP,properties:{id:{name:wP},in:{name:xP}},superTypes:[]},Label:{name:NP,properties:{negX:{name:IP,defaultValue:!1},negY:{name:_P,defaultValue:!1},offsetX:{name:PP},offsetY:{name:DP}},superTypes:[]},Leaf:{name:OP,properties:{classSelector:{name:LP},name:{name:MP},value:{name:jP}},superTypes:[CP]},Link:{name:FP,properties:{arrow:{name:zP},from:{name:GP},fromPort:{name:qP},linkLabel:{name:KP},to:{name:UP},toPort:{name:WP}},superTypes:[]},Merge:{name:BP,properties:{branch:{name:VP},id:{name:HP},tags:{name:YP,defaultValue:[]},type:{name:XP}},superTypes:[YD]},Note:{name:JP,properties:{evolution:{name:QP},text:{name:ZP},visibility:{name:eD}},superTypes:[]},Option:{name:tD,properties:{name:{name:rD},value:{name:nD,defaultValue:!1}},superTypes:[]},Packet:{name:iD,properties:{accDescr:{name:aD},accTitle:{name:sD},blocks:{name:oD,defaultValue:[]},title:{name:lD}},superTypes:[]},PacketBlock:{name:cD,properties:{bits:{name:uD},end:{name:dD},label:{name:pD},start:{name:fD}},superTypes:[]},Pie:{name:hD,properties:{accDescr:{name:mD},accTitle:{name:gD},sections:{name:yD,defaultValue:[]},showData:{name:vD,defaultValue:!1},title:{name:TD}},superTypes:[]},PieSection:{name:RD,properties:{label:{name:$D},value:{name:bD}},superTypes:[]},Pipeline:{name:ED,properties:{components:{name:CD,defaultValue:[]},parent:{name:AD}},superTypes:[]},PipelineComponent:{name:SD,properties:{evolution:{name:kD},label:{name:wD},name:{name:xD}},superTypes:[]},Radar:{name:ND,properties:{accDescr:{name:ID},accTitle:{name:_D},axes:{name:PD,defaultValue:[]},curves:{name:DD,defaultValue:[]},options:{name:OD,defaultValue:[]},title:{name:LD}},superTypes:[]},Section:{name:MD,properties:{classSelector:{name:jD},name:{name:FD}},superTypes:[CP]},Service:{name:zD,properties:{icon:{name:GD},iconText:{name:qD},id:{name:KD},in:{name:UD},title:{name:WD}},superTypes:[]},Size:{name:BD,properties:{height:{name:VD},width:{name:HD}},superTypes:[]},Statement:{name:YD,properties:{},superTypes:[]},TreeNode:{name:iO,properties:{indent:{name:aO},name:{name:sO}},superTypes:[]},TreeView:{name:oO,properties:{accDescr:{name:lO},accTitle:{name:cO},nodes:{name:uO,defaultValue:[]},title:{name:dO}},superTypes:[]},Treemap:{name:XD,properties:{accDescr:{name:JD},accTitle:{name:QD},title:{name:ZD},TreemapRows:{name:eO,defaultValue:[]}},superTypes:[]},TreemapRow:{name:tO,properties:{indent:{name:rO},item:{name:nO}},superTypes:[]},Wardley:{name:pO,properties:{accDescr:{name:fO},accelerators:{name:hO,defaultValue:[]},accTitle:{name:mO},anchors:{name:gO,defaultValue:[]},annotation:{name:yO,defaultValue:[]},annotations:{name:vO,defaultValue:[]},components:{name:TO,defaultValue:[]},deaccelerators:{name:RO,defaultValue:[]},evolution:{name:$O},evolves:{name:bO,defaultValue:[]},links:{name:EO,defaultValue:[]},notes:{name:CO,defaultValue:[]},pipelines:{name:AO,defaultValue:[]},size:{name:SO},title:{name:kO}},superTypes:[]}}}static{ze(this,"MermaidAstReflection")}},FO=new jO,zO=ze(()=>wO??(wO=bN('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),GO=ze(()=>xO??(xO=bN('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),qO=ze(()=>NO??(NO=bN('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),KO=ze(()=>IO??(IO=bN('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),UO=ze(()=>_O??(_O=bN('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),WO=ze(()=>PO??(PO=bN('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),BO=ze(()=>DO??(DO=bN('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),VO=ze(()=>OO??(OO=bN('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),HO=ze(()=>LO??(LO=bN('{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),YO=ze(()=>MO??(MO=bN('{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"--\x3e"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"WardleyGrammarGrammar"),XO={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},JO={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},QO={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ZO={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},eL={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},tL={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},rL={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},nL={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},iL={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},aL={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},sL={AstReflection:ze(()=>new jO,"AstReflection")},oL={Grammar:ze(()=>zO(),"Grammar"),LanguageMetaData:ze(()=>XO,"LanguageMetaData"),parser:{}},lL={Grammar:ze(()=>GO(),"Grammar"),LanguageMetaData:ze(()=>JO,"LanguageMetaData"),parser:{}},cL={Grammar:ze(()=>qO(),"Grammar"),LanguageMetaData:ze(()=>QO,"LanguageMetaData"),parser:{}},uL={Grammar:ze(()=>KO(),"Grammar"),LanguageMetaData:ze(()=>ZO,"LanguageMetaData"),parser:{}},dL={Grammar:ze(()=>UO(),"Grammar"),LanguageMetaData:ze(()=>eL,"LanguageMetaData"),parser:{}},pL={Grammar:ze(()=>WO(),"Grammar"),LanguageMetaData:ze(()=>tL,"LanguageMetaData"),parser:{}},fL={Grammar:ze(()=>BO(),"Grammar"),LanguageMetaData:ze(()=>rL,"LanguageMetaData"),parser:{}},hL={Grammar:ze(()=>VO(),"Grammar"),LanguageMetaData:ze(()=>nL,"LanguageMetaData"),parser:{}},mL={Grammar:ze(()=>HO(),"Grammar"),LanguageMetaData:ze(()=>iL,"LanguageMetaData"),parser:{}},gL={Grammar:ze(()=>YO(),"Grammar"),LanguageMetaData:ze(()=>aL,"LanguageMetaData"),parser:{}},yL={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},vL=class extends Zk{static{ze(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return void 0===n&&(n=this.runCustomConverter(e,t,r)),void 0===n?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){const n=yL[e.name];if(void 0===n)return;const i=n.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},TL=class extends vL{static{ze(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},RL=class extends Qk{static{ze(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const n=super.buildKeywordTokens(e,t,r);return n.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}};(class extends RL{static{ze(this,"CommonTokenBuilder")}})},7539(e,t,r){r.d(t,{J:()=>s});var n=r(3228),i=class extends n.dg{static{(0,n.K2)(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},a={parser:{ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.Xr,a);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}(0,n.K2)(s,"createWardleyServices")},6876(e,t,r){r.d(t,{b:()=>s});var n=r(3228),i=class extends n.mR{static{(0,n.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},a={parser:{TokenBuilder:(0,n.K2)(()=>new i,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new n.Tm,"ValueConverter")}};function s(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.d$,a);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}(0,n.K2)(s,"createGitGraphServices")},1900(e,t,r){r.d(t,{I:()=>o});var n=r(3228),i=class extends n.dg{static{(0,n.K2)(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){return"INDENTATION"===e.name?t?.length||0:"STRING2"===e.name?t.substring(1,t.length-1):void 0}},a=class extends n.mR{static{(0,n.K2)(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},s={parser:{TokenBuilder:(0,n.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,n.K2)(()=>new i,"ValueConverter")}};function o(e=n.DD){const t=(0,n.WQ)((0,n.uM)(e),n.sr),r=(0,n.WQ)((0,n.tG)({shared:t}),n.CZ,s);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}(0,n.K2)(o,"createTreeViewServices")},9953(e,t,r){r.d(t,{F5:()=>n.F5,qg:()=>s});r(4414),r(5419),r(7539),r(6876),r(7593),r(5170),r(6886),r(1900),r(2186),r(8382);var n=r(3228),i={},a={info:(0,n.K2)(async()=>{const{createInfoServices:e}=await r.e(9178).then(r.bind(r,9178)),t=e().Info.parser.LangiumParser;i.info=t},"info"),packet:(0,n.K2)(async()=>{const{createPacketServices:e}=await r.e(9210).then(r.bind(r,9210)),t=e().Packet.parser.LangiumParser;i.packet=t},"packet"),pie:(0,n.K2)(async()=>{const{createPieServices:e}=await r.e(1127).then(r.bind(r,1127)),t=e().Pie.parser.LangiumParser;i.pie=t},"pie"),treeView:(0,n.K2)(async()=>{const{createTreeViewServices:e}=await r.e(936).then(r.bind(r,936)),t=e().TreeView.parser.LangiumParser;i.treeView=t},"treeView"),architecture:(0,n.K2)(async()=>{const{createArchitectureServices:e}=await r.e(4884).then(r.bind(r,4884)),t=e().Architecture.parser.LangiumParser;i.architecture=t},"architecture"),gitGraph:(0,n.K2)(async()=>{const{createGitGraphServices:e}=await r.e(7525).then(r.bind(r,7525)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t},"gitGraph"),eventmodeling:(0,n.K2)(async()=>{const{createEventModelingServices:e}=await r.e(1617).then(r.bind(r,1617)),t=e().EventModel.parser.LangiumParser;i.eventmodeling=t},"eventmodeling"),radar:(0,n.K2)(async()=>{const{createRadarServices:e}=await r.e(9354).then(r.bind(r,9354)),t=e().Radar.parser.LangiumParser;i.radar=t},"radar"),treemap:(0,n.K2)(async()=>{const{createTreemapServices:e}=await r.e(1700).then(r.bind(r,1700)),t=e().Treemap.parser.LangiumParser;i.treemap=t},"treemap"),wardley:(0,n.K2)(async()=>{const{createWardleyServices:e}=await r.e(7201).then(r.bind(r,7201)),t=e().Wardley.parser.LangiumParser;i.wardley=t},"wardley")};async function s(e,t){const r=a[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);i[e]||await r();const n=i[e].parse(t);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new o(n);return n.value}(0,n.K2)(s,"parse");var o=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: ${e.message}`).join("\n")} ${e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: ${e.message}`).join("\n")}`),this.result=e}static{(0,n.K2)(this,"MermaidParseError")}}}}]);
|