@finos/legend-application-repl-deployment 11.54.0 → 11.57.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +0,0 @@
1
- {"version":3,"file":"static/index.230e4691.js","mappings":"uBAAIA,ECCAC,EADAC,E,wECyBG,MA+BMC,EAAO,IAAM,OC5BnB,MAAMC,UAAyBC,MAClCC,MAAO,SACP,WAAAC,CAAYC,GACRC,QACAC,KAAKF,aACWG,IAAZH,GAAqC,KAAZA,EAAiB,qBAAuBA,CACzE,CAKA,UAAII,GACA,OAAOF,KAAKF,OAChB,EAIG,MAAMK,UAAsBR,MAC/B,WAAAE,CAAYO,EAAMC,EAAOC,GAUrB,GATAP,MAAMO,IAEAD,aAAiBV,MACbU,EAAMP,QACNO,IACVL,KAAKI,KAAOA,EAIRC,aAAiBV,MAAO,CACxB,MAAMY,GAAgBP,KAAKF,QAAQU,MAAM,QAAU,IAAIC,OAAS,EAChET,KAAKU,MAAQ,IAAIV,KAAKU,OAAS,IAC1BC,MAAM,MACNC,MAAM,EAAGL,EAAe,GACxBM,KAAK,qBAAqBR,EAAMK,OACzC,KAE2C,mBAA5Bf,MAAMmB,kBAIbnB,MAAMmB,kBAAkBd,KAAMA,KAAKH,aAInCG,KAAKU,MAAQ,IAAIf,MAAMU,GAAOK,KAG1C,EAQG,MAAMK,UAA0BZ,EACnC,WAAAN,CAAYQ,GACRN,MAAM,gDAAiDM,EAC3D,EAEG,MAAM,UAAkCF,EAC3C,WAAAN,CAAYC,EAASkB,GACjBjB,MAAM,8BAA+BD,GAAWkB,EAC1C,GAAGlB,IAAUkB,EAAoB,KDkIpB,EAACC,EAAOC,KAC/B,MAAMC,GAjIkBC,EAiIC,CACrBC,mBAAmB,EACnBC,SAAUJ,GAASK,UAAOtB,EAAY,IAnIV,EAAAuB,EAAA,GAAOJ,GAAMK,QAAgBxB,IAARwB,KAA9B,IAACL,EAsIxB,OADa,QAAkBH,EAAOE,GAIjCO,QAAQ,UAAW,KACnBA,QAAQ,WAAYD,GAAQ,CAAC,UAAW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O0C,MAAQ,GACV1C,EAAO5uD,WAAU4uD,EAAO5uD,SAAW,IACjC4uD,GCHRI,EAAoBuC,EAAI,K,MCKxB,IAAIC,EAAkB,CACrB,GAAI,GAaLxC,EAAoBQ,EAAEM,EAAK2B,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BhoE,KACvD,IAGIslE,EAAUwC,GAHThC,EAAUmC,EAAavwB,GAAW13C,EAGhBokB,EAAI,EAC3B,GAAG0hD,EAASpkD,MAAMhgB,GAAgC,IAAxBmmE,EAAgBnmE,KAAa,CACtD,IAAI4jE,KAAY2C,EACZ5C,EAAoB0B,EAAEkB,EAAa3C,KACrCD,EAAoBM,EAAEL,GAAY2C,EAAY3C,IAGhD,GAAG5tB,EAAS,IAAI3vC,EAAS2vC,EAAQ2tB,EAClC,CAEA,IADG2C,GAA4BA,EAA2BhoE,GACrDokB,EAAI0hD,EAASlsE,OAAQwqB,IACzB0jD,EAAUhC,EAAS1hD,GAChBihD,EAAoB0B,EAAEc,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOzC,EAAoBQ,EAAE99D,EAAO,EAGjCmgE,EAAqBf,WAAkE,sDAAIA,WAAkE,uDAAK,GACtKe,EAAmBhrE,QAAQ6qE,EAAqB5+C,KAAK,KAAM,IAC3D++C,EAAmB/gE,KAAO4gE,EAAqB5+C,KAAK,KAAM++C,EAAmB/gE,KAAKgiB,KAAK++C,G,KC7CvF,IAAIC,EAAsB9C,EAAoBQ,OAAEzsE,EAAW,CAAC,MAAM,IAAOisE,EAAoB,QAC7F8C,EAAsB9C,EAAoBQ,EAAEsC,E","sources":["webpack://@finos/legend-application-repl-deployment/webpack/runtime/chunk loaded","webpack://@finos/legend-application-repl-deployment/webpack/runtime/create fake namespace object","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/CommonUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/ErrorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/error/AssertionUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/NetworkUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/log/LogService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationEvent.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/SerializationUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/DocumentationService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/ActionState.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/network/TracerService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearch.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/search/FuzzySearchAdvancedConfigState.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AssistantService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/event/EventService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationTelemetry.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationNavigationContextService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/CommandService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/KeyboardShortcutsService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/Terminal.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/FormatterUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/keyboard/KeyBinding.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/LegendStyleProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/utils/ComponentCreatorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/dialog/Modal.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/AlertService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationStoreProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ActionAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/panel/PanelLoadingIndicator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BlockingAlert.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/icon/Icon.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/NotificationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/NotificationManager.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/BaseMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/ContextMenu.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/menu/MenuContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/markdown/MarkdownTextViewer.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/panel/BlankPanelContent.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/radio-group/BaseRadioGroup.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/popover/BasePopover.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationDocumentation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/VirtualAssistant.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationComponentFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/terminal/XTerm.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TerminalService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/IdentityService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationColorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/ApplicationStorage.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/storage/StorageService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TelemetryService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/TimeService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationSetting.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LayoutService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ClipboardService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/NavigationService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/SettingService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/DefaultNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/UserDataService.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/compare/StringCompareUtil.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ReleaseNotesService.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/ApplicationStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/util/DownloadHelperServiceWorker.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/format/MatcherUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/AbstractPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/Core_LegendApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLGridClientApplicationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/application/LegendApplicationPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLGridClientPluginManager.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/__lib__/LegendApplicationNavigation.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/navigation/BrowserNavigator.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/ApplicationPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/stores/platform/BrowserPlatform.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationPlatformProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/BrowserEnvironmentProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/server/REPLServerClient.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/TDSRequest.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/MetaModelConst.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/GridUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeGridState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/SourceInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeQueryEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeQueryTextEditorState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/Const.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubePropertiesPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/Core_HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeConfigState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubePanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/HPivotAndSortPanelState.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_ValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/V1_Variable.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_GraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-shared/lib/application/HashUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/domain/V1_Multiplicity.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CoreClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Lambda.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_DataTypeValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_Path.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_AbstractAppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedFunction.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_Collection.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PrimitiveValueSpecification.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDecimal.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CInteger.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CString.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CFloat.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CDateTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CStrictTime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CBoolean.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_AggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_Pair.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_SerializationConfig.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_KeyExpression.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_PureList.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/V1_PackageableElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/V1_SourceInformation.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/application/V1_AppliedProperty.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_Runtime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_RuntimeSerializationHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/packageableElements/runtime/V1_PackageableRuntime.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_ExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_PackageableElementPtr.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_GenericTypeInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_ClassInstance.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_ColSpecArray.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_ColSpec.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_RelationStoreAccessor.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/transformation/pureProtocol/serializationHelpers/V1_ValueSpecificationSerializer.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_EnumValue.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CLatestDate.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/model/valueSpecification/raw/V1_CByteArray.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/execution/INTERNAL__UnknownExecutionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/execution/V1_ExecutionHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/V1_EngineError.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/protocol/pure/v1/engine/grammar/V1_ParserError.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph-manager/action/EngineError.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/REPLGridServerResult.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/TDSLambdaBuilder.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/TDSQuery.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/CompletionResult.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/dataCube/DataCubeState.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/REPLGridClientStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/REPLGridClientStoreProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/autocomplete/CustomSelectorInput.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/PureLanguage.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/themes/MonacoEditorThemeUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/CodeEditorTheme.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/CodeEditorUtils.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/CodeEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/DataCubeQueryTextEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/AgGrid.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/grid/ServerSideDataSource.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/dataCube/DataCubeGridEditor.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/REPLGridClient.js","webpack://@finos/legend-application-repl-deployment/../legend-application/lib/components/ApplicationFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLGridClientBaseStore.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/LegendREPLGridClientFrameworkProvider.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/LegendREPLGridClientApplication.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/stores/LegendREPLGridClientApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-graph/lib/graph/helpers/PureLanguageHelper.js","webpack://@finos/legend-application-repl-deployment/../legend-lego/lib/code-editor/PureLanguageService.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/components/Core_LegendREPLGridClientApplicationPlugin.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/application/LegendREPLGridClient.js","webpack://@finos/legend-application-repl-deployment/../legend-application-repl/lib/index.js","webpack://@finos/legend-application-repl-deployment/./src/index.tsx","webpack://@finos/legend-application-repl-deployment/../legend-art/lib/autocomplete/CJS__ReactSelect.cjs","webpack://@finos/legend-application-repl-deployment/webpack/bootstrap","webpack://@finos/legend-application-repl-deployment/webpack/runtime/amd options","webpack://@finos/legend-application-repl-deployment/webpack/runtime/compat get default export","webpack://@finos/legend-application-repl-deployment/webpack/runtime/define property getters","webpack://@finos/legend-application-repl-deployment/webpack/runtime/ensure chunk","webpack://@finos/legend-application-repl-deployment/webpack/runtime/global","webpack://@finos/legend-application-repl-deployment/webpack/runtime/hasOwnProperty shorthand","webpack://@finos/legend-application-repl-deployment/webpack/runtime/make namespace object","webpack://@finos/legend-application-repl-deployment/webpack/runtime/node module decorator","webpack://@finos/legend-application-repl-deployment/webpack/runtime/publicPath","webpack://@finos/legend-application-repl-deployment/webpack/runtime/jsonp chunk loading","webpack://@finos/legend-application-repl-deployment/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clone, cloneDeep as deepClone, isEqual as deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, mergeWith, toNumber, isObject, } from 'lodash-es';\nimport { UnsupportedOperationError } from './error/ErrorUtils.js';\nimport { format as prettyPrintObject } from 'pretty-format';\nimport { assertTrue, guaranteeNonNullable } from './error/AssertionUtils.js';\n// NOTE: We re-export lodash utilities like this so we centralize utility usage in our app\n// in case we want to swap out the implementation\nexport { clone, deepClone, deepEqual, findLast, isEmpty, pickBy, uniqBy, uniq, debounce, throttle, };\n// NOTE: we can use the `rng` option in UUID V4 to control the random seed during testing\n// See https://github.com/uuidjs/uuid#version-4-random\nexport { v4 as uuid } from 'uuid';\nexport const getClass = (obj) => obj.constructor;\nexport const getSuperclass = (_class) => {\n if (!_class.name) {\n throw new UnsupportedOperationError(`Cannot get superclass for non user-defined classes`);\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n const superclass = Object.getPrototypeOf(_class);\n /**\n * When it comes to inheritance, JavaScript only has one construct: objects.\n * Each object has a private property which holds a link to another object called its prototype.\n * That prototype object has a prototype of its own, and so on until an object is reached\n * with null as its prototype. By definition, null has no prototype,\n * and acts as the final link in this prototype chain.\n *\n * NOTE: when the prototype name is `empty` we know it's not user-defined classes, so we can return undefined\n */\n return superclass?.name ? superclass : undefined;\n};\n/**\n * Check if the specified class is either the same as, or is a superclass of the provided class.\n */\nexport const isClassAssignableFrom = (cls1, cls2) => {\n let currentPrototype = cls2;\n while (currentPrototype) {\n if (currentPrototype === cls1) {\n return true;\n }\n currentPrototype = getSuperclass(currentPrototype);\n }\n return false;\n};\nexport const noop = () => () => {\n /* do nothing */\n};\n/**\n * Recursively omit keys from an object\n */\nexport const recursiveOmit = (obj, \n/**\n * Checker function which returns `true` if the object field should be omit\n */\nchecker) => {\n const newObj = deepClone(obj);\n const omit = (_obj, _checker) => {\n if (Array.isArray(_obj)) {\n _obj.forEach((o) => omit(o, _checker));\n }\n else {\n const o = _obj;\n for (const propKey in o) {\n if (Object.prototype.hasOwnProperty.call(_obj, propKey)) {\n const value = o[propKey];\n if (_checker(_obj, propKey)) {\n delete o[propKey];\n }\n else if (isObject(value)) {\n omit(value, _checker);\n }\n }\n }\n }\n };\n omit(newObj, checker);\n return newObj;\n};\n/**\n * Recursively remove fields with undefined values in object\n */\nexport const pruneObject = (obj) => pickBy(obj, (val) => val !== undefined);\n/**\n * Recursively remove fields with null values in object\n *\n * This is particularly useful in serialization, especially when handling response\n * coming from servers where `null` are returned for missing fields. We would like to\n * treat them as `undefined` instead, so we want to strip all the `null` values from the\n * plain JSON object.\n */\nexport const pruneNullValues = (obj) => pickBy(obj, (val) => val !== null);\n/**\n * Recursively sort object keys alphabetically\n */\nexport const sortObjectKeys = (value) => {\n const _sort = (obj) => {\n if (Array.isArray(obj)) {\n return obj.map(sortObjectKeys);\n }\n else if (typeof obj === 'object' && obj !== null) {\n const oldObj = obj;\n const newObj = {};\n Object.keys(oldObj)\n .sort((a, b) => a.localeCompare(b))\n .forEach((key) => {\n newObj[key] = _sort(oldObj[key]);\n });\n return newObj;\n }\n return obj;\n };\n return _sort(value);\n};\nexport const parseNumber = (val) => {\n const num = toNumber(val);\n if (isNaN(num)) {\n throw new Error(`Can't parse number '${val}'`);\n }\n return num;\n};\n/**\n * Stringify object shallowly\n * See https://stackoverflow.com/questions/16466220/limit-json-stringification-depth\n */\nexport const shallowStringify = (object) => JSON.stringify(object, (key, val) => key && val && typeof val !== 'number'\n ? Array.isArray(val)\n ? '[object Array]'\n : `${val}`\n : val);\nexport const generateEnumerableNameFromToken = (existingNames, token) => {\n if (!token.match(/^[\\w_-]+$/)) {\n throw new Error(`Token must only contain digits, letters, or special characters _ and -`);\n }\n const maxCounter = existingNames\n .map((name) => {\n const matchingCount = name.match(new RegExp(`^${token}_(?<count>\\\\d+)$`));\n return matchingCount?.groups?.count\n ? parseInt(matchingCount.groups.count, 10)\n : 0;\n })\n .reduce((max, num) => Math.max(max, num), 0);\n return `${token}_${maxCounter + 1}`;\n};\n/**\n * NOTE: These are small helpers to workaround Typescript strictness check with the flag --noUncheckedIndexedAccess enabled\n */\nexport const getNullableFirstEntry = (array) => array.length ? array[0] : undefined;\nexport const getNullableLastEntry = (array) => array.length ? array[array.length - 1] : undefined;\nexport const getNullableEntry = (array, idx) => {\n if (idx < 0 || idx >= array.length) {\n return undefined;\n }\n return array.length > idx ? array[idx] : undefined;\n};\nexport const getNonNullableEntry = (array, idx, message) => {\n assertTrue(0 <= idx && idx < array.length, `Index out of bound: ${idx}`);\n return guaranteeNonNullable(array[idx], message);\n};\n/**\n * NOTE: This object mutates the input object (obj1)\n * To disable this behavior, set `createClone=true`\n */\nexport const mergeObjects = (obj1, obj2, createClone) => mergeWith(createClone ? deepClone(obj1) : obj1, obj2, (o1, o2) => {\n if (Array.isArray(o1)) {\n return o1.concat(o2);\n }\n return undefined;\n});\nexport const promisify = (func) => new Promise((resolve, reject) => setTimeout(() => {\n try {\n resolve(func());\n }\n catch (error) {\n reject(error);\n }\n}, 0));\nexport const addUniqueEntry = (array, newEntry, comparator = (val1, val2) => val1 === val2) => {\n if (!array.find((entry) => comparator(entry, newEntry))) {\n array.push(newEntry);\n return true;\n }\n return false;\n};\nexport const changeEntry = (array, oldEntry, newEntry, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, oldEntry));\n if (idx !== -1) {\n array[idx] = newEntry;\n return true;\n }\n return false;\n};\nexport const swapEntry = (array, entryOne, entryTwo, comparator = (val1, val2) => val1 === val2) => {\n const idxX = array.findIndex((entry) => comparator(entry, entryOne));\n const idxY = array.findIndex((entry) => comparator(entry, entryTwo));\n if (idxX !== -1 && idxY !== -1) {\n array[idxX] = entryTwo;\n array[idxY] = entryOne;\n return true;\n }\n return false;\n};\nexport const deleteEntry = (array, entryToDelete, comparator = (val1, val2) => val1 === val2) => {\n const idx = array.findIndex((entry) => comparator(entry, entryToDelete));\n if (idx !== -1) {\n array.splice(idx, 1);\n return true;\n }\n return false;\n};\nexport const printObject = (value, options) => {\n const opts = pruneObject({\n printFunctionName: false,\n maxDepth: options?.deep ? undefined : 1,\n });\n const text = prettyPrintObject(value, opts);\n return (text\n // We do these replacements because when we do this for production and the class name is minified,\n // we'd better show `[Object]` instead.\n .replace(/.*\\s\\{/g, '{')\n .replace(/\\[.*\\]/g, (val) => ['[Array]', '[Function]'].includes(val) ? val : '[Object]'));\n};\nexport const hasWhiteSpace = (val) => Boolean(val.match(/\\s/));\n//# sourceMappingURL=CommonUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { printObject, uuid, } from '../CommonUtils.js';\n/**\n * A generic error that can be used for building other errors in the application\n * which does not require Javascript stack trace.\n *\n * If the Javascript stack trace is needed to trace back where the problem occurs,\n * `EnrichedError` is the more suitable candidate.\n *\n * This type of error is useful for wrapping the innermost error or errors coming\n * from the servers. Since we enforce in the app that errors thrown must be of type\n * `Error`, this acts as a good wrapper to manage errors better.\n * See https://github.com/microsoft/TypeScript/issues/13219\n */\nexport class ApplicationError extends Error {\n uuid = uuid();\n constructor(message) {\n super();\n this.message =\n message === undefined || message === '' ? '(no error message)' : message;\n }\n /**\n * This provides more detail (better context) about the error, including the error message\n * stack trace, etc.\n */\n get detail() {\n return this.message;\n }\n}\n// Since Javascript does not fully support rethrowing error, we need to customize and manipulate the stack trace\n// See https://stackoverflow.com/questions/42754270/re-throwing-exception-in-nodejs-and-not-losing-stack-trace\nexport class EnrichedError extends Error {\n constructor(name, error, overideMessage) {\n super(overideMessage\n ? overideMessage\n : error instanceof Error\n ? error.message\n : error);\n this.name = name;\n // if the material used to make this error is also an error, we maintain the stack trace and\n // follow the `rethrown` error stack trace convention\n // See https://www.twilio.com/blog/how-to-read-and-understand-a-java-stacktrace\n if (error instanceof Error) {\n const messageLines = (this.message.match(/\\n/g) ?? []).length + 1;\n this.stack = `${(this.stack ?? '')\n .split('\\n')\n .slice(0, messageLines + 1)\n .join('\\n')}\\nCaused by: ${error.stack}`;\n }\n else {\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error(error).stack;\n }\n }\n }\n}\n/**\n * Signals that a method has been invoked at an illegal or\n * inappropriate time. In other words, the environment or\n * application is not in an appropriate state for the requested\n * operation.\n */\nexport class IllegalStateError extends EnrichedError {\n constructor(error) {\n super('Illegal State Error [PLEASE NOTIFY DEVELOPER]', error);\n }\n}\nexport class UnsupportedOperationError extends EnrichedError {\n constructor(message, unsupportedObject) {\n super('Unsupported Operation Error', message || unsupportedObject\n ? `${message}${unsupportedObject ? `\\n${printObject(unsupportedObject)}` : ''}`\n : undefined);\n }\n}\n/**\n * This is a relatively crude way to handle error of type unknown thrown for now.\n * We should revisit this when Typescript supports `throws` clause\n * See https://github.com/microsoft/TypeScript/issues/13219\n *\n * NOTE: There's a problem with this check in JSDOM leading so we have to disable this in test environment\n * JSDOM uses their own isolated object rather than native object for performance purpose\n * See https://github.com/jsdom/jsdom/issues/3082\n * For example, TypeErrors generated by `webidl2js` or `whatwg-url` used by `jsdom`, or manually-thrown ones inside impl classes,\n * are thrown using global.TypeError, not dom.window.TypeError. This change is hard to implement as of now\n * See https://github.com/jsdom/jsdom/issues/2727\n * See https://github.com/facebook/jest/issues/2549\n *\n * Read more related discussions at:\n * https://github.com/jsdom/jsdom/issues/1737\n * https://github.com/webcomponents/polyfills/issues/105\n * https://github.com/jsdom/jsdom/issues/1769\n * https://github.com/jsdom/jsdom/issues/2555\n */\nexport function assertErrorThrown(error) {\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n return;\n }\n if (!(error instanceof Error)) {\n throw new IllegalStateError('Expected error to be thrown');\n }\n}\nexport const returnUndefOnError = (fn) => {\n try {\n return fn();\n }\n catch {\n return undefined;\n }\n};\nexport const decorateErrorMessageIfExists = (fn, errorMessageDecorator) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n error.message = errorMessageDecorator(error.message);\n throw error;\n }\n};\n//# sourceMappingURL=ErrorUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { EnrichedError } from './ErrorUtils.js';\nexport class AssertionError extends EnrichedError {\n constructor(error, message) {\n super('Assertion Error', error, message);\n }\n}\nexport const isNonNullable = (value) => value !== null && value !== undefined;\nexport function assertNonNullable(value, message = '') {\n if (value === null || value === undefined) {\n throw new AssertionError(message || 'Value is nullable');\n }\n}\nexport const guaranteeNonNullable = (value, message = '') => {\n assertNonNullable(value, message);\n return value;\n};\nexport const isType = (value, clazz) => value instanceof clazz;\nexport const filterByType = (clazz) => (value) => isType(value, clazz);\n// Aserts typing doesn't work with all arrow function type declaration form\n// So we can use this: export const assertType: <T>(value: unknown, clazz: Clazz<T>, message: string) => asserts value is T = (value, clazz, message = '') => {\n// or the normal function form\n// See https://github.com/microsoft/TypeScript/issues/34523\n// See https://github.com/microsoft/TypeScript/pull/33622\nexport function assertType(value, clazz, message = '') {\n if (!(value instanceof clazz)) {\n throw new AssertionError(message || `Value is expected to be of type '${clazz.name}'`);\n }\n}\nexport const guaranteeType = (value, clazz, message = '') => {\n assertType(value, clazz, message);\n return value;\n};\nexport function assertNonEmptyString(str, message = '') {\n if (guaranteeNonNullable(str, message) === '') {\n throw new AssertionError(message || `Expected string value to be non-empty`);\n }\n}\nexport function guaranteeNonEmptyString(str, message = '') {\n assertNonEmptyString(str, message);\n return str;\n}\nexport function assertTrue(assertionValue, message = '') {\n if (!assertionValue) {\n throw new AssertionError(message || `Expected predicate to be truthy`);\n }\n}\nexport const isString = (val) => typeof val === 'string';\nexport const isNumber = (val) => typeof val === 'number' && !isNaN(val);\nexport const isBoolean = (val) => typeof val === 'boolean';\nexport const isObject = (val) => typeof val === 'object' && val !== null;\nexport const isPlainObject = (val) => isObject(val) && val.constructor.name === 'Object';\nexport function assertIsString(val, message = '') {\n if (!isString(val)) {\n throw new AssertionError(message || `Value is expected to be a string`);\n }\n}\nexport function assertIsNumber(val, message = '') {\n if (!isNumber(val)) {\n throw new AssertionError(message || `Value is expected to be a number`);\n }\n}\nexport function assertIsBoolean(val, message = '') {\n if (!isBoolean(val)) {\n throw new AssertionError(message || `Value is expected to be a boolean`);\n }\n}\nexport function assertIsObject(val, message = '') {\n if (!isObject(val)) {\n throw new AssertionError(message || `Value is expected to be a object`);\n }\n}\nexport const guaranteeIsString = (val, message = '') => {\n assertIsString(val, message);\n return val;\n};\nexport const guaranteeIsNumber = (val, message = '') => {\n assertIsNumber(val, message);\n return val;\n};\nexport const guaranteeIsBoolean = (val, message = '') => {\n assertIsBoolean(val, message);\n return val;\n};\nexport const guaranteeIsObject = (val, message = '') => {\n assertIsObject(val, message);\n return val;\n};\n//# sourceMappingURL=AssertionUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { StatusCodes } from 'http-status-codes';\nimport { isNonNullable, isString, isObject, AssertionError, assertTrue, } from '../error/AssertionUtils.js';\nimport { deflate } from 'pako';\nimport queryString from 'query-string';\nimport { returnUndefOnError } from '../error/ErrorUtils.js';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n/**\n * Unlike the download call (GET requests) which is gziped, the upload call send uncompressed data which is in megabytes realms\n * for bigger project. This really slows down operations. As such, we compress data using `zlib` for all network calls to execution\n * server. This requires the backend to uncompress, which for small models might end up adding a little overhead, so in the future, we might\n * want to make this decision `to compress or to not compress` more smartly and dynamicly (e.g. potentially to scan the size of the data/model\n * and decide the compression strategy).\n */\nconst compressData = (data) => new Blob([deflate(isObject(data) ? JSON.stringify(data) : data)]);\nexport const URL_SEPARATOR = '/';\n/**\n * Reference: https://uibakery.io/regex-library/url\n */\nconst URL_REGEX = new RegExp('^https?://(?:www.)?[-a-zA-Z0-9@:%._+~#=]{1,256}.[a-zA-Z0-9()]{1,6}\\\\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$');\nexport const HttpStatus = StatusCodes;\nexport const CHARSET = 'charset=utf-8';\nexport var HttpHeader;\n(function (HttpHeader) {\n HttpHeader[\"CONTENT_TYPE\"] = \"Content-Type\";\n HttpHeader[\"ACCEPT\"] = \"Accept\";\n})(HttpHeader || (HttpHeader = {}));\nexport var ContentType;\n(function (ContentType) {\n ContentType[\"APPLICATION_JSON\"] = \"application/json\";\n ContentType[\"APPLICATION_XML\"] = \"application/xml\";\n ContentType[\"APPLICATION_ZLIB\"] = \"application/zlib\";\n ContentType[\"TEXT_PLAIN\"] = \"text/plain\";\n ContentType[\"TEXT_CSV\"] = \"text/csv\";\n ContentType[\"ALL\"] = \"*/*\";\n})(ContentType || (ContentType = {}));\nexport var HttpMethod;\n(function (HttpMethod) {\n HttpMethod[\"GET\"] = \"GET\";\n HttpMethod[\"PUT\"] = \"PUT\";\n HttpMethod[\"POST\"] = \"POST\";\n HttpMethod[\"DELETE\"] = \"DELETE\";\n})(HttpMethod || (HttpMethod = {}));\nconst DEFAULT_CLIENT_REQUEST_OPTIONS = {\n mode: 'cors', // allow CORS - See https://developer.mozilla.org/en-US/docs/Web/API/Request/mode\n credentials: 'include', // allow sending credentials to other domain\n /**\n * NOTE: We must set this to `follow` for the fetch to handle 3xx redirects automatically.\n * The other modes available are `error` which will throw error and does not really give a\n * response object, and `manual` which returns an opaque response object with status code 0;\n * either way, we cannot really handle the redirect manually ourselves.\n * See https://fetch.spec.whatwg.org/#concept-request-redirect-mode\n * See https://fetch.spec.whatwg.org/#concept-filtered-response-opaque-redirect\n */\n redirect: 'follow',\n};\n// NOTE: We could further improve this by using the MIME library https://flaviocopes.com/node-get-file-extension-mime-type/\nexport const getContentTypeFileExtension = (type) => {\n switch (type) {\n case ContentType.APPLICATION_JSON:\n return 'json';\n case ContentType.APPLICATION_XML:\n return 'xml';\n case ContentType.TEXT_CSV:\n return 'csv';\n default:\n return 'txt';\n }\n};\n/**\n * NOTE: the latter headers value will override the those of the first\n */\nexport const mergeRequestHeaders = (headersOne, headersTwo) => {\n const requestHeaders = {};\n if (headersOne) {\n Object.entries(headersOne).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n if (headersTwo) {\n Object.entries(headersTwo).forEach(([key, value]) => {\n requestHeaders[key] = value;\n });\n }\n return requestHeaders;\n};\nconst MAX_ERROR_MESSAGE_LENGTH = 5000;\n/**\n * Custom error for service client with response details.\n * NOTE: Since is particular to execution error we might want to separate this out to another place and leave network client\n * as pure/generic as possible\n */\nconst extractMessage = (payload) => {\n if (isObject(payload)) {\n return isString(payload.message)\n ? payload.message\n : JSON.stringify(payload);\n }\n let payloadAsObject;\n try {\n payloadAsObject = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return payloadAsObject && isString(payloadAsObject.message)\n ? payloadAsObject.message\n : payload;\n};\n/**\n * This is a fairly basic way to attempt re-authentication.\n * We create an <iframe> to load a re-authentication url\n * which suppose to silently refresh the authentication cookie\n * and requires no action from users.\n *\n * NOTE: authentication is very specific to the deployment context\n * i.e. how the servers are being setup, so this way of re-authenticate\n * should be optional and configurable.\n */\nexport const autoReAuthenticate = (url) => \n// eslint-disable-next-line @typescript-eslint/ban-types\nnew Promise((resolve) => {\n const id = 'AUTO_AUTHENTICATION_IFRAME';\n const previous = document.getElementById(id);\n previous?.remove();\n const element = document.createElement('iframe');\n element.id = id;\n element.src = url;\n element.style.display = 'none';\n element.addEventListener('load', () => {\n element.remove();\n resolve();\n });\n document.body.appendChild(element);\n});\nexport class NetworkClientError extends Error {\n response;\n payload;\n constructor(response, payload) {\n super();\n if (typeof Error.captureStackTrace === 'function') {\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n // This only works in Chrome for now. Firefox (as of Feb 2020) will throw error\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n Error.captureStackTrace(this, this.constructor);\n }\n else {\n // otherwise, use the non-standard but defacto stack trace (available in most browser)\n this.stack = new Error().stack;\n }\n this.name = 'Network Client Error';\n this.response = response;\n const { status, statusText, url } = response;\n const summary = `Received response with status ${status} (${statusText}) for ${url}`;\n this.message =\n (payload\n ? extractMessage(payload).substring(0, MAX_ERROR_MESSAGE_LENGTH)\n : '') || summary;\n this.payload = payload;\n }\n}\nexport const makeUrl = (baseUrl, url, parameters) => {\n if (!baseUrl && !returnUndefOnError(() => new URL(url))) {\n throw new Error(`Can't build URL string: base URL is not specified and the provided URL '${url}' is not absolute`);\n }\n const fullUrl = new URL(url, baseUrl);\n if (parameters instanceof Object) {\n Object.entries(parameters).forEach(([name, value]) => {\n if (value !== undefined) {\n if (Array.isArray(value)) {\n // if value is an array, keep adding it to the URL with the same parameter name, for example: /reviews?revisionIds=rev2&revisionIds=rev1\n value\n .filter(isNonNullable)\n .forEach((subVal) => fullUrl.searchParams.append(name, subVal.toString()));\n }\n else {\n fullUrl.searchParams.append(name, value.toString());\n }\n }\n });\n }\n return fullUrl.toString();\n};\n// NOTE: in case of missing CORS headers, failed authentication manifests itself as CORS error\nconst couldBeCORS = (error) => error instanceof TypeError && error.message === 'Failed to fetch';\nconst processResponse = async (response, init, responseProcessConfig) => {\n responseProcessConfig?.preprocess?.(response);\n if (!response.ok) {\n let payload;\n try {\n payload = await response.text();\n payload = JSON.parse(payload);\n }\n catch {\n // NOTE: ignored, above is best effort\n }\n return Promise.reject(new NetworkClientError(response, payload));\n }\n if (responseProcessConfig?.skipProcessing) {\n return Promise.resolve(response);\n }\n if (response.status === HttpStatus.NO_CONTENT) {\n return Promise.resolve(undefined);\n }\n // TODO: might need to handle */* ContentType and other types\n // Note that right now what we support is rather simplistic, as we always expect `application/json` or `text/plain`\n // and use these to determine how we should decode the response. However, we should properly allow passing in\n // a field in response process config to specify the format of the expected response body\n //\n // See https://www.npmjs.com/package/mime-types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types\n // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types\n // See https://github.github.io/fetch/\n const accept = init.headers.Accept;\n switch (accept) {\n case ContentType.APPLICATION_JSON:\n return response.json();\n case ContentType.TEXT_PLAIN:\n return response.text();\n default:\n return Promise.reject(new NetworkClientError(response, `Can't process response for request with Content-Type '${accept}'`));\n }\n};\nexport const createRequestHeaders = (method, headers) => {\n const baseRequestHeaders = {};\n /**\n * NOTE: here we set the accept header to application/json instead of the default value\n * as that will imply the server can send us text/html sometimes when there is an\n * authentication problem, which is not desirable.\n */\n baseRequestHeaders.Accept = ContentType.APPLICATION_JSON;\n if (method !== HttpMethod.GET) {\n baseRequestHeaders[HttpHeader.CONTENT_TYPE] =\n `${ContentType.APPLICATION_JSON};${CHARSET}`;\n }\n return mergeRequestHeaders(baseRequestHeaders, headers);\n};\n/**\n * Simple wrapper around native `fetch` API. For `options`, see documentation for \"init\"\n * See https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API\n */\nexport class NetworkClient {\n options = {};\n baseUrl;\n constructor(config) {\n this.baseUrl = config?.baseUrl;\n this.options = {\n ...DEFAULT_CLIENT_REQUEST_OPTIONS,\n ...(config?.options ?? {}),\n };\n }\n async get(url, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n return this.request(HttpMethod.GET, url, undefined, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async put(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.PUT, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async post(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.POST, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async delete(url, data = {}, options = {}, headers, parameters, requestProcessConfig, responseProcessConfig) {\n return this.request(HttpMethod.DELETE, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig);\n }\n async request(method, url, data, options, headers, parameters, requestProcessConfig, responseProcessConfig) {\n const requestUrl = makeUrl(this.baseUrl, url, parameters ?? {});\n if ((isString(data) || isObject(data)) &&\n requestProcessConfig?.enableCompression) {\n assertTrue(method !== HttpMethod.GET, ' GET request should not have any request payload');\n data = compressData(data);\n // NOTE: do not use Content-Type for GET to avoid unnecessary pre-flight when cross-origin\n headers = mergeRequestHeaders(headers, {\n // Override Content-Type header when compression is enabled\n [HttpHeader.CONTENT_TYPE]: `${ContentType.APPLICATION_ZLIB};${CHARSET}`,\n });\n }\n let body;\n if (data !== undefined) {\n if (isString(data) || data instanceof Blob) {\n body = data;\n }\n else if (isObject(data)) {\n body = JSON.stringify(data);\n }\n else {\n throw new AssertionError(`Request body can only be either a 'string' or an 'object'`);\n }\n }\n const requestInit = {\n ...this.options,\n ...options,\n method,\n body: body,\n headers: createRequestHeaders(method, headers),\n };\n /**\n * For network client to work, we need an implementation of `window.fetch` to be present.\n * Modern browsers should already have native support for `fetch`.\n * In case they don't (such as in test where we use `jsdom` for example),\n * there are several ways to go about this,but we recommend using `whatwg-fetch` polyfill.\n *\n * Why favor `whatwg-fetch`?\n * It's Github's polyfill for a subset of features of Fetch API.\n * See https://github.com/github/fetch#read-this-first\n * What about `axios`? `axios` has pretty nice API, but larger bundle-size for no particular reason\n * See https://github.com/axios/axios/issues/1333#issuecomment-511375282\n * What about `node-fetch`? `node-fetch` is for server-side only, while `whatwg-fetch` is for client-side\n * See https://www.npmjs.com/package/node-fetch#motivation\n */\n return fetch(requestUrl, requestInit)\n .then((response) => {\n if (\n // NOTE: status 0 is either timeout or client error possibly caused by authentication\n response.status === 0 ||\n response.status === HttpStatus.UNAUTHORIZED) {\n // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n // this is a good place to add an auto retry/authenticate mechanism\n if (responseProcessConfig?.autoReAuthenticateUrl) {\n return autoReAuthenticate(responseProcessConfig.autoReAuthenticateUrl)\n .then(() => fetch(requestUrl, requestInit))\n .then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig));\n }\n return processResponse(response, requestInit, responseProcessConfig);\n })\n .catch((error) => couldBeCORS(error)\n ? // NOTE: we might want to consider different handling here rather than just proceeding with a retry\n fetch(requestUrl, requestInit).then((resp) => processResponse(resp, requestInit, responseProcessConfig))\n : Promise.reject(error));\n }\n}\n/**\n * Create and download a file using data URI\n * See http://stackoverflow.com/questions/283956\n */\nexport const downloadFileUsingDataURI = (fileName, content, contentType) => {\n const blob = new Blob([content], { type: contentType });\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n if (typeof link.download === 'string') {\n document.body.appendChild(link); // Firefox requires the link to be in the body\n link.download = fileName;\n link.href = url;\n link.click();\n document.body.removeChild(link); // remove the link when done\n }\n else {\n location.replace(url);\n }\n};\nexport const createUrlStringFromData = (data, contentType, base64) => base64\n ? `data:${contentType};base64,${window.btoa(data)}`\n : `data:${contentType},${encodeURIComponent(data)}`;\n// Buffer.from(str, 'base64')` and`buf.toString('base64')\n// NOTE: we can potentially use the native `URLSearchParams` as it provides\n// fairly good API and structured output, but it does not support duplicated query\n// such as `?foo=1&foo=2`, only the first value of `foo` will be recorded\n// See https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams\nexport const getQueryParameters = (url, isFullUrl = false) => {\n const params = isFullUrl\n ? queryString.parseUrl(url).query\n : queryString.parse(url);\n return params;\n};\nexport const getQueryParameterValue = (key, data) => {\n const paramValue = data[key];\n return paramValue ? decodeURIComponent(paramValue) : undefined;\n};\nexport const stringifyQueryParams = (params) => {\n const data = {};\n Object.entries(params).forEach(([key, value]) => {\n if (!value) {\n return;\n }\n data[key] = value.toString();\n });\n return queryString.stringify(data);\n};\nexport const addQueryParametersToUrl = (url, val) => (val ? `${url}?${val}` : url);\nexport const buildUrl = (parts) => parts\n .map((part) => part.replaceAll(/^\\/+/g, '').replaceAll(/\\/+$/g, ''))\n .join(URL_SEPARATOR);\nexport const sanitizeURL = (val) => sanitizeUrl(val);\nexport const isValidURL = (val) => URL_REGEX.test(val);\n//# sourceMappingURL=NetworkUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\n// We use numeric enum here for because we want to do comparison\n// In order to retrieve the name of the enum we can do reverse mapping, for example: LogLevel[LogLevel.INFO] -> INFO\n// https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings\nexport var LOG_LEVEL;\n(function (LOG_LEVEL) {\n LOG_LEVEL[LOG_LEVEL[\"DEBUG\"] = 1] = \"DEBUG\";\n LOG_LEVEL[LOG_LEVEL[\"INFO\"] = 2] = \"INFO\";\n LOG_LEVEL[LOG_LEVEL[\"WARN\"] = 3] = \"WARN\";\n LOG_LEVEL[LOG_LEVEL[\"ERROR\"] = 4] = \"ERROR\";\n LOG_LEVEL[LOG_LEVEL[\"SILENT\"] = 5] = \"SILENT\";\n})(LOG_LEVEL || (LOG_LEVEL = {}));\nexport class LogEvent {\n channel;\n name;\n timestamp = Date.now();\n /**\n * TODO: we should make channel required and potentially name required as well, and for each\n * channel, there should be a list of known event names. Unknown event name, or wrong channel\n * will result in error.\n */\n static create(name) {\n const event = new LogEvent();\n event.name = name;\n return event;\n }\n}\nexport class LoggerPlugin extends AbstractPlugin {\n level = LOG_LEVEL.DEBUG;\n setLevel(level) {\n this.level = level;\n }\n install(pluginManager) {\n pluginManager.registerLoggerPlugin(this);\n }\n debug(event, ...data) {\n if (this.level <= LOG_LEVEL.DEBUG) {\n this._debug(event, ...data);\n }\n }\n info(event, ...data) {\n if (this.level <= LOG_LEVEL.INFO) {\n this._info(event, ...data);\n }\n }\n warn(event, ...data) {\n if (this.level <= LOG_LEVEL.WARN) {\n this._warn(event, ...data);\n }\n }\n error(event, ...data) {\n if (this.level <= LOG_LEVEL.ERROR) {\n this._error(event, ...data);\n }\n }\n}\nexport class LogService {\n loggers = [];\n registerPlugins(loggerPlugins) {\n this.loggers = loggerPlugins;\n }\n debug(event, ...data) {\n this.loggers.forEach((logger) => logger.debug(event, ...data));\n }\n info(event, ...data) {\n this.loggers.forEach((logger) => logger.info(event, ...data));\n }\n warn(event, ...data) {\n this.loggers.forEach((logger) => logger.warn(event, ...data));\n }\n error(event, ...data) {\n this.loggers.forEach((logger) => logger.error(event, ...data));\n }\n}\n//# sourceMappingURL=LogService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var APPLICATION_EVENT;\n(function (APPLICATION_EVENT) {\n APPLICATION_EVENT[\"APPLICATION_SETUP__FAILURE\"] = \"application.setup.failure\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__SUCCESS\"] = \"application.load.success\";\n APPLICATION_EVENT[\"APPLICATION_LOAD__FAILURE\"] = \"application.load.failure\";\n APPLICATION_EVENT[\"ILLEGAL_APPLICATION_STATE_OCCURRED\"] = \"application.error.illegal-state\";\n APPLICATION_EVENT[\"APPLICATION_CONFIGURATION__FAILURE\"] = \"application.configuration.failure\";\n APPLICATION_EVENT[\"IDENTITY_AUTO_FETCH__FAILURE\"] = \"application.identity.auto-fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_FETCH__FAILURE\"] = \"application.documentation.fetch.failure\";\n APPLICATION_EVENT[\"DOCUMENTATION_LOAD__SKIP\"] = \"application.documentation.load.skip\";\n APPLICATION_EVENT[\"DOCUMENTATION_REQUIREMENT_CHECK__FAILURE\"] = \"application.documentation.requirement-check.failure\";\n APPLICATION_EVENT[\"CONTEXTUAL_DOCUMENTATION_LOAD__SKIP\"] = \"application.virtual-assistant.contextual-documentation-load.skip\";\n APPLICATION_EVENT[\"VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS\"] = \"application.virtual-assistant.documentation-entry.access\";\n APPLICATION_EVENT[\"TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE\"] = \"application.load.terminal-command.configuration-check.failure\";\n APPLICATION_EVENT[\"COLOR_THEME_CONFIGURATION_CHECK__FAILURE\"] = \"application.layout.color-theme.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_CONFIGURATION_CHECK__FAILURE\"] = \"application.setting.configuration-check.failure\";\n APPLICATION_EVENT[\"SETTING_RETRIVE_FAILURE\"] = \"application.setting.retrieve.failure\";\n APPLICATION_EVENT[\"USER_DATA_RETRIEVE_FAILURE\"] = \"application.user-data.retrieve.failure\";\n APPLICATION_EVENT[\"COMMAND_CENTER_REGISTRATION__FAILURE\"] = \"application.command.registration.failure\";\n APPLICATION_EVENT[\"DEVELOPMENT_ISSUE\"] = \"development.issue\";\n APPLICATION_EVENT[\"APPLICATION_CONTEXT__ACCESS\"] = \"application.context.access\";\n APPLICATION_EVENT[\"APPLICATION_USAGE__INTERRUPT\"] = \"application.usage.interrupt\";\n APPLICATION_EVENT[\"APPLICATION_TELEMETRY_EVENT__FAILURE\"] = \"application.telemetry-event.failure\";\n})(APPLICATION_EVENT || (APPLICATION_EVENT = {}));\n//# sourceMappingURL=LegendApplicationEvent.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { pruneNullValues } from '../CommonUtils.js';\nimport { custom, SKIP, deserialize, serialize, } from 'serializr';\nexport class SerializationFactory {\n schema;\n deserializeNullAsUndefined;\n constructor(schema, options) {\n this.schema = schema;\n this.deserializeNullAsUndefined = Boolean(options?.deserializeNullAsUndefined);\n }\n toJson(val) {\n return serialize(this.schema, val);\n }\n fromJson(val) {\n return deserialize(this.schema, this.deserializeNullAsUndefined ? pruneNullValues(val) : val);\n }\n}\nexport const usingModelSchema = (schema) => custom((value) => (value === undefined ? SKIP : serialize(schema, value)), (value) => deserialize(schema, value));\n// NOTE: we need these methods because `map()` of `serializr` tries to smartly\n// determines if it should produce object or ES6 Map but we always want ES6 Map,\n// so we would use this function\nexport const deserializeMap = (val, itemDeserializer) => {\n const result = new Map();\n Object.keys(val).forEach((key) => result.set(key, itemDeserializer(val[key])));\n return result;\n};\nexport const serializeMap = (val, itemSerializer) => {\n const result = {};\n val.forEach((v, key) => {\n result[key] = itemSerializer(v);\n });\n return result;\n};\nexport const usingConstantValueSchema = (value) => custom(() => value, () => value);\n/**\n * This is the idiomatic usage pattern for `optional(custom(...))`.\n *\n * `optional` only affects serialization so we must make sure to check\n * if the value is `undefined` or not, if yes, serialize, else, return `undefined`\n * which will be processed by `optional(...)` as `SKIP`.\n *\n * `optional` does not affect deserialization, however, as `undefined` values\n * are automatically skipped\n * See https://github.com/mobxjs/serializr/issues/73#issuecomment-535641545\n */\nexport const optionalCustom = (\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nserializer, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ndeserializer) => custom((val) => (val ? serializer(val) : SKIP), (val) => (val ? deserializer(val) : SKIP));\nexport const optionalCustomUsingModelSchema = (schema) => custom((val) => (val ? serialize(schema, val) : SKIP), (val) => (val ? deserialize(schema, val) : SKIP));\nexport const deserializeArray = (values, itemDeserializer, options) => {\n if (Array.isArray(values)) {\n return values.map(itemDeserializer);\n }\n return options?.skipIfEmpty ? SKIP : [];\n};\nexport const serializeArray = (values, itemSerializer, options) => {\n let forceReturnEmptyInTest = false;\n // NOTE: this block is meant for test, `webpack` will tree-shake it\n // so we never reach inside, else we would get error about `process is not defined` as we're\n // in browser environment\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV === 'test') {\n forceReturnEmptyInTest =\n Boolean(options?.INTERNAL__forceReturnEmptyInTest) &&\n // eslint-disable-next-line no-process-env\n process.env.TEST_MODE === 'grammar';\n }\n if (Array.isArray(values)) {\n return values.length\n ? values.map((value) => itemSerializer(value))\n : forceReturnEmptyInTest\n ? []\n : options?.skipIfEmpty\n ? SKIP\n : [];\n }\n return forceReturnEmptyInTest ? [] : SKIP;\n};\n/**\n * This is the idiomatic usage pattern for serialization of optional list of objects.\n *\n * Notice our particular usage of `serializeArray` and `deserializeArray` that is deisnged\n * for testing and accounting for logic mismatches between servers and studio\n */\nexport const customListWithSchema = (schema, options) => custom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const customList = (serializer, deserializer, options) => custom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\nexport const customEquivalentList = (options) => customList((value) => value, (value) => value, options);\nexport const optionalCustomListWithSchema = (schema, options) => optionalCustom((values) => serializeArray(values, (value) => serialize(schema, value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserialize(schema, value), {\n skipIfEmpty: false,\n}));\nexport const optionalCustomList = (serializer, deserializer, options) => optionalCustom((values) => serializeArray(values, (value) => serializer(value), {\n skipIfEmpty: true,\n INTERNAL__forceReturnEmptyInTest: options?.INTERNAL__forceReturnEmptyInTest,\n}), (values) => deserializeArray(values, (value) => deserializer(value), {\n skipIfEmpty: false,\n}));\n/**\n * NOTE: this is a workaround for `serializr` to avoid the magic extension mechanism provided\n * by `createModelSchema`, where depending on the order schemas are defined, if the schema of the\n * super class is specified first, when we serialize subclasses, we would get fields of the order\n * of fields from the super classes first, followed by fields from the subclasses, not the order\n * specified in the subclass's schema.\n *\n * See https://github.com/mobxjs/serializr/issues/179\n */\nexport const TEMPORARY__disableModelSchemaExtensionMechanism = (schema) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n schema.extends = undefined;\n return schema;\n};\n//# sourceMappingURL=SerializationUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SerializationFactory, LogEvent, uniq, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { createModelSchema, custom, list, optional, primitive, } from 'serializr';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport class DocumentationEntry {\n key;\n markdownText;\n title;\n text;\n url;\n related;\n static serialization = new SerializationFactory(createModelSchema(DocumentationEntry, {\n markdownText: custom((val) => val, (val) => (val.value ? val : undefined)),\n related: optional(list(primitive())),\n title: optional(primitive()),\n text: optional(primitive()),\n url: optional(primitive()),\n }));\n static create(json, documentationKey) {\n const entry = DocumentationEntry.serialization.fromJson(json);\n entry.key = documentationKey;\n return entry;\n }\n}\nexport const collectKeyedDocumentationEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: DocumentationEntry.create(entry[1], entry[0]),\n}));\nexport const collectDocumentationLinkEntryFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: guaranteeNonEmptyString(entry[0], \"Documentation link 'key' is missing\"),\n label: guaranteeNonEmptyString(entry[1].label, \"Documentation link 'label' is missing\"),\n url: guaranteeNonEmptyString(entry[1].url, \"Documentation link 'url' is missing\"),\n}));\nexport const collectContextualDocumentationEntries = (config) => Object.entries(config).map((entry) => ({\n context: entry[0],\n documentationKey: entry[1],\n}));\nexport class DocumentationService {\n url;\n links;\n docRegistry = new Map();\n contextualDocIndex = new Map();\n constructor(applicationStore) {\n // set the main documenation site url\n this.url = applicationStore.config.documentationUrl;\n this.links = applicationStore.config.documentationLinkEntries;\n /**\n * NOTE: the order of documentation entry overidding is (the later override the former):\n * 1. Natively specified: specified in the codebase (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism, the order of plugins matter,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 2. Fetched from documentation registries (no overriding allowed within this group of documentation entries):\n * since we have extension mechanism and allow specifying multiple registry URLS,\n * we do not allow overriding, i.e. so the first specification for a documentation key wins\n * 3. Configured in application config (overiding allowed within this group)\n */\n // build doc registry\n applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedDocumentationEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // accidentally overide entries from core.\n if (this.hasDocEntry(entry.key)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_LOAD__SKIP), entry.key);\n }\n else {\n this.docRegistry.set(entry.key, entry.content);\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.keyedDocumentationEntries.forEach((entry) => this.docRegistry.set(entry.key, entry.content));\n const contextualDocEntries = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraContextualDocumentationEntries?.() ?? []);\n // verify that required documentations are available\n const missingDocumentationEntries = [];\n uniq(applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraRequiredDocumentationKeys?.() ?? [])\n .concat(contextualDocEntries.map((entry) => entry.documentationKey))).forEach((key) => {\n if (!this.docRegistry.has(key)) {\n missingDocumentationEntries.push(key);\n }\n });\n if (missingDocumentationEntries.length) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_REQUIREMENT_CHECK__FAILURE), `Can't find corresponding documentation entry for keys:\\n${missingDocumentationEntries\n .map((key) => `- ${key}`)\n .join('\\n')}`);\n }\n // Contextual Documentation\n contextualDocEntries.forEach((entry) => {\n // NOTE: Entries specified natively will not override each other. This is to prevent entries from extensions\n // overriding entries from core.\n //\n // However, it might be useful to allow extending the list of related doc entries.\n // This allows extensions to broaden related doc entries for contextual docs\n // If we need to support this behavior, we could create a dedicated extension method\n if (this.hasContextualDocEntry(entry.context)) {\n applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.CONTEXTUAL_DOCUMENTATION_LOAD__SKIP), entry.context);\n }\n else {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n }\n });\n // entries from config will override entries specified natively\n applicationStore.config.contextualDocEntries.forEach((entry) => {\n const existingDocEntry = this.getDocEntry(entry.documentationKey);\n if (existingDocEntry) {\n this.contextualDocIndex.set(entry.context, existingDocEntry);\n }\n });\n }\n getDocEntry(key) {\n return this.docRegistry.get(key);\n }\n hasDocEntry(key) {\n return this.docRegistry.has(key);\n }\n getContextualDocEntry(key) {\n return this.contextualDocIndex.get(key);\n }\n hasContextualDocEntry(key) {\n return this.contextualDocIndex.has(key);\n }\n getAllDocEntries() {\n return Array.from(this.docRegistry.values());\n }\n publishDocRegistry() {\n const result = {};\n this.docRegistry.forEach((value, key) => {\n result[key] = DocumentationEntry.serialization.toJson(value);\n });\n return result;\n }\n publishContextualDocIndex() {\n const result = {};\n this.contextualDocIndex.forEach((value, key) => {\n result[key] = value.key;\n });\n return result;\n }\n}\n//# sourceMappingURL=DocumentationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nvar ACTION_STATE;\n(function (ACTION_STATE) {\n ACTION_STATE[\"INITIAL\"] = \"INITIAL\";\n ACTION_STATE[\"IN_PROGRESS\"] = \"IN_PROGRESS\";\n ACTION_STATE[\"SUCCEEDED\"] = \"SUCEEDED\";\n ACTION_STATE[\"FAILED\"] = \"FAILED\";\n})(ACTION_STATE || (ACTION_STATE = {}));\nexport class ActionState {\n state;\n _message;\n _messageFormatter;\n constructor() {\n this.state = ACTION_STATE.INITIAL;\n }\n setMessage(val) {\n this._message = val;\n }\n setMessageFormatter(val) {\n this._messageFormatter = val;\n }\n reset() {\n this.state = ACTION_STATE.INITIAL;\n return this;\n }\n inProgress() {\n this.state = ACTION_STATE.IN_PROGRESS;\n return this;\n }\n fail() {\n this.state = ACTION_STATE.FAILED;\n return this;\n }\n pass() {\n this.state = ACTION_STATE.SUCCEEDED;\n return this;\n }\n complete(hasSucceeded = true) {\n if (hasSucceeded) {\n this.pass();\n }\n else {\n this.fail();\n }\n return this;\n }\n sync(val) {\n const data = val.exportData();\n this.state = data.state;\n this._message = data.message;\n }\n exportData() {\n return {\n state: this.state,\n message: this._message,\n };\n }\n get isInInitialState() {\n return this.state === ACTION_STATE.INITIAL;\n }\n get isInProgress() {\n return this.state === ACTION_STATE.IN_PROGRESS;\n }\n get hasFailed() {\n return this.state === ACTION_STATE.FAILED;\n }\n get hasSucceeded() {\n return this.state === ACTION_STATE.SUCCEEDED;\n }\n get message() {\n return this._message\n ? this._messageFormatter\n ? this._messageFormatter(this._message)\n : this._message\n : undefined;\n }\n /**\n * Use this if only the completion state of the action is of concern,\n * i.e. we don't care if it fails or succeeds.\n */\n get hasCompleted() {\n return this.hasFailed || this.hasSucceeded;\n }\n static create() {\n return makeObservable(new ActionState(), {\n state: observable,\n _message: observable,\n reset: action,\n inProgress: action,\n pass: action,\n fail: action,\n complete: action,\n setMessage: action,\n sync: action,\n isInInitialState: computed,\n isInProgress: computed,\n hasFailed: computed,\n hasSucceeded: computed,\n hasCompleted: computed,\n message: computed,\n });\n }\n}\n//# sourceMappingURL=ActionState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '../application/AbstractPluginManager.js';\nexport var CORE_TRACER_TAG;\n(function (CORE_TRACER_TAG) {\n CORE_TRACER_TAG[\"USER\"] = \"user\";\n CORE_TRACER_TAG[\"ENV\"] = \"env\";\n CORE_TRACER_TAG[\"RESULT\"] = \"result\";\n CORE_TRACER_TAG[\"ERROR\"] = \"error\";\n CORE_TRACER_TAG[\"HTTP_STATUS\"] = \"status\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_METHOD\"] = \"method\";\n CORE_TRACER_TAG[\"HTTP_REQUEST_URL\"] = \"url\";\n})(CORE_TRACER_TAG || (CORE_TRACER_TAG = {}));\nexport class TracerServicePlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerTracerServicePlugin(this);\n }\n}\nexport class Trace {\n traceEntries = [];\n setup(traceEntries) {\n this.traceEntries = traceEntries;\n }\n bootstrap(response) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.bootstrap(entry.clientSpan, response);\n });\n }\n reportSuccess() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, undefined);\n });\n }\n reportError(error) {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeClientSpan(entry.clientSpan, error);\n });\n }\n close() {\n this.traceEntries.forEach((entry) => {\n entry.plugin.concludeServerSpan(entry.serverSpan);\n });\n }\n}\nexport class TracerService {\n plugins = [];\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n createTrace(traceData, method, url, headers) {\n const trace = new Trace();\n if (traceData) {\n trace.setup(this.plugins.map((plugin) => {\n const clientSpan = plugin.createClientSpan(traceData);\n const serverSpan = plugin.createServerSpan(clientSpan, method, url, headers);\n return {\n clientSpan,\n serverSpan,\n plugin,\n };\n }));\n }\n return trace;\n }\n}\n//# sourceMappingURL=TracerService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Fuse from 'fuse.js';\nexport const FuzzySearchEngine = Fuse;\n//# sourceMappingURL=FuzzySearch.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nexport var ADVANCED_FUZZY_SEARCH_MODE;\n(function (ADVANCED_FUZZY_SEARCH_MODE) {\n ADVANCED_FUZZY_SEARCH_MODE[\"STANDARD\"] = \"standard\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INCLUDE\"] = \"include match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"EXACT\"] = \"exact match\";\n ADVANCED_FUZZY_SEARCH_MODE[\"INVERSE\"] = \"excludes exact match\";\n})(ADVANCED_FUZZY_SEARCH_MODE || (ADVANCED_FUZZY_SEARCH_MODE = {}));\nexport class FuzzySearchAdvancedConfigState {\n currentMode = ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n onSearchModeChange;\n constructor(onSearchModeChange) {\n makeObservable(this, {\n currentMode: observable,\n isAdvancedSearchActive: computed,\n setCurrentMode: action,\n });\n this.onSearchModeChange = onSearchModeChange;\n }\n get isAdvancedSearchActive() {\n return this.currentMode !== ADVANCED_FUZZY_SEARCH_MODE.STANDARD;\n }\n generateSearchText(val) {\n switch (this.currentMode) {\n case ADVANCED_FUZZY_SEARCH_MODE.INCLUDE: {\n return `'\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.EXACT: {\n return `=\"${val}\"`;\n }\n case ADVANCED_FUZZY_SEARCH_MODE.INVERSE: {\n return `!\"${val}\"`;\n }\n default: {\n return val;\n }\n }\n }\n setCurrentMode(val) {\n this.currentMode = val;\n this.onSearchModeChange();\n }\n}\n//# sourceMappingURL=FuzzySearchAdvancedConfigState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable, computed } from 'mobx';\nimport { guaranteeNonEmptyString, uuid, isNonNullable, ActionState, FuzzySearchEngine, FuzzySearchAdvancedConfigState, } from '@finos/legend-shared';\nexport var VIRTUAL_ASSISTANT_TAB;\n(function (VIRTUAL_ASSISTANT_TAB) {\n VIRTUAL_ASSISTANT_TAB[\"SEARCH\"] = \"SEARCH\";\n VIRTUAL_ASSISTANT_TAB[\"CONTEXTUAL_SUPPORT\"] = \"CONTEXTUAL_SUPPORT\";\n})(VIRTUAL_ASSISTANT_TAB || (VIRTUAL_ASSISTANT_TAB = {}));\nexport const DOCUMENTATION_SEARCH_RESULTS_LIMIT = 100;\nexport class VirtualAssistantDocumentationEntry {\n uuid = uuid();\n documentationKey;\n title;\n content;\n url;\n isOpen = false;\n constructor(docEntry) {\n makeObservable(this, {\n isOpen: observable,\n setIsOpen: action,\n });\n this.documentationKey = docEntry.key;\n this.title = guaranteeNonEmptyString(docEntry.title);\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n}\nexport class VirtualAssistantContextualDocumentationEntry {\n uuid = uuid();\n context;\n title;\n content;\n url;\n related;\n constructor(context, docEntry, related) {\n this.context = context;\n this.title = docEntry.title;\n this.content = docEntry.markdownText ?? docEntry.text;\n this.url = docEntry.url;\n this.related = related;\n }\n}\n/**\n * NOTE: since we're displaying the documentation entry in virtual assistant\n * we want only user-friendly docs, we will discard anything that doesn't\n * come with a title, or does not have any content/url\n */\nexport const isValidVirtualAssistantDocumentationEntry = (entry) => Boolean(entry.title && (entry.url ?? entry.text ?? entry.markdownText));\n/**\n * Check if the documentation entry should be displayed in virtual assistant,\n * i.e. it has some text content, rather just a link\n */\nexport const shouldDisplayVirtualAssistantDocumentationEntry = (entry) => isValidVirtualAssistantDocumentationEntry(entry) &&\n Boolean(entry.text ?? entry.markdownText);\nexport class AssistantService {\n applicationStore;\n /**\n * This key is used to allow programmatic re-rendering of the assistant panel\n */\n panelRenderingKey = uuid();\n isHidden = true; // hide by default unless specified by the application to show\n isOpen = false;\n isPanelMaximized = false;\n selectedTab = VIRTUAL_ASSISTANT_TAB.SEARCH;\n currentDocumentationEntry;\n // search text\n searchEngine;\n searchConfigurationState;\n searchState = ActionState.create();\n searchText = '';\n searchResults = [];\n showSearchConfigurationMenu = false;\n isOverSearchLimit = false;\n constructor(applicationStore) {\n makeObservable(this, {\n isHidden: observable,\n isOpen: observable,\n isPanelMaximized: observable,\n panelRenderingKey: observable,\n isOverSearchLimit: observable,\n selectedTab: observable,\n searchText: observable,\n searchResults: observable,\n currentDocumentationEntry: observable,\n showSearchConfigurationMenu: observable,\n currentContextualDocumentationEntry: computed,\n setIsHidden: action,\n setIsOpen: action,\n setIsPanelMaximized: action,\n setSelectedTab: action,\n setSearchText: action,\n resetSearch: action,\n search: action,\n openDocumentationEntry: action,\n refreshPanelRendering: action,\n setShowSearchConfigurationMenu: action,\n });\n this.applicationStore = applicationStore;\n this.searchEngine = new FuzzySearchEngine(this.applicationStore.documentationService\n .getAllDocEntries()\n .filter(isValidVirtualAssistantDocumentationEntry), {\n includeScore: true,\n shouldSort: true,\n // Ignore location when computing the search score\n // See https://fusejs.io/concepts/scoring-theory.html\n ignoreLocation: true,\n // This specifies the point the search gives up\n // `0.0` means exact match where `1.0` would match anything\n // We set a relatively low threshold to filter out irrelevant results\n threshold: 0.2,\n keys: [\n {\n // NOTE: for now, we would weight title the most\n name: 'title',\n weight: 4,\n },\n {\n name: 'text',\n weight: 1,\n },\n {\n name: 'markdownText.value',\n weight: 1,\n },\n ],\n // extended search allows for exact word match through single quote\n // See https://fusejs.io/examples.html#extended-search\n useExtendedSearch: true,\n });\n this.searchConfigurationState = new FuzzySearchAdvancedConfigState(() => {\n this.search();\n });\n }\n get currentContextualDocumentationEntry() {\n if (!this.applicationStore.navigationContextService.currentContext) {\n return undefined;\n }\n const currentContext = this.applicationStore.navigationContextService.currentContext.key;\n const currentContextualDocumentationEntry = this.applicationStore.documentationService.getContextualDocEntry(currentContext);\n return currentContextualDocumentationEntry\n ? new VirtualAssistantContextualDocumentationEntry(currentContext, currentContextualDocumentationEntry, (currentContextualDocumentationEntry.related ?? [])\n .map((entry) => this.applicationStore.documentationService.getDocEntry(entry))\n .filter(isNonNullable)\n .filter(isValidVirtualAssistantDocumentationEntry)\n .map((entry) => new VirtualAssistantDocumentationEntry(entry)))\n : undefined;\n }\n openDocumentationEntry(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n this.setIsOpen(true);\n this.setIsHidden(false);\n this.currentDocumentationEntry = new VirtualAssistantDocumentationEntry(entry);\n this.currentDocumentationEntry.setIsOpen(true);\n this.resetSearch();\n }\n }\n openDocumentationEntryLink(key) {\n const entry = this.applicationStore.documentationService.getDocEntry(key);\n if (entry) {\n if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {\n this.openDocumentationEntry(entry.key);\n }\n else if (entry.url) {\n this.applicationStore.navigationService.navigator.visitAddress(entry.url);\n }\n }\n }\n setIsHidden(val) {\n this.isHidden = val;\n }\n setIsPanelMaximized(val) {\n this.isPanelMaximized = val;\n }\n hideAssistant() {\n this.setIsHidden(true);\n this.setIsOpen(false);\n }\n toggleAssistant() {\n const newVal = !this.isHidden;\n if (newVal) {\n this.hideAssistant();\n }\n else {\n this.setIsHidden(false);\n }\n }\n setIsOpen(val) {\n this.isOpen = val;\n }\n setSelectedTab(val) {\n this.selectedTab = val;\n }\n refreshPanelRendering() {\n this.panelRenderingKey = uuid();\n }\n setSearchText(val) {\n this.searchText = val;\n }\n resetSearch() {\n this.searchText = '';\n this.searchResults = [];\n this.searchState.complete();\n }\n search() {\n if (!this.searchText) {\n this.searchResults = [];\n return;\n }\n this.currentDocumentationEntry = undefined;\n this.searchState.inProgress();\n this.searchResults = Array.from(this.searchEngine\n .search(this.searchConfigurationState.generateSearchText(this.searchText), {\n // NOTE: search for limit + 1 item so we can know if there are more search results\n limit: DOCUMENTATION_SEARCH_RESULTS_LIMIT + 1,\n })\n .values()).map((result) => new VirtualAssistantDocumentationEntry(result.item));\n // check if the search results exceed the limit\n if (this.searchResults.length > DOCUMENTATION_SEARCH_RESULTS_LIMIT) {\n this.isOverSearchLimit = true;\n this.searchResults = this.searchResults.slice(0, DOCUMENTATION_SEARCH_RESULTS_LIMIT);\n }\n else {\n this.isOverSearchLimit = false;\n }\n this.searchState.complete();\n }\n setShowSearchConfigurationMenu(val) {\n this.showSearchConfigurationMenu = val;\n }\n}\n//# sourceMappingURL=AssistantService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class EventNotifierPlugin extends AbstractPlugin {\n install(pluginManager) {\n pluginManager.registerEventNotifierPlugin(this);\n }\n}\nexport class EventService {\n notifierPlugins = [];\n registerEventNotifierPlugins(plugins) {\n this.notifierPlugins = plugins;\n }\n notify(event, data) {\n this.notifierPlugins.forEach((plugin) => plugin.notify(event, data));\n }\n}\n//# sourceMappingURL=EventService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT } from './LegendApplicationEvent.js';\nexport class LegendApplicationTelemetryHelper {\n static logEvent_ApplicationInitializationSucceeded(service, applicationStore) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS, {\n application: {\n name: applicationStore.config.appName,\n version: applicationStore.config.appVersion,\n env: applicationStore.config.env,\n },\n browser: {\n userAgent: navigator.userAgent,\n },\n screen: {\n height: window.screen.height,\n width: window.screen.width,\n },\n });\n }\n static logEvent_ApplicationContextAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_CONTEXT__ACCESS, data);\n }\n static logEvent_VirtualAssistantDocumentationEntryAccessed(service, data) {\n service.logEvent(APPLICATION_EVENT.VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS, data);\n }\n static logEvent_ApplicationUsageInterrupted(service) {\n service.logEvent(APPLICATION_EVENT.APPLICATION_USAGE__INTERRUPT, {});\n }\n}\n//# sourceMappingURL=LegendApplicationTelemetry.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { IllegalStateError } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\n/**\n * Context data refers to the area of the application that the user is\n * currently navigating.\n *\n * NOTE: note that this is navigation-driven, do not associate places\n * which present in the app screen that is not a direct consequence\n * of user's navigation. e.g. the status bar is not a good area to\n * be considered a context, the editor screen is because it means\n * the user must have navigated to the editor screen from somewhere,\n * for instance, the setup page.\n */\nexport class ApplicationNavigationContextData {\n key;\n /**\n * There are 2 types of context data: `standard` and `transient`\n * 1. standard context data represents an application context layer that\n * would be pushed to the stack and the context will be popped as we leave\n * the application, in other words, the context will be properly cleaned up\n * e.g. when we go in an editor, we will push context data to the stack and\n * pop it when we leave that editor\n * 2. transient context does not guarantee to be cleaned up properly, this\n * corresponds to application areas whose presense is transient and not stable:\n * such as those triggered by on-flight events, whose exit-state is hard to capture\n * e.g. user focuses on an input\n *\n * NOTE: transient context must not be mistakened as event, even in the example of\n * user focusing on an input, that's an area of the application that we might want\n * to get record of in terms of context. Events like a notification pop up, failure\n * of some long-running processes are not considered application contexts\n */\n isTransient = false;\n constructor(key, isTransient) {\n this.key = key;\n this.isTransient = isTransient;\n }\n static create(key) {\n return new ApplicationNavigationContextData(key, false);\n }\n static createTransient(key) {\n return new ApplicationNavigationContextData(key, true);\n }\n}\nexport class ApplicationNavigationContextService {\n applicationStore;\n contextStack = [];\n constructor(applicationStore) {\n makeObservable(this, {\n contextStack: observable,\n currentContext: computed,\n push: action,\n pop: action,\n });\n this.applicationStore = applicationStore;\n }\n get currentContext() {\n return this.contextStack.length\n ? this.contextStack[this.contextStack.length - 1]\n : undefined;\n }\n /**\n * Add the context to the stack.\n *\n * If the context is already if the context is already part of the stack\n * we will throw an error. This is to make sure we context is unique in the stack\n * and we do proper context stack cleanups on navigation.\n */\n push(context) {\n // first, filter out all transient contexts, so we can be sure that\n // all of the remaining contexts are standard and they should be cleaned up properly\n // this makes our duplication meaningful\n const newContextStack = this.contextStack.filter((ctx) => !ctx.isTransient);\n if (newContextStack.find((ctx) => ctx.key === context.key)) {\n throw new IllegalStateError(`Found multiple context '${context.key}' in application navigation context stack`);\n }\n newContextStack.push(context);\n // log the context being accessed if it's in the list of interested context keys\n if (this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraAccessEventLoggingApplicationContextKeys?.() ?? [])\n .includes(context.key)) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationContextAccessed(this.applicationStore.telemetryService, {\n key: context.key,\n });\n }\n this.contextStack = newContextStack;\n }\n /**\n * Remove the context from the stack.\n *\n * NOTE: we will check from bottom of the stack up, for the specified context,\n * if it's found in the context stack, we will pop until the specified context.\n * This is to allow popping deeper context layers from very high up in the application\n * context stack, e.g. removing a context of an element editor when leaving the editor\n * to go to setup page.\n */\n pop(context) {\n const existingCtx = this.contextStack.find((ctx) => ctx.key === context.key);\n if (!existingCtx) {\n return;\n }\n // NOTE: since we should not have any duplicated contexts\n // it's safe to search from bottom to top of the stack\n const idx = this.contextStack.indexOf(existingCtx);\n if (idx !== -1) {\n this.contextStack = this.contextStack\n .slice(0, idx)\n // remove all transient contexts\n .filter((ctx) => !ctx.isTransient);\n }\n }\n}\n//# sourceMappingURL=ApplicationNavigationContextService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nexport const collectKeyedCommandConfigEntriesFromConfig = (rawEntries) => Object.entries(rawEntries).map((entry) => ({\n key: entry[0],\n content: entry[1],\n}));\nexport class CommandService {\n applicationStore;\n commandRegistry = new Map();\n constructor(applicationStore) {\n makeObservable(this, {\n commandRegistry: observable,\n registerCommand: action,\n deregisterCommand: action,\n });\n this.applicationStore = applicationStore;\n }\n registerCommand(command) {\n const commandKey = command.key;\n if (this.commandRegistry.has(commandKey)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COMMAND_CENTER_REGISTRATION__FAILURE), `Can't register command: command is already registered`);\n return;\n }\n this.commandRegistry.set(commandKey, command);\n }\n deregisterCommand(commandKey) {\n this.commandRegistry.delete(commandKey);\n }\n runCommand(commandKey, args) {\n const command = this.commandRegistry.get(commandKey);\n if (command && (!command.trigger || command.trigger())) {\n command.action?.(args);\n return true;\n }\n return false;\n }\n}\n//# sourceMappingURL=CommandService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isNonNullable } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class KeyboardShortcutsService {\n applicationStore;\n /**\n * NOTE: with this design, the relationship between command and key is many-to-many\n * We can have multiple commands being mapped to the same key combination, and vice versa\n */\n keyMap = new Map();\n commandKeyMap = new Map();\n isHotkeysBlocked = false;\n constructor(applicationStore) {\n makeObservable(this, {\n keyMap: observable,\n commandKeyMap: observable,\n isHotkeysBlocked: observable,\n addHotkey: action,\n blockGlobalHotkeys: action,\n unblockGlobalHotkeys: action,\n });\n this.applicationStore = applicationStore;\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraKeyedCommandConfigEntries?.() ?? [])\n .forEach((entry) => {\n // NOTE: since we allow mapping multiple commands to the same key combination\n // and when dispatching the command with a particular key combination, we only\n // execute the first matching command, if we override the config, we would need\n // to add them to the beginning of this list.\n // TODO: do validation on hot keys, hot keys which consist only of modifier keys, e.g. `Shift Shift` should not be supported\n const shortcuts = [\n entry.content.defaultKeyboardShortcut,\n ...(entry.content.additionalKeyboardShortcuts ?? []),\n ].filter(isNonNullable);\n if (shortcuts.length) {\n shortcuts.forEach((shortcut) => this.addHotkey(entry.key, shortcut));\n }\n else {\n if (!this.commandKeyMap.has(entry.key)) {\n this.commandKeyMap.set(entry.key, []);\n }\n }\n });\n }\n blockGlobalHotkeys() {\n this.isHotkeysBlocked = true;\n }\n unblockGlobalHotkeys() {\n this.isHotkeysBlocked = false;\n }\n addHotkey(commandKey, keyCombination) {\n // add shortcut to command key map\n this.commandKeyMap.set(commandKey, [\n ...(this.commandKeyMap.get(commandKey) ?? []),\n keyCombination,\n ]);\n // add new key map\n this.keyMap.set(keyCombination, [\n ...(this.keyMap.get(keyCombination) ?? []).filter((key) => key !== commandKey),\n commandKey,\n ]);\n }\n dispatch(keyCombination) {\n if (this.isHotkeysBlocked) {\n return;\n }\n const mappedCommandKeys = this.keyMap.get(keyCombination) ?? [];\n for (const commandKey of mappedCommandKeys) {\n // find the first command that works then escape\n if (this.applicationStore.commandService.runCommand(commandKey)) {\n return;\n }\n }\n }\n}\n//# sourceMappingURL=KeyboardShortcutsService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const DEFAULT_TAB_SIZE = 2;\nexport const DEFAULT_MONOSPACED_FONT_FAMILY = 'Roboto Mono';\nexport const DEFAULT_DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss\";\nexport const DEFAULT_TYPEAHEAD_SEARCH_MINIMUM_SEARCH_LENGTH = 2;\nexport const DEFAULT_TYPEAHEAD_SEARCH_LIMIT = 10;\n//# sourceMappingURL=ApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\n// NOTE: using Unicode for ANSI escape\n// See https://stackoverflow.com/questions/26153308/best-ansi-escape-beginning\n// See https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797\nexport var DISPLAY_ANSI_ESCAPE;\n(function (DISPLAY_ANSI_ESCAPE) {\n DISPLAY_ANSI_ESCAPE[\"RESET\"] = \"\\u001B[0m\";\n // text decoration\n DISPLAY_ANSI_ESCAPE[\"BOLD\"] = \"\\u001B[1m\";\n DISPLAY_ANSI_ESCAPE[\"DIM\"] = \"\\u001B[2m\";\n DISPLAY_ANSI_ESCAPE[\"ITALIC\"] = \"\\u001B[3m\";\n DISPLAY_ANSI_ESCAPE[\"UNDERLINE\"] = \"\\u001B[4m\";\n DISPLAY_ANSI_ESCAPE[\"BLINKING\"] = \"\\u001B[5m\";\n DISPLAY_ANSI_ESCAPE[\"STRIKETHROUGH\"] = \"\\u001B[9m\";\n // foreground\n DISPLAY_ANSI_ESCAPE[\"BLACK\"] = \"\\u001B[30m\";\n DISPLAY_ANSI_ESCAPE[\"RED\"] = \"\\u001B[31m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN\"] = \"\\u001B[32m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW\"] = \"\\u001B[33m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE\"] = \"\\u001B[34m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA\"] = \"\\u001B[35m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN\"] = \"\\u001B[36m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE\"] = \"\\u001B[37m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK\"] = \"\\u001B[1;30m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED\"] = \"\\u001B[1;31m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN\"] = \"\\u001B[1;32m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW\"] = \"\\u001B[1;33m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE\"] = \"\\u001B[1;34m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA\"] = \"\\u001B[1;35m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN\"] = \"\\u001B[1;36m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE\"] = \"\\u001B[1;37m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK\"] = \"\\u001B[2;30m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED\"] = \"\\u001B[2;31m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN\"] = \"\\u001B[2;32m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW\"] = \"\\u001B[2;33m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE\"] = \"\\u001B[2;34m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA\"] = \"\\u001B[2;35m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN\"] = \"\\u001B[2;36m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE\"] = \"\\u001B[2;37m\";\n // background\n DISPLAY_ANSI_ESCAPE[\"BLACK_BG\"] = \"\\u001B[40m\";\n DISPLAY_ANSI_ESCAPE[\"RED_BG\"] = \"\\u001B[41m\";\n DISPLAY_ANSI_ESCAPE[\"GREEN_BG\"] = \"\\u001B[42m\";\n DISPLAY_ANSI_ESCAPE[\"YELLOW_BG\"] = \"\\u001B[43m\";\n DISPLAY_ANSI_ESCAPE[\"BLUE_BG\"] = \"\\u001B[44m\";\n DISPLAY_ANSI_ESCAPE[\"MAGENTA_BG\"] = \"\\u001B[45m\";\n DISPLAY_ANSI_ESCAPE[\"CYAN_BG\"] = \"\\u001B[46m\";\n DISPLAY_ANSI_ESCAPE[\"WHITE_BG\"] = \"\\u001B[47m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLACK_BG\"] = \"\\u001B[1;40m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_RED_BG\"] = \"\\u001B[1;41m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_GREEN_BG\"] = \"\\u001B[1;42m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_YELLOW_BG\"] = \"\\u001B[1;43m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_BLUE_BG\"] = \"\\u001B[1;44m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_MAGENTA_BG\"] = \"\\u001B[1;45m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_CYAN_BG\"] = \"\\u001B[1;46m\";\n DISPLAY_ANSI_ESCAPE[\"BRIGHT_WHITE_BG\"] = \"\\u001B[1;47m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLACK_BG\"] = \"\\u001B[2;40m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_RED_BG\"] = \"\\u001B[2;41m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_GREEN_BG\"] = \"\\u001B[2;42m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_YELLOW_BG\"] = \"\\u001B[2;43m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_BLUE_BG\"] = \"\\u001B[2;44m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_MAGENTA_BG\"] = \"\\u001B[2;45m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_CYAN_BG\"] = \"\\u001B[2;46m\";\n DISPLAY_ANSI_ESCAPE[\"DIMMED_WHITE_BG\"] = \"\\u001B[2;47m\";\n})(DISPLAY_ANSI_ESCAPE || (DISPLAY_ANSI_ESCAPE = {}));\n/**\n * NOTE: this is the line and the column of the viewport of the terminal;\n * Also, line and column start from 1\n */\nexport const ANSI_moveCursor = (line, column) => `\\x1b[${line};${column}H`;\nexport const ANSI_moveCursorUp = (val, start) => start ? `\\x1b[${val}F` : `\\x1b[${val}A`;\nexport const ANSI_moveCursorDown = (val, start) => start ? `\\x1b[${val}E` : `\\x1b[${val}B`;\nexport const ANSI_moveCursorRight = (val) => `\\x1b[${val}C`;\nexport const ANSI_moveCursorLeft = (val) => `\\x1b[${val}D`;\nexport const ANSI_moveCursorToColumn = (val) => `\\x1b[${val}G`;\nclass ConsoleSearchConfiguration {\n searchInput;\n searchText = '';\n useRegex = false;\n matchWholeWord = false;\n matchCaseSensitive = false;\n resultCount;\n currentResultIndex;\n constructor() {\n makeObservable(this, {\n searchText: observable,\n useRegex: observable,\n matchWholeWord: observable,\n matchCaseSensitive: observable,\n resultCount: observable,\n currentResultIndex: observable,\n });\n }\n setSearchInput(el) {\n this.searchInput = el;\n }\n focus() {\n this.searchInput?.focus();\n }\n}\nexport class Console {\n applicationStore;\n searchConfig = new ConsoleSearchConfiguration();\n constructor(applicationStore) {\n makeObservable(this, {\n setSearchText: action,\n setSearchRegex: action,\n setSearchWholeWord: action,\n setSearchCaseSensitive: action,\n setSearchResultCount: action,\n setSearchCurrentResultIndex: action,\n });\n this.applicationStore = applicationStore;\n }\n setSearchText(val) {\n this.searchConfig.searchText = val;\n }\n setSearchRegex(val) {\n this.searchConfig.useRegex = val;\n }\n setSearchWholeWord(val) {\n this.searchConfig.matchWholeWord = val;\n }\n setSearchCaseSensitive(val) {\n this.searchConfig.matchCaseSensitive = val;\n }\n setSearchResultCount(val) {\n this.searchConfig.resultCount = val;\n }\n setSearchCurrentResultIndex(val) {\n this.searchConfig.currentResultIndex = val;\n }\n}\nexport class OutputConsole extends Console {\n}\nexport class Terminal extends Console {\n preserveLog = false;\n commandRegistry = new Map();\n constructor(applicationStore) {\n super(applicationStore);\n makeObservable(this, {\n preserveLog: observable,\n setPreserveLog: action,\n });\n }\n setPreserveLog(val) {\n this.preserveLog = val;\n }\n showHelp() {\n // do nothing\n }\n showCommonANSIEscapeSequences() {\n // do nothing\n }\n}\n//# sourceMappingURL=Terminal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { stringify as losslessStringify, parse as losslessParse, isSafeNumber as lossIsSafeNumber, } from 'lossless-json';\nimport CSVParser from 'papaparse';\nimport { assertNonNullable } from '../error/AssertionUtils.js';\nexport const capitalize = (value) => value.length >= 1\n ? `${value[0].toUpperCase()}${value.substring(1, value.length)}`\n : value;\nexport const toSentenceCase = (value) => (value ?? '').trim().replace(/^(?:\\w+)\\b/u, (val) => capitalize(val));\nexport const TITLE_CASE_EXCEPTION_WORDS = [\n // We roughly follow AP style for simplicity\n // See https://en.wikipedia.org/wiki/Title_case\n 'a',\n 'an',\n 'the',\n 'but',\n 'by',\n 'nor',\n 'and',\n 'or',\n 'so',\n 'as',\n 'yet',\n 'for',\n 'in',\n 'nor',\n 'of',\n 'on',\n 'at',\n 'out',\n 'to',\n 'up',\n];\nexport const toTitleCase = (value) => (value ?? '')\n .trim()\n .replace(/\\b(?:\\w+)\\b/gu, (val) => {\n // lowercase minor words (typically articles, short prepositions, and some conjunctions)\n if (TITLE_CASE_EXCEPTION_WORDS.includes(val.toLowerCase())) {\n return val.toLowerCase();\n }\n return capitalize(val);\n})\n // always capitalize first and last word\n .replace(/^(?:\\w+)\\b/u, (val) => capitalize(val))\n .replace(/\\b(?:\\w+)$/u, (val) => capitalize(val));\nexport const prettyCONSTName = (value) => {\n if (!value) {\n return '';\n }\n // This handles our constant naming convention, e.g. SOME_VALUE, __PRIVATE_VALUE__, etc.\n if (value.trim().match(/^[A-Z_]+$/)) {\n return toTitleCase(value.trim().replace(/_+/gu, ' ').toLowerCase());\n }\n return (capitalize(value.trim())\n // NOTE: here we must use capturing group as we also need to capture the breakpoint/separator as chunks\n .split(/(?<chunk>[A-Z][a-z]+|[0-9]+)/)\n .map((chunk) => chunk.toUpperCase() === chunk\n ? chunk\n : chunk.charAt(0).toUpperCase() + chunk.slice(1).toLowerCase())\n .filter(Boolean)\n .join(' ')\n .replace(/_+/gu, ' ')\n .replace(/\\s+/gu, ' '));\n};\nexport const tryToFormatJSONString = (value, tabSize = 2) => {\n try {\n return JSON.stringify(JSON.parse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyJSONString = (value) => {\n try {\n return JSON.stringify(JSON.parse(value));\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\n/**\n * NOTE: this splits a string value into an array of strings by using a\n * delimiter of a comma if the string is only one line. However, if the\n * string has multiple lines, the delimiter will not be applied. This is so\n * that for an example input of multiple lines like\n * One, Comma in One\n * Two\n * Three\n * will still equal 3 elements (['One, Comma in One', 'Two', 'Three']) rather than 4\n */\nexport const parseCSVString = (value) => {\n let parseData;\n if (value.includes('\\n')) {\n parseData = value.trim().split(/\\r?\\n|\\r|\\n/g);\n return parseData;\n }\n else {\n const parseResult = CSVParser.parse(value.trim(), {\n delimiter: ',',\n });\n parseData = parseResult.data.flat();\n if (parseResult.errors.length) {\n // if (\n // parseResult.errors[0] &&\n // parseResult.errors[0].code === 'UndetectableDelimiter' &&\n // parseResult.errors[0].type === 'Delimiter' &&\n // parseResult.data.length === 1\n // ) {\n // // NOTE: this happens when the user only put one item in the value input\n // // we can go the other way by ensure the input has a comma but this is arguably neater\n // // as it tinkers with the parser\n // } else {\n // // there were some parsing error, escape\n // // NOTE: ideally, we could show a warning here\n // }\n return undefined;\n }\n else {\n return parseData;\n }\n }\n};\nexport const csvStringify = (value) => CSVParser.unparse(value);\n/**\n * One very common use case is that we get the JSON as response from the server than we will convert this to a string and persist\n * in the protocol. As such, we have to make sure this string is safe in PURE grammar format, i.e. it will escape single quotes\n * properly since PURE strings are wrapped in a pair of single quotes. The following pair of escape/unescape method does the simple job of\n * converting a JSON string to/from PURE grammar string\n *\n * NOTE: this is slightly different than escaping/unescaping JS string or normal JSON string, this is conversion is actually simplier since\n * the escaping is naturally handling by string conversion in Javascript, we just need to have special handling for the escaping of single-quotes\n * See https://stackoverflow.com/questions/3020094/how-should-i-escape-strings-in-json\n * See https://github.com/joliss/js-string-escape/blob/master/index.js\n */\nexport const fromGrammarString = (value) => value.replace(/\\\\'/gu, \"'\");\nexport const toGrammarString = (value) => value.replace(/'/gu, \"\\\\'\");\n/**\n * These are the sets of methods that helps with lossless conversion of JSON to/from text.\n *\n * The implementation of `JSON.parse` and `JSON.stringify` in Javascript is not lossless, e.g. values like 1.0 (a double) is automatically converted to 1 (an integer).\n * This pairs of method will convert the JSON losslessly. One caveat is that numeric values are stored as LosslessNumber, a data type which stores the numeric value as a string.\n *\n * NOTE: One can perform regular operations with a LosslessNumber, and it will throw an error when this would result in losing information.\n * But use this with discretion since it it does not result in the same object as `JSON.parse`\n */\nexport { losslessParse as parseLosslessJSON };\nexport { lossIsSafeNumber as isLossSafeNumber };\nexport const stringifyLosslessJSON = (val, replacer, space) => {\n const result = losslessStringify(val, replacer, space);\n assertNonNullable(result, `Can't stringify lossless JSON value`);\n return result;\n};\nexport const tryToFormatLosslessJSONString = (value, tabSize = 2) => {\n try {\n return stringifyLosslessJSON(losslessParse(value), undefined, tabSize);\n }\n catch {\n return value;\n }\n};\nexport const tryToMinifyLosslessJSONString = (value) => {\n try {\n return tryToFormatLosslessJSONString(value, 0);\n }\n catch {\n return value.replace(/\\n\\s*/g, '');\n }\n};\nexport const indent = (value, indentText) => value\n .split('\\n')\n .map((line) => `${indentText}${line}`)\n .join('\\n');\nexport const quantify = (value, label, pluralForm) => value <= 0\n ? `no ${pluralForm ?? `${label}s`}`\n : value > 1\n ? `${value} ${pluralForm ?? `${label}s`}`\n : `1 ${label}`;\nexport const quantifyList = (val, label, pluralForm) => quantify(val.length, label, pluralForm);\n//# sourceMappingURL=FormatterUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uniqBy } from '../CommonUtils.js';\nimport { guaranteeNonNullable } from '../error/AssertionUtils.js';\n/**\n * List of keyboard named key\n * See https://www.w3.org/TR/uievents-key/#named-key-attribute-values\n * See https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values\n */\nexport var KEYBOARD_NAMED_KEY;\n(function (KEYBOARD_NAMED_KEY) {\n KEYBOARD_NAMED_KEY[\"TAB\"] = \"Tab\";\n KEYBOARD_NAMED_KEY[\"CAPSLOCK\"] = \"CapsLock\";\n KEYBOARD_NAMED_KEY[\"SHIFT\"] = \"Shift\";\n KEYBOARD_NAMED_KEY[\"META\"] = \"Meta\";\n KEYBOARD_NAMED_KEY[\"ALT\"] = \"Alt\";\n KEYBOARD_NAMED_KEY[\"CONTROL\"] = \"Control\";\n KEYBOARD_NAMED_KEY[\"SPACE\"] = \"Space\";\n KEYBOARD_NAMED_KEY[\"ESC\"] = \"Escape\";\n KEYBOARD_NAMED_KEY[\"LEFT\"] = \"ArrowLeft\";\n KEYBOARD_NAMED_KEY[\"RIGHT\"] = \"ArrowRight\";\n KEYBOARD_NAMED_KEY[\"UP\"] = \"ArrowUp\";\n KEYBOARD_NAMED_KEY[\"DOWN\"] = \"ArrowDown\";\n KEYBOARD_NAMED_KEY[\"ENTER\"] = \"Enter\";\n KEYBOARD_NAMED_KEY[\"DELETE\"] = \"Delete\";\n KEYBOARD_NAMED_KEY[\"BACKSPACE\"] = \"Backspace\";\n KEYBOARD_NAMED_KEY[\"BACKQUOTE\"] = \"Backquote\";\n})(KEYBOARD_NAMED_KEY || (KEYBOARD_NAMED_KEY = {}));\n/**\n * Parses key bindings and pack them into parts\n *\n * grammar = `<sequence>`\n * <sequence> = `<press> <press> <press> ...`\n * <press> = `<key>` or `<mods>+<key>`\n * <mods> = `<mod>+<mod>+...`\n */\nexport function parseKeybinding(value) {\n return value\n .trim()\n .split(' ')\n .map((press) => {\n const modifiers = press.split(/\\b\\+/);\n const key = guaranteeNonNullable(modifiers.pop(), `Can't parse key binding: last part must be a non-modifier key`);\n return { modifiers, key };\n });\n}\n/**\n * Checks if a series of keypress events matches a key binding sequence either partially or exactly.\n */\nexport const isMatchingKeyPressData = (event, keyPressData) => \n// NOTE: we allow specifying with `event.code` only\n// - key: value of the key pressed by the user, taking into consideration the state of modifier keys\n// such as `Shift` as well as the keyboard locale and layout. This is not desirable, because\n// for matching, we have to do uppercase comparison, in Mac, if we presss Alt+B for example, we will\n// get symbols\n// - code: represents a physical key on the keyboard (as opposed to the character generated by pressing the key);\n// i.e. this property returns a value that isn't altered by keyboard layout or the state of the modifier keys\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key\n// See https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code\nkeyPressData.key === event.code &&\n // ensure all the modifiers in the keybinding are pressed\n keyPressData.modifiers.every((modifier) => event.getModifierState(modifier)) &&\n // modifier keys (Shift, Control, etc.) change the meaning of a keybinding,\n // so if they are pressed but aren't part of the current keypress sequence, it's not a match.\n ![\n KEYBOARD_NAMED_KEY.SHIFT,\n KEYBOARD_NAMED_KEY.META,\n KEYBOARD_NAMED_KEY.ALT,\n KEYBOARD_NAMED_KEY.CONTROL,\n ].find((modifier) => \n // check if the current key pressed is one of the modifier keys\n keyPressData.key !== modifier &&\n event.getModifierState(modifier) &&\n // check if the modifier key pressed is part of the key combination\n !keyPressData.modifiers.includes(modifier));\nexport const isMatchingKeyCombination = (event, keyCombination) => isMatchingKeyPressData(event, guaranteeNonNullable(parseKeybinding(keyCombination)[0]));\n/**\n * Create event listener for keyboard event (recommended to be used with `keydown/keyup` event)\n *\n * This succinct logic is adapted from `tinykeys`\n * See https://github.com/jamiebuilds/tinykeys\n */\nexport function createKeybindingsHandler(config) {\n // this holds the possible hotkey matches for the current sequence of keyboard events\n const possibleMatches = new Map();\n // NOTE: this timer is used to time the duration between key presses to determine when to\n // cancel the sequence, we set the default timeout to be 1000, as short timeout\n // can be slightly too fast for users\n let timer = null;\n const DEFAULT_TIMEOUT_DURATION = 1000;\n return (event) => {\n // Ensure and stop any event that isn't an keyboard event.\n // e.g. auto-complete option navigation and selection could fire an event\n if (!(event instanceof KeyboardEvent)) {\n return;\n }\n // NOTE: create a flat collection of key combination to handler, make sure\n // for each combination, only the first matching entry is considered,\n // i.e. explicitly here, we don't handle multiple handling\n // See https://github.com/finos/legend-studio/issues/1969\n uniqBy(Object.values(config)\n .flatMap((entry) => entry.combinations.map((combination) => ({\n combination,\n handler: entry.handler,\n })))\n .filter((entry) => entry.combination.length), (val) => val.combination)\n // here, we go through each hotkey combination, and:\n // 1. parse the key combination\n // 2. if the key combination is already part of the possible matches,\n // retrieve the current match result: this result is the list of the\n // keypresses left to complete the combination, else, we just add the\n // new combination and proceed the same way\n .forEach((entry) => {\n const keyCombination = entry.combination;\n const parsedKeyCombination = parseKeybinding(entry.combination);\n // abort when we encounter an empty key combination\n if (!parsedKeyCombination.length) {\n return;\n }\n const remainingExpectedKeyPresses = possibleMatches.get(keyCombination) ?? parsedKeyCombination;\n // this should never be empty, as it becomes empty, it must mean:\n // 1. either the key combination has been matched before and not cleared\n // 2. the key combination is empty, which should not be possible due to the guard above\n const currentExpectedKeyPress = guaranteeNonNullable(remainingExpectedKeyPresses[0]);\n const matches = isMatchingKeyPressData(event, currentExpectedKeyPress);\n if (!matches) {\n // if the current key pressed is a modifier key\n // we don't consider this as a non-match yet\n // NOTE: here we use `event.key` instead of `event.code` since for `Shift` key,\n // the key is always `Shift` where the key code can be `ShiftLeft`\n if (!event.getModifierState(event.key)) {\n possibleMatches.delete(keyCombination);\n }\n }\n else if (remainingExpectedKeyPresses.length > 1) {\n // matches found, not all keypresses of the key combination have been fulfilled, remove\n // the matched keypress part of the combination (if it's in the list of possible matches)\n possibleMatches.set(keyCombination, remainingExpectedKeyPresses.slice(1));\n }\n else {\n // matches found, all keypresses of the combination have been fulfilled, call the handler\n possibleMatches.delete(keyCombination);\n entry.handler(keyCombination, event);\n }\n });\n if (timer) {\n clearTimeout(timer);\n }\n timer = setTimeout(possibleMatches.clear.bind(possibleMatches), DEFAULT_TIMEOUT_DURATION);\n };\n}\n//# sourceMappingURL=KeyBinding.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createTheme, StyledEngineProvider, ThemeProvider, } from '@mui/material';\nconst LegendCustomMUITheme = createTheme({\n transitions: {\n // disable all transition\n // NOTE: this is a catch-all way to remove all transitions\n // We technically don't need this because we can configure transition props for each component\n create: () => 'none',\n },\n});\nexport const LegendStyleProvider = (props) => {\n const { children } = props;\n return (\n // Make sure CSS for MUI generated by `emotion` are injected before our styling code\n // this ensures our styling code can override MUI styles\n // See https://mui.com/guides/interoperability/#css-injection-order-3\n _jsx(StyledEngineProvider, { injectFirst: true, children: _jsx(ThemeProvider, { theme: LegendCustomMUITheme, children: children }) }));\n};\n//# sourceMappingURL=LegendStyleProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx } from 'clsx';\nexport const generateSimpleDIVComponent = (componentName, divClassName) => {\n const component = (props) => {\n const { children, className } = props;\n return (_jsx(\"div\", { className: clsx(divClassName, className), \"data-testid\": props['data-testid'], children: children }));\n };\n component.displayName = componentName;\n return component;\n};\n//# sourceMappingURL=ComponentCreatorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { prettyCONSTName, toTitleCase } from '@finos/legend-shared';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const Modal = (props) => {\n const { children, darkMode, className } = props;\n return (_jsx(\"div\", { className: clsx('modal', { 'modal--dark': darkMode }, className), children: children }));\n};\nexport const ModalTitle = (props) => {\n const { title, icon, className } = props;\n return (_jsxs(\"div\", { className: clsx('modal__title', className), children: [icon && _jsx(\"div\", { className: \"modal__title__icon\", children: icon }), _jsx(\"div\", { className: \"modal__title__label\", children: toTitleCase(title) })] }));\n};\nexport const ModalHeader = (props) => {\n const { title, children, className } = props;\n if (!children && title) {\n return (_jsx(\"div\", { className: clsx('modal__header', className), children: _jsx(ModalTitle, { title: title }) }));\n }\n return _jsx(\"div\", { className: clsx('modal__header', className), children: children });\n};\nexport const ModalHeaderActions = generateSimpleDIVComponent('ModalHeaderActions', 'modal__header__actions');\nexport const ModalBody = generateSimpleDIVComponent('ModalBody', 'modal__body');\nexport const ModalFooter = generateSimpleDIVComponent('ModalFooter', 'modal__footer');\nexport const ModalFooterStatus = generateSimpleDIVComponent('ModalFooterStatus', 'modal__footer__status');\nexport const ModalFooterButton = (props) => {\n const { onClick, inProgressText, text, title, children, disabled, className, darkMode, formatText, type, preventFormSubmit, } = props;\n const isDarkMode = darkMode ?? true;\n const isFormatText = formatText ?? true;\n const isSecondary = type === 'secondary';\n const isPreventFormSubmit = preventFormSubmit ?? false;\n return (_jsxs(\"button\", { className: clsx('btn', 'modal__footer__btn', {\n 'btn--dark': isDarkMode,\n 'btn--light': !isDarkMode,\n 'modal__footer__btn--primary': !isSecondary,\n 'modal__footer__btn--secondary': isSecondary,\n }, className), title: title, onClick: onClick, disabled: Boolean(inProgressText) || disabled, type: isPreventFormSubmit ? 'button' : undefined, children: [inProgressText\n ? prettyCONSTName(inProgressText)\n : isFormatText\n ? prettyCONSTName(text)\n : text, children] }));\n};\n//# sourceMappingURL=Modal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nexport var ActionAlertType;\n(function (ActionAlertType) {\n ActionAlertType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertType[\"CAUTION\"] = \"CAUTION\";\n})(ActionAlertType || (ActionAlertType = {}));\nexport var ActionAlertActionType;\n(function (ActionAlertActionType) {\n ActionAlertActionType[\"STANDARD\"] = \"STANDARD\";\n ActionAlertActionType[\"PROCEED_WITH_CAUTION\"] = \"PROCEED_WITH_CAUTION\";\n ActionAlertActionType[\"PROCEED\"] = \"PROCEED\";\n})(ActionAlertActionType || (ActionAlertActionType = {}));\nexport class AlertService {\n applicationStore;\n blockingAlertInfo;\n actionAlertInfo;\n constructor(applicationStore) {\n makeObservable(this, {\n blockingAlertInfo: observable,\n actionAlertInfo: observable,\n setBlockingAlert: action,\n setActionAlertInfo: action,\n });\n this.applicationStore = applicationStore;\n }\n setBlockingAlert(alertInfo) {\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.blockingAlertInfo = alertInfo;\n }\n setActionAlertInfo(alertInfo) {\n if (this.actionAlertInfo && alertInfo) {\n this.applicationStore.notificationService.notifyIllegalState('Action alert is stacked: new alert is invoked while another one is being displayed');\n }\n if (alertInfo) {\n this.applicationStore.keyboardShortcutsService.blockGlobalHotkeys();\n }\n else {\n this.applicationStore.keyboardShortcutsService.unblockGlobalHotkeys();\n }\n this.actionAlertInfo = alertInfo;\n }\n}\n//# sourceMappingURL=AlertService.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nconst ApplicationStoreContext = createContext(undefined);\nexport const useApplicationStore = () => guaranteeNonNullable(useContext(ApplicationStoreContext), `Can't find application store in context`);\nexport const ApplicationStoreProvider = ({ children, store, }) => {\n const applicationStore = useLocalObservable(() => store);\n return (_jsx(ApplicationStoreContext.Provider, { value: applicationStore, children: children }));\n};\n//# sourceMappingURL=ApplicationStoreProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Dialog, ModalBody, ModalFooter, ModalHeader } from '@finos/legend-art';\nimport { ActionAlertActionType, ActionAlertType, } from '../stores/AlertService.js';\nimport { observer } from 'mobx-react-lite';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst getActionButtonClassName = (type) => {\n switch (type) {\n case ActionAlertActionType.PROCEED_WITH_CAUTION:\n return 'btn--caution';\n case ActionAlertActionType.PROCEED:\n case ActionAlertActionType.STANDARD:\n default:\n return 'btn--dark';\n }\n};\nconst ActionAlertContent = observer((props) => {\n const { info } = props;\n const applicationStore = useApplicationStore();\n const { title, message, prompt, type, onClose, onEnter, actions } = info;\n const handleClose = () => {\n onClose?.();\n applicationStore.alertService.setActionAlertInfo(undefined);\n };\n const handleEnter = () => onEnter?.();\n const handleSubmit = () => {\n actions.find((action) => action.default)?.handler?.();\n handleClose();\n };\n return (_jsx(Dialog, { open: Boolean(applicationStore.alertService.actionAlertInfo), onClose: noop, TransitionProps: {\n onEnter: handleEnter,\n }, children: _jsxs(\"form\", { onSubmit: (event) => {\n event.preventDefault();\n handleSubmit();\n }, className: `modal search-modal modal--dark blocking-alert blocking-alert--${(type ?? ActionAlertType.STANDARD).toLowerCase()}`, children: [title && _jsx(ModalHeader, { title: title }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__summary-text\", children: message }), _jsx(\"div\", { className: \"blocking-alert__prompt-text\", children: prompt })] }), _jsxs(ModalFooter, { children: [actions.map((action, idx) => {\n // NOTE: need to prevent default for the submit button, otherwise, we would get the warning \"Form submission canceled because the form is not connected\"\n // See https://stackoverflow.com/a/58234405\n const handler = (e) => {\n e.preventDefault();\n action.handler?.();\n handleClose();\n };\n return (_jsx(\"button\", { type: action.default ? 'submit' : 'button', className: `btn btn--dark ${getActionButtonClassName(action.type ?? ActionAlertActionType.STANDARD)}`, onClick: handler, autoFocus: Boolean(action.default), children: action.label }, idx));\n }), !actions.length && (_jsx(\"button\", { type: \"button\" // prevent this toggler being activated on form submission\n , className: \"btn btn--dark blocking-alert__action--standard\", onClick: handleClose, children: \"Cancel\" }))] })] }) }));\n});\nexport const ActionAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const actionAlertInfo = applicationStore.alertService.actionAlertInfo;\n if (!actionAlertInfo) {\n return null;\n }\n return _jsx(ActionAlertContent, { info: actionAlertInfo });\n});\n//# sourceMappingURL=ActionAlert.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useRef } from 'react';\nimport { clsx } from '../utils/ComponentUtils.js';\nexport const PanelLoadingIndicator = (props) => {\n const { isLoading, className } = props;\n const ref = useRef(null);\n useEffect(() => {\n if (ref.current) {\n if (isLoading) {\n ref.current.parentElement?.classList.add('panel-loading-indicator__container');\n }\n else {\n ref.current.parentElement?.classList.remove('panel-loading-indicator__container');\n }\n }\n }, [isLoading]);\n return (_jsx(\"div\", { ref: ref, className: clsx(className, `panel-loading-indicator${isLoading ? '' : '--disabled'}`) }));\n};\n//# sourceMappingURL=PanelLoadingIndicator.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { PanelLoadingIndicator, Dialog, Modal, ModalBody, } from '@finos/legend-art';\nimport { noop } from '@finos/legend-shared';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\n/**\n * The users of this need to justify their use case because blocking app disrupts the UX flow.\n * Of course there are legitimate use cases but please consult the team when you do so.\n * See https://material.io/components/dialogs#usage\n */\nexport const BlockingAlert = observer(() => {\n const applicationStore = useApplicationStore();\n const info = applicationStore.alertService.blockingAlertInfo;\n if (!info) {\n return null;\n }\n return (_jsx(Dialog, { open: Boolean(info), onClose: noop, classes: {\n root: 'blocking-alert__root-container',\n container: 'blocking-alert__container',\n }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: \"blocking-alert\", children: [_jsx(PanelLoadingIndicator, { isLoading: Boolean(info.showLoading) }), _jsxs(ModalBody, { children: [_jsx(\"div\", { className: \"blocking-alert__message\", children: info.message }), info.prompt && (_jsx(\"div\", { className: \"blocking-alert__message__prompt\", children: info.prompt }))] })] }) }));\n});\n//# sourceMappingURL=BlockingAlert.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint @typescript-eslint/no-unsafe-assignment: 0 */\n//======================================================= TB =======================================================\nimport { TbArrowsJoin2, TbArrowsSplit2, TbMathFunction, TbBook, TbCircleOff, TbCalendarTime, TbClockEdit, TbSql, TbBrandSnowflake, } from 'react-icons/tb';\nexport const ArrowsJoinIcon = TbArrowsJoin2;\nexport const ArrowsSplitIcon = TbArrowsSplit2;\nexport const FunctionIcon = TbMathFunction;\nexport const RepoIcon = TbBook;\nexport const OffIcon = TbCircleOff;\nexport const CalendarClockIcon = TbCalendarTime;\nexport const LastModifiedIcon = TbClockEdit;\nexport const SQLIcon = TbSql;\nexport const Snowflake_BrandIcon = TbBrandSnowflake;\n//======================================================= MD =======================================================\nimport { MdManageSearch, MdModeEdit, MdTextFields, MdMoreVert, MdMoreHoriz, MdWrapText, MdSaveAs, MdSave, MdVerticalAlignBottom, MdRefresh, MdFunctions, MdCompareArrows, MdPlaylistAddCheck, MdAdd, // to be reviewed\nMdEdit, // to be reviewed\nMdSubject, MdViewHeadline, MdAssistant, MdSettingsEthernet, MdLink, MdWindow, MdReviews, MdCalculate, MdRocketLaunch, MdOutlineDataset, MdVerified, MdQueryStats, MdFilterCenterFocus, MdOutlineDescription, MdQuestionAnswer, MdUnfoldLess, MdUnfoldMore, } from 'react-icons/md';\nexport const ManageSearchIcon = MdManageSearch; // to be reviewed\nexport const PencilIcon = MdModeEdit;\nexport const StringTypeIcon = MdTextFields;\nexport const MoreVerticalIcon = MdMoreVert;\nexport const MoreHorizontalIcon = MdMoreHoriz;\nexport const WrapTextIcon = MdWrapText;\nexport const SaveAsIcon = MdSaveAs;\nexport const SaveCurrIcon = MdSave;\nexport const VerticalAlignBottomIcon = MdVerticalAlignBottom;\nexport const RefreshIcon = MdRefresh;\nexport const SigmaIcon = MdFunctions;\nexport const CompareIcon = MdCompareArrows;\nexport const CheckListIcon = MdPlaylistAddCheck;\nexport const AddIcon = MdAdd; // to be reviewed\nexport const EditIcon = MdEdit; // to be reviewed\nexport const SubjectIcon = MdSubject;\nexport const ViewHeadlineIcon = MdViewHeadline;\nexport const AssistantIcon = MdAssistant;\nexport const SettingsEthernetIcon = MdSettingsEthernet;\nexport const LinkIcon = MdLink;\nexport const WindowIcon = MdWindow;\nexport const ReviewIcon = MdReviews;\nexport const CalculateIcon = MdCalculate;\nexport const LaunchIcon = MdRocketLaunch;\nexport const DatasetIcon = MdOutlineDataset;\nexport const VerifiedIcon = MdVerified;\nexport const QueryIcon = MdQueryStats;\nexport const CenterFocusIcon = MdFilterCenterFocus;\nexport const DescriptionIcon = MdOutlineDescription;\nexport const QuestionAnswerIcon = MdQuestionAnswer;\nexport const FoldIcon = MdUnfoldLess;\nexport const UnfoldIcon = MdUnfoldMore;\n//======================================================= VSC =======================================================\nimport { VscDebug, VscError, VscWarning, VscWordWrap, VscGoToFile, VscClose, VscRunAll, VscRunErrors, VscOpenPreview, VscDiff, VscRegex, VscVersions, VscCaseSensitive, VscWholeWord, VscReferences, VscWand, VscCollapseAll, VscExpandAll, VscJson, VscTable, } from 'react-icons/vsc';\nexport const DebugIcon = VscDebug;\nexport const ErrorIcon = VscError;\nexport const WarningIcon = VscWarning;\nexport const WordWrapIcon = VscWordWrap;\nexport const GoToFileIcon = VscGoToFile;\nexport const CloseIcon = VscClose;\nexport const RunAllIcon = VscRunAll;\nexport const RunErrorsIcon = VscRunErrors;\nexport const OpenPreviewIcon = VscOpenPreview;\nexport const DiffIcon = VscDiff;\nexport const RegexIcon = VscRegex;\nexport const VersionsIcon = VscVersions;\nexport const CaseSensitiveIcon = VscCaseSensitive;\nexport const WholeWordMatchIcon = VscWholeWord;\nexport const ReferencesIcon = VscReferences;\nexport const WandIcon = VscWand;\nexport const CollapseTreeIcon = VscCollapseAll;\nexport const ExpandTreeIcon = VscExpandAll;\nexport const SerializeIcon = VscJson;\nexport const TableIcon = VscTable;\n//======================================================= BS =======================================================\nimport { BsFillTriangleFill, BsFillFileEarmarkSpreadsheetFill, BsBoxSeam, BsGripVertical, BsAlignTop, BsAlignMiddle, BsAlignBottom, BsAlignStart, BsAlignCenter, BsAlignEnd, BsDistributeHorizontal, BsDistributeVertical, BsDatabaseFillLock, BsDatabaseFillCheck, BsChevronUp, BsChevronDown, BsChevronRight, BsChevronLeft, BsQuestionSquare, BsQuestionSquareFill, BsTextLeft, } from 'react-icons/bs';\nexport const FilledTriangleIcon = BsFillTriangleFill;\nexport const TabulatedDataFileIcon = BsFillFileEarmarkSpreadsheetFill;\nexport const BundleIcon = BsBoxSeam;\nexport const ThinVerticalDragHandleIcon = BsGripVertical;\nexport const AlignTopIcon = BsAlignTop;\nexport const AlignMiddleIcon = BsAlignMiddle;\nexport const AlignBottomIcon = BsAlignBottom;\nexport const AlignStartIcon = BsAlignStart;\nexport const AlignCenterIcon = BsAlignCenter;\nexport const AlignEndIcon = BsAlignEnd;\nexport const DistributeHorizontalIcon = BsDistributeHorizontal;\nexport const DistributeVerticalIcon = BsDistributeVertical;\nexport const DataAccessIcon = BsDatabaseFillLock;\nexport const DataReadyIcon = BsDatabaseFillCheck;\nexport const ThinChevronUpIcon = BsChevronUp;\nexport const ThinChevronDownIcon = BsChevronDown;\nexport const ThinChevronRightIcon = BsChevronRight;\nexport const ThinChevronLeftIcon = BsChevronLeft;\nexport const QuestionSquareIcon = BsQuestionSquare;\nexport const QuestionSquareFillIcon = BsQuestionSquareFill;\nexport const GenericTextFileIcon = BsTextLeft;\n//======================================================= HI =======================================================\nimport { HiCode, HiHome, HiOutlineDocumentReport } from 'react-icons/hi';\nexport const ReportIcon = HiOutlineDocumentReport;\nexport const CodeIcon = HiCode;\nexport const HomeIcon = HiHome;\n//======================================================= io5 =======================================================\nimport { IoOpenOutline, IoResize, IoFileTrayFullOutline, IoMenuOutline, IoBeaker, IoFlaskSharp, IoSyncCircleSharp, IoStatsChart, IoHelpBuoy, IoCloudDownloadOutline, IoCloudUploadOutline, IoHelp, IoSunnyOutline, IoMoon, } from 'react-icons/io5';\nexport const OpenIcon = IoOpenOutline;\nexport const ResizeIcon = IoResize;\nexport const FileTrayIcon = IoFileTrayFullOutline;\nexport const MenuIcon = IoMenuOutline;\nexport const BeakerIcon = IoBeaker;\nexport const FlaskIcon = IoFlaskSharp;\nexport const AvailabilityIcon = IoSyncCircleSharp;\nexport const StatisticsIcon = IoStatsChart;\nexport const SupportIcon = IoHelpBuoy;\nexport const CloudDownloadIcon = IoCloudDownloadOutline;\nexport const CloudUploadIcon = IoCloudUploadOutline;\nexport const QuestionThinIcon = IoHelp;\nexport const SunIcon = IoSunnyOutline;\nexport const MoonIcon = IoMoon;\n//======================================================= FA =======================================================\nimport { FaHistory, FaCrosshairs, FaLayerGroup, FaGhost, FaLock, FaMask, FaFile, FaLongArrowAltRight, FaTimes, FaTimesCircle, FaPlus, FaCog, FaEye, FaEyeSlash, FaCaretUp, FaCaretDown, FaFire, FaSave, FaSquare, FaRegSquare, FaCheckSquare, FaMinusSquare, FaHashtag, FaHammer, FaCommentDots, FaClock, FaRegClock, FaToggleOn, FaQuestion, FaQuestionCircle, FaInfoCircle, FaCompress, FaMap, FaPlay, FaGripVertical, FaRobot, FaArrowLeft, FaArrowRight, FaArrowAltCircleDown, FaArrowAltCircleRight, FaArrowCircleRight, FaUser, FaShapes, FaEnvelope, FaSkull, FaDollarSign, FaSearch, FaStar, FaKey, FaExternalLinkAlt, FaExternalLinkSquareAlt, FaLightbulb, FaRegLightbulb, FaList, FaCircle, FaMinusCircle, FaTrash, FaRegCircle, FaShieldAlt, FaTag, FaTags, FaBolt, FaCheckCircle, FaExclamationTriangle, FaBug, FaCircleNotch, FaRegKeyboard, FaUserSecret, FaBuffer, FaSitemap, FaExpand, FaExpandArrowsAlt, FaSortAlphaDown, FaSort, FaSortAlphaDownAlt, FaFolderPlus, FaCaretRight, FaCaretLeft, FaWrench, FaArrowDown, FaArrowUp, FaTerminal, FaTruckLoading, FaFileCsv, FaFolderOpen, FaFolder, FaFileCode, FaCodeBranch, FaArrowAltCircleUp, FaArrowAltCircleLeft, FaRegStopCircle, FaAsterisk, FaFilter, FaExclamationCircle, FaRocket, FaCheck, FaBan, FaFileImport, FaUserFriends, FaDownload, FaUpload, FaRegWindowRestore, FaPauseCircle, FaShare, FaRegCopy, FaFileAlt, FaEdit, FaArrowsAltH, FaRegWindowMaximize, FaWindowMaximize, FaLongArrowAltDown, FaLongArrowAltUp, FaMeteor, FaPiedPiperSquare, FaPuzzlePiece, FaToggleOff, FaMapMarkerAlt, FaHatWizard, FaRegLaughWink, FaRegChartBar, FaRegSadTear, FaBusinessTime, FaDatabase, FaServer, FaArchive, FaBrain, FaBookOpen, FaLevelDownAlt, FaRegCalendarAlt, FaCalculator, FaReadme, FaRedo, FaUndo, } from 'react-icons/fa';\nexport const HistoryIcon = FaHistory;\nexport const CrosshairsIcon = FaCrosshairs;\nexport const LayerGroupIcon = FaLayerGroup;\nexport const GhostIcon = FaGhost;\nexport const LockIcon = FaLock;\nexport const MaskIcon = FaMask;\nexport const FileIcon = FaFile;\nexport const LongArrowRightIcon = FaLongArrowAltRight;\nexport const TimesIcon = FaTimes;\nexport const TimesCircleIcon = FaTimesCircle;\nexport const PlusIcon = FaPlus;\nexport const CogIcon = FaCog;\nexport const EyeIcon = FaEye;\nexport const CloseEyeIcon = FaEyeSlash;\nexport const CaretUpIcon = FaCaretUp;\nexport const CaretDownIcon = FaCaretDown;\nexport const FireIcon = FaFire;\nexport const SaveIcon = FaSave;\nexport const SquareIcon = FaSquare;\nexport const EmptySquareIcon = FaRegSquare;\nexport const CheckSquareIcon = FaCheckSquare;\nexport const MinusSquareIcon = FaMinusSquare;\nexport const HashtagIcon = FaHashtag;\nexport const HammerIcon = FaHammer;\nexport const ChatIcon = FaCommentDots;\nexport const ClockIcon = FaClock;\nexport const EmptyClockIcon = FaRegClock;\nexport const ToggleIcon = FaToggleOn;\nexport const QuestionIcon = FaQuestion;\nexport const QuestionCircleIcon = FaQuestionCircle;\nexport const InfoCircleIcon = FaInfoCircle;\nexport const CompressIcon = FaCompress;\nexport const MapIcon = FaMap;\nexport const PlayIcon = FaPlay;\nexport const VerticalDragHandleIcon = FaGripVertical;\nexport const RobotIcon = FaRobot;\nexport const ArrowLeftIcon = FaArrowLeft;\nexport const ArrowRightIcon = FaArrowRight;\nexport const ArrowCircleDownIcon = FaArrowAltCircleDown;\nexport const ArrowCircleRightIcon = FaArrowAltCircleRight;\nexport const StickArrowCircleRightIcon = FaArrowCircleRight;\nexport const UserIcon = FaUser;\nexport const ShapesIcon = FaShapes;\nexport const EnvelopIcon = FaEnvelope;\nexport const SkullIcon = FaSkull;\nexport const DollarIcon = FaDollarSign;\nexport const SearchIcon = FaSearch;\nexport const StarIcon = FaStar;\nexport const KeyIcon = FaKey;\nexport const ExternalLinkIcon = FaExternalLinkAlt;\nexport const ExternalLinkSquareIcon = FaExternalLinkSquareAlt;\nexport const LightBulbIcon = FaLightbulb;\nexport const EmptyLightBulbIcon = FaRegLightbulb;\nexport const ListIcon = FaList;\nexport const CircleIcon = FaCircle;\nexport const MinusCircleIcon = FaMinusCircle;\nexport const TrashIcon = FaTrash;\nexport const EmptyCircleIcon = FaRegCircle;\nexport const ShieldIcon = FaShieldAlt;\nexport const TagIcon = FaTag;\nexport const TagsIcon = FaTags;\nexport const BoltIcon = FaBolt;\nexport const CheckCircleIcon = FaCheckCircle;\nexport const ExclamationTriangleIcon = FaExclamationTriangle;\nexport const BugIcon = FaBug;\nexport const CircleNotchIcon = FaCircleNotch;\nexport const KeyboardIcon = FaRegKeyboard;\nexport const HackerIcon = FaUserSecret;\nexport const BufferIcon = FaBuffer; // to be reviewed, moved to LegendIcon\nexport const SitemapIcon = FaSitemap; // to be reviewed, moved to LegendIcon\nexport const ExpandIcon = FaExpand;\nexport const ExpandAllIcon = FaExpandArrowsAlt;\nexport const SortDownIcon = FaSortAlphaDown;\nexport const SortIcon = FaSort;\nexport const SortDownAltIcon = FaSortAlphaDownAlt;\nexport const NewFolderIcon = FaFolderPlus;\nexport const CaretRightIcon = FaCaretRight;\nexport const CaretLeftIcon = FaCaretLeft;\nexport const WrenchIcon = FaWrench;\nexport const ArrowDownIcon = FaArrowDown;\nexport const ArrowUpIcon = FaArrowUp;\nexport const TerminalIcon = FaTerminal;\nexport const TruckLoadingIcon = FaTruckLoading;\nexport const FolderOpenIcon = FaFolderOpen;\nexport const FolderIcon = FaFolder;\nexport const FileCodeIcon = FaFileCode;\nexport const CodeBranchIcon = FaCodeBranch;\nexport const ArrowCircleUpIcon = FaArrowAltCircleUp;\nexport const ArrowCircleLeftIcon = FaArrowAltCircleLeft;\nexport const EmptyStopCircleIcon = FaRegStopCircle;\nexport const AsteriskIcon = FaAsterisk;\nexport const FilterIcon = FaFilter;\nexport const ExclamationCircleIcon = FaExclamationCircle;\nexport const RocketIcon = FaRocket;\nexport const CheckIcon = FaCheck;\nexport const BanIcon = FaBan;\nexport const FileImportIcon = FaFileImport;\nexport const UsersIcon = FaUserFriends;\nexport const DownloadIcon = FaDownload;\nexport const UploadIcon = FaUpload;\nexport const EmptyWindowRestoreIcon = FaRegWindowRestore;\nexport const PauseCircleIcon = FaPauseCircle;\nexport const ShareIcon = FaShare;\nexport const CopyIcon = FaRegCopy;\nexport const FileAltIcon = FaFileAlt; // to be reviewed/combined\nexport const PencilEditIcon = FaEdit; // to be reviewed/combined\nexport const ArrowsAltHIcon = FaArrowsAltH; // to be reviewed/combined\nexport const WindowMaximizeIcon = FaRegWindowMaximize; // to be reviewed/combined\nexport const FilledWindowMaximizeIcon = FaWindowMaximize; // to be reviewed/combined\nexport const LongArrowAltDownIcon = FaLongArrowAltDown; // to be reviewed/combined\nexport const LongArrowAltUpIcon = FaLongArrowAltUp; // to be reviewed/combined\nexport const MeteorIcon = FaMeteor; // to be reviewed/combined\nexport const PiedPiperSquareIcon = FaPiedPiperSquare; // to be reviewed/combined\nexport const PuzzlePieceIcon = FaPuzzlePiece; // to be reviewed/combined\nexport const ToggleOffIcon = FaToggleOff;\nexport const MapMarkerIcon = FaMapMarkerAlt;\nexport const WizardHatIcon = FaHatWizard;\nexport const FaceLaughWinkIcon = FaRegLaughWink;\nexport const ChartIcon = FaRegChartBar;\nexport const CsvIcon = FaFileCsv;\nexport const FaceSadTearIcon = FaRegSadTear;\nexport const BusinessTimeIcon = FaBusinessTime; // to be reviewed/combined\nexport const DatabaseIcon = FaDatabase;\nexport const ServerIcon = FaServer;\nexport const ArchiveIcon = FaArchive;\nexport const BrainIcon = FaBrain;\nexport const DocumentationIcon = FaBookOpen;\nexport const LevelDownIcon = FaLevelDownAlt; // to be reviewed/combined\nexport const CalendarIcon = FaRegCalendarAlt;\nexport const CalculatorIcon = FaCalculator;\nexport const ReadMeIcon = FaReadme;\nexport const UndoIcon = FaUndo;\nexport const RedoIcon = FaRedo;\n//======================================================= GI =======================================================\nimport { GiWaterDrop, GiBeard, GiSunglasses, GiHouseKeys, } from 'react-icons/gi';\nexport const WaterDropIcon = GiWaterDrop;\nexport const BeardIcon = GiBeard;\nexport const SunglassesIcon = GiSunglasses;\nexport const HouseKeys = GiHouseKeys;\n//======================================================= GO =======================================================\nimport { GoChevronDown, GoChevronUp, GoChevronLeft, GoChevronRight, GoFileBinary, GoGitPullRequest, GoGitMerge, GoSync, GoGitBranch, GoX, GoPlug, } from 'react-icons/go';\nexport const ChevronDownIcon = GoChevronDown;\nexport const ChevronUpIcon = GoChevronUp;\nexport const ChevronLeftIcon = GoChevronLeft;\nexport const ChevronRightIcon = GoChevronRight;\nexport const BinaryTypeIcon = GoFileBinary;\nexport const GitPullRequestIcon = GoGitPullRequest;\nexport const GitMergeIcon = GoGitMerge;\nexport const SyncIcon = GoSync;\nexport const GitBranchIcon = GoGitBranch;\nexport const XIcon = GoX;\nexport const PluginIcon = GoPlug;\n//======================================================= SI =======================================================\nimport { SiSwagger } from 'react-icons/si';\nexport const SwaggerIcon = SiSwagger; // to be reviewed\n//======================================================= BI =======================================================\nimport { BiShapeTriangle, BiAtom, BiCabinet } from 'react-icons/bi';\nexport const ShapeTriangleIcon = BiShapeTriangle;\nexport const AtomIcon = BiAtom;\nexport const CabinetIcon = BiCabinet;\n//======================================================= CG =======================================================\nimport { CgOptions } from 'react-icons/cg';\nexport const OptionsIcon = CgOptions;\n//======================================================= FI =======================================================\nimport { FiPackage, FiMinus, FiMousePointer, FiMove, FiPlusCircle, FiSidebar, FiTriangle, FiZoomIn, FiZoomOut, FiGitMerge, FiLink, } from 'react-icons/fi';\nexport const PackageIcon = FiPackage;\nexport const MinusIcon = FiMinus;\nexport const MousePointerIcon = FiMousePointer;\nexport const MoveIcon = FiMove;\nexport const PlusCircleIcon = FiPlusCircle;\nexport const SidebarIcon = FiSidebar;\nexport const TriangleIcon = FiTriangle;\nexport const ZoomInIcon = FiZoomIn;\nexport const ZoomOutIcon = FiZoomOut;\nexport const TruncatedGitMergeIcon = FiGitMerge; // to be reviewed/combined\nexport const AnchorLinkIcon = FiLink;\n//======================================================= RI =======================================================\nimport { RiShapeLine, RiShareBoxFill, RiTestTubeFill, RiRobotFill, RiGovernmentFill, RiMoneyDollarCircleFill, } from 'react-icons/ri';\nexport const ShareBoxIcon = RiShareBoxFill;\nexport const ShapeLineIcon = RiShapeLine;\nexport const TestTubeIcon = RiTestTubeFill;\nexport const DroidIcon = RiRobotFill;\nexport const GovernanceIcon = RiGovernmentFill;\nexport const CostCircleIcon = RiMoneyDollarCircleFill;\n//======================================================= Fc =======================================================\nimport { FcWorkflow } from 'react-icons/fc';\nexport const WorkflowIcon = FcWorkflow;\n//# sourceMappingURL=Icon.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError, assertErrorThrown, assertTrue, isString, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport const DEFAULT_NOTIFICATION_HIDE_TIME = 6000; // ms\nexport const DEFAULT_ERROR_NOTIFICATION_HIDE_TIME = 10000; // ms\nexport var NOTIFCATION_SEVERITY;\n(function (NOTIFCATION_SEVERITY) {\n NOTIFCATION_SEVERITY[\"ILEGAL_STATE\"] = \"ILEGAL_STATE\";\n NOTIFCATION_SEVERITY[\"ERROR\"] = \"ERROR\";\n NOTIFCATION_SEVERITY[\"WARNING\"] = \"WARNING\";\n NOTIFCATION_SEVERITY[\"SUCCESS\"] = \"SUCCESS\";\n NOTIFCATION_SEVERITY[\"INFO\"] = \"INFO\";\n})(NOTIFCATION_SEVERITY || (NOTIFCATION_SEVERITY = {}));\nexport class Notification {\n severity;\n message;\n actions;\n autoHideDuration;\n constructor(severity, message, actions, autoHideDuration) {\n this.severity = severity;\n this.message = message;\n this.actions = actions;\n this.autoHideDuration = autoHideDuration;\n }\n}\nexport class NotificationService {\n notification;\n constructor() {\n makeObservable(this, {\n notification: observable,\n setNotification: action,\n notify: action,\n notifySuccess: action,\n notifyWarning: action,\n notifyIllegalState: action,\n notifyError: action,\n });\n }\n setNotification(notification) {\n this.notification = notification;\n }\n notify(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.INFO, message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifySuccess(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.SUCCESS, message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyWarning(content, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.WARNING, content instanceof Error ? content.message : content, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyError(content, actions) {\n let message;\n if (content instanceof ApplicationError) {\n message = content.detail;\n }\n else if (content instanceof Error) {\n message = content.message;\n }\n else {\n assertTrue(isString(content), `Can't display error`);\n message = content;\n }\n if (message) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ERROR, message, actions ?? [], undefined));\n }\n }\n notifyIllegalState(message, actions, autoHideDuration) {\n this.setNotification(new Notification(NOTIFCATION_SEVERITY.ILEGAL_STATE, isString(message) ? `[PLEASE NOTIFY DEVELOPER] ${message}` : message, actions ?? [], autoHideDuration === null\n ? undefined\n : autoHideDuration ?? DEFAULT_NOTIFICATION_HIDE_TIME));\n }\n notifyUnsupportedFeature(featureName) {\n this.notifyWarning(`Unsupported feature: ${featureName}`);\n }\n /**\n * This function creates a more user-friendly way to throw error in the UI. Rather than crashing the whole app, we will\n * just notify and replacing the value should get with an alternative (e.g. `undefined`). A good use-case for this\n * is where we would not expect an error to throw (i.e. `IllegalStateError`), but we want to be sure that if the error\n * ever occurs, it still shows very apparently in the UI, as such, printing out in the console is not good enough,\n * but crashing the app is bad too, so this is a good balance.\n */\n notifyAndReturnAlternativeOnError = (fn, alternative) => {\n try {\n return fn();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notifyIllegalState(error.message);\n return alternative;\n }\n };\n}\n//# sourceMappingURL=NotificationService.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { Notification, NotificationContent, ChevronDownIcon, ChevronUpIcon, TimesIcon, ExclamationTriangleIcon, TimesCircleIcon, CheckCircleIcon, InfoCircleIcon, BugIcon, clsx, } from '@finos/legend-art';\nimport { useState } from 'react';\nimport { DEFAULT_NOTIFICATION_HIDE_TIME, NOTIFCATION_SEVERITY, } from '../stores/NotificationService.js';\nexport const NotificationManager = observer(() => {\n const applicationStore = useApplicationStore();\n const notification = applicationStore.notificationService.notification;\n const isOpen = Boolean(notification);\n const message = notification?.message ?? '';\n const severity = notification?.severity ?? NOTIFCATION_SEVERITY.INFO;\n const [isExpanded, setIsExpanded] = useState(false);\n let notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--info\", children: _jsx(InfoCircleIcon, {}) }));\n switch (severity) {\n case NOTIFCATION_SEVERITY.ILEGAL_STATE:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(BugIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.ERROR:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--error\", children: _jsx(TimesCircleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.WARNING:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--warning\", children: _jsx(ExclamationTriangleIcon, {}) }));\n break;\n case NOTIFCATION_SEVERITY.SUCCESS:\n notificationIcon = (_jsx(\"div\", { className: \"notification__message__content__icon notification__message__content__icon--success\", children: _jsx(CheckCircleIcon, {}) }));\n break;\n default:\n break;\n }\n const handleClose = () => {\n applicationStore.notificationService.setNotification(undefined);\n setIsExpanded(false);\n };\n const handleCopy = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(message));\n const toggleExpansion = () => setIsExpanded(!isExpanded);\n const onSnackbarAutoHideOrClickAway = (event, reason) => {\n // NOTE: we only should not allow dismissing the notification on click-away. First of call, this might not be desirable\n // second, this clashes with modal that traps focus, e.g. when we have another modal open and want to show a notification\n // the notification focus is stolen by the modal leading to the notification immediately gets clicked-away and closed\n if (reason === 'timeout') {\n handleClose();\n }\n };\n return (_jsx(Notification, { classes: {\n root: 'notification',\n anchorOriginBottomRight: 'notification__position',\n }, anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, open: isOpen, \n // setting the auto-hide duration to null will stop it from hiding automatically\n autoHideDuration: notification\n ? notification.autoHideDuration ?? null\n : DEFAULT_NOTIFICATION_HIDE_TIME, onClose: onSnackbarAutoHideOrClickAway, children: _jsx(NotificationContent, { classes: {\n root: 'notification__content',\n message: 'notification__message',\n action: 'notification__actions',\n }, message: _jsxs(\"div\", { className: \"notification__message__content\", children: [notificationIcon, _jsx(\"div\", { className: clsx('notification__message__content__text', {\n 'notification__message__content__text--expanded': isExpanded,\n }), onClick: handleCopy, title: \"Click to Copy\", children: message })] }), action: [\n _jsx(\"button\", { className: \"notification__action\", onClick: toggleExpansion, tabIndex: -1, title: isExpanded ? 'Collapse' : 'Expand', children: isExpanded ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronUpIcon, {}) }, \"expand\"),\n _jsx(\"button\", { className: \"notification__action\", onClick: handleClose, tabIndex: -1, title: \"Dismiss\", children: _jsx(TimesIcon, {}) }, \"close\"),\n ] }) }, typeof message === 'string' || typeof message === 'number'\n ? message\n : ''));\n});\n//# sourceMappingURL=NotificationManager.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Menu as MuiMenu } from '@mui/material';\nexport const BaseMenu = (props) => {\n const { children, classes, ...otherProps } = props;\n return (_jsx(MuiMenu, { classes: {\n ...(classes ?? {}),\n paper: 'mui-menu__paper',\n list: 'mui-menu__list',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\n//# sourceMappingURL=BaseMenu.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef } from 'react';\nimport { BaseMenu } from './BaseMenu.js';\nexport const ContextMenu = (props) => {\n const { className, children, menuProps, content, disabled, onClose, onOpen } = props;\n const contextMenuRoot = useRef(null);\n const [isOpen, setIsOpen] = useState(false);\n const [anchorEl, setAnchorEl] = useState();\n const [left, setLeft] = useState(0);\n const [top, setTop] = useState(0);\n const reset = () => {\n setAnchorEl(undefined);\n setIsOpen(false);\n setTop(0);\n setLeft(0);\n };\n const close = (event) => {\n event.stopPropagation();\n event.preventDefault();\n reset();\n onClose?.();\n };\n const onContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n if (disabled) {\n return;\n }\n onOpen?.();\n if (contextMenuRoot.current) {\n // Get position of the container element relative to the page document\n // See https://plainjs.com/javascript/styles/get-the-position-of-an-element-relative-to-the-document-24/\n const containerRect = contextMenuRoot.current.getBoundingClientRect();\n const containerLeft = containerRect.left +\n (window.scrollX || document.documentElement.scrollLeft);\n const containerTop = containerRect.top +\n (window.scrollY || document.documentElement.scrollTop);\n const { clientX, clientY, target } = event;\n const eventTarget = target;\n if (anchorEl !== eventTarget) {\n // NOTE: since this method is not supported in JSDom, we will disable this optimization in test\n // eslint-disable-next-line no-process-env\n if (process.env.NODE_ENV !== 'test') {\n const elements = document.elementsFromPoint(clientX, clientY);\n // Besides checking for the element containment, we also want to check for position as MUI\n // Menu have a background that spans the whole screen to check for clickout and trap focus\n // which means right click on other part of the screen will also result in context menu being shown\n const hasAnchor = elements.some((element) => element === eventTarget) &&\n containerLeft <= clientX &&\n clientX <= containerLeft + containerRect.width &&\n containerTop <= clientY &&\n clientY <= containerTop + containerRect.height;\n if (!hasAnchor) {\n reset();\n onClose?.();\n return;\n }\n }\n }\n setAnchorEl(eventTarget);\n setIsOpen(true);\n setTop(clientY);\n setLeft(clientX);\n }\n };\n return (_jsxs(\"div\", { ref: contextMenuRoot, className: className, onContextMenu: onContextMenu, children: [children, _jsx(BaseMenu, { open: isOpen, anchorPosition: { left, top }, onClose: close, anchorReference: \"anchorPosition\", BackdropProps: {\n invisible: true,\n onContextMenu,\n }, disableRestoreFocus: true, transitionDuration: 0, onClick: close, ...menuProps, children: isOpen && content }, `${left}, ${top}`)] }));\n};\n//# sourceMappingURL=ContextMenu.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { forwardRef } from 'react';\nimport { clsx } from 'clsx';\nimport { generateSimpleDIVComponent } from '../utils/ComponentCreatorUtils.js';\nexport const MenuContent = forwardRef(function MenuContent(props, ref) {\n const { className, children, ...otherProps } = props;\n return (_jsx(\"div\", { ref: ref, className: clsx('menu', className), ...otherProps, children: children }));\n});\nexport const MenuContentItem = (props) => {\n const { className, onClick, title, disabled, children, ...otherProps } = props;\n return (_jsx(\"button\", { className: clsx('menu__item', className), disabled: Boolean(disabled), title: title, onClick: onClick, ...otherProps, children: children }));\n};\nexport const MenuContentDivider = generateSimpleDIVComponent('MenuContentDivider', 'menu__divider');\nexport const MenuContentItemIcon = generateSimpleDIVComponent('MenuContentItemIcon', 'menu__item__icon');\nexport const MenuContentItemBlankIcon = (props) => {\n const { className, ...otherProps } = props;\n return (_jsx(\"div\", { className: clsx('menu__item__icon', className), ...otherProps }));\n};\nexport const MenuContentItemLabel = generateSimpleDIVComponent('MenuContentItemLabel', 'menu__item__label');\n//# sourceMappingURL=MenuContent.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport ReactMarkdown from 'react-markdown';\nimport remarkGFM from 'remark-gfm';\nimport { clsx } from 'clsx';\nimport { useEffect } from 'react';\nimport mermaid from 'mermaid';\nexport const MarkdownTextViewer = (props) => {\n useEffect(() => {\n // this will render the mermaid diagram\n mermaid.initialize({ startOnLoad: true, theme: 'dark' });\n mermaid.contentLoaded();\n }, [props.value]);\n return (_jsx(ReactMarkdown, { className: clsx('markdown-content', props.className), remarkPlugins: [remarkGFM], components: props.components ?? {\n // customize the rendering of the <code> block, if the language is mermaid\n // the class name must include `mermaid` and it will get picked up by the mermaid renderer\n code: (_props) => {\n const { children, className, node, ...rest } = _props;\n const match = /language-(?<language>\\w+)/.exec(className ?? '');\n return match?.groups?.language ? (_jsx(\"code\", { ...rest, className: clsx(match.groups.language), children: children })) : (_jsx(\"code\", { ...rest, className: className, children: children }));\n },\n }, children: props.value.value }));\n};\n//# sourceMappingURL=MarkdownTextViewer.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect, useState } from 'react';\nimport { useResizeDetector } from 'react-resize-detector';\nimport { clsx } from 'clsx';\nconst DEFAULT_CONTENT_PADDING = 20;\n/**\n * Use this component for panel with empty content, it has a resize detector that will\n * help to show/hide the content as the panel is resized\n */\nexport const BlankPanelContent = (props) => {\n const { children } = props;\n const { ref: contentRef, width: contentWidth, height: contentHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n const [showContent, setShowContent] = useState(false);\n const { ref: containerRef, width: containerWidth, height: containerHeight, } = useResizeDetector({\n refreshMode: 'throttle',\n refreshRate: 50,\n refreshOptions: { trailing: true },\n });\n useEffect(() => {\n setShowContent((containerWidth ?? 0) >\n (contentWidth ?? 0) + DEFAULT_CONTENT_PADDING * 2 &&\n (containerHeight ?? 0) >\n (contentHeight ?? 0) + DEFAULT_CONTENT_PADDING * 2);\n }, [containerWidth, containerHeight, contentWidth, contentHeight]);\n return (_jsx(\"div\", { ref: containerRef, className: \"panel__content__blank\", children: _jsx(\"div\", { ref: contentRef, className: clsx('panel__content__blank__content', {\n 'panel__content__blank__content--hide': !showContent,\n }), children: children }) }));\n};\n//# sourceMappingURL=BlankPanelContent.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { RadioGroup as MuiRadioGroup, FormControlLabel, Radio, } from '@mui/material';\nimport { clsx } from 'clsx';\nconst transformToMatrix = (arr, stepSize) => {\n const matrix = [];\n for (let i = 0; i < arr.length; i += stepSize) {\n matrix.push(arr.slice(i, i + stepSize));\n }\n return matrix;\n};\nexport const BaseRadioGroup = (props) => {\n const { children, options, size, className, ...otherProps } = props;\n // For displaying avaible options in a [n,size] matrix\n const targetOptionsValuesInMatrix = transformToMatrix(options, size);\n return (_jsxs(\"div\", { className: clsx('mui-radio-group', className), children: [targetOptionsValuesInMatrix.map((row, idx) => (\n // eslint-disable-next-line react/no-array-index-key\n _jsx(\"div\", { children: _jsx(MuiRadioGroup, { className: \"mui-radio-group__group\", ...otherProps, children: row.map((op) => (_jsx(FormControlLabel, { className: \"mui-radio-group__group__column\", style: { width: `${100 / size}%` }, value: op, control: _jsx(Radio, { className: \"mui-radio-group__group__item__radio-btn\" }), label: _jsx(\"div\", { className: \"mui-radio-group__group__item__label\", children: op }) }, op))) }) }, idx))), children] }));\n};\n//# sourceMappingURL=BaseRadioGroup.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Popover as MuiPopover, } from '@mui/material';\nexport const BasePopover = (props) => {\n const { children, ...otherProps } = props;\n return (_jsx(MuiPopover, { classes: {\n paper: 'mui-popover__paper',\n }, transitionDuration: 0, ...otherProps, children: props.children }));\n};\n//# sourceMappingURL=BasePopover.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_DOCUMENTATION_KEY;\n(function (LEGEND_APPLICATION_DOCUMENTATION_KEY) {\n LEGEND_APPLICATION_DOCUMENTATION_KEY[\"QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX\"] = \"question.how-to-use-advanced-search-syntax\";\n})(LEGEND_APPLICATION_DOCUMENTATION_KEY || (LEGEND_APPLICATION_DOCUMENTATION_KEY = {}));\n//# sourceMappingURL=LegendApplicationDocumentation.js.map","import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { clsx, TimesIcon, SearchIcon, MapMarkerIcon, CloseIcon, ContextMenu, MenuContent, MenuContentItem, MarkdownTextViewer, ChevronDownIcon, ChevronRightIcon, BlankPanelContent, BeardIcon, SunglassesIcon, WizardHatIcon, FaceLaughWinkIcon, ThinVerticalDragHandleIcon, PanelLoadingIndicator, BasePopover, FaceSadTearIcon, CogIcon, Draggable, BaseRadioGroup, QuestionCircleIcon, EmptyWindowRestoreIcon, WindowMaximizeIcon, MinusCircleIcon, } from '@finos/legend-art';\nimport { ADVANCED_FUZZY_SEARCH_MODE, ContentType, debounce, downloadFileUsingDataURI, formatDate, isString, uuid, } from '@finos/legend-shared';\nimport { observer } from 'mobx-react-lite';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport { DEFAULT_DATE_TIME_FORMAT, DEFAULT_TAB_SIZE, } from '../stores/ApplicationConfig.js';\nimport { VIRTUAL_ASSISTANT_TAB, } from '../stores/AssistantService.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nimport { LEGEND_APPLICATION_DOCUMENTATION_KEY } from '../__lib__/LegendApplicationDocumentation.js';\nconst WIZARD_GREETING = `Bonjour, It's Pierre!`;\nconst VirtualAssistantDocumentationEntryViewer = observer((props) => {\n const { entry } = props;\n const applicationStore = useApplicationStore();\n const toggleExpand = () => {\n if (!entry.isOpen) {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n }\n entry.setIsOpen(!entry.isOpen);\n };\n const onDocumentationLinkClick = () => {\n LegendApplicationTelemetryHelper.logEvent_VirtualAssistantDocumentationEntryAccessed(applicationStore.telemetryService, {\n key: entry.documentationKey,\n });\n };\n const copyDocumentationKey = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(entry.documentationKey));\n return (_jsx(ContextMenu, { className: \"virtual-assistant__doc-entry\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsx(MenuContent, { children: _jsx(MenuContentItem, { onClick: copyDocumentationKey, children: \"Copy Documentation Key\" }) }), children: _jsxs(\"div\", { className: \"virtual-assistant__doc-entry\", children: [_jsxs(\"div\", { className: \"virtual-assistant__doc-entry__header\", children: [_jsx(\"button\", { className: clsx('virtual-assistant__doc-entry__expand-icon', {\n 'virtual-assistant__doc-entry__expand-icon--disabled': !entry.content,\n }), disabled: !entry.content, tabIndex: -1, onClick: toggleExpand, children: entry.isOpen ? _jsx(ChevronDownIcon, {}) : _jsx(ChevronRightIcon, {}) }), entry.url ? (_jsx(\"a\", { className: \"virtual-assistant__doc-entry__title virtual-assistant__doc-entry__title--link\", rel: \"noopener noreferrer\", target: \"_blank\", href: entry.url, onClick: onDocumentationLinkClick, title: \"Click to see external documentation\", children: entry.title })) : (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__title\", onClick: toggleExpand, children: entry.title }))] }), entry.isOpen && entry.content && (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content\", children: isString(entry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__doc-entry__content__text\", children: entry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__doc-entry__content__markdown-text\", value: entry.content })) }))] }) }));\n});\nconst VirtualAssistantContextualSupportPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const contextualEntry = assistantService.currentContextualDocumentationEntry;\n const copyContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(contextualEntry?.context ?? ''));\n const copyCurrentContextIDToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.currentContext?.key ?? ''));\n const copyContextStackToClipboard = applicationStore.guardUnhandledError(() => applicationStore.clipboardService.copyTextToClipboard(applicationStore.navigationContextService.contextStack\n .map((context) => context.key)\n .join(' > ')));\n return (_jsxs(ContextMenu, { className: \"virtual-assistant__contextual-support\", disabled: !contextualEntry, menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: copyContextIDToClipboard, children: \"Copy Context ID\" }), _jsx(MenuContentItem, { onClick: copyCurrentContextIDToClipboard, children: \"Copy Current Context ID\" }), _jsx(MenuContentItem, { onClick: copyContextStackToClipboard, children: \"Copy Context Stack\" })] }), children: [contextualEntry && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__content\", children: [contextualEntry.title && (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__title\", children: contextualEntry.title })), contextualEntry.content && (_jsx(_Fragment, { children: isString(contextualEntry.content) ? (_jsx(\"div\", { className: \"virtual-assistant__contextual-support__text\", children: contextualEntry.content })) : (_jsx(MarkdownTextViewer, { className: \"virtual-assistant__contextual-support__markdown-text\", value: contextualEntry.content })) })), contextualEntry.related.length && (_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries\", children: [_jsxs(\"div\", { className: \"virtual-assistant__contextual-support__relevant-entries__title\", children: [\"Related entries (\", contextualEntry.related.length, \")\"] }), contextualEntry.related.map((entry) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: entry }, entry.uuid)))] }))] })), !contextualEntry && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceLaughWinkIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No contextual documentation found!\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__instruction\", children: \"Keep using the app. When contextual help is available, we will let you know!\" })] }) }))] }));\n});\nconst VirtualAssistantSearchPanel = observer(() => {\n const applicationStore = useApplicationStore();\n const searchInputRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n // search text\n const searchText = assistantService.searchText;\n const debouncedSearch = useMemo(() => debounce(() => assistantService.search(), 100), [assistantService]);\n const onSearchTextChange = (event) => {\n assistantService.setSearchText(event.target.value);\n debouncedSearch();\n };\n const clearSearchText = () => {\n assistantService.resetSearch();\n assistantService.currentDocumentationEntry = undefined;\n searchInputRef.current?.focus();\n };\n const toggleSearchConfigMenu = () => assistantService.setShowSearchConfigurationMenu(!assistantService.showSearchConfigurationMenu);\n const downloadDocRegistry = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishDocRegistry(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n const downloadContextualDocIndex = () => {\n downloadFileUsingDataURI(`documentation-registry_${formatDate(new Date(Date.now()), DEFAULT_DATE_TIME_FORMAT)}.json`, JSON.stringify(applicationStore.documentationService.publishContextualDocIndex(), undefined, DEFAULT_TAB_SIZE), ContentType.APPLICATION_JSON);\n };\n useEffect(() => {\n searchInputRef.current?.focus();\n }, []);\n return (_jsxs(\"div\", { className: \"virtual-assistant__search\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__header\", children: [_jsx(\"input\", { ref: searchInputRef, \n /**\n * NOTE: In the scenario where another modal is opened at the same time the assistant panel\n * is open, the focus will be stolen by the newly opened modal. In that case, we need\n * to take back the focus. The trick here is to remount the whole panel (modal/popover)\n * by refreshing the `key` prop of the panel. This will cause `mui` to recompute the\n * focus-trap and allow the input field to be selectable again. Basically, we are stealing\n * back the focus for the assistant.\n *\n * However, the caveat is that this will cause the component states, such as scroll positions,\n * to be reset as such, we need to do this really sparingly. In fact, the only\n * scenario where we need to do this is when a new modal is opened when the assistant panel\n * is already opened. Basically, Other scenarios, such as when the assistant is opened after the modal\n * is opened seem to pose no issue.\n */\n onClick: () => {\n if (\n // only when there are dialogs being opened\n // NOTE: this seems rather hacky, but querying by role is the least\n // vendor-dependent approach we can think of at the moment\n document.querySelectorAll('[role=\"dialog\"]').length &&\n // only when the focus is not already with the input field\n // this means the focus is being stolen from the assistant because\n // the newly opened modal is opened more recently than the assistant\n //\n // once the focus has been gained by the assistant\n // we will not need to do this anymore\n searchInputRef.current !== document.activeElement) {\n assistantService.refreshPanelRendering();\n }\n }, className: clsx('virtual-assistant__search__input input--dark', {\n 'virtual-assistant__search__input--searching': searchText,\n }), spellCheck: false, onChange: onSearchTextChange, value: searchText, placeholder: \"Ask me a question\" }), searchText && (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__count\", children: assistantService.searchResults.length +\n (assistantService.isOverSearchLimit ? '+' : '') })), _jsx(\"button\", { className: clsx('virtual-assistant__search__input__config__trigger', {\n 'virtual-assistant__search__input__config__trigger--toggled': assistantService.showSearchConfigurationMenu,\n 'virtual-assistant__search__input__config__trigger--active': assistantService.searchConfigurationState.isAdvancedSearchActive,\n }), tabIndex: -1, onClick: toggleSearchConfigMenu, title: `${assistantService.searchConfigurationState.isAdvancedSearchActive\n ? 'Advanced search is currently active\\n'\n : ''}Click to toggle search config menu`, children: _jsx(CogIcon, {}) }), !searchText ? (_jsx(\"div\", { className: \"virtual-assistant__search__input__search__icon\", children: _jsx(SearchIcon, {}) })) : (_jsx(\"button\", { className: \"virtual-assistant__search__input__clear-btn\", tabIndex: -1, onClick: clearSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }), _jsxs(\"div\", { className: \"virtual-assistant__search__content\", children: [_jsx(PanelLoadingIndicator, { isLoading: assistantService.searchState.isInProgress }), _jsx(\"div\", { className: clsx('virtual-assistant__search__input__config__panel', {\n 'virtual-assistant__search__input__config__panel--toggled': assistantService.showSearchConfigurationMenu,\n }), children: _jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel\", children: [_jsxs(\"div\", { className: \"virtual-assistant__search__input__advanced-config__panel__header__label\", children: [\"search config\", applicationStore.documentationService.hasDocEntry(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX) && (_jsx(\"div\", { onClick: () => assistantService.openDocumentationEntryLink(LEGEND_APPLICATION_DOCUMENTATION_KEY.QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX), title: \"Click to see documentation\", className: \"virtual-assistant__search__input__advanced-config__panel__header__label__hint\", children: _jsx(QuestionCircleIcon, {}) }))] }), _jsx(\"div\", { children: _jsx(BaseRadioGroup, { value: assistantService.searchConfigurationState.currentMode, onChange: (event) => {\n const searchMode = event.target\n .value;\n assistantService.searchConfigurationState.setCurrentMode(searchMode);\n }, row: false, options: [\n ADVANCED_FUZZY_SEARCH_MODE.STANDARD,\n ADVANCED_FUZZY_SEARCH_MODE.INCLUDE,\n ADVANCED_FUZZY_SEARCH_MODE.EXACT,\n ADVANCED_FUZZY_SEARCH_MODE.INVERSE,\n ], size: 1 }) })] }) }), assistantService.currentDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: _jsx(VirtualAssistantDocumentationEntryViewer, { entry: assistantService.currentDocumentationEntry }, assistantService.currentDocumentationEntry.uuid) })), !assistantService.currentDocumentationEntry && (_jsxs(_Fragment, { children: [Boolean(assistantService.searchResults.length) && (_jsx(\"div\", { className: \"virtual-assistant__search__results\", children: assistantService.searchResults.map((result) => (_jsx(VirtualAssistantDocumentationEntryViewer, { entry: result }, result.uuid))) })), searchText && !assistantService.searchResults.length && (_jsx(BlankPanelContent, { children: _jsxs(\"div\", { className: \"virtual-assistant__panel__placeholder\", children: [_jsx(FaceSadTearIcon, { className: \"virtual-assistant__panel__placeholder__icon\" }), _jsx(\"div\", { className: \"virtual-assistant__panel__placeholder__message\", children: \"No result...\" })] }) })), !searchText && !assistantService.searchResults.length && (_jsx(ContextMenu, { className: \"virtual-assistant__character__container\", menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: downloadDocRegistry, children: \"Download documentation registry\" }), _jsx(MenuContentItem, { onClick: downloadContextualDocIndex, children: \"Download contextual documentation mapping\" })] }), children: _jsxs(\"div\", { className: \"virtual-assistant__character\", children: [_jsxs(\"div\", { className: \"virtual-assistant__character__figure\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__character__beard\" })] }), _jsx(\"div\", { className: \"virtual-assistant__character__greeting\", children: WIZARD_GREETING }), _jsx(\"div\", { className: \"virtual-assistant__character__question\", children: \"How can I help today?\" })] }) }))] }))] })] }));\n});\nconst VirtualAssistantPanel = observer((props) => {\n const { triggerElement } = props;\n const applicationStore = useApplicationStore();\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const selectedTab = assistantService.selectedTab;\n const extraViewConfigurations = applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraVirtualAssistantViewConfigurations?.() ?? []);\n const currentExtensionView = extraViewConfigurations.find((config) => config.key === selectedTab);\n const toggleMaximize = () => assistantService.setIsPanelMaximized(!assistantService.isPanelMaximized);\n const selectSearch = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.SEARCH);\n const selectContextualDoc = () => assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n const closeAssistantPanel = () => assistantService.setIsOpen(false);\n return (\n /**\n * The most appropriate component to use is `Popper`\n * as it does not block click-away\n * See https://mui.com/material-ui/react-popper/\n *\n * However, the caveat is that in the implementation of mui Popper\n * focus trap is not supported. As such, we could end up in a situation\n * where the assistant input fields will not be focusable\n * when another modal is being opened, as that newly opened modal will\n * **steal** the focus\n *\n * See https://github.com/finos/legend-studio/issues/1255\n * See https://mui.com/material-ui/react-modal/#focus-trap\n * See https://github.com/mui/material-ui/issues/17497\n */\n _jsx(BasePopover, { open: assistantService.isOpen, className: \"virtual-assistant__panel__container\", anchorEl: triggerElement, \n // we need to get rid of the backdrop and the click-away trap\n // to make this popover behave like a popper\n // NOTE: we will cancel the effect of click-away trap using CSS\n hideBackdrop: true, PaperProps: {\n classes: { root: 'virtual-assistant__panel__container__root' },\n }, \n // allow other modals to take the focus from the virtual assistant\n disableEnforceFocus: true, \n // NOTE: make sure the assistant is always fully displayed (not cropped)\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'left',\n }, transformOrigin: {\n vertical: 'bottom',\n horizontal: 'right',\n }, children: _jsxs(\"div\", { className: clsx('virtual-assistant__panel', {\n 'virtual-assistant__panel--maximized': assistantService.isPanelMaximized,\n }), \n // NOTE: here we block `tabbing` (to move focus). This is to counter the effect of\n // `disableEnforceFocus={true}` set in the assistant panel popover\n // this is the poor-man focus trap for the assistant to ensure\n // that we don't leak focus tab down to other parts of the app\n //\n // Especially, due to the hack we do to compete for focus when another modal\n // is opened, we need to do this to avoid leaking of focus to components\n // beneath the modal via assistant\n //\n // setting `tabIndex={0}` is a hack to make this DOM node focusable\n // and hence, we could trap the focus here using `onKeyDown`\n // See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\n tabIndex: 0, onKeyDown: (event) => {\n if (event.key === 'Tab') {\n event.preventDefault();\n event.stopPropagation();\n }\n }, children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header\", children: [_jsxs(\"div\", { className: \"virtual-assistant__panel__header__tabs\", children: [_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH,\n }), onClick: selectSearch, title: \"Search\", children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: _jsx(SearchIcon, {}) }) }), _jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT,\n }), onClick: selectContextualDoc, title: \"Contextual Support\", children: _jsxs(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: [_jsx(MapMarkerIcon, {}), currentContextualDocumentationEntry && (_jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__indicator\", title: \"Contextual support available\" }))] }) }), extraViewConfigurations.map((config) => (_jsx(\"div\", { className: clsx('virtual-assistant__panel__header__tab', {\n 'virtual-assistant__panel__header__tab--active': selectedTab === config.key,\n }), onClick: () => {\n assistantService.setSelectedTab(config.key);\n if (config.autoExpandOnOpen) {\n assistantService.setIsPanelMaximized(true);\n }\n }, title: config.title, children: _jsx(\"div\", { className: \"virtual-assistant__panel__header__tab__content\", children: config.icon ?? _jsx(QuestionCircleIcon, {}) }) }, config.key)))] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__header__actions\", children: [_jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: toggleMaximize, title: assistantService.isPanelMaximized ? 'Minimize' : 'Maximize', children: assistantService.isPanelMaximized ? (_jsx(EmptyWindowRestoreIcon, {})) : (_jsx(WindowMaximizeIcon, {})) }), _jsx(\"button\", { className: \"virtual-assistant__panel__header__action\", tabIndex: -1, onClick: closeAssistantPanel, title: \"Close\", children: _jsx(CloseIcon, { className: \"virtual-assistant__panel__icon__close\" }) })] })] }), _jsxs(\"div\", { className: \"virtual-assistant__panel__content\", children: [selectedTab === VIRTUAL_ASSISTANT_TAB.SEARCH && (_jsx(VirtualAssistantSearchPanel, {})), selectedTab === VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT && (_jsx(VirtualAssistantContextualSupportPanel, {})), currentExtensionView?.renderer()] })] }) }, assistantService.panelRenderingKey));\n});\nexport const VirtualAssistant = observer(() => {\n const [isDragging, setIsDragging] = useState(false);\n const [_key, _setKey] = useState(uuid());\n const applicationStore = useApplicationStore();\n const assistantRef = useRef(null);\n const assistantService = applicationStore.assistantService;\n const currentContextualDocumentationEntry = assistantService.currentContextualDocumentationEntry;\n const toggleAssistantPanel = () => {\n const newVal = !assistantService.isOpen;\n // open the contextual help tab when contextual help is available\n if (newVal && currentContextualDocumentationEntry) {\n assistantService.setSelectedTab(VIRTUAL_ASSISTANT_TAB.CONTEXTUAL_SUPPORT);\n }\n assistantService.setIsOpen(!assistantService.isOpen);\n };\n const hideAssistant = () => applicationStore.assistantService.hideAssistant();\n const resetPosition = () => {\n // close the panel since\n assistantService.setIsOpen(false);\n _setKey(uuid());\n };\n // drag and drop\n const onDragEnd = () => setIsDragging(false);\n const onDragStart = () => setIsDragging(true);\n useEffect(() => {\n if (assistantService.isHidden) {\n // reset to default position when we hide the assistant\n // so that when we open it the position is reset\n _setKey(uuid());\n }\n }, [assistantService.isHidden]);\n return (_jsx(Draggable\n // this is a trick so we could reset the default position of the assistant\n // See https://github.com/react-grid-layout/react-draggable/issues/214#issuecomment-270021423\n , { \n // make sure we cannot drag and drop outside of the screen\n bounds: \"parent\", onStart: onDragStart, onStop: onDragEnd, \n // Avoid using deprecated findDOMNode method to rid of React warning\n // See https://github.com/react-grid-layout/react-draggable/issues/749\n nodeRef: assistantRef, \n // limit the dnd trigger to only the drag handle\n handle: \".virtual-assistant__station__drag-handle\", children: _jsxs(\"div\", { className: \"virtual-assistant\", \n // NOTE: we have to set the `ref` at this level so even when the assistant is hidden\n // the element is still in the DOM so when we programmatically show the assistant panel\n // the anchor is available in time\n ref: assistantRef, children: [_jsxs(\"div\", { className: clsx('virtual-assistant__station', {\n 'virtual-assistant__station--hidden': assistantService.isHidden,\n 'virtual-assistant__station--active': Boolean(currentContextualDocumentationEntry),\n }), children: [_jsx(\"button\", { className: \"virtual-assistant__station__hide-button\", title: \"Hide assistant\", onClick: () => {\n applicationStore.assistantService.toggleAssistant();\n }, children: _jsx(MinusCircleIcon, {}) }), _jsx(\"button\", { className: \"virtual-assistant__station__trigger\", tabIndex: -1, onClick: toggleAssistantPanel, title: assistantService.isOpen\n ? `Click to close assistant panel`\n : `${currentContextualDocumentationEntry\n ? 'Contextual support available.\\n'\n : ''}Click to open Assistant...`, children: _jsxs(\"div\", { className: \"virtual-assistant__station__character\", children: [_jsx(WizardHatIcon, { className: \"virtual-assistant__station__character__hat\" }), _jsx(SunglassesIcon, { className: \"virtual-assistant__station__character__glasses\" }), _jsx(BeardIcon, { className: \"virtual-assistant__station__character__beard\" })] }) }), _jsx(\"div\", { className: \"virtual-assistant__station__label\", onClick: toggleAssistantPanel, children: \"Assistant\" }), _jsx(ContextMenu, { className: clsx('virtual-assistant__station__drag-handle', {\n 'virtual-assistant__station__drag-handle--dragging': isDragging,\n }), menuProps: {\n elevation: 7,\n classes: {\n root: 'virtual-assistant__context-menu',\n },\n }, content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: resetPosition, children: \"Reset Position\" }), _jsx(MenuContentItem, { onClick: hideAssistant, children: \"Hide Assistant\" })] }), children: _jsx(\"div\", { className: \"virtual-assistant__station__drag-handle__content\", title: isDragging ? undefined : 'Grab to drag assistant', children: _jsx(ThinVerticalDragHandleIcon, {}) }) })] }, currentContextualDocumentationEntry?.uuid ?? ''), !isDragging &&\n assistantService.isOpen &&\n !assistantService.isHidden &&\n assistantRef.current && (_jsx(VirtualAssistantPanel, { triggerElement: assistantRef.current }))] }) }, _key));\n});\n//# sourceMappingURL=VirtualAssistant.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Backdrop, LegendStyleProvider, Portal } from '@finos/legend-art';\nimport { observer } from 'mobx-react-lite';\nimport { DndProvider } from 'react-dnd';\nimport { HTML5Backend } from 'react-dnd-html5-backend';\nimport { ActionAlert } from './ActionAlert.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { BlockingAlert } from './BlockingAlert.js';\nimport { NotificationManager } from './NotificationManager.js';\nimport { useEffect } from 'react';\nimport { createKeybindingsHandler, } from '@finos/legend-shared';\nimport { VirtualAssistant } from './VirtualAssistant.js';\nimport { LegendApplicationTelemetryHelper } from '../__lib__/LegendApplicationTelemetry.js';\nvar APPLICATION_COMPONENT_ELEMENT_ID;\n(function (APPLICATION_COMPONENT_ELEMENT_ID) {\n APPLICATION_COMPONENT_ELEMENT_ID[\"TOP_LEVEL_CONTAINER\"] = \"application.top-level-container\";\n APPLICATION_COMPONENT_ELEMENT_ID[\"BACKDROP_CONTAINER\"] = \"application.backdrop-container\";\n})(APPLICATION_COMPONENT_ELEMENT_ID || (APPLICATION_COMPONENT_ELEMENT_ID = {}));\nconst PLATFORM_NATIVE_KEYBOARD_SHORTCUTS = [\n 'Meta+KeyP', // Print\n 'Control+KeyP',\n 'Meta+KeyS', // Save\n 'Control+KeyS',\n 'F8', // Chrome: Developer Tools > Sources: Run or pause script\n 'F10', // Chrome: Developer Tools > Sources: Step over next function call\n 'F11', // Chrome: Developer Tools > Sources: Step into next function call\n 'Meta+Shift+KeyP', // Chrome: Developer Tools: Open Command Prompt inside developer tools\n 'Control+Backquote', // Chrome: Developer Tools: Open console\n 'Control+Shift+KeyN', // Chrome: Open Private Browsing (incognito)\n 'Control+Shift+KeyP', // Firefox: Open Private Browsing\n 'Meta+KeyB', // Firefox: Open bookmark sidebar\n 'Control+KeyB',\n 'F7', // Firefox: Caret browsing\n 'Alt+F7', // Firefox: Caret browsing (Mac)\n 'Control+Shift+KeyB',\n 'Alt+KeyZ', // Mac: special symbol\n];\nconst buildHotkeysConfiguration = (commandKeyMap, handler) => {\n const keyMap = {};\n commandKeyMap.forEach((keyCombinations, commandKey) => {\n if (keyCombinations.length) {\n keyMap[commandKey] = {\n combinations: keyCombinations,\n handler,\n };\n }\n });\n // Disable platform native keyboard shortcuts\n // NOTE: due to the order in which hotkey configuration is searched and applied,\n // we must place these after application hotkey configuration\n const PLATFORM_NATIVE_KEYBOARD_COMMAND = 'INTERNAL__PLATFORM_NATIVE_KEYBOARD_COMMAND';\n keyMap[PLATFORM_NATIVE_KEYBOARD_COMMAND] = {\n combinations: PLATFORM_NATIVE_KEYBOARD_SHORTCUTS,\n handler: (keyCombination, event) => {\n // prevent default from potentially clashing key combinations\n event.preventDefault();\n },\n };\n return keyMap;\n};\n/**\n * Some elements (e.g. <canvas>) and components that we do not control the implementation\n * might have special logic to prevent `keydown` event bubbling naturally, this\n * method forces those event to surface to the top of the app and being handled\n * by keybinding service\n */\nexport const forceDispatchKeyboardEvent = (event, applicationStore) => {\n applicationStore.layoutService\n .getElementByID(APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER)\n ?.dispatchEvent(new KeyboardEvent(event.type, event));\n};\n/**\n * Potential location to mount backdrop on\n *\n * NOTE: we usually want the backdrop container to be the first child of its immediate parent\n * so that it properly lies under the content that we pick to show on top of the backdrop\n */\nexport const BackdropContainer = (props) => (_jsx(\"div\", { className: \"backdrop__container\", \"data-elementid\": props.elementId }));\nexport const ApplicationComponentFrameworkProvider = observer((props) => {\n const { children } = props;\n const applicationStore = useApplicationStore();\n const disableContextMenu = (event) => {\n event.stopPropagation();\n event.preventDefault();\n };\n const keyBindingMap = buildHotkeysConfiguration(applicationStore.keyboardShortcutsService.commandKeyMap, (keyCombination, event) => {\n // prevent default from potentially clashing key combinations with platform native keyboard shortcuts\n // NOTE: Though tempting since it's a good way to simplify and potentially avoid conflicts,\n // we should not call `preventDefault()` because if we have any hotkey sequence which is too short,\n // such as `r`, `a` - we risk blocking some very common interaction, i.e. user typing, or even\n // constructing longer key combinations\n if (PLATFORM_NATIVE_KEYBOARD_SHORTCUTS.includes(keyCombination)) {\n event.preventDefault();\n }\n applicationStore.keyboardShortcutsService.dispatch(keyCombination);\n });\n useEffect(() => {\n const onKeyEvent = createKeybindingsHandler(keyBindingMap);\n document.addEventListener('keydown', onKeyEvent);\n return () => {\n document.removeEventListener('keydown', onKeyEvent);\n };\n }, [keyBindingMap]);\n /**\n * Keep track of when the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * since for certain platform, background contexts are de-prioritized, given less resources, and hence, would\n * run less performantly; and might require particular handlings.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n */\n useEffect(() => {\n const onVisibilityChange = () => {\n if (document.hidden) {\n LegendApplicationTelemetryHelper.logEvent_ApplicationUsageInterrupted(applicationStore.telemetryService);\n applicationStore.timeService.recordUsageInterruption();\n }\n };\n document.addEventListener('visibilitychange', onVisibilityChange);\n return () => {\n document.removeEventListener('visibilitychange', onVisibilityChange);\n };\n }, [applicationStore]);\n return (_jsxs(LegendStyleProvider, { children: [_jsx(BlockingAlert, {}), _jsx(ActionAlert, {}), _jsx(NotificationManager, {}), _jsx(VirtualAssistant, {}), applicationStore.layoutService.showBackdrop && (\n // We use <Portal> here to insert backdrop into different parts of the app\n // as backdrop relies heavily on z-index mechanism so its location in the DOM\n // really matters.\n // For example, the default location of the backdrop works fine for most cases\n // but if we want to use the backdrop for elements within modal dialogs, we would\n // need to mount the backdrop at a different location\n _jsx(Portal, { container: applicationStore.layoutService.getElementByID(applicationStore.layoutService.backdropContainerElementID ??\n APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER) ?? null, children: _jsx(Backdrop, { className: \"backdrop\", open: applicationStore.layoutService.showBackdrop }) })), _jsx(DndProvider, { backend: HTML5Backend, children: _jsxs(\"div\", { className: \"app__container\", \"data-elementid\": APPLICATION_COMPONENT_ELEMENT_ID.TOP_LEVEL_CONTAINER, \n // Disable global context menu so that only places in the app that supports context-menu will be effective\n onContextMenu: disableContextMenu, children: [_jsx(BackdropContainer, { elementId: APPLICATION_COMPONENT_ELEMENT_ID.BACKDROP_CONTAINER }), children] }) })] }));\n});\n//# sourceMappingURL=ApplicationComponentFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Terminal as XTermTerminal, } from 'xterm';\nimport { WebLinksAddon as XTermWebLinksAddon } from 'xterm-addon-web-links';\nimport { FitAddon as XTermFitAddon } from 'xterm-addon-fit';\nimport { SearchAddon as XTermSearchAddon, } from 'xterm-addon-search';\nimport { Unicode11Addon as XTermUnicode11Addon } from 'xterm-addon-unicode11';\nimport { WebglAddon as XTermWebglAddon } from 'xterm-addon-webgl';\nimport { DEFAULT_MONOSPACED_FONT_FAMILY, DEFAULT_TAB_SIZE, } from '../ApplicationConfig.js';\nimport { Terminal, DISPLAY_ANSI_ESCAPE, ANSI_moveCursor, } from './Terminal.js';\nimport { ActionState, guaranteeNonNullable, IllegalStateError, isMatchingKeyCombination, LogEvent, noop, prettyCONSTName, uniqBy, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../../__lib__/LegendApplicationEvent.js';\nimport { forceDispatchKeyboardEvent } from '../../components/ApplicationComponentFrameworkProvider.js';\nconst LEGEND_XTERM_THEME = {\n foreground: '#cccccc',\n background: '#1e1e1e',\n cursor: '#cccccc',\n /** The accent color of the cursor (fg color for a block cursor) */\n // cursorAccent?: string;\n /** The selection background color when the terminal does not have focus (can be transparent) */\n // selectionInactiveBackground?: string;\n selectionBackground: '#264f78', // blue\n black: '#000000',\n red: '#cd3131',\n green: '#0dbc79',\n yellow: '#e5e510',\n blue: '#2472c8',\n magenta: '#bc3fbc',\n cyan: '#11a8cd',\n white: '#e5e5e5',\n brightBlack: '#666666',\n brightRed: '#f14c4c',\n brightGreen: '#23d18b',\n brightYellow: '#f5f543',\n brightBlue: '#3b8eea',\n brightMagenta: '#d670d6',\n brightCyan: '#29b8db',\n brightWhite: '#e5e5e5',\n};\nconst LEGEND_XTERM_SEARCH_THEME = {\n matchOverviewRuler: '#d186167e',\n activeMatchColorOverviewRuler: '#A0A0A0CC',\n matchBackground: '#62331c',\n activeMatchBackground: '#515C6A',\n};\n// robot acsii art\n// See https://asciiartist.com/ascii-art-micro-robot/\nconst getHelpCommandContent = (commandRegistry) => `\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+-------------------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}[@@]${DISPLAY_ANSI_ESCAPE.RESET} \"Hi! Welcome to the HELP menu of Pure IDE\" ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}/|__|\\\\${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}|${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}+--${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}d b${DISPLAY_ANSI_ESCAPE.RESET} ${DISPLAY_ANSI_ESCAPE.BRIGHT_BLACK}-----------------------------------------------+${DISPLAY_ANSI_ESCAPE.RESET}\n\nFollowing is the list of supported commands:\n\n${uniqBy(Array.from(commandRegistry.values()), (config) => config.command)\n .map((config) => `${DISPLAY_ANSI_ESCAPE.BRIGHT_GREEN}${config.command.padEnd(30)}${DISPLAY_ANSI_ESCAPE.RESET}${config.description}${config.aliases?.length\n ? `\\n${''.padEnd(30)}Aliases: ${config.aliases.join(', ')}`\n : ''}\\n${''.padEnd(30)}Usage: ${DISPLAY_ANSI_ESCAPE.DIM}${config.usage}${DISPLAY_ANSI_ESCAPE.RESET}`)\n .join('\\n')}`;\nconst getCommonANSIEscapeSequencesForStyling = () => `\nCommon ANSI Escape Sequences for Styling:\n\n${Object.entries(DISPLAY_ANSI_ESCAPE)\n .map(([key, value]) => `${value}${prettyCONSTName(key).padEnd(20)}${DISPLAY_ANSI_ESCAPE.RESET\n// NOTE: since these are recommended ANSI escape sequences which can be used\n// by users in strings input in Pure IDE, they have to be Unicode escape, if we send\n// the original hexadecimal escape as part of the string, some string escape handling\n// in Pure seems to escape the leading slash of the ANSI escape sequence \\x1B; however\n// this is not the case of the escape sequence for Unicode, \\u001b hence our logic here\n} ${value.replace('\\x1b', '\\\\u001b')}`)\n .join('\\n')}`;\nconst DEFAULT_USER = 'purist';\nconst DEFAULT_COMMAND_HEADER = `\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.BRIGHT_BLUE}$${DEFAULT_USER}${DISPLAY_ANSI_ESCAPE.RESET}\n${DISPLAY_ANSI_ESCAPE.BOLD}${DISPLAY_ANSI_ESCAPE.MAGENTA}\\u276f${DISPLAY_ANSI_ESCAPE.RESET} `;\nconst COMMAND_START = '\\u276f ';\nexport class XTerm extends Terminal {\n instance;\n resizer;\n renderer;\n searcher;\n webLinkProvider;\n _TEMPORARY__onKeyListener;\n _TEMPORARY__onDataListener;\n command = '';\n commandHistory = [];\n currentCommandSearchString = '';\n commandHistoryNavigationIdx = undefined;\n isRunningCommand = false;\n setupState = ActionState.create();\n constructor(applicationStore) {\n super(applicationStore);\n this.instance = new XTermTerminal({\n allowProposedApi: true,\n fontSize: 12,\n letterSpacing: 2,\n fontWeight: 400,\n fontWeightBold: 700,\n fontFamily: `\"${DEFAULT_MONOSPACED_FONT_FAMILY}\", Menlo, Consolas, monospace`,\n tabStopWidth: DEFAULT_TAB_SIZE,\n theme: LEGEND_XTERM_THEME,\n overviewRulerWidth: 14, // 14px\n scrollback: 100000, // buffer a substantial content length\n convertEol: true, // treat \\n as new line\n // this is needed so we can control the cursor programmatically using escape sequences\n scrollOnUserInput: false,\n });\n this.resizer = new XTermFitAddon();\n this.searcher = new XTermSearchAddon();\n this.renderer = new XTermWebglAddon();\n }\n setup(configuration) {\n if (this.setupState.hasCompleted) {\n throw new IllegalStateError(`Terminal is already set up`);\n }\n this.setupState.complete();\n // Handling context loss: The browser may drop WebGL contexts for various reasons like OOM or after the system has been suspended.\n // An easy, but suboptimal way, to handle this is by disposing of WebglAddon when the `webglcontextlost` event fires\n // NOTE: we don't really have a resilient way to fallback right now, hopefully, the fallback is to render in DOM\n this.renderer.onContextLoss(() => {\n this.renderer.dispose();\n });\n this.instance.loadAddon(this.resizer);\n this.instance.loadAddon(this.searcher);\n this.instance.loadAddon(this.renderer);\n this.instance.loadAddon(new XTermUnicode11Addon());\n this.instance.unicode.activeVersion = '11';\n // NOTE: since we render the terminal using webgl/canvas, event is not bubbled\n // naturally through the DOM tree, we have to manually force this\n this.instance.attachCustomKeyEventHandler((event) => {\n // NOTE: this is a cheap way to handle hotkey, but this is really the only\n // hotkey we want to support at local scope of the terminal\n // also, since here we have prevent default and stop propagation, we have to do\n // this here instead at in `onKey` handler\n if (isMatchingKeyCombination(event, 'Control+KeyF') ||\n isMatchingKeyCombination(event, 'Meta+KeyF')) {\n // prevent default so as to not trigger browser platform search command\n event.preventDefault();\n event.stopPropagation();\n this.searchConfig.focus();\n return false;\n }\n else if (\n // NOTE: by default Ctrl+C gets sent to the shell as you wouldn't be able to use bash otherwise.\n // We need this special handling here for normal copy behavior on Windows.\n // Paste (Ctrl+V) not working on Windows could also be due to the same reason, so we would not\n // manually handle that using `xterm.onKey` neither\n // See https://github.com/xtermjs/xterm.js/issues/1868\n // See https://github.com/microsoft/vscode/issues/6451\n (isMatchingKeyCombination(event, 'Control+KeyC') &&\n this.instance.hasSelection()) ||\n isMatchingKeyCombination(event, 'Control+KeyV')) {\n return false;\n }\n return true; // return true to indicate the event should still be handled by xterm\n });\n this.webLinkProvider = configuration?.webLinkProvider\n ? new XTermWebLinksAddon(configuration.webLinkProvider.handler, {\n urlRegex: configuration.webLinkProvider.regex,\n })\n : new XTermWebLinksAddon();\n this.instance.loadAddon(this.webLinkProvider);\n (configuration?.commands ?? []).forEach((commandConfig) => {\n [commandConfig.command, ...(commandConfig.aliases ?? [])].forEach((command) => {\n if (!this.commandRegistry.has(command)) {\n this.commandRegistry.set(command, commandConfig);\n }\n else {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE), `Found multiple duplicated terminal commands '${command}'`);\n }\n });\n });\n this.searcher.onDidChangeResults((result) => {\n this.setSearchResultCount(result.resultCount);\n this.setSearchCurrentResultIndex(result.resultIndex);\n });\n // NOTE: `xterm` expects to be attached to a proper terminal program which handles\n // input, since we can't do that yet, we implement a fairly basic input handling flow\n // See https://github.com/xtermjs/xterm.js/issues/617#issuecomment-288849502\n this._TEMPORARY__onKeyListener = this.instance.onKey(({ key, domEvent }) => {\n // take care of command history navigation\n if (domEvent.code === 'ArrowUp') {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx !== undefined\n ? this.commandHistoryNavigationIdx + 1\n : 0);\n return;\n // reset current command in place\n }\n else if (domEvent.code === 'ArrowDown') {\n if (this.commandHistoryNavigationIdx !== undefined) {\n this.setCommandFromHistory(this.commandHistoryNavigationIdx === 0\n ? undefined\n : this.commandHistoryNavigationIdx - 1);\n }\n return;\n }\n else {\n // reset navigation history the moment any other key is pressed\n this.commandHistoryNavigationIdx = undefined;\n }\n if (domEvent.code === 'Enter') {\n // run command\n if (this.command.trim()) {\n const text = this.command;\n const [command, ...args] = text.replaceAll(/\\s+/g, ' ').split(' ');\n this.addCommandToHistory(this.command);\n if (!command) {\n return;\n }\n const matchingCommand = this.commandRegistry.get(command);\n if (!matchingCommand) {\n this.fail(`command not found: ${command}`);\n return;\n }\n if (this.isRunningCommand) {\n return;\n }\n this.isRunningCommand = true;\n matchingCommand\n .handler(args.map((arg) => arg.trim()), command, text)\n .catch(noop())\n .finally(() => {\n this.isRunningCommand = false;\n if (!this.isFlushed) {\n this.abort();\n }\n });\n }\n }\n else if (isMatchingKeyCombination(domEvent, 'Control+KeyD') ||\n // NOTE: this handling here makes the assumption that the hotkey used for copying is\n // fixed to `Control+KeyC` (for Windows), it doesn't handling a different assignment\n (isMatchingKeyCombination(domEvent, 'Control+KeyC') &&\n !this.instance.hasSelection())) {\n // abort command\n this.abort();\n }\n else if (domEvent.code === 'Backspace') {\n // Alt: jump word only, Ctrl: jump to end\n // this would apply for Delete, ArrowLeft, ArrowRight\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n }\n else if (domEvent.code === 'Delete') {\n this.deleteFromCommand(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n }\n else if (domEvent.code === 'ArrowLeft') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(true)\n : -1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (domEvent.code === 'ArrowRight') {\n const movement = this.computeCursorMovement(domEvent.altKey || domEvent.ctrlKey\n ? this.computeCursorJumpMovement(false)\n : 1);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(movement.seq);\n }\n else if (\n // use key here so we absolute do not allow any characters other than these\n // being added to the input command\n key.match(/^[A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]$/)) {\n // commonly supported keys\n this.writeToCommand(key);\n }\n else {\n // for the rest, allow the keyboard event to be bubbled to\n // application keyboard shortcuts handler\n forceDispatchKeyboardEvent(domEvent, this.applicationStore);\n }\n });\n // this is needed to support copy-pasting\n this._TEMPORARY__onDataListener = this.instance.onData((val) => {\n // only support pasting (not meant for 1 character though) and special functions starting with special\n // ANSI escape sequence\n if (val.length > 1 && !val.startsWith('\\x1b')) {\n this.writeToCommand(val\n // remove all unsupported characters, including newline\n .replaceAll(/[^A-Za-z0-9!@#$%^&*()\\-_=+\"':;,.<>/?[\\]{}|\\\\~` ]/g, '')\n .trimEnd());\n }\n });\n }\n // NOTE: this is fairly HACKY way to detect command\n // we don't really have a better solution at the moment,\n // but we should come with more systematic way of persisting the start line of command\n // the challenge with this is due to text-reflow\n //\n // there is also a quriky known issue with text-reflow and the line with cursor\n // See https://github.com/xtermjs/xterm.js/issues/1941#issuecomment-463660633\n getCommandRange() {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const commandText = `${COMMAND_START}${this.command}`;\n const commandFirstLine = `${COMMAND_START}${this.command.substring(0, cols - COMMAND_START.length)}${this.command.length < cols - COMMAND_START.length\n ? ' '.repeat(cols - this.command.length - COMMAND_START.length)\n : ''}`;\n let startY = 0;\n let cursorIdx = 0;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n if (lineText === commandFirstLine) {\n startY = i;\n cursorIdx +=\n (i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols) -\n COMMAND_START.length;\n break;\n }\n else {\n cursorIdx +=\n i === buffer.baseY + buffer.cursorY ? buffer.cursorX : cols;\n }\n }\n // start line == -1 is the rare case where the command is too long and exceeds the buffer length\n // leading to incomplete command being captured\n return {\n startY,\n startX: COMMAND_START.length,\n endY: startY + (commandText.length - (commandText.length % cols)) / cols,\n endX: commandText.length % cols,\n cursorIdx,\n };\n }\n computeCursorJumpMovement(back) {\n const range = this.getCommandRange();\n let distance = undefined;\n let foundWord = false;\n // scan for the boundary of the closest word to the cursor position\n if (back) {\n for (let i = range.cursorIdx - 1; i > -1; --i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = range.cursorIdx - i - 1;\n break;\n }\n }\n }\n }\n else {\n for (let i = range.cursorIdx + 1; i < this.command.length; ++i) {\n const char = this.command.charAt(i);\n if (char.match(/\\w/)) {\n if (!foundWord) {\n foundWord = true;\n }\n }\n else {\n if (foundWord) {\n distance = i - range.cursorIdx - 1;\n break;\n }\n }\n }\n }\n if (distance === undefined) {\n distance = back ? range.cursorIdx : this.command.length - range.cursorIdx;\n }\n return back ? -distance : distance;\n }\n /**\n * Generate the ANSI escape sequence for new cursor position\n * after being moved by the the number of cells.\n *\n * @param val a number (negative means cursor move leftwards)\n * @param limit whether to limit the movement of the cursor by the command range\n * @returns cursor movement information including the ANSI escape sequence for new cursor position and scroll distance\n */\n computeCursorMovement(val, limit = true) {\n const buffer = this.instance.buffer.active;\n const cols = this.instance.cols;\n const rows = this.instance.rows;\n const range = this.getCommandRange();\n const maxDistance = limit\n ? val < 0\n ? range.cursorIdx\n : this.command.length - range.cursorIdx\n : val;\n const distance = Math.min(Math.abs(val), maxDistance);\n let newCursorX = buffer.cursorX;\n let newCursorY = buffer.cursorY;\n let abs_cursorY = buffer.baseY + buffer.cursorY;\n if (val < 0) {\n // move leftwards\n newCursorX = (cols + ((buffer.cursorX - distance) % cols)) % cols;\n newCursorY =\n buffer.cursorY -\n (distance > buffer.cursorX ? Math.ceil(distance / cols) : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.max(newCursorY, -1);\n }\n else if (val > 0) {\n // move rightwards\n newCursorX = (buffer.cursorX + distance) % cols;\n newCursorY =\n buffer.cursorY +\n (buffer.cursorX + distance >= cols\n ? Math.floor((buffer.cursorX + distance) / cols)\n : 0);\n abs_cursorY = newCursorY + buffer.baseY;\n newCursorY = Math.min(newCursorY, rows - 1);\n }\n const scroll = abs_cursorY > buffer.viewportY + rows\n ? abs_cursorY - (buffer.viewportY + rows)\n : abs_cursorY < buffer.viewportY\n ? abs_cursorY - buffer.viewportY\n : 0;\n return {\n // NOTE: currently, there is a design limitation with programmatically set the cursor using escape sequence\n // by design, the scrollback (everything above the viewport/ybase) is readonly, and most terminals work like this.\n // So for very long command that causes an overflow, one cannot set the cursor position pass the `baseY`\n // this will affect both navigation and delete/backspace behavior\n // See https://github.com/xtermjs/xterm.js/issues/4405\n seq: ANSI_moveCursor(newCursorY + 1, newCursorX + 1),\n scroll,\n };\n }\n /**\n * Write value to command with awareness of the current cursor position\n */\n writeToCommand(val) {\n const range = this.getCommandRange();\n const left = this.command.slice(0, range.cursorIdx);\n const right = this.command.slice(range.cursorIdx);\n const movement = this.computeCursorMovement(val.length, false);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(val +\n right +\n // update the cursor\n movement.seq);\n this.setCommand(left + val + right);\n }\n /**\n * Remove number of characters from command with awareness of the current cursor position\n * NOTE: negative number means backward deleting (i.e. backspace)\n */\n deleteFromCommand(val) {\n const range = this.getCommandRange();\n const maxDistance = val < 0 ? range.cursorIdx : this.command.length - range.cursorIdx;\n const distance = Math.min(Math.abs(val), maxDistance);\n let left;\n let right;\n let cursorMovement;\n if (val === 0) {\n return;\n }\n else if (val < 0) {\n // remove leftwards\n left = this.command.slice(0, range.cursorIdx - distance);\n right = this.command.slice(range.cursorIdx, this.command.length);\n cursorMovement = -distance;\n }\n else {\n // remove rightwards\n left = this.command.slice(0, range.cursorIdx);\n right = this.command.slice(range.cursorIdx + distance, this.command.length);\n cursorMovement = 0;\n }\n const movement = this.computeCursorMovement(cursorMovement);\n this.instance.scrollLines(movement.scroll);\n this.instance.write(\n // reset cursor to start of command, basically here, we're rewriting the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n left +\n right +\n // fill space to erase cells rendered from previous command\n ' '.repeat(distance) +\n // move the cursor as well\n movement.seq);\n this.setCommand(left + right);\n }\n get isSetup() {\n return this.setupState.hasCompleted;\n }\n isFocused() {\n return document.activeElement === this.instance.textarea;\n }\n mount(container) {\n if (!this.setupState.hasCompleted) {\n throw new IllegalStateError(`XTerm terminal has not been set up yet`);\n }\n this.instance.open(container);\n }\n dispose() {\n this.searcher.dispose();\n this.resizer.dispose();\n this.renderer.dispose();\n this.webLinkProvider?.dispose();\n this._TEMPORARY__onKeyListener?.dispose();\n this._TEMPORARY__onDataListener?.dispose();\n this.instance.dispose();\n }\n autoResize() {\n this.resizer.fit();\n }\n focus() {\n this.instance.focus();\n }\n addCommandToHistory(val) {\n // if this is the same as previous command, do not push it to the history stack\n if (val === this.commandHistory.at(0)) {\n return;\n }\n // history command is essentially a stack, so we only insert at the beginning\n this.commandHistory.unshift(val);\n }\n /**\n * This methods help update the current command to a command in history\n * stack, it does the necessary resetting and helps properly update\n * the history navigation index\n */\n setCommandFromHistory(idx) {\n const val = idx === undefined\n ? this.currentCommandSearchString\n : // NOTE: only consider commands starting with the original command\n // also note that empty string naturaly match all history command\n this.commandHistory\n .filter((command) => command.startsWith(this.currentCommandSearchString))\n .at(idx);\n if (val !== undefined) {\n let range = this.getCommandRange();\n this.instance.write(\n // reset cursor to start of command and rewrite the entire command\n ANSI_moveCursor(range.startY + 1, range.startX + 1) +\n val.padEnd(this.command.length));\n this.command = val;\n range = this.getCommandRange();\n this.instance.write(\n // reset cursor to command end\n ANSI_moveCursor(range.endY + 1, range.endX + 1));\n this.commandHistoryNavigationIdx = idx;\n }\n }\n setCommand(val) {\n this.command = val;\n this.currentCommandSearchString = val;\n this.commandHistoryNavigationIdx = undefined;\n }\n newCommand() {\n this.instance.write(DEFAULT_COMMAND_HEADER);\n this.setCommand('');\n }\n newSystemCommand(command) {\n // if another command is already running, we don't need to print the command header anymore\n // the potential pitfall here is that we could have another process prints to the\n // terminal while the command is being run. Nothing much we can do here for now.\n if (!this.isRunningCommand) {\n if (this.command) {\n this.abort();\n this.newCommand();\n }\n this.instance.write(`${DISPLAY_ANSI_ESCAPE.DIM}(system: ${command})\\n${DISPLAY_ANSI_ESCAPE.RESET}`);\n }\n }\n /**\n * Flush the terminal screen completely\n *\n * Probably due to write buffer batching, calling `reset` or `clear` on xterm terminal immediately after\n * write commands will not work. To solve this, we can either promisify the `reset` call or write the ANSI\n * reset sequence \\x1bc\n */\n flushScreen() {\n this.instance.write('\\x1bc');\n this.instance.reset();\n }\n get isFlushed() {\n const buffer = this.instance.buffer.active;\n let isLastLineEmpty = true;\n for (let i = buffer.baseY + buffer.cursorY; i > -1; --i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n const lineText = line.translateToString();\n // skip empty lines\n if (!lineText.trim()) {\n continue;\n }\n else {\n isLastLineEmpty = lineText !== COMMAND_START;\n break;\n }\n }\n return this.command === '' && isLastLineEmpty;\n }\n clear() {\n this.flushScreen();\n this.instance.scrollToTop();\n this.newCommand();\n }\n resetANSIStyling() {\n this.instance.write(DISPLAY_ANSI_ESCAPE.RESET);\n }\n showHelp() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getHelpCommandContent(this.commandRegistry));\n this.abort();\n }\n showCommonANSIEscapeSequences() {\n this.resetANSIStyling();\n this.instance.scrollToBottom();\n if (!this.isFlushed && !this.isRunningCommand) {\n this.abort();\n }\n this.instance.write(getCommonANSIEscapeSequencesForStyling());\n this.abort();\n }\n abort() {\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.newCommand();\n this.instance.scrollToBottom();\n this.isRunningCommand = false;\n }\n fail(error, opts) {\n if (opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n this.instance.write(`\\n${DISPLAY_ANSI_ESCAPE.RED}${error}${DISPLAY_ANSI_ESCAPE.RED}`);\n this.abort();\n }\n output(val, opts) {\n this.resetANSIStyling();\n if ((!opts?.clear || this.preserveLog) && opts?.systemCommand) {\n this.newSystemCommand(opts.systemCommand);\n }\n if (!this.preserveLog && opts?.clear) {\n this.flushScreen();\n }\n else if (this.preserveLog || this.isRunningCommand) {\n this.instance.write('\\n');\n }\n this.instance.write(val);\n this.resetANSIStyling();\n this.instance.write('\\n');\n this.instance.scrollToBottom();\n this.newCommand();\n }\n search(val) {\n this.searcher.findNext(val, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n // do incremental search so that the expansion will be expanded the selection if it\n // still matches the term the user typed.\n incremental: true,\n });\n }\n clearSearch() {\n this.searcher.clearDecorations();\n this.instance.clearSelection();\n this.setSearchText('');\n this.setSearchResultCount(undefined);\n this.setSearchCurrentResultIndex(undefined);\n }\n findPrevious() {\n this.searcher.findPrevious(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n findNext() {\n this.searcher.findNext(this.searchConfig.searchText, {\n decorations: LEGEND_XTERM_SEARCH_THEME,\n regex: this.searchConfig.useRegex,\n wholeWord: this.searchConfig.matchWholeWord,\n caseSensitive: this.searchConfig.matchCaseSensitive,\n });\n }\n getContent() {\n const buffer = this.instance.buffer.active;\n const lines = [];\n for (let i = 0; i < buffer.length; ++i) {\n const line = guaranteeNonNullable(buffer.getLine(i));\n lines.push(line.translateToString());\n }\n return lines.join('\\n').trimEnd();\n }\n copy() {\n if (!this.instance.hasSelection()) {\n this.applicationStore.notificationService.notifyWarning(`Ther terminal has no selection to copy`);\n return;\n }\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.instance.getSelection())\n .catch(this.applicationStore.alertUnhandledError);\n }\n copyAll() {\n this.applicationStore.clipboardService\n .copyTextToClipboard(this.getContent())\n .catch(this.applicationStore.alertUnhandledError);\n }\n}\n//# sourceMappingURL=XTerm.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { XTerm } from './terminal/XTerm.js';\nexport class TerminalService {\n applicationStore;\n terminal;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.terminal = new XTerm(applicationStore);\n }\n}\n//# sourceMappingURL=TerminalService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nconst UNKNOWN_USER_ID = '(unknown)';\nexport class IdentityService {\n applicationStore;\n currentUser = UNKNOWN_USER_ID;\n constructor(applicationStore) {\n makeObservable(this, {\n currentUser: observable,\n setCurrentUser: action,\n });\n this.applicationStore = applicationStore;\n }\n get isAnonymous() {\n return this.currentUser === UNKNOWN_USER_ID;\n }\n setCurrentUser(val) {\n this.currentUser = val;\n }\n}\n//# sourceMappingURL=IdentityService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_COLOR_THEME;\n(function (LEGEND_APPLICATION_COLOR_THEME) {\n LEGEND_APPLICATION_COLOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n LEGEND_APPLICATION_COLOR_THEME[\"LEGACY_LIGHT\"] = \"legacy-light\";\n LEGEND_APPLICATION_COLOR_THEME[\"HIGH_CONTRAST_LIGHT\"] = \"hc-light\";\n})(LEGEND_APPLICATION_COLOR_THEME || (LEGEND_APPLICATION_COLOR_THEME = {}));\nexport const DEFAULT_DARK_COLOR_THEME = {\n name: 'Default Dark (default)',\n key: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n TEMPORARY__globalCSSClassName: 'theme__default-dark',\n colors: {\n 'data-access-overview.chart.access-granted': '#6a9955',\n 'data-access-overview.chart.access-approved': '#007acc',\n 'data-access-overview.chart.access-requested': '#fbbc05',\n 'data-access-overview.chart.access-not-granted': '#ea4646',\n 'data-access-overview.chart.unsupported-access': '#2d2d2d',\n },\n};\nexport const LEGACY_LIGHT_COLOR_THEME = {\n name: 'Legacy Light',\n key: LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__legacy-light',\n};\nexport const HIGH_CONTRAST_LIGHT_COLOR_THEME = {\n name: 'High-Contrast Light',\n key: LEGEND_APPLICATION_COLOR_THEME.HIGH_CONTRAST_LIGHT,\n TEMPORARY__globalCSSClassName: 'theme__hc-light',\n colors: {\n 'data-access-overview.chart.access-granted': '#52a31d',\n 'data-access-overview.chart.access-approved': '#3d8df5',\n 'data-access-overview.chart.access-requested': '#f5c518',\n 'data-access-overview.chart.access-not-granted': '#fa5343',\n 'data-access-overview.chart.unsupported-access': '#e1e7ea',\n },\n};\n//# sourceMappingURL=LegendApplicationColorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nexport class LocalStorage {\n get localStorage() {\n return guaranteeNonNullable(window.localStorage, `'window.localStorage' object is not available in non-web environment`);\n }\n setItem(key, value) {\n this.localStorage.setItem(key, value);\n }\n getItem(key) {\n return this.localStorage.getItem(key);\n }\n removeItem(key) {\n this.localStorage.removeItem(key);\n }\n clear() {\n this.localStorage.clear();\n }\n hasItem(key) {\n return this.localStorage.hasItem(key);\n }\n}\n//# sourceMappingURL=ApplicationStorage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeIsNumber, guaranteeIsString, guaranteeIsBoolean, guaranteeIsObject, isNonNullable, returnUndefOnError, isEmpty, } from '@finos/legend-shared';\nimport { LocalStorage } from './ApplicationStorage.js';\nexport class StorageStore {\n storeIndex;\n storageService;\n data;\n constructor(storageService, storeIndex) {\n this.storageService = storageService;\n this.storeIndex = storeIndex;\n this.data = this.storageService.getIndex(this.storeIndex) ?? {};\n }\n getValue(key) {\n return this.data[key];\n }\n getNumericValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsNumber(value) : undefined;\n }\n getStringValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsString(value) : undefined;\n }\n getBooleanValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsBoolean(value) : undefined;\n }\n getObjectValue(key) {\n const value = this.getValue(key);\n return value !== undefined ? guaranteeIsObject(value) : undefined;\n }\n hasValue(key) {\n return isNonNullable(this.data[key]);\n }\n persistValue(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n }\n else {\n delete this.data[key];\n }\n this.storageService.updateIndex(this.storeIndex, this.data);\n }\n}\nexport class StorageService {\n applicationStore;\n storage;\n data;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new LocalStorage();\n const data = this.storage.getItem(applicationStore.config.applicationStorageKey);\n this.data = data\n ? returnUndefOnError(() => JSON.parse(data)) ?? {}\n : {};\n }\n getIndex(index) {\n return this.data[index];\n }\n updateIndex(index, value) {\n if (isEmpty(value)) {\n delete this.data[index];\n }\n else {\n this.data[index] = value;\n }\n this.storage.setItem(this.applicationStore.config.applicationStorageKey, JSON.stringify(this.data));\n }\n}\n//# sourceMappingURL=StorageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin, } from '@finos/legend-shared';\nexport class TelemetryServicePlugin extends AbstractPlugin {\n userId;\n appName;\n appVersion;\n appEnv;\n appSessionId;\n appStartTime;\n install(pluginManager) {\n pluginManager.registerTelemetryServicePlugin(this);\n }\n setup(config) {\n this.userId = config.userId;\n this.appName = config.appName;\n this.appVersion = config.appVersion;\n this.appEnv = config.appEnv;\n this.appSessionId = config.appSessionId;\n this.appStartTime = config.appStartTime;\n }\n}\nexport class TelemetryService {\n applicationStore;\n plugins = [];\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n registerPlugins(plugins) {\n this.plugins = plugins;\n }\n setup() {\n const config = {\n userId: this.applicationStore.identityService.currentUser,\n appName: this.applicationStore.config.appName,\n appEnv: this.applicationStore.config.env,\n appVersion: this.applicationStore.config.appVersion,\n appSessionId: this.applicationStore.uuid,\n appStartTime: this.applicationStore.timeService.timestamp,\n };\n this.plugins.forEach((plugin) => plugin.setup(config));\n }\n logEvent(eventType, data) {\n this.plugins.forEach((plugin) => plugin.logEvent(eventType, data));\n }\n}\n//# sourceMappingURL=TelemetryService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class TimeService {\n timestamp = Date.now();\n /**\n * Record the instances where the application usage is interrupted (e.g. when the app window/tab is not in focus),\n * this is useful to know since for certain platform, background contexts are de-prioritized, given less resources,\n * and hence, would run less performantly.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API#policies_in_place_to_aid_background_page_performance\n * See https://plumbr.io/blog/performance-blog/background-tabs-in-browser-load-20-times-slower\n *\n * This impacts certain operations such as scheduler and timer in the app, so it's useful to keep track of these here.\n */\n interruptions = [];\n recordUsageInterruption() {\n this.interruptions.push(Date.now());\n }\n finalizeTimingsRecord(stopWatch, timings) {\n const totalTime = stopWatch.elapsed;\n const startTime = stopWatch.startTime;\n const endTime = startTime + totalTime;\n const record = {\n ...(timings ?? {}),\n ...Object.fromEntries(stopWatch.records),\n total: totalTime,\n };\n // count the number of interruptions\n let numberOfInteruptions = 0;\n for (const interruption of this.interruptions) {\n if (interruption >= startTime && interruption <= endTime) {\n numberOfInteruptions++;\n }\n else if (interruption > endTime) {\n break;\n }\n }\n return numberOfInteruptions > 0\n ? { ...record, __numberOfInteruptions: numberOfInteruptions }\n : record;\n }\n}\n//# sourceMappingURL=TimeService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LEGEND_APPLICATION_COLOR_THEME } from './LegendApplicationColorTheme.js';\nexport var LEGEND_APPLICATION_SETTING_KEY;\n(function (LEGEND_APPLICATION_SETTING_KEY) {\n LEGEND_APPLICATION_SETTING_KEY[\"COLOR_THEME\"] = \"application.layout.colorTheme\";\n})(LEGEND_APPLICATION_SETTING_KEY || (LEGEND_APPLICATION_SETTING_KEY = {}));\nexport const LEGEND_APPLICATION_SETTING_CONFIG = {\n [LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME]: {\n defaultValue: LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK,\n },\n};\n//# sourceMappingURL=LegendApplicationSetting.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { LEGEND_APPLICATION_SETTING_KEY } from '../__lib__/LegendApplicationSetting.js';\nimport { LogEvent, guaranteeNonNullable } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DEFAULT_DARK_COLOR_THEME, LEGEND_APPLICATION_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nexport class LayoutService {\n applicationStore;\n // backdrop\n backdropContainerElementID;\n showBackdrop = false;\n // color theme\n colorThemeRegistry = new Map();\n currentColorTheme;\n constructor(applicationStore) {\n makeObservable(this, {\n currentColorTheme: observable.ref,\n TEMPORARY__isLightColorThemeEnabled: computed,\n backdropContainerElementID: observable,\n showBackdrop: observable,\n setBackdropContainerElementID: action,\n setShowBackdrop: action,\n setColorTheme: action,\n });\n this.applicationStore = applicationStore;\n // register core color themes\n // TODO: we might want to cover at least: a dark theme, a light theme, and a high contrast theme (etc.)\n // as part of core\n this.colorThemeRegistry.set(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, DEFAULT_DARK_COLOR_THEME);\n // register color themes from extensions\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraColorThemes?.() ?? [])\n .forEach((colorTheme) => {\n // NOTE: in the future, when we need to make theme extensible, we might want to reconsider this decision here\n // perhaps, each extension can define a new set of color keys that each theme supports and the core theme is extensible\n // while non-core themes are left in a separate package/module and might/might not have support for those color keys\n if (this.colorThemeRegistry.has(colorTheme.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.COLOR_THEME_CONFIGURATION_CHECK__FAILURE), `Found duplicated color themes with key '${colorTheme.key}'`);\n return;\n }\n this.colorThemeRegistry.set(colorTheme.key, colorTheme);\n });\n const themeKey = this.applicationStore.settingService.getStringValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME) ?? LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK;\n this.currentColorTheme = guaranteeNonNullable(this.colorThemeRegistry.get(themeKey));\n this.TEMPORARY__syncGlobalCSSClassName(this.currentColorTheme, undefined);\n }\n getElementByID(val) {\n return document.querySelector(`[data-elementid='${val}']`) ?? undefined;\n }\n /**\n * Change the ID used to find the base element to mount the backdrop on.\n * This is useful when we want to use backdrop with embedded application which\n * requires its own backdrop usage.\n *\n * TODO?: we can consider making backdrop container component auto-register its ID\n * as it gets rendered in the application\n */\n setBackdropContainerElementID(val) {\n this.backdropContainerElementID = val;\n }\n setShowBackdrop(val) {\n this.showBackdrop = val;\n }\n /**\n * NOTE: this is the poor man way of doing theming as we only properly support dark color theme\n * This flag is binary because we did light color theme in rush\n *\n * See https://github.com/finos/legend-studio/issues/264\n */\n get TEMPORARY__isLightColorThemeEnabled() {\n return (this.currentColorTheme.key !== LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK);\n }\n TEMPORARY__syncGlobalCSSClassName(theme, previousTheme) {\n if (previousTheme) {\n document.body.classList.remove(previousTheme.TEMPORARY__globalCSSClassName);\n }\n document.body.classList.add(theme.TEMPORARY__globalCSSClassName);\n }\n setColorTheme(key, options) {\n const newColorTheme = this.colorThemeRegistry.get(key);\n if (key === this.currentColorTheme.key || !newColorTheme) {\n return;\n }\n const previousColorTheme = this.currentColorTheme;\n this.currentColorTheme = newColorTheme;\n this.TEMPORARY__syncGlobalCSSClassName(newColorTheme, previousColorTheme);\n if (options?.persist) {\n this.applicationStore.settingService.persistValue(LEGEND_APPLICATION_SETTING_KEY.COLOR_THEME, key);\n }\n }\n getColor(key) {\n return (this.currentColorTheme.colors?.[key] ??\n guaranteeNonNullable(this.colorThemeRegistry.get(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK)).colors?.[key] ??\n 'transparent');\n }\n}\n//# sourceMappingURL=LayoutService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ClipboardService {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async copyTextToClipboard(text, options) {\n // This is a much cleaner way which requires HTTPS\n // See https://developers.google.com/web/updates/2018/03/clipboardapi\n await navigator.clipboard\n .writeText(text)\n .catch((error) => {\n this.applicationStore.notificationService.notifyError(error);\n })\n .finally(() => {\n if (options?.notifySuccessMessage) {\n this.applicationStore.notificationService.notifySuccess(options.notifySuccessMessage);\n }\n });\n }\n}\n//# sourceMappingURL=ClipboardService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const NAVIGATION_ZONE_SEPARATOR = '.';\nexport const NAVIGATION_ZONE_PREFIX = '#';\nexport class NavigationService {\n navigator;\n constructor(navigator) {\n this.navigator = navigator;\n }\n}\n//# sourceMappingURL=NavigationService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { deepEqual, isBoolean, isNumber, isObject, isString, LogEvent, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { StorageStore } from './storage/StorageService.js';\nexport const collectSettingConfigurationEntriesFromConfig = (data) => Object.entries(data).map((entry) => ({\n key: entry[0],\n ...entry[1],\n}));\nconst APPLICATION_SETTING_STORAGE_KEY = 'application-settings-storage';\nexport class SettingService {\n applicationStore;\n storage;\n registry = new Map();\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_SETTING_STORAGE_KEY);\n this.applicationStore.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraSettingConfigurationEntries?.() ?? [])\n .forEach((entry) => {\n if (this.registry.has(entry.key)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_CONFIGURATION_CHECK__FAILURE), `Found duplicated setting with key '${entry.key}'`);\n return;\n }\n // TODO: do validation check here\n // See https://github.com/finos/legend-studio/issues/407\n this.registry.set(entry.key, entry);\n });\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve numeric value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve string value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve boolean value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key) ?? this.registry.get(key)?.defaultValue;\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.SETTING_RETRIVE_FAILURE), `Can't retrieve object value for setting '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n const defaultValue = this.registry.get(key)?.defaultValue;\n this.storage.persistValue(key, \n // NOTE: if the value equals to default value, the value will be unset instead\n defaultValue !== undefined && deepEqual(defaultValue, value)\n ? undefined\n : value);\n }\n}\n//# sourceMappingURL=SettingService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { UnsupportedOperationError } from '@finos/legend-shared';\nimport {} from './NavigationService.js';\nexport class DefaultNavigator {\n goToLocation(location, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n reload(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n goToAddress(address, options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n visitAddress(address) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n generateAddress(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentLocation(location) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n updateCurrentZone(zone) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n resetZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentBaseAddress(options) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentAddress() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameters() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentLocationParameterValue(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n getCurrentZone() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n unblockNavigation() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n get isNavigationBlocked() {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n INTERNAL__internalizeTransientParameter(key) {\n throw new UnsupportedOperationError(`Navigator does not support this operation`);\n }\n}\n//# sourceMappingURL=DefaultNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LogEvent, isBoolean, isNumber, isObject, isString, } from '@finos/legend-shared';\nimport { StorageStore } from './storage/StorageService.js';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nconst APPLICATION_USER_DATA_STORAGE_KEY = 'application-user-data-storage';\nexport class UserDataService {\n applicationStore;\n storage;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.storage = new StorageStore(this.applicationStore.storageService, APPLICATION_USER_DATA_STORAGE_KEY);\n }\n getNumericValue(key) {\n const value = this.storage.getValue(key);\n if (!isNumber(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve numeric value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getStringValue(key) {\n const value = this.storage.getValue(key);\n if (!isString(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve string value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getBooleanValue(key) {\n const value = this.storage.getValue(key);\n if (!isBoolean(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve boolean value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n getObjectValue(key) {\n const value = this.storage.getValue(key);\n if (!isObject(value)) {\n this.applicationStore.logService.warn(LogEvent.create(APPLICATION_EVENT.USER_DATA_RETRIEVE_FAILURE), `Can't retrieve object value for user data '${key}'`);\n return undefined;\n }\n return value;\n }\n persistValue(key, value) {\n this.storage.persistValue(key, value);\n }\n}\n//# sourceMappingURL=UserDataService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compare SemVer versions.\n *\n * NOTE: SemVer could have been the perfect library to use here but we can't use it since it's meant for `Node` only\n * `compare-versions` works for browser but seems way overkill, especially when the version format is very\n * standard, i.e. `x.y.z`, no prerelease, etc.\n * As such, we can use the lean comparison algo using `localeCompare` with numeric settings\n *\n * See https://stackoverflow.com/questions/55466274/simplify-semver-version-compare-logic/55466325#55466325\n * See omichelsen/compare-versions#45\n */\nexport const compareSemVerVersions = (val1, val2) => \n// TODO: verify if the version match certain patterns\nval1.localeCompare(val2, undefined, { numeric: true });\n// regex to validate semver: https://github.com/semver/semver/issues/232\nexport const isSemVer = (val) => /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)(?:-(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\\+[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*)?$/.test(val);\n//# sourceMappingURL=StringCompareUtil.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { compareSemVerVersions, guaranteeNonEmptyString, isSemVer, } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport var RELEASE_UPDATE_TYPE;\n(function (RELEASE_UPDATE_TYPE) {\n RELEASE_UPDATE_TYPE[\"BUG_FIX\"] = \"BUG_FIX\";\n RELEASE_UPDATE_TYPE[\"ENHANCEMENT\"] = \"ENHANCEMENT\";\n})(RELEASE_UPDATE_TYPE || (RELEASE_UPDATE_TYPE = {}));\nexport const collectReleaseNotes = (releaseNotes) => releaseNotes.map((release) => {\n guaranteeNonEmptyString(release.version, \"Release notes 'version' is missing\");\n release.notes?.map((note) => {\n guaranteeNonEmptyString(note.type, \"Release note 'type' is missing\");\n guaranteeNonEmptyString(note.description, \"Release note 'description' is missing\");\n return note;\n });\n return release;\n});\nexport const APPLICATION_LAST_OPENED_VERSION = 'application.lastOpenedVersion';\nexport class ReleaseNotesService {\n applicationStore;\n releaseNotes;\n showCurrentReleaseModal = true;\n showReleaseLog = false;\n isConfigured = false;\n constructor(applicationStore) {\n makeObservable(this, {\n showCurrentReleaseModal: observable,\n showReleaseLog: observable,\n isConfigured: observable,\n setShowCurrentRelease: action,\n configure: action,\n setReleaseLog: action,\n });\n this.applicationStore = applicationStore;\n }\n configure(releaseNotes) {\n this.isConfigured = true;\n this.releaseNotes = collectReleaseNotes(releaseNotes);\n }\n setShowCurrentRelease(val) {\n this.showCurrentReleaseModal = val;\n }\n setReleaseLog(val) {\n this.showReleaseLog = val;\n }\n getViewedVersion() {\n return this.applicationStore.userDataService.getStringValue(APPLICATION_LAST_OPENED_VERSION);\n }\n updateViewedVersion() {\n this.applicationStore.userDataService.persistValue(APPLICATION_LAST_OPENED_VERSION, this.applicationStore.config.appVersion);\n }\n showVersion(versionNotes, lastOpenedVersion) {\n const version = versionNotes.version;\n if (isSemVer(version) && isSemVer(lastOpenedVersion)) {\n if (compareSemVerVersions(version, lastOpenedVersion) === 1) {\n return true;\n }\n }\n return false;\n }\n showableVersions() {\n const lastOpenedVersion = this.getViewedVersion();\n if (!lastOpenedVersion) {\n // TODO: change after release\n // return undefined;\n return this.releaseNotes;\n }\n return this.releaseNotes?.filter((val) => this.showVersion(val, lastOpenedVersion));\n }\n}\n//# sourceMappingURL=ReleaseNotesService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TracerService, LogService, LogEvent, uuid, ActionState, assertErrorThrown, IllegalStateError, isNonNullable, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { DocumentationService } from './DocumentationService.js';\nimport { AssistantService } from './AssistantService.js';\nimport { EventService } from './event/EventService.js';\nimport { ApplicationNavigationContextService } from './ApplicationNavigationContextService.js';\nimport { CommandService } from './CommandService.js';\nimport { KeyboardShortcutsService } from './KeyboardShortcutsService.js';\nimport { TerminalService } from './TerminalService.js';\nimport { AlertService } from './AlertService.js';\nimport { NotificationService } from './NotificationService.js';\nimport { IdentityService } from './IdentityService.js';\nimport { StorageService } from './storage/StorageService.js';\nimport { TelemetryService } from './TelemetryService.js';\nimport { TimeService } from './TimeService.js';\nimport { LayoutService } from './LayoutService.js';\nimport { ClipboardService } from './ClipboardService.js';\nimport { NavigationService } from './navigation/NavigationService.js';\nimport { SettingService } from './SettingService.js';\nimport { DefaultNavigator } from './navigation/DefaultNavigator.js';\nimport { UserDataService } from './UserDataService.js';\nimport { ReleaseNotesService } from './ReleaseNotesService.js';\nexport class ApplicationExtensionState {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n}\nexport class ApplicationStore {\n uuid = uuid();\n /**\n * This is a mechanism to have the store holds references to extension states\n * so that we can refer back to these states when needed or do cross-extensions\n * operations\n */\n extensionStates = [];\n config;\n pluginManager;\n initState = ActionState.create();\n platform;\n // core\n timeService;\n logService;\n storageService;\n userDataService;\n settingService;\n alertService;\n notificationService;\n identityService;\n commandService;\n keyboardShortcutsService;\n layoutService;\n clipboardService;\n terminalService;\n navigationService;\n navigationContextService;\n // support\n documentationService;\n assistantService;\n // release\n releaseNotesService;\n // event\n eventService;\n telemetryService;\n tracerService;\n constructor(config, pluginManager) {\n this.config = config;\n this.pluginManager = pluginManager;\n this.timeService = new TimeService();\n // NOTE: set the logger first so other loading could use the configured logger\n this.logService = new LogService();\n this.logService.registerPlugins(pluginManager.getLoggerPlugins());\n this.storageService = new StorageService(this);\n this.settingService = new SettingService(this);\n this.userDataService = new UserDataService(this);\n this.alertService = new AlertService(this);\n this.notificationService = new NotificationService();\n this.identityService = new IdentityService(this);\n this.layoutService = new LayoutService(this);\n this.clipboardService = new ClipboardService(this);\n this.terminalService = new TerminalService(this);\n this.commandService = new CommandService(this);\n this.keyboardShortcutsService = new KeyboardShortcutsService(this);\n this.navigationService = new NavigationService(new DefaultNavigator());\n this.navigationContextService = new ApplicationNavigationContextService(this);\n this.documentationService = new DocumentationService(this);\n this.assistantService = new AssistantService(this);\n this.releaseNotesService = new ReleaseNotesService(this);\n this.eventService = new EventService();\n this.eventService.registerEventNotifierPlugins(pluginManager.getEventNotifierPlugins());\n this.telemetryService = new TelemetryService(this);\n this.telemetryService.registerPlugins(pluginManager.getTelemetryServicePlugins());\n this.telemetryService.setup();\n this.tracerService = new TracerService();\n this.tracerService.registerPlugins(pluginManager.getTracerServicePlugins());\n // extensions\n this.extensionStates = this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationExtensionStateBuilders?.() ?? [])\n .map((creator) => creator(this))\n .filter(isNonNullable);\n }\n async initialize(platform) {\n if (!this.initState.isInInitialState) {\n this.notificationService.notifyIllegalState('Application store is re-initialized');\n return;\n }\n this.initState.inProgress();\n try {\n if (this.platform) {\n throw new IllegalStateError(`Platform is already configured`);\n }\n this.platform = platform;\n this.navigationService =\n new NavigationService(platform.getNavigator());\n await platform.initialize();\n this.initState.pass();\n }\n catch (error) {\n assertErrorThrown(error);\n this.notificationService.notifyError(error);\n this.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n this.initState.fail();\n }\n }\n /**\n * When we call store/state functions from the component, we should handle error thrown at these functions instead\n * of throwing them to the UI. This enforces that by throwing `IllegalStateError`\n */\n alertUnhandledError = (error) => {\n this.logService.error(LogEvent.create(APPLICATION_EVENT.ILLEGAL_APPLICATION_STATE_OCCURRED), 'Encountered unhandled error in component tree', error);\n this.notificationService.notifyIllegalState(error.message);\n };\n /**\n * Guarantee that the action being used by the component does not throw unhandled errors\n */\n guardUnhandledError = (actionFn) => () => {\n actionFn().catch(this.alertUnhandledError);\n };\n}\n//# sourceMappingURL=ApplicationStore.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { downloadFileUsingDataURI, guaranteeNonNullable, } from '@finos/legend-shared';\nvar DOWNLOAD_EVENTS;\n(function (DOWNLOAD_EVENTS) {\n DOWNLOAD_EVENTS[\"TAG_REQUEST\"] = \"download-request\";\n DOWNLOAD_EVENTS[\"TAG_RESPONSE\"] = \"download-response\";\n DOWNLOAD_EVENTS[\"STREAM_CLOSED\"] = \"#stream-closed\";\n DOWNLOAD_EVENTS[\"STREAM_ABORTED\"] = \"#stream-aborted\";\n})(DOWNLOAD_EVENTS || (DOWNLOAD_EVENTS = {}));\nfunction createWritableStreamFromMessageChannel(channel) {\n return new WritableStream({\n write(chunk) {\n channel.port1.postMessage(chunk);\n },\n close() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_CLOSED);\n },\n abort() {\n channel.port1.postMessage(DOWNLOAD_EVENTS.STREAM_ABORTED);\n closeMessagePort(channel.port1);\n closeMessagePort(channel.port2);\n },\n });\n}\nfunction closeMessagePort(port) {\n port.onmessage = null;\n port.close();\n}\nasync function getServiceWorker() {\n if (!('serviceWorker' in navigator)) {\n return Promise.reject(new Error('Service worker is not available. Service Worker requires HTTPS protocol'));\n }\n return navigator.serviceWorker\n .getRegistration()\n .then((workerRegistration) => {\n if (workerRegistration === undefined) {\n return undefined;\n }\n const pending = workerRegistration.installing ?? workerRegistration.waiting;\n return (workerRegistration.active ??\n new Promise((resolve) => {\n // if not activated, add listener to waiting or installing registration\n const listener = () => {\n if (pending?.state === 'activated') {\n pending.removeEventListener('statechange', listener);\n resolve(workerRegistration.active ?? undefined);\n }\n };\n pending?.addEventListener('statechange', listener);\n }));\n });\n}\nfunction createDownloadRequest(filename) {\n const PREFIX = 6;\n const prefix = String(Math.random()).slice(-PREFIX);\n const url = new URL(`${prefix}/${filename}`, window.location.href).toString();\n return { tag: DOWNLOAD_EVENTS.TAG_REQUEST, filename, url };\n}\nfunction handleServiceWorkerDownloadResponse(event) {\n const data = event.data;\n if (data?.tag === DOWNLOAD_EVENTS.TAG_RESPONSE && data.downloadUrl.length) {\n openInIframe(data.downloadUrl);\n }\n}\nfunction openInIframe(src) {\n const iframe = document.createElement('iframe');\n iframe.hidden = true;\n iframe.src = src;\n document.body.appendChild(iframe);\n return iframe;\n}\nexport async function downloadStream(response, filename, contentType) {\n const responseBody = guaranteeNonNullable(response.body);\n // creates communication channel with service worker with response handler\n const channel = new MessageChannel();\n channel.port1.onmessage = handleServiceWorkerDownloadResponse;\n // grabs service worker and handles it download along with response channel port\n const serviceWorker = await getServiceWorker();\n if (!serviceWorker) {\n // TODO: remove once service worker workflow is tested\n const text = await response.text();\n // eslint-disable-next-line no-console\n console.debug('service worker not found. Using in memory file download');\n downloadFileUsingDataURI(filename, text, contentType);\n return;\n }\n // eslint-disable-next-line no-console\n console.debug('Service worker found. Continuing download');\n const downloadRequest = createDownloadRequest(filename);\n serviceWorker.postMessage(downloadRequest, [channel.port2]);\n // creates new data stream over communication channel and pipes given stream in it\n responseBody\n .pipeTo(createWritableStreamFromMessageChannel(channel))\n .then(() => {\n // TODO: trace success\n })\n .catch(() => {\n // TODO: fail\n });\n}\nexport function registerDownloadHelperServiceWorker(workerPath) {\n if ('serviceWorker' in navigator) {\n const path = workerPath ?? '/ServiceWorker.js';\n navigator.serviceWorker\n .register(path)\n .then((reg) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker success with path: ${path}`, reg);\n })\n .catch((error) => {\n // TODO: add trace\n // eslint-disable-next-line no-console\n console.debug(`register service worker error with path: ${path}`, error);\n });\n }\n}\n//# sourceMappingURL=DownloadHelperServiceWorker.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, createRegExpPatternFromWildcardPattern, } from '@finos/legend-shared';\nimport { APPLICATION_EVENT } from '../__lib__/LegendApplicationEvent.js';\nimport { collectKeyedDocumentationEntriesFromConfig, } from '../stores/DocumentationService.js';\nimport { ApplicationStore, } from '../stores/ApplicationStore.js';\nimport { registerDownloadHelperServiceWorker } from '../util/DownloadHelperServiceWorker.js';\nexport class LegendApplicationLogger {\n}\nexport class LegendApplicationWebConsole extends LegendApplicationLogger {\n debug(event, ...data) {\n // eslint-disable-next-line no-console\n console.debug(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n info(event, ...data) {\n // eslint-disable-next-line no-console\n console.info(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n warn(event, ...data) {\n // eslint-disable-next-line no-console\n console.warn(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n error(event, ...data) {\n // eslint-disable-next-line no-console\n console.error(`[${event.timestamp}] ${event.name} ${data.length ? ':' : ''}`, ...data);\n }\n}\nexport class LegendApplication {\n config;\n logger;\n pluginManager;\n basePresets = [];\n basePlugins = [];\n baseAddress;\n pluginRegister;\n _isConfigured = false;\n downloadHelperServiceWorkerPath;\n downloadHelper = false;\n releaseNotes;\n constructor(pluginManager) {\n this.pluginManager = pluginManager;\n this.logger = new LegendApplicationWebConsole();\n }\n setup(options) {\n this.baseAddress = guaranteeNonEmptyString(options.baseAddress, `Can't setup application: 'baseAddress' is missing or empty`);\n this.pluginRegister = options.pluginRegister;\n this._isConfigured = true;\n return this;\n }\n withBasePresets(presets) {\n this.basePresets = presets;\n return this.withPresets([]); // this will reset the preset list and prepend with base presets\n }\n withBasePlugins(plugins) {\n this.basePlugins = plugins;\n return this.withPlugins([]); // this will reset the plugin list and prepend with base plugins\n }\n withPresets(presets) {\n this.pluginManager.usePresets([...this.basePresets, ...presets]);\n return this;\n }\n withPlugins(plugins) {\n this.pluginManager.usePlugins([...this.basePlugins, ...plugins]);\n return this;\n }\n withDownloadHelper(path) {\n this.downloadHelper = true;\n this.downloadHelperServiceWorkerPath = path;\n return this;\n }\n withReleaseNotes(releaseNotes) {\n this.releaseNotes = releaseNotes;\n return this;\n }\n setupApplicationStore(store) {\n if (this.releaseNotes) {\n store.releaseNotesService.configure(this.releaseNotes);\n }\n }\n async fetchApplicationConfiguration(baseUrl) {\n const client = new NetworkClient();\n // app config\n let configData;\n try {\n configData = await client.get(`${window.location.origin}${baseUrl}config.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(configData, `Can't fetch Legend application configuration`);\n // app version\n let versionData;\n try {\n versionData = await client.get(`${window.location.origin}${baseUrl}version.json`);\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_CONFIGURATION__FAILURE), error);\n }\n assertNonNullable(versionData, `Can't fetch Legend application version`);\n return [\n await this.configureApplication({\n configData,\n versionData,\n baseAddress: baseUrl,\n }),\n configData.extensions ?? {},\n ];\n }\n async loadDocumentationRegistryData(config) {\n const entries = {};\n await Promise.all([\n ...config.documentationRegistryEntries,\n ...this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraDocumentationRegistryEntries?.() ?? []),\n ].map(async (entry) => {\n try {\n const client = new NetworkClient(entry.simple\n ? {\n /**\n * NOTE: see the documentation for `simple` flag {@link DocumentationRegistryEntry}\n * here, basically, we expect to fetch just the JSON from an endpoint where `Access-Control-Allow-Origin\", \"*\"` is set\n * as such, we must not include the credential in our request\n * See https://stackoverflow.com/questions/19743396/cors-cannot-use-wildcard-in-access-control-allow-origin-when-credentials-flag-i\n */\n options: {\n credentials: 'omit',\n },\n }\n : {});\n const docData = await client.get(guaranteeNonEmptyString(entry.url, `Can't load documentation registry: 'url' field is missing or empty`));\n assertNonNullable(docData.entries, `Can't load documentation registry data: 'entries' field is missing`);\n const patterns = entry.includes?.map((filter) => createRegExpPatternFromWildcardPattern(filter));\n Object.entries(docData.entries).forEach(([key, docEntry]) => {\n if (!patterns || patterns.some((pattern) => pattern.test(key))) {\n // NOTE: entries will NOT override\n if (!entries[key]) {\n entries[key] = docEntry;\n }\n }\n });\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.warn(LogEvent.create(APPLICATION_EVENT.DOCUMENTATION_FETCH__FAILURE), error);\n }\n }));\n // NOTE: config entries will override\n config.keyedDocumentationEntries = [\n ...collectKeyedDocumentationEntriesFromConfig(entries),\n ...config.keyedDocumentationEntries,\n ];\n }\n async start() {\n assertNonNullable(this._isConfigured, 'Legend application has not been configured properly. Make sure to run setup() before start()');\n try {\n // fetch application config\n const [config, extensionConfigData] = await this.fetchApplicationConfiguration(this.baseAddress);\n this.config = config;\n // setup plugins\n this.pluginRegister?.(this.pluginManager, this.config);\n this.pluginManager.configure(extensionConfigData);\n this.pluginManager.install();\n // other setups\n await Promise.all(\n // NOTE: to be done in parallel to save time\n [this.loadDocumentationRegistryData(config)]);\n // setup application store\n const applicationStore = new ApplicationStore(this.config, this.pluginManager);\n await Promise.all(this.pluginManager\n .getApplicationPlugins()\n .flatMap((plugin) => plugin.getExtraApplicationSetups?.() ?? [])\n .map((setup) => setup(applicationStore)));\n // set up application\n this.setupApplicationStore(applicationStore);\n // load application\n await this.loadApplication(applicationStore);\n this.logger.info(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__SUCCESS), 'Legend application loaded');\n if (this.downloadHelper) {\n registerDownloadHelperServiceWorker(this.downloadHelperServiceWorkerPath);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), 'Failed to load Legend application');\n throw error;\n }\n }\n}\nexport const LEGEND_APPLICATION_ROOT_ELEMENT_TAG = 'legend-application-root';\n// NOTE: we use a special tag to mount the application to avoid styling conflicts\nexport const getApplicationRootElement = () => {\n let rootEl = document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG).length\n ? document.getElementsByTagName(LEGEND_APPLICATION_ROOT_ELEMENT_TAG)[0]\n : undefined;\n if (!rootEl) {\n rootEl = document.createElement(LEGEND_APPLICATION_ROOT_ELEMENT_TAG);\n document.body.appendChild(rootEl);\n }\n rootEl.setAttribute('style', 'height: 100%; width: 100%; display: block');\n return rootEl;\n};\n//# sourceMappingURL=LegendApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const createRegExpPatternFromWildcardPattern = (value) => new RegExp(\n// trim and add start/end regexp to make sure the wildcard pattern must be a full match\n`^${value\n .trim()\n // escape special characters except for wilcard *\n .replace(/[\\^$\\\\.+?()[\\]{}|]/g, '\\\\$&')\n // translate wildcard * to .*\n .replace(/\\*/g, '.*')}$`);\n//# sourceMappingURL=MatcherUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { uuid } from '../CommonUtils.js';\nexport class PluginInfo {\n name;\n version;\n signature;\n uuid;\n}\nexport class AbstractPlugin {\n name;\n version;\n uuid = uuid();\n constructor(name, version) {\n this.name = name;\n this.version = version;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getInfo() {\n const info = new PluginInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n return info;\n }\n configure(configData) {\n return this;\n }\n}\nexport class PresetInfo {\n name;\n version;\n signature;\n uuid;\n plugins = [];\n}\nexport class AbstractPreset {\n name;\n version;\n uuid = uuid();\n plugins = [];\n constructor(name, version, plugins) {\n this.name = name;\n this.version = version;\n this.plugins = plugins;\n }\n getName() {\n return this.name;\n }\n getVersion() {\n return this.version;\n }\n getSignature() {\n return `${this.getName()}@${this.getVersion()}`;\n }\n getUUID() {\n return this.uuid;\n }\n getPlugins() {\n return [...this.plugins];\n }\n getInfo() {\n const info = new PresetInfo();\n info.name = this.getName();\n info.version = this.getVersion();\n info.signature = this.getSignature();\n info.uuid = this.getUUID();\n info.plugins = this.plugins\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name));\n return info;\n }\n configure(configData) {\n return this;\n }\n install(pluginManager) {\n this.plugins.forEach((plugin) => plugin.install(pluginManager));\n }\n}\nexport class AbstractPluginManager {\n plugins = [];\n presets = [];\n usePlugins(plugins) {\n this.plugins = plugins;\n return this;\n }\n usePresets(presets) {\n this.presets = presets;\n return this;\n }\n configure(configData) {\n Object.keys(configData).forEach((key) => {\n const configObj = configData[key];\n this.presets.forEach((preset) => {\n if (preset.getName() === key) {\n preset.configure(configObj);\n }\n });\n this.plugins.forEach((plugin) => {\n if (plugin.getName() === key) {\n plugin.configure(configObj);\n }\n });\n });\n }\n install() {\n // Plugins run before presets\n // Plugins ordering is first to last\n this.plugins.forEach((plugin) => plugin.install(this));\n // Presets ordering is first to last\n this.presets.forEach((plugin) => plugin.install(this));\n }\n getInfo() {\n return {\n plugins: this.plugins\n .filter((plugin) => !this.getHiddenPluginNames().includes(plugin.getName()))\n .map((plugin) => plugin.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n presets: this.presets\n .filter((preset) => !this.getHiddenPresetNames().includes(preset.getName()))\n .map((preset) => preset.getInfo())\n .sort((a, b) => a.name.localeCompare(b.name)),\n };\n }\n /**\n * Return the list of core plugin names to be hidden\n * when getting plugin manager info, such as core plugins.\n */\n getHiddenPluginNames() {\n return [];\n }\n /**\n * Return the list of core presets names to be hidden\n * when getting plugin manager info, such as core presets.\n */\n getHiddenPresetNames() {\n return [];\n }\n}\n//# sourceMappingURL=AbstractPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPlugin } from '@finos/legend-shared';\nexport class LegendApplicationPlugin extends AbstractPlugin {\n}\n//# sourceMappingURL=LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' assert { type: 'json' };\nimport { LEGEND_APPLICATION_SETTING_CONFIG } from '../__lib__/LegendApplicationSetting.js';\nimport { HIGH_CONTRAST_LIGHT_COLOR_THEME, LEGACY_LIGHT_COLOR_THEME, } from '../__lib__/LegendApplicationColorTheme.js';\nimport { LegendApplicationPlugin, } from './LegendApplicationPlugin.js';\nimport { collectSettingConfigurationEntriesFromConfig, } from './SettingService.js';\nimport { configure as configureMobx } from 'mobx';\nimport { configureComponents } from '@finos/legend-art';\nexport class Core_LegendApplicationPlugin extends LegendApplicationPlugin {\n static NAME = packageJson.extensions.applicationPlugin;\n constructor() {\n super(Core_LegendApplicationPlugin.NAME, packageJson.version);\n }\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n // configure `mobx`\n configureMobx({\n // Force state modification to be done via actions\n // Otherwise, warning will be shown in development mode\n // However, no warning will shown in production mode\n // See https://mobx.js.org/configuration.html#enforceactions\n enforceActions: 'observed',\n });\n // configure UI components\n configureComponents();\n },\n ];\n }\n getExtraColorThemes() {\n return [LEGACY_LIGHT_COLOR_THEME, HIGH_CONTRAST_LIGHT_COLOR_THEME];\n }\n getExtraSettingConfigurationEntries() {\n return collectSettingConfigurationEntriesFromConfig(LEGEND_APPLICATION_SETTING_CONFIG);\n }\n}\n//# sourceMappingURL=Core_LegendApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonEmptyString, guaranteeNonNullable, URL_SEPARATOR, } from '@finos/legend-shared';\nimport { collectKeyedDocumentationEntriesFromConfig, collectContextualDocumentationEntries, collectDocumentationLinkEntryFromConfig, } from '../stores/DocumentationService.js';\nexport class LegendApplicationConfig {\n appName;\n baseAddress;\n env;\n applicationStorageKey;\n // documentation\n documentationUrl;\n documentationLinkEntries = [];\n documentationRegistryEntries = [];\n keyedDocumentationEntries = [];\n contextualDocEntries = [];\n // version\n appVersion;\n appVersionBuildTime;\n appVersionCommitId;\n constructor(input) {\n this.baseAddress = input.baseAddress;\n this.appName = guaranteeNonEmptyString(input.configData.appName, `Can't configure application: 'appName' field is missing or empty`);\n this.env = guaranteeNonEmptyString(input.configData.env, `Can't configure application: 'env' field is missing or empty`);\n this.applicationStorageKey =\n input.configData.application?.storageKey ??\n this.getDefaultApplicationStorageKey();\n // Documentation\n this.documentationUrl = input.configData.documentation?.url;\n this.documentationLinkEntries = collectDocumentationLinkEntryFromConfig(input.configData.documentation?.links ?? {});\n this.documentationRegistryEntries =\n input.configData.documentation?.registry ?? [];\n this.keyedDocumentationEntries = collectKeyedDocumentationEntriesFromConfig(input.configData.documentation?.entries ?? {});\n this.contextualDocEntries = collectContextualDocumentationEntries(input.configData.documentation?.contextualEntries ?? {});\n // Version\n this.appVersion = guaranteeNonNullable(input.versionData.version, `Can't collect application version: 'version' field is missing`);\n this.appVersionBuildTime = guaranteeNonNullable(input.versionData.buildTime, `Can't collect application version: 'buildTime' field is missing`);\n this.appVersionCommitId = guaranteeNonNullable(input.versionData.commitSHA, `Can't collect application version: 'commitSHA' field is missing`);\n }\n static resolveAbsoluteUrl(url) {\n if (url.trim().startsWith(URL_SEPARATOR)) {\n return window.location.origin + url;\n }\n return url;\n }\n}\n//# sourceMappingURL=LegendApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { assertNonNullable, guaranteeNonEmptyString, } from '@finos/legend-shared';\nimport { LegendApplicationConfig, } from '@finos/legend-application';\nexport class LegendREPLGridClientApplicationConfig extends LegendApplicationConfig {\n replUrl;\n useDynamicREPLServer = false;\n constructor(input) {\n super(input);\n assertNonNullable(input.configData.repl, `Can't configure application: 'repl' field is missing`);\n this.replUrl = LegendApplicationConfig.resolveAbsoluteUrl(guaranteeNonEmptyString(input.configData.repl.url, `Can't configure application: 'repl.url' field is missing or empty`));\n if (input.configData.repl.dynamic !== undefined) {\n this.useDynamicREPLServer = Boolean(input.configData.repl.dynamic);\n }\n }\n getDefaultApplicationStorageKey() {\n return 'legend-repl';\n }\n}\n//# sourceMappingURL=LegendREPLGridClientApplicationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AbstractPluginManager, } from '@finos/legend-shared';\nexport class LegendApplicationPluginManager extends AbstractPluginManager {\n loggerPlugins = [];\n telemetryServicePlugins = [];\n tracerServicePlugins = [];\n eventNotifierPlugins = [];\n applicationPlugins = [];\n registerLoggerPlugin(plugin) {\n this.loggerPlugins.push(plugin);\n }\n registerTelemetryServicePlugin(plugin) {\n this.telemetryServicePlugins.push(plugin);\n }\n registerTracerServicePlugin(plugin) {\n this.tracerServicePlugins.push(plugin);\n }\n registerEventNotifierPlugin(plugin) {\n this.eventNotifierPlugins.push(plugin);\n }\n registerApplicationPlugin(plugin) {\n this.applicationPlugins.push(plugin);\n }\n getLoggerPlugins() {\n return [...this.loggerPlugins];\n }\n getTelemetryServicePlugins() {\n return [...this.telemetryServicePlugins];\n }\n getTracerServicePlugins() {\n return [...this.tracerServicePlugins];\n }\n getEventNotifierPlugins() {\n return [...this.eventNotifierPlugins];\n }\n getApplicationPlugins() {\n return [...this.applicationPlugins];\n }\n}\n//# sourceMappingURL=LegendApplicationPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LegendApplicationPluginManager } from '@finos/legend-application';\nexport class LegendREPLGridClientPluginManager extends LegendApplicationPluginManager {\n pureProtocolProcessorPlugins = [];\n pureGraphManagerPlugins = [];\n pureGraphPlugins = [];\n constructor() {\n super();\n }\n static create() {\n return new LegendREPLGridClientPluginManager();\n }\n registerPureProtocolProcessorPlugin(plugin) {\n this.pureProtocolProcessorPlugins.push(plugin);\n }\n registerPureGraphManagerPlugin(plugin) {\n this.pureGraphManagerPlugins.push(plugin);\n }\n registerPureGraphPlugin(plugin) {\n this.pureGraphPlugins.push(plugin);\n }\n getPureGraphManagerPlugins() {\n return [...this.pureGraphManagerPlugins];\n }\n getPureProtocolProcessorPlugins() {\n return [...this.pureProtocolProcessorPlugins];\n }\n getPureGraphPlugins() {\n return [...this.pureGraphPlugins];\n }\n}\n//# sourceMappingURL=LegendREPLGridClientPluginManager.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_APPLICATION_PARAM_TOKEN;\n(function (LEGEND_APPLICATION_PARAM_TOKEN) {\n LEGEND_APPLICATION_PARAM_TOKEN[\"INITIAL_COLOR_THEME\"] = \"initialColorTheme\";\n})(LEGEND_APPLICATION_PARAM_TOKEN || (LEGEND_APPLICATION_PARAM_TOKEN = {}));\n//# sourceMappingURL=LegendApplicationNavigation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { addQueryParametersToUrl, getQueryParameterValue, getQueryParameters, guaranteeNonNullable, sanitizeURL, stringifyQueryParams, } from '@finos/legend-shared';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { NAVIGATION_ZONE_PREFIX, } from './NavigationService.js';\nimport { Route, Switch, Redirect, matchPath, generatePath, useParams, useLocation, } from 'react-router';\nexport { BrowserRouter } from 'react-router-dom';\nexport { Route, Switch, Redirect, useParams, matchPath, generatePath };\nexport const useNavigationZone = () => {\n const location = useLocation(); // TODO: this is a temporary hack until we upgrade react-router\n return location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n};\n/**\n * Prefix URL patterns coming from extensions with `/extensions/`\n * to avoid potential conflicts with main routes.\n */\nexport const generateExtensionUrlPattern = (pattern) => `/extensions/${pattern}`.replace(/^\\/extensions\\/\\//, '/extensions/');\nexport class BrowserNavigator {\n historyAPI;\n _isNavigationBlocked = false;\n _forceBypassNavigationBlocking = false;\n _blockCheckers = [];\n _beforeUnloadListener = (event) => {\n if (this._forceBypassNavigationBlocking) {\n return;\n }\n if (this._blockCheckers.some((checker) => checker())) {\n // NOTE: there is no way to customize the alert message for now since Chrome removed support for it due to security concerns\n // See https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers/onbeforeunload#Browser_compatibility\n event.returnValue = '';\n }\n };\n onBlock;\n onNativePlatformNavigationBlock;\n constructor(historyApiClient) {\n makeObservable(this, {\n _isNavigationBlocked: observable,\n isNavigationBlocked: computed,\n blockNavigation: action,\n unblockNavigation: action,\n });\n this.historyAPI = historyApiClient;\n }\n get window() {\n return guaranteeNonNullable(window, `Window object is not available in non-web environment`);\n }\n goToLocation(location, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = this.generateAddress(location);\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n reload(options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.reload();\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n goToAddress(address, options) {\n if (options?.ignoreBlocking) {\n this._forceBypassNavigationBlocking = true;\n }\n const onProceed = () => {\n this._forceBypassNavigationBlocking = true; // make sure to not trigger `BeforeUnloadEvent`\n this.window.location.href = address;\n };\n if (!this._forceBypassNavigationBlocking &&\n this._blockCheckers.some((checker) => checker())) {\n this.onBlock?.(onProceed);\n }\n else {\n onProceed();\n }\n }\n visitAddress(address) {\n this.window.open(address, '_blank');\n }\n generateAddress(location) {\n return (this.window.location.origin +\n this.historyAPI.createHref({ pathname: location }));\n }\n updateCurrentLocation(location) {\n this.historyAPI.push(location);\n }\n updateCurrentZone(zone) {\n this.window.location.hash = NAVIGATION_ZONE_PREFIX + zone;\n }\n resetZone() {\n this.updateCurrentLocation(this.getCurrentLocation());\n }\n getCurrentBaseAddress(options) {\n if (options?.withAppRoot) {\n return this.generateAddress('');\n }\n return this.window.location.origin;\n }\n getCurrentAddress() {\n return this.window.location.href;\n }\n getCurrentLocation() {\n return this.historyAPI.location.pathname;\n }\n getCurrentLocationParameters() {\n const result = {};\n const parameters = getQueryParameters(sanitizeURL(this.getCurrentAddress()), true);\n Object.keys(parameters).forEach((key) => {\n result[key] = getQueryParameterValue(key, parameters);\n });\n return result;\n }\n getCurrentLocationParameterValue(key) {\n return this.getCurrentLocationParameters()[key];\n }\n getCurrentZone() {\n return this.window.location.hash.substring(NAVIGATION_ZONE_PREFIX.length);\n }\n blockNavigation(blockCheckers, onBlock, onNativePlatformNavigationBlock) {\n this._isNavigationBlocked = true;\n this.onBlock = onBlock;\n this.onNativePlatformNavigationBlock = onNativePlatformNavigationBlock;\n // Here we attempt to cancel the effect of the back button\n // See https://medium.com/codex/angular-guards-disabling-browsers-back-button-for-specific-url-fdf05d9fe155#4f13\n // This makes the current location the last entry in the browser history and clears any forward history\n this.window.history.pushState(null, '', this.getCurrentAddress());\n // The popstate event is triggered every time the user clicks back/forward button, but the forward history\n // has been cleared, and now if we go back, we call `history.forward()`, which go 1 page forward,\n // but there's no page forward, so effectively, the user remains on the same page\n this.window.onpopstate = () => {\n window.history.forward();\n this.onNativePlatformNavigationBlock?.();\n };\n // Block browser navigation: e.g. reload, setting `window.href` directly, etc.\n this._blockCheckers = blockCheckers;\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n this.window.addEventListener('beforeunload', this._beforeUnloadListener);\n }\n unblockNavigation() {\n this._isNavigationBlocked = false;\n this.onBlock = undefined;\n this.window.onpopstate = null;\n this._blockCheckers = [];\n this.window.removeEventListener('beforeunload', this._beforeUnloadListener);\n }\n get isNavigationBlocked() {\n return this._isNavigationBlocked;\n }\n INTERNAL__internalizeTransientParameter(key) {\n const currentZone = this.getCurrentZone();\n const parameters = this.getCurrentLocationParameters();\n delete parameters[key];\n this.updateCurrentLocation(addQueryParametersToUrl(this.getCurrentLocation(), stringifyQueryParams(parameters)));\n this.updateCurrentZone(currentZone);\n }\n}\n//# sourceMappingURL=BrowserNavigator.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class ApplicationPlatform {\n applicationStore;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n }\n async initialize() {\n // do nothing\n }\n}\n//# sourceMappingURL=ApplicationPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserNavigator } from '../navigation/BrowserNavigator.js';\nimport { ApplicationPlatform } from './ApplicationPlatform.js';\nimport { LEGEND_APPLICATION_PARAM_TOKEN } from '../../__lib__/LegendApplicationNavigation.js';\nexport class BrowserPlatform extends ApplicationPlatform {\n navigator;\n constructor(applicationStore, config) {\n super(applicationStore);\n this.navigator = new BrowserNavigator(config.historyAPI);\n }\n getNavigator() {\n return this.navigator;\n }\n async initialize() {\n // set initial color theme\n // NOTE: we allow this to avoid the flash of default color theme\n // when loading the page from another page/ when using the application in an iframe\n const initialColorTheme = this.applicationStore.navigationService.navigator.getCurrentLocationParameterValue(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n if (initialColorTheme) {\n this.applicationStore.layoutService.setColorTheme(initialColorTheme);\n this.applicationStore.navigationService.navigator.INTERNAL__internalizeTransientParameter(LEGEND_APPLICATION_PARAM_TOKEN.INITIAL_COLOR_THEME);\n }\n }\n}\n//# sourceMappingURL=BrowserPlatform.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { createContext, useContext } from 'react';\nexport const ApplicationPlatformContext = createContext(undefined);\nexport const useApplicationPlatform = () => guaranteeNonNullable(useContext(ApplicationPlatformContext), `Can't find application platform in context`);\n//# sourceMappingURL=ApplicationPlatformProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from 'history';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { useHistory } from 'react-router';\nimport { BrowserRouter } from 'react-router-dom';\nimport { BrowserPlatform } from '../stores/platform/BrowserPlatform.js';\nimport { ApplicationPlatformContext } from './ApplicationPlatformProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nconst BrowserPlatformProvider = ({ children }) => {\n const applicationStore = useApplicationStore();\n const historyAPI = useHistory(); // TODO: this is a temporary hack until we upgrade react-router\n const platform = useLocalObservable(() => new BrowserPlatform(applicationStore, { historyAPI }));\n return (_jsx(ApplicationPlatformContext.Provider, { value: platform, children: children }));\n};\nexport const BrowserEnvironmentProvider = ({ children, baseUrl }) => (_jsx(BrowserRouter, { basename: baseUrl, children: _jsx(BrowserPlatformProvider, { children: children }) }));\n//# sourceMappingURL=BrowserEnvironmentProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, } from '@finos/legend-shared';\nexport class REPLServerClient {\n networkClient;\n constructor(networkClient) {\n this.networkClient = networkClient;\n }\n get baseUrl() {\n return guaranteeNonNullable(this.networkClient.baseUrl, `REPL client has not been configured properly`);\n }\n getREPLGridServerResult = (request) => this.networkClient.post(`${this.baseUrl}/gridResult`, request, undefined, undefined);\n getIntialQueryLambda = () => this.networkClient.get(`${this.baseUrl}/initialLambda`, undefined, undefined, undefined);\n executeLambda = (lambda, isPaginationEnabled) => this.networkClient.post(`${this.baseUrl}/executeLambda`, lambda, undefined, undefined, {\n isPaginationEnabled,\n });\n getTypeaheadResults = (lambda) => this.networkClient.post(`${this.baseUrl}/typeahead`, lambda, undefined, undefined);\n parseQuery = (lambda) => this.networkClient.post(`${this.baseUrl}/parseQuery`, lambda, undefined, undefined);\n getInitialREPLGridServerResult = (isPaginationEnabled) => this.networkClient.get(`${this.baseUrl}/gridResult`, undefined, undefined, {\n isPaginationEnabled,\n });\n getLicenseKey = () => this.networkClient.get(`${this.baseUrl}/licenseKey`, undefined, undefined, undefined);\n getREPLQuery = (queryId) => this.networkClient.get(`${this.baseUrl}/query/${queryId}`, undefined, undefined, undefined);\n saveQuery = (tdsQuery) => this.networkClient.post(`${this.baseUrl}/saveQuery`, tdsQuery, undefined, undefined);\n}\n//# sourceMappingURL=REPLServerClient.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { observable, makeObservable, action } from 'mobx';\nimport { createModelSchema, list, optional, primitive } from 'serializr';\nexport var TDS_FILTER_OPERATION;\n(function (TDS_FILTER_OPERATION) {\n TDS_FILTER_OPERATION[\"EQUALS\"] = \"equal\";\n TDS_FILTER_OPERATION[\"NOT_EQUAL\"] = \"notEqual\";\n TDS_FILTER_OPERATION[\"GREATER_THAN\"] = \"greaterThan\";\n TDS_FILTER_OPERATION[\"GREATER_THAN_OR_EQUAL\"] = \"greaterThanOrEqual\";\n TDS_FILTER_OPERATION[\"LESS_THAN\"] = \"lessThan\";\n TDS_FILTER_OPERATION[\"LESS_THAN_OR_EQUAL\"] = \"lessThanOrEqual\";\n TDS_FILTER_OPERATION[\"BLANK\"] = \"isEmpty\";\n TDS_FILTER_OPERATION[\"NOT_BLANK\"] = \"isNotEmpty\";\n TDS_FILTER_OPERATION[\"CONTAINS\"] = \"contains\";\n TDS_FILTER_OPERATION[\"NOT_CONTAINS\"] = \"notContains\";\n TDS_FILTER_OPERATION[\"STARTS_WITH\"] = \"startsWith\";\n TDS_FILTER_OPERATION[\"ENDS_WITH\"] = \"endsWith\";\n})(TDS_FILTER_OPERATION || (TDS_FILTER_OPERATION = {}));\nexport var TDS_FILTER_GROUP;\n(function (TDS_FILTER_GROUP) {\n TDS_FILTER_GROUP[\"AND\"] = \"and\";\n TDS_FILTER_GROUP[\"OR\"] = \"or\";\n})(TDS_FILTER_GROUP || (TDS_FILTER_GROUP = {}));\nexport var TDS_AGGREGATION_FUNCTION;\n(function (TDS_AGGREGATION_FUNCTION) {\n TDS_AGGREGATION_FUNCTION[\"SUM\"] = \"sum\";\n TDS_AGGREGATION_FUNCTION[\"MIN\"] = \"min\";\n TDS_AGGREGATION_FUNCTION[\"MAX\"] = \"max\";\n TDS_AGGREGATION_FUNCTION[\"COUNT\"] = \"count\";\n TDS_AGGREGATION_FUNCTION[\"AVG\"] = \"avg\";\n TDS_AGGREGATION_FUNCTION[\"FIRST\"] = \"first\";\n TDS_AGGREGATION_FUNCTION[\"LAST\"] = \"last\";\n})(TDS_AGGREGATION_FUNCTION || (TDS_AGGREGATION_FUNCTION = {}));\nexport var TDS_SORT_ORDER;\n(function (TDS_SORT_ORDER) {\n TDS_SORT_ORDER[\"ASCENDING\"] = \"ascending\";\n TDS_SORT_ORDER[\"DESCENDING\"] = \"descending\";\n})(TDS_SORT_ORDER || (TDS_SORT_ORDER = {}));\nexport var FILTER_TYPE;\n(function (FILTER_TYPE) {\n FILTER_TYPE[\"TEXT\"] = \"text\";\n FILTER_TYPE[\"NUMBER\"] = \"number\";\n})(FILTER_TYPE || (FILTER_TYPE = {}));\nexport class TDSFilterCondition {\n operation;\n value;\n constructor(operation, value) {\n this.operation = operation;\n this.value = value;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSFilterCondition, {\n operation: primitive(),\n value: primitive(),\n }));\n}\nexport class TDSFilter {\n column;\n columnType;\n conditions;\n groupOperation;\n constructor(column, columnType, conditions, groupOperation) {\n this.column = column;\n this.columnType = columnType;\n this.conditions = conditions;\n this.groupOperation = groupOperation;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSFilter, {\n column: primitive(),\n columnType: primitive(),\n conditions: list(usingModelSchema(TDSFilterCondition.serialization.schema)),\n groupOperation: primitive(),\n }));\n}\nexport class TDSSort {\n column;\n order;\n constructor(column, order) {\n makeObservable(this, {\n column: observable,\n order: observable,\n setOrder: action,\n });\n this.column = column;\n this.order = order;\n }\n setOrder(val) {\n this.order = val;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSSort, {\n column: primitive(),\n order: primitive(),\n }));\n}\nexport class TDSAggregation {\n column;\n columnType;\n function;\n constructor(column, columnType, _function) {\n this.column = column;\n this.columnType = columnType;\n this.function = _function;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSAggregation, {\n column: primitive(),\n columnType: primitive(),\n function: primitive(),\n }));\n}\nexport class TDSGroupby {\n columns;\n groupKeys;\n aggregations;\n constructor(columns, groupKeys, aggregations) {\n this.columns = columns;\n this.groupKeys = groupKeys;\n this.aggregations = aggregations;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSGroupby, {\n columns: list(primitive()),\n groupKeys: list(primitive()),\n aggregations: list(usingModelSchema(TDSAggregation.serialization.schema)),\n }));\n}\nexport class TDSColumn {\n name;\n constructor(name) {\n this.name = name;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSColumn, {\n name: primitive(),\n }));\n}\nexport class TDSRequest {\n startRow;\n endRow;\n columns;\n filter;\n sort;\n groupBy;\n constructor(columns, filter, sort, groupBy, startRow, endRow) {\n this.startRow = startRow;\n this.endRow = endRow;\n this.columns = columns;\n this.filter = filter;\n this.sort = sort;\n this.groupBy = groupBy;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSRequest, {\n startRow: optional(primitive()),\n endRow: optional(primitive()),\n columns: list(usingModelSchema(TDSColumn.serialization.schema)),\n filter: list(usingModelSchema(TDSFilter.serialization.schema)),\n sort: list(usingModelSchema(TDSSort.serialization.schema)),\n groupBy: usingModelSchema(TDSGroupby.serialization.schema),\n }));\n}\n//# sourceMappingURL=TDSRequest.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const MULTIPLICITY_INFINITE = '*';\nexport const ELEMENT_PATH_DELIMITER = '::';\nexport const MULTIPLICITY_RANGE_OPERATOR = '..';\nexport const PROPERTY_ACCESSOR = '.';\nexport const UNIT_PATH_DELIMITER = '~';\nexport const LAMBDA_PIPE = '|';\nexport const DEFAULT_SOURCE_PARAMETER_NAME = 'src';\nexport const DEFAULT_DATABASE_SCHEMA_NAME = 'default';\nexport const SECTION_INDEX_ELEMENT_PATH = '__internal__::SectionIndex';\nexport const VARIABLE_REFERENCE_TOKEN = '$';\nexport const TYPE_CAST_TOKEN = '@';\nexport const ARROW_FUNCTION_TOKEN = '->';\nexport const LATEST_DATE = '%latest';\nexport const PARSER_SECTION_MARKER = '###';\nexport const FUNCTION_SIGNATURE_MULTIPLICITY_INFINITE_TOKEN = 'MANY';\nexport const DIRECTORY_PATH_DELIMITER = '/';\nexport const SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX = 'sourceInformation';\nexport const RESERVERD_PACKAGE_NAMES = ['$implicit'];\nexport var ROOT_PACKAGE_NAME;\n(function (ROOT_PACKAGE_NAME) {\n ROOT_PACKAGE_NAME[\"CORE\"] = \"CORE\";\n ROOT_PACKAGE_NAME[\"MAIN\"] = \"ROOT\";\n ROOT_PACKAGE_NAME[\"MODEL_GENERATION\"] = \"MODEL_GENERATION_ROOT\";\n ROOT_PACKAGE_NAME[\"SYSTEM\"] = \"SYSTEM_ROOT\";\n ROOT_PACKAGE_NAME[\"PROJECT_DEPENDENCY_ROOT\"] = \"PROJECT_DEPENDENCY_ROOT\";\n})(ROOT_PACKAGE_NAME || (ROOT_PACKAGE_NAME = {}));\nexport var PRIMITIVE_TYPE;\n(function (PRIMITIVE_TYPE) {\n PRIMITIVE_TYPE[\"STRING\"] = \"String\";\n PRIMITIVE_TYPE[\"BOOLEAN\"] = \"Boolean\";\n PRIMITIVE_TYPE[\"BINARY\"] = \"Binary\";\n PRIMITIVE_TYPE[\"NUMBER\"] = \"Number\";\n PRIMITIVE_TYPE[\"INTEGER\"] = \"Integer\";\n PRIMITIVE_TYPE[\"FLOAT\"] = \"Float\";\n PRIMITIVE_TYPE[\"DECIMAL\"] = \"Decimal\";\n PRIMITIVE_TYPE[\"DATE\"] = \"Date\";\n PRIMITIVE_TYPE[\"STRICTDATE\"] = \"StrictDate\";\n PRIMITIVE_TYPE[\"DATETIME\"] = \"DateTime\";\n PRIMITIVE_TYPE[\"STRICTTIME\"] = \"StrictTime\";\n // NOTE: `LatestDate` is a special type that is used for milestoning in store so its used in the body of function and lamdba but never should be exposed to users\n // as such, if there is a day we want to have `LatestDate` in the graph but not exposed to the users\n PRIMITIVE_TYPE[\"LATESTDATE\"] = \"LatestDate\";\n PRIMITIVE_TYPE[\"BYTE\"] = \"Byte\";\n})(PRIMITIVE_TYPE || (PRIMITIVE_TYPE = {}));\nexport var ATOMIC_TEST_TYPE;\n(function (ATOMIC_TEST_TYPE) {\n ATOMIC_TEST_TYPE[\"Service_Test\"] = \"serviceTest\";\n ATOMIC_TEST_TYPE[\"Mapping_Test\"] = \"mappingTest\";\n ATOMIC_TEST_TYPE[\"Function_Test\"] = \"functionTest\";\n})(ATOMIC_TEST_TYPE || (ATOMIC_TEST_TYPE = {}));\n// NOTE: the list of auto-import are kept in `m3.pure` file in `finos/legend-pure`,\n// this includes a more extensive list of packges which contain native functions, classes, etc.\n// See https://github.com/finos/legend-pure/blob/master/legend-pure-m3-core/src/main/resources/platform/pure/m3.pure\nexport const AUTO_IMPORTS = [\n // 'meta::pure::metamodel',\n 'meta::pure::metamodel::type',\n // 'meta::pure::metamodel::type::generics',\n // 'meta::pure::metamodel::relationship',\n // 'meta::pure::metamodel::valuespecification',\n // 'meta::pure::metamodel::multiplicity',\n // 'meta::pure::metamodel::function',\n // 'meta::pure::metamodel::function::property',\n // 'meta::pure::metamodel::extension',\n // 'meta::pure::metamodel::import',\n 'meta::pure::functions::date',\n // 'meta::pure::functions::string',\n // 'meta::pure::functions::collection',\n // 'meta::pure::functions::meta',\n // 'meta::pure::functions::constraints',\n // 'meta::pure::functions::lang',\n // 'meta::pure::functions::boolean',\n // 'meta::pure::functions::tools',\n // 'meta::pure::functions::io',\n // 'meta::pure::functions::math',\n // 'meta::pure::functions::asserts',\n // 'meta::pure::functions::test',\n // 'meta::pure::functions::multiplicity',\n // 'meta::pure::router',\n // 'meta::pure::service',\n // 'meta::pure::tds',\n // 'meta::pure::tools',\n 'meta::pure::profiles',\n];\nexport var CORE_PURE_PATH;\n(function (CORE_PURE_PATH) {\n // type\n CORE_PURE_PATH[\"ANY\"] = \"meta::pure::metamodel::type::Any\";\n CORE_PURE_PATH[\"NIL\"] = \"meta::pure::metamodel::type::Nil\";\n // profile\n CORE_PURE_PATH[\"PROFILE_DOC\"] = \"meta::pure::profiles::doc\";\n CORE_PURE_PATH[\"PROFILE_TEMPORAL\"] = \"meta::pure::profiles::temporal\";\n // classifier paths\n CORE_PURE_PATH[\"PROFILE\"] = \"meta::pure::metamodel::extension::Profile\";\n CORE_PURE_PATH[\"ENUMERATION\"] = \"meta::pure::metamodel::type::Enumeration\";\n CORE_PURE_PATH[\"MEASURE\"] = \"meta::pure::metamodel::type::Measure\";\n CORE_PURE_PATH[\"CLASS\"] = \"meta::pure::metamodel::type::Class\";\n CORE_PURE_PATH[\"ASSOCIATION\"] = \"meta::pure::metamodel::relationship::Association\";\n CORE_PURE_PATH[\"FUNCTION\"] = \"meta::pure::metamodel::function::ConcreteFunctionDefinition\";\n CORE_PURE_PATH[\"FLAT_DATA\"] = \"meta::flatData::metamodel::FlatData\";\n CORE_PURE_PATH[\"DATABASE\"] = \"meta::relational::metamodel::Database\";\n CORE_PURE_PATH[\"MAPPING\"] = \"meta::pure::mapping::Mapping\";\n CORE_PURE_PATH[\"SERVICE\"] = \"meta::legend::service::metamodel::Service\";\n CORE_PURE_PATH[\"CONNECTION\"] = \"meta::pure::runtime::PackageableConnection\";\n CORE_PURE_PATH[\"RUNTIME\"] = \"meta::pure::runtime::PackageableRuntime\";\n CORE_PURE_PATH[\"EXECUTION_ENVIRONMENT\"] = \"meta::legend::service::metamodel::ExecutionEnvironmentInstance\";\n CORE_PURE_PATH[\"FILE_GENERATION\"] = \"meta::pure::generation::metamodel::GenerationConfiguration\";\n CORE_PURE_PATH[\"GENERATION_SPECIFICATION\"] = \"meta::pure::generation::metamodel::GenerationSpecification\";\n CORE_PURE_PATH[\"SECTION_INDEX\"] = \"meta::pure::metamodel::section::SectionIndex\";\n CORE_PURE_PATH[\"DATA_ELEMENT\"] = \"meta::pure::data::DataElement\";\n CORE_PURE_PATH[\"SNOWFLAKE_APP\"] = \"meta::external::function::activator::snowflakeApp::SnowflakeApp\";\n CORE_PURE_PATH[\"HOSTED_SERVICE\"] = \"meta::external::function::activator::hostedService::HostedService\";\n})(CORE_PURE_PATH || (CORE_PURE_PATH = {}));\nexport const PURE_DOC_TAG = 'doc';\nexport const PURE_DEPRECATED_STEREOTYPE = 'deprecated';\nexport var MILESTONING_STEREOTYPE;\n(function (MILESTONING_STEREOTYPE) {\n MILESTONING_STEREOTYPE[\"BUSINESS_TEMPORAL\"] = \"businesstemporal\";\n MILESTONING_STEREOTYPE[\"PROCESSING_TEMPORAL\"] = \"processingtemporal\";\n MILESTONING_STEREOTYPE[\"BITEMPORAL\"] = \"bitemporal\";\n})(MILESTONING_STEREOTYPE || (MILESTONING_STEREOTYPE = {}));\nexport var MILESTONING_VERSION_PROPERTY_SUFFIX;\n(function (MILESTONING_VERSION_PROPERTY_SUFFIX) {\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS\"] = \"AllVersions\";\n MILESTONING_VERSION_PROPERTY_SUFFIX[\"ALL_VERSIONS_IN_RANGE\"] = \"AllVersionsInRange\";\n})(MILESTONING_VERSION_PROPERTY_SUFFIX || (MILESTONING_VERSION_PROPERTY_SUFFIX = {}));\nexport const MILESTONING_START_DATE_PARAMETER_NAME = 'startDate';\nexport const MILESTONING_END_DATE_PARAMETER_NAME = 'endDate';\nexport const PROCESSING_DATE_MILESTONING_PROPERTY_NAME = 'processingDate';\nexport const BUSINESS_DATE_MILESTONING_PROPERTY_NAME = 'businessDate';\nexport var PackageableElementPointerType;\n(function (PackageableElementPointerType) {\n PackageableElementPointerType[\"CLASS\"] = \"CLASS\";\n PackageableElementPointerType[\"STORE\"] = \"STORE\";\n PackageableElementPointerType[\"MAPPING\"] = \"MAPPING\";\n PackageableElementPointerType[\"RUNTIME\"] = \"RUNTIME\";\n PackageableElementPointerType[\"FUNCTION\"] = \"FUNCTION\";\n PackageableElementPointerType[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n PackageableElementPointerType[\"SERVICE\"] = \"SERVICE\";\n PackageableElementPointerType[\"DATA\"] = \"DATA\";\n})(PackageableElementPointerType || (PackageableElementPointerType = {}));\nexport var SUPPORTED_FUNCTIONS;\n(function (SUPPORTED_FUNCTIONS) {\n SUPPORTED_FUNCTIONS[\"LET\"] = \"meta::pure::functions::lang::letFunction\";\n SUPPORTED_FUNCTIONS[\"NEW\"] = \"meta::pure::functions::meta::new\";\n // from\n SUPPORTED_FUNCTIONS[\"FROM\"] = \"meta::pure::mapping::from\";\n})(SUPPORTED_FUNCTIONS || (SUPPORTED_FUNCTIONS = {}));\nexport const DATE_TIME_FORMAT_WITH_MILLISECONDS = \"yyyy-MM-dd'T'HH:mm:ss.SSSxxxx\";\nexport const DATE_TIME_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssxxxx\";\nexport const DATE_FORMAT = 'yyyy-MM-dd';\n// Generation Const\nexport const DEFAULT_GENERATION_PACKAGE = 'generated';\n// Query\nexport const QUERY_PROFILE_TAG_CLASS = 'class';\nexport const QUERY_PROFILE_PATH = 'meta::pure::profiles::query';\n//# sourceMappingURL=MetaModelConst.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TDS_AGGREGATION_FUNCTION, TDS_FILTER_OPERATION, TDS_SORT_ORDER, } from './TDSRequest.js';\nimport { PRIMITIVE_TYPE, } from '@finos/legend-graph';\nimport { isBoolean } from '@finos/legend-shared';\nexport const getTDSSortOrder = (sortOrder) => {\n switch (sortOrder) {\n case 'asc':\n return TDS_SORT_ORDER.ASCENDING;\n case 'desc':\n return TDS_SORT_ORDER.DESCENDING;\n default:\n throw new Error(`Unsupported tds sort order ${sortOrder}`);\n }\n};\nconst getTDSSortModel = (sort) => {\n switch (sort) {\n case TDS_SORT_ORDER.ASCENDING:\n return 'asc';\n case TDS_SORT_ORDER.DESCENDING:\n return 'desc';\n default:\n throw new Error(`Unsupported`);\n }\n};\nexport const getAggregationFunction = (aggFunc) => {\n switch (aggFunc) {\n case 'sum':\n return TDS_AGGREGATION_FUNCTION.SUM;\n case 'min':\n return TDS_AGGREGATION_FUNCTION.MIN;\n case 'max':\n return TDS_AGGREGATION_FUNCTION.MAX;\n case 'count':\n return TDS_AGGREGATION_FUNCTION.COUNT;\n default:\n throw new Error(`Unsupported aggregation function ${aggFunc}`);\n }\n};\nexport const getTDSFilterOperation = (filterOperation) => {\n switch (filterOperation) {\n case 'equals':\n return TDS_FILTER_OPERATION.EQUALS;\n case 'notEqual':\n return TDS_FILTER_OPERATION.NOT_EQUAL;\n case 'greaterThan':\n return TDS_FILTER_OPERATION.GREATER_THAN;\n case 'greaterThanOrEqual':\n return TDS_FILTER_OPERATION.GREATER_THAN_OR_EQUAL;\n case 'lessThan':\n return TDS_FILTER_OPERATION.LESS_THAN;\n case 'lessThanOrEqual':\n return TDS_FILTER_OPERATION.LESS_THAN_OR_EQUAL;\n case 'blank':\n return TDS_FILTER_OPERATION.BLANK;\n case 'notBlank':\n return TDS_FILTER_OPERATION.NOT_BLANK;\n case 'contains':\n return TDS_FILTER_OPERATION.CONTAINS;\n case 'notContains':\n return TDS_FILTER_OPERATION.NOT_CONTAINS;\n case 'startsWith':\n return TDS_FILTER_OPERATION.STARTS_WITH;\n case 'endsWith':\n return TDS_FILTER_OPERATION.ENDS_WITH;\n default:\n throw new Error(`Unsupported filter operation ${filterOperation}`);\n }\n};\nexport const getFilterColumnType = (type) => {\n switch (type) {\n case 'text':\n return PRIMITIVE_TYPE.STRING;\n case 'number':\n return PRIMITIVE_TYPE.NUMBER;\n case 'boolean':\n return PRIMITIVE_TYPE.BOOLEAN;\n case 'date':\n return PRIMITIVE_TYPE.DATE;\n default:\n throw new Error(`Unsupported filter type ${type}`);\n }\n};\nexport const getFilterModeltype = (type) => {\n switch (type) {\n case PRIMITIVE_TYPE.STRING:\n return 'text';\n case PRIMITIVE_TYPE.NUMBER:\n return 'number';\n case PRIMITIVE_TYPE.BOOLEAN:\n return 'boolean';\n case PRIMITIVE_TYPE.DATE:\n return 'date';\n default:\n throw new Error(`Unsupported filter type ${type}`);\n }\n};\nexport const getTDSColumnCustomizations = (result, columnName, tdsRequest) => {\n if (!tdsRequest) {\n return {};\n }\n const sort = tdsRequest.sort.find((c) => c.column === columnName)?.order;\n const rowGroup = tdsRequest.groupBy.columns.find((c) => c === columnName);\n const aggFunc = tdsRequest.groupBy.aggregations.find((c) => c.column === columnName);\n return {\n sort: sort ? getTDSSortModel(sort) : undefined,\n rowGroup: Boolean(rowGroup),\n hide: Boolean(rowGroup),\n aggFunc: aggFunc?.function,\n };\n};\nexport const getAggregationTDSColumnCustomizations = (result, columnName) => {\n const columnType = result.builder.columns.find((col) => col.name === columnName)?.type;\n switch (columnType) {\n case PRIMITIVE_TYPE.STRING:\n return {\n filter: 'agTextColumnFilter',\n allowedAggFuncs: ['count'],\n };\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME:\n case PRIMITIVE_TYPE.STRICTDATE:\n return {\n filter: 'agDateColumnFilter',\n allowedAggFuncs: ['count'],\n };\n case PRIMITIVE_TYPE.DECIMAL:\n case PRIMITIVE_TYPE.INTEGER:\n case PRIMITIVE_TYPE.FLOAT:\n return {\n filter: 'agNumberColumnFilter',\n allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],\n };\n default:\n return {\n allowedAggFuncs: ['count'],\n };\n }\n};\nexport const getDefaultColumnDefintions = () => ({\n minWidth: 50,\n sortable: true,\n flex: 1,\n resizable: true,\n enableRowGroup: true,\n allowedAggFuncs: ['count', 'sum', 'max', 'min', 'avg'],\n enableValue: true,\n menuTabs: ['filterMenuTab', 'generalMenuTab', 'columnsMenuTab'],\n});\nexport const getTDSRowData = (tds) => tds.rows.map((_row, rowIdx) => {\n const row = {};\n const cols = tds.columns;\n _row.values.forEach((value, colIdx) => {\n // `ag-grid` shows `false` value as empty string so we have\n // call `.toString()` to avoid this behavior.\n row[cols[colIdx]] = isBoolean(value) ? String(value) : value;\n });\n row.rowNumber = rowIdx;\n return row;\n});\n//# sourceMappingURL=GridUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { getAggregationTDSColumnCustomizations, getFilterModeltype, getTDSColumnCustomizations, getTDSRowData, } from '../../components/grid/GridUtils.js';\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { TDS_FILTER_GROUP, } from '../../components/grid/TDSRequest.js';\nexport class DataCubeGridState {\n dataCubeState;\n initialResult;\n currentResult;\n columns;\n initialQueryLambda;\n currentQueryTDSRequest;\n lastQueryTDSRequest;\n constructor(dataCubeState) {\n makeObservable(this, {\n initialResult: observable,\n initialQueryLambda: observable,\n currentResult: observable,\n columns: observable,\n currentQueryTDSRequest: observable,\n lastQueryTDSRequest: observable,\n setInitialResult: action,\n setColumns: action,\n setInitialQueryLambda: action,\n setCurrentResult: action,\n setCurrentQueryTDSRequest: action,\n setLastQueryTDSRequest: action,\n rowData: computed,\n columnDefs: computed,\n });\n this.dataCubeState = dataCubeState;\n }\n setLastQueryTDSRequest(val) {\n this.lastQueryTDSRequest = val;\n }\n setCurrentQueryTDSRequest(val) {\n this.currentQueryTDSRequest = val;\n }\n setInitialQueryLambda(val) {\n this.initialQueryLambda = val;\n }\n setInitialResult(val) {\n this.initialResult = val;\n }\n setCurrentResult(val) {\n this.currentResult = val;\n }\n setColumns(val) {\n this.columns = val;\n }\n get rowData() {\n return this.initialResult ? getTDSRowData(this.initialResult.result) : [];\n }\n get columnDefs() {\n const filterModel = {};\n this.currentQueryTDSRequest?.filter.forEach((filter) => {\n if (filter.conditions.length === 1) {\n filterModel[filter.column] = {\n filter: filter.conditions[0]?.value,\n filterType: getFilterModeltype(filter.columnType),\n type: filter.conditions[0]?.operation,\n };\n }\n else {\n filterModel[filter.column] = {\n filterType: getFilterModeltype(filter.columnType),\n operator: filter.groupOperation === TDS_FILTER_GROUP.AND ? 'AND' : 'OR',\n condition1: {\n filter: filter.conditions[0]?.value,\n filterType: getFilterModeltype(filter.columnType),\n type: filter.conditions[0]?.operation,\n },\n condition2: {\n filter: filter.conditions[1]?.value,\n filterType: getFilterModeltype(filter.columnType),\n type: filter.conditions[1]?.operation,\n },\n };\n }\n });\n if (this.currentQueryTDSRequest) {\n this.dataCubeState.configState.gridApi?.setFilterModel(filterModel);\n }\n return this.columns\n ? this.columns.map((c) => ({\n field: c,\n headerName: c,\n ...getAggregationTDSColumnCustomizations(guaranteeNonNullable(this.initialResult), c),\n ...getTDSColumnCustomizations(guaranteeNonNullable(this.initialResult), c, this.currentQueryTDSRequest),\n }))\n : [];\n }\n}\n//# sourceMappingURL=DataCubeGridState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class SourceInformation {\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\n constructor(sourceId, startLine, startColumn, endLine, endColumn) {\n this.sourceId = sourceId;\n this.startLine = startLine;\n this.startColumn = startColumn;\n this.endLine = endLine;\n this.endColumn = endColumn;\n }\n}\n//# sourceMappingURL=SourceInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SourceInformation } from '@finos/legend-graph';\nimport { uuid } from '@finos/legend-shared';\nimport { action, makeObservable, observable } from 'mobx';\nexport class DataCubeQueryEditorState {\n uuid = uuid();\n query;\n parserError;\n constructor(query) {\n makeObservable(this, {\n query: observable,\n parserError: observable,\n setQuery: action,\n setParserError: action,\n });\n this.query = query;\n }\n setQuery(val) {\n this.query = val;\n }\n setParserError(parserError) {\n // account for the lambda prefix offset in source information\n if (parserError?.sourceInformation) {\n parserError.sourceInformation = this.processSourceInformation(parserError.sourceInformation);\n }\n this.parserError = parserError;\n }\n processSourceInformation(sourceInformation) {\n const { sourceId, startLine, startColumn, endLine, endColumn } = sourceInformation;\n const lineOffset = 0;\n const columnOffset = 0;\n return new SourceInformation(sourceId, startLine + lineOffset, startColumn - (startLine === 1 ? columnOffset : 0), endLine + lineOffset, endColumn - (endLine === 1 ? columnOffset : 0));\n }\n}\n//# sourceMappingURL=DataCubeQueryEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport { DataCubeQueryEditorState } from './DataCubeQueryEditorState.js';\nexport class DataCubeQueryTextEditorState {\n dataCubeState;\n queryEditorState;\n currentSubQuery;\n constructor(dataCubeState) {\n makeObservable(this, {\n currentSubQuery: observable,\n queryEditorState: observable,\n setCurrentSubQuery: action,\n });\n this.dataCubeState = dataCubeState;\n this.queryEditorState = new DataCubeQueryEditorState('');\n }\n setCurrentSubQuery(val) {\n this.currentSubQuery = val;\n }\n}\n//# sourceMappingURL=DataCubeQueryTextEditorState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var LEGEND_REPL_EVENT;\n(function (LEGEND_REPL_EVENT) {\n LEGEND_REPL_EVENT[\"FETCH_TDS_FAILURE\"] = \"repl.fetch-tds.failure\";\n LEGEND_REPL_EVENT[\"BUILD_TDS_EQUEST_FAILURE\"] = \"repl.build-tds-request.failure\";\n})(LEGEND_REPL_EVENT || (LEGEND_REPL_EVENT = {}));\nexport var LEGEND_APPLICATION_REPL_SETTING_KEY;\n(function (LEGEND_APPLICATION_REPL_SETTING_KEY) {\n LEGEND_APPLICATION_REPL_SETTING_KEY[\"PAGINATION\"] = \"application.pagination.enabled\";\n})(LEGEND_APPLICATION_REPL_SETTING_KEY || (LEGEND_APPLICATION_REPL_SETTING_KEY = {}));\nexport var QUERY_FUNCTION;\n(function (QUERY_FUNCTION) {\n QUERY_FUNCTION[\"FILTER\"] = \"filter\";\n QUERY_FUNCTION[\"SORT\"] = \"sort\";\n QUERY_FUNCTION[\"SLICE\"] = \"slice\";\n QUERY_FUNCTION[\"GROUPBY\"] = \"groupBy\";\n QUERY_FUNCTION[\"NOT\"] = \"not\";\n QUERY_FUNCTION[\"FROM\"] = \"from\";\n})(QUERY_FUNCTION || (QUERY_FUNCTION = {}));\nexport const DEFAULT_VARIABLE_NAME = 'x';\n//# sourceMappingURL=Const.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport { HPivotAndSortPanelState } from './HPivotAndSortPanelState.js';\nexport var PIVOT_PANEL_TABS;\n(function (PIVOT_PANEL_TABS) {\n PIVOT_PANEL_TABS[\"COLUMNS_AND_PIVOTS\"] = \"Colums/Pivots\";\n PIVOT_PANEL_TABS[\"HPIVOTS_AND_SORTS\"] = \"HPivots/Sorts\";\n PIVOT_PANEL_TABS[\"GENERAL_PROPERTIES\"] = \"General Properties\";\n PIVOT_PANEL_TABS[\"COLUMN_PROPERTIES\"] = \"Column Properties\";\n PIVOT_PANEL_TABS[\"DEVELOPER_OPTIONS\"] = \"Developer\";\n PIVOT_PANEL_TABS[\"PIVOT_LAYOUT\"] = \"Pivot Layout\";\n})(PIVOT_PANEL_TABS || (PIVOT_PANEL_TABS = {}));\nexport class DataCubePropertiesPanelState {\n dataCubeState;\n selectedPivotPanelTab = PIVOT_PANEL_TABS.COLUMNS_AND_PIVOTS;\n hpivotAndSortPanelState;\n constructor(dataCubeState) {\n makeObservable(this, {\n selectedPivotPanelTab: observable,\n hpivotAndSortPanelState: observable,\n setSelectedPivotPanelTab: action,\n applyChanges: action,\n });\n this.dataCubeState = dataCubeState;\n this.hpivotAndSortPanelState = new HPivotAndSortPanelState(this.dataCubeState);\n }\n setSelectedPivotPanelTab(val) {\n this.selectedPivotPanelTab = val;\n switch (val) {\n case PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS: {\n this.hpivotAndSortPanelState.initialize();\n break;\n }\n default: {\n return;\n }\n }\n }\n applyChanges() {\n this.hpivotAndSortPanelState.applyChanges();\n }\n}\n//# sourceMappingURL=DataCubePropertiesPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray, hashObject, hashValue } from '@finos/legend-shared';\nimport { SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX } from './MetaModelConst.js';\n/**\n * The main point of maintaining this enum is to keep lessen magic string in hash computation\n * so that we are less error-prone in the process of defining hash.\n *\n * These tokens will be used in the definition of the hash as marker for the type of the strucure\n * arguably some of these can be redundant since this information is encoded in the resulting hash\n * code anyway, but sometimes when polymorphism manifests, such as when we have an array of structure\n * which are subclasses of an abstract stucture, hashing the marker is sometimes the only way to\n * discern between instances of different sub-structures\n *\n * TODO: when we refactor hashing, we could potentially move this to graphManager/changeDetection/\n */\nexport var CORE_HASH_STRUCTURE;\n(function (CORE_HASH_STRUCTURE) {\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_ELEMENT\"] = \"INTERNAL__UNKNOWN_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\"] = \"INTERNAL__UNKNOWN_PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\"] = \"INTERNAL__UNKNOWN_FUNCTION_ACTIVATOR\";\n CORE_HASH_STRUCTURE[\"PACKAGE\"] = \"PACKAGE\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT\"] = \"PACKAGEABLE_ELEMENT\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_ELEMENT_POINTER\"] = \"PACKAGEABLE_ELEMENT_POINTER\";\n // domain\n CORE_HASH_STRUCTURE[\"PROFILE\"] = \"PROFILE\";\n CORE_HASH_STRUCTURE[\"TAG_POINTER\"] = \"TAG_POINTER\";\n CORE_HASH_STRUCTURE[\"STEREOTYPE_POINTER\"] = \"STEREOTYPE_POINTER\";\n CORE_HASH_STRUCTURE[\"TAGGED_VALUE\"] = \"TAGGED_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUMERATION\"] = \"ENUMERATION\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE\"] = \"ENUM_VALUE\";\n CORE_HASH_STRUCTURE[\"CLASS\"] = \"CLASS\";\n CORE_HASH_STRUCTURE[\"PROPERTY\"] = \"PROPERTY\";\n CORE_HASH_STRUCTURE[\"PROPERTY_DEFAULT_VALUE\"] = \"PROPERTY_DEFAULT_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_POINTER\"] = \"PROPERTY_POINTER\";\n CORE_HASH_STRUCTURE[\"MULTIPLICITY\"] = \"MULTIPLICITY\";\n CORE_HASH_STRUCTURE[\"CONSTRAINT\"] = \"CONSTRAINT\";\n CORE_HASH_STRUCTURE[\"DERIVED_PROPERTY\"] = \"DERIVED_PROPERTY\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION\"] = \"ASSOCIATION\";\n CORE_HASH_STRUCTURE[\"FUNCTION\"] = \"FUNCTION\";\n CORE_HASH_STRUCTURE[\"MEASURE\"] = \"MEASURE\";\n CORE_HASH_STRUCTURE[\"UNIT\"] = \"UNIT\";\n // function test\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST_SUITE\"] = \"FUNCTION_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TEST\"] = \"FUNCTION_TEST\";\n CORE_HASH_STRUCTURE[\"FUNCTION_STORE_TEST_DATA\"] = \"FUNCTION_STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"FUNCTION_PARAMETER_VALUE\"] = \"FUNCTION_PARAMETER_VALUE\";\n // testable\n CORE_HASH_STRUCTURE[\"ASSERT_FAIL\"] = \"ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"ASSERT_PASS\"] = \"ASSERT_PASS\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON_ASSERT_FAIL\"] = \"EQUAL_TO_JSON_ASSERT_FAIL\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO\"] = \"EQUAL_TO\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_JSON\"] = \"EQUAL_TO_JSON\";\n CORE_HASH_STRUCTURE[\"EQUAL_TO_TDS\"] = \"EQUAL_TO_TDS\";\n // section index\n CORE_HASH_STRUCTURE[\"SECTION_INDEX\"] = \"SECTION_INDEX\";\n CORE_HASH_STRUCTURE[\"SECTION\"] = \"SECTION\";\n CORE_HASH_STRUCTURE[\"IMPORT_AWARE_CODE_SECTION\"] = \"IMPORT_AWARE_CODE_SECTION\";\n CORE_HASH_STRUCTURE[\"DEFAULT_CODE_SECTION\"] = \"DEFAULT_CODE_SECTION\";\n // raw value specification\n CORE_HASH_STRUCTURE[\"RAW_LAMBDA\"] = \"RAW_LAMBDA\";\n CORE_HASH_STRUCTURE[\"RAW_VARIABLE\"] = \"RAW_VARIABLE\";\n CORE_HASH_STRUCTURE[\"RAW_INSTANCE_VALUE\"] = \"RAW_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"BINDING_TRANSFORMER\"] = \"BINDING_TRANSFORMER\";\n // value specification\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_VALUE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__PROPAGATED_VALUE\"] = \"INTERNAL__PROPAGATED_VALUE\";\n CORE_HASH_STRUCTURE[\"VARIABLE_EXPRESSION\"] = \"VARIABLE_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"EXPRESSION\"] = \"EXPRESSION\";\n CORE_HASH_STRUCTURE[\"FUNCTION_EXPRESSION\"] = \"FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"SIMPLE_FUNCTION_EXPRESSION\"] = \"SIMPLE_FUNCTION_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"ABSTRACT_PROPERTY_EXPRESSION\"] = \"ABSTRACT_PROPERTY_EXPRESSION\";\n CORE_HASH_STRUCTURE[\"INSTANCE_VALUE\"] = \"INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PRIMITIVE_INSTANCE_VALUE\"] = \"PRIMITIVE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ENUM_INSTANCE_VALUE\"] = \"ENUM_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_INSTANCE_VALUE\"] = \"KEY_EXPRESSION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"KEY_EXPRESSION_VALUE\"] = \"KEY_EXPRESSION_VALUE\";\n CORE_HASH_STRUCTURE[\"RUNTIME_INSTANCE_VALUE\"] = \"RUNTIME_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PAIR_INSTANCE_VALUE\"] = \"PAIR_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"MAPPING_INSTANCE_VALUE\"] = \"MAPPING_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PURE_LIST_INSTANCE_VALUE\"] = \"PURE_LIST_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"COLLECTION_INSTANCE_VALUE\"] = \"COLLECTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION_INSTANCE_VALUE\"] = \"LAMBDA_FUNCTION_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"FUNCTION_TYPE\"] = \"FUNCTION_TYPE\";\n CORE_HASH_STRUCTURE[\"LAMBDA_FUNCTION\"] = \"LAMBDA_FUNCTION\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\"] = \"ALLOY_SERIALIZATION_CONFIG_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ALLOY_SERIALIZATION_CONFIG\"] = \"ALLOY_SERIALIZATION_CONFIG\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE\"] = \"ROOT_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"PROPERTY_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"SUBTYPE_GRAPH_FETCH_TREE\";\n CORE_HASH_STRUCTURE[\"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"SUBTYPE_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"PROPERTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"PROEPRTY_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\"] = \"ROOT_GRAPH_FETCH_TREE_INSTANCE_VALUE\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC_ARRAY\"] = \"RELATION_COL_SPEC_ARRAY\";\n CORE_HASH_STRUCTURE[\"RELATION_COL_SPEC\"] = \"RELATION_COL_SPEC\";\n // ---------------------------------- DSL Mapping --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_STORE\"] = \"INTERNAL__UNKNOWN_STORE\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CONNECTION\"] = \"INTERNAL__UNKNOWN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_PROPERTY_MAPPING\"] = \"INTERNAL__UNKNOWN_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_CLASS_MAPPING\"] = \"INTERNAL__UNKNOWN_CLASS_MAPPING\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_MAPPING_INCLUDE\"] = \"INTERNAL__UNKNOWN_MAPPING_INCLUDE\";\n CORE_HASH_STRUCTURE[\"MAPPING\"] = \"MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_INCLUDE_MAPPING\"] = \"MAPPING_INCLUDE_MAPPING\";\n CORE_HASH_STRUCTURE[\"ASSOCIATION_IMPLEMENTATION\"] = \"ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_ASSOCIATION_IMPLEMENTATION\"] = \"RELATIONAL_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"XSTORE_ASSOCIATION_IMPLEMENTATION\"] = \"XSTORE_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"ENUMERATION_MAPPING\"] = \"ENUMERATION_MAPPING\";\n CORE_HASH_STRUCTURE[\"ENUM_VALUE_MAPPING\"] = \"ENUM_VALUE_MAPPING\";\n CORE_HASH_STRUCTURE[\"SET_IMPLEMENTATION\"] = \"SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"OPERATION_SET_IMPLEMENTATION\"] = \"OPERATION_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PURE_INSTANCE_SET_IMPLEMENTATION\"] = \"PURE_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"PROPERTY_MAPPING\"] = \"PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"LOCAL_MAPPING_PROPERTY\"] = \"LOCAL_MAPPING_PROPERTY\";\n CORE_HASH_STRUCTURE[\"PURE_PROPERTY_MAPPING\"] = \"PURE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"XSTORE_PROPERTY_MAPPING\"] = \"XSTORE_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_LEGACY\"] = \"MAPPING_TEST_LEGACY\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_SUITE\"] = \"MAPPING_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST\"] = \"MAPPING_TEST\";\n CORE_HASH_STRUCTURE[\"STORE_TEST_DATA\"] = \"STORE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"INPUT_DATA\"] = \"INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INPUT_DATA\"] = \"FLAT_DATA_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INPUT_DATA\"] = \"RELATIONAL_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"OBJECT_INPUT_DATA\"] = \"OBJECT_INPUT_DATA\";\n CORE_HASH_STRUCTURE[\"MAPPING_TEST_ASSERT\"] = \"MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\"] = \"EXPECTED_OUTPUT_MAPPING_TEST_ASSERT\";\n CORE_HASH_STRUCTURE[\"FILTER_MAPPING\"] = \"FILTER_MAPPING\";\n CORE_HASH_STRUCTURE[\"COLUMN_MAPPING\"] = \"COLUMN_MAPPING\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_MAPPING\"] = \"GROUP_BY_MAPPING\";\n // runtime\n CORE_HASH_STRUCTURE[\"RUNTIME\"] = \"RUNTIME\";\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_RUNTIME\"] = \"PACKAGEABLE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"ENGINE_RUNTIME\"] = \"ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"SINGLE_ENGINE_RUNTIME\"] = \"SINGLE_ENGINE_RUNTIME\";\n CORE_HASH_STRUCTURE[\"LEGACY_RUNTIME\"] = \"LEGACY_RUNTIME\";\n CORE_HASH_STRUCTURE[\"RUNTIME_POINTER\"] = \"RUNTIME_POINTER\";\n CORE_HASH_STRUCTURE[\"STORE_CONNECTIONS\"] = \"STORE_CONNECTIONS\";\n CORE_HASH_STRUCTURE[\"IDENTIFIED_CONNECTION\"] = \"IDENTIFIED_CONNECTION\";\n // connection\n CORE_HASH_STRUCTURE[\"PACKAGEABLE_CONNECTION\"] = \"PACKAGEABLE_CONNECTION\";\n CORE_HASH_STRUCTURE[\"CONNECTION_POINTER\"] = \"CONNECTION_POINTER\";\n CORE_HASH_STRUCTURE[\"XML_MODEL_CONNECTION\"] = \"XML_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"JSON_MODEL_CONNECTION\"] = \"JSON_MODEL_CONNECTION\";\n CORE_HASH_STRUCTURE[\"MODEL_CHAIN_CONNECTION\"] = \"MODEL_CHAIN_CONNECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_CONNECTION\"] = \"FLAT_DATA_CONNECTION\";\n // aggregation aware mapping\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_MAPPING\"] = \"AGGREGATION_AWARE_MAPPING\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SPECIFICATION\"] = \"AGGREGATION_AWARE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\"] = \"AGGREGATION_AWARE_SET_IMPLEMENTATION_CONTAINER\";\n CORE_HASH_STRUCTURE[\"AGGREGATE_FUNCTION\"] = \"AGGREGATE_FUNCTION\";\n CORE_HASH_STRUCTURE[\"GROUP_BY_FUNCTION\"] = \"GROUP_BY_FUNCTION\";\n // ---------------------------------- DSL Generation --------------------------------------\n CORE_HASH_STRUCTURE[\"GENERATION_TREE\"] = \"GENERATION_TREE\";\n CORE_HASH_STRUCTURE[\"GENERATION_TREE_NODE\"] = \"GENERATION_TREE_NODE\";\n CORE_HASH_STRUCTURE[\"FILE_GENERATION\"] = \"FILE_GENERATION\";\n CORE_HASH_STRUCTURE[\"CONFIGURATION_PROPERTY\"] = \"CONFIGURATION_PROPERTY\";\n // ---------------------------------- DSL Data --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_EMBEDDED_DATA\"] = \"INTERNAL__UNKNOWN_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_DATA\"] = \"EXTERNAL_FORMAT_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_STORE_DATA\"] = \"MODEL_STORE_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_DATA\"] = \"MODEL_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_EMBEDDED_DATA\"] = \"MODEL_EMBEDDED_DATA\";\n CORE_HASH_STRUCTURE[\"MODEL_INSTANCE_DATA\"] = \"MODEL_INSTANCE_DATA\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT_REFERENCE\"] = \"DATA_ELEMENT_REFERENCE\";\n CORE_HASH_STRUCTURE[\"DATA_ELEMENT\"] = \"DATA_ELEMENT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA\"] = \"RELATIONAL_CSV_DATA\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_TDS\"] = \"RELATIONAL_TDS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_CSV_DATA_TABLE\"] = \"RELATIONAL_CSV_DATA_TABLE\";\n // ---------------------------------- DSL External Format --------------------------------------\n CORE_HASH_STRUCTURE[\"BINDING\"] = \"BINDING\";\n CORE_HASH_STRUCTURE[\"SCHEMA_SET\"] = \"SCHEMA_SET\";\n CORE_HASH_STRUCTURE[\"SCHEMA\"] = \"SCHEMA\";\n CORE_HASH_STRUCTURE[\"MODEL_UNIT\"] = \"MODEL_UNIT\";\n CORE_HASH_STRUCTURE[\"URL_STREAM\"] = \"URL_STREAM\";\n CORE_HASH_STRUCTURE[\"EXTERNAL_FORMAT_CONNECTION\"] = \"EXTERNAL_FORMAT_CONNECTION\";\n // ---------------------------------- DSL Service --------------------------------------\n CORE_HASH_STRUCTURE[\"SERVICE\"] = \"SERVICE\";\n CORE_HASH_STRUCTURE[\"SERVICE_OWNER\"] = \"SERVICE_OWNER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_EXECUTION\"] = \"SERVICE_PURE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_SINGLE_EXECUTION\"] = \"SERVICE_PURE_SINGLE_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_KEYED_EXECUTION_PARAMETER\"] = \"SERVICE_KEYED_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"SERVICE_PURE_MULTI_EXECUTION\"] = \"SERVICE_PURE_MULTI_EXECUTION\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_CONTAINER\"] = \"SERVICE_TEST_CONTAINER\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\"] = \"SERVICE_LEGACY_KEYED_SINGLE_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_LEGACY_MULTI_EXECUTION_TEST\"] = \"SERVICE_LEGACY_MULTI_EXECUTION_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_CONNECTION_TEST_DATA\"] = \"SERVICE_CONNECTION_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_DATA\"] = \"SERVICE_TEST_DATA\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST_SUITE\"] = \"SERVICE_TEST_SUITE\";\n CORE_HASH_STRUCTURE[\"SERVICE_TEST\"] = \"SERVICE_TEST\";\n CORE_HASH_STRUCTURE[\"SERVICE_PARAMETER_VALUE\"] = \"SERVICE_PARAMETER_VALUE\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION\"] = \"SERVICE_POST_VALIDATION\";\n CORE_HASH_STRUCTURE[\"SERVICE_POST_VALIDATION_ASSERTION\"] = \"SERVICE_POST_VALIDATION_ASSERTION\";\n // execution environment instance\n CORE_HASH_STRUCTURE[\"EXECUTION_ENVIRONMENT_INSTANCE\"] = \"EXECUTION_ENVIRONMENT_INSTANCE\";\n CORE_HASH_STRUCTURE[\"SINGLE_EXECUTION_PARAMETER\"] = \"SINGLE_EXECUTION_PARAMETER\";\n CORE_HASH_STRUCTURE[\"MULTI_EXECUTION_PARAMETER\"] = \"MULTI_EXECUTION_PARAMETER\";\n // ---------------------------------- STO Relational --------------------------------------\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\"] = \"INTERNAL__UNKNOWN_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\"] = \"INTERNAL__UNKNOWN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"INTERNAL__UNKNOWN_POST_PROCESSOR\"] = \"INTERNAL__UNKNOWN_POST_PROCESSOR\";\n // database\n CORE_HASH_STRUCTURE[\"DATABASE\"] = \"DATABASE\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA\"] = \"DATABASE_SCHEMA\";\n CORE_HASH_STRUCTURE[\"DATABASE_JOIN\"] = \"DATABASE_JOIN\";\n CORE_HASH_STRUCTURE[\"DATABASE_FILTER\"] = \"DATABASE_FILTER\";\n CORE_HASH_STRUCTURE[\"DATBASE_VIEW\"] = \"DATBASE_VIEW\";\n CORE_HASH_STRUCTURE[\"DATABASE_SCHEMA_TABLE\"] = \"DATABASE_SCHEMA_TABLE\";\n CORE_HASH_STRUCTURE[\"DATABASE_TABLE_COLUMN\"] = \"DATABASE_TABLE_COLUMN\";\n // relational operation element\n CORE_HASH_STRUCTURE[\"RELATIONAL\"] = \"RELATIONAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_DYNA_FUNC\"] = \"RELATIONAL_OPERATION_DYNA_FUNC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\"] = \"RELATIONAL_OPERATION_ELEMENTS_WITH_JOINS\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL\"] = \"RELATIONAL_OPERATION_LITERAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_LITERAL_LIST\"] = \"RELATIONAL_OPERATION_LITERAL_LIST\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\"] = \"RELATIONAL_OPERATION_TABLE_ALIAS_COLUMN\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_TABLE_POINTER\"] = \"RELATIONAL_OPERATION_TABLE_POINTER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_OPERATION_JOIN_POINTER\"] = \"RELATIONAL_OPERATION_JOIN_POINTER\";\n // relational data type\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARCHAR\"] = \"RELATIONAL_DATATYPE_VARCHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_CHAR\"] = \"RELATIONAL_DATATYPE_CHAR\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_VARBINARY\"] = \"RELATIONAL_DATATYPE_VARBINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BINARY\"] = \"RELATIONAL_DATATYPE_BINARY\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIT\"] = \"RELATIONAL_DATATYPE_BIT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_INTEGER\"] = \"RELATIONAL_DATATYPE_INTEGER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_BIGINT\"] = \"RELATIONAL_DATATYPE_BIGINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SMALLINT\"] = \"RELATIONAL_DATATYPE_SMALLINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TINYINT\"] = \"RELATIONAL_DATATYPE_TINYINT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_NUMERIC\"] = \"RELATIONAL_DATATYPE_NUMERIC\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DECIMAL\"] = \"RELATIONAL_DATATYPE_DECIMAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DOUBLE\"] = \"RELATIONAL_DATATYPE_DOUBLE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_FLOAT\"] = \"RELATIONAL_DATATYPE_FLOAT\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_REAL\"] = \"RELATIONAL_DATATYPE_REAL\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_DATE\"] = \"RELATIONAL_DATATYPE_DATE\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_TIMESTAMP\"] = \"RELATIONAL_DATATYPE_TIMESTAMP\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_OTHER\"] = \"RELATIONAL_DATATYPE_OTHER\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_SEMISTRUCTURED\"] = \"RELATIONAL_DATATYPE_SEMISTRUCTURED\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATATYPE_JSON\"] = \"RELATIONAL_DATATYPE_JSON\";\n // relational mapping\n CORE_HASH_STRUCTURE[\"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"ROOT_RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\"] = \"RELATIONAL_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"REALTIONAL_PROPERTY_MAPPING\"] = \"REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"INLINE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\"] = \"OTHERWISE_EMBEDDED_REALTIONAL_PROPERTY_MAPPING\";\n // milestoning\n CORE_HASH_STRUCTURE[\"BUSINESS_MILESTONING\"] = \"BUSINESS_MILESTONING\";\n CORE_HASH_STRUCTURE[\"BUSINESS_SNAPSHOT_MILESTONING\"] = \"BUSINESS_SNAPSHOT_MILESTONING\";\n CORE_HASH_STRUCTURE[\"PROCESSING_MILESTONING\"] = \"PROCESSING_MILESTONING\";\n // relational database connection\n CORE_HASH_STRUCTURE[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RELATIONAL_DATABASE_CONNECTION\";\n // relational database connection datasource specification\n CORE_HASH_STRUCTURE[\"STATIC_DATASOURCE_SPECIFICATION\"] = \"STATIC_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"LOCAL_H2_DATASOURCE_SPECIFICATION\"] = \"LOCAL_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_H2_DATASOURCE_SPECIFICATION\"] = \"EMBEDDED_H2_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_DATASOURCE_SPECIFICATION\"] = \"SNOWFLAKE_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"REDSHIFT_DATASOURCE_SPECIFICATION\"] = \"REDSHIFT_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"BIGQUERY_DATASOURCE_SPECIFICATION\"] = \"BIGQUERY_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"DATABRICKS_DATASOURCE_SPECIFICATION\"] = \"DATABRICKS_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"SPANNER_DATASOURCE_SPECIFICATION\"] = \"SPANNER_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_DATASOURCE_SPECIFICATION\"] = \"TRINO_DATASOURCE_SPECIFICATION\";\n CORE_HASH_STRUCTURE[\"TRINO_SSL_SPECIFICATION\"] = \"TRINO_SSL_SPECIFICATION\";\n // relational database connection authentication strategy\n CORE_HASH_STRUCTURE[\"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\"] = \"DELEGRATED_KEREBEROS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"DEFAULT_H2_AUTHENTICATION_STRATEGY\"] = \"DEFAULT_H2_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\"] = \"SNOWFLAKE_PUBLIC_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"API_TOKEN_AUTHENTICATION_STRATEGY\"] = \"API_TOKEN_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\"] = \"GCP_APPLICATION_DEFAULT_CREDENTIALS_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"OAUTH_AUTHENTICATION_STRATEGY\"] = \"OAUTH_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\"] = \"GCP_WORKLOAD_IDENTITY_FEDERATION_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\"] = \"MIDDLE_TIER_USERNAME_PASSWORD_AUTHENTICATION_STRATEGY\";\n CORE_HASH_STRUCTURE[\"TRINO_DELEGATED_KERBEROS_AUTHENTICATION_STRATEGY\"] = \"TRINO_KEREBEROS_AUTHENTICATION_STRATEGY\";\n // relational database connection post-processors\n CORE_HASH_STRUCTURE[\"MAPPER_POST_PROCESSOR\"] = \"MAPPER_POST_PROCESSOR\";\n CORE_HASH_STRUCTURE[\"SCHEMA_MAPPER\"] = \"SCHEMA_MAPPER\";\n CORE_HASH_STRUCTURE[\"TABLE_MAPPER\"] = \"TABLE_MAPPER\";\n // ---------------------------------- STO Flat-Data --------------------------------------\n CORE_HASH_STRUCTURE[\"FLAT_DATA\"] = \"FLAT_DATA\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION\"] = \"FLAT_DATA_SECTION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY\"] = \"FLAT_DATA_PROPERTY\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ROOT_RECORD_TYPE\"] = \"FLAT_DATA_ROOT_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_TYPE\"] = \"FLAT_DATA_RECORD_TYPE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_RECORD_FIELD\"] = \"FLAT_DATA_RECORD_FIELD\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRING\"] = \"FLAT_DATA_STRING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_BOOLEAN\"] = \"FLAT_DATA_BOOLEAN\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_NUMBER\"] = \"FLAT_DATA_NUMBER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INTEGER\"] = \"FLAT_DATA_INTEGER\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_FLOAT\"] = \"FLAT_DATA_FLOAT\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DECIMAL\"] = \"FLAT_DATA_DECIMAL\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE\"] = \"FLAT_DATA_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_DATE_TIME\"] = \"FLAT_DATA_DATE_TIME\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_STRICT_DATE\"] = \"FLAT_DATA_STRICT_DATE\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\"] = \"FLAT_DATA_INSTANCE_SET_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_PROPERTY_MAPPING\"] = \"FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\"] = \"FLAT_DATA_ASSOCIATION_IMPLEMENTATION\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\"] = \"FLAT_DATA_ASSOCIATION_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\"] = \"EMBEDDED_FLAT_DATA_PROPERTY_MAPPING\";\n CORE_HASH_STRUCTURE[\"FLAT_DATA_SECTION_POINTER\"] = \"FLAT_DATA_SECTION_POINTER\";\n // -------------------------------------- Function Activator --------------------------------------\n CORE_HASH_STRUCTURE[\"SNOWFLAKE_APP\"] = \"SNOWFLAKE_APP\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE\"] = \"HOSTED_SERVICE\";\n CORE_HASH_STRUCTURE[\"HOSTED_SERVICE_OWNER\"] = \"HOSTED_SERVICE_OWNER\";\n})(CORE_HASH_STRUCTURE || (CORE_HASH_STRUCTURE = {}));\nexport const hashObjectWithoutSourceInformation = (val) => hashObject(val, {\n /**\n * NOTE: this is over-simplification as there could be source information fields with other names\n * see note in {@link pruneSourceInformation}\n */\n excludeKeys: (propKey) => propKey\n .toLowerCase()\n .endsWith(SOURCE_INFORMATION_PROPERTY_KEY_SUFFIX.toLowerCase()),\n});\nexport const hashRawLambda = (parameters, body) => hashArray([\n parameters ? hashObjectWithoutSourceInformation(parameters) : '',\n body ? hashObjectWithoutSourceInformation(body) : '',\n]);\nexport const hashElementPointer = (pointerType, path) => [CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER, pointerType ?? '', path]\n .map(hashValue)\n .join(',');\n//# sourceMappingURL=Core_HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, makeObservable, observable } from 'mobx';\nimport { LEGEND_APPLICATION_REPL_SETTING_KEY } from '../../Const.js';\nexport class DataCubeConfigState {\n dataCubeState;\n licenseKey;\n isPaginationEnabled;\n gridApi;\n isPivotPanelOpened = false;\n constructor(dataCubeState) {\n makeObservable(this, {\n licenseKey: observable,\n isPaginationEnabled: observable,\n gridApi: observable,\n isPivotPanelOpened: observable,\n setGridApi: action,\n setLicenseKey: action,\n setIsPaginationEnabled: action,\n setIsPivotPanelOpened: action,\n openPanel: action,\n closePanel: action,\n });\n this.dataCubeState = dataCubeState;\n this.isPaginationEnabled =\n dataCubeState.editorStore.applicationStore.settingService.getBooleanValue(LEGEND_APPLICATION_REPL_SETTING_KEY.PAGINATION) ?? true;\n }\n setIsPivotPanelOpened(val) {\n this.isPivotPanelOpened = val;\n }\n setGridApi(val) {\n this.gridApi = val;\n }\n setLicenseKey(val) {\n this.licenseKey = val;\n }\n setIsPaginationEnabled(val) {\n this.isPaginationEnabled = val;\n }\n openPanel() {\n this.dataCubeState.configState.setIsPivotPanelOpened(true);\n this.dataCubeState.propertiesPanelState.hpivotAndSortPanelState.initialize();\n }\n closePanel() {\n this.dataCubeState.configState.setIsPivotPanelOpened(false);\n this.dataCubeState.propertiesPanelState.hpivotAndSortPanelState.setIsInitialized(false);\n }\n}\n//# sourceMappingURL=DataCubeConfigState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class DataCubePanelState {\n dataCubeState;\n constructor(dataCubeState) {\n this.dataCubeState = dataCubeState;\n }\n}\n//# sourceMappingURL=DataCubePanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { action, computed, makeObservable, observable } from 'mobx';\nimport { DataCubePanelState } from './DataCubePanelState.js';\nimport { TDSSort, TDS_SORT_ORDER } from '../../components/grid/TDSRequest.js';\nexport class HPivotAndSortPanelState extends DataCubePanelState {\n isInitialized = false;\n availableSortColumns = [];\n selectedSortColumns = [];\n availableSortColumnsSearchText = '';\n selectedSortColumnsSearchText = '';\n constructor(dataCubeState) {\n super(dataCubeState);\n makeObservable(this, {\n isInitialized: observable,\n availableSortColumns: observable,\n selectedSortColumns: observable,\n availableSortColumnsSearchText: observable,\n selectedSortColumnsSearchText: observable,\n setAvailableSortColumns: action,\n setSelectedSortColumns: action,\n setIsInitialized: action,\n addAvailableSortColumn: action,\n addSelectedSortColumn: action,\n addAllAvailableSortColumns: action,\n addAllSelectedSortColumns: action,\n applyChanges: action,\n initialize: action,\n setSelectedSortColumnsSearchText: action,\n setAvailableSortColumnsSearchText: action,\n availableSortColumnsSearchResults: computed,\n selectedSortColumnsSearchResults: computed,\n });\n }\n setAvailableSortColumns(val) {\n this.availableSortColumns = val;\n }\n setSelectedSortColumns(val) {\n this.selectedSortColumns = val;\n }\n setIsInitialized(val) {\n this.isInitialized = val;\n }\n initialize() {\n if (!this.isInitialized) {\n this.selectedSortColumns =\n this.dataCubeState.gridState.lastQueryTDSRequest?.sort.map((col) => new TDSSort(col.column, col.order)) ?? [];\n this.availableSortColumns =\n this.dataCubeState.gridState.columns\n ?.filter((col) => !this.selectedSortColumns.find((c) => c.column === col))\n .map((col) => new TDSSort(col, TDS_SORT_ORDER.ASCENDING)) ?? [];\n this.setIsInitialized(true);\n }\n }\n addAvailableSortColumn(columnName) {\n const column = this.availableSortColumns.find((col) => col.column === columnName);\n if (column) {\n this.setAvailableSortColumns(this.availableSortColumns.filter((col) => col.column !== columnName));\n this.setSelectedSortColumns(this.selectedSortColumns.concat(column));\n }\n }\n addSelectedSortColumn(columnName) {\n const column = this.selectedSortColumns.find((col) => col.column === columnName);\n if (column) {\n this.setSelectedSortColumns(this.selectedSortColumns.filter((col) => col.column !== columnName));\n this.setAvailableSortColumns(this.availableSortColumns.concat(column));\n }\n }\n addAllAvailableSortColumns() {\n this.setSelectedSortColumns(this.selectedSortColumns.concat(this.availableSortColumns));\n this.setAvailableSortColumns([]);\n }\n addAllSelectedSortColumns() {\n this.setAvailableSortColumns(this.availableSortColumns.concat(this.selectedSortColumns));\n this.setSelectedSortColumns([]);\n }\n applyChanges() {\n if (this.dataCubeState.configState.gridApi) {\n const columnDefs = this.dataCubeState.configState.gridApi.getColumnDefs();\n this.selectedSortColumns.forEach((col) => {\n const colDef = columnDefs?.find((cold) => 'colId' in cold && cold.colId === col.column);\n if (colDef && 'sort' in colDef) {\n colDef.sort = col.order === TDS_SORT_ORDER.ASCENDING ? 'asc' : 'desc';\n }\n });\n this.dataCubeState.configState.gridApi.setGridOption('columnDefs', columnDefs);\n this.dataCubeState.configState.gridApi.onSortChanged();\n }\n }\n setAvailableSortColumnsSearchText(val) {\n this.availableSortColumnsSearchText = val;\n }\n setSelectedSortColumnsSearchText(val) {\n this.selectedSortColumnsSearchText = val;\n }\n get availableSortColumnsSearchResults() {\n if (this.availableSortColumnsSearchText) {\n return this.availableSortColumns.filter((col) => col.column\n .toLowerCase()\n .startsWith(this.availableSortColumnsSearchText.toLowerCase()));\n }\n else {\n return this.availableSortColumns;\n }\n }\n get selectedSortColumnsSearchResults() {\n if (this.selectedSortColumnsSearchText) {\n return this.selectedSortColumns.filter((col) => col.column\n .toLowerCase()\n .startsWith(this.selectedSortColumnsSearchText.toLowerCase()));\n }\n else {\n return this.selectedSortColumns;\n }\n }\n}\n//# sourceMappingURL=HPivotAndSortPanelState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ValueSpecification {\n}\n//# sourceMappingURL=V1_ValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../model/valueSpecification/V1_ValueSpecification.js';\nexport class V1_Variable extends V1_ValueSpecification {\n name;\n multiplicity;\n class;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Variable(this);\n }\n}\n//# sourceMappingURL=V1_Variable.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_GraphFetchTree {\n subTrees = [];\n subTypeTrees = [];\n}\n//# sourceMappingURL=V1_GraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nexport class V1_RootGraphFetchTree extends V1_GraphFetchTree {\n class;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_RootGraphFetchTree(this);\n }\n}\n//# sourceMappingURL=V1_RootGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport hash from 'hash.js';\nimport { default as objectHash, } from 'object-hash';\nimport { assertTrue, isObject, isBoolean, isNumber, isString, isNonNullable, } from '../error/AssertionUtils.js';\nexport const hashValue = (val) => hash.sha1().update(val).digest('hex');\nexport const hashUnknownValue = (val) => {\n assertTrue(isString(val) || isBoolean(val) || isNumber(val), `Can't hash non-primitive value`);\n return hashValue(val);\n};\nexport const hashArray = (arr) => hashValue(arr\n .filter(isNonNullable)\n .map((val) => typeof val === 'string' ||\n typeof val === 'boolean' ||\n typeof val === 'number'\n ? hashValue(val)\n : val.hashCode)\n .join(','));\n/**\n * NOTE: `node-object-hash` seems to be the much more efficient library. But it's based on Node's `crypto` module\n * which is not supported in browser (so we have map `crypto` module to `crypto-browserify` or `crypto-js`).\n * If this object-hashing becomes the performance bottle-neck, we should think about adopting this hashing library\n * See https://www.npmjs.com/package/node-object-hash\n */\nexport const hashObject = (value, options) => {\n assertTrue(isObject(value), `Can't hash non-object value`);\n return objectHash(value, options);\n};\n/**\n * This method can be used to debug hashing.\n *\n * We have tried to come up with a more robust way to debug hash, such as to construct the hash tree, but that's not\n * quite feasible for the following reasons:\n * 1. Since sometimes there are properties we don't drill down like for a class, we just take the path, we don't have\n * a systematic way to construct the hash tree, so we have to rely on the implementation of the hashCode function\n * in each element, which defeats the purpose of having a generic approach for debugging hash\n * 2. If we ignore the implementation detail of `get hashCode` and expand the property if it has `hashCode` then we\n * might risk getting into an infinite loop\n * 3. The manual way to come up with the `get hashCode` is in order to reconcile the differences between metamodels and\n * protocol models. If we only compare metamodels to protocol models for example, the problem might be less complicated,\n * but we're dealing with 2 hash systems (in a way)\n * 4. As such, the best solution at the moment is to come up with a function like this\n * to debug hash where we can put it at a top level structure like `Mapping` and then choose which part of the hash\n * we would like to `explore`\n *\n * @param typesToExpand when we trickle down the object properties, we want to drill down so we want to choose\n * the property to drill down (by its type) since sometimes we don't need to compute the\n * actual hash code for the property (for example: a class, or an enumeration) while computing\n * the hash, just their path.\n */\nexport const debugHash = (obj, typesToExpand, depth = 0) => {\n let res = depth !== 0 ? `${obj.hashCode}` : '';\n res += ` {\\n`;\n Object.entries(obj)\n .filter(([key, value]) => typeof value === 'object' &&\n (!Array.isArray(value) ||\n (value.length !== 0 &&\n value.every((v) => typesToExpand.some((typeToExpand) => v instanceof typeToExpand)))) &&\n (Array.isArray(value) ||\n typesToExpand.some((typeToExpand) => value instanceof typeToExpand)))\n .forEach(([key, value]) => {\n res += `${' '.repeat(depth + 1)}${key}: ${Array.isArray(value)\n ? !value.length\n ? '[]'\n : `[\\n${' '.repeat(depth + 2)}${value\n .map((val, idx) => `${idx}: ${debugHash(val, typesToExpand, depth + 2)}`)\n .join(`\\n${' '.repeat(depth + 2)}`)}\\n${' '.repeat(depth + 1)}]`\n : debugHash(value, typesToExpand, depth + 1)}\\n`;\n });\n res += `${' '.repeat(depth)}}`;\n return res;\n};\n//# sourceMappingURL=HashUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_Multiplicity {\n lowerBound = 0;\n upperBound;\n constructor(lowerBound, upperBound) {\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.MULTIPLICITY,\n this.lowerBound.toString(),\n this.upperBound?.toString() ?? '',\n ]);\n }\n // common multiplicities\n static ZERO = new V1_Multiplicity(0, 0);\n static ZERO_ONE = new V1_Multiplicity(0, 1);\n static ZERO_MANY = new V1_Multiplicity(0, undefined);\n static ONE = new V1_Multiplicity(1, 1);\n static ONE_MANY = new V1_Multiplicity(1, undefined);\n}\n//# sourceMappingURL=V1_Multiplicity.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\n/**\n * Similar to class instances, but these constructs are too fundamental for the system\n * so we group them as **core** class instances.\n */\nexport class V1_CoreClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_CoreClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_Lambda extends V1_CoreClassInstance {\n body = [];\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Lambda(this);\n }\n}\n//# sourceMappingURL=V1_Lambda.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_DataTypeValueSpecification extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_DataTypeValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_Path {\n name;\n startType;\n path = [];\n}\n//# sourceMappingURL=V1_Path.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification } from '../V1_ValueSpecification.js';\nexport class V1_AbstractAppliedFunction extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n}\n//# sourceMappingURL=V1_AbstractAppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedFunction extends V1_AbstractAppliedFunction {\n function;\n fControl;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedFunction(this);\n }\n}\n//# sourceMappingURL=V1_AppliedFunction.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nexport class V1_Collection extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE_MANY;\n values = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_Collection(this);\n }\n}\n//# sourceMappingURL=V1_Collection.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_PrimitiveValueSpecification extends V1_DataTypeValueSpecification {\n}\n//# sourceMappingURL=V1_PrimitiveValueSpecification.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDecimal extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDecimal(this);\n }\n}\n//# sourceMappingURL=V1_CDecimal.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CInteger extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CInteger(this);\n }\n}\n//# sourceMappingURL=V1_CInteger.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CString extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CString(this);\n }\n}\n//# sourceMappingURL=V1_CString.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CFloat extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CFloat(this);\n }\n}\n//# sourceMappingURL=V1_CFloat.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CDate extends V1_PrimitiveValueSpecification {\n}\n//# sourceMappingURL=V1_CDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CDateTime extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CDateTime(this);\n }\n}\n//# sourceMappingURL=V1_CDateTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CStrictDate extends V1_CDate {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictDate(this);\n }\n}\n//# sourceMappingURL=V1_CStrictDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CStrictTime extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CStrictTime(this);\n }\n}\n//# sourceMappingURL=V1_CStrictTime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CBoolean extends V1_PrimitiveValueSpecification {\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CBoolean(this);\n }\n}\n//# sourceMappingURL=V1_CBoolean.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_AggregateValue {\n mapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_AggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_Pair {\n first;\n second;\n}\n//# sourceMappingURL=V1_Pair.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_RuntimeInstance {\n runtime;\n}\n//# sourceMappingURL=V1_RuntimeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ExecutionContextInstance {\n executionContext;\n}\n//# sourceMappingURL=V1_ExecutionContextInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nexport class V1_PropertyGraphFetchTree extends V1_GraphFetchTree {\n property;\n parameters = [];\n alias;\n subType;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_PropertyGraphFetchTree(this);\n }\n}\n//# sourceMappingURL=V1_PropertyGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_GraphFetchTree, } from './V1_GraphFetchTree.js';\nexport class V1_SubTypeGraphFetchTree extends V1_GraphFetchTree {\n subTypeClass;\n accept_GraphFetchTreeVisitor(visitor) {\n return visitor.visit_SubTypeGraphFetchTree(this);\n }\n}\n//# sourceMappingURL=V1_SubTypeGraphFetchTree.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_SerializationConfig {\n includeType;\n typeKeyName;\n includeEnumType;\n removePropertiesWithNullValues;\n removePropertiesWithEmptySets;\n fullyQualifiedTypePath;\n includeObjectReference;\n}\n//# sourceMappingURL=V1_SerializationConfig.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CoreClassInstance } from './V1_CoreClassInstance.js';\nexport class V1_KeyExpression extends V1_CoreClassInstance {\n add;\n expression;\n key;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_KeyExpression(this);\n }\n}\n//# sourceMappingURL=V1_KeyExpression.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_PureList {\n values = [];\n}\n//# sourceMappingURL=V1_PureList.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSAggregateValue {\n name;\n pmapFn;\n aggregateFn;\n}\n//# sourceMappingURL=V1_TDSAggregateValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSColumnInformation {\n name;\n columnFn;\n}\n//# sourceMappingURL=V1_TDSColumnInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSSortInformation {\n column;\n direction;\n}\n//# sourceMappingURL=V1_TDSSortInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSOlapRank {\n function;\n}\n//# sourceMappingURL=V1_TDSOlapRank.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_TDSOlapAggregation {\n function;\n columnName;\n}\n//# sourceMappingURL=V1_TDSOlapAggregation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nimport { ELEMENT_PATH_DELIMITER } from '../../../../../../graph/MetaModelConst.js';\nexport class V1_PackageableElement {\n package;\n name;\n /**\n * This logic is specific to the codebase and this is not part of the native metamodel.\n * If needed, we can probably move this out as an utility or do type declaration merge\n * and define this externally using `Object.defineProperty`.\n *\n * @internal model logic\n */\n get path() {\n return `${this.package}${ELEMENT_PATH_DELIMITER}${this.name}`;\n }\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT, this.path]);\n }\n}\nexport class V1_PackageableElementPointer {\n type;\n path;\n constructor(type, path) {\n this.type = type;\n this.path = path;\n }\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_ELEMENT_POINTER,\n this.type ?? '',\n this.path,\n ]);\n }\n}\n//# sourceMappingURL=V1_PackageableElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { primitive, createModelSchema, optional } from 'serializr';\nimport { SerializationFactory, optionalCustomUsingModelSchema, } from '@finos/legend-shared';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_PackageableElementPointer } from '../../../model/packageableElements/V1_PackageableElement.js';\nimport { V1_SourceInformation } from '../../../model/V1_SourceInformation.js';\nexport const V1_sourceInformationSerialization = new SerializationFactory(createModelSchema(V1_SourceInformation, {\n sourceId: primitive(),\n startLine: primitive(),\n startColumn: primitive(),\n endLine: primitive(),\n endColumn: primitive(),\n}));\nexport class V1_INTERNAL__PackageableElementWithSourceInformation {\n package;\n name;\n sourceInformation;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__PackageableElementWithSourceInformation, {\n package: primitive(),\n name: primitive(),\n sourceInformation: optionalCustomUsingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\nexport const V1_packageableElementPointerModelSchema = createModelSchema(V1_PackageableElementPointer, {\n path: primitive(),\n type: optional(primitive()),\n});\nexport const V1_multiplicityModelSchema = createModelSchema(V1_Multiplicity, {\n lowerBound: primitive(),\n upperBound: optional(primitive()),\n});\n//# sourceMappingURL=V1_CoreSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_SourceInformation {\n sourceId;\n startLine;\n startColumn;\n endLine;\n endColumn;\n}\n//# sourceMappingURL=V1_SourceInformation.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_PathElement {\n}\n//# sourceMappingURL=V1_PathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PathElement } from './V1_PathElement.js';\nexport class V1_PropertyPathElement extends V1_PathElement {\n property;\n parameters = [];\n}\n//# sourceMappingURL=V1_PropertyPathElement.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AbstractAppliedFunction } from '../raw/V1_AbstractAppliedFunction.js';\nexport class V1_AppliedProperty extends V1_AbstractAppliedFunction {\n class;\n property;\n parameters = [];\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_AppliedProperty(this);\n }\n}\n//# sourceMappingURL=V1_AppliedProperty.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { hashArray } from '@finos/legend-shared';\nexport class V1_Runtime {\n}\nexport class V1_IdentifiedConnection {\n id;\n connection;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.IDENTIFIED_CONNECTION,\n this.id,\n this.connection,\n ]);\n }\n}\nexport class V1_StoreConnections {\n store;\n storeConnections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.store,\n hashArray(this.storeConnections),\n ]);\n }\n}\nexport class V1_ConnectionStores {\n connectionPointer;\n storePointers = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.STORE_CONNECTIONS,\n this.connectionPointer,\n hashArray(this.storePointers),\n ]);\n }\n}\nexport class V1_EngineRuntime extends V1_Runtime {\n mappings = [];\n connectionStores = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_SingleConnectionEngineRuntime extends V1_EngineRuntime {\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.SINGLE_ENGINE_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connectionStores),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_LegacyRuntime extends V1_Runtime {\n mappings = [];\n connections = [];\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.LEGACY_RUNTIME,\n hashArray(this.mappings),\n hashArray(this.connections),\n ]);\n }\n}\nexport class V1_RuntimePointer extends V1_Runtime {\n runtime;\n get hashCode() {\n return hashArray([CORE_HASH_STRUCTURE.RUNTIME_POINTER, this.runtime]);\n }\n}\n//# sourceMappingURL=V1_Runtime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive, list, custom, serialize, deserialize, object, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, } from '@finos/legend-shared';\nimport { V1_packageableElementPointerModelSchema } from '../../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nimport { V1_PackageableRuntime } from '../../../model/packageableElements/runtime/V1_PackageableRuntime.js';\nimport { V1_EngineRuntime, V1_IdentifiedConnection, V1_LegacyRuntime, V1_RuntimePointer, V1_StoreConnections, V1_ConnectionStores, V1_SingleConnectionEngineRuntime, } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_serializeConnectionValue, V1_deserializeConnectionValue, V1_connectionPointerModelSchema, } from './V1_ConnectionSerializationHelper.js';\nexport const V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE = 'runtime';\nexport var V1_RuntimeType;\n(function (V1_RuntimeType) {\n V1_RuntimeType[\"RUNTIME_POINTER\"] = \"runtimePointer\";\n V1_RuntimeType[\"LEGACY_RUNTIME\"] = \"legacyRuntime\";\n V1_RuntimeType[\"ENGINE_RUNTIME\"] = \"engineRuntime\";\n V1_RuntimeType[\"SINGLE_ENGINE_RUNTIME\"] = \"localEngineRuntime\";\n})(V1_RuntimeType || (V1_RuntimeType = {}));\nexport const V1_runtimePointerModelSchema = createModelSchema(V1_RuntimePointer, {\n _type: usingConstantValueSchema(V1_RuntimeType.RUNTIME_POINTER),\n runtime: primitive(),\n});\nexport const V1_setupLegacyRuntimeSerialization = (plugins) => {\n createModelSchema(V1_LegacyRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.LEGACY_RUNTIME),\n connections: list(custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins))),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_setupEngineRuntimeSerialization = (plugins) => {\n createModelSchema(V1_IdentifiedConnection, {\n connection: custom((val) => V1_serializeConnectionValue(val, true, plugins), (val) => V1_deserializeConnectionValue(val, true, plugins)),\n id: primitive(),\n });\n createModelSchema(V1_ConnectionStores, {\n connectionPointer: usingModelSchema(V1_connectionPointerModelSchema),\n storePointers: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_StoreConnections, {\n store: usingModelSchema(V1_packageableElementPointerModelSchema),\n storeConnections: list(object(V1_IdentifiedConnection)),\n });\n createModelSchema(V1_EngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n createModelSchema(V1_SingleConnectionEngineRuntime, {\n _type: usingConstantValueSchema(V1_RuntimeType.SINGLE_ENGINE_RUNTIME),\n connectionStores: list(object(V1_ConnectionStores)),\n connections: list(object(V1_StoreConnections)),\n mappings: list(usingModelSchema(V1_packageableElementPointerModelSchema)),\n });\n};\nexport const V1_serializeRuntime = (protocol) => {\n if (protocol instanceof V1_EngineRuntime) {\n return serialize(V1_EngineRuntime, protocol);\n }\n else if (protocol instanceof V1_RuntimePointer) {\n return serialize(V1_runtimePointerModelSchema, protocol);\n }\n // NOTE: we don't want to serialize legacy runtime as we no longer want to circulate it any further\n throw new UnsupportedOperationError(`Can't serialize runtime`, protocol);\n};\nexport const V1_deserializeRuntime = (json) => {\n switch (json._type) {\n case V1_RuntimeType.RUNTIME_POINTER:\n return deserialize(V1_runtimePointerModelSchema, json);\n case V1_RuntimeType.ENGINE_RUNTIME:\n return deserialize(V1_EngineRuntime, json);\n case V1_RuntimeType.LEGACY_RUNTIME:\n case undefined:\n return deserialize(V1_LegacyRuntime, json);\n default:\n throw new UnsupportedOperationError(`Can't deeserialize runtime of type '${json._type}'`);\n }\n};\nexport const V1_serializeRuntimeValue = (protocol) => {\n if (protocol instanceof V1_SingleConnectionEngineRuntime) {\n return serialize(V1_SingleConnectionEngineRuntime, protocol);\n }\n return serialize(V1_EngineRuntime, protocol);\n};\nexport const V1_deserializeRuntimeValue = (json) => {\n if (json._type === V1_RuntimeType.SINGLE_ENGINE_RUNTIME) {\n return deserialize(V1_SingleConnectionEngineRuntime, json);\n }\n return deserialize(V1_EngineRuntime, json);\n};\nexport const V1_packageableRuntimeModelSchema = createModelSchema(V1_PackageableRuntime, {\n _type: usingConstantValueSchema(V1_PACKAGEABLE_RUNTIME_ELEMENT_PROTOCOL_TYPE),\n name: primitive(),\n package: primitive(),\n runtimeValue: custom((val) => V1_serializeRuntimeValue(val), (val) => V1_deserializeRuntimeValue(val)),\n});\n//# sourceMappingURL=V1_RuntimeSerializationHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hashArray } from '@finos/legend-shared';\nimport { CORE_HASH_STRUCTURE } from '../../../../../../../graph/Core_HashUtils.js';\nimport { V1_PackageableElement, } from '../../../model/packageableElements/V1_PackageableElement.js';\nexport class V1_PackageableRuntime extends V1_PackageableElement {\n runtimeValue;\n get hashCode() {\n return hashArray([\n CORE_HASH_STRUCTURE.PACKAGEABLE_RUNTIME,\n this.path,\n this.runtimeValue,\n ]);\n }\n accept_PackageableElementVisitor(visitor) {\n return visitor.visit_PackageableRuntime(this);\n }\n}\n//# sourceMappingURL=V1_PackageableRuntime.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ExecutionContext {\n queryTimeOutInSeconds;\n enableConstraints;\n}\n//# sourceMappingURL=V1_ExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_AnalyticsExecutionContext extends V1_ExecutionContext {\n useAnalytics;\n toFlowSetFunction;\n}\n//# sourceMappingURL=V1_AnalyticsExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionContext } from './V1_ExecutionContext.js';\nexport class V1_BaseExecutionContext extends V1_ExecutionContext {\n}\n//# sourceMappingURL=V1_BaseExecutionContext.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ValueSpecification, } from '../../../model/valueSpecification/V1_ValueSpecification.js';\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nexport class V1_PackageableElementPtr extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n fullPath;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_PackageableElementPtr(this);\n }\n}\n//# sourceMappingURL=V1_PackageableElementPtr.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PackageableElementPtr } from './V1_PackageableElementPtr.js';\nexport class V1_GenericTypeInstance extends V1_PackageableElementPtr {\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_GenericTypeInstance(this);\n }\n}\n//# sourceMappingURL=V1_GenericTypeInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_Multiplicity } from '../../packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ValueSpecification, } from '../V1_ValueSpecification.js';\n/**\n * This is the mechanism by which we scale the system. Pretty much any constructs like\n * graph-fetch, path, etc, which have the need to store some data and manifest in value\n * specification space can be wrapped in form of a class instance. Here, we also keep\n * track of the type in order to interpret the value for processing.\n */\nexport class V1_ClassInstance extends V1_ValueSpecification {\n multiplicity = V1_Multiplicity.ONE;\n type;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_ClassInstance(this);\n }\n}\n//# sourceMappingURL=V1_ClassInstance.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ColSpecArray {\n colSpecs = [];\n}\n//# sourceMappingURL=V1_ColSpecArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_ColSpec {\n name;\n type;\n function1;\n function2;\n}\n//# sourceMappingURL=V1_ColSpec.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class V1_RelationStoreAccessor {\n path = [];\n}\n//# sourceMappingURL=V1_RelationStoreAccessor.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive, serialize, SKIP, list, custom, deserialize, optional, } from 'serializr';\nimport { usingConstantValueSchema, UnsupportedOperationError, usingModelSchema, guaranteeIsString, isString, isPlainObject, } from '@finos/legend-shared';\nimport { V1_Variable } from '../../../model/valueSpecification/V1_Variable.js';\nimport { V1_RootGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_RootGraphFetchTree.js';\nimport { V1_Lambda } from '../../../model/valueSpecification/raw/V1_Lambda.js';\nimport { V1_EnumValue } from '../../../model/valueSpecification/raw/V1_EnumValue.js';\nimport { V1_Path } from '../../../model/valueSpecification/raw/classInstance/path/V1_Path.js';\nimport { V1_AppliedFunction } from '../../../model/valueSpecification/application/V1_AppliedFunction.js';\nimport { V1_Collection } from '../../../model/valueSpecification/raw/V1_Collection.js';\nimport { V1_CDecimal } from '../../../model/valueSpecification/raw/V1_CDecimal.js';\nimport { V1_CInteger } from '../../../model/valueSpecification/raw/V1_CInteger.js';\nimport { V1_CString } from '../../../model/valueSpecification/raw/V1_CString.js';\nimport { V1_CFloat } from '../../../model/valueSpecification/raw/V1_CFloat.js';\nimport { V1_CDateTime } from '../../../model/valueSpecification/raw/V1_CDateTime.js';\nimport { V1_CStrictDate } from '../../../model/valueSpecification/raw/V1_CStrictDate.js';\nimport { V1_CStrictTime } from '../../../model/valueSpecification/raw/V1_CStrictTime.js';\nimport { V1_CLatestDate } from '../../../model/valueSpecification/raw/V1_CLatestDate.js';\nimport { V1_CBoolean } from '../../../model/valueSpecification/raw/V1_CBoolean.js';\nimport { V1_AggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_AggregateValue.js';\nimport { V1_Pair } from '../../../model/valueSpecification/raw/classInstance/V1_Pair.js';\nimport { V1_RuntimeInstance } from '../../../model/valueSpecification/raw/classInstance/V1_RuntimeInstance.js';\nimport { V1_ExecutionContextInstance } from '../../../model/valueSpecification/raw/classInstance/V1_ExecutionContextInstance.js';\nimport { V1_PropertyGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_PropertyGraphFetchTree.js';\nimport { V1_SubTypeGraphFetchTree } from '../../../model/valueSpecification/raw/classInstance/graph/V1_SubTypeGraphFetchTree.js';\nimport { V1_SerializationConfig } from '../../../model/valueSpecification/raw/classInstance/V1_SerializationConfig.js';\nimport { V1_KeyExpression } from '../../../model/valueSpecification/raw/V1_KeyExpression.js';\nimport { V1_PureList } from '../../../model/valueSpecification/raw/classInstance/V1_PureList.js';\nimport { V1_TDSAggregateValue } from '../../../model/valueSpecification/raw/classInstance/V1_TDSAggregateValue.js';\nimport { V1_TDSColumnInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSColumnInformation.js';\nimport { V1_TDSSortInformation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSSortInformation.js';\nimport { V1_TDSOlapRank } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapRank.js';\nimport { V1_TDSOlapAggregation } from '../../../model/valueSpecification/raw/classInstance/V1_TDSOlapAggregation.js';\nimport { V1_multiplicityModelSchema } from './V1_CoreSerializationHelper.js';\nimport { V1_PropertyPathElement } from '../../../model/valueSpecification/raw/classInstance/path/V1_PropertyPathElement.js';\nimport { V1_AppliedProperty } from '../../../model/valueSpecification/application/V1_AppliedProperty.js';\nimport { V1_serializeRuntime } from './V1_RuntimeSerializationHelper.js';\nimport { V1_AnalyticsExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_AnalyticsExecutionContext.js';\nimport { V1_BaseExecutionContext } from '../../../model/valueSpecification/raw/executionContext/V1_BaseExecutionContext.js';\nimport { V1_PackageableElementPtr } from '../../../model/valueSpecification/raw/V1_PackageableElementPtr.js';\nimport { V1_EngineRuntime } from '../../../model/packageableElements/runtime/V1_Runtime.js';\nimport { V1_GenericTypeInstance } from '../../../model/valueSpecification/raw/V1_GenericTypeInstance.js';\nimport { V1_Multiplicity } from '../../../model/packageableElements/domain/V1_Multiplicity.js';\nimport { V1_ClassInstance } from '../../../model/valueSpecification/raw/V1_ClassInstance.js';\nimport { V1_CByteArray } from '../../../model/valueSpecification/raw/V1_CByteArray.js';\nimport { V1_ColSpecArray } from '../../../model/valueSpecification/raw/V1_ColSpecArray.js';\nimport { V1_ColSpec } from '../../../model/valueSpecification/raw/V1_ColSpec.js';\nimport { V1_RelationStoreAccessor } from '../../../model/valueSpecification/raw/V1_RelationStoreAccessor.js';\nvar V1_ExecutionContextType;\n(function (V1_ExecutionContextType) {\n V1_ExecutionContextType[\"BASE_EXECUTION_CONTEXT\"] = \"BaseExecutionContext\";\n V1_ExecutionContextType[\"ANALYTICS_EXECUTION_CONTEXT\"] = \"AnalyticsExecutionContext\";\n})(V1_ExecutionContextType || (V1_ExecutionContextType = {}));\nvar V1_PathElementType;\n(function (V1_PathElementType) {\n V1_PathElementType[\"PROPERTY_PATH_ELEMENT\"] = \"propertyPath\";\n})(V1_PathElementType || (V1_PathElementType = {}));\nexport var V1_GraphFetchTreeType;\n(function (V1_GraphFetchTreeType) {\n V1_GraphFetchTreeType[\"PROPERTY_GRAPH_FETCH_TREE\"] = \"propertyGraphFetchTree\";\n})(V1_GraphFetchTreeType || (V1_GraphFetchTreeType = {}));\nexport var V1_ClassInstanceType;\n(function (V1_ClassInstanceType) {\n V1_ClassInstanceType[\"ROOT_GRAPH_FETCH_TREE\"] = \"rootGraphFetchTree\";\n V1_ClassInstanceType[\"SUBTYPE_GRAPH_FETCH_TREE\"] = \"subTypeGraphFetchTree\";\n V1_ClassInstanceType[\"PATH\"] = \"path\";\n V1_ClassInstanceType[\"AGGREGATE_VALUE\"] = \"aggregateValue\";\n V1_ClassInstanceType[\"EXECUTION_CONTEXT_INSTANCE\"] = \"executionContextInstance\";\n V1_ClassInstanceType[\"PAIR\"] = \"pair\";\n V1_ClassInstanceType[\"PURE_LIST\"] = \"listInstance\";\n V1_ClassInstanceType[\"RUNTIME_INSTANCE\"] = \"runtimeInstance\";\n V1_ClassInstanceType[\"SERIALIZATION_CONFIG\"] = \"alloySerializationConfig\";\n V1_ClassInstanceType[\"COL_SPEC\"] = \"colSpec\";\n V1_ClassInstanceType[\"COL_SPEC_ARRAY\"] = \"colSpecArray\";\n V1_ClassInstanceType[\"RELATION_STORE_ACCESSOR\"] = \">\";\n V1_ClassInstanceType[\"TDS_AGGREGATE_VALUE\"] = \"tdsAggregateValue\";\n V1_ClassInstanceType[\"TDS_COLUMN_INFORMATION\"] = \"tdsColumnInformation\";\n V1_ClassInstanceType[\"TDS_SORT_INFORMATION\"] = \"tdsSortInformation\";\n V1_ClassInstanceType[\"TDS_OLAP_RANK\"] = \"tdsOlapRank\";\n V1_ClassInstanceType[\"TDS_OLAP_AGGREGATION\"] = \"tdsOlapAggregation\";\n})(V1_ClassInstanceType || (V1_ClassInstanceType = {}));\nvar V1_ValueSpecificationType;\n(function (V1_ValueSpecificationType) {\n V1_ValueSpecificationType[\"VARIABLE\"] = \"var\";\n V1_ValueSpecificationType[\"LAMBDA\"] = \"lambda\";\n V1_ValueSpecificationType[\"KEY_EXPRESSION\"] = \"keyExpression\";\n V1_ValueSpecificationType[\"APPLIED_FUNCTION\"] = \"func\";\n V1_ValueSpecificationType[\"APPLIED_PROPERTY\"] = \"property\";\n V1_ValueSpecificationType[\"PACKAGEABLE_ELEMENT_PTR\"] = \"packageableElementPtr\";\n V1_ValueSpecificationType[\"GENERIC_TYPE_INSTANCE\"] = \"genericTypeInstance\";\n V1_ValueSpecificationType[\"ENUM_VALUE\"] = \"enumValue\";\n V1_ValueSpecificationType[\"COLLECTION\"] = \"collection\";\n V1_ValueSpecificationType[\"CINTEGER\"] = \"integer\";\n V1_ValueSpecificationType[\"CDECIMAL\"] = \"decimal\";\n V1_ValueSpecificationType[\"CSTRING\"] = \"string\";\n V1_ValueSpecificationType[\"CBOOLEAN\"] = \"boolean\";\n V1_ValueSpecificationType[\"CBYTEARRAY\"] = \"byteArray\";\n V1_ValueSpecificationType[\"CFLOAT\"] = \"float\";\n V1_ValueSpecificationType[\"CDATETIME\"] = \"dateTime\";\n V1_ValueSpecificationType[\"CSTRICTDATE\"] = \"strictDate\";\n V1_ValueSpecificationType[\"CSTRICTTIME\"] = \"strictTime\";\n V1_ValueSpecificationType[\"CLATESTDATE\"] = \"latestDate\";\n V1_ValueSpecificationType[\"CLASS_INSTANCE\"] = \"classInstance\";\n // ------------------------------ DEPRECATED ----------------------------------\n V1_ValueSpecificationType[\"HACKED_CLASS\"] = \"hackedClass\";\n V1_ValueSpecificationType[\"HACKED_UNIT\"] = \"hackedUnit\";\n V1_ValueSpecificationType[\"UNIT_TYPE\"] = \"unitType\";\n V1_ValueSpecificationType[\"PRIMITIVE_TYPE\"] = \"primitiveType\";\n V1_ValueSpecificationType[\"CLASS\"] = \"class\";\n V1_ValueSpecificationType[\"ENUM\"] = \"enum\";\n V1_ValueSpecificationType[\"MAPPING_INSTANCE\"] = \"mappingInstance\";\n})(V1_ValueSpecificationType || (V1_ValueSpecificationType = {}));\n// ---------------------------------------- Value Specification --------------------------------------\nexport const V1_variableModelSchema = createModelSchema(V1_Variable, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.VARIABLE),\n class: optional(primitive()),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n name: primitive(),\n});\nexport const V1_lambdaModelSchema = (plugins) => createModelSchema(V1_Lambda, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.LAMBDA),\n body: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n parameters: list(usingModelSchema(V1_variableModelSchema)),\n});\nconst keyExpressionModelSchema = (plugins) => createModelSchema(V1_KeyExpression, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.KEY_EXPRESSION),\n add: optional(primitive()),\n expression: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n key: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst appliedFunctionModelSchema = (plugins) => createModelSchema(V1_AppliedFunction, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_FUNCTION),\n function: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst appliedPropertyModelSchema = (plugins) => createModelSchema(V1_AppliedProperty, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.APPLIED_PROPERTY),\n class: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n});\nconst packageableElementPtrSchema = createModelSchema(V1_PackageableElementPtr, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR),\n fullPath: primitive(),\n});\nconst genericTypeInstanceSchema = createModelSchema(V1_GenericTypeInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE),\n fullPath: primitive(),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedUnit = (json) => {\n const protocol = new V1_GenericTypeInstance();\n if (isString(json.unitType)) {\n protocol.fullPath = json.unitType;\n }\n else {\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked unit: either field 'fullPath' or 'unitType' must be a non-empty string`);\n }\n return protocol;\n};\n/**\n * @backwardCompatibility\n */\nconst deserializeHackedClass = (json) => {\n const protocol = new V1_GenericTypeInstance();\n protocol.fullPath = guaranteeIsString(json.fullPath, `Can't deserialize hacked class: field 'fullPath' must be a non-empty string`);\n return protocol;\n};\nconst collectionModelSchema = (plugins) => createModelSchema(V1_Collection, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.COLLECTION),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst enumValueModelSchema = createModelSchema(V1_EnumValue, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.ENUM_VALUE),\n fullPath: primitive(),\n value: primitive(),\n});\nconst CDecimalModelSchema = createModelSchema(V1_CDecimal, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDECIMAL),\n value: primitive(),\n});\nconst CIntegerModelSchema = createModelSchema(V1_CInteger, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CINTEGER),\n value: primitive(),\n});\nconst CStringModelSchema = createModelSchema(V1_CString, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRING),\n value: primitive(),\n});\nconst CFloatModelSchema = createModelSchema(V1_CFloat, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CFLOAT),\n value: primitive(),\n});\nconst CDateTimeModelSchema = createModelSchema(V1_CDateTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CDATETIME),\n value: primitive(),\n});\nconst CStrictTimeModelSchema = createModelSchema(V1_CStrictTime, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTTIME),\n value: primitive(),\n});\nconst CStrictDateModelSchema = createModelSchema(V1_CStrictDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CSTRICTDATE),\n value: primitive(),\n});\nconst CLatestDateModelSchema = createModelSchema(V1_CLatestDate, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLATESTDATE),\n});\nconst CBooleanModelSchema = createModelSchema(V1_CBoolean, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBOOLEAN),\n value: primitive(),\n});\nconst CByteArrayModelSchema = createModelSchema(V1_CByteArray, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CBYTEARRAY),\n value: primitive(),\n});\n/**\n * @backwardCompatibility\n */\nconst deserializePrimitiveValueSpecification = (json, plugins, deserializer) => {\n if (Array.isArray(json.values)) {\n if (json.values.length === 0) {\n const collection = new V1_Collection();\n collection.multiplicity = V1_Multiplicity.ZERO;\n return collection;\n }\n else if (json.values.length === 1) {\n return deserializer({\n ...json,\n value: json.values[0],\n });\n }\n else {\n return V1_deserializeValueSpecification({\n ...json,\n _type: V1_ValueSpecificationType.COLLECTION,\n }, plugins);\n }\n }\n return deserializer(json);\n};\n// ---------------------------------------- Class Instance --------------------------------------\nconst classInstanceModelSchema = (plugins) => createModelSchema(V1_ClassInstance, {\n _type: usingConstantValueSchema(V1_ValueSpecificationType.CLASS_INSTANCE),\n multiplicity: usingModelSchema(V1_multiplicityModelSchema),\n type: primitive(),\n value: custom((val) => V1_serializeClassInstanceValue(val, plugins), (val, context) => V1_deserializeClassInstanceValue(val, context.json.type, plugins)),\n});\n// path\nconst propertyPathElementModelSchema = (plugins) => createModelSchema(V1_PropertyPathElement, {\n _type: usingConstantValueSchema(V1_PathElementType.PROPERTY_PATH_ELEMENT),\n property: primitive(),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nfunction V1_serializePathElement(protocol, plugins) {\n if (protocol instanceof V1_PropertyPathElement) {\n return serialize(propertyPathElementModelSchema(plugins), protocol);\n }\n return SKIP;\n}\nfunction V1_deserializePathElement(json, plugins) {\n switch (json._type) {\n case V1_PathElementType.PROPERTY_PATH_ELEMENT:\n return deserialize(propertyPathElementModelSchema(plugins), json);\n default:\n return SKIP;\n }\n}\nconst pathModelSchema = (plugins) => createModelSchema(V1_Path, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PATH),\n name: primitive(),\n startType: primitive(),\n path: list(custom((val) => V1_serializePathElement(val, plugins), (val) => V1_deserializePathElement(val, plugins))),\n});\n// graph fetch tree\nconst rootGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_RootGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE),\n class: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n});\nconst propertyGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_PropertyGraphFetchTree, {\n _type: usingConstantValueSchema(V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE),\n alias: optional(primitive()),\n parameters: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n property: primitive(),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subType: optional(primitive()),\n});\nconst subTypeGraphFetchTreeModelSchema = (plugins) => createModelSchema(V1_SubTypeGraphFetchTree, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE),\n subTrees: list(custom((val) => V1_serializeGraphFetchTree(val, plugins), (val) => V1_deserializeGraphFetchTree(val, plugins))),\n subTypeClass: primitive(),\n});\nexport function V1_serializeGraphFetchTree(protocol, plugins) {\n if (protocol instanceof V1_PropertyGraphFetchTree) {\n return serialize(propertyGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_SubTypeGraphFetchTree) {\n return serialize(subTypeGraphFetchTreeModelSchema(plugins), protocol);\n }\n throw new UnsupportedOperationError(`Can't serialize graph fetch tree`, protocol);\n}\nexport function V1_deserializeGraphFetchTree(json, plugins) {\n switch (json._type) {\n case V1_GraphFetchTreeType.PROPERTY_GRAPH_FETCH_TREE:\n return deserialize(propertyGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.SUBTYPE_GRAPH_FETCH_TREE:\n return deserialize(subTypeGraphFetchTreeModelSchema(plugins), json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize graph fetch tree node of type '${json._type}'`);\n }\n}\n// execution context\nconst analyticsExecutionContextModelSchema = (plugins) => createModelSchema(V1_AnalyticsExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n toFlowSetFunction: usingModelSchema(V1_lambdaModelSchema(plugins)),\n useAnalytics: primitive(),\n});\nconst baseExecutionContextModelSchema = createModelSchema(V1_BaseExecutionContext, {\n _type: usingConstantValueSchema(V1_ExecutionContextType.BASE_EXECUTION_CONTEXT),\n enableConstraints: optional(primitive()),\n queryTimeOutInSeconds: optional(primitive()),\n});\nfunction V1_serializeExecutionContext(protocol, plugins) {\n if (protocol instanceof V1_AnalyticsExecutionContext) {\n return serialize(analyticsExecutionContextModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_BaseExecutionContext) {\n return serialize(baseExecutionContextModelSchema, protocol);\n }\n return SKIP;\n}\nfunction V1_deserializeExecutionContext(json, plugins) {\n switch (json._type) {\n case V1_ExecutionContextType.ANALYTICS_EXECUTION_CONTEXT:\n return deserialize(analyticsExecutionContextModelSchema(plugins), json);\n case V1_ExecutionContextType.BASE_EXECUTION_CONTEXT:\n return deserialize(baseExecutionContextModelSchema, json);\n default:\n return SKIP;\n }\n}\nconst executionContextInstanceModelSchema = (plugins) => createModelSchema(V1_ExecutionContextInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE),\n executionContext: custom((val) => V1_serializeExecutionContext(val, plugins), (val) => V1_deserializeExecutionContext(val, plugins)),\n});\n// others\nconst aggregationValueModelSchema = (plugins) => createModelSchema(V1_AggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.AGGREGATE_VALUE),\n mapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst pairModelSchema = (plugins) => createModelSchema(V1_Pair, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PAIR),\n first: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n second: custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins)),\n});\nconst runtimeInstanceModelSchema = createModelSchema(V1_RuntimeInstance, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.RUNTIME_INSTANCE),\n runtime: custom((val) => V1_serializeRuntime(val), (val) => deserialize(V1_EngineRuntime, val)),\n});\nconst pureListModelSchema = (plugins) => createModelSchema(V1_PureList, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.PURE_LIST),\n values: list(custom((val) => V1_serializeValueSpecification(val, plugins), (val) => V1_deserializeValueSpecification(val, plugins))),\n});\nconst serializationConfigModelSchema = createModelSchema(V1_SerializationConfig, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.SERIALIZATION_CONFIG),\n includeType: optional(primitive()),\n typeKeyName: primitive(),\n includeEnumTypee: optional(primitive()),\n removePropertiesWithNullValuese: optional(primitive()),\n removePropertiesWithEmptySetse: optional(primitive()),\n fullyQualifiedTypePathe: optional(primitive()),\n includeObjectReferencee: optional(primitive()),\n});\n// TDS\nconst tdsAggregrateValueModelSchema = (plugins) => createModelSchema(V1_TDSAggregateValue, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_AGGREGATE_VALUE),\n name: primitive(),\n pmapFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n aggregateFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsColumnInformationModelSchema = (plugins) => createModelSchema(V1_TDSColumnInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_COLUMN_INFORMATION),\n name: primitive(),\n columnFn: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsSortInformationModelSchema = createModelSchema(V1_TDSSortInformation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_SORT_INFORMATION),\n column: primitive(),\n direction: primitive(),\n});\nconst relationStoreAccessorModelSchema = createModelSchema(V1_RelationStoreAccessor, {\n path: list(primitive()),\n});\nconst colSpecModelSchema = (plugins) => createModelSchema(V1_ColSpec, {\n function1: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n function2: optional(usingModelSchema(V1_lambdaModelSchema(plugins))),\n name: primitive(),\n type: optional(primitive()),\n});\nconst colSpecArrayModelSchema = (plugins) => createModelSchema(V1_ColSpecArray, {\n colSpecs: list(usingModelSchema(colSpecModelSchema(plugins))),\n});\nconst tdsOlapRankModelSchema = (plugins) => createModelSchema(V1_TDSOlapRank, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_RANK),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n});\nconst tdsOlapAggregationModelSchema = (plugins) => createModelSchema(V1_TDSOlapAggregation, {\n _type: usingConstantValueSchema(V1_ClassInstanceType.TDS_OLAP_AGGREGATION),\n function: usingModelSchema(V1_lambdaModelSchema(plugins)),\n columnName: primitive(),\n});\nexport function V1_deserializeClassInstanceValue(json, type, plugins) {\n switch (type) {\n case V1_ClassInstanceType.PATH:\n return deserialize(pathModelSchema(plugins), json);\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n return deserialize(rootGraphFetchTreeModelSchema(plugins), json);\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n return deserialize(aggregationValueModelSchema(plugins), json);\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n return deserialize(executionContextInstanceModelSchema(plugins), json);\n case V1_ClassInstanceType.PAIR:\n return deserialize(pairModelSchema(plugins), json);\n case V1_ClassInstanceType.PURE_LIST:\n return deserialize(pureListModelSchema(plugins), json);\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n return deserialize(runtimeInstanceModelSchema, json);\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n return deserialize(serializationConfigModelSchema, json);\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n return deserialize(tdsAggregrateValueModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n return deserialize(tdsColumnInformationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n return deserialize(tdsOlapAggregationModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n return deserialize(tdsOlapRankModelSchema(plugins), json);\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(tdsSortInformationModelSchema, json);\n case V1_ClassInstanceType.COL_SPEC:\n return deserialize(colSpecModelSchema(plugins), json);\n case V1_ClassInstanceType.COL_SPEC_ARRAY:\n return deserialize(colSpecArrayModelSchema(plugins), json);\n case V1_ClassInstanceType.RELATION_STORE_ACCESSOR:\n return deserialize(relationStoreAccessorModelSchema, json);\n default: {\n const deserializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolDeserializers?.() ?? []);\n for (const deserializer of deserializers) {\n const protocol = deserializer(json, type, plugins);\n if (protocol) {\n return protocol;\n }\n }\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}': no compatible deserializer available from plugins`);\n }\n }\n}\nexport function V1_serializeClassInstanceValue(protocol, plugins) {\n if (protocol instanceof V1_Path) {\n return serialize(pathModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RootGraphFetchTree) {\n return serialize(rootGraphFetchTreeModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ExecutionContextInstance) {\n return serialize(executionContextInstanceModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_AggregateValue) {\n return serialize(aggregationValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_Pair) {\n return serialize(pairModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_PureList) {\n return serialize(pureListModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RuntimeInstance) {\n return serialize(runtimeInstanceModelSchema, protocol);\n }\n else if (protocol instanceof V1_SerializationConfig) {\n return serialize(serializationConfigModelSchema, protocol);\n }\n else if (protocol instanceof V1_TDSAggregateValue) {\n return serialize(tdsAggregrateValueModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSColumnInformation) {\n return serialize(tdsColumnInformationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapAggregation) {\n return serialize(tdsOlapAggregationModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSOlapRank) {\n return serialize(tdsOlapRankModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_TDSSortInformation) {\n return serialize(tdsSortInformationModelSchema, protocol);\n }\n else if (protocol instanceof V1_ColSpec) {\n return serialize(colSpecModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_ColSpecArray) {\n return serialize(colSpecArrayModelSchema(plugins), protocol);\n }\n else if (protocol instanceof V1_RelationStoreAccessor) {\n return serialize(relationStoreAccessorModelSchema, protocol);\n }\n const serializers = plugins.flatMap((plugin) => plugin.V1_getExtraClassInstanceValueProtocolSerializers?.() ?? []);\n for (const serializer of serializers) {\n const json = serializer(protocol, plugins);\n if (json) {\n return json;\n }\n }\n throw new UnsupportedOperationError(`Can't serialize class instance value: no compatible serializer available from plugins`, protocol);\n}\n// ---------------------------------------- Serialization Methods --------------------------------------\nclass V1_ValueSpecificationSerializer {\n plugins = [];\n constructor(plugins) {\n this.plugins = plugins;\n }\n visit_INTERNAL__UnknownValueSpecfication(valueSpecification) {\n return valueSpecification.content;\n }\n visit_Variable(valueSpecification) {\n return serialize(V1_variableModelSchema, valueSpecification);\n }\n visit_Lambda(valueSpecification) {\n return serialize(V1_lambdaModelSchema(this.plugins), valueSpecification);\n }\n visit_KeyExpression(valueSpecification) {\n return serialize(keyExpressionModelSchema(this.plugins), valueSpecification);\n }\n visit_PackageableElementPtr(valueSpecification) {\n return serialize(packageableElementPtrSchema, valueSpecification);\n }\n visit_GenericTypeInstance(valueSpecification) {\n return serialize(genericTypeInstanceSchema, valueSpecification);\n }\n visit_AppliedFunction(valueSpecification) {\n return serialize(appliedFunctionModelSchema(this.plugins), valueSpecification);\n }\n visit_AppliedProperty(valueSpecification) {\n return serialize(appliedPropertyModelSchema(this.plugins), valueSpecification);\n }\n visit_Collection(valueSpecification) {\n return serialize(collectionModelSchema(this.plugins), valueSpecification);\n }\n visit_EnumValue(valueSpecification) {\n return serialize(enumValueModelSchema, valueSpecification);\n }\n visit_CInteger(valueSpecification) {\n return serialize(CIntegerModelSchema, valueSpecification);\n }\n visit_CDecimal(valueSpecification) {\n return serialize(CDecimalModelSchema, valueSpecification);\n }\n visit_CString(valueSpecification) {\n return serialize(CStringModelSchema, valueSpecification);\n }\n visit_CBoolean(valueSpecification) {\n return serialize(CBooleanModelSchema, valueSpecification);\n }\n visit_CByteArray(valueSpecification) {\n return serialize(CByteArrayModelSchema, valueSpecification);\n }\n visit_CFloat(valueSpecification) {\n return serialize(CFloatModelSchema, valueSpecification);\n }\n visit_CDateTime(valueSpecification) {\n return serialize(CDateTimeModelSchema, valueSpecification);\n }\n visit_CStrictDate(valueSpecification) {\n return serialize(CStrictDateModelSchema, valueSpecification);\n }\n visit_CStrictTime(valueSpecification) {\n return serialize(CStrictTimeModelSchema, valueSpecification);\n }\n visit_CLatestDate(valueSpecification) {\n return serialize(CLatestDateModelSchema, valueSpecification);\n }\n visit_ClassInstance(valueSpecification) {\n return serialize(classInstanceModelSchema(this.plugins), valueSpecification);\n }\n}\nexport function V1_deserializeValueSpecification(json, plugins) {\n switch (json._type) {\n case V1_ValueSpecificationType.APPLIED_FUNCTION:\n return deserialize(appliedFunctionModelSchema(plugins), json);\n case V1_ValueSpecificationType.APPLIED_PROPERTY:\n return deserialize(appliedPropertyModelSchema(plugins), json);\n case V1_ValueSpecificationType.VARIABLE:\n return deserialize(V1_variableModelSchema, json);\n case V1_ValueSpecificationType.LAMBDA:\n return deserialize(V1_lambdaModelSchema(plugins), json);\n case V1_ValueSpecificationType.KEY_EXPRESSION:\n return deserialize(keyExpressionModelSchema(plugins), json);\n case V1_ValueSpecificationType.COLLECTION:\n return deserialize(collectionModelSchema(plugins), json);\n case V1_ValueSpecificationType.ENUM_VALUE:\n return deserialize(enumValueModelSchema, json);\n // primitive values\n case V1_ValueSpecificationType.CBOOLEAN:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CBooleanModelSchema, val));\n case V1_ValueSpecificationType.CBYTEARRAY: {\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CByteArrayModelSchema, val));\n }\n case V1_ValueSpecificationType.CDATETIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDateTimeModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTTIME:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictTimeModelSchema, val));\n case V1_ValueSpecificationType.CDECIMAL:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CDecimalModelSchema, val));\n case V1_ValueSpecificationType.CFLOAT:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CFloatModelSchema, val));\n case V1_ValueSpecificationType.CINTEGER:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CIntegerModelSchema, val));\n case V1_ValueSpecificationType.CLATESTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CLatestDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRICTDATE:\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStrictDateModelSchema, val));\n case V1_ValueSpecificationType.CSTRING: {\n // This workaround is intended to handle an edge case where CString is sent with empty values\n // we will convert it to an empty string instead\n // See https://github.com/finos/legend-engine/pull/1076\n if (Array.isArray(json.values) &&\n !json.values.length &&\n isPlainObject(json.multiplicity) &&\n json.multiplicity.upperBound === 1) {\n const result = new V1_CString();\n result.value = '';\n return result;\n }\n return deserializePrimitiveValueSpecification(json, plugins, (val) => deserialize(CStringModelSchema, val));\n }\n // class instance\n case V1_ValueSpecificationType.CLASS_INSTANCE:\n return deserialize(classInstanceModelSchema(plugins), json);\n /**\n * NOTE: the following types are here for backward compatibility\n * as some of these are used to be value specifications, but now\n * transformed into class instances\n *\n * @backwardCompatibility\n */\n case V1_ClassInstanceType.PAIR:\n case V1_ClassInstanceType.AGGREGATE_VALUE:\n case V1_ClassInstanceType.EXECUTION_CONTEXT_INSTANCE:\n case V1_ClassInstanceType.PATH:\n case V1_ClassInstanceType.ROOT_GRAPH_FETCH_TREE:\n case V1_ClassInstanceType.PURE_LIST:\n case V1_ClassInstanceType.RUNTIME_INSTANCE:\n case V1_ClassInstanceType.SERIALIZATION_CONFIG:\n case V1_ClassInstanceType.TDS_AGGREGATE_VALUE:\n case V1_ClassInstanceType.TDS_COLUMN_INFORMATION:\n case V1_ClassInstanceType.TDS_OLAP_AGGREGATION:\n case V1_ClassInstanceType.TDS_OLAP_RANK:\n case V1_ClassInstanceType.TDS_SORT_INFORMATION:\n return deserialize(classInstanceModelSchema(plugins), {\n _type: V1_ValueSpecificationType.CLASS_INSTANCE,\n type: json._type,\n value: json,\n });\n // packageable element pointer\n case V1_ValueSpecificationType.HACKED_CLASS: // deprecated\n return deserializeHackedClass(json);\n case V1_ValueSpecificationType.UNIT_TYPE: // deprecated\n case V1_ValueSpecificationType.HACKED_UNIT: // deprecated\n return deserializeHackedUnit(json);\n case V1_ValueSpecificationType.PRIMITIVE_TYPE: // deprecated\n case V1_ValueSpecificationType.ENUM: // deprecated\n case V1_ValueSpecificationType.CLASS: // deprecated\n case V1_ValueSpecificationType.MAPPING_INSTANCE: // deprecated\n case V1_ValueSpecificationType.PACKAGEABLE_ELEMENT_PTR:\n return deserialize(packageableElementPtrSchema, json);\n case V1_ValueSpecificationType.GENERIC_TYPE_INSTANCE:\n return deserialize(genericTypeInstanceSchema, json);\n default:\n throw new UnsupportedOperationError(`Can't deserialize value specification of type '${json._type}'`);\n }\n}\nexport function V1_serializeValueSpecification(protocol, plugins) {\n return protocol.accept_ValueSpecificationVisitor(new V1_ValueSpecificationSerializer(plugins));\n}\n//# sourceMappingURL=V1_ValueSpecificationSerializer.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_DataTypeValueSpecification } from './V1_DataTypeValueSpecification.js';\nexport class V1_EnumValue extends V1_DataTypeValueSpecification {\n fullPath;\n value;\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_EnumValue(this);\n }\n}\n//# sourceMappingURL=V1_EnumValue.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_CDate } from './V1_CDate.js';\nexport class V1_CLatestDate extends V1_CDate {\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CLatestDate(this);\n }\n}\n//# sourceMappingURL=V1_CLatestDate.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_PrimitiveValueSpecification } from './V1_PrimitiveValueSpecification.js';\nexport class V1_CByteArray extends V1_PrimitiveValueSpecification {\n value; // the Base64String transformed from byte[] by Jackson\n accept_ValueSpecificationVisitor(visitor) {\n return visitor.visit_CByteArray(this);\n }\n}\n//# sourceMappingURL=V1_CByteArray.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, isString, uuid } from '@finos/legend-shared';\n// Core\nexport var BuilderType;\n(function (BuilderType) {\n BuilderType[\"CLASS_BUILDER\"] = \"classBuilder\";\n BuilderType[\"TDS_BUILDER\"] = \"tdsBuilder\";\n BuilderType[\"JSON_BUILDER\"] = \"json\";\n})(BuilderType || (BuilderType = {}));\nexport var ExecutionActivityType;\n(function (ExecutionActivityType) {\n ExecutionActivityType[\"RELATIONAL\"] = \"relational\";\n ExecutionActivityType[\"RELATIONAL_EXECUTION_ACTIVITY\"] = \"RelationalExecutionActivity\";\n ExecutionActivityType[\"AGGREGATION_AWARE_ACTIVITY\"] = \"aggregationAware\";\n})(ExecutionActivityType || (ExecutionActivityType = {}));\n// TODO: Refactor to use external format (https://github.com/finos/legend-studio/issues/732)\nexport var EXECUTION_SERIALIZATION_FORMAT;\n(function (EXECUTION_SERIALIZATION_FORMAT) {\n EXECUTION_SERIALIZATION_FORMAT[\"CSV\"] = \"CSV\";\n})(EXECUTION_SERIALIZATION_FORMAT || (EXECUTION_SERIALIZATION_FORMAT = {}));\nexport class ResultBuilder {\n _type;\n constructor(type) {\n this._type = type;\n }\n}\n// ------------------------------------------ Execution Activities -----------------------------------------------\nexport class ExecutionActivities {\n}\nexport class RelationalExecutionActivities extends ExecutionActivities {\n sql;\n comment;\n constructor(sql) {\n super();\n this.sql = sql;\n }\n}\nexport class AggregationAwareActivities extends ExecutionActivities {\n rewrittenQuery;\n}\nexport class UnknownExecutionActivities extends ExecutionActivities {\n values;\n constructor(content) {\n super();\n this.values = content;\n }\n}\nexport class ExecutionResult {\n builder;\n activities;\n}\n// ------------------------------------------ Model -----------------------------------------------\nexport class JsonBuilder {\n _type = BuilderType.JSON_BUILDER;\n}\nexport class JsonExecutionResult extends ExecutionResult {\n values;\n}\nexport class RawExecutionResult extends ExecutionResult {\n value;\n constructor(content) {\n super();\n this.value = content;\n }\n}\n// ------------------------------------------ TDS -----------------------------------------------\n/**\n * TODO?: maybe we converge to use TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of TDSColumn\n */\nexport class INTERNAL__TDSColumn {\n name;\n type;\n relationalType;\n doc;\n}\nexport class TDSBuilder extends ResultBuilder {\n columns = [];\n constructor() {\n super(BuilderType.TDS_BUILDER);\n }\n}\nexport class TDSRow {\n values = [];\n}\nexport class TabularDataSet {\n columns = [];\n rows = [];\n}\nexport class TDSExecutionResult extends ExecutionResult {\n _UUID = uuid();\n builder = new TDSBuilder();\n result = new TabularDataSet();\n}\nexport class ClassBuilder extends ResultBuilder {\n _type = BuilderType.CLASS_BUILDER;\n}\nexport class ClassExecutionResult extends ExecutionResult {\n builder = new ClassBuilder(BuilderType.CLASS_BUILDER);\n objects;\n}\nexport const getTDSRowRankByColumnInAsc = (a, b, colIndex) => {\n const a1 = a.values[colIndex];\n const b1 = b.values[colIndex];\n if (a1 === null || a1 === undefined) {\n return -1;\n }\n if (b1 === null || b1 === undefined) {\n return 1;\n }\n if (isString(a1) && isString(b1)) {\n return a1.localeCompare(b1);\n }\n else {\n return Number(guaranteeNonNullable(a1)) - Number(guaranteeNonNullable(b1));\n }\n};\n//# sourceMappingURL=ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, custom, list, optional, primitive, raw, SKIP, } from 'serializr';\nimport { SerializationFactory, usingModelSchema, } from '@finos/legend-shared';\nimport { ExecutionActivityType } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nexport class V1_ResultBuilder {\n static builderSerialization = new SerializationFactory(createModelSchema(V1_ResultBuilder, {\n _type: primitive(),\n }));\n}\nexport class V1_ExecutionActivities {\n}\nexport class V1_RelationalExecutionActivities extends V1_ExecutionActivities {\n sql;\n comment;\n static serialization = new SerializationFactory(createModelSchema(V1_RelationalExecutionActivities, {\n sql: primitive(),\n comment: optional(primitive()),\n }));\n}\nexport class V1_AggregationAwareActivities extends V1_ExecutionActivities {\n rewrittenQuery;\n static serialization = new SerializationFactory(createModelSchema(V1_AggregationAwareActivities, {\n rewrittenQuery: primitive(),\n }));\n}\nexport class V1_ExecutionResult {\n builder;\n activities;\n}\nexport class V1_UnknownExecutionActivity extends V1_ExecutionActivities {\n content;\n constructor(content) {\n super();\n this.content = content;\n }\n}\nexport class V1_JsonExecutionResult extends V1_ExecutionResult {\n values;\n static serialization = new SerializationFactory(createModelSchema(V1_JsonExecutionResult, {\n _type: primitive(),\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n values: raw(),\n }));\n}\n/**\n * TODO?: maybe we converge to use V1_TDSColumn\n *\n * Since here, we're building out the result builder config, we don't need\n * to fully resolve all the references, hence we have this simplified version of V1_TDSColumn\n */\nexport class V1_INTERNAL__TDSColumn {\n name;\n doc;\n type;\n relationalType;\n static serialization = new SerializationFactory(createModelSchema(V1_INTERNAL__TDSColumn, {\n name: primitive(),\n doc: optional(primitive()),\n type: optional(primitive()),\n relationalType: optional(primitive()),\n }));\n}\nexport class V1_TDSBuilder extends V1_ResultBuilder {\n columns = [];\n static serialization = new SerializationFactory(createModelSchema(V1_TDSBuilder, {\n _type: primitive(),\n columns: list(usingModelSchema(V1_INTERNAL__TDSColumn.serialization.schema)),\n }));\n}\nfunction V1_serializeExecutionActivities(value) {\n switch (value._type) {\n case ExecutionActivityType.RELATIONAL:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.RELATIONAL_EXECUTION_ACTIVITY:\n return V1_RelationalExecutionActivities.serialization.fromJson(value);\n case ExecutionActivityType.AGGREGATION_AWARE_ACTIVITY:\n return V1_AggregationAwareActivities.serialization.fromJson(value);\n default:\n return new V1_UnknownExecutionActivity(value);\n }\n}\nexport class V1_TDSExecutionResult extends V1_ExecutionResult {\n result;\n static serialization = new SerializationFactory(createModelSchema(V1_TDSExecutionResult, {\n builder: usingModelSchema(V1_TDSBuilder.serialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n result: raw(),\n }));\n}\nexport class V1_ClassExecutionResult extends V1_ExecutionResult {\n objects;\n static serialization = new SerializationFactory(createModelSchema(V1_ClassExecutionResult, {\n builder: usingModelSchema(V1_ResultBuilder.builderSerialization.schema),\n activities: list(custom(() => SKIP, V1_serializeExecutionActivities)),\n objects: raw(),\n }));\n}\nexport class V1_RawExecutionResult extends V1_ExecutionResult {\n value;\n constructor(value) {\n super();\n this.value = value;\n }\n}\n//# sourceMappingURL=V1_ExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_ExecutionResult } from './V1_ExecutionResult.js';\nexport class V1_INTERNAL__UnknownExecutionResult extends V1_ExecutionResult {\n content;\n}\n//# sourceMappingURL=V1_INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExecutionResult } from './ExecutionResult.js';\nexport class INTERNAL__UnknownExecutionResult extends ExecutionResult {\n content;\n}\n//# sourceMappingURL=INTERNAL__UnknownExecutionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { guaranteeNonNullable, UnsupportedOperationError, isString, isNumber, isBoolean, } from '@finos/legend-shared';\nimport { TDSRow, ClassExecutionResult, JsonExecutionResult, TDSExecutionResult, TDSBuilder, INTERNAL__TDSColumn, RawExecutionResult, RelationalExecutionActivities, UnknownExecutionActivities, AggregationAwareActivities, BuilderType, } from '../../../../../../graph-manager/action/execution/ExecutionResult.js';\nimport { V1_ClassExecutionResult, V1_JsonExecutionResult, V1_TDSExecutionResult, V1_RawExecutionResult, V1_RelationalExecutionActivities, V1_UnknownExecutionActivity, V1_AggregationAwareActivities, } from './V1_ExecutionResult.js';\nimport { V1_INTERNAL__UnknownExecutionResult } from './V1_INTERNAL__UnknownExecutionResult.js';\nimport { INTERNAL__UnknownExecutionResult } from '../../../../../action/execution/INTERNAL__UnknownExecutionResult.js';\nconst buildExecutionActivities = (protocol) => {\n if (protocol instanceof V1_RelationalExecutionActivities) {\n const metamodel = new RelationalExecutionActivities(protocol.sql);\n metamodel.comment = protocol.comment;\n return metamodel;\n }\n else if (protocol instanceof V1_AggregationAwareActivities) {\n const metamodel = new AggregationAwareActivities();\n metamodel.rewrittenQuery = guaranteeNonNullable(protocol.rewrittenQuery, `Aggregation aware execution activities 'rewritenQuery' field is missing`);\n return metamodel;\n }\n else if (protocol instanceof V1_UnknownExecutionActivity) {\n const metamodel = new UnknownExecutionActivities(protocol);\n return metamodel;\n }\n throw new UnsupportedOperationError(`Can't build execution activities`, protocol);\n};\nconst buildJSONExecutionResult = (protocol) => {\n const metamodel = new JsonExecutionResult();\n metamodel.values = guaranteeNonNullable(protocol.values, `JSON execution result 'values' field is missing`);\n return metamodel;\n};\nconst INTERNAL__buildTDSColumn = (protocol) => {\n const metamodel = new INTERNAL__TDSColumn();\n metamodel.name = guaranteeNonNullable(protocol.name, `TDS column 'name' field is missing`);\n metamodel.type = protocol.type;\n metamodel.doc = protocol.doc;\n metamodel.relationalType = protocol.relationalType;\n return metamodel;\n};\nconst buildTDSBuilder = (protocol) => {\n const builder = new TDSBuilder();\n builder.columns = protocol.columns.map(INTERNAL__buildTDSColumn);\n return builder;\n};\nconst buildTDSExecutionResult = (protocol) => {\n const metamodel = new TDSExecutionResult();\n metamodel.builder = buildTDSBuilder(guaranteeNonNullable(protocol.builder, `TDS execution result 'builder' field is missing`));\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n metamodel.result.columns = protocol.result.columns;\n metamodel.result.rows = protocol.result.rows.map((_row) => {\n const row = new TDSRow();\n row.values = _row.values;\n return row;\n });\n return metamodel;\n};\nconst buildClassExecutionResult = (protocol) => {\n const metamodel = new ClassExecutionResult();\n metamodel.objects = guaranteeNonNullable(protocol.objects, `Class execution result 'objects' field is missing`);\n metamodel.activities = protocol.activities?.map(buildExecutionActivities);\n return metamodel;\n};\nexport const V1_buildExecutionResult = (protocol) => {\n if (protocol instanceof V1_INTERNAL__UnknownExecutionResult) {\n const metamodel = new INTERNAL__UnknownExecutionResult();\n metamodel.content = protocol.content;\n return metamodel;\n }\n else if (protocol instanceof V1_ClassExecutionResult) {\n return buildClassExecutionResult(protocol);\n }\n else if (protocol instanceof V1_TDSExecutionResult) {\n return buildTDSExecutionResult(protocol);\n }\n else if (protocol instanceof V1_JsonExecutionResult) {\n return buildJSONExecutionResult(protocol);\n }\n else if (protocol instanceof V1_RawExecutionResult) {\n return new RawExecutionResult(protocol.value);\n }\n throw new UnsupportedOperationError(`Can't build execution result`, protocol);\n};\nexport const V1_serializeExecutionResult = (json) => {\n if (json === null || isString(json) || isNumber(json) || isBoolean(json)) {\n return new V1_RawExecutionResult(json);\n }\n switch (json.builder?._type) {\n case BuilderType.CLASS_BUILDER:\n return V1_ClassExecutionResult.serialization.fromJson(json);\n case BuilderType.TDS_BUILDER:\n return V1_TDSExecutionResult.serialization.fromJson(json);\n case BuilderType.JSON_BUILDER:\n return V1_JsonExecutionResult.serialization.fromJson(json);\n default: {\n // Fall back to create unknown stub if not supported\n const protocol = new V1_INTERNAL__UnknownExecutionResult();\n protocol.content = json;\n return protocol;\n }\n }\n};\n//# sourceMappingURL=V1_ExecutionHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, optional, primitive } from 'serializr';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { V1_sourceInformationSerialization } from '../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nexport var V1_EngineErrorType;\n(function (V1_EngineErrorType) {\n V1_EngineErrorType[\"COMPILATION\"] = \"COMPILATION\";\n V1_EngineErrorType[\"PARSER\"] = \"PARSER\";\n})(V1_EngineErrorType || (V1_EngineErrorType = {}));\nexport class V1_EngineError {\n message = '';\n errorType;\n sourceInformation;\n static serialization = new SerializationFactory(createModelSchema(V1_EngineError, {\n errorType: optional(primitive()),\n message: primitive(),\n sourceInformation: usingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\n//# sourceMappingURL=V1_EngineError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, optional, primitive } from 'serializr';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { V1_EngineError } from '../../engine/V1_EngineError.js';\nimport { V1_sourceInformationSerialization } from '../../transformation/pureProtocol/serializationHelpers/V1_CoreSerializationHelper.js';\nexport class V1_ParserError extends V1_EngineError {\n static serialization = new SerializationFactory(createModelSchema(V1_ParserError, {\n errorType: optional(primitive()),\n message: primitive(),\n sourceInformation: usingModelSchema(V1_sourceInformationSerialization.schema),\n }));\n}\n//# sourceMappingURL=V1_ParserError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ApplicationError } from '@finos/legend-shared';\nimport { makeObservable, observable } from 'mobx';\nexport class EngineError extends ApplicationError {\n sourceInformation;\n}\nexport class ParserError extends EngineError {\n}\nexport class CompilationError extends EngineError {\n constructor(message) {\n super(message);\n makeObservable(this, {\n sourceInformation: observable,\n });\n }\n}\nexport class ExternalFormatError extends CompilationError {\n}\n//# sourceMappingURL=EngineError.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive } from 'serializr';\nimport { SerializationFactory } from '@finos/legend-shared';\nexport class REPLGridServerResult {\n currentQuery;\n result;\n static serialization = new SerializationFactory(createModelSchema(REPLGridServerResult, {\n currentQuery: primitive(),\n result: primitive(),\n }));\n}\n//# sourceMappingURL=REPLGridServerResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_AppliedFunction, V1_AppliedProperty, V1_CBoolean, V1_CDateTime, V1_CDecimal, V1_CFloat, V1_CInteger, V1_CStrictDate, V1_CStrictTime, V1_CString, V1_ClassInstance, V1_ColSpec, V1_ColSpecArray, V1_Collection, V1_Lambda, V1_Variable, PRIMITIVE_TYPE, V1_ClassInstanceType, } from '@finos/legend-graph';\nimport { TDSFilter, TDSFilterCondition, TDS_FILTER_GROUP, TDS_FILTER_OPERATION, TDS_AGGREGATION_FUNCTION, } from './TDSRequest.js';\nimport { UnsupportedOperationError, guaranteeIsBoolean, guaranteeIsNumber, guaranteeIsString, guaranteeNonNullable, } from '@finos/legend-shared';\nimport { DEFAULT_VARIABLE_NAME, QUERY_FUNCTION } from '../../Const.js';\nconst getPrimitiveValueSpecification = (type, column) => {\n switch (type) {\n case PRIMITIVE_TYPE.STRING: {\n const stringValue = new V1_CString();\n stringValue.value = guaranteeIsString(column);\n return stringValue;\n }\n case PRIMITIVE_TYPE.BOOLEAN: {\n const booleanValue = new V1_CBoolean();\n booleanValue.value = guaranteeIsBoolean(column);\n return booleanValue;\n }\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.DECIMAL: {\n const cDecimal = new V1_CDecimal();\n cDecimal.value = guaranteeIsNumber(column);\n return cDecimal;\n }\n case PRIMITIVE_TYPE.INTEGER: {\n const cInteger = new V1_CInteger();\n cInteger.value = guaranteeIsNumber(column);\n return cInteger;\n }\n case PRIMITIVE_TYPE.FLOAT: {\n const cFloat = new V1_CFloat();\n cFloat.value = guaranteeIsNumber(column);\n return cFloat;\n }\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.DATETIME: {\n const cDateTime = new V1_CDateTime();\n cDateTime.value = guaranteeIsString(column);\n return cDateTime;\n }\n case PRIMITIVE_TYPE.STRICTDATE: {\n const cStrictDate = new V1_CStrictDate();\n cStrictDate.value = guaranteeIsString(column);\n return cStrictDate;\n }\n case PRIMITIVE_TYPE.STRICTTIME: {\n const cStrictTime = new V1_CStrictTime();\n cStrictTime.value = guaranteeIsString(column);\n return cStrictTime;\n }\n default:\n throw new UnsupportedOperationError(`Unsupported tds column type ${type}`);\n }\n};\nconst updateParentFunction = (expressions, functionName, child) => {\n let newExpressions = [\n guaranteeNonNullable(expressions[0]),\n ];\n newExpressions = newExpressions.concat(child);\n const childFunc = new V1_AppliedFunction();\n childFunc.function = functionName;\n childFunc.parameters = newExpressions;\n expressions[0] = childFunc;\n};\nconst processFilterOperations = (expressions, filters) => {\n if (filters.length === 0) {\n return;\n }\n const filterLambda = new V1_Lambda();\n filters.forEach((filterValue) => {\n const conditions = filterValue.conditions;\n const groupCondition = filterValue.groupOperation;\n const defaultVariable = new V1_Variable();\n defaultVariable.name = DEFAULT_VARIABLE_NAME;\n const conditionExpressions = [];\n conditions.forEach((condition) => {\n const filterCondition = new V1_AppliedFunction();\n const property = new V1_AppliedProperty();\n property.property = filterValue.column;\n property.class = filterValue.columnType;\n property.parameters = [defaultVariable];\n switch (condition.operation) {\n case TDS_FILTER_OPERATION.EQUALS:\n case TDS_FILTER_OPERATION.GREATER_THAN:\n case TDS_FILTER_OPERATION.GREATER_THAN_OR_EQUAL:\n case TDS_FILTER_OPERATION.LESS_THAN:\n case TDS_FILTER_OPERATION.LESS_THAN_OR_EQUAL:\n case TDS_FILTER_OPERATION.CONTAINS:\n case TDS_FILTER_OPERATION.ENDS_WITH:\n case TDS_FILTER_OPERATION.STARTS_WITH: {\n filterCondition.function = condition.operation;\n filterCondition.parameters.push(property);\n filterCondition.parameters.push(getPrimitiveValueSpecification(filterValue.columnType, condition.value));\n break;\n }\n case TDS_FILTER_OPERATION.BLANK: {\n filterCondition.function = condition.operation;\n filterCondition.parameters.push(property);\n break;\n }\n case TDS_FILTER_OPERATION.NOT_EQUAL: {\n filterCondition.function = QUERY_FUNCTION.NOT;\n const filterConditionFunc = new V1_AppliedFunction();\n filterConditionFunc.function = TDS_FILTER_OPERATION.EQUALS;\n filterConditionFunc.parameters.push(property);\n filterConditionFunc.parameters.push(getPrimitiveValueSpecification(filterValue.columnType, condition.value));\n filterCondition.parameters.push(filterConditionFunc);\n break;\n }\n case TDS_FILTER_OPERATION.NOT_BLANK: {\n filterCondition.function = QUERY_FUNCTION.NOT;\n const filterConditionFunc = new V1_AppliedFunction();\n filterConditionFunc.function = TDS_FILTER_OPERATION.BLANK;\n filterConditionFunc.parameters.push(property);\n filterConditionFunc.parameters.push(getPrimitiveValueSpecification(filterValue.columnType, condition.value));\n filterCondition.parameters.push(filterConditionFunc);\n break;\n }\n case TDS_FILTER_OPERATION.NOT_CONTAINS: {\n filterCondition.function = QUERY_FUNCTION.NOT;\n const filterConditionFunc = new V1_AppliedFunction();\n filterConditionFunc.function = TDS_FILTER_OPERATION.CONTAINS;\n filterConditionFunc.parameters.push(property);\n filterConditionFunc.parameters.push(getPrimitiveValueSpecification(filterValue.columnType, condition.value));\n filterCondition.parameters.push(filterConditionFunc);\n break;\n }\n default:\n throw new UnsupportedOperationError(`Unsupported filter operation ${condition.operation}`);\n }\n conditionExpressions.push(filterCondition);\n });\n if (conditionExpressions.length > 1) {\n const groupFunc = new V1_AppliedFunction();\n groupFunc.function = groupCondition;\n groupFunc.parameters = conditionExpressions;\n filterLambda.body.push(groupFunc);\n }\n else {\n filterLambda.body = filterLambda.body.concat(conditionExpressions);\n }\n if (filterLambda.body.length > 1) {\n const andFunc = new V1_AppliedFunction();\n andFunc.function = TDS_FILTER_GROUP.AND;\n andFunc.parameters = filterLambda.body;\n filterLambda.body = [andFunc];\n }\n filterLambda.parameters = [defaultVariable];\n });\n updateParentFunction(expressions, QUERY_FUNCTION.FILTER, [filterLambda]);\n};\nconst getAggregationColSpec = (column, functionName, columnType, \n// Temporary. Remove it when we support groupBy with empty aggregations\ncolumnName) => {\n const colSpec = new V1_ColSpec();\n const aggLambda = new V1_Lambda();\n const property = new V1_AppliedProperty();\n property.property = column;\n property.class = columnType;\n const defaultVariable = new V1_Variable();\n defaultVariable.name = DEFAULT_VARIABLE_NAME;\n property.parameters = [defaultVariable];\n aggLambda.body.push(property);\n aggLambda.parameters.push(defaultVariable);\n colSpec.function1 = aggLambda;\n const funcLambda = new V1_Lambda();\n const aggFunc = new V1_AppliedFunction();\n aggFunc.function = functionName;\n const aggVariable = new V1_Variable();\n aggVariable.name = 'agg';\n funcLambda.body.push(aggFunc);\n aggFunc.parameters.push(aggVariable);\n funcLambda.parameters.push(aggVariable);\n colSpec.function2 = funcLambda;\n colSpec.name = columnName ?? column;\n return colSpec;\n};\nconst processGroupByOperations = (expressions, groupByOperation, columns) => {\n if (!groupByOperation.columns.length) {\n return;\n }\n const groupByInstance = new V1_ClassInstance();\n groupByInstance.type = V1_ClassInstanceType.COL_SPEC_ARRAY;\n const groupByColSpecArray = new V1_ColSpecArray();\n const aggregationColSpecArray = new V1_ColSpecArray();\n const aggregationInstance = new V1_ClassInstance();\n aggregationInstance.type = V1_ClassInstanceType.COL_SPEC_ARRAY;\n if (groupByOperation.groupKeys.length !== groupByOperation.columns.length) {\n const groupKeys = groupByOperation.groupKeys;\n const currentGroupByColumn = groupByOperation.columns[groupKeys.length];\n const columnSpec = new V1_ColSpec();\n columnSpec.name = guaranteeNonNullable(currentGroupByColumn);\n groupByColSpecArray.colSpecs.push(columnSpec);\n // Temporary. Remove it later when we support empty aggregations\n if (groupByOperation.aggregations.length === 0) {\n const column = guaranteeNonNullable(groupByOperation.columns[0]);\n const colSpec = getAggregationColSpec(column, TDS_AGGREGATION_FUNCTION.COUNT, PRIMITIVE_TYPE.STRING, TDS_AGGREGATION_FUNCTION.COUNT);\n aggregationColSpecArray.colSpecs.push(colSpec);\n }\n }\n // Projecting the columns when there is an aggregation because that would end up projecting just the aggregation column\n if (groupByOperation.groupKeys.length === groupByOperation.columns.length &&\n groupByOperation.aggregations.length > 0) {\n const aggColumns = groupByOperation.aggregations.map((agg) => agg.column);\n columns.forEach((column) => {\n if (!aggColumns.includes(column)) {\n const colSpec = new V1_ColSpec();\n colSpec.name = column;\n groupByColSpecArray.colSpecs.push(colSpec);\n }\n });\n }\n groupByOperation.aggregations.forEach((agg) => {\n const colSpec = getAggregationColSpec(agg.column, agg.function, agg.columnType);\n aggregationColSpecArray.colSpecs.push(colSpec);\n });\n groupByInstance.value = groupByColSpecArray;\n aggregationInstance.value = aggregationColSpecArray;\n if (groupByColSpecArray.colSpecs.length !== 0 ||\n aggregationColSpecArray.colSpecs.length !== 0) {\n updateParentFunction(expressions, QUERY_FUNCTION.GROUPBY, [\n groupByInstance,\n aggregationInstance,\n ]);\n }\n};\nconst processSortOperations = (expressions, sortOperations, groupBy) => {\n if (sortOperations.length === 0) {\n return;\n }\n const sortCollection = new V1_Collection();\n sortOperations.forEach((sortValue) => {\n if (groupBy.columns.length === groupBy.groupKeys.length ||\n groupBy.columns.indexOf(sortValue.column) === groupBy.groupKeys.length) {\n const sortFunc = new V1_AppliedFunction();\n sortFunc.function = sortValue.order;\n const instance = new V1_ClassInstance();\n instance.type = V1_ClassInstanceType.COL_SPEC;\n const value = new V1_ColSpec();\n value.name = sortValue.column;\n instance.value = value;\n sortFunc.parameters.push(instance);\n sortCollection.values.push(sortFunc);\n }\n });\n updateParentFunction(expressions, QUERY_FUNCTION.SORT, [sortCollection]);\n};\nconst updateExpressionWithSlice = (expressions, start, end) => {\n if (start === undefined || end === undefined) {\n return;\n }\n const startValue = new V1_CInteger();\n startValue.value = start;\n const endValue = new V1_CInteger();\n endValue.value = end;\n const funcBody = expressions[0];\n let currentExpression = funcBody;\n while (currentExpression instanceof V1_AppliedFunction) {\n if (currentExpression.function === QUERY_FUNCTION.FROM) {\n if (currentExpression.parameters[0] instanceof V1_AppliedFunction &&\n currentExpression.parameters[0].function === QUERY_FUNCTION.SLICE) {\n currentExpression.parameters[0].parameters = [\n guaranteeNonNullable(currentExpression.parameters[0].parameters[0]),\n startValue,\n endValue,\n ];\n break;\n }\n const sliceFunction = new V1_AppliedFunction();\n sliceFunction.function = QUERY_FUNCTION.SLICE;\n sliceFunction.parameters = [\n guaranteeNonNullable(currentExpression.parameters[0]),\n startValue,\n endValue,\n ];\n currentExpression.parameters[0] = sliceFunction;\n break;\n }\n currentExpression = currentExpression.parameters[0];\n }\n};\nexport const buildLambdaExpressions = (funcBody, request, isPaginationEnabled) => {\n const expressions = [funcBody];\n if (isPaginationEnabled) {\n updateExpressionWithSlice(expressions, request.startRow, request.endRow);\n }\n const groupBy = request.groupBy;\n for (let index = 0; index < groupBy.groupKeys.length; index++) {\n const groupFilter = new TDSFilter(guaranteeNonNullable(groupBy.columns.at(index)), PRIMITIVE_TYPE.STRING, [\n new TDSFilterCondition(TDS_FILTER_OPERATION.EQUALS, groupBy.groupKeys.at(index)),\n ], TDS_FILTER_GROUP.AND);\n request.filter.push(groupFilter);\n }\n processFilterOperations(expressions, request.filter);\n processGroupByOperations(expressions, request.groupBy, request.columns.map((col) => col.name));\n processSortOperations(expressions, request.sort, request.groupBy);\n const lambda = new V1_Lambda();\n lambda.body = expressions;\n return lambda;\n};\n//# sourceMappingURL=TDSLambdaBuilder.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { V1_lambdaModelSchema } from '@finos/legend-graph';\nimport { TDSRequest } from './TDSRequest.js';\nimport { SerializationFactory, usingModelSchema } from '@finos/legend-shared';\nimport { createModelSchema } from 'serializr';\nexport class TDSQuery {\n initialQuery;\n currentQueryInfo;\n constructor(initialQuery, currentQueryInfo) {\n this.initialQuery = initialQuery;\n this.currentQueryInfo = currentQueryInfo;\n }\n static serialization = new SerializationFactory(createModelSchema(TDSQuery, {\n initialQuery: usingModelSchema(V1_lambdaModelSchema([])),\n currentQueryInfo: usingModelSchema(TDSRequest.serialization.schema),\n }));\n}\n//# sourceMappingURL=TDSQuery.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createModelSchema, primitive } from 'serializr';\nimport { SerializationFactory } from '@finos/legend-shared';\nexport class CompletionItem {\n display;\n completion;\n static serialization = new SerializationFactory(createModelSchema(CompletionItem, {\n display: primitive(),\n completion: primitive(),\n }));\n}\n//# sourceMappingURL=CompletionResult.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { flow, flowResult, makeObservable, observable } from 'mobx';\nimport { DataCubeGridState } from './DataCubeGridState.js';\nimport { DataCubeQueryTextEditorState } from './DataCubeQueryTextEditorState.js';\nimport { DataCubeConfigState } from './DataCubeConfigState.js';\nimport { DataCubePropertiesPanelState } from './DataCubePropertiesPanelState.js';\nimport { ActionState, HttpStatus, LogEvent, NetworkClientError, assertErrorThrown, guaranteeNonNullable, guaranteeType, } from '@finos/legend-shared';\nimport { generatePath } from '@finos/legend-application/browser';\nimport { V1_serializeValueSpecification, V1_buildExecutionResult, V1_serializeExecutionResult, TDSExecutionResult, V1_ParserError, ParserError, SourceInformation, V1_Lambda, V1_deserializeValueSpecification, } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI, } from 'monaco-editor';\nimport { LEGEND_REPL_EVENT } from '../../Const.js';\nimport { LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN, LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN, } from '../../components/LegendREPLGridClientApplication.js';\nimport { REPLGridServerResult } from '../../components/grid/REPLGridServerResult.js';\nimport { buildLambdaExpressions } from '../../components/grid/TDSLambdaBuilder.js';\nimport { TDSQuery } from '../../components/grid/TDSQuery.js';\nimport { TDSRequest, TDSGroupby } from '../../components/grid/TDSRequest.js';\nimport { CompletionItem } from '../CompletionResult.js';\nexport class DataCubeState {\n editorStore;\n gridState;\n queryTextEditorState;\n configState;\n propertiesPanelState;\n executeAction = ActionState.create();\n constructor(editorStore) {\n makeObservable(this, {\n gridState: observable,\n queryTextEditorState: observable,\n configState: observable,\n propertiesPanelState: observable,\n executeAction: observable,\n getREPLGridServerResult: flow,\n getInitialQueryLambda: flow,\n getInitialREPLGridServerResult: flow,\n getLicenseKey: flow,\n executeLambda: flow,\n parseQuery: flow,\n saveQuery: flow,\n });\n this.editorStore = editorStore;\n this.gridState = new DataCubeGridState(this);\n this.queryTextEditorState = new DataCubeQueryTextEditorState(this);\n this.configState = new DataCubeConfigState(this);\n this.propertiesPanelState = new DataCubePropertiesPanelState(this);\n }\n *getREPLGridServerResult(tdsRequest) {\n try {\n const isSubQuery = tdsRequest.groupBy.groupKeys.length !== 0;\n const lambda = buildLambdaExpressions(guaranteeNonNullable(this.gridState.initialQueryLambda?.body[0]), tdsRequest, this.configState.isPaginationEnabled);\n const resultObj = (yield flowResult(this.editorStore.client.getREPLGridServerResult(V1_serializeValueSpecification(lambda, []))));\n const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);\n const tdsResult = JSON.parse(replGridResult.result);\n this.gridState.setCurrentResult(guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResult)), TDSExecutionResult));\n if (isSubQuery) {\n this.queryTextEditorState.setCurrentSubQuery(replGridResult.currentQuery);\n }\n else {\n this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));\n this.queryTextEditorState.setCurrentSubQuery(undefined);\n }\n }\n catch (error) {\n assertErrorThrown(error);\n this.editorStore.applicationStore.notificationService.notifyError(error);\n this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);\n }\n }\n async getTypeaheadResults(position, model) {\n try {\n const textUntilPosition = model.getValueInRange({\n startLineNumber: 1,\n startColumn: 1,\n endLineNumber: position.lineNumber,\n endColumn: position.column,\n });\n const resultObj = await this.editorStore.client.getTypeaheadResults(textUntilPosition);\n const result = resultObj.map((res) => CompletionItem.serialization.fromJson(res));\n const currentWord = model.getWordUntilPosition(position);\n return result.map((res) => ({\n label: res.display,\n kind: monacoLanguagesAPI.CompletionItemKind.Text,\n range: {\n startLineNumber: position.lineNumber,\n startColumn: currentWord.startColumn + 1,\n endLineNumber: position.lineNumber,\n endColumn: currentWord.endColumn + 1,\n },\n insertText: res.completion,\n }));\n }\n catch (e) {\n return [];\n }\n }\n *executeLambda() {\n try {\n this.executeAction.inProgress();\n const resultObj = (yield this.editorStore.client.executeLambda(this.queryTextEditorState.queryEditorState.query, this.configState.isPaginationEnabled));\n const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);\n const tdsResultObj = JSON.parse(replGridResult.result);\n const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);\n this.gridState.setInitialResult(tdsResult);\n this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));\n this.queryTextEditorState.setCurrentSubQuery(undefined);\n this.gridState.setColumns(tdsResult.result.columns);\n yield flowResult(this.getInitialQueryLambda());\n this.executeAction.complete();\n }\n catch (error) {\n this.executeAction.fail();\n assertErrorThrown(error);\n this.editorStore.applicationStore.notificationService.notifyError(error);\n this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);\n }\n }\n *parseQuery() {\n try {\n this.queryTextEditorState.queryEditorState.setParserError(undefined);\n yield flowResult(this.editorStore.client.parseQuery(`|${this.queryTextEditorState.queryEditorState.query}`));\n }\n catch (error) {\n assertErrorThrown(error);\n if (error instanceof NetworkClientError &&\n error.response.status === HttpStatus.BAD_REQUEST) {\n const protocol = V1_ParserError.serialization.fromJson(error.payload);\n const parserError = new ParserError(protocol.message);\n if (protocol.sourceInformation) {\n parserError.sourceInformation = new SourceInformation(protocol.sourceInformation.sourceId, protocol.sourceInformation.startLine, protocol.sourceInformation.startColumn, protocol.sourceInformation.endLine, protocol.sourceInformation.endColumn);\n }\n this.queryTextEditorState.queryEditorState.setParserError(parserError);\n }\n }\n }\n *saveQuery() {\n try {\n const query = TDSQuery.serialization.toJson(new TDSQuery(guaranteeNonNullable(this.gridState.initialQueryLambda), this.gridState.lastQueryTDSRequest ??\n new TDSRequest([], [], [], new TDSGroupby([], [], []), 0, 100)));\n const queryId = (yield flowResult(this.editorStore.client.saveQuery(query)));\n this.editorStore.applicationStore.navigationService.navigator.goToLocation(generatePath(LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.SAVED_QUERY, {\n [LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID]: queryId,\n }));\n }\n catch (error) {\n assertErrorThrown(error);\n this.editorStore.applicationStore.notificationService.notifyError(error);\n this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);\n }\n }\n *getInitialQueryLambda(queryId) {\n if (!queryId) {\n const lambdaObj = (yield this.editorStore.client.getIntialQueryLambda());\n const lambda = V1_deserializeValueSpecification(lambdaObj, []);\n if (lambda instanceof V1_Lambda) {\n this.gridState.setInitialQueryLambda(lambda);\n }\n // this.replGridState.setCurrentQueryTDSRequest(undefined);\n }\n else {\n const queryObj = (yield this.editorStore.client.getREPLQuery(queryId));\n const query = TDSQuery.serialization.fromJson(queryObj);\n this.gridState.setCurrentQueryTDSRequest(query.currentQueryInfo);\n this.gridState.setInitialQueryLambda(query.initialQuery);\n }\n }\n *getInitialREPLGridServerResult(queryId) {\n try {\n this.executeAction.inProgress();\n if (!this.configState.licenseKey) {\n yield flowResult(this.getLicenseKey());\n }\n yield flowResult(this.getInitialQueryLambda(queryId));\n const resultObj = (yield this.editorStore.client.getInitialREPLGridServerResult(this.configState.isPaginationEnabled));\n const replGridResult = REPLGridServerResult.serialization.fromJson(resultObj);\n const tdsResultObj = JSON.parse(replGridResult.result);\n const tdsResult = guaranteeType(V1_buildExecutionResult(V1_serializeExecutionResult(tdsResultObj)), TDSExecutionResult);\n this.gridState.setInitialResult(tdsResult);\n this.queryTextEditorState.queryEditorState.setQuery(replGridResult.currentQuery.substring(1));\n this.queryTextEditorState.setCurrentSubQuery(undefined);\n this.gridState.setColumns(tdsResult.result.columns);\n this.executeAction.complete();\n }\n catch (error) {\n this.executeAction.fail();\n assertErrorThrown(error);\n this.editorStore.applicationStore.notificationService.notifyError(error);\n this.editorStore.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);\n }\n }\n *getLicenseKey() {\n const licenseKey = (yield this.editorStore.client.getLicenseKey());\n this.configState.setLicenseKey(licenseKey);\n }\n}\n//# sourceMappingURL=DataCubeState.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { REPLServerClient } from '../server/REPLServerClient.js';\nimport { NetworkClient } from '@finos/legend-shared';\nimport { makeObservable, observable } from 'mobx';\nimport { DataCubeState } from './dataCube/DataCubeState.js';\nexport class REPLGridClientStore {\n applicationStore;\n client;\n dataCubeState;\n constructor(applicationStore) {\n makeObservable(this, {\n dataCubeState: observable,\n });\n this.applicationStore = applicationStore;\n this.client = new REPLServerClient(new NetworkClient({\n baseUrl: this.applicationStore.config.useDynamicREPLServer\n ? window.location.origin +\n this.applicationStore.config.baseAddress.replace('/repl/', '')\n : this.applicationStore.config.replUrl,\n }));\n this.dataCubeState = new DataCubeState(this);\n }\n}\n//# sourceMappingURL=REPLGridClientStore.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext, useContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { REPLGridClientStore } from '../stores/REPLGridClientStore.js';\nimport { guaranteeNonNullable } from '@finos/legend-shared';\nimport { useApplicationStore } from '@finos/legend-application';\nconst EditorStoreContext = createContext(undefined);\nexport const REPLGridClientStoreProvider = ({ children, }) => {\n const applicationStore = useApplicationStore();\n const store = useLocalObservable(() => new REPLGridClientStore(applicationStore));\n return (_jsx(EditorStoreContext.Provider, { value: store, children: children }));\n};\nexport const useREPLGridClientStore = () => guaranteeNonNullable(useContext(EditorStoreContext), `Can't find editor store in context`);\nexport const withEditorStore = (WrappedComponent) => function WithEditorStore() {\n return (_jsx(REPLGridClientStoreProvider, { children: _jsx(WrappedComponent, {}) }));\n};\n//# sourceMappingURL=REPLGridClientStoreProvider.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useRef, useEffect, forwardRef, } from 'react';\nimport { CaretDownIcon, TimesIcon, CircleNotchIcon } from '../icon/Icon.js';\nimport { FixedSizeList } from 'react-window';\nimport {} from '@finos/legend-shared';\n/**\n * Previously, these exports rely on ES module interop to expose `default` export\n * properly. But since we use `ESM` for Typescript resolution now, we lose this\n * so we have to workaround by importing these and re-export them from CJS\n *\n * TODO: remove these when the package properly work with Typescript's nodenext\n * module resolution\n *\n * @workaround ESM\n * See https://github.com/microsoft/TypeScript/issues/49298\n */\nimport { default as ReactSelect } from './CJS__ReactSelect.cjs';\nimport { clsx } from '../utils/ComponentUtils.js';\nexport const createFilter = ReactSelect.Select.createFilter;\n// Create props for buttons within selector input option to ensure\n// we don't trigger selector dropdown menu when clicking on these buttons\n// NOTE: react-selector uses `mousedown` event instead of `onclick`\n// See https://stackoverflow.com/a/55663995\nexport const getSelectorInputOptionEmbeddedButtonProps = () => ({\n onMouseDown: (event) => event.stopPropagation(),\n});\n/**\n * This custom list component uses virtualization from `react-window` to help improve performance of\n * `react-select` with large list\n * See https://github.com/bvaughn/react-window/issues/83\n * See https://react-window.now.sh/#/examples/list/fixed-size\n */\nconst CustomMenuList = (props) => {\n const { options, children, getValue, selectProps } = props;\n // Get row height in pixel since `react-window` does not support `rem`\n // See https://stackoverflow.com/questions/45001097/convert-rem-to-px-without-reflow\n let rowHeight = selectProps.optionCustomization?.rowHeight ??\n parseInt(getComputedStyle(document.documentElement).fontSize, 10) * 3.5;\n rowHeight = isNaN(rowHeight) ? 35 : rowHeight;\n const MAX_OPTIONS_LENGTH = 6;\n const [value] = getValue();\n const initialOffset = options.indexOf(value) * rowHeight;\n const scrollToIndex = children.length\n ? children.findIndex((child) => child.props.isFocused)\n : 0;\n // We use `scrollToItem` function to make it possible for react-select to focus on item within `react-window`\n // If we don't have this, if we search and use up/down arrow and once we get past the initial view-able values\n // the list doesn't auto scroll\n // See https://github.com/JedWatson/react-select/issues/2850\n const listRef = useRef(null);\n useEffect(() => {\n listRef.current?.scrollToItem(scrollToIndex);\n }, [scrollToIndex]);\n // Checking for the children list in case there is no match and the list height shrinks down to 0\n // which causes `react-window` to throw an error\n if (children.length) {\n return (_jsx(FixedSizeList, { className: selectProps.darkMode ? 'scrollbar--light selector-menu--dark' : '', ref: listRef, width: \"100%\", height: Math.min(children.length, MAX_OPTIONS_LENGTH) * rowHeight, itemCount: children.length, itemSize: rowHeight, initialScrollOffset: initialOffset, children: ({ index, style }) => (_jsx(\"div\", { style: style, className: \"selector-input__option-wrapper\", children: children[index] })) }));\n }\n // TODO: Maybe a no option thing here\n return (_jsx(\"div\", { className: `selector-menu--no-match ${selectProps.darkMode ? 'selector-menu--dark' : ''}`, children: selectProps.noMatchMessage ?? 'No match found' }));\n};\nconst CustomOption = (props) => {\n const { children, selectProps } = props;\n return (_jsx(ReactSelect.SelectComponents.Option, { ...props, className: clsx(!selectProps.darkMode\n ? {\n 'selector-input__option': true,\n 'selector-input__option--is-focused': props.isFocused,\n 'selector-input__option--is-selected': props.isSelected,\n }\n : {\n 'selector-input--dark__option': true,\n 'selector-input--dark__option--is-focused': props.isFocused,\n 'selector-input--dark__option--is-selected': props.isSelected,\n }, {\n 'selector-input__option--custom': Boolean(selectProps.optionCustomization),\n }), children: children }));\n};\nexport const STYLE_PREFIX = 'selector-input';\nexport const STYLE_PREFIX__DARK = 'selector-input--dark';\nconst LoadingIndicator = () => (_jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__loading-indicator ${STYLE_PREFIX__DARK}__loading-indicator`, children: _jsx(CircleNotchIcon, {}) }));\nconst DropdownIndicator = () => (_jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__dropdown-indicator`, children: _jsx(CaretDownIcon, {}) }));\nconst ClearIndicator = (props) => {\n const { innerProps: { ref, ...innerProps }, } = props;\n return (_jsx(\"div\", { ...innerProps, ref: ref, children: _jsx(\"div\", { className: `${STYLE_PREFIX}__indicator ${STYLE_PREFIX}__clear-indicator`, children: _jsx(TimesIcon, {}) }) }));\n};\n// Enable edit of the selected tag\n// See https://github.com/JedWatson/react-select/issues/1558\nconst CustomInput = (props) => (_jsx(ReactSelect.Select.components.Input, { ...props, isHidden: false }));\nexport const CustomSelectorInput = forwardRef(function CustomSelectorInput(props, ref) {\n const { allowCreating, noMatchMessage, disabled, components, className, darkMode, hasError, ...innerProps } = props;\n // Typescript cannot union the 2 types due to many dissimilarities, this goes on to confuse React.createElement\n // See https://github.com/Microsoft/TypeScript/issues/28631\n // See https://github.com/microsoft/TypeScript/issues/28768\n // The issue is addressed better here\n // See https://github.com/microsoft/TypeScript/issues/28795\n // And the root problem as mentioned\n // See https://github.com/microsoft/TypeScript/issues/7294\n //\n // NOTE: since we're using an outdated version of `react-select`, we would get type issue\n // when we update to `react@18`\n // See https://github.com/finos/legend-studio/issues/615\n const SelectComponent = (allowCreating\n ? ReactSelect.CreatableSelect.default\n : ReactSelect.Select.default);\n const stylePrefix = darkMode ? STYLE_PREFIX__DARK : STYLE_PREFIX;\n return (_jsx(SelectComponent\n // Make the menu always on top\n , { \n // Make the menu always on top\n styles: {\n menuPortal: (base) => ({\n ...base,\n zIndex: 9999,\n }),\n }, menuPortalTarget: document.body, \n // coercing a type for ref as we will eventually remove dependency on `react-select`\n // See https://github.com/finos/legend-studio/issues/615\n ref: ref, isDisabled: Boolean(disabled), className: clsx(stylePrefix, className, {\n 'selector-input--has-error': hasError,\n 'selector-input--custom': Boolean(props.optionCustomization),\n }), classNamePrefix: stylePrefix, components: {\n Option: CustomOption,\n ClearIndicator,\n DropdownIndicator,\n LoadingIndicator,\n MenuList: CustomMenuList,\n Input: CustomInput,\n ...components,\n }, ...innerProps, darkMode, noMatchMessage }));\n});\nexport const compareLabelFn = (a, b) => a.label.localeCompare(b.label);\n//# sourceMappingURL=CustomSelectorInput.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var PURE_GRAMMAR_TOKEN;\n(function (PURE_GRAMMAR_TOKEN) {\n PURE_GRAMMAR_TOKEN[\"WHITESPACE\"] = \"\";\n PURE_GRAMMAR_TOKEN[\"KEYWORD\"] = \"keyword\";\n PURE_GRAMMAR_TOKEN[\"IDENTIFIER\"] = \"identifier\";\n PURE_GRAMMAR_TOKEN[\"OPERATOR\"] = \"operator\";\n PURE_GRAMMAR_TOKEN[\"DELIMITER\"] = \"delimiter\";\n PURE_GRAMMAR_TOKEN[\"PARSER\"] = \"parser\";\n PURE_GRAMMAR_TOKEN[\"NUMBER\"] = \"number\";\n PURE_GRAMMAR_TOKEN[\"DATE\"] = \"date\";\n PURE_GRAMMAR_TOKEN[\"COLOR\"] = \"color\";\n PURE_GRAMMAR_TOKEN[\"PACKAGE\"] = \"package\";\n PURE_GRAMMAR_TOKEN[\"STRING\"] = \"string\";\n PURE_GRAMMAR_TOKEN[\"COMMENT\"] = \"comment\";\n PURE_GRAMMAR_TOKEN[\"LANGUAGE_STRUCT\"] = \"language-struct\";\n PURE_GRAMMAR_TOKEN[\"MULTIPLICITY\"] = \"multiplicity\";\n PURE_GRAMMAR_TOKEN[\"GENERICS\"] = \"generics\";\n PURE_GRAMMAR_TOKEN[\"PROPERTY\"] = \"property\";\n PURE_GRAMMAR_TOKEN[\"PARAMETER\"] = \"parameter\";\n PURE_GRAMMAR_TOKEN[\"VARIABLE\"] = \"variable\";\n PURE_GRAMMAR_TOKEN[\"TYPE\"] = \"type\";\n PURE_GRAMMAR_TOKEN[\"INVALID\"] = \"invalid\";\n})(PURE_GRAMMAR_TOKEN || (PURE_GRAMMAR_TOKEN = {}));\n//# sourceMappingURL=PureLanguage.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getNonNullableEntry, isNonNullable, isString, } from '@finos/legend-shared';\nconst parseVSCodeTheme = (rawData) => {\n const rules = [];\n rawData.tokenColors.forEach((tokenColor) => {\n if (!tokenColor.settings) {\n return;\n }\n let scopes = [];\n if (isString(tokenColor.scope)) {\n scopes = tokenColor.scope\n .replace(/^[,]+/, '')\n .replace(/[,]+$/, '')\n .split(',')\n .map((scope) => scope.trim());\n }\n else if (Array.isArray(tokenColor.scope)) {\n scopes = tokenColor.scope;\n }\n else {\n scopes = [''];\n }\n const baseRule = {};\n if (tokenColor.settings.foreground &&\n isString(tokenColor.settings.foreground)) {\n baseRule.foreground = tokenColor.settings.foreground;\n }\n if (tokenColor.settings.background &&\n isString(tokenColor.settings.background)) {\n baseRule.background = tokenColor.settings.background;\n }\n if (tokenColor.settings.fontStyle &&\n isString(tokenColor.settings.fontStyle)) {\n baseRule.fontStyle = tokenColor.settings.fontStyle;\n }\n scopes.forEach((scope) => {\n if (isNonNullable(scope) || !Object.keys(baseRule).length) {\n return;\n }\n const rule = {\n ...baseRule,\n token: scope,\n };\n rules.push(rule);\n });\n });\n const colors = {};\n Object.entries(rawData.colors).forEach(([key, value]) => {\n if (Array.isArray(value)) {\n if (value.length) {\n colors[key] = getNonNullableEntry(value, 0);\n }\n }\n else {\n colors[key] = value;\n }\n });\n return {\n base: 'vs-dark',\n inherit: true,\n rules: rules,\n colors,\n };\n};\nexport const buildCodeEditorTheme = (vscodeThemeData, baseTheme, colorsOverride, rulesOverride) => {\n const baseThemeData = parseVSCodeTheme(vscodeThemeData);\n return {\n ...baseThemeData,\n base: baseTheme,\n colors: { ...baseThemeData.colors, ...colorsOverride },\n rules: [...baseThemeData.rules, ...rulesOverride],\n };\n};\n//# sourceMappingURL=MonacoEditorThemeUtils.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { buildCodeEditorTheme } from './themes/MonacoEditorThemeUtils.js';\nimport SOLARIZED_DARK_THEME_DATA from './themes/solarized-dark-color-theme.json' assert { type: 'json' };\nimport GITHUB_DARK_THEME_DATA from './themes/Github-Theme-dark.json' assert { type: 'json' };\nimport GITHUB_DARK_DIMMED_THEME_DATA from './themes/Github-Theme-dark-dimmed.json' assert { type: 'json' };\nimport MATERIAL_DEFAULT_THEME_DATA from './themes/Material-Theme-Default.json' assert { type: 'json' };\nimport MATERIAL_DARKER_THEME_DATA from './themes/Material-Theme-Darker.json' assert { type: 'json' };\nimport ONE_DARK_PRO_THEME_DATA from './themes/OneDark-Pro.json' assert { type: 'json' };\nimport ONE_DARK_PRO_DARKER_THEME_DATA from './themes/OneDark-Pro-darker.json' assert { type: 'json' };\nconst BASE_PURE_LANGUAGE_COLOR_TOKENS = [\n // NOTE: `monaco-editor` only accepts HEX values, not CSS variables\n { token: PURE_GRAMMAR_TOKEN.IDENTIFIER, foreground: 'dcdcaa' },\n { token: PURE_GRAMMAR_TOKEN.NUMBER, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.DATE, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.COLOR, foreground: 'b5cea8' },\n { token: PURE_GRAMMAR_TOKEN.PACKAGE, foreground: '808080' },\n { token: PURE_GRAMMAR_TOKEN.PARSER, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT, foreground: 'c586c0' },\n { token: PURE_GRAMMAR_TOKEN.MULTIPLICITY, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.GENERICS, foreground: '2d796b' },\n { token: PURE_GRAMMAR_TOKEN.PROPERTY, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.PARAMETER, foreground: '9cdcfe' },\n { token: PURE_GRAMMAR_TOKEN.VARIABLE, foreground: '4fc1ff' },\n { token: PURE_GRAMMAR_TOKEN.TYPE, foreground: '3dc9b0' },\n { token: `${PURE_GRAMMAR_TOKEN.STRING}.escape`, foreground: 'd7ba7d' },\n];\nexport var CODE_EDITOR_THEME;\n(function (CODE_EDITOR_THEME) {\n CODE_EDITOR_THEME[\"DEFAULT_DARK\"] = \"default-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK\"] = \"github-dark\";\n CODE_EDITOR_THEME[\"GITHUB_DARK_DIMMED\"] = \"github-dark-dimmed\";\n CODE_EDITOR_THEME[\"SOLARIZED_DARK\"] = \"solarized-dark\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO\"] = \"one-dark-pro\";\n CODE_EDITOR_THEME[\"ONE_DARK_PRO_DARKER\"] = \"one-dark-pro-darker\";\n CODE_EDITOR_THEME[\"MATERIAL_DEFAULT\"] = \"material-default\";\n CODE_EDITOR_THEME[\"MATERIAL_DARKER\"] = \"material-darker\";\n // default themes in Monaco editor\n // See https://github.com/microsoft/vscode/blob/main/src/vs/editor/standalone/common/themes.ts\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_LIGHT\"] = \"vs\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_DARK\"] = \"vs-dark\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_BLACK\"] = \"hc-black\";\n CODE_EDITOR_THEME[\"BUILT_IN__VSCODE_HC_LIGHT\"] = \"hc-light\";\n})(CODE_EDITOR_THEME || (CODE_EDITOR_THEME = {}));\nexport const DEFAULT_DARK_THEME = {\n base: 'vs-dark',\n inherit: true,\n colors: {},\n rules: [\n ...BASE_PURE_LANGUAGE_COLOR_TOKENS,\n // NOTE: correct a problem with syntax highlighting of string in SQL\n { token: 'string.sql', foreground: 'ce9178' },\n { token: 'white.sql', foreground: 'd4d4d4' },\n { token: 'identifier.sql', foreground: 'd4d4d4' },\n { token: 'operator.sql', foreground: 'd4d4d4' },\n ],\n};\nexport const SOLARIZED_DARK_THEME = buildCodeEditorTheme(SOLARIZED_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_THEME = buildCodeEditorTheme(GITHUB_DARK_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const GITHUB_DARK_DIMMED_THEME = buildCodeEditorTheme(GITHUB_DARK_DIMMED_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DEFAULT_THEME = buildCodeEditorTheme(MATERIAL_DEFAULT_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const MATERIAL_DARKER_THEME = buildCodeEditorTheme(MATERIAL_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_THEME = buildCodeEditorTheme(ONE_DARK_PRO_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\nexport const ONE_DARK_PRO_DARKER_THEME = buildCodeEditorTheme(ONE_DARK_PRO_DARKER_THEME_DATA, CODE_EDITOR_THEME.BUILT_IN__VSCODE_DARK, {}, []);\n//# sourceMappingURL=CodeEditorTheme.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { APPLICATION_EVENT, DEFAULT_MONOSPACED_FONT_FAMILY, } from '@finos/legend-application';\nimport { LogEvent } from '@finos/legend-shared';\nimport { editor as monacoEditorAPI, KeyCode, KeyMod, MarkerSeverity, } from 'monaco-editor';\nimport { CODE_EDITOR_THEME, DEFAULT_DARK_THEME, GITHUB_DARK_DIMMED_THEME, GITHUB_DARK_THEME, MATERIAL_DARKER_THEME, MATERIAL_DEFAULT_THEME, ONE_DARK_PRO_DARKER_THEME, ONE_DARK_PRO_THEME, SOLARIZED_DARK_THEME, } from './CodeEditorTheme.js';\n/**\n * Normally `monaco-editor` worker disposes after 5 minutes staying idle, but we fasten\n * this pace just in case the usage of the editor causes memory-leak somehow\n */\nexport const disposeCodeEditor = (editor) => {\n editor.dispose();\n // NOTE: just to be sure, we dispose the model after disposing the editor\n editor.getModel()?.dispose();\n};\nexport const disposeDiffCodeEditor = (editor) => {\n editor.dispose();\n editor.getOriginalEditor().getModel()?.dispose();\n editor.getModifiedEditor().getModel()?.dispose();\n};\n/**\n * Get the text value with LF line ending.\n * This is needed since if there are CR `\\r` characters in the text input\n * (e.g. users of Windows doing copy/paste)\n * the default mode of `monaco-editor` is `TextDefined` which means if the text\n * contains CR character(s), it will automatically be treated as CRLF. As such, we want\n * an utility method to extract the text value with line ending option LF\n * to force omission of CR characters\n * See https://github.com/finos/legend-studio/issues/608\n */\nexport const getCodeEditorValue = (editor) => editor.getModel()?.getValue(monacoEditorAPI.EndOfLinePreference.LF) ?? '';\nexport const getBaseCodeEditorOptions = () => ({\n contextmenu: false,\n copyWithSyntaxHighlighting: false,\n // NOTE: These following font options are needed (and CSS font-size option `.monaco-editor * { font-size: ... }` as well)\n // in order to make the editor appear properly on multiple platform, the ligatures option is needed for Mac to display properly\n // otherwise the cursor position relatively to text would be off\n // Another potential cause for this misaligment is that the fonts are being lazy-loaded and made available after `monaco-editor`\n // calculated the font-width, for this, we can use `remeasureFonts`, but our case here, `fontLigatures: true` seems\n // to do the trick\n // See https://github.com/microsoft/monaco-editor/issues/392\n fontSize: 14,\n // Enforce a fixed font-family to make cross platform display consistent (i.e. Mac defaults to use `Menlo` which is bigger than\n // `Consolas` on Windows, etc.)\n fontFamily: 'Roboto Mono',\n // Enable font ligature: glyphs which combine the shapes of certain sequences of characters into a new form that makes for\n // a more harmonious reading experience.\n fontLigatures: true,\n // Make sure hover or widget shown near boundary are not truncated by setting their position to `fixed`\n fixedOverflowWidgets: true,\n detectIndentation: false, // i.e. so we can force tab-size\n tabSize: 2,\n // The typing is currently not correct for `bracketPairColorization`, until this is fixed, we will remove the cast\n // See https://github.com/microsoft/monaco-editor/issues/3013\n 'bracketPairColorization.enabled': false,\n automaticLayout: true,\n});\nexport const getBaseConsoleOptions = () => ({\n ...getBaseCodeEditorOptions(),\n fontSize: 12,\n extraEditorClassName: 'monaco-editor--small-font',\n readOnly: true,\n glyphMargin: false,\n folding: false,\n lineNumbers: 'off',\n lineDecorationsWidth: 10,\n lineNumbersMinChars: 0,\n minimap: {\n enabled: false,\n },\n guides: {\n bracketPairs: false,\n bracketPairsHorizontal: false,\n highlightActiveBracketPair: false,\n indentation: false,\n highlightActiveIndentation: false,\n },\n renderLineHighlight: 'none',\n});\nexport const moveCursorToPosition = (editor, position) => {\n if (!editor.hasTextFocus()) {\n editor.focus();\n } // focus the editor first so that it can shows the cursor\n editor.revealPositionInCenter(position, 0);\n editor.setPosition(position);\n};\nconst INTERNAL__DUMMY_PROBLEM_MARKER_OWNER = 'dummy_problem_marker_owner';\nexport const setErrorMarkers = (editorModel, errors, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, errors.map((error) => ({\n startLineNumber: error.startLineNumber,\n startColumn: error.startColumn,\n endLineNumber: error.endLineNumber,\n endColumn: error.endColumn + 1, // add a 1 to endColumn as monaco editor range is not inclusive\n // NOTE: when the message is empty, no error tooltip is shown, we want to avoid this\n message: error.message === '' ? '(no error message)' : error.message,\n severity: MarkerSeverity.Error,\n })));\n};\nexport const setWarningMarkers = (editorModel, warnings, ownerId) => {\n monacoEditorAPI.setModelMarkers(editorModel, ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER, warnings.map((warning) => ({\n startLineNumber: warning.startLineNumber,\n startColumn: warning.startColumn,\n endColumn: warning.endColumn,\n endLineNumber: warning.endLineNumber,\n message: warning.message === '' ? '(no warning message)' : warning.message,\n severity: MarkerSeverity.Warning,\n })));\n};\nexport const clearMarkers = (ownerId) => {\n monacoEditorAPI.removeAllMarkers(ownerId ?? INTERNAL__DUMMY_PROBLEM_MARKER_OWNER);\n};\n/**\n * This method eliminates CR '\\r' character(s) in the provided text value.\n */\nexport const normalizeLineEnding = (val) => val.replace(/\\r/g, '');\n// We need to dynamically adjust the width of the line number gutter, otherwise as the document gets\n// larger, the left margin will start to shrink\n// See https://github.com/microsoft/monaco-editor/issues/2206\nexport const resetLineNumberGutterWidth = (editor) => {\n const currentValue = editor.getValue();\n editor.updateOptions({\n lineNumbersMinChars: Math.max(Math.floor(Math.log10(currentValue.split(/\\r\\n|\\r|\\n/g).length)) + 3, 5),\n });\n};\nexport const configureCodeEditorComponent = async (applicationStore) => {\n /**\n * Since we use a custom fonts for text-editor, we want to make sure the font is loaded before any text-editor is opened\n * this is to ensure\n */\n const fontLoadFailureErrorMessage = `Monospaced font '${DEFAULT_MONOSPACED_FONT_FAMILY}' has not been loaded properly, code editor might not display properly`;\n await Promise.all([400, 700].map((weight) => document.fonts.load(`${weight} 1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)))\n .then(() => {\n if (document.fonts.check(`1em ${DEFAULT_MONOSPACED_FONT_FAMILY}`)) {\n monacoEditorAPI.remeasureFonts();\n }\n else {\n applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage);\n }\n })\n .catch(() => applicationStore.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_SETUP__FAILURE), fontLoadFailureErrorMessage));\n // override native hotkeys supported by monaco-editor\n // here we map these keys to a dummy command that would just dispatch the key combination\n // to the application keyboard shortcut service, effectively bypassing the command associated\n // with the native keybinding\n const OVERRIDE_DEFAULT_KEYBINDING_COMMAND = 'legend.code-editor.override-default-keybinding';\n monacoEditorAPI.registerCommand(OVERRIDE_DEFAULT_KEYBINDING_COMMAND, (accessor, ...args) => {\n applicationStore.keyboardShortcutsService.dispatch(args[0]);\n });\n const hotkeyMapping = [\n [KeyCode.F1, 'F1'], // show command center\n [KeyCode.F8, 'F8'], // show error\n [KeyCode.F9, 'F9'], // toggle debugger breakpoint\n [KeyMod.WinCtrl | KeyCode.KeyG, 'Control+KeyG'], // go-to line command\n [KeyMod.WinCtrl | KeyCode.KeyB, 'Control+KeyB'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyO, 'Control+KeyO'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyD, 'Control+KeyD'], // cursor move (core command)\n [KeyMod.WinCtrl | KeyCode.KeyP, 'Control+KeyP'], // cursor move (core command)\n [KeyMod.Shift | KeyCode.F10, 'Shift+F10'], // show editor context menu\n [KeyMod.WinCtrl | KeyCode.F2, 'Control+F2'], // change all instances\n [KeyMod.WinCtrl | KeyCode.F12, 'Control+F12'], // go-to definition\n ];\n monacoEditorAPI.addKeybindingRules(hotkeyMapping.map(([nativeCodeEditorKeyBinding, keyCombination]) => ({\n keybinding: nativeCodeEditorKeyBinding,\n command: OVERRIDE_DEFAULT_KEYBINDING_COMMAND,\n commandArgs: keyCombination,\n })));\n // themes\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.DEFAULT_DARK, DEFAULT_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.SOLARIZED_DARK, SOLARIZED_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK, GITHUB_DARK_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.GITHUB_DARK_DIMMED, GITHUB_DARK_DIMMED_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DEFAULT, MATERIAL_DEFAULT_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.MATERIAL_DARKER, MATERIAL_DARKER_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO, ONE_DARK_PRO_THEME);\n monacoEditorAPI.defineTheme(CODE_EDITOR_THEME.ONE_DARK_PRO_DARKER, ONE_DARK_PRO_DARKER_THEME);\n};\nexport var CODE_EDITOR_LANGUAGE;\n(function (CODE_EDITOR_LANGUAGE) {\n CODE_EDITOR_LANGUAGE[\"TEXT\"] = \"plaintext\";\n CODE_EDITOR_LANGUAGE[\"PURE\"] = \"pure\";\n CODE_EDITOR_LANGUAGE[\"JSON\"] = \"json\";\n CODE_EDITOR_LANGUAGE[\"JAVA\"] = \"java\";\n CODE_EDITOR_LANGUAGE[\"MARKDOWN\"] = \"markdown\";\n CODE_EDITOR_LANGUAGE[\"SQL\"] = \"sql\";\n CODE_EDITOR_LANGUAGE[\"XML\"] = \"xml\";\n CODE_EDITOR_LANGUAGE[\"YAML\"] = \"yaml\";\n CODE_EDITOR_LANGUAGE[\"GRAPHQL\"] = \"graphql\";\n})(CODE_EDITOR_LANGUAGE || (CODE_EDITOR_LANGUAGE = {}));\n//# sourceMappingURL=CodeEditorUtils.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useState, useRef, useEffect } from 'react';\nimport { editor as monacoEditorAPI } from 'monaco-editor';\nimport { disposeCodeEditor, getBaseCodeEditorOptions, resetLineNumberGutterWidth, getCodeEditorValue, normalizeLineEnding, setErrorMarkers, clearMarkers, } from './CodeEditorUtils.js';\nimport { DEFAULT_TAB_SIZE, useApplicationStore, } from '@finos/legend-application';\nimport { CODE_EDITOR_THEME } from './CodeEditorTheme.js';\nimport { clsx, WordWrapIcon } from '@finos/legend-art';\nexport const CodeEditor = (props) => {\n const { inputValue, updateInput, lightTheme, language, isReadOnly, hideMinimap, hideGutter, hidePadding, hideActionBar, lineToScroll, extraEditorOptions, error, } = props;\n const applicationStore = useApplicationStore();\n const [editor, setEditor] = useState();\n const [isWordWrap, setIsWordWrap] = useState(false);\n const onDidChangeModelContentEventDisposer = useRef(undefined);\n /**\n * NOTE: we want to normalize line ending here since if the original\n * input value includes CR '\\r' character, it will get normalized, calling\n * the updateInput method and cause a rerender. With the way we setup\n * `onChange` method, React will warn about `setState` being called in\n * `render` method.\n * See https://github.com/finos/legend-studio/issues/608\n */\n const value = normalizeLineEnding(inputValue);\n const textInputRef = useRef(null);\n const toggleWordWrap = () => {\n const updatedWordWrap = !isWordWrap;\n setIsWordWrap(updatedWordWrap);\n editor?.updateOptions({\n wordWrap: updatedWordWrap ? 'on' : 'off',\n });\n };\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const _editor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n theme: applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled\n ? lightTheme ?? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT\n : CODE_EDITOR_THEME.DEFAULT_DARK,\n // layout\n glyphMargin: !hidePadding,\n padding: !hidePadding ? { top: 20, bottom: 20 } : { top: 0, bottom: 0 },\n formatOnType: true,\n formatOnPaste: true,\n });\n setEditor(_editor);\n }\n }, [applicationStore, lightTheme, hidePadding, editor]);\n useEffect(() => {\n if (editor) {\n resetLineNumberGutterWidth(editor);\n const model = editor.getModel();\n if (model) {\n monacoEditorAPI.setModelLanguage(model, language);\n }\n }\n }, [editor, language]);\n useEffect(() => {\n if (editor && lineToScroll !== undefined) {\n editor.revealLineInCenter(lineToScroll);\n }\n }, [editor, lineToScroll]);\n if (editor) {\n // dispose the old editor content setter in case the `updateInput` handler changes\n // for a more extensive note on this, see `LambdaEditor`\n onDidChangeModelContentEventDisposer.current?.dispose();\n onDidChangeModelContentEventDisposer.current =\n editor.onDidChangeModelContent(() => {\n const currentVal = getCodeEditorValue(editor);\n if (currentVal !== value) {\n updateInput?.(currentVal);\n }\n });\n // Set the text value and editor options\n const currentValue = getCodeEditorValue(editor);\n if (currentValue !== value) {\n editor.setValue(value);\n }\n editor.updateOptions({\n readOnly: Boolean(isReadOnly),\n minimap: { enabled: !hideMinimap },\n // Hide the line number gutter\n // See https://github.com/microsoft/vscode/issues/30795\n ...(hideGutter\n ? {\n glyphMargin: !hidePadding,\n folding: false,\n lineNumbers: 'off',\n lineDecorationsWidth: 0,\n }\n : {}),\n ...(extraEditorOptions ?? {}),\n });\n const model = editor.getModel();\n model?.updateOptions({ tabSize: DEFAULT_TAB_SIZE });\n if (model) {\n if (error?.sourceInformation) {\n setErrorMarkers(model, [\n {\n message: error.message,\n startLineNumber: error.sourceInformation.startLine,\n startColumn: error.sourceInformation.startColumn,\n endLineNumber: error.sourceInformation.endLine,\n endColumn: error.sourceInformation.endColumn,\n },\n ]);\n }\n else {\n clearMarkers();\n }\n }\n }\n // dispose editor\n useEffect(() => () => {\n if (editor) {\n disposeCodeEditor(editor);\n onDidChangeModelContentEventDisposer.current?.dispose();\n }\n }, [editor]);\n return (_jsxs(\"div\", { className: \"code-editor\", children: [!hideActionBar && (_jsx(\"div\", { className: \"code-editor__header\", children: _jsx(\"button\", { tabIndex: -1, className: clsx('code-editor__header__action', {\n 'code-editor__header__action--active': isWordWrap,\n }), onClick: toggleWordWrap, title: `[${isWordWrap ? 'on' : 'off'}] Toggle word wrap`, children: _jsx(WordWrapIcon, {}) }) })), _jsx(\"div\", { className: clsx('code-editor__content', {\n 'code-editor__content--padding': !hidePadding,\n 'code-editor__content--with__header': !hideActionBar,\n }), children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) })] }));\n};\n//# sourceMappingURL=CodeEditor.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { flowResult } from 'mobx';\nimport { PlayIcon, clsx } from '@finos/legend-art';\nimport { useRef, useEffect, useState, useMemo } from 'react';\nimport { getBaseCodeEditorOptions, getCodeEditorValue, normalizeLineEnding, clearMarkers, setErrorMarkers, CODE_EDITOR_LANGUAGE, CODE_EDITOR_THEME, disposeCodeEditor, CodeEditor, } from '@finos/legend-lego/code-editor';\nimport { debounce } from '@finos/legend-shared';\nimport { DEFAULT_TAB_SIZE } from '@finos/legend-application';\nimport { useREPLGridClientStore } from '../REPLGridClientStoreProvider.js';\nimport { editor as monacoEditorAPI, languages as monacoLanguagesAPI, } from 'monaco-editor';\nconst QueryEditor = observer(() => {\n const editorStore = useREPLGridClientStore();\n const applicationStore = editorStore.applicationStore;\n const dataCubeState = editorStore.dataCubeState;\n const queryEditorState = dataCubeState.queryTextEditorState.queryEditorState;\n const onDidChangeModelContentEventDisposer = useRef(undefined);\n const value = normalizeLineEnding(queryEditorState.query);\n const parserError = queryEditorState.parserError;\n const [editor, setEditor] = useState();\n const textInputRef = useRef(null);\n const autoCompleteSuggestionProviderDisposer = useRef(undefined);\n const debouncedParseQuery = useMemo(() => debounce(() => {\n flowResult(dataCubeState.parseQuery()).catch(editorStore.applicationStore.alertUnhandledError);\n }, 1000), [dataCubeState, editorStore.applicationStore.alertUnhandledError]);\n if (editor) {\n onDidChangeModelContentEventDisposer.current?.dispose();\n onDidChangeModelContentEventDisposer.current =\n editor.onDidChangeModelContent(() => {\n const currentVal = getCodeEditorValue(editor);\n if (currentVal !== value) {\n queryEditorState.setQuery(currentVal);\n debouncedParseQuery.cancel();\n debouncedParseQuery();\n }\n });\n // Set the text value\n const currentValue = getCodeEditorValue(editor);\n const editorModel = editor.getModel();\n if (currentValue !== value) {\n editor.setValue(value);\n }\n // auto complete suggestions\n autoCompleteSuggestionProviderDisposer.current?.dispose();\n autoCompleteSuggestionProviderDisposer.current =\n monacoLanguagesAPI.registerCompletionItemProvider(CODE_EDITOR_LANGUAGE.PURE, {\n triggerCharacters: ['>', '.', '$', '~'],\n provideCompletionItems: async (model, position, context) => {\n const suggestions = await dataCubeState.getTypeaheadResults(position, model);\n return { suggestions };\n },\n });\n // Set the errors\n if (editorModel) {\n editorModel.updateOptions({ tabSize: DEFAULT_TAB_SIZE });\n const error = parserError;\n if (error?.sourceInformation) {\n setErrorMarkers(editorModel, [\n {\n message: error.message,\n startLineNumber: error.sourceInformation.startLine,\n startColumn: error.sourceInformation.startColumn,\n endLineNumber: error.sourceInformation.endLine,\n endColumn: error.sourceInformation.endColumn,\n },\n ]);\n }\n else {\n clearMarkers();\n }\n }\n }\n useEffect(() => {\n if (!editor && textInputRef.current) {\n const element = textInputRef.current;\n const _editor = monacoEditorAPI.create(element, {\n ...getBaseCodeEditorOptions(),\n language: CODE_EDITOR_LANGUAGE.PURE,\n theme: applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled\n ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_LIGHT\n : CODE_EDITOR_THEME.DEFAULT_DARK,\n });\n setEditor(_editor);\n }\n }, [\n applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled,\n editor,\n ]);\n // dispose editor\n useEffect(() => () => {\n if (editor) {\n disposeCodeEditor(editor);\n onDidChangeModelContentEventDisposer.current?.dispose();\n }\n }, [editor]);\n return (_jsx(\"div\", { className: clsx('repl__query__content__editor__content'), children: _jsx(\"div\", { className: \"code-editor__body\", ref: textInputRef }) }));\n});\nexport const DataCubeQueryTextEditor = observer((props) => {\n const { editorStore } = props;\n const dataCubeState = editorStore.dataCubeState;\n const executeLambda = () => {\n flowResult(dataCubeState.executeLambda()).catch(editorStore.applicationStore.alertUnhandledError);\n };\n const isLightTheme = editorStore.applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled;\n return (_jsxs(\"div\", { className: \"repl__content__query\", children: [_jsx(\"div\", { className: \"repl__query\", children: _jsxs(\"div\", { className: \"repl__query__editor\", children: [_jsxs(\"div\", { className: \"repl__query__header\", children: [_jsx(\"div\", { className: \"repl__query__label\", children: \"Curent Query\" }), _jsx(\"div\", { className: \"repl__query__execute-btn btn__dropdown-combo btn__dropdown-combo--primary\", children: _jsxs(\"button\", { className: \"btn__dropdown-combo__label\", onClick: executeLambda, tabIndex: -1, children: [_jsx(PlayIcon, { className: \"btn__dropdown-combo__label__icon\" }), _jsx(\"div\", { className: \"btn__dropdown-combo__label__title\", children: \"Run Query\" })] }) })] }), _jsx(\"div\", { className: \"repl__query__content\", children: _jsx(QueryEditor, {}) })] }) }), dataCubeState.queryTextEditorState.currentSubQuery !== undefined && (_jsx(\"div\", { className: \"repl__query\", children: _jsxs(\"div\", { className: \"repl__query__editor\", children: [_jsxs(\"div\", { className: \"repl__query__header\", children: [_jsx(\"div\", { className: \"repl__query__label__sub__query\", children: \"Current Row Group Sub Query\" }), _jsx(\"div\", { className: \"repl__query__label__sub__query__read--only\", children: \"Read Only\" })] }), _jsx(\"div\", { className: \"repl__query__content\", children: _jsx(CodeEditor, { lightTheme: isLightTheme\n ? CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_LIGHT\n : CODE_EDITOR_THEME.BUILT_IN__VSCODE_HC_BLACK, language: CODE_EDITOR_LANGUAGE.PURE, isReadOnly: true, inputValue: dataCubeState.queryTextEditorState.currentSubQuery, hideActionBar: true, hidePadding: true }) })] }) }))] }));\n});\n//# sourceMappingURL=DataCubeQueryTextEditor.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { AgGridReact } from '@ag-grid-community/react';\nimport { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';\nimport { ModuleRegistry } from '@ag-grid-community/core';\nimport { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';\nimport { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';\nimport { MenuModule } from '@ag-grid-enterprise/menu';\nimport { getDefaultColumnDefintions } from '../components/grid/GridUtils.js';\nimport { LicenseManager } from '@ag-grid-enterprise/core';\nconst communityModules = [ClientSideRowModelModule];\nconst enterpriseModules = [\n ServerSideRowModelModule,\n RowGroupingModule,\n MenuModule,\n];\nconst allModules = communityModules.concat(enterpriseModules);\nexport function AgGridComponent(props) {\n if (props.licenseKey) {\n LicenseManager.setLicenseKey(props.licenseKey);\n }\n return (_jsx(AgGridReact, { rowGroupPanelShow: 'always', suppressBrowserResizeObserver: true, suppressScrollOnNewData: true, alwaysMultiSort: true, rowModelType: 'serverSide', ...props, defaultColDef: getDefaultColumnDefintions(), modules: allModules }));\n}\nexport const configureAgGridComponent = () => {\n ModuleRegistry.registerModules([ClientSideRowModelModule, RowGroupingModule]);\n};\n//# sourceMappingURL=AgGrid.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TDSGroupby, TDSAggregation, TDSFilter, TDSRequest, TDSSort, TDSFilterCondition, TDS_FILTER_GROUP, TDSColumn, } from './TDSRequest.js';\nimport { guaranteeNonNullable, assertErrorThrown, LogEvent, } from '@finos/legend-shared';\nimport { LEGEND_REPL_EVENT } from '../../Const.js';\nimport { getTDSRowData, getTDSSortOrder, getTDSFilterOperation, getAggregationFunction, getFilterColumnType, } from './GridUtils.js';\nimport { flow, flowResult, makeObservable } from 'mobx';\nexport class ServerSideDataSource {\n executions = 0;\n rowData = [];\n columns = [];\n editorStore;\n constructor(rowData, columns, editorStore) {\n makeObservable(this, {\n fetchRows: flow,\n });\n this.rowData = rowData ?? [];\n this.columns = columns ?? [];\n this.editorStore = editorStore;\n }\n *fetchRows(params) {\n try {\n if (this.executions > 0 ||\n this.editorStore?.dataCubeState.gridState.currentQueryTDSRequest) {\n if (this.editorStore) {\n const request = this.extractRequest(params);\n this.editorStore.dataCubeState.gridState.setLastQueryTDSRequest(request);\n if (request) {\n yield flowResult(this.editorStore.dataCubeState.getREPLGridServerResult(request));\n const result = this.editorStore.dataCubeState.gridState.currentResult;\n const rowData = getTDSRowData(guaranteeNonNullable(result).result);\n params.success({ rowData: rowData });\n }\n else {\n params.fail();\n }\n }\n this.editorStore?.dataCubeState.gridState.setCurrentQueryTDSRequest(undefined);\n }\n else {\n params.success({ rowData: this.rowData });\n }\n this.executions++;\n }\n catch (error) {\n assertErrorThrown(error);\n this.editorStore?.applicationStore.notificationService.notifyError(error);\n this.editorStore?.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.FETCH_TDS_FAILURE), error);\n }\n }\n getRows(params) {\n this.fetchRows(params);\n }\n extractRequest(params) {\n try {\n const request = params.request;\n const startRow = request.startRow;\n const endRow = request.endRow;\n const columns = params.columnApi.getColumns()?.map((c) => c.getColId());\n const sort = request.sortModel.map((i) => new TDSSort(i.colId, getTDSSortOrder(i.sort)));\n const aggregations = request.valueCols.map((v) => {\n const colType = this.columns.find((c) => c.name === v.field)?.type;\n return new TDSAggregation(guaranteeNonNullable(v.field), colType, getAggregationFunction(guaranteeNonNullable(v.aggFunc)));\n });\n const groupBy = new TDSGroupby(request.rowGroupCols.map((r) => r.id), request.groupKeys, aggregations);\n const filter = [];\n const filterModel = request.filterModel;\n if (filterModel) {\n Object.keys(filterModel).forEach((key) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const item = filterModel[key];\n const conditions = [];\n const colType = getFilterColumnType(item.filterType);\n if (item.filter === undefined && item.conditions) {\n item.conditions.forEach((condition) => conditions.push(new TDSFilterCondition(getTDSFilterOperation(condition.type), condition.filter)));\n }\n else {\n conditions.push(new TDSFilterCondition(getTDSFilterOperation(item.type), item.filter));\n }\n filter.push(new TDSFilter(key, colType, conditions, item.operator === 'OR'\n ? TDS_FILTER_GROUP.OR\n : TDS_FILTER_GROUP.AND));\n });\n }\n const tdsRequest = new TDSRequest(columns?.map((col) => new TDSColumn(col)) ?? [], filter, sort, groupBy, startRow, endRow);\n return tdsRequest;\n }\n catch (error) {\n assertErrorThrown(error);\n this.editorStore?.applicationStore.notificationService.notifyError(error);\n this.editorStore?.applicationStore.logService.error(LogEvent.create(LEGEND_REPL_EVENT.BUILD_TDS_EQUEST_FAILURE), error);\n return undefined;\n }\n }\n}\n//# sourceMappingURL=ServerSideDataSource.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { AgGridComponent } from '../AgGrid.js';\nimport { getTDSRowData } from '../../components/grid/GridUtils.js';\nimport { ServerSideDataSource } from '../../components/grid/ServerSideDataSource.js';\nimport { PanelLoadingIndicator } from '@finos/legend-art';\nexport const DataCubeGridEditor = observer((props) => {\n const { editorStore } = props;\n const dataCubeState = editorStore.dataCubeState;\n return (_jsxs(_Fragment, { children: [_jsx(\"div\", { className: \"repl__query__label\", children: \"Result\" }), _jsx(PanelLoadingIndicator, { isLoading: dataCubeState.executeAction.isInProgress }), dataCubeState.executeAction.hasCompleted && (_jsx(AgGridComponent, { onGridReady: (params) => {\n dataCubeState.configState.setGridApi(params.api);\n }, className: editorStore.applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled\n ? 'ag-theme-balham'\n : 'ag-theme-balham-dark', gridOptions: dataCubeState.gridState.initialResult\n ? {\n serverSideDatasource: new ServerSideDataSource(getTDSRowData(dataCubeState.gridState.initialResult.result), dataCubeState.gridState.initialResult.builder.columns, editorStore),\n suppressServerSideInfiniteScroll: !dataCubeState.configState.isPaginationEnabled,\n }\n : {}, licenseKey: dataCubeState.configState.licenseKey ?? '', rowData: dataCubeState.gridState.rowData, columnDefs: dataCubeState.gridState.columnDefs }))] }));\n});\n//# sourceMappingURL=DataCubeGridEditor.js.map","import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { observer } from 'mobx-react-lite';\nimport { useREPLGridClientStore } from './REPLGridClientStoreProvider.js';\nimport { useEffect, useRef } from 'react';\nimport { flowResult } from 'mobx';\nimport { LEGEND_APPLICATION_COLOR_THEME } from '@finos/legend-application';\nimport { BasePopover, CheckSquareIcon, Modal, ModalBody, ModalFooter, ModalFooterButton, ModalHeader, ModalHeaderActions, ModalTitle, PlusIcon, SearchIcon, SquareIcon, TimesIcon, clsx, ChevronLeftIcon, ChevronRightIcon, CustomSelectorInput, } from '@finos/legend-art';\nimport { LEGEND_APPLICATION_REPL_SETTING_KEY } from '../Const.js';\nimport { useParams } from '@finos/legend-application/browser';\nimport { LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN, } from './LegendREPLGridClientApplication.js';\nimport { DataCubeQueryTextEditor } from './dataCube/DataCubeQueryTextEditor.js';\nimport { DataCubeGridEditor } from './dataCube/DataCubeGridEditor.js';\nimport { PIVOT_PANEL_TABS } from '../stores/dataCube/DataCubePropertiesPanelState.js';\nimport { TDS_SORT_ORDER } from './grid/TDSRequest.js';\nconst HPivotAndSortEditor = observer((props) => {\n const { editorStore } = props;\n const hPivotAndSortColumnState = editorStore.dataCubeState.propertiesPanelState.hpivotAndSortPanelState;\n const onAvailabeSortColumnsSearchTextChange = (event) => {\n hPivotAndSortColumnState.setAvailableSortColumnsSearchText(event.target.value);\n };\n const onSelectedSortColumnsSearchTextChange = (event) => {\n hPivotAndSortColumnState.setSelectedSortColumnsSearchText(event.target.value);\n };\n const clearAvailableSortColumnsSearchText = () => {\n hPivotAndSortColumnState.setAvailableSortColumnsSearchText('');\n };\n const clearSelectedSortColumnsSearchText = () => {\n hPivotAndSortColumnState.setSelectedSortColumnsSearchText('');\n };\n const sortOptions = Array.from(Object.values(TDS_SORT_ORDER)).map((val) => ({\n label: val,\n value: val,\n }));\n const onAvailableColumnsSortOptionsChanged = (columnName) => function AvailableColumnSortOption(option) {\n const column = hPivotAndSortColumnState.availableSortColumns.find((col) => col.column === columnName);\n if (column) {\n column.setOrder(option.value);\n }\n };\n const onSelectedColumnsSortOptionsChanged = (columnName) => function SelectedColumnSortOption(option) {\n const column = hPivotAndSortColumnState.selectedSortColumns.find((col) => col.column === columnName);\n if (column) {\n column.setOrder(option.value);\n }\n };\n return (_jsx(\"div\", { className: \"repl__hpivot__sort__editor\", children: _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__header\", children: \"Sorts\" }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__content\", children: [_jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__description\", children: \"Available sort columns:\" }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__container\", children: [_jsx(\"div\", { className: \"query-builder-property-search-panel__header\", children: _jsxs(\"div\", { className: \"query-builder-property-search-panel__input__container\", children: [_jsx(\"input\", { className: clsx('query-builder-property-search-panel__input', {\n 'query-builder-property-search-panel__input--searching': hPivotAndSortColumnState.availableSortColumnsSearchText,\n }), spellCheck: false, onChange: onAvailabeSortColumnsSearchTextChange, value: hPivotAndSortColumnState.availableSortColumnsSearchText, placeholder: \"Search\" }), !hPivotAndSortColumnState.availableSortColumnsSearchText ? (_jsx(_Fragment, { children: _jsx(\"div\", { className: \"query-builder-property-search-panel__input__search__icon\", children: _jsx(SearchIcon, {}) }) })) : (_jsx(\"button\", { className: \"query-builder-property-search-panel__input__clear-btn\", tabIndex: -1, onClick: clearAvailableSortColumnsSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }) }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__content\", children: [_jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__root\", onDoubleClick: () => hPivotAndSortColumnState.addAllAvailableSortColumns(), children: [_jsx(PlusIcon, {}), _jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__root__label\", children: \"All\" })] }), hPivotAndSortColumnState.availableSortColumnsSearchResults.map((col) => (_jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__children\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__children__name\", onDoubleClick: () => hPivotAndSortColumnState.addAvailableSortColumn(col.column), children: col.column }), _jsx(CustomSelectorInput, { className: \"repl__hpivot__sort__column__editor__available__columns__children__order\", options: sortOptions, onChange: onAvailableColumnsSortOptionsChanged(col.column), value: { label: col.order, value: col.order }, isClearable: false, darkMode: !editorStore.applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled })] }, col.column)))] })] })] }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__actions\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__action\", children: _jsxs(\"button\", { tabIndex: -1, \n // onClick={clearSearch}\n title: \"Add\", children: [\"Add\", _jsx(ChevronRightIcon, {})] }) }), _jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__action\", children: _jsxs(\"button\", { tabIndex: -1, \n // onClick={clearSearch}\n title: \"Remove\", children: [_jsx(ChevronLeftIcon, {}), \"Remove\"] }) })] }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__selected__columns\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__description\", children: \"Selected sort columns:\" }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__container\", children: [_jsx(\"div\", { className: \"query-builder-property-search-panel__header\", children: _jsxs(\"div\", { className: \"query-builder-property-search-panel__input__container\", children: [_jsx(\"input\", { className: clsx('query-builder-property-search-panel__input', {\n 'query-builder-property-search-panel__input--searching': hPivotAndSortColumnState.selectedSortColumnsSearchText,\n }), spellCheck: false, onChange: onSelectedSortColumnsSearchTextChange, value: hPivotAndSortColumnState.selectedSortColumnsSearchText, placeholder: \"Search\" }), !hPivotAndSortColumnState.selectedSortColumnsSearchText ? (_jsx(_Fragment, { children: _jsx(\"div\", { className: \"query-builder-property-search-panel__input__search__icon\", children: _jsx(SearchIcon, {}) }) })) : (_jsx(\"button\", { className: \"query-builder-property-search-panel__input__clear-btn\", tabIndex: -1, onClick: clearSelectedSortColumnsSearchText, title: \"Clear\", children: _jsx(TimesIcon, {}) }))] }) }), _jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__content\", children: [_jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__root\", onDoubleClick: () => hPivotAndSortColumnState.addAllSelectedSortColumns(), children: [_jsx(PlusIcon, {}), _jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__root__label\", children: \"All\" })] }), hPivotAndSortColumnState.selectedSortColumnsSearchResults.map((col) => (_jsxs(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__children\", children: [_jsx(\"div\", { className: \"repl__hpivot__sort__column__editor__available__columns__children__name\", onDoubleClick: () => hPivotAndSortColumnState.addSelectedSortColumn(col.column), children: col.column }), _jsx(CustomSelectorInput, { className: \"repl__hpivot__sort__column__editor__available__columns__children__order\", options: sortOptions, onChange: onSelectedColumnsSortOptionsChanged(col.column), value: { label: col.order, value: col.order }, isClearable: false, darkMode: !editorStore.applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled })] }, col.column)))] })] })] })] })] }) }));\n});\nconst PivotPanelEditor = observer((props) => {\n const { triggerElement, editorStore } = props;\n const dataCubeState = editorStore.dataCubeState;\n const applicationStore = editorStore.applicationStore;\n const closeEditor = () => {\n dataCubeState.configState.closePanel();\n };\n const selectedTab = dataCubeState.propertiesPanelState.selectedPivotPanelTab;\n const tabOptions = [\n PIVOT_PANEL_TABS.COLUMNS_AND_PIVOTS,\n PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS,\n PIVOT_PANEL_TABS.GENERAL_PROPERTIES,\n PIVOT_PANEL_TABS.COLUMN_PROPERTIES,\n PIVOT_PANEL_TABS.DEVELOPER_OPTIONS,\n PIVOT_PANEL_TABS.PIVOT_LAYOUT,\n ];\n const setSelectedTab = (tab) => {\n dataCubeState.propertiesPanelState.setSelectedPivotPanelTab(tab);\n };\n const onClickOk = () => {\n dataCubeState.propertiesPanelState.applyChanges();\n dataCubeState.configState.closePanel();\n };\n return (_jsx(BasePopover, { open: dataCubeState.configState.isPivotPanelOpened, onClose: closeEditor, anchorEl: triggerElement, anchorOrigin: {\n vertical: 'center',\n horizontal: 'center',\n }, transformOrigin: {\n vertical: 'center',\n horizontal: 'center',\n }, children: _jsxs(Modal, { darkMode: !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled, className: \"editor-modal embedded-runtime-editor\", children: [_jsxs(ModalHeader, { children: [_jsx(ModalTitle, { title: \"cube properties\" }), _jsx(ModalHeaderActions, { children: _jsx(\"button\", { className: \"modal__header__action\", tabIndex: -1, onClick: closeEditor, children: _jsx(TimesIcon, {}) }) })] }), _jsx(ModalBody, { children: _jsxs(\"div\", { style: { height: '100%', width: '100%' }, children: [_jsx(\"div\", { className: \"panel__header uml-element-editor__tabs__header \", children: _jsx(\"div\", { className: \"uml-element-editor__tabs\", children: tabOptions.map((tab) => (_jsx(\"div\", { onClick: () => setSelectedTab(tab), className: clsx('uml-element-editor__tab', {\n 'uml-element-editor__tab--active': tab === selectedTab,\n }), children: tab }, tab))) }) }), selectedTab === PIVOT_PANEL_TABS.HPIVOTS_AND_SORTS && (_jsx(HPivotAndSortEditor, { editorStore: editorStore }))] }) }), _jsx(ModalFooter, { className: \"repl__modal__footer\", children: _jsxs(\"div\", { className: \"search-modal__actions\", children: [_jsx(ModalFooterButton, { text: \"Ok\", onClick: onClickOk }), _jsx(ModalFooterButton, { text: \"Close\", onClick: closeEditor }), _jsx(ModalFooterButton, { text: \"Apply\", onClick: () => dataCubeState.propertiesPanelState.applyChanges() })] }) })] }) }));\n});\nexport const GenericEditor = observer((props) => {\n const { queryId } = props;\n const editorStore = useREPLGridClientStore();\n const dataCubeState = editorStore.dataCubeState;\n const pivotPanelButtonRef = useRef(null);\n const selectDarkTheme = () => {\n editorStore.applicationStore.layoutService.setColorTheme(LEGEND_APPLICATION_COLOR_THEME.DEFAULT_DARK, { persist: true });\n };\n const selectLightTheme = () => {\n editorStore.applicationStore.layoutService.setColorTheme(LEGEND_APPLICATION_COLOR_THEME.LEGACY_LIGHT, { persist: true });\n };\n const isLightTheme = editorStore.applicationStore.layoutService\n .TEMPORARY__isLightColorThemeEnabled;\n const saveQuery = () => {\n flowResult(dataCubeState.saveQuery()).catch(editorStore.applicationStore.alertUnhandledError);\n };\n const togglePagination = () => {\n dataCubeState.configState.setIsPaginationEnabled(!dataCubeState.configState.isPaginationEnabled);\n editorStore.applicationStore.settingService.persistValue(LEGEND_APPLICATION_REPL_SETTING_KEY.PAGINATION, dataCubeState.configState.isPaginationEnabled);\n };\n useEffect(() => {\n flowResult(dataCubeState.getInitialREPLGridServerResult(queryId)).catch(editorStore.applicationStore.alertUnhandledError);\n }, [dataCubeState, editorStore, queryId]);\n return (_jsxs(\"div\", { className: \"repl\", children: [_jsx(\"div\", { className: \"repl__header\", children: _jsxs(\"div\", { className: \"repl__header__content\", children: [_jsx(\"div\", { className: \"repl__header__content__title\", children: \"Legend DataCube\" }), _jsxs(\"div\", { className: \"repl__header__actions\", children: [_jsx(\"div\", { className: \"repl__header__action__pagination\", onClick: () => saveQuery(), children: _jsx(\"div\", { className: \"repl__header__action__pagination__label\", children: \"Save Query\" }) }), _jsxs(\"div\", { className: \"repl__header__action__pagination\", children: [_jsx(\"button\", { className: clsx('repl__header__action__pagination__toggler__btn', {\n 'repl__header__action__pagination__toggler__btn--toggled': dataCubeState.configState.isPaginationEnabled,\n }), onClick: togglePagination, tabIndex: -1, children: dataCubeState.configState.isPaginationEnabled ? (_jsx(CheckSquareIcon, {})) : (_jsx(SquareIcon, {})) }), _jsx(\"div\", { className: \"repl__header__action__pagination__label\", children: \"Pagination\" })] }), _jsx(\"button\", { className: isLightTheme\n ? 'repl__header__action'\n : 'repl__header__action repl__header__action--toggled', onClick: selectDarkTheme, children: \"Dark\" }), _jsx(\"button\", { className: isLightTheme\n ? 'repl__header__action repl__header__action--toggled'\n : 'repl__header__action', onClick: selectLightTheme, children: \"Light\" })] })] }) }), _jsxs(\"div\", { className: \"repl__content\", children: [_jsx(DataCubeQueryTextEditor, { editorStore: editorStore }), _jsx(DataCubeGridEditor, { editorStore: editorStore })] }), _jsxs(\"div\", { className: \"repl__footer\", children: [_jsx(\"div\", { className: \"repl__footer__pivot\", ref: pivotPanelButtonRef, onClick: () => dataCubeState.configState.openPanel(), children: \"Pivot\" }), _jsx(\"div\", { className: \"repl__footer__filter\", children: \"Filter\" }), _jsx(\"div\", { className: \"repl__footer__mode\", children: \"Modes\" }), dataCubeState.configState.isPivotPanelOpened && (_jsx(PivotPanelEditor, { editorStore: editorStore, triggerElement: pivotPanelButtonRef.current }))] })] }));\n});\nexport const Editor = observer(() => _jsx(GenericEditor, {}));\nexport const REPLQueryEditor = observer(() => {\n const params = useParams();\n const queryId = params[LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID];\n return _jsx(GenericEditor, { queryId: queryId });\n});\n//# sourceMappingURL=REPLGridClient.js.map","import { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useEffect } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { ApplicationComponentFrameworkProvider } from './ApplicationComponentFrameworkProvider.js';\nimport { useApplicationStore } from './ApplicationStoreProvider.js';\nimport { useApplicationPlatform } from './ApplicationPlatformProvider.js';\nexport const ApplicationFrameworkProvider = observer((props) => {\n const { children } = props;\n const platform = useApplicationPlatform();\n const applicationStore = useApplicationStore();\n useEffect(() => {\n applicationStore\n .initialize(platform)\n .catch(applicationStore.alertUnhandledError);\n }, [applicationStore, platform]);\n if (!applicationStore.initState.hasSucceeded) {\n return _jsx(_Fragment, {});\n }\n // TODO: would be great if we can have <React.StrictMode> here but since Mobx React is not ready for\n // concurrency yet, we would have to wait\n // See https://github.com/mobxjs/mobx/issues/2526\n return (_jsx(ApplicationComponentFrameworkProvider, { children: children }));\n});\n//# sourceMappingURL=ApplicationFrameworkProvider.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class LegendREPLGridClientBaseStore {\n applicationStore;\n pluginManager;\n constructor(applicationStore) {\n this.applicationStore = applicationStore;\n this.pluginManager = applicationStore.pluginManager;\n }\n}\n//# sourceMappingURL=LegendREPLGridClientBaseStore.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContext } from 'react';\nimport { useLocalObservable } from 'mobx-react-lite';\nimport { ApplicationFrameworkProvider, useApplicationStore, } from '@finos/legend-application';\nimport { LegendREPLGridClientBaseStore, } from '../stores/LegendREPLGridClientBaseStore.js';\nexport const useLegendREPLGridClientApplicationStore = () => useApplicationStore();\nconst LegendREPLGridClientBaseStoreContext = createContext(undefined);\nconst LegendREPLGridClientBaseStoreProvider = ({ children }) => {\n const applicationStore = useLegendREPLGridClientApplicationStore();\n const store = useLocalObservable(() => new LegendREPLGridClientBaseStore(applicationStore));\n return (_jsx(LegendREPLGridClientBaseStoreContext.Provider, { value: store, children: children }));\n};\nexport const LegendREPLGridClientFrameworkProvider = ({ children }) => (_jsx(ApplicationFrameworkProvider, { children: _jsx(LegendREPLGridClientBaseStoreProvider, { children: children }) }));\n//# sourceMappingURL=LegendREPLGridClientFrameworkProvider.js.map","import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BrowserEnvironmentProvider, Route, Switch, } from '@finos/legend-application/browser';\nimport { Editor, REPLQueryEditor } from './REPLGridClient.js';\nimport { LegendREPLGridClientFrameworkProvider } from './LegendREPLGridClientFrameworkProvider.js';\nimport { observer } from 'mobx-react-lite';\nimport { withEditorStore } from './REPLGridClientStoreProvider.js';\nexport var LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN;\n(function (LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN) {\n LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN[\"QUERY_ID\"] = \"queryId\";\n})(LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN || (LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN = {}));\nexport const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({\n GRID: `/grid`,\n SAVED_QUERY: `/query/:${LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN.QUERY_ID}`,\n});\nexport const LegendREPLGridClientRouter = withEditorStore(observer(() => (_jsx(\"div\", { className: \"app\", children: _jsxs(Switch, { children: [_jsx(Route, { exact: true, path: [LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.GRID], component: \n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n Editor }), _jsx(Route, { exact: true, path: [LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.SAVED_QUERY], component: \n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n REPLQueryEditor })] }) }))));\nexport const LegendREPLGridClientWebApplication = (props) => {\n const { baseUrl } = props;\n return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsx(LegendREPLGridClientFrameworkProvider, { children: _jsx(LegendREPLGridClientRouter, {}) }) }));\n};\n//# sourceMappingURL=LegendREPLGridClientApplication.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { LegendApplicationPlugin } from '@finos/legend-application';\nexport class LegendREPLGridClientApplicationPlugin extends LegendApplicationPlugin {\n /**\n * This helps to better type-check for this empty abtract type\n * See https://github.com/finos/legend-studio/blob/master/docs/technical/typescript-usage.md#understand-typescript-structual-type-system\n */\n _$nominalTypeBrand;\n install(pluginManager) {\n pluginManager.registerApplicationPlugin(this);\n }\n}\n//# sourceMappingURL=LegendREPLGridClientApplicationPlugin.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DATE_FORMAT, ELEMENT_PATH_DELIMITER, MULTIPLICITY_INFINITE, MULTIPLICITY_RANGE_OPERATOR, PRIMITIVE_TYPE, } from '../MetaModelConst.js';\nimport { PrimitiveType } from '../metamodel/pure/packageableElements/domain/PrimitiveType.js';\nimport { Enumeration } from '../metamodel/pure/packageableElements/domain/Enumeration.js';\nimport { formatDate } from '@finos/legend-shared';\nexport var PURE_ELEMENT_NAME;\n(function (PURE_ELEMENT_NAME) {\n PURE_ELEMENT_NAME[\"PROFILE\"] = \"Profile\";\n PURE_ELEMENT_NAME[\"CLASS\"] = \"Class\";\n PURE_ELEMENT_NAME[\"ENUMERATION\"] = \"Enum\";\n PURE_ELEMENT_NAME[\"MEASURE\"] = \"Measure\";\n PURE_ELEMENT_NAME[\"ASSOCIATION\"] = \"Association\";\n PURE_ELEMENT_NAME[\"FUNCTION\"] = \"function\";\n PURE_ELEMENT_NAME[\"MAPPING\"] = \"Mapping\";\n PURE_ELEMENT_NAME[\"FLAT_DATA\"] = \"FlatData\";\n PURE_ELEMENT_NAME[\"DATABASE\"] = \"Database\";\n PURE_ELEMENT_NAME[\"SERVICE\"] = \"Service\";\n PURE_ELEMENT_NAME[\"RUNTIME\"] = \"Runtime\";\n PURE_ELEMENT_NAME[\"CONNECTION\"] = \"Connection\";\n PURE_ELEMENT_NAME[\"FILE_GENERATION\"] = \"FileGeneration\";\n PURE_ELEMENT_NAME[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_ELEMENT_NAME[\"DATA_ELEMENT\"] = \"Data\";\n PURE_ELEMENT_NAME[\"EXECUTION_ENVIRONMENT\"] = \"ExecutionEnvironment\";\n})(PURE_ELEMENT_NAME || (PURE_ELEMENT_NAME = {}));\nexport var PURE_CONNECTION_NAME;\n(function (PURE_CONNECTION_NAME) {\n PURE_CONNECTION_NAME[\"JSON_MODEL_CONNECTION\"] = \"JsonModelConnection\";\n PURE_CONNECTION_NAME[\"XML_MODEL_CONNECTION\"] = \"XmlModelConnection\";\n PURE_CONNECTION_NAME[\"MODEL_CHAIN_CONNECTION\"] = \"ModelChainConnection\";\n PURE_CONNECTION_NAME[\"RELATIONAL_DATABASE_CONNECTION\"] = \"RelationalDatabaseConnection\";\n PURE_CONNECTION_NAME[\"FLAT_DATA_CONNECTION\"] = \"FlatDataConnection\";\n})(PURE_CONNECTION_NAME || (PURE_CONNECTION_NAME = {}));\nexport var PURE_PARSER;\n(function (PURE_PARSER) {\n PURE_PARSER[\"PURE\"] = \"Pure\";\n PURE_PARSER[\"CONNECTION\"] = \"Connection\";\n PURE_PARSER[\"RUNTIME\"] = \"Runtime\";\n PURE_PARSER[\"MAPPING\"] = \"Mapping\";\n PURE_PARSER[\"SERVICE\"] = \"Service\";\n PURE_PARSER[\"FLATDATA\"] = \"FlatData\";\n PURE_PARSER[\"RELATIONAL\"] = \"Relational\";\n PURE_PARSER[\"GENERATION_SPECIFICATION\"] = \"GenerationSpecification\";\n PURE_PARSER[\"FILE_GENERATION_SPECIFICATION\"] = \"FileGeneration\";\n PURE_PARSER[\"DATA\"] = \"Data\";\n})(PURE_PARSER || (PURE_PARSER = {}));\nexport const generateMultiplicityString = (lowerBound, upperBound) => {\n if (lowerBound === upperBound) {\n return lowerBound.toString();\n }\n else if (lowerBound === 0 && upperBound === undefined) {\n return MULTIPLICITY_INFINITE;\n }\n return `${lowerBound}${MULTIPLICITY_RANGE_OPERATOR}${upperBound ?? MULTIPLICITY_INFINITE}`;\n};\nexport const generateDefaultParameterValueForType = (type, index) => {\n if (!type) {\n return `param${index}`;\n }\n if (type instanceof Enumeration) {\n return type.values.length !== 0\n ? `${type.path}.${type.values[0]?.name}`\n : `param${index}`;\n }\n else if (type instanceof PrimitiveType) {\n switch (type.name) {\n case PRIMITIVE_TYPE.BOOLEAN:\n return true;\n case PRIMITIVE_TYPE.FLOAT:\n case PRIMITIVE_TYPE.DECIMAL:\n return 0.0;\n case PRIMITIVE_TYPE.NUMBER:\n case PRIMITIVE_TYPE.INTEGER:\n return 0;\n case PRIMITIVE_TYPE.DATE:\n case PRIMITIVE_TYPE.STRICTDATE:\n return `%${formatDate(new Date(), DATE_FORMAT)}`;\n case PRIMITIVE_TYPE.DATETIME:\n return `%${formatDate(new Date(), DATE_FORMAT)}T00:00:00`;\n case PRIMITIVE_TYPE.STRICTTIME:\n return `%00:00:00`;\n case PRIMITIVE_TYPE.STRING:\n return \"''\";\n default:\n return `param${index}`;\n }\n }\n // Other non-primitive types, e.g. Class\n return `param${index}`;\n};\nexport const generateFunctionCallString = (element) => {\n let lambdaString = '';\n if (element.parameters.length > 0) {\n for (let i = 0; i < element.parameters.length; i++) {\n const paramType = element.parameters[i]?.type.value;\n const separator = i !== element.parameters.length - 1 ? ', ' : '';\n lambdaString =\n lambdaString +\n generateDefaultParameterValueForType(paramType, i) +\n separator;\n }\n }\n return `${element.package?.path}${ELEMENT_PATH_DELIMITER}${element.functionName}(${lambdaString})`;\n};\nexport const generateFunctionPrettyName = (element, options) => `${options?.fullPath ? `${element.package?.path}${ELEMENT_PATH_DELIMITER}` : ''}${element.functionName}(${element.parameters\n .map((p) => !options?.notIncludeParamName\n ? `${p.name}: ${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`\n : `${p.type.value.name}[${generateMultiplicityString(p.multiplicity.lowerBound, p.multiplicity.upperBound)}]`)\n .join(', ')}): ${element.returnType.value.name}[${generateMultiplicityString(element.returnMultiplicity.lowerBound, element.returnMultiplicity.upperBound)}]`.replaceAll(/\\s*/gu, (val) => {\n if (options?.spacing) {\n return val;\n }\n return '';\n});\n//# sourceMappingURL=PureLanguageHelper.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable prefer-named-capture-group */\nimport { PURE_ELEMENT_NAME, PURE_CONNECTION_NAME } from '@finos/legend-graph';\nimport { languages as monacoLanguagesAPI } from 'monaco-editor';\nimport { PURE_GRAMMAR_TOKEN } from './PureLanguage.js';\nimport { CODE_EDITOR_LANGUAGE } from './CodeEditorUtils.js';\n/**\n * The postfix to be added to all token types, i.e. identifier.pure, number.pure, etc.\n */\nconst PURE_GRAMMAR_TOKEN_POSTFIX = '.pure';\n// Taken from `monaco-languages` configuration for Java in order to do propert brace matching\n// See https://github.com/microsoft/monaco-languages/blob/master/src/java/java.ts\nconst configuration = {\n // NOTE: Pure identifier includes $ but not in the first position (as that is parsed as a variable)\n wordPattern: /(-?\\d*\\.\\d\\w*)|([^`~!@#%^$&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s][^`~!@#%^&*()\\-=+[{\\]}\\\\|;:'\",.<>/?\\s]*)/,\n comments: {\n lineComment: '//',\n blockComment: ['/*', '*/'],\n },\n brackets: [\n ['{', '}'],\n ['[', ']'],\n ['(', ')'],\n ],\n autoClosingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n ],\n surroundingPairs: [\n { open: '{', close: '}' },\n { open: '[', close: ']' },\n { open: '(', close: ')' },\n { open: '\"', close: '\"' },\n { open: \"'\", close: \"'\" },\n { open: '<', close: '>' },\n { open: '<<', close: '>>' },\n ],\n folding: {\n markers: {\n start: new RegExp('^\\\\s*//\\\\s*(?:(?:#?region\\\\b)|(?:<editor-fold\\\\b))'),\n end: new RegExp('^\\\\s*//\\\\s*(?:(?:#?endregion\\\\b)|(?:</editor-fold>))'),\n },\n },\n};\n/**\n * Create new monarch definition to support syntax-highlighting\n * See https://microsoft.github.io/monaco-editor/monarch.html\n *\n * The way SQL monarch definition is organized is good and worth learning from\n * See https://github.com/microsoft/monaco-languages/blob/master/src/sql/sql.ts\n *\n * NOTE: using `monarch` only allows fairly very basic syntax-highlighting\n * to actually do full AST analysis, we might need something more serious like\n * using TextMate grammar which is used by VSCode itself\n * See https://github.com/microsoft/monaco-editor#faq\n * See https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide\n */\nconst generateLanguageMonarch = (extraKeywords) => \n// TODO: complete syntax-highlighter for core features like constraint, derived properties, etc.\n// TODO: add syntax highlighting for modules/plugins (come up with a plugin mechanism to do this).\n({\n defaultToken: 'invalid',\n tokenPostfix: PURE_GRAMMAR_TOKEN_POSTFIX,\n keywords: [\n ...extraKeywords,\n // relational\n 'Schema',\n 'Table',\n 'Join',\n 'View',\n 'primaryKey',\n 'groupBy',\n 'mainTable',\n // native\n 'let',\n 'extends',\n 'true',\n 'false',\n 'projects',\n // elements\n PURE_ELEMENT_NAME.CLASS,\n PURE_ELEMENT_NAME.ASSOCIATION,\n PURE_ELEMENT_NAME.ENUMERATION,\n PURE_ELEMENT_NAME.MEASURE,\n PURE_ELEMENT_NAME.PROFILE,\n PURE_ELEMENT_NAME.FUNCTION,\n PURE_ELEMENT_NAME.MAPPING,\n PURE_ELEMENT_NAME.RUNTIME,\n PURE_ELEMENT_NAME.CONNECTION,\n PURE_ELEMENT_NAME.FILE_GENERATION,\n PURE_ELEMENT_NAME.GENERATION_SPECIFICATION,\n PURE_ELEMENT_NAME.DATA_ELEMENT,\n // connections\n PURE_CONNECTION_NAME.JSON_MODEL_CONNECTION,\n PURE_CONNECTION_NAME.MODEL_CHAIN_CONNECTION,\n PURE_CONNECTION_NAME.XML_MODEL_CONNECTION,\n // mapping\n 'include',\n 'EnumerationMapping',\n 'Pure',\n 'AssociationMapping',\n 'XStore',\n 'AggregationAware',\n /**\n * @modularize\n * See https://github.com/finos/legend-studio/issues/65\n */\n PURE_ELEMENT_NAME.SERVICE,\n PURE_ELEMENT_NAME.FLAT_DATA,\n PURE_ELEMENT_NAME.DATABASE,\n PURE_CONNECTION_NAME.FLAT_DATA_CONNECTION,\n PURE_CONNECTION_NAME.RELATIONAL_DATABASE_CONNECTION,\n 'Relational',\n ],\n operators: [\n '=',\n '>',\n '<',\n '!',\n '~',\n '?',\n ':',\n '==',\n '<=',\n '>=',\n '&&',\n '||',\n '++',\n '--',\n '+',\n '-',\n '*',\n '/',\n '&',\n '|',\n '^',\n '%',\n '->',\n '#{',\n '}#',\n '@',\n '<<',\n '>>',\n ],\n languageStructs: ['import', 'native'],\n // common regular expressions to be used in tokenizer\n identifier: /[a-zA-Z_$][\\w$]*/,\n symbols: /[=><!~?:&|+\\-*/^%#@]+/,\n escapes: /\\\\(?:[abfnrtv\\\\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,\n digits: /\\d+(_+\\d+)*/,\n octaldigits: /[0-7]+(_+[0-7]+)*/,\n binarydigits: /[0-1]+(_+[0-1]+)*/,\n hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,\n multiplicity: /\\[(?:[a-zA-Z0-9]+(?:\\.\\.(?:[a-zA-Z0-9]+|\\*|))?|\\*)\\]/,\n package: /(?:[\\w_]+::)+/,\n // NOTE: generics is a little tricky because in order to do it right, we have to\n // do some sort of bracket matching, but we just can use a simple tokenizer here\n // so to account for cases like `<Nil,Any|*>)->` `Function<{T[1]->Boolean[1]}>[1]`\n // we have to make sure the content does not contain any `:` or `.` characters\n // in order to avoid the accidental greedy match with inputs like\n // `function doSomething<T>(a: Function<T[1]->Boolean[1]>)`\n // nor we want to make sure the last character of the content is not `-` to avoid\n // accidentally matching `->` as the end of the generics\n generics: /(?:(?:<\\w+>)|(?:<[^:.@^()]+[^-]>))/,\n date: /%-?\\d+(?:-\\d+(?:-\\d+(?:T(?:\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?)(?:[+-][0-9]{4})?)))/,\n time: /%\\d+(?::\\d+(?::\\d+(?:.\\d+)?)?)?/,\n tokenizer: {\n root: [\n // NOTE: since `monaco-editor` Monarch is only meant for tokenizing\n // and the need to highlight Pure syntax is more than just token-based,\n // but semantic/syntax-based we have to create these complex rules.\n // the things to note here is these are not meant to match multilines\n // and they must be placed before identifier rules since token matching\n // is run in order\n // See https://github.com/microsoft/monaco-editor/issues/316#issuecomment-273555698\n // See https://github.com/microsoft/monaco-editor/issues/571#issuecomment-342555050\n // See https://microsoft.github.io/monaco-editor/monarch.html\n { include: '@pure' },\n { include: '@date' },\n { include: '@color' },\n // parser markers\n [\n // NOTE: any leading whitespace to the section header is considered invalid syntax\n /^\\s*###[\\w]+/,\n PURE_GRAMMAR_TOKEN.PARSER,\n ],\n // identifiers and keywords\n [\n /(@identifier)/,\n {\n cases: {\n '@languageStructs': PURE_GRAMMAR_TOKEN.LANGUAGE_STRUCT,\n '@keywords': `${PURE_GRAMMAR_TOKEN.KEYWORD}.$0`,\n // function descriptor\n '([a-zA-Z_$][\\\\w$]*)_((\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))__)*(\\\\w+_(([a-zA-Z0-9]+)|(\\\\$[a-zA-Z0-9]+_[a-zA-Z0-9]+\\\\$)))_': PURE_GRAMMAR_TOKEN.TYPE,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n // whitespace\n { include: '@whitespace' },\n // delimiters and operators\n [/[{}()[\\]]/, '@brackets'],\n [/[<>](?!@symbols)/, '@brackets'],\n [\n /@symbols/,\n {\n cases: {\n '@operators': PURE_GRAMMAR_TOKEN.OPERATOR,\n '@default': PURE_GRAMMAR_TOKEN.IDENTIFIER,\n },\n },\n ],\n { include: '@number' },\n // delimiter: after number because of .\\d floats\n [/[;,.]/, PURE_GRAMMAR_TOKEN.DELIMITER],\n // strings\n // NOTE: including non-teminated string so as people type ', we can start showing them that they're working on a string\n [/'([^'\\\\]|\\\\.)*$/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@string'],\n { include: '@characters' },\n ],\n pure: [\n // type\n [/(@package\\*)/, [PURE_GRAMMAR_TOKEN.PACKAGE]], // import path\n [\n /(@package?)(@identifier)(@generics?)(\\s*)(@multiplicity)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n [\n /(@package)(@identifier)(@generics?)/,\n [\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n ],\n ],\n // special operators that uses type (e.g. constructor, cast)\n [\n /([@^])(\\s*)(@package?)(@identifier)(@generics?)(@multiplicity?)/,\n [\n `${PURE_GRAMMAR_TOKEN.TYPE}.operator`,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.PACKAGE,\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.GENERICS,\n PURE_GRAMMAR_TOKEN.MULTIPLICITY,\n ],\n ],\n // property / parameter\n [\n /(\\.\\s*)(@identifier)/,\n [PURE_GRAMMAR_TOKEN.DELIMITER, PURE_GRAMMAR_TOKEN.PROPERTY],\n ],\n [\n /(@identifier)(\\s*=)/,\n [PURE_GRAMMAR_TOKEN.PROPERTY, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n [\n /(@identifier)(\\.)(@identifier)/,\n [\n PURE_GRAMMAR_TOKEN.TYPE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n PURE_GRAMMAR_TOKEN.PROPERTY,\n ],\n ], // could be: property chain, profile tag, and stereotype\n [\n /(@identifier)(\\s*:)/,\n [PURE_GRAMMAR_TOKEN.PARAMETER, PURE_GRAMMAR_TOKEN.OPERATOR],\n ],\n // variables\n [\n /(let)(\\s+)(@identifier)(\\s*=)/,\n [\n PURE_GRAMMAR_TOKEN.KEYWORD,\n PURE_GRAMMAR_TOKEN.WHITESPACE,\n PURE_GRAMMAR_TOKEN.VARIABLE,\n PURE_GRAMMAR_TOKEN.OPERATOR,\n ],\n ],\n [/(\\$@identifier)/, [`${PURE_GRAMMAR_TOKEN.VARIABLE}.reference`]],\n ],\n date: [\n [/(%latest)/, [`${PURE_GRAMMAR_TOKEN.DATE}.latest`]],\n [/(@date)/, [PURE_GRAMMAR_TOKEN.DATE]],\n [/(@time)/, [`${PURE_GRAMMAR_TOKEN.DATE}.time`]],\n ],\n color: [[/(#[0-9a-fA-F]{6})/, [PURE_GRAMMAR_TOKEN.COLOR]]],\n number: [\n [\n /(@digits)[eE]([-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [\n /(@digits)\\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,\n `${PURE_GRAMMAR_TOKEN.NUMBER}.float`,\n ],\n [/0[xX](@hexdigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.hex`],\n [/0(@octaldigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.octal`],\n [/0[bB](@binarydigits)[Ll]?/, `${PURE_GRAMMAR_TOKEN.NUMBER}.binary`],\n [/(@digits)[fFdD]/, `${PURE_GRAMMAR_TOKEN.NUMBER}.float`],\n [/(@digits)[lL]?/, PURE_GRAMMAR_TOKEN.NUMBER],\n ],\n whitespace: [\n [/[ \\t\\r\\n]+/, PURE_GRAMMAR_TOKEN.WHITESPACE],\n [/\\/\\*\\*(?!\\/)/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@doc'],\n [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@comment'],\n [/\\/\\/.*$/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n comment: [\n [/[^/*]+/, PURE_GRAMMAR_TOKEN.COMMENT],\n // [/\\/\\*/, PURE_GRAMMAR_TOKEN.COMMENT, '@push' ], // nested comment not allowed :-(\n // [/\\/\\*/, ${PURE_GRAMMAR_TOKEN.COMMENT}.invalid` ], // this breaks block comments in the shape of /* //*/\n [/\\*\\//, PURE_GRAMMAR_TOKEN.COMMENT, '@pop'],\n [/[/*]/, PURE_GRAMMAR_TOKEN.COMMENT],\n ],\n // Identical copy of comment above, except for the addition of .doc\n doc: [\n [/[^/*]+/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n // [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@push' ], // nested comment not allowed :-(\n [/\\/\\*/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc.invalid`],\n [/\\*\\//, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`, '@pop'],\n [/[/*]/, `${PURE_GRAMMAR_TOKEN.COMMENT}.doc`],\n ],\n string: [\n [/[^\\\\']+/, PURE_GRAMMAR_TOKEN.STRING],\n [/@escapes/, `${PURE_GRAMMAR_TOKEN.STRING}.escape`],\n [/\\\\./, `${PURE_GRAMMAR_TOKEN.STRING}.escape.invalid`],\n [/'/, PURE_GRAMMAR_TOKEN.STRING, '@pop'],\n ],\n characters: [\n [/'[^\\\\']'/, PURE_GRAMMAR_TOKEN.STRING],\n [\n /(')(@escapes)(')/,\n [\n PURE_GRAMMAR_TOKEN.STRING,\n `${PURE_GRAMMAR_TOKEN.STRING}.escape`,\n PURE_GRAMMAR_TOKEN.STRING,\n ],\n ],\n [/'/, `${PURE_GRAMMAR_TOKEN.STRING}.invalid`],\n ],\n },\n});\nexport function setupPureLanguageService(options) {\n monacoLanguagesAPI.register({ id: CODE_EDITOR_LANGUAGE.PURE });\n monacoLanguagesAPI.setLanguageConfiguration(CODE_EDITOR_LANGUAGE.PURE, configuration);\n monacoLanguagesAPI.setMonarchTokensProvider(CODE_EDITOR_LANGUAGE.PURE, generateLanguageMonarch(options?.extraKeywords ?? []));\n}\n//# sourceMappingURL=PureLanguageService.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport packageJson from '../../package.json' assert { type: 'json' };\nimport { LegendREPLGridClientApplicationPlugin } from '../stores/LegendREPLGridClientApplicationPlugin.js';\nimport { configureAgGridComponent } from './AgGrid.js';\nimport { configureCodeEditorComponent, setupPureLanguageService, } from '@finos/legend-lego/code-editor';\nexport class Core_LegendREPLGridClientApplicationPlugin extends LegendREPLGridClientApplicationPlugin {\n static NAME = packageJson.extensions.applicationREPLGridClientPlugin;\n constructor() {\n super(Core_LegendREPLGridClientApplicationPlugin.NAME, packageJson.version);\n }\n getExtraApplicationSetups() {\n return [\n async (applicationStore) => {\n configureAgGridComponent();\n await configureCodeEditorComponent(applicationStore);\n setupPureLanguageService();\n },\n ];\n }\n}\n//# sourceMappingURL=Core_LegendREPLGridClientApplicationPlugin.js.map","import { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createRoot } from 'react-dom/client';\nimport { LegendApplication, ApplicationStoreProvider, Core_LegendApplicationPlugin, getApplicationRootElement, } from '@finos/legend-application';\nimport { LegendREPLGridClientApplicationConfig, } from './LegendREPLGridClientApplicationConfig.js';\nimport { LegendREPLGridClientPluginManager } from './LegendREPLGridClientPluginManager.js';\nimport { LegendREPLGridClientWebApplication } from '../components/LegendREPLGridClientApplication.js';\nimport { Core_LegendREPLGridClientApplicationPlugin } from '../components/Core_LegendREPLGridClientApplicationPlugin.js';\nexport class LegendREPLGridClient extends LegendApplication {\n static create() {\n const application = new LegendREPLGridClient(LegendREPLGridClientPluginManager.create());\n application.withBasePlugins([\n new Core_LegendApplicationPlugin(),\n new Core_LegendREPLGridClientApplicationPlugin(),\n ]);\n application.withBasePresets([]);\n return application;\n }\n // TODO: we need a btter strategy to make this work with vscode code-server\n // especially when handling static content such as config.json and version.json\n // we need to balance out what we output in the HTML file, what we call in the app\n // to fetch these files, as well as how we develop locally\n // e.g. use something like `${window.location.href.split('/repl/')[0]}/repl/`\n async configureApplication(input) {\n return new LegendREPLGridClientApplicationConfig(input);\n }\n async loadApplication(applicationStore) {\n createRoot(getApplicationRootElement()).render(_jsx(ApplicationStoreProvider, { store: applicationStore, children: _jsx(LegendREPLGridClientWebApplication, { baseUrl: this.baseAddress }) }));\n }\n}\n//# sourceMappingURL=LegendREPLGridClient.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport {} from '@finos/legend-shared';\nimport { LegendREPLGridClient } from './application/LegendREPLGridClient.js';\nimport { Core_LegendREPLGridClientApplicationPlugin } from './components/Core_LegendREPLGridClientApplicationPlugin.js';\nexport class LegendREPLGridClientWebApplication {\n static getPresetCollection() {\n return [];\n }\n static getPluginCollection() {\n return [new Core_LegendREPLGridClientApplicationPlugin()];\n }\n static run(baseUrl) {\n LegendREPLGridClient.create()\n .setup({ baseAddress: baseUrl })\n .withPresets(LegendREPLGridClientWebApplication.getPresetCollection())\n .withPlugins(LegendREPLGridClientWebApplication.getPluginCollection())\n .start()\n .catch((e) => {\n throw e;\n });\n }\n}\n//# sourceMappingURL=index.js.map","/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { LegendREPLGridClientWebApplication } from '@finos/legend-application-repl';\nimport './index.scss';\n\n// Resolve baseUrl relatively for application to work in vscode code-server\nconst relativeBaseUrl = new URL('./', window.location.href).pathname;\nLegendREPLGridClientWebApplication.run(relativeBaseUrl);\n","\"use strict\";\n/**\n * Copyright (c) 2020-present, Goldman Sachs\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Previously, these exports rely on ES module interop to expose `default` export\n * properly. But since we use `ESM` for Typescript resolution now, we lose this\n * so we have to workaround by importing these and re-export them from CJS\n *\n * TODO: remove these when the package properly work with Typescript's nodenext\n * module resolution\n *\n * @workaround ESM\n * See https://github.com/microsoft/TypeScript/issues/49298\n *\n * In addition to that, due to our upgrade to Typescript 5.0, we are forced to enable\n * --verbatimModuleSyntax flag, so we have to use CommonJS syntax in this file\n * See https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/#verbatimmodulesyntax\n */\nconst CreatableSelect = require(\"react-select/creatable\");\nconst Select = require(\"react-select\");\nmodule.exports = {\n CreatableSelect,\n Select,\n SelectComponents: Select.components,\n};\n//# sourceMappingURL=CJS__ReactSelect.cjs.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"./\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunk_finos_legend_application_repl_deployment\"] = globalThis[\"webpackChunk_finos_legend_application_repl_deployment\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [121], () => (__webpack_require__(5759)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","noop","ApplicationError","Error","uuid","constructor","message","super","this","undefined","detail","EnrichedError","name","error","overideMessage","messageLines","match","length","stack","split","slice","join","captureStackTrace","IllegalStateError","unsupportedObject","value","options","opts","obj","printFunctionName","maxDepth","deep","pickBy","val","replace","includes","printObject","assertErrorThrown","returnUndefOnError","fn","AssertionError","isNonNullable","guaranteeType","clazz","assertType","guaranteeNonEmptyString","str","assertNonEmptyString","assertionValue","isNaN","guaranteeIsString","assertIsString","guaranteeIsNumber","assertIsNumber","guaranteeIsBoolean","assertIsBoolean","HttpStatus","CHARSET","HttpHeader","ContentType","HttpMethod","DEFAULT_CLIENT_REQUEST_OPTIONS","mode","credentials","redirect","mergeRequestHeaders","headersOne","headersTwo","requestHeaders","Object","entries","forEach","key","NetworkClientError","response","payload","status","statusText","url","summary","JSON","stringify","payloadAsObject","parse","extractMessage","substring","processResponse","async","init","responseProcessConfig","preprocess","ok","text","Promise","reject","skipProcessing","resolve","NO_CONTENT","accept","headers","Accept","APPLICATION_JSON","json","TEXT_PLAIN","createRequestHeaders","method","baseRequestHeaders","GET","CONTENT_TYPE","NetworkClient","baseUrl","config","get","parameters","requestProcessConfig","request","put","data","PUT","post","POST","DELETE","requestUrl","URL","fullUrl","Array","isArray","filter","subVal","searchParams","append","toString","makeUrl","body","enableCompression","Blob","compressData","APPLICATION_ZLIB","requestInit","fetch","then","UNAUTHORIZED","autoReAuthenticateUrl","id","previous","document","getElementById","remove","element","createElement","src","style","display","addEventListener","appendChild","autoReAuthenticate","resp","catch","TypeError","couldBeCORS","fileName","content","contentType","blob","type","createObjectURL","link","download","href","click","removeChild","location","LOG_LEVEL","APPLICATION_EVENT","LogEvent","channel","timestamp","Date","now","create","event","LogService","loggers","registerPlugins","loggerPlugins","debug","logger","info","warn","SerializationFactory","schema","deserializeNullAsUndefined","Boolean","toJson","fromJson","optionalCustomUsingModelSchema","DocumentationEntry","markdownText","title","related","static","documentationKey","entry","serialization","collectKeyedDocumentationEntriesFromConfig","rawEntries","map","DocumentationService","links","docRegistry","Map","contextualDocIndex","applicationStore","documentationUrl","documentationLinkEntries","pluginManager","getApplicationPlugins","flatMap","plugin","getExtraKeyedDocumentationEntries","hasDocEntry","logService","DOCUMENTATION_LOAD__SKIP","set","keyedDocumentationEntries","contextualDocEntries","getExtraContextualDocumentationEntries","missingDocumentationEntries","uniq","getExtraRequiredDocumentationKeys","concat","has","push","DOCUMENTATION_REQUIREMENT_CHECK__FAILURE","hasContextualDocEntry","context","CONTEXTUAL_DOCUMENTATION_LOAD__SKIP","existingDocEntry","getDocEntry","getContextualDocEntry","getAllDocEntries","from","values","publishDocRegistry","result","publishContextualDocIndex","ACTION_STATE","CORE_TRACER_TAG","ActionState","state","_message","_messageFormatter","INITIAL","setMessage","setMessageFormatter","reset","inProgress","IN_PROGRESS","fail","FAILED","pass","SUCCEEDED","complete","hasSucceeded","sync","exportData","isInInitialState","isInProgress","hasFailed","hasCompleted","Trace","traceEntries","setup","bootstrap","clientSpan","reportSuccess","concludeClientSpan","reportError","close","concludeServerSpan","serverSpan","TracerService","plugins","createTrace","traceData","trace","createClientSpan","createServerSpan","FuzzySearchEngine","ADVANCED_FUZZY_SEARCH_MODE","VIRTUAL_ASSISTANT_TAB","FuzzySearchAdvancedConfigState","currentMode","STANDARD","onSearchModeChange","isAdvancedSearchActive","setCurrentMode","generateSearchText","INCLUDE","EXACT","INVERSE","VirtualAssistantDocumentationEntry","isOpen","docEntry","setIsOpen","VirtualAssistantContextualDocumentationEntry","isValidVirtualAssistantDocumentationEntry","AssistantService","panelRenderingKey","isHidden","isPanelMaximized","selectedTab","SEARCH","currentDocumentationEntry","searchEngine","searchConfigurationState","searchState","searchText","searchResults","showSearchConfigurationMenu","isOverSearchLimit","currentContextualDocumentationEntry","setIsHidden","setIsPanelMaximized","setSelectedTab","setSearchText","resetSearch","search","openDocumentationEntry","refreshPanelRendering","setShowSearchConfigurationMenu","documentationService","includeScore","shouldSort","ignoreLocation","threshold","keys","weight","useExtendedSearch","navigationContextService","currentContext","openDocumentationEntryLink","shouldDisplayVirtualAssistantDocumentationEntry","navigationService","navigator","visitAddress","hideAssistant","toggleAssistant","limit","DOCUMENTATION_SEARCH_RESULTS_LIMIT","item","EventService","notifierPlugins","registerEventNotifierPlugins","notify","LegendApplicationTelemetryHelper","logEvent_ApplicationInitializationSucceeded","service","logEvent","APPLICATION_LOAD__SUCCESS","application","appName","version","appVersion","env","browser","userAgent","screen","height","window","width","logEvent_ApplicationContextAccessed","APPLICATION_CONTEXT__ACCESS","logEvent_VirtualAssistantDocumentationEntryAccessed","VIRTUAL_ASSISTANT_DOCUMENTATION_ENTRY__ACCESS","logEvent_ApplicationUsageInterrupted","APPLICATION_USAGE__INTERRUPT","ApplicationNavigationContextService","contextStack","pop","newContextStack","ctx","isTransient","find","getExtraAccessEventLoggingApplicationContextKeys","telemetryService","existingCtx","idx","indexOf","CommandService","commandRegistry","registerCommand","deregisterCommand","command","commandKey","COMMAND_CENTER_REGISTRATION__FAILURE","delete","runCommand","args","trigger","action","KeyboardShortcutsService","keyMap","commandKeyMap","isHotkeysBlocked","addHotkey","blockGlobalHotkeys","unblockGlobalHotkeys","getExtraKeyedCommandConfigEntries","shortcuts","defaultKeyboardShortcut","additionalKeyboardShortcuts","shortcut","keyCombination","dispatch","mappedCommandKeys","commandService","DEFAULT_MONOSPACED_FONT_FAMILY","DEFAULT_DATE_TIME_FORMAT","DISPLAY_ANSI_ESCAPE","ANSI_moveCursor","line","column","ConsoleSearchConfiguration","searchInput","useRegex","matchWholeWord","matchCaseSensitive","resultCount","currentResultIndex","setSearchInput","el","focus","Console","searchConfig","setSearchRegex","setSearchWholeWord","setSearchCaseSensitive","setSearchResultCount","setSearchCurrentResultIndex","Terminal","preserveLog","setPreserveLog","showHelp","showCommonANSIEscapeSequences","capitalize","toUpperCase","TITLE_CASE_EXCEPTION_WORDS","toTitleCase","trim","toLowerCase","prettyCONSTName","chunk","charAt","KEYBOARD_NAMED_KEY","parseKeybinding","press","modifiers","isMatchingKeyPressData","keyPressData","code","every","modifier","getModifierState","SHIFT","META","ALT","CONTROL","isMatchingKeyCombination","LegendCustomMUITheme","createTheme","transitions","LegendStyleProvider","props","children","StyledEngineProvider","injectFirst","ThemeProvider","theme","generateSimpleDIVComponent","componentName","divClassName","component","className","displayName","Modal","darkMode","ModalTitle","icon","ModalHeader","ModalHeaderActions","ModalBody","ModalFooter","ModalFooterButton","onClick","inProgressText","disabled","formatText","preventFormSubmit","isDarkMode","isFormatText","isSecondary","isPreventFormSubmit","ActionAlertType","ActionAlertActionType","AlertService","blockingAlertInfo","actionAlertInfo","setBlockingAlert","setActionAlertInfo","alertInfo","keyboardShortcutsService","notificationService","notifyIllegalState","ApplicationStoreContext","createContext","useApplicationStore","useContext","ApplicationStoreProvider","store","Provider","getActionButtonClassName","PROCEED_WITH_CAUTION","PROCEED","ActionAlertContent","prompt","onClose","onEnter","actions","handleClose","alertService","Dialog","open","TransitionProps","onSubmit","preventDefault","default","handler","e","autoFocus","label","ActionAlert","PanelLoadingIndicator","isLoading","ref","useRef","useEffect","current","parentElement","classList","add","BlockingAlert","classes","root","container","layoutService","TEMPORARY__isLightColorThemeEnabled","showLoading","WordWrapIcon","CloseIcon","ThinVerticalDragHandleIcon","TimesIcon","TimesCircleIcon","PlusIcon","CogIcon","CaretDownIcon","SquareIcon","CheckSquareIcon","QuestionCircleIcon","InfoCircleIcon","PlayIcon","SearchIcon","MinusCircleIcon","CheckCircleIcon","ExclamationTriangleIcon","BugIcon","CircleNotchIcon","EmptyWindowRestoreIcon","WindowMaximizeIcon","MapMarkerIcon","WizardHatIcon","FaceLaughWinkIcon","FaceSadTearIcon","BeardIcon","SunglassesIcon","ChevronDownIcon","ChevronUpIcon","ChevronLeftIcon","ChevronRightIcon","DEFAULT_NOTIFICATION_HIDE_TIME","NOTIFCATION_SEVERITY","Notification","severity","autoHideDuration","NotificationService","notification","setNotification","notifySuccess","notifyWarning","notifyError","INFO","SUCCESS","WARNING","ERROR","ILEGAL_STATE","notifyUnsupportedFeature","featureName","notifyAndReturnAlternativeOnError","alternative","NotificationManager","isExpanded","setIsExpanded","useState","notificationIcon","handleCopy","guardUnhandledError","clipboardService","copyTextToClipboard","anchorOriginBottomRight","anchorOrigin","vertical","horizontal","reason","tabIndex","BaseMenu","otherProps","paper","list","transitionDuration","ContextMenu","menuProps","onOpen","contextMenuRoot","anchorEl","setAnchorEl","left","setLeft","top","setTop","stopPropagation","onContextMenu","containerRect","getBoundingClientRect","containerLeft","scrollX","documentElement","scrollLeft","containerTop","scrollY","scrollTop","clientX","clientY","target","eventTarget","elementsFromPoint","some","anchorPosition","anchorReference","BackdropProps","invisible","disableRestoreFocus","MenuContent","forwardRef","MenuContentItem","MarkdownTextViewer","initialize","startOnLoad","contentLoaded","remarkPlugins","components","_props","node","rest","exec","groups","language","BlankPanelContent","contentRef","contentWidth","contentHeight","u","refreshMode","refreshRate","refreshOptions","trailing","showContent","setShowContent","containerRef","containerWidth","containerHeight","DEFAULT_CONTENT_PADDING","BaseRadioGroup","size","targetOptionsValuesInMatrix","arr","stepSize","matrix","i","transformToMatrix","row","op","FormControlLabel","control","Radio","BasePopover","LEGEND_APPLICATION_DOCUMENTATION_KEY","VirtualAssistantDocumentationEntryViewer","toggleExpand","copyDocumentationKey","elevation","rel","VirtualAssistantContextualSupportPanel","contextualEntry","assistantService","copyContextIDToClipboard","copyCurrentContextIDToClipboard","copyContextStackToClipboard","VirtualAssistantSearchPanel","searchInputRef","debouncedSearch","useMemo","debounce","querySelectorAll","activeElement","spellCheck","onChange","placeholder","QUESTION_HOW_TO_USE_ADVANCED_SEARCH_SYNTAX","searchMode","format","VirtualAssistantPanel","triggerElement","extraViewConfigurations","getExtraVirtualAssistantViewConfigurations","currentExtensionView","hideBackdrop","PaperProps","disableEnforceFocus","transformOrigin","onKeyDown","CONTEXTUAL_SUPPORT","autoExpandOnOpen","renderer","VirtualAssistant","isDragging","setIsDragging","_key","_setKey","assistantRef","toggleAssistantPanel","bounds","onStart","onStop","nodeRef","handle","APPLICATION_COMPONENT_ELEMENT_ID","PLATFORM_NATIVE_KEYBOARD_SHORTCUTS","BackdropContainer","elementId","ApplicationComponentFrameworkProvider","keyBindingMap","keyCombinations","combinations","buildHotkeysConfiguration","onKeyEvent","possibleMatches","timer","KeyboardEvent","uniqBy","combination","parsedKeyCombination","remainingExpectedKeyPresses","currentExpectedKeyPress","clearTimeout","setTimeout","clear","bind","createKeybindingsHandler","removeEventListener","onVisibilityChange","hidden","timeService","recordUsageInterruption","showBackdrop","Portal","getElementByID","backdropContainerElementID","BACKDROP_CONTAINER","Backdrop","DndProvider","backend","TOP_LEVEL_CONTAINER","LEGEND_XTERM_THEME","foreground","background","cursor","selectionBackground","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite","LEGEND_XTERM_SEARCH_THEME","matchOverviewRuler","activeMatchColorOverviewRuler","matchBackground","activeMatchBackground","DEFAULT_COMMAND_HEADER","BOLD","BRIGHT_BLUE","RESET","MAGENTA","COMMAND_START","XTerm","instance","resizer","searcher","webLinkProvider","_TEMPORARY__onKeyListener","_TEMPORARY__onDataListener","commandHistory","currentCommandSearchString","commandHistoryNavigationIdx","isRunningCommand","setupState","allowProposedApi","fontSize","letterSpacing","fontWeight","fontWeightBold","fontFamily","tabStopWidth","overviewRulerWidth","scrollback","convertEol","scrollOnUserInput","configuration","onContextLoss","dispose","loadAddon","unicode","activeVersion","attachCustomKeyEventHandler","hasSelection","urlRegex","regex","commands","commandConfig","aliases","TERMINAL_COMMAND_CONFIGURATION_CHECK__FAILURE","onDidChangeResults","resultIndex","onKey","domEvent","replaceAll","addCommandToHistory","matchingCommand","arg","finally","isFlushed","abort","deleteFromCommand","altKey","ctrlKey","computeCursorJumpMovement","movement","computeCursorMovement","scrollLines","scroll","write","seq","writeToCommand","dispatchEvent","setCommandFromHistory","onData","startsWith","trimEnd","getCommandRange","buffer","active","cols","commandText","commandFirstLine","repeat","startY","cursorIdx","baseY","cursorY","getLine","translateToString","cursorX","startX","endY","endX","back","range","distance","foundWord","rows","maxDistance","Math","min","abs","newCursorX","newCursorY","abs_cursorY","ceil","max","floor","viewportY","right","setCommand","cursorMovement","isSetup","isFocused","textarea","mount","autoResize","fit","at","unshift","padEnd","newCommand","newSystemCommand","DIM","flushScreen","isLastLineEmpty","lineText","scrollToTop","resetANSIStyling","scrollToBottom","BRIGHT_BLACK","BRIGHT_GREEN","description","usage","systemCommand","RED","output","findNext","decorations","wholeWord","caseSensitive","incremental","clearSearch","clearDecorations","clearSelection","findPrevious","getContent","lines","copy","getSelection","alertUnhandledError","copyAll","TerminalService","terminal","UNKNOWN_USER_ID","IdentityService","currentUser","setCurrentUser","isAnonymous","LEGEND_APPLICATION_COLOR_THEME","LocalStorage","localStorage","setItem","getItem","removeItem","hasItem","StorageStore","storeIndex","storageService","getIndex","getValue","getNumericValue","getStringValue","getBooleanValue","getObjectValue","assertIsObject","guaranteeIsObject","hasValue","persistValue","updateIndex","StorageService","storage","applicationStorageKey","index","isEmpty","TelemetryService","userId","identityService","appEnv","appSessionId","appStartTime","eventType","TimeService","interruptions","finalizeTimingsRecord","stopWatch","timings","totalTime","elapsed","startTime","endTime","record","fromEntries","records","total","numberOfInteruptions","interruption","__numberOfInteruptions","DEFAULT_DARK_COLOR_THEME","DEFAULT_DARK","TEMPORARY__globalCSSClassName","colors","LEGACY_LIGHT_COLOR_THEME","LEGACY_LIGHT","HIGH_CONTRAST_LIGHT_COLOR_THEME","HIGH_CONTRAST_LIGHT","LEGEND_APPLICATION_SETTING_KEY","LEGEND_APPLICATION_SETTING_CONFIG","COLOR_THEME","defaultValue","LayoutService","colorThemeRegistry","currentColorTheme","setBackdropContainerElementID","setShowBackdrop","setColorTheme","getExtraColorThemes","colorTheme","COLOR_THEME_CONFIGURATION_CHECK__FAILURE","themeKey","settingService","TEMPORARY__syncGlobalCSSClassName","querySelector","previousTheme","newColorTheme","previousColorTheme","persist","getColor","ClipboardService","clipboard","writeText","notifySuccessMessage","NavigationService","SettingService","registry","getExtraSettingConfigurationEntries","SETTING_CONFIGURATION_CHECK__FAILURE","SETTING_RETRIVE_FAILURE","DefaultNavigator","goToLocation","reload","goToAddress","address","generateAddress","updateCurrentLocation","updateCurrentZone","zone","resetZone","getCurrentBaseAddress","getCurrentAddress","getCurrentLocation","getCurrentLocationParameters","getCurrentLocationParameterValue","getCurrentZone","blockNavigation","blockCheckers","onBlock","onNativePlatformNavigationBlock","unblockNavigation","isNavigationBlocked","INTERNAL__internalizeTransientParameter","UserDataService","USER_DATA_RETRIEVE_FAILURE","isSemVer","test","RELEASE_UPDATE_TYPE","APPLICATION_LAST_OPENED_VERSION","ReleaseNotesService","releaseNotes","showCurrentReleaseModal","showReleaseLog","isConfigured","setShowCurrentRelease","configure","setReleaseLog","release","notes","note","collectReleaseNotes","getViewedVersion","userDataService","updateViewedVersion","showVersion","versionNotes","lastOpenedVersion","val2","localeCompare","numeric","showableVersions","ApplicationStore","extensionStates","initState","platform","terminalService","releaseNotesService","eventService","tracerService","getLoggerPlugins","getEventNotifierPlugins","getTelemetryServicePlugins","getTracerServicePlugins","getExtraApplicationExtensionStateBuilders","creator","getNavigator","APPLICATION_LOAD__FAILURE","ILLEGAL_APPLICATION_STATE_OCCURRED","actionFn","DOWNLOAD_EVENTS","LegendApplicationLogger","LegendApplicationWebConsole","console","LegendApplication","basePresets","basePlugins","baseAddress","pluginRegister","_isConfigured","downloadHelperServiceWorkerPath","downloadHelper","withBasePresets","presets","withPresets","withBasePlugins","withPlugins","usePresets","usePlugins","withDownloadHelper","path","withReleaseNotes","setupApplicationStore","fetchApplicationConfiguration","client","configData","versionData","origin","APPLICATION_CONFIGURATION__FAILURE","configureApplication","extensions","loadDocumentationRegistryData","all","documentationRegistryEntries","getExtraDocumentationRegistryEntries","simple","docData","patterns","RegExp","pattern","DOCUMENTATION_FETCH__FAILURE","start","extensionConfigData","install","getExtraApplicationSetups","loadApplication","workerPath","serviceWorker","register","reg","registerDownloadHelperServiceWorker","LEGEND_APPLICATION_ROOT_ELEMENT_TAG","PluginInfo","signature","getName","getVersion","getSignature","getUUID","getInfo","AbstractPluginManager","configObj","preset","getHiddenPluginNames","sort","a","b","getHiddenPresetNames","LegendApplicationPlugin","Core_LegendApplicationPlugin","NAME","registerApplicationPlugin","enforceActions","LegendApplicationConfig","appVersionBuildTime","appVersionCommitId","input","storageKey","getDefaultApplicationStorageKey","documentation","contextualEntries","buildTime","commitSHA","resolveAbsoluteUrl","LegendREPLGridClientApplicationConfig","replUrl","useDynamicREPLServer","repl","dynamic","LegendApplicationPluginManager","telemetryServicePlugins","tracerServicePlugins","eventNotifierPlugins","applicationPlugins","registerLoggerPlugin","registerTelemetryServicePlugin","registerTracerServicePlugin","registerEventNotifierPlugin","LegendREPLGridClientPluginManager","pureProtocolProcessorPlugins","pureGraphManagerPlugins","pureGraphPlugins","registerPureProtocolProcessorPlugin","registerPureGraphManagerPlugin","registerPureGraphPlugin","getPureGraphManagerPlugins","getPureProtocolProcessorPlugins","getPureGraphPlugins","LEGEND_APPLICATION_PARAM_TOKEN","BrowserNavigator","historyAPI","_isNavigationBlocked","_forceBypassNavigationBlocking","_blockCheckers","_beforeUnloadListener","checker","returnValue","historyApiClient","ignoreBlocking","onProceed","createHref","pathname","hash","withAppRoot","isFullUrl","parseUrl","query","getQueryParameters","paramValue","decodeURIComponent","getQueryParameterValue","history","pushState","onpopstate","forward","currentZone","params","stringifyQueryParams","ApplicationPlatform","BrowserPlatform","initialColorTheme","INITIAL_COLOR_THEME","ApplicationPlatformContext","BrowserPlatformProvider","BrowserEnvironmentProvider","basename","REPLServerClient","networkClient","getREPLGridServerResult","getIntialQueryLambda","executeLambda","lambda","isPaginationEnabled","getTypeaheadResults","parseQuery","getInitialREPLGridServerResult","getLicenseKey","getREPLQuery","queryId","saveQuery","tdsQuery","TDS_FILTER_OPERATION","TDS_FILTER_GROUP","TDS_AGGREGATION_FUNCTION","TDS_SORT_ORDER","FILTER_TYPE","ROOT_PACKAGE_NAME","ATOMIC_TEST_TYPE","PRIMITIVE_TYPE","CORE_PURE_PATH","MILESTONING_STEREOTYPE","MILESTONING_VERSION_PROPERTY_SUFFIX","PackageableElementPointerType","SUPPORTED_FUNCTIONS","TDSFilterCondition","operation","TDSFilter","columnType","conditions","groupOperation","TDSSort","order","setOrder","TDSAggregation","function","_function","TDSGroupby","columns","groupKeys","aggregations","TDSColumn","TDSRequest","startRow","endRow","groupBy","getTDSSortModel","ASCENDING","DESCENDING","getTDSFilterOperation","filterOperation","EQUALS","NOT_EQUAL","GREATER_THAN","GREATER_THAN_OR_EQUAL","LESS_THAN","LESS_THAN_OR_EQUAL","BLANK","NOT_BLANK","CONTAINS","NOT_CONTAINS","STARTS_WITH","ENDS_WITH","getFilterModeltype","STRING","NUMBER","BOOLEAN","DATE","getTDSColumnCustomizations","columnName","tdsRequest","c","rowGroup","aggFunc","hide","getAggregationTDSColumnCustomizations","builder","col","allowedAggFuncs","DATETIME","STRICTDATE","DECIMAL","INTEGER","FLOAT","getTDSRowData","tds","_row","rowIdx","colIdx","String","rowNumber","DataCubeGridState","dataCubeState","initialResult","currentResult","initialQueryLambda","currentQueryTDSRequest","lastQueryTDSRequest","setInitialResult","setColumns","setInitialQueryLambda","setCurrentResult","setCurrentQueryTDSRequest","setLastQueryTDSRequest","rowData","columnDefs","filterModel","filterType","operator","AND","condition1","condition2","configState","gridApi","setFilterModel","field","headerName","SourceInformation","sourceId","startLine","startColumn","endLine","endColumn","DataCubeQueryEditorState","parserError","setQuery","setParserError","sourceInformation","processSourceInformation","DataCubeQueryTextEditorState","queryEditorState","currentSubQuery","setCurrentSubQuery","LEGEND_REPL_EVENT","LEGEND_APPLICATION_REPL_SETTING_KEY","QUERY_FUNCTION","PIVOT_PANEL_TABS","CORE_HASH_STRUCTURE","DataCubeConfigState","licenseKey","isPivotPanelOpened","setGridApi","setLicenseKey","setIsPaginationEnabled","setIsPivotPanelOpened","openPanel","closePanel","editorStore","PAGINATION","propertiesPanelState","hpivotAndSortPanelState","setIsInitialized","DataCubePanelState","HPivotAndSortPanelState","isInitialized","availableSortColumns","selectedSortColumns","availableSortColumnsSearchText","selectedSortColumnsSearchText","setAvailableSortColumns","setSelectedSortColumns","addAvailableSortColumn","addSelectedSortColumn","addAllAvailableSortColumns","addAllSelectedSortColumns","applyChanges","setSelectedSortColumnsSearchText","setAvailableSortColumnsSearchText","availableSortColumnsSearchResults","selectedSortColumnsSearchResults","gridState","getColumnDefs","colDef","cold","colId","setGridOption","onSortChanged","DataCubePropertiesPanelState","selectedPivotPanelTab","COLUMNS_AND_PIVOTS","setSelectedPivotPanelTab","HPIVOTS_AND_SORTS","V1_ValueSpecification","V1_Variable","multiplicity","class","accept_ValueSpecificationVisitor","visitor","visit_Variable","V1_GraphFetchTree","subTrees","subTypeTrees","V1_RootGraphFetchTree","accept_GraphFetchTreeVisitor","visit_RootGraphFetchTree","sha1","update","digest","hashCode","V1_Multiplicity","lowerBound","upperBound","MULTIPLICITY","V1_CoreClassInstance","ONE","V1_Lambda","visit_Lambda","V1_DataTypeValueSpecification","V1_Path","startType","V1_AbstractAppliedFunction","V1_AppliedFunction","fControl","visit_AppliedFunction","V1_Collection","ONE_MANY","visit_Collection","V1_PrimitiveValueSpecification","V1_CDecimal","visit_CDecimal","V1_CInteger","visit_CInteger","V1_CString","visit_CString","V1_CFloat","visit_CFloat","V1_CDate","V1_CDateTime","visit_CDateTime","V1_CStrictDate","visit_CStrictDate","V1_CStrictTime","visit_CStrictTime","V1_CBoolean","visit_CBoolean","V1_AggregateValue","mapFn","aggregateFn","V1_Pair","first","second","V1_RuntimeInstance","runtime","V1_ExecutionContextInstance","executionContext","V1_PropertyGraphFetchTree","property","alias","subType","visit_PropertyGraphFetchTree","V1_SubTypeGraphFetchTree","subTypeClass","visit_SubTypeGraphFetchTree","V1_SerializationConfig","includeType","typeKeyName","includeEnumType","removePropertiesWithNullValues","removePropertiesWithEmptySets","fullyQualifiedTypePath","includeObjectReference","V1_KeyExpression","expression","visit_KeyExpression","V1_PureList","V1_TDSAggregateValue","pmapFn","V1_TDSColumnInformation","columnFn","V1_TDSSortInformation","direction","V1_TDSOlapRank","V1_TDSOlapAggregation","V1_PackageableElement","package","PACKAGEABLE_ELEMENT","V1_sourceInformationSerialization","V1_INTERNAL__PackageableElementWithSourceInformation","PACKAGEABLE_ELEMENT_POINTER","V1_multiplicityModelSchema","V1_PathElement","V1_PropertyPathElement","V1_AppliedProperty","visit_AppliedProperty","V1_Runtime","mappings","connectionStores","connections","ENGINE_RUNTIME","SINGLE_ENGINE_RUNTIME","V1_RuntimePointer","RUNTIME_POINTER","V1_RuntimeType","V1_runtimePointerModelSchema","_type","runtimeValue","PACKAGEABLE_RUNTIME","accept_PackageableElementVisitor","visit_PackageableRuntime","V1_serializeRuntimeValue","protocol","V1_deserializeRuntimeValue","V1_ExecutionContext","queryTimeOutInSeconds","enableConstraints","V1_AnalyticsExecutionContext","useAnalytics","toFlowSetFunction","V1_BaseExecutionContext","V1_PackageableElementPtr","fullPath","visit_PackageableElementPtr","V1_GenericTypeInstance","visit_GenericTypeInstance","V1_ClassInstance","visit_ClassInstance","V1_ColSpecArray","colSpecs","V1_ColSpec","function1","function2","V1_RelationStoreAccessor","V1_ExecutionContextType","V1_PathElementType","V1_GraphFetchTreeType","V1_ClassInstanceType","V1_ValueSpecificationType","V1_variableModelSchema","VARIABLE","V1_lambdaModelSchema","LAMBDA","V1_serializeValueSpecification","V1_deserializeValueSpecification","keyExpressionModelSchema","KEY_EXPRESSION","appliedFunctionModelSchema","APPLIED_FUNCTION","appliedPropertyModelSchema","APPLIED_PROPERTY","packageableElementPtrSchema","PACKAGEABLE_ELEMENT_PTR","genericTypeInstanceSchema","GENERIC_TYPE_INSTANCE","deserializeHackedUnit","unitType","deserializeHackedClass","collectionModelSchema","COLLECTION","enumValueModelSchema","visit_EnumValue","ENUM_VALUE","CDecimalModelSchema","CDECIMAL","CIntegerModelSchema","CINTEGER","CStringModelSchema","CSTRING","CFloatModelSchema","CFLOAT","CDateTimeModelSchema","CDATETIME","CStrictTimeModelSchema","CSTRICTTIME","CStrictDateModelSchema","CSTRICTDATE","CLatestDateModelSchema","visit_CLatestDate","CLATESTDATE","CBooleanModelSchema","CBOOLEAN","CByteArrayModelSchema","visit_CByteArray","CBYTEARRAY","deserializePrimitiveValueSpecification","deserializer","collection","ZERO","classInstanceModelSchema","CLASS_INSTANCE","pathModelSchema","rootGraphFetchTreeModelSchema","executionContextInstanceModelSchema","aggregationValueModelSchema","pairModelSchema","pureListModelSchema","runtimeInstanceModelSchema","serializationConfigModelSchema","tdsAggregrateValueModelSchema","tdsColumnInformationModelSchema","tdsOlapAggregationModelSchema","tdsOlapRankModelSchema","tdsSortInformationModelSchema","colSpecModelSchema","colSpecArrayModelSchema","relationStoreAccessorModelSchema","serializers","V1_getExtraClassInstanceValueProtocolSerializers","serializer","V1_serializeClassInstanceValue","PATH","ROOT_GRAPH_FETCH_TREE","AGGREGATE_VALUE","EXECUTION_CONTEXT_INSTANCE","PAIR","PURE_LIST","RUNTIME_INSTANCE","SERIALIZATION_CONFIG","TDS_AGGREGATE_VALUE","TDS_COLUMN_INFORMATION","TDS_OLAP_AGGREGATION","TDS_OLAP_RANK","TDS_SORT_INFORMATION","COL_SPEC","COL_SPEC_ARRAY","RELATION_STORE_ACCESSOR","deserializers","V1_getExtraClassInstanceValueProtocolDeserializers","V1_deserializeClassInstanceValue","propertyPathElementModelSchema","PROPERTY_PATH_ELEMENT","V1_serializePathElement","V1_deserializePathElement","V1_serializeGraphFetchTree","V1_deserializeGraphFetchTree","propertyGraphFetchTreeModelSchema","PROPERTY_GRAPH_FETCH_TREE","subTypeGraphFetchTreeModelSchema","SUBTYPE_GRAPH_FETCH_TREE","analyticsExecutionContextModelSchema","ANALYTICS_EXECUTION_CONTEXT","baseExecutionContextModelSchema","BASE_EXECUTION_CONTEXT","V1_serializeExecutionContext","V1_deserializeExecutionContext","V1_serializeRuntime","includeEnumTypee","removePropertiesWithNullValuese","removePropertiesWithEmptySetse","fullyQualifiedTypePathe","includeObjectReferencee","V1_ValueSpecificationSerializer","visit_INTERNAL__UnknownValueSpecfication","valueSpecification","HACKED_CLASS","UNIT_TYPE","HACKED_UNIT","ENUM","CLASS","MAPPING_INSTANCE","BuilderType","ExecutionActivityType","EXECUTION_SERIALIZATION_FORMAT","ResultBuilder","ExecutionActivities","RelationalExecutionActivities","sql","comment","AggregationAwareActivities","rewrittenQuery","UnknownExecutionActivities","ExecutionResult","activities","JsonExecutionResult","RawExecutionResult","INTERNAL__TDSColumn","relationalType","doc","TDSBuilder","TDS_BUILDER","TDSRow","TabularDataSet","TDSExecutionResult","_UUID","ClassBuilder","CLASS_BUILDER","ClassExecutionResult","objects","V1_ResultBuilder","V1_ExecutionActivities","V1_RelationalExecutionActivities","V1_AggregationAwareActivities","V1_ExecutionResult","V1_UnknownExecutionActivity","V1_JsonExecutionResult","builderSerialization","V1_INTERNAL__TDSColumn","V1_TDSBuilder","V1_serializeExecutionActivities","RELATIONAL","RELATIONAL_EXECUTION_ACTIVITY","AGGREGATION_AWARE_ACTIVITY","V1_TDSExecutionResult","V1_ClassExecutionResult","V1_RawExecutionResult","V1_INTERNAL__UnknownExecutionResult","INTERNAL__UnknownExecutionResult","buildExecutionActivities","metamodel","INTERNAL__buildTDSColumn","V1_buildExecutionResult","buildClassExecutionResult","buildTDSBuilder","buildTDSExecutionResult","buildJSONExecutionResult","V1_serializeExecutionResult","JSON_BUILDER","V1_EngineErrorType","V1_EngineError","errorType","V1_ParserError","EngineError","ParserError","REPLGridServerResult","currentQuery","getPrimitiveValueSpecification","stringValue","booleanValue","cDecimal","cInteger","cFloat","cDateTime","cStrictDate","STRICTTIME","cStrictTime","updateParentFunction","expressions","functionName","child","newExpressions","childFunc","getAggregationColSpec","colSpec","aggLambda","defaultVariable","funcLambda","aggVariable","TDSQuery","initialQuery","currentQueryInfo","CompletionItem","completion","DataCubeState","queryTextEditorState","executeAction","getInitialQueryLambda","isSubQuery","funcBody","end","startValue","endValue","currentExpression","FROM","SLICE","sliceFunction","updateExpressionWithSlice","groupFilter","filters","filterLambda","filterValue","groupCondition","conditionExpressions","condition","filterCondition","NOT","filterConditionFunc","groupFunc","andFunc","FILTER","processFilterOperations","groupByOperation","groupByInstance","groupByColSpecArray","aggregationColSpecArray","aggregationInstance","currentGroupByColumn","columnSpec","COUNT","aggColumns","agg","GROUPBY","processGroupByOperations","sortOperations","sortCollection","sortValue","sortFunc","SORT","processSortOperations","buildLambdaExpressions","resultObj","replGridResult","tdsResult","FETCH_TDS_FAILURE","position","model","textUntilPosition","getValueInRange","startLineNumber","endLineNumber","lineNumber","res","currentWord","getWordUntilPosition","kind","CompletionItemKind","Text","insertText","tdsResultObj","BAD_REQUEST","LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN","SAVED_QUERY","LEGEND_REPL_GRID_CLIENT_PATTERN_TOKEN","QUERY_ID","queryObj","REPLGridClientStore","EditorStoreContext","REPLGridClientStoreProvider","useREPLGridClientStore","createFilter","CustomMenuList","selectProps","rowHeight","optionCustomization","parseInt","getComputedStyle","initialOffset","scrollToIndex","findIndex","listRef","scrollToItem","itemCount","itemSize","initialScrollOffset","noMatchMessage","CustomOption","Option","isSelected","STYLE_PREFIX","STYLE_PREFIX__DARK","LoadingIndicator","DropdownIndicator","ClearIndicator","innerProps","CustomInput","Input","CustomSelectorInput","allowCreating","hasError","SelectComponent","stylePrefix","styles","menuPortal","base","zIndex","menuPortalTarget","isDisabled","classNamePrefix","MenuList","PURE_GRAMMAR_TOKEN","buildCodeEditorTheme","vscodeThemeData","baseTheme","colorsOverride","rulesOverride","baseThemeData","rawData","rules","tokenColors","tokenColor","settings","scopes","scope","baseRule","fontStyle","rule","token","array","inherit","parseVSCodeTheme","BASE_PURE_LANGUAGE_COLOR_TOKENS","IDENTIFIER","COLOR","PACKAGE","PARSER","LANGUAGE_STRUCT","GENERICS","PROPERTY","PARAMETER","TYPE","CODE_EDITOR_THEME","DEFAULT_DARK_THEME","SOLARIZED_DARK_THEME","BUILT_IN__VSCODE_DARK","GITHUB_DARK_THEME","GITHUB_DARK_DIMMED_THEME","MATERIAL_DEFAULT_THEME","MATERIAL_DARKER_THEME","ONE_DARK_PRO_THEME","ONE_DARK_PRO_DARKER_THEME","disposeCodeEditor","editor","getModel","getCodeEditorValue","EndOfLinePreference","LF","INTERNAL__DUMMY_PROBLEM_MARKER_OWNER","setErrorMarkers","editorModel","errors","ownerId","setModelMarkers","MarkerSeverity","clearMarkers","removeAllMarkers","normalizeLineEnding","CODE_EDITOR_LANGUAGE","CodeEditor","inputValue","updateInput","lightTheme","isReadOnly","hideMinimap","hideGutter","hidePadding","hideActionBar","lineToScroll","extraEditorOptions","setEditor","isWordWrap","setIsWordWrap","onDidChangeModelContentEventDisposer","textInputRef","_editor","contextmenu","copyWithSyntaxHighlighting","fontLigatures","fixedOverflowWidgets","detectIndentation","tabSize","automaticLayout","BUILT_IN__VSCODE_LIGHT","glyphMargin","padding","bottom","formatOnType","formatOnPaste","currentValue","updateOptions","lineNumbersMinChars","log10","resetLineNumberGutterWidth","setModelLanguage","revealLineInCenter","onDidChangeModelContent","currentVal","setValue","readOnly","minimap","enabled","folding","lineNumbers","lineDecorationsWidth","updatedWordWrap","wordWrap","QueryEditor","autoCompleteSuggestionProviderDisposer","debouncedParseQuery","cancel","registerCompletionItemProvider","PURE","triggerCharacters","provideCompletionItems","suggestions","DataCubeQueryTextEditor","isLightTheme","BUILT_IN__VSCODE_HC_LIGHT","BUILT_IN__VSCODE_HC_BLACK","communityModules","enterpriseModules","M","allModules","AgGridComponent","rowGroupPanelShow","suppressBrowserResizeObserver","suppressScrollOnNewData","alwaysMultiSort","rowModelType","defaultColDef","minWidth","sortable","flex","resizable","enableRowGroup","enableValue","menuTabs","modules","ServerSideDataSource","executions","fetchRows","extractRequest","success","getRows","columnApi","getColumns","getColId","sortModel","sortOrder","getTDSSortOrder","valueCols","v","colType","SUM","MIN","MAX","getAggregationFunction","rowGroupCols","r","getFilterColumnType","OR","BUILD_TDS_EQUEST_FAILURE","DataCubeGridEditor","onGridReady","api","gridOptions","serverSideDatasource","suppressServerSideInfiniteScroll","HPivotAndSortEditor","hPivotAndSortColumnState","sortOptions","onDoubleClick","option","isClearable","PivotPanelEditor","closeEditor","tabOptions","GENERAL_PROPERTIES","COLUMN_PROPERTIES","DEVELOPER_OPTIONS","PIVOT_LAYOUT","tab","GenericEditor","pivotPanelButtonRef","Editor","REPLQueryEditor","ApplicationFrameworkProvider","LegendREPLGridClientBaseStore","LegendREPLGridClientBaseStoreContext","LegendREPLGridClientBaseStoreProvider","LegendREPLGridClientFrameworkProvider","freeze","GRID","LegendREPLGridClientRouter","WrappedComponent","exact","LegendREPLGridClientWebApplication","LegendREPLGridClientApplicationPlugin","_$nominalTypeBrand","PURE_ELEMENT_NAME","PURE_CONNECTION_NAME","PURE_PARSER","wordPattern","comments","lineComment","blockComment","brackets","autoClosingPairs","surroundingPairs","markers","Core_LegendREPLGridClientApplicationPlugin","extraKeywords","registerModules","fontLoadFailureErrorMessage","fonts","load","check","remeasureFonts","APPLICATION_SETUP__FAILURE","OVERRIDE_DEFAULT_KEYBINDING_COMMAND","accessor","hotkeyMapping","KeyCode","F1","F8","F9","KeyMod","WinCtrl","KeyG","KeyB","KeyO","KeyD","KeyP","Shift","F10","F2","F12","addKeybindingRules","nativeCodeEditorKeyBinding","keybinding","commandArgs","defineTheme","SOLARIZED_DARK","GITHUB_DARK","GITHUB_DARK_DIMMED","MATERIAL_DEFAULT","MATERIAL_DARKER","ONE_DARK_PRO","ONE_DARK_PRO_DARKER","configureCodeEditorComponent","setLanguageConfiguration","setMonarchTokensProvider","defaultToken","tokenPostfix","keywords","ASSOCIATION","ENUMERATION","MEASURE","PROFILE","FUNCTION","MAPPING","RUNTIME","CONNECTION","FILE_GENERATION","GENERATION_SPECIFICATION","DATA_ELEMENT","JSON_MODEL_CONNECTION","MODEL_CHAIN_CONNECTION","XML_MODEL_CONNECTION","SERVICE","FLAT_DATA","DATABASE","FLAT_DATA_CONNECTION","RELATIONAL_DATABASE_CONNECTION","operators","languageStructs","identifier","symbols","escapes","digits","octaldigits","binarydigits","hexdigits","generics","date","time","tokenizer","include","cases","KEYWORD","OPERATOR","DELIMITER","pure","WHITESPACE","color","number","whitespace","COMMENT","string","characters","LegendREPLGridClient","rootEl","getElementsByTagName","setAttribute","getApplicationRootElement","render","getPresetCollection","getPluginCollection","run","relativeBaseUrl","CreatableSelect","Select","module","exports","SelectComponents","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","loaded","__webpack_modules__","call","m","amdO","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","splice","n","getter","__esModule","d","getPrototypeOf","t","ns","def","getOwnPropertyNames","definition","o","defineProperty","enumerable","g","globalThis","Function","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","p","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}