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AAUlE,EAAMiR,EAAU9Q,GACjEsZ,EAAU8M,gBAAgBC,EAAevV,EAAU/M,EAAU/D,GAKnE,MAJqC,SAAjC,eAAanH,UAAUF,QAAiD,IAA7BqH,EAAQsmB,kBACrDhN,EAAQgN,mBAGHhN,CACT,CCnKO,SAASkN,WACdziB,EACAjE,EACAte,GAAsC,GAEtC,MAAM07B,EAA2B,IAArBuJ,UAAUvhC,OAAe,GAAK6e,EACpC+M,EAAWhR,GAA4B,iBAAXA,EAAsB5V,OAAOU,KAAKkV,GAAUA,EACxEE,EAA2B,kBAAVxe,EAAsB,CAAEsgB,cAAetgB,GAAU,OAAD,UAAMA,GAG7E,OAFiB+kC,kBAA0BrJ,EAAKpM,EAAU9Q,EAEnDsZ,CAAQxZ,EAAQE,EAAQ8B,cACjC,C","sources":["webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.config.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.define-property.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.helpers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.parameters-resolve.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.tokens.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.directive-io-build.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.directive-io-parse.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.extract-forward-ref.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-global.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-name.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-type.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-ng-type.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-ng-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-ng-injection-token.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-ng-module-def-with-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/ng-mocks-universe.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.stub-member.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.stub.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-instance/mock-instance-apply.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.create-clone.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.define-property-descriptor.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.extract-methods-from-prototype.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.extract-properties-from-prototype.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.extract-property-descriptor.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.mock-function.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.replace-with-mocks.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.mock-service.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.create-mock-from-prototype.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.resolve-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/helper.use-factory.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/mock-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/check.is-func.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/mock-service.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/check.is-class.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-service/check.is-inst.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/resolve/collect-declarations.ts","webpack://ng-mocks-ng-19/external module \"@angular/core\"","webpack://ng-mocks-ng-19/external module \"@angular/core/testing\"","webpack://ng-mocks-ng-19/webpack/bootstrap","webpack://ng-mocks-ng-19/webpack/runtime/define property getters","webpack://ng-mocks-ng-19/webpack/runtime/global","webpack://ng-mocks-ng-19/webpack/runtime/hasOwnProperty shorthand","webpack://ng-mocks-ng-19/webpack/runtime/make namespace object","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/ng-mocks-stack.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/func.extract-tokens.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-ng-type.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-standalone.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.def-stack.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/mock-builder-stash.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.provided-in.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/add-requested-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/apply-platform-modules.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/error.empty-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-jest-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/error.jest-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/error.missing-decorators.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.body-catch.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.directive-resolve.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.module-resolve.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.meta.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-source-of-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/mark-exported.ts","webpack://ng-mocks-ng-19/external module \"@angular/forms\"","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.form.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/mock-control-value-accessor-proxy.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/mock-control-value-accessor.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/decorate.inputs.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/decorate.mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/decorate.outputs.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/decorate.queries.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/to-existing-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/to-factory-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/clone-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/decorate-declaration.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.import-exists.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mock-ng-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-last-fixture.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/return-cached-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock/get-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-component/render/generate-template.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-component/render/get-key.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-component/mock-component.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-directive/mock-directive.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.reflect.pipe-resolve.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-pipe/mock-pipe.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-module/mock-module.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-module/create-resolvers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-module/mark-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-module/mock-ng-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/get-override-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/skip-override.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-overrides-token.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-token.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/create-ng-mocks-touches-token.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/handle-entry-components.ts","webpack://ng-mocks-ng-19/external module \"@angular/common\"","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/skip-dep.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/add-def-to-root-provider-parameters.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/check-root-provider-dependency.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/extract-dep.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/get-root-providers-data.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/handle-provided-in-dependency.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/skip-root-provider-dependency.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/get-root-provider-parameters.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/handle-root-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-module.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-ng-modules.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.extract-deps.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-exclude-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-keep-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/try-mock-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-mock-declarations.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/try-mock-declaration.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-modules.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-replace-def.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/init-universe.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/parse-mock-arguments.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/promise/parse-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/mock-builder.promise.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/equal-variables.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/equal-render-defs.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/equal-render-configs.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-config-params.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-maps.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-providers.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/are-equal-sets.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/get-empty-config.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/performance/required-metadata.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/mock-builder.performance.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-builder/mock-builder.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/is-debug-node.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.parse-find-args-name.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/is-fixture.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find/func.parse-find-args.ts","webpack://ng-mocks-ng-19/external module \"@angular/platform-browser\"","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find/func.parse-find-term.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find/mock-helper.find.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-text-node.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-compare.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-get-node.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/core.injector.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/el-def-get-parent.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check-children.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check-parent.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/nested-check.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.crawl.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.parse-find-args.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-attribute-in-selectors.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.parse-provider-tokens-directives.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/func.get-public-provider-keys.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/func.parse-inputs-and-requires-attributes.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-selectors-from-node.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-attribute.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-attribute-value.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-declaration.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-id.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-tag-name-in-selectors.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/crawl-by-tag-name.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/detect-crawler.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/func.is-valid-reveal-selector.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.reveal.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/crawl/mock-helper.reveal-all.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mock-control-value-accessor.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/is-html-element.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.event.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.trigger.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/cva/func.get-vca.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/cva/mock-helper.change.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/cva/mock-helper.touch.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/events/mock-helper.click.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find/mock-helper.find-all.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-injector.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-element.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-scan.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-ivy.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node-standard.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.get-from-node.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find-instance/func.is-valid-find-instance-selector.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find-instance/mock-helper.find-instance.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/find-instance/mock-helper.find-instances.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/handle-array.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/format-handler.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/handle-text.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/is-text.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/mock-helper.format-html.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/format/mock-helper.format-text.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.auto-spy.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console-ignore.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.console-throw.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.default-config.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.default-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.faster-install.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.flush-test-bed.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.faster.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.get.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.iterate-declaration.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/func.global-prepare.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-exclude.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-keep.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-mock.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-replace.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.global-wipe.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.guts.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.attributes.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.input.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.output.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.reset.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/render/func.find-deep.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/render/func.parse-template.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/render/mock-helper.hide.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/render/mock-helper.render.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/template-ref/detect-crawler.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/template-ref/detect-template-ref.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/template-ref/func.is-valid-template-ref-selector.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/template-ref/mock-helper.find-template-ref.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/template-ref/mock-helper.find-template-refs.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.object.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-helper/mock-helper.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-provider/mock-provider.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/ng-mocks-global-overrides.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mocked-ng-def-of.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.get-mocked-ng-def-of.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mock-of.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/common/func.is-mock-validator.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-instance/mock-instance-forgot-reset.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-instance/mock-instance.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-declaration/mock-declaration.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/func.generate-template.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/func.create-wrapper.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/func.install-prop-reader.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/func.reflect-template.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/mock-render-factory.ts","webpack://ng-mocks-ng-19/./libs/ng-mocks/src/lib/mock-render/mock-render.ts"],"sourcesContent":["export default {\n  flags: ['cacheModule', 'cacheComponent', 'cacheDirective', 'cacheProvider', 'correctModuleExports'],\n  mockRenderCacheSize: 25,\n  neverMockModule: [\n    'ApplicationModule',\n    'CommonModule',\n    'BrowserModule',\n\n    // Angular 16 adds underscores\n    '_ApplicationModule',\n    '_CommonModule',\n    '_BrowserModule',\n  ],\n  neverMockProvidedFunction: [\n    'DomRendererFactory2',\n    'EventManager',\n    'Injector', // ivy only\n    'RendererFactory2',\n\n    // https://github.com/help-me-mom/ng-mocks/issues/538\n    'Sanitizer',\n    'DomSanitizer',\n    'DomSanitizerImpl',\n\n    // ApplicationModule, A14 made them global at root level\n    'ApplicationInitStatus',\n    'ApplicationRef',\n    'Compiler',\n    'IterableDiffers',\n    'KeyValueDiffers',\n\n    // Angular 16 adds underscores\n    '_DomRendererFactory2',\n    '_EventManager',\n    '_Injector',\n    '_Sanitizer',\n    '_DomSanitizer',\n    '_DomSanitizerImpl',\n    '_ApplicationInitStatus',\n    '_ApplicationRef',\n    '_Compiler',\n    '_IterableDiffers',\n    '_KeyValueDiffers',\n  ],\n  neverMockToken: [\n    'InjectionToken Set Injector scope.', // INJECTOR_SCOPE // ivy only\n    'InjectionToken EventManagerPlugins', // EVENT_MANAGER_PLUGINS\n    'InjectionToken HammerGestureConfig', // HAMMER_GESTURE_CONFIG\n\n    // ApplicationModule, A14 made them global at root level\n    'InjectionToken AppId', // APP_ID\n    'InjectionToken DefaultCurrencyCode', // DEFAULT_CURRENCY_CODE\n    'InjectionToken LocaleId', // LOCALE_ID\n    'InjectionToken SCHEDULER_TOKEN', // SCHEDULER\n  ],\n  onMockBuilderMissingDependency: 'throw',\n  onMockInstanceRestoreNeed: 'warn',\n  onTestBedFlushNeed: 'warn',\n\n  dependencies: [\n    'declarations',\n    'hostDirectives',\n    'entryComponents',\n    'bootstrap',\n    'providers',\n    'viewProviders',\n    'imports',\n    'exports',\n  ] as const,\n};\n","import helperMockService from '../mock-service/helper.mock-service';\n\nexport default (instance: any, property: keyof any, value: any, enumerable = false) => {\n  helperMockService.definePropertyDescriptor(instance, property, {\n    configurable: true,\n    enumerable,\n    value,\n    writable: true,\n  });\n};\n","import { getTestBed } from '@angular/core/testing';\n\nimport coreDefineProperty from './core.define-property';\nimport coreReflectParametersResolve from './core.reflect.parameters-resolve';\nimport { AnyDeclaration, AnyType, Type } from './core.types';\nimport funcGetGlobal from './func.get-global';\nimport funcGetName from './func.get-name';\nimport ngMocksUniverse from './ng-mocks-universe';\n\n/**\n * It will be removed from public interface with the next release: A14\n * Use ngMocks.get(token) instead.\n *\n * @deprecated\n * @internal\n */\nexport const getTestBedInjection = <I>(token: AnyDeclaration<I>): I | undefined => {\n  try {\n    // istanbul ignore next\n    return getInjection(token);\n  } catch {\n    return undefined;\n  }\n};\n\n/**\n * It will be removed from public interface with the next release: A14\n *\n * @deprecated\n * @internal\n */\nexport const getInjection = <I>(token: AnyDeclaration<I>): I => {\n  const testBed: any = getTestBed();\n\n  // istanbul ignore next\n  return testBed.inject ? testBed.inject(token) : testBed.get(token);\n};\n\nexport const flatten = <T>(values: T | T[] | { ɵproviders: T[] }, result: T[] = []): T[] => {\n  if (Array.isArray(values)) {\n    for (const value of values) {\n      flatten(value, result);\n    }\n  } else if (values !== null && typeof values === 'object' && Array.isArray((values as any).ɵproviders)) {\n    for (const value of (values as any).ɵproviders) {\n      flatten(value, result);\n    }\n  } else {\n    // any is needed to cover ɵproviders\n    result.push(values as any);\n  }\n\n  return result;\n};\n\nexport const mapKeys = <T>(set: Map<T, any>): T[] => {\n  const result: T[] = [];\n  // eslint-disable-next-line unicorn/no-array-for-each\n  set.forEach((_, value: T) => result.push(value));\n\n  return result;\n};\n\nexport const mapValues = <T>(set: { forEach(a1: (value: T) => void): void }, destination?: Set<T>): T[] => {\n  const result: T[] = [];\n  if (destination) {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T) => {\n      destination.add(value);\n    });\n  } else {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T) => {\n      result.push(value);\n    });\n  }\n\n  return result;\n};\n\nexport const mapEntries = <K, T>(set: Map<K, T>, destination?: Map<K, T>): Array<[K, T]> => {\n  const result: Array<[K, T]> = [];\n\n  if (destination) {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T, key: K) => destination.set(key, value));\n  } else {\n    // eslint-disable-next-line unicorn/no-array-for-each\n    set.forEach((value: T, key: K) => result.push([key, value]));\n  }\n\n  return result;\n};\n\nconst extractDependencyArray = (deps: any[], set: Set<any>): void => {\n  for (const flag of deps) {\n    const name = flag && typeof flag === 'object' ? flag.ngMetadataName : undefined;\n    if (name === 'Optional' || name === 'SkipSelf' || name === 'Self') {\n      continue;\n    }\n    set.add(flag);\n  }\n};\n\n// Accepts an array of dependencies from providers, skips injections flags,\n// and adds the providers to the set.\nexport const extractDependency = (deps: any[], set?: Set<any>): void => {\n  if (!set) {\n    return;\n  }\n  for (const dep of deps) {\n    if (!Array.isArray(dep)) {\n      set.add(dep);\n      continue;\n    }\n    extractDependencyArray(dep, set);\n  }\n};\n\nexport const extendClassicClass = <I>(base: AnyType<I>): Type<I> => {\n  let child: any;\n  const index = ngMocksUniverse.index();\n\n  const glb = funcGetGlobal();\n  glb.ngMocksParent = base;\n\n  // First we try to eval es2015 style and if it fails to use es5 transpilation in the catch block.\n  // The next step is to respect constructor parameters as the parent class via jitReflector.\n  // istanbul ignore next\n  try {\n    eval(`\n      var glb = typeof window === 'undefined' ? global : window;\n      class MockMiddleware${index} extends glb.ngMocksParent {};\n      glb.ngMocksResult = MockMiddleware${index};\n    `);\n    child = glb.ngMocksResult;\n  } catch {\n    class MockMiddleware extends glb.ngMocksParent {}\n    child = MockMiddleware;\n  } finally {\n    glb.ngMocksResult = undefined;\n    glb.ngMocksParent = undefined;\n  }\n\n  // A16: adding unique property.\n  coreDefineProperty(child.prototype, `__ngMocks_index_${index}`, undefined, false);\n\n  return child;\n};\n\nexport const extendClass = <I>(base: AnyType<I>): Type<I> => {\n  const child: Type<I> = extendClassicClass(base);\n  coreDefineProperty(child, 'name', `MockMiddleware${funcGetName(base)}`, true);\n\n  const parameters = coreReflectParametersResolve(base);\n  if (parameters.length > 0) {\n    coreDefineProperty(child, 'parameters', [...parameters]);\n  }\n\n  return child;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nexport default (def: any): any[] => {\n  const declaration = collectDeclarations(def);\n\n  return declaration.parameters ?? [];\n};\n","import { InjectionToken } from '@angular/core';\nimport { MetadataOverride } from '@angular/core/testing';\n\nimport { AnyType } from './core.types';\n\n/**\n * NG_MOCKS token is a map from a declaration to its mock copy.\n *\n * @internal\n *\n * ```ts\n * const MockClass = TestBed.inject(NG_MOCKS).get(RealClass);\n * ```\n */\nexport const NG_MOCKS = new InjectionToken<Map<any, any>>('NG_MOCKS');\n(NG_MOCKS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_TOUCHES token is a set of all touched declarations during mock process.\n *\n * @internal\n *\n * ```ts\n * const touched = TestBed.inject(NG_MOCKS_TOUCHES).has(RealClass);\n * ```\n */\nexport const NG_MOCKS_TOUCHES = new InjectionToken<Set<any>>('NG_MOCKS_TOUCHES');\n(NG_MOCKS_TOUCHES as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_OVERRIDES token contains overrides for:\n * - TestBed.overrideModule\n * - TestBed.overrideComponent\n * - TestBed.overrideDirective\n * - TestBed.overrideProvider\n *\n * It is used when there is no way to provide a mock copy and an override is required.\n * For example, if we want to keep a component, but to override one of its local providers.\n *\n * @internal\n */\nexport const NG_MOCKS_OVERRIDES = new InjectionToken<Map<AnyType<any>, MetadataOverride<any>>>('NG_MOCKS_OVERRIDES');\n(NG_MOCKS_OVERRIDES as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_GUARDS token influences on provided guards in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_guards-token\n * @see https://ng-mocks.sudo.eu/guides/routing-guard\n */\nexport const NG_MOCKS_GUARDS = new InjectionToken<void>('NG_MOCKS_GUARDS');\n(NG_MOCKS_GUARDS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_RESOLVERS token influences on provided resolvers in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_resolvers-token\n * @see https://ng-mocks.sudo.eu/guides/routing-resolver\n */\nexport const NG_MOCKS_RESOLVERS = new InjectionToken<void>('NG_MOCKS_RESOLVERS');\n(NG_MOCKS_RESOLVERS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_INTERCEPTORS token influences on provided interceptors in MockBuilder.\n * More info by the links below.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_interceptors-token\n * @see https://ng-mocks.sudo.eu/guides/http-interceptor\n */\nexport const NG_MOCKS_INTERCEPTORS = new InjectionToken<void>('NG_MOCKS_INTERCEPTORS');\n(NG_MOCKS_INTERCEPTORS as any).__ngMocksSkip = true;\n\n/**\n * NG_MOCKS_ROOT_PROVIDERS token influences on root providers in MockBuilder,\n * which aren't provided in specified modules.\n * It helps to mock or keep them automatically.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder#ng_mocks_root_providers-token\n */\nexport const NG_MOCKS_ROOT_PROVIDERS = new InjectionToken<void>('NG_MOCKS_ROOT_PROVIDERS');\n(NG_MOCKS_ROOT_PROVIDERS as any).__ngMocksSkip = true;\n","import { DirectiveIo, DirectiveIoParsed } from './core.types';\n\nexport default function ({ name, alias, required }: DirectiveIoParsed, skipName = false): DirectiveIo {\n  if (required) {\n    return { name, alias, required };\n  }\n  if (!alias || name === alias) {\n    return skipName ? '' : name;\n  }\n\n  return skipName ? alias : `${name}:${alias}`;\n}\n","import { DirectiveIo, DirectiveIoParsed } from './core.types';\n\nexport default function (param: DirectiveIo): DirectiveIoParsed {\n  if (typeof param === 'string') {\n    const [name, alias] = param.split(':').map(v => v.trim());\n\n    if (name === alias || !alias) {\n      return { name };\n    }\n\n    return { name, alias };\n  }\n\n  return param;\n}\n","// handles forwardRef on useExisting\nexport default (provide: any): any => {\n  if (typeof provide === 'function' && provide.__forward_ref__) {\n    return provide();\n  }\n\n  return provide;\n};\n","export default (): Record<keyof any, any> => {\n  // istanbul ignore if\n  if (typeof window === 'undefined') {\n    return global;\n  }\n\n  return window;\n};\n","const badCharacters = new RegExp('[^0-9a-z]+', 'mgi');\n\nexport default (value: any): string => {\n  let result: string | undefined;\n\n  if (typeof value === 'function' && value.name) {\n    result = value.name;\n  } else if (typeof value === 'function') {\n    result = 'arrowFunction';\n  } else if (typeof value === 'object' && value && value.ngMetadataName === 'InjectionToken') {\n    result = value._desc;\n  } else if (typeof value === 'object' && value && typeof value.constructor === 'function') {\n    result = value.constructor.name;\n  }\n\n  result ||= 'unknown';\n\n  return result.replace(badCharacters, '_');\n};\n","import { isNgModuleDefWithProviders } from './func.is-ng-module-def-with-providers';\n\nexport default (provider: any): any => {\n  return provider && typeof provider === 'object' && provider.provide\n    ? provider.provide\n    : isNgModuleDefWithProviders(provider)\n      ? provider.ngModule\n      : provider && typeof provider === 'object' && provider.directive\n        ? provider.directive\n        : provider;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport { AnyType } from './core.types';\n\n/**\n * Checks whether a class has been decorated with a specific Angular decorator.\n * Due to the extension / multi decoration, we rely on the last used decorator.\n *\n * @internal\n *\n * ```ts\n * isNgType(MockModule, 'NgModule'); // returns true\n * isNgType(RealComponent, 'Component'); // returns true\n * isNgType(ArbitraryClass, 'Directive'); // returns false\n * isNgType(ArbitraryClass, 'Injectable'); // returns false\n * ```\n */\nexport const isNgType = (declaration: AnyType<any>, type: string): boolean => {\n  const { decorators } = collectDeclarations(declaration);\n  if (decorators.length === 0) {\n    return false;\n  }\n\n  let offset = 1;\n\n  // Injectable works well if the declaration is in providers.\n  if (type === 'Injectable' && decorators.indexOf('Injectable') !== -1) {\n    return true;\n  }\n\n  // Skipping Injectable.\n  while (decorators[decorators.length - offset] === 'Injectable') {\n    offset += 1;\n  }\n\n  return decorators[decorators.length - offset] === type;\n};\n","import { InjectionToken, PipeTransform } from '@angular/core';\n\nimport { Type } from './core.types';\nimport { isNgInjectionToken } from './func.is-ng-injection-token';\nimport { isNgType } from './func.is-ng-type';\n\nconst isModuleCheck = (def: any, ngType?: string): boolean => (!ngType || ngType === 'm') && isNgType(def, 'NgModule');\nconst isComponentCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'c') && isNgType(def, 'Component');\nconst isDirectiveCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'd') && isNgType(def, 'Directive');\nconst isPipeCheck = (def: any, ngType?: string): boolean => (!ngType || ngType === 'p') && isNgType(def, 'Pipe');\nconst isInjectableCheck = (def: any, ngType?: string): boolean =>\n  (!ngType || ngType === 'i') && isNgType(def, 'Injectable');\n\n/**\n * Checks whether a class has been decorated by @NgModule.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealModule, 'm'); // returns true\n * isNgDef(MockModule, 'm'); // returns true\n * isNgDef(ArbitraryModule, 'm'); // returns true\n * isNgDef(ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'm'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealComponent, 'c'); // returns true\n * isNgDef(MockComponent, 'c'); // returns true\n * isNgDef(ArbitraryComponent, 'c'); // returns true\n * isNgDef(ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'c'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealDirective, 'd'); // returns true\n * isNgDef(MockDirective, 'd'); // returns true\n * isNgDef(ArbitraryDirective, 'd'); // returns true\n * isNgDef(ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'd'): declaration is Type<any>;\n\n/**\n * Checks whether a class has been decorated by @Pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealPipe, 'p'); // returns true\n * isNgDef(MockPipe, 'p'); // returns true\n * isNgDef(ArbitraryPipe, 'p'); // returns true\n * isNgDef(ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'p'): declaration is Type<PipeTransform>;\n\n/**\n * Checks whether a class has been decorated by @Injectable.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealService, 'i'); // returns true\n * isNgDef(MockService, 'i'); // returns true\n * isNgDef(ArbitraryService, 'i'); // returns true\n * isNgDef(ArbitraryClass, 'i'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 'i'): declaration is Type<any>;\n\n/**\n * Checks whether a variable is a token.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(realToken, 't'); // returns true\n * isNgDef(mockToken, 't'); // returns true\n * isNgDef(arbitraryToken, 't'); // returns true\n * isNgDef(arbitraryObject, 't'); // returns false\n * ```\n */\nexport function isNgDef(declaration: any, ngType: 't'): declaration is InjectionToken<any>;\n\n/**\n * Checks whether a class or variable has been decorated by a ng type.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgDef\n *\n * ```ts\n * isNgDef(RealModule); // returns true\n * isNgDef(MockComponent); // returns true\n * isNgDef(ArbitraryDirective); // returns true\n * isNgDef(token); // returns true\n * isNgDef(ArbitraryClass); // returns false\n * ```\n */\nexport function isNgDef(declaration: any): declaration is Type<any>;\n\nexport function isNgDef(declaration: any, ngType?: string): declaration is Type<any> {\n  if (ngType === 't') {\n    return isNgInjectionToken(declaration);\n  }\n  if (typeof declaration !== 'function') {\n    return false;\n  }\n\n  const isModule = isModuleCheck(declaration, ngType);\n  const isComponent = isComponentCheck(declaration, ngType);\n  const isDirective = isDirectiveCheck(declaration, ngType);\n  const isPipe = isPipeCheck(declaration, ngType);\n  const isInjectable = isInjectableCheck(declaration, ngType);\n\n  return isModule || isComponent || isDirective || isPipe || isInjectable;\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * Checks whether a variable is an Angular token.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isNgInjectionToken\n *\n * ```ts\n * isNgInjectionToken(APP_ID); // returns true\n * isNgInjectionToken(arbitraryVariable); // returns false\n * ```\n */\nexport const isNgInjectionToken = (token: any): token is InjectionToken<any> =>\n  token && typeof token === 'object' && token.ngMetadataName === 'InjectionToken';\n","import { NgModule } from '@angular/core';\n\nimport { Type } from './core.types';\n\n/**\n * NgModuleWithProviders helps to support ModuleWithProviders in all angular versions.\n * In A5 it was without the generic type.\n *\n * @internal remove after removal of A5 support\n */\nexport interface NgModuleWithProviders<T = any> {\n  ngModule: Type<T>;\n  providers?: NgModule['providers'];\n}\n\n/**\n * isNgModuleDefWithProviders checks if an object implements ModuleWithProviders.\n *\n * @internal\n */\nexport const isNgModuleDefWithProviders = (declaration: any): declaration is NgModuleWithProviders =>\n  declaration && typeof declaration === 'object' && typeof declaration.ngModule === 'function';\n","import { IMockBuilderConfig } from '../mock-builder/types';\n\nimport coreConfig from './core.config';\nimport { AnyDeclaration } from './core.types';\nimport funcGetGlobal from './func.get-global';\nimport funcGetName from './func.get-name';\n\nconst globalMap = (key: string) => () => {\n  if (!ngMocksUniverse.global.has(key)) {\n    ngMocksUniverse.global.set(key, new Map());\n  }\n\n  return ngMocksUniverse.global.get(key);\n};\n\ninterface NgMocksUniverse {\n  /**\n   * the value can be:\n   * - null - exclude\n   * - undefined - delayed initialization\n   * - value - the definition which should be used in tests: real value, replacement, mock.\n   */\n  builtDeclarations: Map<any, any>;\n  builtProviders: Map<any, any>;\n  cacheDeclarations: Map<any, any>;\n  cacheProviders: Map<any, any>;\n  config: Map<any, any>;\n  configInstance: Map<any, any>;\n  flags: Set<string>;\n  getBuildDeclaration: (def: any) => any | undefined;\n  getConfigMock: () => Map<any, IMockBuilderConfig>;\n  getDefaults: () => Map<any, ['mock' | 'keep' | 'replace' | 'exclude', any?]>;\n  getLocalMocks: () => Array<[any, any]>;\n  getOverrides: () => Map<any, any>;\n  getResolution: (def: any) => undefined | 'mock' | 'keep' | 'replace' | 'exclude';\n  global: Map<any, any>;\n  hasBuildDeclaration: (def: any) => boolean;\n  isExcludedDef: (def: any) => boolean;\n  isProvidedDef: (def: any) => boolean;\n  touches: Set<AnyDeclaration<any> | string>;\n  indexValue: number;\n  index: () => number;\n}\n\nfuncGetGlobal().ngMocksUniverse = funcGetGlobal().ngMocksUniverse || {};\nconst ngMocksUniverse: NgMocksUniverse = funcGetGlobal().ngMocksUniverse;\n\nngMocksUniverse.builtDeclarations = new Map();\nngMocksUniverse.builtProviders = new Map();\nngMocksUniverse.cacheDeclarations = new Map();\nngMocksUniverse.cacheProviders = new Map();\nngMocksUniverse.config = new Map();\nngMocksUniverse.configInstance = new Map();\nngMocksUniverse.flags = new Set(coreConfig.flags);\nngMocksUniverse.global = new Map();\nngMocksUniverse.touches = new Set();\n\nngMocksUniverse.global.set('flags', {\n  // @deprecated and will be changed in A13 to 'throw'\n  onMockBuilderMissingDependency: coreConfig.onMockBuilderMissingDependency,\n  // @deprecated and will be changed in A13 to 'throw'\n  onMockInstanceRestoreNeed: coreConfig.onMockInstanceRestoreNeed,\n  // @deprecated and will be changed in A13 to 'throw'\n  onTestBedFlushNeed: coreConfig.onTestBedFlushNeed,\n});\n\nngMocksUniverse.getOverrides = globalMap('overrides');\nngMocksUniverse.getDefaults = globalMap('defaults');\nngMocksUniverse.getConfigMock = globalMap('configMock');\n\nconst getDefaults = (def: any): [] | ['mock' | 'keep' | 'replace' | 'exclude', any?] => {\n  {\n    const defValue = ngMocksUniverse.getDefaults().get(def);\n    if (defValue) {\n      return defValue;\n    }\n  }\n\n  {\n    const defValue = typeof def === 'function' ? ngMocksUniverse.getDefaults().get(`@${funcGetName(def)}`) : undefined;\n    if (defValue) {\n      return defValue;\n    }\n  }\n\n  return [];\n};\n\nngMocksUniverse.getResolution = (def: any): undefined | 'mock' | 'keep' | 'replace' | 'exclude' => {\n  const set = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  if (set?.has(def)) {\n    return set.get(def);\n  }\n  const [value] = getDefaults(def);\n\n  return value;\n};\n\nngMocksUniverse.getBuildDeclaration = (def: any): undefined | null | any => {\n  if (ngMocksUniverse.builtDeclarations.has(def)) {\n    return ngMocksUniverse.builtDeclarations.get(def);\n  }\n  const [mode, replacement] = getDefaults(def);\n\n  if (mode === 'exclude') {\n    return null;\n  }\n  if (!mode || mode === 'keep') {\n    return def;\n  }\n  if (mode === 'replace') {\n    return replacement;\n  }\n};\n\nngMocksUniverse.hasBuildDeclaration = (def: any): boolean => {\n  if (ngMocksUniverse.builtDeclarations.has(def)) {\n    // undefined means that we know about this declaration,\n    // but its initialization is postponed at the moment.\n    return ngMocksUniverse.builtDeclarations.get(def) !== undefined;\n  }\n  const [mode] = getDefaults(def);\n\n  return !!mode && mode !== 'mock';\n};\n\nconst hasBuildDeclaration = (def: any): boolean => ngMocksUniverse.hasBuildDeclaration(def);\nconst getBuildDeclaration = (def: any): any => ngMocksUniverse.getBuildDeclaration(def);\n\nngMocksUniverse.isExcludedDef = (def: any): boolean => {\n  const resolution = ngMocksUniverse.getResolution(def);\n  if (resolution && resolution !== 'exclude') {\n    return false;\n  }\n\n  return hasBuildDeclaration(def) && getBuildDeclaration(def) === null;\n};\n\nngMocksUniverse.isProvidedDef = (def: any): boolean => hasBuildDeclaration(def) && getBuildDeclaration(def) !== null;\n\n// excluding StoreDevtoolsModule by default\nngMocksUniverse.getDefaults().set('@StoreDevtoolsModule', ['exclude']);\n\nngMocksUniverse.indexValue = 0;\nngMocksUniverse.index = () => {\n  return ngMocksUniverse.indexValue++;\n};\n\nexport default ((): NgMocksUniverse => ngMocksUniverse)();\n","import helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\n\nexport default <T extends object>(\n  instance: T & { __ngMocks__source?: object },\n  key: any,\n  value: any,\n  encapsulation?: 'get' | 'set',\n): any => {\n  const def = helperExtractPropertyDescriptor(instance, key) ?? {};\n\n  if (!encapsulation && def.set && (def.set as any).__ngMocksProxy) {\n    def.set(value);\n\n    return value;\n  }\n\n  const descriptor: PropertyDescriptor = {\n    configurable: true,\n    enumerable: true,\n  };\n  if (encapsulation === 'get' && def.set) {\n    descriptor.set = def.set;\n  } else if (encapsulation === 'set' && def.get) {\n    descriptor.get = def.get;\n  }\n  if (encapsulation) {\n    descriptor[encapsulation] = value;\n  } else {\n    descriptor.writable = true;\n    descriptor.value = value;\n  }\n\n  Object.defineProperty(instance, key, descriptor);\n\n  return value;\n};\n","import helperExtractMethodsFromPrototype from '../mock-service/helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from '../mock-service/helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\nimport helperMockService from '../mock-service/helper.mock-service';\nimport { MockedFunction } from '../mock-service/types';\n\nexport default <T = MockedFunction>(instance: any, override: any, style?: 'get' | 'set'): T => {\n  if (typeof override === 'string') {\n    return helperMockService.mock(instance, override, style);\n  }\n\n  // if someone is giving us a function, then we should swap instance and overrides.\n  // so in the end the function can be called, but it also has all desired properties.\n  let correctInstance = instance;\n  let applyOverrides = override;\n  const skipProps = ['__zone_symbol__unconfigurables'];\n  if (typeof override === 'function') {\n    correctInstance = helperMockService.createClone(override);\n    applyOverrides = instance;\n    skipProps.push(...Object.getOwnPropertyNames(correctInstance));\n  }\n\n  const keys = [\n    ...helperExtractMethodsFromPrototype(applyOverrides),\n    ...helperExtractPropertiesFromPrototype(applyOverrides),\n  ];\n  for (const key of keys) {\n    const desc = skipProps.indexOf(key) === -1 ? helperExtractPropertyDescriptor(applyOverrides, key) : undefined;\n    if (desc && Object.prototype.hasOwnProperty.call(desc, 'value') && desc.value === undefined) {\n      continue;\n    }\n    helperMockService.definePropertyDescriptor(correctInstance, key, desc);\n  }\n\n  return correctInstance;\n};\n","import ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockHelperStubMember from '../mock-helper/mock-helper.stub-member';\n\nexport default (def: any): any[] => {\n  const callbacks = [];\n\n  const config = ngMocksUniverse.configInstance.get(def);\n  if (config?.overloads) {\n    for (const [name, stub, encapsulation] of config.overloads) {\n      if (name) {\n        callbacks.push((instance: any) => {\n          mockHelperStubMember(instance, name, stub, encapsulation);\n        });\n      } else {\n        callbacks.push(stub);\n      }\n    }\n  }\n\n  return callbacks;\n};\n","import helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from './helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from './helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\n\nexport default (service: any, bindFrom?: object, bindTo?: object, mock?: any): any => {\n  const instance = function (...args: any[]) {\n    // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n    // @ts-ignore\n    return (mock || service).apply(bindFrom === this ? bindTo : this, args);\n  };\n\n  for (const prop of [\n    ...helperExtractMethodsFromPrototype(service),\n    ...helperExtractPropertiesFromPrototype(service),\n  ]) {\n    const desc = helperExtractPropertyDescriptor(service, prop);\n    helperDefinePropertyDescriptor(instance, prop, desc);\n  }\n\n  return instance;\n};\n","import helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\n\nexport default (instance: any, prop: keyof any, desc?: PropertyDescriptor): boolean => {\n  if (!desc || !instance) {\n    return false;\n  }\n\n  // istanbul ignore else\n  if (Object.defineProperty) {\n    const sourceDesc = helperExtractPropertyDescriptor(instance, prop);\n    if (sourceDesc?.configurable === false) {\n      return false;\n    }\n\n    Object.defineProperty(instance, prop, {\n      ...desc,\n      configurable: true,\n      ...((desc.get === undefined && desc.set === undefined) || desc.writable === false ? { writable: true } : {}),\n    });\n  } else {\n    instance[prop] = desc.value;\n  }\n\n  return true;\n};\n","import funcGetName from '../common/func.get-name';\n\nconst sanitizerMethods = [\n  'sanitize',\n  'bypassSecurityTrustHtml',\n  'bypassSecurityTrustStyle',\n  'bypassSecurityTrustScript',\n  'bypassSecurityTrustUrl',\n  'bypassSecurityTrustResourceUrl',\n];\n\nconst extraMethods: Record<string, undefined | string[]> = {\n  DomSanitizer: sanitizerMethods,\n  Sanitizer: sanitizerMethods,\n};\n\nconst getOwnPropertyNames = (prototype: any): string[] => {\n  const result: string[] = Object.getOwnPropertyNames(prototype);\n  for (const method of extraMethods[funcGetName(prototype)] ?? []) {\n    result.push(method);\n  }\n\n  return result;\n};\n\nexport default <T>(service: T): string[] => {\n  const result: string[] = [];\n\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    for (const method of getOwnPropertyNames(prototype)) {\n      if ((method as any) === 'constructor') {\n        continue;\n      }\n\n      const descriptor = Object.getOwnPropertyDescriptor(prototype, method);\n      const isGetterSetter = descriptor && (descriptor.get || descriptor.set);\n      if (isGetterSetter || result.indexOf(method) !== -1) {\n        continue;\n      }\n      result.push(method);\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return result;\n};\n","export default <T>(service: T): string[] => {\n  const result: string[] = [];\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    for (const prop of Object.getOwnPropertyNames(prototype)) {\n      if ((prop as any) === 'constructor') {\n        continue;\n      }\n\n      const descriptor = Object.getOwnPropertyDescriptor(prototype, prop);\n      const isGetterSetter = descriptor && (descriptor.get || descriptor.set);\n      if (!isGetterSetter || result.indexOf(prop) !== -1) {\n        continue;\n      }\n      result.push(prop);\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return result;\n};\n","export default <T>(service: T, prop: keyof any): PropertyDescriptor | undefined => {\n  let prototype = service;\n  while (prototype && Object.getPrototypeOf(prototype) !== null) {\n    const descriptor = Object.getOwnPropertyDescriptor(prototype, prop);\n    if (descriptor) {\n      return descriptor;\n    }\n    prototype = Object.getPrototypeOf(prototype);\n  }\n\n  return undefined;\n};\n","import funcGetName from '../common/func.get-name';\n\nimport helperMockService from './helper.mock-service';\nimport { MockedFunction } from './types';\n\n// istanbul ignore next\nconst createName = (name: string, mockName?: string, instance?: any, accessType?: string) =>\n  `${mockName ?? (typeof instance.prototype === 'function' ? instance.prototype.name : funcGetName(instance))}.${name}${\n    accessType ?? ''\n  }`;\n\nconst generateMockDef = (def: any, mock: any, accessType?: string): PropertyDescriptor => ({\n  ...(accessType === 'get' && def && def.set\n    ? {\n        set: def.set,\n      }\n    : {}),\n\n  ...(accessType === 'set' && def && def.get\n    ? {\n        get: def.get,\n      }\n    : {}),\n\n  ...(accessType\n    ? {}\n    : {\n        writable: true,\n      }),\n\n  [accessType || 'value']: mock,\n  configurable: true,\n  enumerable: true,\n});\n\nconst parseArgs = (\n  args: any[],\n): {\n  accessType?: 'get' | 'set';\n  mockName?: string;\n} => {\n  let accessType: 'get' | 'set' | undefined;\n  let mockName: string | undefined;\n\n  if (args.length > 0 && args[0] !== 'get' && args[0] !== 'set') {\n    mockName = args[0];\n  } else if (args.length > 0 && (args[0] === 'get' || args[0] === 'set')) {\n    accessType = args[0];\n    mockName = args[1];\n  }\n\n  return { accessType, mockName };\n};\n\nexport default <T = MockedFunction>(instance: any, name: string, ...args: Array<string | undefined>): T => {\n  const { accessType, mockName } = parseArgs(args);\n\n  const def = Object.getOwnPropertyDescriptor(instance, name);\n  if (def && def[accessType || 'value']) {\n    return def[accessType || 'value'];\n  }\n\n  const detectedMockName = createName(name, mockName, instance, accessType);\n  const mock: any = helperMockService.mockFunction(detectedMockName, !!accessType);\n\n  const mockDef = generateMockDef(def, mock, accessType);\n  if (mockDef.get && mockDef.set && (mockDef.get as any).__ngMocks && (mockDef.set as any).__ngMocks) {\n    (mockDef.set as any).__ngMocksSet((val: any) => (mockDef.get as any).__ngMocksGet(val));\n  }\n\n  Object.defineProperty(instance, name, mockDef);\n\n  return mock;\n};\n","import coreDefineProperty from '../common/core.define-property';\n\nimport { CustomMockFunction, MockedFunction } from './types';\n\nconst mockFunction: {\n  (mockName: string, original?: boolean): MockedFunction;\n  customMockFunction?: CustomMockFunction;\n} = (mockName: string, original = false): MockedFunction => {\n  // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary\n  const func =\n    mockFunction.customMockFunction && !original\n      ? mockFunction.customMockFunction(mockName)\n      : (val: any) => {\n          if (setValue) {\n            setValue(val);\n          }\n\n          return value;\n        };\n\n  // magic to make getters / setters working\n\n  let value: any;\n  let setValue: any;\n\n  coreDefineProperty(func, '__ngMocks', true);\n  coreDefineProperty(func, '__ngMocksSet', (newSetValue: any) => (setValue = newSetValue));\n  coreDefineProperty(func, '__ngMocksGet', (newValue: any) => (value = newValue));\n\n  return func;\n};\n\nexport default (() => mockFunction)();\n","import { NG_MOCKS_GUARDS, NG_MOCKS_RESOLVERS } from '../common/core.tokens';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nconst handleSection = (section: any[]) => {\n  const guards: any[] = [];\n\n  for (const guard of section) {\n    if (!ngMocksUniverse.isProvidedDef(guard) && ngMocksUniverse.isExcludedDef(NG_MOCKS_GUARDS)) {\n      continue;\n    }\n\n    guards.push(guard);\n    if (!isNgDef(guard)) {\n      ngMocksUniverse.touches.add(guard);\n    }\n  }\n\n  return guards;\n};\n\nconst handleArray = (cache: Map<any, any>, value: any[], callback: any): [boolean, any[]] => {\n  const mock: Array<any> = [];\n  let updated = false;\n  cache.set(value, mock);\n\n  for (const valueItem of value) {\n    if (ngMocksUniverse.isExcludedDef(valueItem)) {\n      updated = updated || true;\n      continue;\n    }\n    mock.push(callback(valueItem, cache));\n    updated = updated || mock[mock.length - 1] !== valueItem;\n  }\n\n  return [updated, mock];\n};\n\nconst handleItemKeys = ['canActivate', 'canActivateChild', 'canDeactivate', 'canMatch', 'canLoad'];\nconst handleItemGetGuards = (mock: any, section: string) =>\n  Array.isArray(mock[section]) ? handleSection(mock[section]) : mock[section];\n\nconst handleItem = (\n  cache: Map<any, any>,\n  value: Record<keyof any, any>,\n  callback: any,\n): [boolean, Record<keyof any, any>] => {\n  let mock: Record<keyof any, any> = {};\n  let updated = false;\n  cache.set(value, mock);\n\n  for (const key of Object.keys(value)) {\n    if (ngMocksUniverse.isExcludedDef(value[key])) {\n      updated = updated || true;\n      continue;\n    }\n    mock[key] = callback(value[key], cache);\n    updated = updated || mock[key] !== value[key];\n  }\n\n  // Removal of guards.\n  for (const section of handleItemKeys) {\n    const guards: any[] = handleItemGetGuards(mock, section);\n    if (guards && mock[section].length !== guards.length) {\n      updated = updated || true;\n      mock = { ...mock, [section]: guards };\n    }\n  }\n\n  // Removal of resolvers.\n  if (typeof mock.resolve === 'object' && mock.resolve) {\n    const resolve: any = {};\n    let resolveUpdated = false;\n    for (const key of Object.keys(mock.resolve)) {\n      const resolver = mock.resolve[key];\n      if (!ngMocksUniverse.isProvidedDef(resolver) && ngMocksUniverse.isExcludedDef(NG_MOCKS_RESOLVERS)) {\n        resolveUpdated = resolveUpdated || true;\n        continue;\n      }\n      resolve[key] = resolver;\n      if (!isNgDef(resolver)) {\n        ngMocksUniverse.touches.add(resolver);\n      }\n    }\n    if (resolveUpdated) {\n      updated = updated || true;\n      mock = { ...mock, resolve };\n    }\n  }\n\n  return [updated, mock];\n};\n\nconst replaceWithMocks = (value: any, cache: Map<any, any>): any => {\n  if (ngMocksUniverse.cacheDeclarations.has(value)) {\n    return ngMocksUniverse.cacheDeclarations.get(value);\n  }\n  if (typeof value !== 'object') {\n    return value;\n  }\n  if (cache.has(value)) {\n    return value;\n  }\n\n  let mock: any;\n  let updated = false;\n\n  if (Array.isArray(value)) {\n    [updated, mock] = handleArray(cache, value, replaceWithMocks);\n  } else if (value) {\n    [updated, mock] = handleItem(cache, value, replaceWithMocks);\n  }\n\n  if (updated) {\n    Object.setPrototypeOf(mock, Object.getPrototypeOf(value));\n\n    return mock;\n  }\n\n  return value;\n};\n\nconst replaceWithMocksWrapper = (value: any) => {\n  const cache = new Map();\n  const result = replaceWithMocks(value, cache);\n  cache.clear();\n\n  return result;\n};\n\nexport default (() => replaceWithMocksWrapper)();\n","import funcGetGlobal from '../common/func.get-global';\n\nimport helperCreateClone from './helper.create-clone';\nimport helperCreateMockFromPrototype from './helper.create-mock-from-prototype';\nimport helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from './helper.extract-methods-from-prototype';\nimport helperExtractPropertiesFromPrototype from './helper.extract-properties-from-prototype';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\nimport helperMock from './helper.mock';\nimport helperMockFunction from './helper.mock-function';\nimport helperReplaceWithMocks from './helper.replace-with-mocks';\nimport helperResolveProvider from './helper.resolve-provider';\nimport helperUseFactory from './helper.use-factory';\nimport { CustomMockFunction } from './types';\n\n// We need a single pointer to the object among all environments.\nfuncGetGlobal().ngMockshelperMockService = funcGetGlobal().ngMockshelperMockService || {\n  mockFunction: helperMockFunction,\n\n  registerMockFunction: (func: CustomMockFunction | undefined) => {\n    funcGetGlobal().ngMockshelperMockService.mockFunction.customMockFunction = func;\n  },\n\n  createClone: helperCreateClone,\n  createMockFromPrototype: helperCreateMockFromPrototype,\n  definePropertyDescriptor: helperDefinePropertyDescriptor,\n  extractMethodsFromPrototype: helperExtractMethodsFromPrototype,\n  extractPropertiesFromPrototype: helperExtractPropertiesFromPrototype,\n  extractPropertyDescriptor: helperExtractPropertyDescriptor,\n  mock: helperMock,\n  replaceWithMocks: helperReplaceWithMocks,\n  resolveProvider: helperResolveProvider,\n  useFactory: helperUseFactory,\n};\n\nexport default ((): {\n  createClone: typeof helperCreateClone;\n  createMockFromPrototype: typeof helperCreateMockFromPrototype;\n  definePropertyDescriptor: typeof helperDefinePropertyDescriptor;\n  extractMethodsFromPrototype: typeof helperExtractMethodsFromPrototype;\n  extractPropertiesFromPrototype: typeof helperExtractPropertiesFromPrototype;\n  extractPropertyDescriptor: typeof helperExtractPropertyDescriptor;\n  mock: typeof helperMock;\n  mockFunction: typeof helperMockFunction;\n  registerMockFunction: (func: CustomMockFunction | undefined) => void;\n  replaceWithMocks: typeof helperReplaceWithMocks;\n  resolveProvider: typeof helperResolveProvider;\n  useFactory: typeof helperUseFactory;\n} => funcGetGlobal().ngMockshelperMockService)();\n\nexport function registerMockFunction(func?: CustomMockFunction | undefined): void {\n  funcGetGlobal().ngMockshelperMockService.registerMockFunction(func);\n}\n","import coreDefineProperty from '../common/core.define-property';\nimport funcGetName from '../common/func.get-name';\n\nimport helperMockService from './helper.mock-service';\nimport { MockedFunction } from './types';\n\nexport default (service: any): { [key in keyof any]: MockedFunction } => {\n  const mockName = funcGetName(service);\n  const value: any = {};\n  coreDefineProperty(value, '__ngMocks', true);\n\n  const methods = helperMockService.extractMethodsFromPrototype(service);\n  for (const method of methods) {\n    helperMockService.mock(value, method, mockName);\n  }\n\n  const properties = helperMockService.extractPropertiesFromPrototype(service);\n  for (const property of properties) {\n    helperMockService.mock(value, property, 'get', mockName);\n    helperMockService.mock(value, property, 'set', mockName);\n  }\n  Object.setPrototypeOf(value, service);\n\n  return value;\n};\n","import CoreDefStack from '../common/core.def-stack';\nimport { extractDependency } from '../common/core.helpers';\nimport { NG_MOCKS_INTERCEPTORS } from '../common/core.tokens';\nimport funcExtractForwardRef from '../common/func.extract-forward-ref';\nimport funcGetType from '../common/func.get-type';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport helperMockService from './helper.mock-service';\nimport mockProvider from './mock-provider';\n\nconst anyDiffers = (a: any, b: any, ...keys: string[]): boolean => {\n  for (const key of keys) {\n    if (a[key] !== b[key]) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nconst createFromResolution = (provide: any, resolution: any) => {\n  let mockDef = resolution;\n\n  const existingMock = ngMocksUniverse.builtProviders.get(provide);\n  if (existingMock) {\n    mockDef = existingMock;\n  }\n\n  // A case when a provider is actually a component, directive, pipe.\n  if (typeof mockDef === 'function') {\n    mockDef = {\n      provide,\n      useClass: mockDef,\n    };\n  }\n\n  return mockDef;\n};\n\nconst isSuitableProvider = (provider: any, provide: any): boolean =>\n  ngMocksUniverse.builtProviders.has(NG_MOCKS_INTERCEPTORS) &&\n  ngMocksUniverse.builtProviders.get(NG_MOCKS_INTERCEPTORS) === null &&\n  isNgInjectionToken(provide) &&\n  provide.toString() === 'InjectionToken HTTP_INTERCEPTORS' &&\n  provide !== provider;\n\nconst excludeInterceptors = (provider: any, provide: any): boolean => {\n  if (isSuitableProvider(provider, provide)) {\n    if (provider.useFactory || provider.useValue) {\n      return true;\n    }\n    const interceptor = funcExtractForwardRef(provider.useExisting) || provider.useClass;\n    if (!ngMocksUniverse.builtProviders.has(interceptor) || ngMocksUniverse.builtProviders.get(interceptor) === null) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nconst parseProvider = (\n  provider: any,\n  callback: any,\n): {\n  change: () => void;\n  multi: boolean;\n  provide: any;\n} => {\n  const provide = funcGetType(provider);\n  const multi = provider !== provide && !!provider.multi;\n\n  return {\n    change: () => {\n      if (callback) {\n        callback();\n      }\n    },\n    multi,\n    provide,\n  };\n};\n\n// if the provider is a value, we need to go through the value and to replace all mock instances.\nconst replaceWithMocks = (provider: any, provide: any, mockDef: any) => {\n  if (provide !== provider && mockDef && mockDef.useValue) {\n    const useValue = helperMockService.replaceWithMocks(mockDef.useValue);\n\n    return useValue === mockDef.useValue\n      ? mockDef\n      : {\n          ...mockDef,\n          useValue,\n        };\n  }\n\n  return mockDef;\n};\n\nconst createPredefinedMockProvider = (provider: any, provide: any): any => {\n  // Then we check decisions whether we should keep or replace a provider.\n  if (ngMocksUniverse.builtProviders.has(provide)) {\n    const mockDef = ngMocksUniverse.builtProviders.get(provide);\n    if (mockDef === provide) {\n      return provider;\n    }\n\n    return mockDef;\n  }\n\n  return undefined;\n};\n\nconst createMockProvider = (provider: any, provide: any, change: () => void) => {\n  let mockDef = createPredefinedMockProvider(provider, provide);\n\n  if (!mockDef && ngMocksUniverse.flags.has('skipMock') && ngMocksUniverse.getResolution(provide) !== 'mock') {\n    ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(provide);\n    mockDef = provider;\n  }\n  if (!mockDef) {\n    mockDef = mockProvider(provider);\n  }\n\n  mockDef = replaceWithMocks(provider, provide, mockDef);\n  if (!areEqualDefs(mockDef, provider, provide)) {\n    change();\n  }\n  // Touching only when we really provide a value.\n  if (mockDef) {\n    ngMocksUniverse.touches.add(provide);\n  }\n\n  return mockDef;\n};\n\nconst areEqualDefs = (mockDef: any, provider: any, provide: any): boolean => {\n  let providerDiffers = false;\n  let defDiffers = !mockDef;\n  if (provider && mockDef && !defDiffers) {\n    defDiffers = anyDiffers(provider, mockDef, 'provide', 'useValue', 'useClass', 'useExisting', 'useFactory', 'deps');\n  }\n  if (provider === provide && mockDef !== provider) {\n    providerDiffers = true;\n  } else if (provider !== provide && defDiffers) {\n    providerDiffers = true;\n  }\n\n  return !providerDiffers;\n};\n\nconst isPreconfiguredDependency = (provider: any, provide: any): boolean => {\n  //  we should not touch excluded providers.\n  if (ngMocksUniverse.builtProviders.get(provide) === null) {\n    return true;\n  }\n\n  if (provide !== provider && provider.deps) {\n    extractDependency(provider.deps, ngMocksUniverse.config.get('ngMocksDeps'));\n  }\n\n  return excludeInterceptors(provider, provide);\n};\n\nconst isPreconfiguredUseExisting = (provider: any, provide: any): boolean => {\n  //  we should not touch non-useExisting providers.\n  if (!provider || typeof provider !== 'object' || !provider.useExisting) {\n    return false;\n  }\n  if (provider.useExisting.mockOf) {\n    return true;\n  }\n\n  // skipping explicit declarations (not internally processed)\n  if (ngMocksUniverse.getResolution(provide) && !ngMocksUniverse.config.get(provide)?.__internal) {\n    return false;\n  }\n\n  return ngMocksUniverse.getResolution(funcExtractForwardRef(provider.useExisting)) === 'keep';\n};\n\n// tries to resolve a provider based on current universe state.\nexport default (provider: any, resolutions: CoreDefStack<any, any>, changed?: () => void) => {\n  const { provide, multi, change } = parseProvider(provider, changed);\n  if (isPreconfiguredDependency(provider, provide)) {\n    return change();\n  }\n  if (isPreconfiguredUseExisting(provider, provide)) {\n    ngMocksUniverse.touches.add(provide);\n\n    return provider;\n  }\n  if (resolutions.has(provide)) {\n    return createFromResolution(provide, resolutions.get(provide));\n  }\n\n  const mockDef = createMockProvider(provider, provide, change);\n\n  return multi && typeof mockDef === 'object' ? { ...mockDef, multi } : mockDef;\n};\n","import { FactoryProvider, Injector } from '@angular/core';\n\nimport { mapValues } from '../common/core.helpers';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport mockInstanceApply from '../mock-instance/mock-instance-apply';\n\nimport { MockService } from './mock-service';\n\nconst applyCallbackToken = (def: any): boolean => isNgInjectionToken(def) || typeof def === 'string';\n\nconst applyCallback = (def: any, inst: any, callbacks: any[], injector?: Injector, overrides?: any): void => {\n  let instance: any = inst;\n\n  for (const callback of callbacks) {\n    const override = callback(instance, injector);\n    if (applyCallbackToken(def)) {\n      instance = override;\n      continue;\n    }\n\n    // overrides return real value.\n    if (callback === overrides) {\n      instance = override;\n      continue;\n    }\n\n    if (!override) {\n      continue;\n    }\n\n    instance = mockHelperStub(instance, override);\n  }\n\n  return instance;\n};\n\nexport default <D, I>(\n  def: D,\n  init?: () => I,\n  overrides?: (instance: I, injector: Injector) => I | Partial<I>,\n): FactoryProvider => ({\n  deps: [Injector],\n  provide: def,\n  useFactory: (injector?: Injector) => {\n    const instance = init ? init() : MockService(def as any);\n\n    const configGlobal: Set<any> | undefined = ngMocksUniverse.getOverrides().get(def);\n    const callbacks = configGlobal ? mapValues(configGlobal) : [];\n    if (overrides) {\n      callbacks.push(overrides);\n    }\n    callbacks.push(...mockInstanceApply(def));\n\n    return applyCallback(def, instance, callbacks, injector, overrides);\n  },\n});\n","import { Provider } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport { Type } from '../common/core.types';\nimport funcGetType from '../common/func.get-type';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport helperDefinePropertyDescriptor from './helper.define-property-descriptor';\nimport helperExtractPropertyDescriptor from './helper.extract-property-descriptor';\nimport helperUseFactory from './helper.use-factory';\nimport { MockService } from './mock-service';\n\nconst { neverMockProvidedFunction, neverMockToken } = coreConfig;\n\nconst applyMissingClassProperties = (instance: any, useClass: Type<any>) => {\n  const existing = Object.getOwnPropertyNames(instance);\n  const child = MockService(useClass);\n\n  for (const name of Object.getOwnPropertyNames(child)) {\n    if (existing.indexOf(name) !== -1) {\n      continue;\n    }\n    const def = helperExtractPropertyDescriptor(child, name);\n    helperDefinePropertyDescriptor(instance, name, def);\n  }\n};\n\nconst createFactoryProvider = (provider: any, provide: any) =>\n  helperUseFactory(provide, () => {\n    const instance = MockService(provide);\n    // Magic below adds missed properties to the instance to\n    // fulfill missed abstract methods.\n    if (provide !== provider && Object.keys(provider).indexOf('useClass') !== -1) {\n      applyMissingClassProperties(instance, provider.useClass);\n    }\n\n    return instance;\n  });\n\nconst normalizePrimitivesMap: Array<[(value: any) => boolean, any]> = [\n  [value => typeof value === 'boolean', false],\n  [value => typeof value === 'number', 0],\n  [value => typeof value === 'string', ''],\n  [value => value === null, null],\n];\n\nconst normalizePrimitives = (value: any): any => {\n  for (const [check, result] of normalizePrimitivesMap) {\n    if (check(value)) {\n      return result;\n    }\n  }\n\n  return undefined;\n};\n\nconst createValueProvider = (provider: any, provide: any) =>\n  helperUseFactory(provide, () =>\n    provider.useValue && typeof provider.useValue === 'object'\n      ? MockService(provider.useValue)\n      : normalizePrimitives(provider.useValue),\n  );\n\nconst createClassProvider = (provider: any, provide: any) =>\n  ngMocksUniverse.builtProviders.has(provider.useClass) &&\n  ngMocksUniverse.builtProviders.get(provider.useClass) === provider.useClass\n    ? provider\n    : helperUseFactory(provide, () => MockService(provider.useClass));\n\nconst createMockProvider = (provider: any, provide: any, cacheProviders?: Map<any, any>): Provider | undefined => {\n  let mockProvider: Provider | undefined;\n  if (typeof provide === 'function') {\n    mockProvider = createFactoryProvider(provider, provide);\n  }\n  if (provide === provider && mockProvider && cacheProviders) {\n    cacheProviders.set(provide, mockProvider);\n  }\n\n  return mockProvider;\n};\n\n// Tokens are special subject, we can skip adding them because in a mock module they are useless.\n// The main problem is that providing undefined to HTTP_INTERCEPTORS and others breaks their code.\n// If a testing module / component requires omitted tokens then they should be provided manually\n// during creation of TestBed module.\nconst handleProvider = (provider: any, provide: any, useFactory: boolean) => {\n  if (provide === provider) {\n    return useFactory ? helperUseFactory(provider, () => undefined) : undefined;\n  }\n  if (provider.multi) {\n    ngMocksUniverse.config.get('ngMocksMulti')?.add(provide);\n\n    return undefined;\n  }\n\n  let mockProvider: any;\n  // istanbul ignore else\n  if (Object.keys(provider).indexOf('useValue') !== -1) {\n    mockProvider = createValueProvider(provider, provide);\n  } else if (Object.keys(provider).indexOf('useExisting') !== -1) {\n    mockProvider = provider;\n  } else if (Object.keys(provider).indexOf('useClass') !== -1) {\n    mockProvider = createClassProvider(provider, provide);\n  } else if (Object.keys(provider).indexOf('useFactory') !== -1) {\n    mockProvider = helperUseFactory(provide, () => ({}));\n  }\n\n  return mockProvider;\n};\n\nconst isNeverMockFunction = (provide: any): boolean =>\n  typeof provide === 'function' && neverMockProvidedFunction.indexOf(provide.name) !== -1;\n\nconst isNeverMockToken = (provide: any): boolean =>\n  isNgInjectionToken(provide) && neverMockToken.indexOf(provide.toString()) !== -1;\n\nexport default (provider: any, useFactory = false): Provider | undefined => {\n  const provide = funcGetType(provider);\n\n  if (ngMocksUniverse.getResolution(provide) === 'mock') {\n    // nothing to do\n  } else if (isNeverMockFunction(provide)) {\n    return provider;\n  } else if (isNeverMockToken(provide)) {\n    return undefined;\n  }\n\n  // Only pure provides should be cached to avoid their influence on\n  // another different declarations.\n  const cacheProviders = ngMocksUniverse.flags.has('cacheProvider')\n    ? ngMocksUniverse.cacheProviders\n    : /* istanbul ignore next */ undefined;\n  if (provide === provider && cacheProviders && cacheProviders.has(provide)) {\n    return cacheProviders.get(provide);\n  }\n\n  return createMockProvider(provider, provide, cacheProviders) || handleProvider(provider, provide, useFactory);\n};\n","const isAngularClass = (value: Record<keyof any, unknown>): boolean => {\n  if (value.ɵprov) {\n    return true;\n  }\n  if (value.__annotations__) {\n    return true;\n  }\n  if (value.__parameters__) {\n    return true;\n  }\n  if (value.parameters) {\n    return true;\n  }\n\n  return false;\n};\n\nconst guessClass = (name: string, proto: string, value: any): boolean => {\n  // unnamed classes can be class_N\n  if (name.match(/^class/) !== null) {\n    return true;\n  }\n\n  // let's consider an existing 'prototype' as a class\n  if (Object.keys(value.prototype).length > 0) {\n    return true;\n  }\n\n  // let's consider a capital name and 'this' usage as a class\n  const clsCode = name.codePointAt(0);\n  if (clsCode && clsCode >= 65 && clsCode <= 90 && proto.match(/\\bthis\\./gm) !== null) {\n    return true;\n  }\n\n  // webpack es5 class\n  const regEx = new RegExp(`\\\\(this,\\\\s*${name}\\\\)`, 'mg');\n  // istanbul ignore if\n  if (proto.match(regEx) !== null) {\n    return true;\n  }\n\n  return false;\n};\n\nexport default (value: any): boolean => {\n  if (typeof value !== 'function') {\n    return false;\n  }\n  if (!value.prototype) {\n    return true;\n  }\n  if (isAngularClass(value)) {\n    return false;\n  }\n\n  const proto = value.toString();\n\n  // es2015 class\n  // istanbul ignore if\n  if (proto.match(/^class\\b/) !== null) {\n    return false;\n  }\n\n  const cls = proto.match(/^function\\s+([^\\s(]+)\\(/);\n  if (cls === null) {\n    return true;\n  }\n  if (guessClass(cls[1], proto, value)) {\n    return false;\n  }\n\n  return true;\n};\n","import { AnyType } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\n\nimport checkIsClass from './check.is-class';\nimport checkIsFunc from './check.is-func';\nimport checkIsInst from './check.is-inst';\nimport helperMockService from './helper.mock-service';\n\ntype MockServiceHandler = (cache: Map<any, any>, service: any, prefix?: string, overrides?: any) => any;\n\nconst mockVariableMap: Array<[(def: any) => boolean, MockServiceHandler]> = [\n  [\n    checkIsClass,\n    (cache, service) => {\n      const value = helperMockService.createMockFromPrototype(service.prototype);\n      cache.set(service, value);\n\n      return value;\n    },\n  ],\n  [\n    checkIsFunc,\n    (cache, service, prefix) => {\n      const value = helperMockService.mockFunction(`func:${prefix || funcGetName(service)}`);\n      cache.set(service, value());\n\n      return value;\n    },\n  ],\n  [def => Array.isArray(def), () => []],\n  [\n    checkIsInst,\n    (cache, service, prefix, callback) => {\n      const value = helperMockService.createMockFromPrototype(service.constructor.prototype);\n      cache.set(service, value);\n      for (const property of Object.keys(service)) {\n        const mock: any = callback(cache, service[property], `${prefix || 'instance'}.${property}`);\n        if (mock !== undefined) {\n          value[property] = mock;\n        }\n      }\n      Object.setPrototypeOf(value, Object.getPrototypeOf(service));\n\n      return value;\n    },\n  ],\n];\n\nconst mockVariable = (cache: Map<any, any>, service: any, prefix: string, callback: MockServiceHandler) => {\n  for (const [check, createMock] of mockVariableMap) {\n    if (!check(service)) {\n      continue;\n    }\n\n    return cache.get(service) ?? createMock(cache, service, prefix, callback);\n  }\n};\n\n/**\n * Mocking all methods / properties of a class / object.\n */\nconst mockService: MockServiceHandler = (cache, service, prefix = '', overrides): any => {\n  const value: any = mockVariable(cache, service, prefix, mockService);\n\n  if (overrides) {\n    mockHelperStub(value, overrides);\n  }\n\n  return value;\n};\n\n/**\n * MockService creates a mock instance out of an object or a class.\n * Primitives are converted to undefined.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n */\nexport function MockService(service: boolean | number | string | null | undefined): undefined;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const service = MockService(AuthService);\n * service.login(); // does nothing, it's dummy.\n */\nexport function MockService<T>(service: AnyType<T>, spyNamePrefix?: string): T;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const mockUser = MockService(currentUser);\n * mockUser.save(); // does nothing, it's dummy.\n */\nexport function MockService<T = any>(service: object, spyNamePrefix?: string): T;\n\n/**\n * MockService creates a mock instance out of an object or a class.\n * The second parameter can be used as overrides.\n *\n * @see https://ng-mocks.sudo.eu/api/MockService\n *\n * ```ts\n * const service = MockService(AuthService, {\n *   loggedIn: true,\n * });\n * service.login(); // does nothing, it's dummy.\n * ```\n */\nexport function MockService<T>(service: AnyType<T>, overrides?: Partial<T>, spyNamePrefix?: string): T;\n\nexport function MockService(service: any, ...args: any[]): any {\n  const prefix = args.length > 0 && typeof args[0] === 'string' ? args[0] : args[1];\n  const overrides = args.length > 0 && args[0] && typeof args[0] === 'object' ? args[0] : undefined;\n\n  const cache = new Map();\n  const result = mockService(cache, service, prefix, overrides);\n  cache.clear();\n\n  return result;\n}\n","import checkIsFunc from './check.is-func';\n\nexport default (value: any): boolean => {\n  if (typeof value !== 'function') {\n    return false;\n  }\n\n  return !checkIsFunc(value);\n};\n","export default (value: any): boolean => {\n  if (value === null) {\n    return false;\n  }\n  if (typeof value !== 'object') {\n    return false;\n  }\n  if (value.ngMetadataName === 'InjectionToken') {\n    return false;\n  }\n\n  return typeof Object.getPrototypeOf(value) === 'object';\n};\n","import { ɵReflectionCapabilities as ReflectionCapabilities } from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport { AnyDeclaration, DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoBuild from '../common/func.directive-io-build';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\n\ninterface Declaration {\n  host: Record<string, string | undefined>;\n  hostBindings: Array<[string, string?, ...any[]]>;\n  hostListeners: Array<[string, string?, ...any[]]>;\n  attributes: string[];\n  inputs: Array<DirectiveIo>;\n  outputs: Array<DirectiveIo>;\n  propDecorators: Record<string, any[]>;\n  queries: Record<string, any>;\n  decorators: Array<'Injectable' | 'Pipe' | 'Directive' | 'Component' | 'NgModule'>;\n  [key: string]: any;\n}\n\nconst pushDecorator = (decorators: string[], decorator: string): void => {\n  const deleteIndex = decorators.indexOf(decorator);\n  if (deleteIndex !== -1) {\n    decorators.splice(deleteIndex, 1);\n  }\n  if (\n    decorator === 'Injectable' ||\n    decorator === 'Pipe' ||\n    decorator === 'Directive' ||\n    decorator === 'Component' ||\n    decorator === 'NgModule'\n  ) {\n    decorators.push(decorator);\n  }\n};\n\nconst getAllKeys = <T extends Record<keyof any, any>>(instance: T): Array<keyof T> => {\n  const props: string[] = [];\n  for (const key of Object.keys(instance)) {\n    props.push(key);\n  }\n\n  return props as never;\n};\n\nconst createDeclarations = (parent: Partial<Declaration>): Declaration => ({\n  host: parent.host ? { ...parent.host } : {},\n  hostBindings: parent.hostBindings ? [...parent.hostBindings] : [],\n  hostListeners: parent.hostListeners ? [...parent.hostListeners] : [],\n  attributes: parent.attributes ? [...parent.attributes] : [],\n  inputs: parent.inputs ? [...parent.inputs] : [],\n  outputs: parent.outputs ? [...parent.outputs] : [],\n  propDecorators: parent.propDecorators ? { ...parent.propDecorators } : {},\n  queries: parent.queries ? { ...parent.queries } : {},\n  decorators: parent.decorators ? [...parent.decorators] : [],\n});\n\nconst parseParameters = (\n  def: {\n    __parameters__?: Array<null | Array<\n      | {\n          attributeName: string;\n          ngMetadataName: 'Attribute';\n        }\n      | {\n          token: AnyDeclaration<any>;\n          ngMetadataName: 'Inject';\n        }\n      | {\n          ngMetadataName: 'Optional';\n        }\n    >>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__parameters__') && def.__parameters__) {\n    for (const decorators of def.__parameters__) {\n      for (const decorator of decorators || []) {\n        if (\n          decorator.ngMetadataName === 'Attribute' &&\n          declaration.attributes.indexOf(decorator.attributeName) === -1\n        ) {\n          declaration.attributes.push(decorator.attributeName);\n        }\n      }\n    }\n  }\n};\n\nconst parseAnnotations = (\n  def: {\n    __annotations__?: Array<{\n      ngMetadataName?: string;\n    }>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__annotations__') && def.__annotations__) {\n    for (const annotation of def.__annotations__) {\n      const ngMetadataName = annotation?.ngMetadataName;\n      if (!ngMetadataName) {\n        continue;\n      }\n      declaration[ngMetadataName] = { ...annotation, attributes: declaration.attributes };\n      pushDecorator(declaration.decorators, ngMetadataName);\n    }\n  }\n};\n\nconst parseDecorators = (\n  def: {\n    decorators?: Array<{\n      args?: [any];\n      type?: {\n        prototype?: {\n          ngMetadataName?: string;\n        };\n      };\n    }>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, 'decorators') && def.decorators) {\n    for (const decorator of def.decorators) {\n      const ngMetadataName = decorator?.type?.prototype?.ngMetadataName;\n      if (!ngMetadataName) {\n        continue;\n      }\n      declaration[ngMetadataName] = decorator.args ? { ...decorator.args[0] } : {};\n      pushDecorator(declaration.decorators, ngMetadataName);\n    }\n  }\n};\n\nconst parsePropMetadataParserFactoryProp =\n  (key: 'inputs' | 'outputs') =>\n  (\n    _: string,\n    name: string,\n    decorator: {\n      alias?: string;\n      required?: boolean;\n      bindingPropertyName?: string;\n    },\n    declaration: Declaration,\n  ): void => {\n    const { alias, required } = funcDirectiveIoParse({\n      name,\n      alias: decorator.alias ?? decorator.bindingPropertyName,\n      required: decorator.required,\n    });\n\n    const normalizedDef = funcDirectiveIoBuild({ name, alias, required });\n\n    let add = true;\n    for (const def of declaration[key]) {\n      if (def === normalizedDef) {\n        add = false;\n        break;\n      }\n\n      const { name: defName, alias: defAlias, required: defRequired } = funcDirectiveIoParse(def);\n      if (defName === name && defAlias === alias && defRequired === required) {\n        add = false;\n        break;\n      }\n    }\n\n    if (add) {\n      declaration[key].unshift(normalizedDef);\n    }\n  };\nconst parsePropMetadataParserInput = parsePropMetadataParserFactoryProp('inputs');\nconst parsePropMetadataParserOutput = parsePropMetadataParserFactoryProp('outputs');\n\nconst parsePropMetadataParserFactoryQueryChild =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      read?: any;\n      selector: string;\n      static?: boolean;\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.selector,\n        ...(decorator.read === undefined ? {} : { read: decorator.read }),\n        ...(decorator.static === undefined ? {} : { static: decorator.static }),\n      };\n    }\n  };\nconst parsePropMetadataParserContentChild = parsePropMetadataParserFactoryQueryChild(false);\nconst parsePropMetadataParserViewChild = parsePropMetadataParserFactoryQueryChild(true);\n\nconst parsePropMetadataParserFactoryQueryChildren =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      descendants?: any;\n      emitDistinctChangesOnly?: boolean;\n      read?: any;\n      selector: string;\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.selector,\n        ...(decorator.descendants === undefined ? {} : { descendants: decorator.descendants }),\n        ...(decorator.emitDistinctChangesOnly === undefined\n          ? {}\n          : { emitDistinctChangesOnly: decorator.emitDistinctChangesOnly }),\n        ...(decorator.read === undefined ? {} : { read: decorator.read }),\n      };\n    }\n  };\nconst parsePropMetadataParserContentChildren = parsePropMetadataParserFactoryQueryChildren(false);\nconst parsePropMetadataParserViewChildren = parsePropMetadataParserFactoryQueryChildren(true);\n\nconst parsePropMetadataParserHostBinding = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any;\n    hostPropertyName?: string;\n  },\n  declaration: Declaration,\n): void => {\n  const key = `[${decorator.hostPropertyName || prop}]`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = prop;\n  }\n  declaration.hostBindings.push([\n    prop,\n    decorator.hostPropertyName || prop,\n    ...(decorator.args ? [decorator.args] : []),\n  ]);\n};\n\nconst parsePropMetadataParserHostListener = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any;\n    eventName?: string;\n  },\n  declaration: Declaration,\n): void => {\n  const key = `(${decorator.eventName || prop})`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = `${prop}($event)`;\n  }\n  declaration.hostListeners.push([prop, decorator.eventName || prop, ...(decorator.args ? [decorator.args] : [])]);\n};\n\nconst parsePropMetadataMap: any = {\n  ContentChild: parsePropMetadataParserContentChild,\n  ContentChildren: parsePropMetadataParserContentChildren,\n  HostBinding: parsePropMetadataParserHostBinding,\n  HostListener: parsePropMetadataParserHostListener,\n  Input: parsePropMetadataParserInput,\n  Output: parsePropMetadataParserOutput,\n  ViewChild: parsePropMetadataParserViewChild,\n  ViewChildren: parsePropMetadataParserViewChildren,\n};\n\nconst parsePropMetadata = (\n  def: {\n    __prop__metadata__?: Record<keyof any, any[]>;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, '__prop__metadata__') && def.__prop__metadata__) {\n    for (const prop of getAllKeys(def.__prop__metadata__)) {\n      const decorators: Array<{\n        ngMetadataName?: string;\n      }> = def.__prop__metadata__[prop];\n      for (const decorator of decorators) {\n        const ngMetadataName = decorator?.ngMetadataName;\n        if (!ngMetadataName) {\n          continue;\n        }\n        parsePropMetadataMap[ngMetadataName]?.(ngMetadataName, prop, decorator, declaration);\n      }\n    }\n  }\n};\n\nconst parsePropDecoratorsParserFactoryProp = (key: 'inputs' | 'outputs') => {\n  const callback = parsePropMetadataParserFactoryProp(key);\n  return (\n    _: string,\n    name: string,\n    decorator: {\n      args?: [DirectiveIo];\n    },\n    declaration: Declaration,\n  ): void => {\n    const { alias = undefined, required = undefined } =\n      typeof decorator.args?.[0] === 'undefined'\n        ? {}\n        : typeof decorator.args[0] === 'string'\n          ? { alias: decorator.args[0] }\n          : decorator.args[0];\n    callback(_, name, { alias, required, bindingPropertyName: alias }, declaration);\n  };\n};\nconst parsePropDecoratorsParserInput = parsePropDecoratorsParserFactoryProp('inputs');\nconst parsePropDecoratorsParserOutput = parsePropDecoratorsParserFactoryProp('outputs');\n\nconst parsePropDecoratorsParserFactoryQuery =\n  (isViewQuery: boolean) =>\n  (\n    ngMetadataName: string,\n    prop: string,\n    decorator: {\n      args: [string] | [string, any];\n    },\n    declaration: Declaration,\n  ): void => {\n    if (!declaration.queries[prop]) {\n      declaration.queries[prop] = {\n        isViewQuery,\n        ngMetadataName,\n        selector: decorator.args[0],\n        ...decorator.args[1],\n      };\n    }\n  };\nconst parsePropDecoratorsParserContent = parsePropDecoratorsParserFactoryQuery(false);\nconst parsePropDecoratorsParserView = parsePropDecoratorsParserFactoryQuery(true);\n\nconst parsePropDecoratorsParserHostBinding = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: [string] | [string, any[]];\n  },\n  declaration: Declaration,\n): void => {\n  const key = `[${decorator.args?.[0] || prop}]`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = prop;\n  }\n  declaration.hostBindings.push([prop, ...(decorator.args || [])]);\n};\n\nconst parsePropDecoratorsParserHostListener = (\n  _: string,\n  prop: string,\n  decorator: {\n    args?: any[];\n  },\n  declaration: Declaration,\n): void => {\n  const key = `(${decorator.args?.[0] || prop})`;\n  if (!declaration.host[key]) {\n    declaration.host[key] = `${prop}($event)`;\n  }\n  declaration.hostListeners.push([prop, ...(decorator.args || [])]);\n};\n\nconst parsePropDecoratorsMap: any = {\n  ContentChild: parsePropDecoratorsParserContent,\n  ContentChildren: parsePropDecoratorsParserContent,\n  HostBinding: parsePropDecoratorsParserHostBinding,\n  HostListener: parsePropDecoratorsParserHostListener,\n  Input: parsePropDecoratorsParserInput,\n  Output: parsePropDecoratorsParserOutput,\n  ViewChild: parsePropDecoratorsParserView,\n  ViewChildren: parsePropDecoratorsParserView,\n};\n\nconst parsePropDecorators = (\n  def: {\n    propDecorators?: Record<\n      string,\n      Array<{\n        args: any;\n        type?: {\n          prototype?: {\n            ngMetadataName?: string;\n          };\n        };\n      }>\n    >;\n  },\n  declaration: Declaration,\n): void => {\n  if (Object.prototype.hasOwnProperty.call(def, 'propDecorators') && def.propDecorators) {\n    for (const prop of getAllKeys(def.propDecorators)) {\n      declaration.propDecorators[prop] = [...(declaration.propDecorators[prop] || []), ...def.propDecorators[prop]];\n      for (const decorator of def.propDecorators[prop]) {\n        const ngMetadataName = decorator?.type?.prototype?.ngMetadataName;\n        if (!ngMetadataName) {\n          continue;\n        }\n        parsePropDecoratorsMap[ngMetadataName]?.(ngMetadataName, prop, decorator, declaration);\n      }\n    }\n  }\n};\n\nconst buildDeclaration = (def: any | undefined, declaration: Declaration): void => {\n  if (def) {\n    def.inputs = def.inputs || [];\n    for (const input of declaration.inputs) {\n      if (def.inputs.indexOf(input) === -1) {\n        def.inputs.push(input);\n      }\n    }\n\n    def.outputs = def.outputs || [];\n    for (const output of declaration.outputs) {\n      if (def.outputs.indexOf(output) === -1) {\n        def.outputs.push(output);\n      }\n    }\n\n    def.queries = {\n      ...(def.queries || []),\n      ...declaration.queries,\n    };\n\n    def.hostBindings = declaration.hostBindings;\n    def.hostListeners = declaration.hostListeners;\n  }\n};\n\nconst reflectionCapabilities = new ReflectionCapabilities();\n\nconst parse = (def: any): any => {\n  if (typeof def !== 'function' && typeof def !== 'object') {\n    return {};\n  }\n\n  if (Object.prototype.hasOwnProperty.call(def, '__ngMocksParsed')) {\n    return def.__ngMocksDeclarations;\n  }\n\n  const parent = Object.getPrototypeOf(def);\n  const parentDeclarations = parent ? parse(parent) : {};\n  const declaration = createDeclarations(parentDeclarations);\n  coreDefineProperty(def, '__ngMocksParsed', true);\n  parseParameters(def, declaration);\n  parseAnnotations(def, declaration);\n  parseDecorators(def, declaration);\n  parsePropDecorators(def, declaration);\n  parsePropMetadata(def, declaration);\n  buildDeclaration(declaration.Directive, declaration);\n  buildDeclaration(declaration.Component, declaration);\n\n  coreDefineProperty(def, '__ngMocksDeclarations', {\n    ...parentDeclarations,\n    ...declaration,\n    parameters: reflectionCapabilities.parameters(def),\n  });\n\n  return def.__ngMocksDeclarations;\n};\n\nexport default ((): ((def: any) => Declaration) => parse)();\n","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nmodule.exports = x({ [\"ChangeDetectorRef\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ChangeDetectorRef), [\"Component\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Component), [\"ComponentFactoryResolver\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ComponentFactoryResolver), [\"ContentChild\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ContentChild), [\"ContentChildren\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ContentChildren), [\"DebugElement\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.DebugElement), [\"Directive\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Directive), [\"ElementRef\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ElementRef), [\"EventEmitter\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.EventEmitter), [\"InjectionToken\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.InjectionToken), [\"Injector\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Injector), [\"Input\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Input), [\"NgModule\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.NgModule), [\"Optional\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Optional), [\"Output\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Output), [\"Pipe\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Pipe), [\"QueryList\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.QueryList), [\"Self\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.Self), [\"TemplateRef\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.TemplateRef), [\"VERSION\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.VERSION), [\"ViewChild\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ViewChild), [\"ViewChildren\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ViewChildren), [\"ViewContainerRef\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__.ViewContainerRef), [\"ɵReflectionCapabilities\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__[\"ɵReflectionCapabilities\"]) });","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nmodule.exports = x({ [\"TestBed\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__.TestBed), [\"getTestBed\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__.getTestBed) });","// 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\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\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};","__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};","import ngMocksUniverse from './ng-mocks-universe';\n\nexport interface NgMocksStack {\n  id: object;\n  level: 'root' | 'runtime';\n  mockInstance?: any[];\n}\n\ntype NgMocksStackCallback = (state: NgMocksStack, stack: NgMocksStack[]) => void;\n\nconst stackRoot: NgMocksStack = { id: {}, level: 'root' };\nconst stack: NgMocksStack[] = ngMocksUniverse.global.get('reporter-stack') || [{ ...stackRoot }];\nngMocksUniverse.global.set('reporter-stack', stack);\nconst current = () => stack[stack.length - 1];\n\n// istanbul ignore next\nconst listenersPush: NgMocksStackCallback[] = ngMocksUniverse.global.get('reporter-stack-push') ?? [];\nngMocksUniverse.global.set('reporter-stack-push', listenersPush);\n\n// istanbul ignore next\nconst listenersPop: NgMocksStackCallback[] = ngMocksUniverse.global.get('reporter-stack-pop') ?? [];\nngMocksUniverse.global.set('reporter-stack-pop', listenersPop);\n\nconst stackPush = () => {\n  const id = {};\n  ngMocksUniverse.global.set('reporter-stack-id', id);\n  const state: NgMocksStack = { id, level: 'runtime' };\n  stack.push(state);\n\n  for (const callback of listenersPush) {\n    callback(state, stack);\n  }\n};\nconst stackPop = () => {\n  const state = stack.pop();\n\n  // this code is actually needed for jest tests.\n  // istanbul ignore if\n  if (stack.length === 0) {\n    stack.push(state?.level === 'root' ? state : { ...stackRoot });\n  }\n\n  // istanbul ignore else\n  if (state && state.level !== 'root') {\n    for (const callback of listenersPop) {\n      callback(state, stack);\n    }\n  }\n\n  ngMocksUniverse.global.set('reporter-stack-id', stack[stack.length - 1].id);\n};\n\n// istanbul ignore next\nconst subscribePush = (callback: NgMocksStackCallback) => {\n  if (listenersPush.indexOf(callback)) {\n    listenersPush.push(callback);\n  }\n  if (stack.length > 0) {\n    callback(stack[stack.length - 1], stack);\n  }\n};\n\n// istanbul ignore next\nconst subscribePop = (callback: NgMocksStackCallback) => {\n  if (listenersPop.indexOf(callback) === -1) {\n    listenersPop.push(callback);\n  }\n};\n\n// istanbul ignore next\nconst unsubscribePush = (callback: NgMocksStackCallback) => {\n  const index = listenersPush.indexOf(callback);\n  if (index !== -1) {\n    listenersPush.splice(index, 1);\n  }\n};\n\n// istanbul ignore next\nconst unsubscribePop = (callback: NgMocksStackCallback) => {\n  const index = listenersPop.indexOf(callback);\n  if (index !== -1) {\n    listenersPop.splice(index, 1);\n  }\n};\n\nexport default {\n  current,\n  stackPop,\n  stackPush,\n  subscribePop,\n  subscribePush,\n  unsubscribePop,\n  unsubscribePush,\n};\n","import { MetadataOverride } from '@angular/core/testing';\n\nimport { flatten } from '../common/core.helpers';\nimport { NG_MOCKS, NG_MOCKS_OVERRIDES, NG_MOCKS_TOUCHES } from '../common/core.tokens';\nimport { AnyType } from '../common/core.types';\n\nexport default (\n  providers: any,\n): {\n  mocks?: Map<any, any>;\n  overrides?: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]>;\n  touches?: Set<any>;\n} => {\n  let mocks: Map<any, any> | undefined;\n  let overrides: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]> | undefined;\n  let touches: Set<any> | undefined;\n\n  for (const provide of flatten(providers || [])) {\n    if (typeof provide !== 'object') {\n      continue;\n    }\n    if (provide.provide === NG_MOCKS) {\n      mocks = provide.useValue;\n    }\n    if (provide.provide === NG_MOCKS_OVERRIDES) {\n      overrides = provide.useValue;\n    }\n    if (provide.provide === NG_MOCKS_TOUCHES) {\n      touches = provide.useValue;\n    }\n  }\n\n  return {\n    mocks,\n    overrides,\n    touches,\n  };\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport { AnyDeclaration } from './core.types';\nimport { isNgInjectionToken } from './func.is-ng-injection-token';\nimport { NgModuleWithProviders } from './func.is-ng-module-def-with-providers';\n\n/**\n * Returns how the class has been decorated.\n * It doesn't work well, because multi decorations and extensions of decorated classes can bring strange behavior.\n * Because of that, we simply take the last decoration as the expected, if the decorator is not Injectable.\n * Services have the lowest priority.\n *\n * @internal\n *\n * ```ts\n * getNgType(MockModule); // returns 'NgModule' | 'Component' | 'Directive' | 'Pipe' | 'Injectable'\n * ```\n */\nexport const getNgType = (\n  declaration: AnyDeclaration<any> | NgModuleWithProviders<any>,\n): 'NgModule' | 'Component' | 'Directive' | 'Pipe' | 'Injectable' | undefined => {\n  if (typeof declaration === 'string') {\n    return undefined;\n  }\n  if (isNgInjectionToken(declaration)) {\n    return 'Injectable';\n  }\n\n  const { decorators } = collectDeclarations(declaration);\n\n  for (let index = decorators.length - 1; index >= 0; index -= 1) {\n    if (decorators[index] === 'Injectable') {\n      continue;\n    }\n\n    return decorators[index];\n  }\n\n  if (decorators.length > 0) {\n    return 'Injectable';\n  }\n\n  return undefined;\n};\n","import { VERSION } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport { getNgType } from './func.get-ng-type';\n\n/**\n * Checks whether a class has been decorated with the standalone flag.\n */\nexport function isStandalone(declaration: any): boolean {\n  const type = getNgType(declaration);\n  if (!type || type === 'Injectable') {\n    return false;\n  }\n\n  // Handle Angular 19+ default standalone behavior\n  const declarations = collectDeclarations(declaration);\n  if (Number(VERSION.major) >= 19 && type !== 'NgModule' && declarations[type].standalone === undefined) {\n    return true;\n  }\n\n  return declarations[type].standalone === true;\n}\n","import { mapEntries } from './core.helpers';\n\nexport default class<K, V> {\n  protected stack: Array<Map<K, V>> = [];\n\n  public constructor() {\n    this.push();\n  }\n\n  public push() {\n    this.stack.push(new Map());\n  }\n\n  public pop(): Map<V, V> {\n    return this.stack.pop() ?? new Map();\n  }\n\n  public has(key: K): ReturnType<Map<K, V>['has']> {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      if (this.stack[i].has(key)) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  public get(key: K): ReturnType<Map<K, V>['get']> {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      if (this.stack[i].has(key)) {\n        return this.stack[i].get(key);\n      }\n    }\n\n    return undefined;\n  }\n\n  public set(key: K, value: V): this {\n    for (let i = this.stack.length - 1; i >= 0; i -= 1) {\n      this.stack[i].set(key, value);\n    }\n\n    return this;\n  }\n\n  public merge(resolutions: Map<K, V>): this {\n    for (const [key, value] of mapEntries(resolutions)) {\n      this.set(key, value);\n    }\n\n    return this;\n  }\n}\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport class MockBuilderStash {\n  protected data: Record<keyof any, any> = {};\n\n  public backup(): void {\n    this.data = {\n      builtDeclarations: ngMocksUniverse.builtDeclarations,\n      builtProviders: ngMocksUniverse.builtProviders,\n      cacheDeclarations: ngMocksUniverse.cacheDeclarations,\n      cacheProviders: ngMocksUniverse.cacheProviders,\n      config: ngMocksUniverse.config,\n      configInstance: ngMocksUniverse.configInstance,\n      flags: ngMocksUniverse.flags,\n      touches: ngMocksUniverse.touches,\n    };\n\n    ngMocksUniverse.builtDeclarations = new Map();\n    ngMocksUniverse.builtProviders = new Map();\n    ngMocksUniverse.cacheDeclarations = new Map();\n    ngMocksUniverse.cacheProviders = new Map();\n    ngMocksUniverse.config = new Map();\n    ngMocksUniverse.configInstance = new Map();\n    ngMocksUniverse.flags = new Set(coreConfig.flags);\n    ngMocksUniverse.touches = new Set();\n  }\n\n  public restore(): void {\n    for (const key of Object.keys(this.data)) {\n      (ngMocksUniverse as any)[key] = (this.data as any)[key];\n    }\n  }\n}\n","import { AnyType } from './core.types';\n\nexport default (declaration: any): undefined | AnyType<any> | string => {\n  if (!declaration || (typeof declaration !== 'object' && typeof declaration !== 'function')) {\n    return undefined;\n  }\n\n  return declaration.ɵprov?.providedIn ?? declaration.ngInjectableDef?.providedIn;\n};\n","import CoreDefStack from '../../common/core.def-stack';\nimport { extractDependency, flatten, mapValues } from '../../common/core.helpers';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport funcGetType from '../../common/func.get-type';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport helperResolveProvider from '../../mock-service/helper.resolve-provider';\n\nimport { BuilderData, NgMeta } from './types';\n\nexport default (ngModule: NgMeta, { providerDef, mockDef }: BuilderData, resolutions: CoreDefStack<any, any>): void => {\n  // Adding requested providers to test bed.\n  for (const provider of mapValues(providerDef)) {\n    ngModule.providers.push(provider);\n  }\n\n  // Analyzing providers.\n  for (const provider of flatten(ngModule.providers)) {\n    const provide = funcGetType(provider);\n    ngMocksUniverse.touches.add(provide);\n\n    if (provide !== provider && (provider as any).deps) {\n      extractDependency((provider as any).deps, ngMocksUniverse.config.get('ngMocksDeps'));\n    }\n  }\n\n  for (const def of mapValues(mockDef)) {\n    if (ngMocksUniverse.touches.has(def) || coreReflectProvidedIn(def) !== 'root') {\n      continue;\n    }\n\n    ngModule.providers.push(helperResolveProvider(def, resolutions));\n    ngMocksUniverse.touches.add(def);\n  }\n};\n","import { getTestBed } from '@angular/core/testing';\n\nimport { flatten } from '../../common/core.helpers';\nimport funcGetType from '../../common/func.get-type';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default () => {\n  const testBed = getTestBed();\n  // istanbul ignore else\n  if (testBed.ngModule) {\n    for (const def of flatten<any>(testBed.ngModule)) {\n      ngMocksUniverse.touches.add(funcGetType(def));\n    }\n  }\n};\n","export default (def: any): void => {\n  if (!def) {\n    throw new Error(\n      [\n        'undefined / null has been passed into ng-mocks as a declaration / provider.',\n        'Please ensure that the current test file has correct imports:',\n        'imported files exist and imported declarations have been exported in the file.',\n      ].join(' '),\n    );\n  }\n};\n","export default (def: any): boolean => {\n  if (!def) {\n    return false;\n  }\n\n  if (typeof def !== 'function' && typeof def !== 'object') {\n    return false;\n  }\n\n  if (def._isMockFunction && def.mockName && def.__annotations__) {\n    return true;\n  }\n\n  return false;\n};\n","import funcGetName from './func.get-name';\nimport funcIsJestMock from './func.is-jest-mock';\n\nexport default (def: any): void => {\n  if (funcIsJestMock(def)) {\n    throw new Error(\n      [\n        `ng-mocks got ${funcGetName(def)} which has been already mocked by jest.mock().`,\n        'It is not possible to produce correct mocks for it, because jest.mock() removes Angular decorators.',\n        `To fix this, please avoid jest.mock() on the file which exports ${funcGetName(\n          def,\n        )} or add jest.dontMock() on it.`,\n        'The same should be done for all related dependencies.',\n      ].join(' '),\n    );\n  }\n};\n","import funcGetName from './func.get-name';\n\nexport default (def: any): void => {\n  throw new Error(\n    [\n      `${funcGetName(def)} declaration has been passed into ng-mocks without Angular decorators.`,\n      'Therefore, it cannot be properly handled.',\n      'Highly likely,',\n      typeof jest === 'undefined' ? '' : /* istanbul ignore next */ 'jest.mock() has been used on its file, or',\n      'ng-mocks is imported in production code, or got a class without Angular decoration.',\n      'Otherwise, please create an issue on github: https://github.com/help-me-mom/ng-mocks/issues/new?title=False%20positive%20ng-mocks%20not%20in%20JIT.',\n      'Thank you in advance for support.',\n    ].join(' '),\n  );\n};\n","import errorEmptyDef from './error.empty-def';\nimport errorJestMock from './error.jest-mock';\nimport errorMissingDecorators from './error.missing-decorators';\n\nexport default (callback: any) => (def: any) => {\n  errorEmptyDef(def);\n\n  try {\n    return callback(def);\n  } catch {\n    errorJestMock(def);\n    errorMissingDecorators(def);\n  }\n};\n","import { Component, Directive, NgModule } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (\n  def: any,\n): Directive &\n  Partial<Component> &\n  NgModule & {\n    hostBindings?: Array<[string, any]>;\n    hostListeners?: Array<[string, any, any]>;\n    imports?: any[];\n    standalone?: boolean;\n  } =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.Component) {\n      return declaration.Component;\n    }\n    if (declaration.Directive) {\n      return declaration.Directive;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import { NgModule } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (def: any): NgModule =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.NgModule) {\n      return declaration.NgModule;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import coreReflectDirectiveResolve from './core.reflect.directive-resolve';\nimport coreReflectModuleResolve from './core.reflect.module-resolve';\nimport { isNgDef } from './func.is-ng-def';\n\nexport default (value: any): any => {\n  if (isNgDef(value, 'c')) {\n    return coreReflectDirectiveResolve(value);\n  }\n  if (isNgDef(value, 'd')) {\n    return coreReflectDirectiveResolve(value);\n  }\n  if (isNgDef(value, 'm')) {\n    return coreReflectModuleResolve(value);\n  }\n\n  return undefined;\n};\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { AnyType, Type } from './core.types';\n\n/**\n * Returns the original class of a mock module class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockModule); // returns RealModule\n * getSourceOfMock(RealModule); // returns RealModule\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedModule<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock component class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockComponent); // returns RealComponent\n * getSourceOfMock(RealComponent); // returns RealComponent\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedComponent<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock directive class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockDirective); // returns RealDirective\n * getSourceOfMock(RealDirective); // returns RealDirective\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedDirective<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock pipe class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockPipe); // returns RealPipe\n * getSourceOfMock(RealPipe); // returns RealPipe\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<MockedPipe<T>>): Type<T>;\n\n/**\n * Returns the original class of a mock class.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getSourceOfMock\n *\n * ```ts\n * getSourceOfMock(MockClass); // returns RealClass\n * getSourceOfMock(RealClass); // returns RealClass\n * ```\n */\nexport function getSourceOfMock<T>(declaration: AnyType<T>): Type<T>;\n\nexport function getSourceOfMock<T>(declaration: any): Type<T> {\n  return typeof declaration === 'function' && declaration.mockOf ? declaration.mockOf : declaration;\n}\n","import { getSourceOfMock } from '../common/func.get-source-of-mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (instanceDef: any, ngModuleDef?: any) => {\n  const instance = getSourceOfMock(instanceDef);\n  const configInstance = ngMocksUniverse.configInstance.get(instance) ?? { __set: true };\n  if (!configInstance.exported) {\n    configInstance.exported = new Set();\n  }\n  if (ngModuleDef) {\n    configInstance.exported.add(getSourceOfMock(ngModuleDef));\n  }\n  if (configInstance.__set) {\n    configInstance.__set = undefined;\n    ngMocksUniverse.configInstance.set(instance, configInstance);\n  }\n};\n","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"AbstractControl\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.AbstractControl), [\"DefaultValueAccessor\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.DefaultValueAccessor), [\"FormControl\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.FormControl), [\"FormControlDirective\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.FormControlDirective), [\"NG_ASYNC_VALIDATORS\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.NG_ASYNC_VALIDATORS), [\"NG_VALIDATORS\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.NG_VALIDATORS), [\"NG_VALUE_ACCESSOR\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.NG_VALUE_ACCESSOR), [\"NgControl\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.NgControl), [\"NgModel\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__.NgModel) });","import * as module from '@angular/forms';\n\nconst AbstractControl = module.AbstractControl;\nconst DefaultValueAccessor = module.DefaultValueAccessor;\nconst FormControl = module.FormControl;\nconst FormControlDirective = module.FormControlDirective;\nconst NG_ASYNC_VALIDATORS = module.NG_ASYNC_VALIDATORS;\nconst NG_VALIDATORS = module.NG_VALIDATORS;\nconst NG_VALUE_ACCESSOR = module.NG_VALUE_ACCESSOR;\nconst NgControl = module.NgControl;\nconst NgModel = module.NgModel;\n\nexport default {\n  AbstractControl,\n  DefaultValueAccessor,\n  FormControl,\n  FormControlDirective,\n  NG_ASYNC_VALIDATORS,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  NgControl,\n  NgModel,\n};\n","import { Injector, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport { MockConfig } from './mock';\n\nexport default <T>(\n  value: T,\n): value is T &\n  MockConfig & {\n    __ngMocksInjector?: Injector;\n    __template?: TemplateRef<any>;\n    __vcr?: ViewContainerRef;\n  } => {\n  return value && typeof value === 'object' && !!(value as any).__ngMocks;\n};\n","import { AsyncValidator, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';\n\nimport { AnyType } from './core.types';\nimport { MockControlValueAccessor, MockValidator } from './mock-control-value-accessor';\n\nconst applyProxy = (proxy: any, method: string, value: any, storage?: string) => {\n  if (proxy.instance && storage) {\n    proxy.instance[storage] = value;\n  }\n  if (proxy.instance && proxy.instance[method]) {\n    return proxy.instance[method](value);\n  }\n};\n\nexport class MockControlValueAccessorProxy implements ControlValueAccessor {\n  public instance?: Partial<MockControlValueAccessor & ControlValueAccessor>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnChange(fn: any): void {\n    applyProxy(this, 'registerOnChange', fn, '__simulateChange');\n  }\n\n  public registerOnTouched(fn: any): void {\n    applyProxy(this, 'registerOnTouched', fn, '__simulateTouch');\n  }\n\n  public setDisabledState(isDisabled: boolean): void {\n    applyProxy(this, 'setDisabledState', isDisabled);\n  }\n\n  public writeValue(value: any): void {\n    applyProxy(this, 'writeValue', value);\n  }\n}\n\nexport class MockValidatorProxy implements Validator {\n  public instance?: Partial<MockValidator & Validator>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnValidatorChange(fn: any): void {\n    applyProxy(this, 'registerOnValidatorChange', fn, '__simulateValidatorChange');\n  }\n\n  public validate(control: any): ValidationErrors | null {\n    if (this.instance && this.instance.validate) {\n      return this.instance.validate(control);\n    }\n\n    return null;\n  }\n}\n\nexport class MockAsyncValidatorProxy implements AsyncValidator {\n  public instance?: Partial<MockValidator & AsyncValidator>;\n\n  public constructor(public readonly target?: AnyType<any>) {}\n\n  public registerOnValidatorChange(fn: any): void {\n    applyProxy(this, 'registerOnValidatorChange', fn, '__simulateValidatorChange');\n  }\n\n  public validate(control: any): any {\n    if (this.instance && this.instance.validate) {\n      const result: any = this.instance.validate(control);\n\n      return result === undefined ? Promise.resolve(null) : result;\n    }\n\n    return Promise.resolve(null);\n  }\n}\n","import { EventEmitter, Injector, Optional, PipeTransform, Self } from '@angular/core';\n\nimport { IMockBuilderConfig } from '../mock-builder/types';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport mockInstanceApply from '../mock-instance/mock-instance-apply';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport coreDefineProperty from './core.define-property';\nimport coreForm from './core.form';\nimport { mapValues } from './core.helpers';\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoParse from './func.directive-io-parse';\nimport funcIsMock from './func.is-mock';\nimport { MockControlValueAccessorProxy } from './mock-control-value-accessor-proxy';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst setValueAccessor = (instance: any, ngControl?: any) => {\n  if (ngControl && !ngControl.valueAccessor && instance.__ngMocksConfig.setControlValueAccessor) {\n    try {\n      ngControl.valueAccessor = new MockControlValueAccessorProxy(instance.__ngMocksCtor);\n    } catch {\n      // nothing to do.\n    }\n  }\n};\n\n// connecting to NG_VALUE_ACCESSOR\nconst installValueAccessor = (ngControl: any, instance: any) => {\n  if (!ngControl.valueAccessor.instance && ngControl.valueAccessor.target === instance.__ngMocksCtor) {\n    ngControl.valueAccessor.instance = instance;\n    helperMockService.mock(instance, 'registerOnChange');\n    helperMockService.mock(instance, 'registerOnTouched');\n    helperMockService.mock(instance, 'setDisabledState');\n    helperMockService.mock(instance, 'writeValue');\n    instance.__ngMocksConfig.isControlValueAccessor = true;\n  }\n};\n\n// connecting to NG_VALIDATORS\n// connecting to NG_ASYNC_VALIDATORS\nconst installValidator = (validators: any[], instance: any) => {\n  for (const validator of validators) {\n    if (!validator.instance && validator.target === instance.__ngMocksCtor) {\n      validator.instance = instance;\n      helperMockService.mock(instance, 'registerOnValidatorChange');\n      helperMockService.mock(instance, 'validate');\n      instance.__ngMocksConfig.isValidator = true;\n    }\n  }\n};\n\nconst applyNgValueAccessor = (instance: any, ngControl: any) => {\n  setValueAccessor(instance, ngControl);\n\n  try {\n    // istanbul ignore else\n    if (ngControl) {\n      installValueAccessor(ngControl, instance);\n      installValidator(ngControl._rawValidators, instance);\n      installValidator(ngControl._rawAsyncValidators, instance);\n    }\n  } catch {\n    // nothing to do.\n  }\n};\n\nconst applyOutputs = (instance: MockConfig & Record<keyof any, any>) => {\n  const mockOutputs = [];\n  for (const output of instance.__ngMocksConfig.outputs || []) {\n    mockOutputs.push(funcDirectiveIoParse(output).name);\n  }\n\n  for (const output of mockOutputs) {\n    if (instance[output] || Object.getOwnPropertyDescriptor(instance, output)) {\n      continue;\n    }\n    instance[output] = new EventEmitter<any>();\n  }\n};\n\nconst applyPrototype = (instance: Mock, prototype: AnyType<any>) => {\n  for (const prop of [\n    ...helperMockService.extractMethodsFromPrototype(prototype),\n    ...helperMockService.extractPropertiesFromPrototype(prototype),\n  ]) {\n    const descriptor = helperMockService.extractPropertyDescriptor(prototype, prop);\n    helperMockService.definePropertyDescriptor(instance, prop, descriptor);\n  }\n};\n\nconst applyMethods = (instance: Mock & Record<keyof any, any>, prototype: AnyType<any>) => {\n  for (const method of helperMockService.extractMethodsFromPrototype(prototype)) {\n    if (instance[method] || Object.getOwnPropertyDescriptor(instance, method)) {\n      continue;\n    }\n    helperMockService.mock(instance, method);\n  }\n};\n\nconst applyProps = (instance: Mock & Record<keyof any, any>, prototype: AnyType<any>) => {\n  for (const prop of helperMockService.extractPropertiesFromPrototype(prototype)) {\n    if (instance[prop] || Object.getOwnPropertyDescriptor(instance, prop)) {\n      continue;\n    }\n    helperMockService.mock(instance, prop, 'get');\n    helperMockService.mock(instance, prop, 'set');\n  }\n};\n\nexport type ngMocksMockConfig = {\n  config?: IMockBuilderConfig;\n  hostBindings?: string[];\n  hostListeners?: string[];\n  init?: (instance: any) => void;\n  isControlValueAccessor?: boolean;\n  isValidator?: boolean;\n  outputs?: Array<DirectiveIo>;\n  queryScanKeys?: string[];\n  setControlValueAccessor?: boolean;\n  transform?: PipeTransform['transform'];\n};\n\nconst applyOverrides = (instance: any, mockOf: any, injector?: Injector): void => {\n  const configGlobal: Set<any> | undefined = ngMocksUniverse.getOverrides().get(mockOf);\n  const callbacks = configGlobal ? mapValues(configGlobal) : [];\n  if (instance.__ngMocksConfig.init) {\n    callbacks.push(instance.__ngMocksConfig.init);\n  }\n  callbacks.push(...mockInstanceApply(mockOf));\n\n  for (const callback of callbacks) {\n    const overrides = callback(instance, injector);\n    if (!overrides) {\n      continue;\n    }\n    mockHelperStub(instance, overrides);\n  }\n};\n\nexport interface MockConfig {\n  __ngMocksConfig: ngMocksMockConfig;\n}\n\n/**\n * Mock class is the base class for each mock.\n * Usually, it should not be used directly.\n */\nexport class Mock {\n  protected __ngMocksConfig!: ngMocksMockConfig;\n\n  public constructor(\n    injector: Injector | null = null,\n    ngControl: any | null = null, // NgControl\n  ) {\n    const mockOf = (this.constructor as any).mockOf;\n    coreDefineProperty(this, '__ngMocks', true);\n    coreDefineProperty(this, '__ngMocksInjector', injector);\n    coreDefineProperty(this, '__ngMocksCtor', this.constructor);\n    for (const key of this.__ngMocksConfig.queryScanKeys || /* istanbul ignore next */ []) {\n      coreDefineProperty(this, `__ngMocksVcr_${key}`, undefined);\n    }\n    for (const key of this.__ngMocksConfig.hostBindings || /* istanbul ignore next */ []) {\n      helperMockService.mock(this, key, 'get');\n      helperMockService.mock(this, key, 'set');\n    }\n    for (const key of this.__ngMocksConfig.hostListeners || /* istanbul ignore next */ []) {\n      helperMockService.mock(this, key);\n    }\n\n    // istanbul ignore else\n    if (funcIsMock(this)) {\n      applyNgValueAccessor(this, ngControl);\n      applyOutputs(this);\n      applyPrototype(this, Object.getPrototypeOf(this));\n      applyMethods(this, mockOf.prototype);\n      applyProps(this, mockOf.prototype);\n    }\n\n    // and faking prototype\n    Object.setPrototypeOf(this, mockOf.prototype);\n\n    applyOverrides(this, mockOf, injector ?? undefined);\n  }\n}\n\ncoreDefineProperty(Mock, 'parameters', [\n  [Injector, new Optional()],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n]);\n","import { Mock } from './mock';\n\n/**\n * LegacyControlValueAccessor was used to be a way to manipulate a mock ControlValueAccessor.\n *\n * @deprecated use isMockControlValueAccessor or isMockValidator instead (removing in A13)\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport class LegacyControlValueAccessor extends Mock {\n  /**\n   * @deprecated use isMockControlValueAccessor instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n   */\n  public __simulateChange(value: any): void;\n  // istanbul ignore next\n  public __simulateChange() {\n    // nothing to do.\n  }\n\n  // istanbul ignore next\n  /**\n   * @deprecated use isMockControlValueAccessor instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n   */\n  public __simulateTouch() {\n    // nothing to do.\n  }\n\n  // istanbul ignore next\n  /**\n   * @deprecated use isMockValidator instead (removing in A13)\n   * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n   */\n  public __simulateValidatorChange() {\n    // nothing to do.\n  }\n}\n\n/**\n * MockControlValueAccessor exposes access to a mock ControlValueAccessor.\n * It should be used in a combination with isMockControlValueAccessor.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n */\nexport interface MockControlValueAccessor {\n  /**\n   * It simulates an external change of the value.\n   * Please consider usage of ngMocks.change().\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n   */\n  __simulateChange(value: any): void;\n\n  /**\n   * It simulates an external touch.\n   * Please consider usage of ngMocks.touch().\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n   */\n  __simulateTouch(): void;\n}\n\n/**\n * MockValidator exposes access to a mock Validator.\n * It should be used in a combination with isMockValidator.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport interface MockValidator {\n  /**\n   * it simulates an external validation change.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/mock-form-controls\n   */\n  __simulateValidatorChange(): void;\n}\n","import { Input } from '@angular/core';\n\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoBuild from './func.directive-io-build';\nimport funcDirectiveIoParse from './func.directive-io-parse';\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, inputs?: Array<DirectiveIo>, exclude?: string[]) => {\n  // istanbul ignore else\n  if (inputs) {\n    for (const input of inputs) {\n      const { name, alias, required } = funcDirectiveIoParse(input);\n      if (exclude && exclude.indexOf(name) !== -1) {\n        continue;\n      }\n      Input(funcDirectiveIoBuild({ name, alias, required }, true) as never)(cls.prototype, name);\n    }\n  }\n};\n","import coreDefineProperty from './core.define-property';\nimport { AnyType } from './core.types';\nimport funcGetName from './func.get-name';\nimport { ngMocksMockConfig } from './mock';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nexport default (mock: AnyType<any>, source: AnyType<any>, configInput: ngMocksMockConfig = {}): void => {\n  coreDefineProperty(mock, 'mockOf', source);\n  coreDefineProperty(mock, 'nameConstructor', funcGetName(mock));\n  coreDefineProperty(mock, 'name', `MockOf${funcGetName(source)}`, true);\n  const config = ngMocksUniverse.getConfigMock().has(source)\n    ? {\n        ...configInput,\n        config: {\n          ...ngMocksUniverse.getConfigMock().get(source),\n          ...configInput.config,\n        },\n      }\n    : configInput;\n  coreDefineProperty(mock.prototype, '__ngMocksConfig', config);\n};\n","import { Output } from '@angular/core';\n\nimport { AnyType, DirectiveIo } from './core.types';\nimport funcDirectiveIoBuild from './func.directive-io-build';\nimport funcDirectiveIoParse from './func.directive-io-parse';\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, outputs?: Array<DirectiveIo>) => {\n  // istanbul ignore else\n  if (outputs) {\n    for (const output of outputs) {\n      const { name, alias, required } = funcDirectiveIoParse(output);\n      Output(funcDirectiveIoBuild({ name, alias, required }, true) as never)(cls.prototype, name);\n    }\n  }\n};\n","import { ContentChild, ContentChildren, Query, ViewChild, ViewChildren, ViewContainerRef } from '@angular/core';\n\nimport { AnyType } from './core.types';\n\nconst map: any = {\n  ContentChild,\n  ContentChildren,\n  ViewChild,\n  ViewChildren,\n};\n\nconst isInternalKey = (key: string): boolean => {\n  return key.indexOf('__mock') === 0;\n};\n\nconst cloneVcrQuery = (query: Query & { ngMetadataName?: string }) => ({\n  ...query,\n  ngMetadataName: query.ngMetadataName,\n  read: ViewContainerRef,\n});\n\nconst generateFinalQueries = (queries: {\n  [key: string]: Query;\n}): [Array<[string, Query & { ngMetadataName?: string }]>, string[]] => {\n  const final: Array<[string, Query & { ngMetadataName?: string }]> = [];\n  const scanKeys: string[] = [];\n\n  for (const key of Object.keys(queries)) {\n    const query: Query & { ngMetadataName?: string } = queries[key];\n    final.push([key, query]);\n\n    if (!query.isViewQuery && !isInternalKey(key)) {\n      scanKeys.push(key);\n      final.push([`__ngMocksVcr_${key}`, cloneVcrQuery(query)]);\n    }\n  }\n\n  return [final, scanKeys];\n};\n\n// Looks like an A9 bug, that queries from @Component are not processed.\n// Also, we have to pass prototype, not the class.\n// The same issue happens with outputs, but time to time\n// (when I restart tests with refreshing browser manually).\n// https://github.com/help-me-mom/ng-mocks/issues/109\nexport default (cls: AnyType<any>, queries?: { [key: string]: Query }): string[] => {\n  // istanbul ignore if\n  if (!queries) {\n    return [];\n  }\n  const [final, keys] = generateFinalQueries(queries);\n\n  for (const [key, query] of final) {\n    // istanbul ignore else\n    if (query.ngMetadataName) {\n      const decorator = map[query.ngMetadataName];\n      decorator(query.selector, query)(cls.prototype, key);\n    }\n  }\n\n  return keys;\n};\n","import { AnyType } from '../common/core.types';\n\nexport default (provide: AnyType<any>, useExisting: AnyType<any>) => ({\n  provide,\n  useExisting,\n});\n","import { AnyType } from '../common/core.types';\n\nexport default (provide: AnyType<any>, useFactory: any) => ({\n  multi: true,\n  provide,\n  useFactory,\n});\n","import { Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport coreForm from '../common/core.form';\nimport { flatten } from '../common/core.helpers';\nimport { AnyType } from '../common/core.types';\nimport funcExtractForwardRef from '../common/func.extract-forward-ref';\nimport funcGetType from '../common/func.get-type';\nimport {\n  MockAsyncValidatorProxy,\n  MockControlValueAccessorProxy,\n  MockValidatorProxy,\n} from '../common/mock-control-value-accessor-proxy';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport toExistingProvider from './to-existing-provider';\nimport toFactoryProvider from './to-factory-provider';\n\nconst processTokens = (mockType: AnyType<any>, provider: any) => {\n  const provide = funcGetType(provider);\n  if (coreForm.NG_VALIDATORS && provide === coreForm.NG_VALIDATORS) {\n    return toFactoryProvider(provide, () => new MockValidatorProxy(mockType));\n  }\n  if (coreForm.NG_ASYNC_VALIDATORS && provide === coreForm.NG_ASYNC_VALIDATORS) {\n    return toFactoryProvider(provide, () => new MockAsyncValidatorProxy(mockType));\n  }\n  if (coreForm.NG_VALUE_ACCESSOR && provide === coreForm.NG_VALUE_ACCESSOR) {\n    return toFactoryProvider(provide, () => new MockControlValueAccessorProxy(mockType));\n  }\n\n  return undefined;\n};\n\nconst processOwnUseExisting = (sourceType: AnyType<any>, mockType: AnyType<any>, provider: any) => {\n  const provide = funcGetType(provider);\n\n  // Check tests/issue-302/test.spec.ts\n  if (provide === coreForm.NgControl || provide === coreForm.FormControlDirective) {\n    return undefined;\n  }\n\n  if (provider !== provide && funcExtractForwardRef(provider.useExisting) === sourceType) {\n    return toExistingProvider(provide, mockType);\n  }\n\n  return undefined;\n};\n\nconst processProvider = (\n  sourceType: AnyType<any>,\n  mockType: AnyType<any>,\n  provider: any,\n  resolutions: CoreDefStack<any, any>,\n): any => {\n  const token = processTokens(mockType, provider);\n  if (token) {\n    return token;\n  }\n\n  const ownUseExisting = processOwnUseExisting(sourceType, mockType, provider);\n  if (ownUseExisting) {\n    return ownUseExisting;\n  }\n\n  return helperMockService.resolveProvider(provider, resolutions);\n};\n\nexport default (\n  sourceType: AnyType<any>,\n  mockType: AnyType<any>,\n  providers: any[],\n  resolutions: CoreDefStack<any, any>,\n): {\n  providers: Provider[];\n  setControlValueAccessor?: boolean;\n} => {\n  const result: Provider[] = [];\n  let setControlValueAccessor: boolean | undefined;\n\n  for (const provider of flatten(providers || /* istanbul ignore next */ [])) {\n    const provide = funcGetType(provider);\n    if (provide === coreForm.NG_VALUE_ACCESSOR) {\n      setControlValueAccessor = false;\n    }\n    const mock = processProvider(sourceType, mockType, provider, resolutions);\n    if (mock) {\n      result.push(mock);\n    }\n  }\n\n  return {\n    providers: result,\n    setControlValueAccessor,\n  };\n};\n","import { Component, Directive, NgModule, ViewChild } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { AnyType, DirectiveIo } from '../common/core.types';\nimport decorateInputs from '../common/decorate.inputs';\nimport decorateMock from '../common/decorate.mock';\nimport decorateOutputs from '../common/decorate.outputs';\nimport decorateQueries from '../common/decorate.queries';\nimport { ngMocksMockConfig } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport mockNgDef from '../mock-module/mock-ng-def';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport cloneProviders from './clone-providers';\nimport toExistingProvider from './to-existing-provider';\n\nconst buildConfig = (\n  source: AnyType<any>,\n  meta: {\n    inputs?: Array<DirectiveIo>;\n    outputs?: Array<DirectiveIo>;\n    providers?: NgModule['providers'];\n    queries?: Record<string, ViewChild>;\n  },\n  setControlValueAccessor: boolean,\n) => {\n  return {\n    config: ngMocksUniverse.config.get(source),\n    outputs: meta.outputs,\n    queryScanKeys: [],\n    setControlValueAccessor: setControlValueAccessor,\n  };\n};\n\nexport default <T extends Component & Directive>(\n  source: AnyType<any>,\n  mock: AnyType<any>,\n  meta: Component &\n    Directive &\n    NgModule & {\n      hostBindings?: Array<[string, any]>;\n      hostListeners?: Array<[string, any, any]>;\n      hostDirectives?: Array<AnyType<any> | { directive: AnyType<any> }>;\n      imports?: any[];\n      standalone?: boolean;\n    },\n  params: T,\n): Component & Directive => {\n  const hasResolver = ngMocksUniverse.config.has('mockNgDefResolver');\n  if (!hasResolver) {\n    ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  }\n\n  const options: T & { imports?: any[]; hostDirectives?: any[]; standalone?: boolean } = {\n    ...params,\n  };\n\n  if (meta.exportAs !== undefined) {\n    options.exportAs = meta.exportAs;\n  }\n  if (meta.selector !== undefined) {\n    options.selector = meta.selector;\n  }\n  if (meta.standalone !== undefined) {\n    options.standalone = meta.standalone;\n  }\n\n  if (meta.standalone && meta.imports) {\n    const [, { imports }] = mockNgDef({ imports: meta.imports, skipExports: true });\n    if (imports?.length) {\n      options.imports = imports as never;\n    }\n  }\n\n  if (meta.hostDirectives) {\n    const [, { hostDirectives }] = mockNgDef({ hostDirectives: meta.hostDirectives, skipExports: true });\n    if (hostDirectives?.length) {\n      options.hostDirectives = hostDirectives;\n    }\n  }\n\n  const { setControlValueAccessor, providers } = cloneProviders(\n    source,\n    mock,\n    meta.providers || [],\n    ngMocksUniverse.config.get('mockNgDefResolver'),\n  );\n  providers.push(toExistingProvider(source, mock));\n  options.providers = providers;\n\n  const { providers: viewProviders } = cloneProviders(\n    source,\n    mock,\n    meta.viewProviders || [],\n    ngMocksUniverse.config.get('mockNgDefResolver'),\n  );\n  if (viewProviders.length > 0) {\n    options.viewProviders = viewProviders;\n  }\n\n  const config: ngMocksMockConfig = buildConfig(\n    source,\n    meta,\n    setControlValueAccessor ??\n      helperMockService.extractMethodsFromPrototype(source.prototype).indexOf('writeValue') !== -1,\n  );\n  decorateMock(mock, source, config);\n\n  // istanbul ignore else\n  if (meta.queries) {\n    decorateInputs(mock, meta.inputs, Object.keys(meta.queries));\n  }\n  decorateOutputs(mock, meta.outputs);\n  config.queryScanKeys = decorateQueries(mock, meta.queries);\n\n  config.hostBindings = [];\n  for (const [key] of meta.hostBindings || /* istanbul ignore next */ []) {\n    // mock declarations should not have side effects based on host bindings.\n    // HostBinding(...args)(mock.prototype, key);\n    if (config.hostBindings.indexOf(key) === -1) {\n      config.hostBindings.push(key);\n    }\n  }\n\n  config.hostListeners = [];\n  for (const [key] of meta.hostListeners || /* istanbul ignore next */ []) {\n    // mock declarations should not have side effects based on host bindings.\n    // HostListener(...args)(mock.prototype, key);\n    if (config.hostListeners.indexOf(key) === -1) {\n      config.hostListeners.push(key);\n    }\n  }\n\n  if (!hasResolver) {\n    ngMocksUniverse.config.delete('mockNgDefResolver');\n  }\n\n  return options;\n};\n","import funcGetName from './func.get-name';\nimport { isNgDef } from './func.is-ng-def';\n\nconst getType = (value: any): string =>\n  isNgDef(value, 'p')\n    ? 'pipe'\n    : isNgDef(value, 'd')\n      ? 'directive'\n      : isNgDef(value, 'c')\n        ? 'component'\n        : isNgDef(value, 'm')\n          ? 'module'\n          : isNgDef(value, 'i')\n            ? 'service'\n            : isNgDef(value, 't')\n              ? 'token'\n              : '';\n\nexport default (value: any, funcName: string) => {\n  if (value === undefined || value === null) {\n    throw new Error(`null / undefined has been passed into ${funcName}. Please check that its import is correct.`);\n  }\n\n  if (funcName === 'MockPipe' && isNgDef(value, 'p')) {\n    return;\n  }\n  if (funcName === 'MockDirective' && isNgDef(value, 'd')) {\n    return;\n  }\n  if (funcName === 'MockComponent' && isNgDef(value, 'c')) {\n    return;\n  }\n  if (funcName === 'MockModule' && isNgDef(value, 'm')) {\n    return;\n  }\n\n  const type = getType(value);\n\n  if (type && funcName === 'MockPipe') {\n    throw new Error(`${funcName} accepts pipes, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockDirective') {\n    throw new Error(`${funcName} accepts directives, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockComponent') {\n    throw new Error(`${funcName} accepts components, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n  if (type && funcName === 'MockModule') {\n    throw new Error(`${funcName} accepts modules, whereas ${funcGetName(value)} is a ${type}.`);\n  }\n};\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { AnyType, Type } from './core.types';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * isMockNgDef verifies whether a class is a mock component class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockComponent, 'c'); // returns true\n * isMockNgDef(RealComponent, 'c'); // returns false\n * isMockNgDef(ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(component: AnyType<T>, ngType: 'c'): component is Type<MockedComponent<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock directive class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockDirective, 'd'); // returns true\n * isMockNgDef(RealDirective, 'd'); // returns false\n * isMockNgDef(ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(directive: AnyType<T>, ngType: 'd'): directive is Type<MockedDirective<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock pipe class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockPipe, 'p'); // returns true\n * isMockNgDef(RealPipe, 'p'); // returns false\n * isMockNgDef(ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(pipe: AnyType<T>, ngType: 'p'): pipe is Type<MockedPipe<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock module class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockModule, 'm'); // returns true\n * isMockNgDef(RealModule, 'm'); // returns false\n * isMockNgDef(ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockNgDef<T>(module: AnyType<T>, ngType: 'm'): module is Type<MockedModule<T>>;\n\n/**\n * isMockNgDef verifies whether a class is a mock class.\n *\n * @internal\n *\n * ```ts\n * isMockNgDef(MockComponent); // returns true\n * isMockNgDef(RealModule); // returns false\n * isMockNgDef(ArbitraryClass); // returns false\n * ```\n */\nexport function isMockNgDef<T>(module: Type<T>): module is Type<T>;\n\nexport function isMockNgDef<TComponent>(\n  component: AnyType<TComponent> & { mockOf?: any },\n  type?: 'c' | 'd' | 'p' | 'm',\n): component is Type<TComponent> {\n  if (!(component as any).mockOf) {\n    return false;\n  }\n  if (!type) {\n    return true;\n  }\n\n  return isNgDef(component.mockOf, type as never);\n}\n","import { ComponentFixture, getTestBed } from '@angular/core/testing';\n\nexport default () => {\n  const fixtures: Array<ComponentFixture<any>> = (getTestBed() as any)._activeFixtures;\n\n  return fixtures[fixtures.length - 1];\n};\n","import { NG_MOCKS } from '../common/core.tokens';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport funcGetLastFixture from '../mock-helper/func.get-last-fixture';\n\nexport default (declaration: any) => {\n  let result: any;\n\n  try {\n    result = funcGetLastFixture().debugElement.injector.get(NG_MOCKS).get(declaration);\n  } catch {\n    // nothing to do.\n  }\n\n  if (!result) {\n    result = ngMocksUniverse.cacheDeclarations.get(declaration);\n  }\n\n  if (declaration.__ngMocksResolutions && ngMocksUniverse.config.has('mockNgDefResolver')) {\n    ngMocksUniverse.config.get('mockNgDefResolver').merge(declaration.__ngMocksResolutions);\n  }\n\n  return result;\n};\n","import { extendClass } from '../common/core.helpers';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport returnCachedMock from './return-cached-mock';\n\nexport default (def: any, type: any, func: string, cacheFlag: string, base: any, decorator: any) => {\n  funcImportExists(def, func);\n\n  if (isMockNgDef(def, type)) {\n    return def;\n  }\n\n  if (ngMocksUniverse.flags.has(cacheFlag) && ngMocksUniverse.cacheDeclarations.has(def)) {\n    return returnCachedMock(def);\n  }\n\n  const hasNgMocksDepsResolution = ngMocksUniverse.config.has('ngMocksDepsResolution');\n  if (!hasNgMocksDepsResolution) {\n    ngMocksUniverse.config.set('ngMocksDepsResolution', new Map());\n  }\n\n  const mock = extendClass(base);\n  decorator(def, mock);\n\n  // istanbul ignore else\n  if (ngMocksUniverse.flags.has(cacheFlag)) {\n    ngMocksUniverse.cacheDeclarations.set(def, mock);\n  }\n\n  if (!hasNgMocksDepsResolution) {\n    ngMocksUniverse.config.delete('ngMocksDepsResolution');\n  }\n\n  return mock as any;\n};\n","import { Query, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core';\n\nconst vcrArgs: any = { read: ViewContainerRef, static: false };\nconst trArgs: any = { read: TemplateRef, static: false };\n\nconst viewChildTemplate = (selector: string, key: string): string => {\n  const content = `<div data-${key}=\"${selector}\"><ng-template #${key}_${selector}></ng-template></div>`;\n\n  return `<ng-template #ngIf_${key}_${selector}>${content}</ng-template>`;\n};\n\nconst isTemplateRefQuery = (query: Query): boolean => {\n  if (query.isViewQuery) {\n    return false; // ignoring all internal @ViewChild\n  }\n  if (query.read && query.read !== TemplateRef) {\n    return false; // ignoring read of instances\n  }\n  if (typeof query.selector !== 'string' && !query.read) {\n    return false; // ignoring class selectors if they do not read TemplateRef\n  }\n\n  return true;\n};\n\nexport default (queries?: Record<keyof any, any>): string => {\n  const parts = ['<ng-content></ng-content>'];\n  // istanbul ignore if\n  if (!queries) {\n    return parts.join('');\n  }\n\n  for (const key of Object.keys(queries)) {\n    const query: Query = queries[key];\n    if (key.indexOf('__mock') === 0) {\n      continue;\n    }\n    if (!isTemplateRefQuery(query)) {\n      continue;\n    }\n    if (typeof query.selector === 'string') {\n      const selector = query.selector.replace(new RegExp('\\\\W', 'mg'), '_');\n      queries[`__vcrIf_key_${selector}`] = new ViewChild(`ngIf_key_${selector}`, vcrArgs);\n      queries[`__trIf_key_${selector}`] = new ViewChild(`ngIf_key_${selector}`, trArgs);\n      queries[`__mockView_key_${selector}`] = new ViewChild(`key_${selector}`, vcrArgs);\n      queries[`__mockTpl_key_${selector}`] = query;\n      parts.push(viewChildTemplate(selector, 'key'));\n    }\n    queries[`__vcrIf_prop_${key}`] = new ViewChild(`ngIf_prop_${key}`, vcrArgs);\n    queries[`__trIf_prop_${key}`] = new ViewChild(`ngIf_prop_${key}`, trArgs);\n    queries[`__mockView_prop_${key}`] = new ViewChild(`prop_${key}`, vcrArgs);\n    parts.push(viewChildTemplate(key, 'prop'));\n  }\n\n  return parts.join('');\n};\n","export default (\n  contentChildSelector: string | [string, ...number[]],\n): [string, string, string, undefined | number[]] => {\n  if (typeof contentChildSelector === 'string') {\n    return ['key', `__mockTpl_key_${contentChildSelector}`, contentChildSelector, undefined];\n  }\n\n  const [key, ...indices] = contentChildSelector;\n\n  return ['prop', key, key, indices.length > 0 ? indices : undefined];\n};\n","import {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  EmbeddedViewRef,\n  Injector,\n  Optional,\n  QueryList,\n  Self,\n  TemplateRef,\n  ViewContainerRef,\n} from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport coreForm from '../common/core.form';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { Type } from '../common/core.types';\nimport funcIsMock from '../common/func.is-mock';\nimport { MockConfig } from '../common/mock';\nimport { LegacyControlValueAccessor } from '../common/mock-control-value-accessor';\nimport decorateDeclaration from '../mock/decorate-declaration';\nimport getMock from '../mock/get-mock';\n\nimport generateTemplate from './render/generate-template';\nimport getKey from './render/get-key';\nimport { MockedComponent } from './types';\n\nconst mixRenderPrepareVcr = (\n  instance: MockConfig & Record<keyof any, any>,\n  type: string,\n  selector: string,\n  cdr: ChangeDetectorRef,\n): ViewContainerRef | undefined => {\n  const vcrNgIf: ViewContainerRef = instance[`__vcrIf_${type}_${selector}`];\n  const trNgIf: TemplateRef<never> = instance[`__trIf_${type}_${selector}`];\n\n  if (vcrNgIf && trNgIf && !instance[`ngMocksRender_${type}_${selector}`]) {\n    instance[`ngMocksRender_${type}_${selector}`] = vcrNgIf.createEmbeddedView(trNgIf, {});\n    cdr.detectChanges();\n  }\n\n  return instance[`__mockView_${type}_${selector}`];\n};\n\nconst mixRenderReorderViews = (\n  viewContainer: ViewContainerRef,\n  views: Array<EmbeddedViewRef<any>>,\n  index: number,\n): void => {\n  for (const view of views.splice(index + 1)) {\n    view.destroy();\n  }\n\n  let viewIndex = 0;\n  for (const view of views) {\n    if (!view) {\n      continue;\n    }\n    viewContainer.move(view, viewIndex);\n    viewIndex += 1;\n  }\n};\n\nconst mixRenderApplyContext = (view: EmbeddedViewRef<any>, context: Record<keyof any, any>): void => {\n  for (const contextKey of Object.keys(view.context)) {\n    view.context[contextKey] = undefined;\n  }\n  for (const contextKey of Object.keys(context)) {\n    view.context[contextKey] = (context as any)[contextKey];\n  }\n  view.markForCheck();\n};\n\nconst mixRenderHandleViews = (\n  vcr: ViewContainerRef,\n  cdr: ChangeDetectorRef,\n  templates: any[],\n  views: Array<EmbeddedViewRef<any>>,\n  indices: undefined | number[],\n  context: Record<keyof any, any>,\n): number => {\n  let index = -1;\n\n  for (const templateRef of templates) {\n    index += 1;\n    views[index] = views[index] || undefined;\n    if ((indices && indices.indexOf(index) === -1) || !templateRef) {\n      continue;\n    }\n    if (!(templateRef instanceof TemplateRef)) {\n      throw new Error(`Cannot find TemplateRef`);\n    }\n    if (!views[index]) {\n      views[index] = vcr.createEmbeddedView(templateRef, {});\n    }\n    mixRenderApplyContext(views[index], context);\n  }\n  cdr.detectChanges();\n\n  return index;\n};\n\nconst mixRender = (instance: MockConfig & Record<keyof any, any>, cdr: ChangeDetectorRef): void => {\n  // Providing a method to render any @ContentChild based on its selector.\n  coreDefineProperty(\n    instance,\n    '__render',\n    (contentChildSelector: string | [string, ...number[]], $implicit?: any, variables?: Record<keyof any, any>) => {\n      const [type, key, selector, indices] = getKey(contentChildSelector);\n\n      const vcr = mixRenderPrepareVcr(instance, type, selector, cdr);\n      if (!vcr) {\n        return;\n      }\n\n      const property: any = instance[key];\n      const templates = property instanceof QueryList ? property.toArray() : [property];\n\n      const views = instance[`ngMocksRender_${type}_${selector}_views`] || [];\n      const index = mixRenderHandleViews(vcr, cdr, templates, views, indices, { ...variables, $implicit });\n\n      mixRenderReorderViews(vcr, views, index);\n      instance[`ngMocksRender_${type}_${selector}_views`] = views;\n      cdr.detectChanges();\n    },\n  );\n};\n\nconst mixHideHandler = (\n  instance: MockConfig & Record<keyof any, any>,\n  type: string,\n  selector: string,\n  indices: undefined | number[],\n) => {\n  const views = instance[`ngMocksRender_${type}_${selector}_views`];\n  let index = -1;\n  for (const view of views) {\n    index += 1;\n    if ((indices && indices.indexOf(index) === -1) || !view) {\n      continue;\n    }\n    view.destroy();\n    views[index] = undefined;\n  }\n};\n\nconst mixHide = (instance: MockConfig & Record<keyof any, any>, changeDetector: ChangeDetectorRef): void => {\n  // Providing method to hide any @ContentChild based on its selector.\n  coreDefineProperty(instance, '__hide', (contentChildSelector: string | [string, ...number[]]) => {\n    const [type, , selector, indices] = getKey(contentChildSelector);\n\n    if (!instance[`ngMocksRender_${type}_${selector}`]) {\n      return;\n    }\n    mixHideHandler(instance, type, selector, indices);\n\n    if (!indices) {\n      (instance[`ngMocksRender_${type}_${selector}`] as EmbeddedViewRef<never>).destroy();\n      instance[`ngMocksRender_${type}_${selector}`] = undefined;\n    }\n    changeDetector.detectChanges();\n  });\n};\n\nclass ComponentMockBase extends LegacyControlValueAccessor implements AfterViewInit {\n  // istanbul ignore next\n  public constructor(\n    injector: Injector,\n    ngControl: any, // NgControl\n    changeDetector: ChangeDetectorRef,\n  ) {\n    super(injector, ngControl);\n    if (funcIsMock(this)) {\n      mixRender(this, changeDetector);\n      mixHide(this, changeDetector);\n    }\n  }\n\n  public ngAfterViewInit(): void {\n    const config = (this.__ngMocksConfig as any).config;\n    if (!(this as any).__rendered && config && config.render) {\n      for (const block of Object.keys(config.render)) {\n        const { $implicit, variables } =\n          config.render[block] === true\n            ? {\n                $implicit: undefined,\n                variables: {},\n              }\n            : config.render[block];\n        (this as any).__render(block, $implicit, variables);\n      }\n      (this as any).__rendered = true;\n    }\n  }\n}\n\ncoreDefineProperty(ComponentMockBase, 'parameters', [\n  [Injector],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n  [ChangeDetectorRef],\n]);\n\nconst decorateClass = (component: Type<any>, mock: Type<any>): void => {\n  const meta = coreReflectDirectiveResolve(component);\n  Component(\n    decorateDeclaration(component, mock, meta, {\n      template: generateTemplate(meta.queries),\n    }),\n  )(mock);\n};\n\n/**\n * MockComponents creates an array of mock component classes out of components passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockComponents(\n *     Dep1Component,\n *     Dep2Component,\n *   ),\n * });\n * ```\n */\nexport function MockComponents(...components: Array<Type<any>>): Array<Type<MockedComponent<any>>> {\n  return components.map(MockComponent);\n}\n\n/**\n * MockComponent creates a mock component class out of an arbitrary component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockComponent(Dep1Component),\n *     MockComponent(Dep2Component),\n *   ],\n * });\n * ```\n */\nexport function MockComponent<TComponent>(component: Type<TComponent>): Type<MockedComponent<TComponent>> {\n  return getMock(component, 'c', 'MockComponent', 'cacheComponent', ComponentMockBase, decorateClass);\n}\n","import {\n  ChangeDetectorRef,\n  Directive,\n  ElementRef,\n  Injector,\n  OnInit,\n  Optional,\n  Self,\n  TemplateRef,\n  ViewContainerRef,\n} from '@angular/core';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport coreForm from '../common/core.form';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { Type } from '../common/core.types';\nimport { LegacyControlValueAccessor } from '../common/mock-control-value-accessor';\nimport decorateDeclaration from '../mock/decorate-declaration';\nimport getMock from '../mock/get-mock';\n\nimport { MockedDirective } from './types';\n\nclass DirectiveMockBase extends LegacyControlValueAccessor implements OnInit {\n  // istanbul ignore next\n  public constructor(\n    injector: Injector,\n    ngControl: any, // NgControl\n    cdr: ChangeDetectorRef,\n    vcr: ViewContainerRef,\n    element: ElementRef | null = null,\n    template: TemplateRef<any> | null = null,\n  ) {\n    super(injector, ngControl);\n    this.__ngMocksInstall(vcr, cdr, element, template);\n  }\n\n  public ngOnInit(): void {\n    const config = (this.__ngMocksConfig as any).config;\n    if (config?.render) {\n      const { $implicit, variables } =\n        config.render === true\n          ? {\n              $implicit: undefined,\n              variables: {},\n            }\n          : config.render;\n      (this as any).__render($implicit, variables);\n    }\n  }\n\n  private __ngMocksInstall(\n    vcr: ViewContainerRef,\n    cdr: ChangeDetectorRef,\n    element: ElementRef | null,\n    template: TemplateRef<any> | null,\n  ): void {\n    // Basically any directive on ng-template is treated as structural, even it does not control render process.\n    // In our case we do not if we should render it or not and due to this we do nothing.\n    coreDefineProperty(this, '__element', element);\n    coreDefineProperty(this, '__template', template);\n    coreDefineProperty(this, '__viewContainer', vcr);\n    coreDefineProperty(this, '__vcr', vcr);\n    coreDefineProperty(this, '__cdr', cdr);\n    coreDefineProperty(this, '__isStructural', template && vcr);\n\n    // Providing method to render mock values.\n    coreDefineProperty(this, '__render', ($implicit?: any, variables?: Record<keyof any, any>) => {\n      if (vcr && template) {\n        vcr.clear();\n        vcr.createEmbeddedView(template, { ...variables, $implicit });\n        cdr.detectChanges();\n      }\n    });\n  }\n}\n\ncoreDefineProperty(DirectiveMockBase, 'parameters', [\n  [Injector],\n  [coreForm.NgControl || /* istanbul ignore next */ (() => undefined), new Optional(), new Self()],\n  [ChangeDetectorRef],\n  [ViewContainerRef],\n  [ElementRef, new Optional(), new Self()],\n  [TemplateRef, new Optional(), new Self()],\n]);\n\nconst decorateClass = (directive: Type<any>, mock: Type<any>): void => {\n  const meta = coreReflectDirectiveResolve(directive);\n  const options = decorateDeclaration(directive, mock, meta, {});\n  Directive(options)(mock);\n};\n\n/**\n * MockDirectives creates an array of mock directive classes out of directives passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockDirectives(\n *     Dep1Directive,\n *     Dep2Directive,\n *   ),\n * });\n * ```\n */\nexport function MockDirectives(...directives: Array<Type<any>>): Array<Type<MockedDirective<any>>> {\n  return directives.map(MockDirective);\n}\n\n/**\n * MockDirective creates a mock directive class out of an arbitrary directive.\n *\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockDirective(Dep1Directive),\n *     MockDirective(Dep2Directive),\n *   ],\n * });\n * ```\n */\nexport function MockDirective<TDirective>(directive: Type<TDirective>): Type<MockedDirective<TDirective>> {\n  return getMock(directive, 'd', 'MockDirective', 'cacheDirective', DirectiveMockBase, decorateClass);\n}\n","import { Pipe } from '@angular/core';\n\nimport collectDeclarations from '../resolve/collect-declarations';\n\nimport coreReflectBodyCatch from './core.reflect.body-catch';\n\nexport default (def: any): Pipe & { standalone?: boolean } =>\n  coreReflectBodyCatch((arg: any) => {\n    const declaration = collectDeclarations(arg);\n    if (declaration.Pipe) {\n      return declaration.Pipe;\n    }\n\n    throw new Error('Cannot resolve declarations');\n  })(def);\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectPipeResolve from '../common/core.reflect.pipe-resolve';\nimport { Type } from '../common/core.types';\nimport decorateMock from '../common/decorate.mock';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport { Mock } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport returnCachedMock from '../mock/return-cached-mock';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport { MockedPipe } from './types';\n\n/**\n * MockPipes creates an array of mock pipe classes out of pipes passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockPipes(\n *     Dep1Pipe,\n *     Dep2Pipe,\n *   ),\n * });\n * ```\n */\nexport function MockPipes(...pipes: Array<Type<PipeTransform>>): Array<Type<PipeTransform>> {\n  return pipes.map(pipe => MockPipe(pipe, undefined));\n}\n\nconst getMockClass = (pipe: Type<any>, transformValue?: PipeTransform['transform']): Type<any> => {\n  const config = ngMocksUniverse.config.get(pipe);\n  const transform = transformValue ?? config?.defValue?.transform;\n  const mock = extendClass(Mock);\n  Pipe(coreReflectPipeResolve(pipe))(mock);\n  decorateMock(mock, pipe, {\n    init: (instance: PipeTransform) => {\n      if (transform) {\n        instance.transform = transform;\n      }\n      if (!instance.transform) {\n        helperMockService.mock(instance, 'transform', `${funcGetName(instance)}.transform`);\n      }\n    },\n    transform,\n  });\n\n  return mock;\n};\n\n/**\n * MockPipe creates a mock pipe class out of an arbitrary pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockPipe(Dep1Pipe),\n *     MockPipe(Dep2Pipe),\n *   ],\n * });\n * ```\n */\nexport function MockPipe<TPipe extends PipeTransform>(\n  pipe: Type<TPipe>,\n  transform?: TPipe['transform'],\n): Type<MockedPipe<TPipe>>;\n\nexport function MockPipe<TPipe extends PipeTransform>(\n  pipe: Type<TPipe>,\n  transform?: TPipe['transform'],\n): Type<MockedPipe<TPipe>> {\n  funcImportExists(pipe, 'MockPipe');\n\n  if (isMockNgDef(pipe, 'p')) {\n    return pipe;\n  }\n\n  // istanbul ignore next\n  if (ngMocksUniverse.flags.has('cachePipe') && ngMocksUniverse.cacheDeclarations.has(pipe)) {\n    return returnCachedMock(pipe);\n  }\n\n  const mock = getMockClass(pipe, transform);\n  if (ngMocksUniverse.flags.has('cachePipe')) {\n    ngMocksUniverse.cacheDeclarations.set(pipe, mock);\n  }\n\n  return mock as any;\n}\n","import { NgModule } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport coreDefineProperty from '../common/core.define-property';\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectModuleResolve from '../common/core.reflect.module-resolve';\nimport { AnyType, Type } from '../common/core.types';\nimport decorateMock from '../common/decorate.mock';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isMockNgDef } from '../common/func.is-mock-ng-def';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders, NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { Mock } from '../common/mock';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport returnCachedMock from '../mock/return-cached-mock';\n\nimport mockNgDef from './mock-ng-def';\n\nconst flagMock = (resolution?: string): boolean => resolution === 'mock' && ngMocksUniverse.flags.has('skipMock');\n\nconst flagKeep = (resolution?: string): boolean => resolution === 'keep' && !ngMocksUniverse.flags.has('skipMock');\n\nconst flagReplace = (resolution?: string): boolean =>\n  resolution === 'replace' && !ngMocksUniverse.flags.has('skipMock');\n\nconst flagNever = (ngModule?: any): boolean =>\n  coreConfig.neverMockModule.indexOf(funcGetName(ngModule)) !== -1 && !ngMocksUniverse.flags.has('skipMock');\n\nconst preProcessFlags = (ngModule: AnyType<any>): { isRootModule: boolean; toggleSkipMockFlag: boolean } => {\n  let toggleSkipMockFlag = false;\n  let isRootModule = true;\n\n  if (ngMocksUniverse.flags.has('hasRootModule')) {\n    isRootModule = false;\n  } else {\n    ngMocksUniverse.flags.add('hasRootModule');\n  }\n\n  const resolution = ngMocksUniverse.getResolution(ngModule);\n  if (flagMock(resolution)) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.delete('skipMock');\n  }\n  if (flagNever(ngModule)) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  if (!isRootModule && (flagKeep(resolution) || flagReplace(resolution))) {\n    toggleSkipMockFlag = true;\n    ngMocksUniverse.flags.add('skipMock');\n  }\n\n  return {\n    isRootModule,\n    toggleSkipMockFlag,\n  };\n};\n\nconst postProcessFlags = ({\n  isRootModule,\n  toggleSkipMockFlag,\n}: {\n  isRootModule: boolean;\n  toggleSkipMockFlag: boolean;\n}): void => {\n  if (toggleSkipMockFlag && ngMocksUniverse.flags.has('skipMock')) {\n    ngMocksUniverse.flags.delete('skipMock');\n  } else if (toggleSkipMockFlag && !ngMocksUniverse.flags.has('skipMock')) {\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  if (isRootModule) {\n    ngMocksUniverse.flags.delete('hasRootModule');\n  }\n};\n\nconst extractModuleAndProviders = (\n  module: any,\n): {\n  ngModule: Type<any>;\n  ngModuleProviders: NgModule['providers'];\n} => {\n  let ngModule: Type<any>;\n  let ngModuleProviders: NgModule['providers'];\n\n  if (isNgModuleDefWithProviders(module)) {\n    ngModule = module.ngModule;\n    if (module.providers) {\n      ngModuleProviders = module.providers;\n    }\n  } else {\n    ngModule = module;\n  }\n\n  return {\n    ngModule,\n    ngModuleProviders,\n  };\n};\n\nconst getExistingMockModule = (ngModule: Type<any>, isRootModule: boolean): Type<any> | undefined => {\n  if (isMockNgDef(ngModule, 'm')) {\n    return ngModule;\n  }\n\n  // Every module should be replaced with its mock copy only once to avoid errors like:\n  // Failed: Type ...Component is part of the declarations of 2 modules: ...Module and ...Module...\n  if (ngMocksUniverse.flags.has('cacheModule') && ngMocksUniverse.cacheDeclarations.has(ngModule)) {\n    return returnCachedMock(ngModule);\n  }\n\n  // Now we check if we need to keep the original module or to replace it with some other.\n  // and there is no override in its resolution.\n  if (isRootModule || ngMocksUniverse.config.get('ngMocksDepsResolution')?.get(ngModule) === 'mock') {\n    return undefined;\n  }\n  if (ngMocksUniverse.hasBuildDeclaration(ngModule)) {\n    const instance = ngMocksUniverse.getBuildDeclaration(ngModule);\n    if (isNgDef(instance, 'm') && instance !== ngModule) {\n      return instance;\n    }\n  }\n\n  return undefined;\n};\n\nconst detectMockModule = (ngModule: Type<any>, mockModule?: Type<any>): Type<any> => {\n  const [changed, ngModuleDef, resolutions] = mockModule\n    ? [false]\n    : mockNgDef(coreReflectModuleResolve(ngModule), ngModule);\n  if (resolutions) {\n    coreDefineProperty(ngModule, '__ngMocksResolutions', resolutions);\n  }\n\n  if (changed) {\n    const parent = ngMocksUniverse.flags.has('skipMock') ? ngModule : Mock;\n    const mock = extendClass(parent);\n\n    // the last thing is to apply decorators.\n    NgModule(ngModuleDef)(mock);\n    decorateMock(mock, ngModule);\n\n    return mock;\n  }\n\n  return mockModule || ngModule;\n};\n\nconst getMockProviders = (ngModuleProviders: NgModule['providers']): NgModule['providers'] => {\n  if (ngModuleProviders) {\n    const [changed, ngModuleDef] = mockNgDef({ providers: ngModuleProviders, skipExports: true });\n\n    return changed ? ngModuleDef.providers : ngModuleProviders;\n  }\n\n  return undefined;\n};\n\nconst generateReturn = (\n  module: any,\n  ngModule: AnyType<any>,\n  ngModuleProviders: NgModule['providers'],\n  mockModule: AnyType<any>,\n  mockModuleProviders: NgModule['providers'],\n): any =>\n  mockModule === ngModule && mockModuleProviders === ngModuleProviders\n    ? module\n    : isNgModuleDefWithProviders(module)\n      ? { ngModule: mockModule, ...(mockModuleProviders ? { providers: mockModuleProviders } : {}) }\n      : mockModule;\n\n/**\n * MockModule creates a mock module class out of an arbitrary module.\n * All declarations, imports, exports and providers will be mocked too.\n *\n * @see https://ng-mocks.sudo.eu/api/MockModule\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   imports: [\n *     MockModule(SharedModule),\n *   ],\n * });\n * ```\n */\nexport function MockModule<T>(ngModule: Type<T>): Type<T>;\n\n/**\n * MockModule creates a mock module class with mock provides out of an arbitrary module with providers.\n * All declarations, imports, exports and providers will be mocked too.\n *\n * @see https://ng-mocks.sudo.eu/api/MockModule\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   imports: [\n *     MockModule(StoreModule.forRoot()),\n *   ],\n * });\n * ```\n */\nexport function MockModule<T>(ngModule: NgModuleWithProviders<T>): NgModuleWithProviders<T>;\n\nexport function MockModule(def: any): any {\n  funcImportExists(def, 'MockModule');\n\n  const { ngModule, ngModuleProviders } = extractModuleAndProviders(def);\n  const flags = preProcessFlags(ngModule);\n  try {\n    const mockModule = detectMockModule(ngModule, getExistingMockModule(ngModule, flags.isRootModule));\n    // istanbul ignore else\n    if (ngMocksUniverse.flags.has('cacheModule')) {\n      ngMocksUniverse.cacheDeclarations.set(ngModule, mockModule);\n    }\n    if (ngMocksUniverse.flags.has('skipMock')) {\n      ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(mockModule);\n    }\n    const mockModuleProviders = getMockProviders(ngModuleProviders);\n\n    return generateReturn(def, ngModule, ngModuleProviders, mockModule, mockModuleProviders);\n  } finally {\n    postProcessFlags(flags);\n  }\n}\n","import { Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport funcGetType from '../common/func.get-type';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nimport { MockModule } from './mock-module';\n\nconst processDefMap: Array<[any, any]> = [\n  ['c', MockComponent],\n  ['d', MockDirective],\n  ['p', MockPipe],\n];\n\nconst processDef = (def: any) => {\n  if (isNgDef(def, 'm') || isNgModuleDefWithProviders(def)) {\n    return MockModule(def as any);\n  }\n  if (ngMocksUniverse.hasBuildDeclaration(def)) {\n    return ngMocksUniverse.getBuildDeclaration(def);\n  }\n  if (ngMocksUniverse.flags.has('skipMock') && ngMocksUniverse.getResolution(def) !== 'mock') {\n    return def;\n  }\n  for (const [flag, func] of processDefMap) {\n    if (isNgDef(def, flag)) {\n      return func(def);\n    }\n  }\n};\n\n// resolveProvider is a special case because of the def structure.\nconst createResolveProvider =\n  (resolutions: CoreDefStack<any, any>, change: () => void): ((def: Provider) => any) =>\n  (def: Provider) =>\n    helperMockService.resolveProvider(def, resolutions, change);\n\nconst createResolveWithProviders = (def: any, mockDef: any): boolean =>\n  isNgModuleDefWithProviders(mockDef) && isNgModuleDefWithProviders(def);\n\nconst createResolveExisting = (\n  def: any,\n  resolutions: CoreDefStack<any, any>,\n  change: (flag?: boolean) => void,\n): any => {\n  const mockDef = resolutions.get(def);\n  if (def !== mockDef) {\n    change();\n  }\n\n  return mockDef;\n};\n\nconst createResolveExcluded = (\n  def: any,\n  resolutions: CoreDefStack<any, any>,\n  change: (flag?: boolean) => void,\n): void => {\n  resolutions.set(def, undefined);\n\n  change();\n};\n\nconst createResolve =\n  (resolutions: CoreDefStack<any, any>, change: (flag?: boolean) => void): ((def: any) => any) =>\n  (def: any) => {\n    if (resolutions.has(def)) {\n      return createResolveExisting(def, resolutions, change);\n    }\n\n    const detectedDef = funcGetType(def);\n    if (ngMocksUniverse.isExcludedDef(detectedDef)) {\n      return createResolveExcluded(def, resolutions, change);\n    }\n    ngMocksUniverse.touches.add(detectedDef);\n\n    const mockDef = processDef(def);\n    if (createResolveWithProviders(def, mockDef)) {\n      resolutions.set(def.ngModule, mockDef.ngModule);\n    }\n    if (ngMocksUniverse.flags.has('skipMock')) {\n      ngMocksUniverse.config.get('ngMocksDepsSkip')?.add(mockDef);\n    }\n    resolutions.set(def, mockDef);\n    change(mockDef !== def);\n\n    return mockDef;\n  };\n\nexport default (\n  change: () => void,\n  resolutions: CoreDefStack<any, any>,\n): {\n  resolve: (def: any) => any;\n  resolveProvider: (def: Provider) => any;\n} => {\n  const resolve = createResolve(resolutions, change);\n  const resolveProvider = createResolveProvider(resolutions, change);\n\n  return {\n    resolve,\n    resolveProvider,\n  };\n};\n","import { flatten } from '../common/core.helpers';\nimport funcGetType from '../common/func.get-type';\nimport markExported from '../mock/mark-exported';\n\nexport default (providers?: any[]): void => {\n  for (const provider of flatten(providers ?? [])) {\n    const instance = funcGetType(provider);\n    markExported(instance);\n  }\n};\n","import { NgModule, Provider } from '@angular/core';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten } from '../common/core.helpers';\nimport { dependencyKeys, Type } from '../common/core.types';\nimport funcGetType from '../common/func.get-type';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport markExported from '../mock/mark-exported';\n\nimport createResolvers from './create-resolvers';\nimport markProviders from './mark-providers';\n\nconst flatToExisting = <T, R>(data: T | T[], callback: (arg: T) => R | undefined): R[] =>\n  flatten(data)\n    .map(callback)\n    .filter((item): item is R => !!item);\n\nconst configureProcessMetaKeys = (\n  resolve: (def: any) => any,\n  resolveProvider: (def: Provider) => any,\n): Array<[dependencyKeys, (def: any) => any]> => [\n  ['declarations', resolve],\n  [\n    'hostDirectives',\n    <T>(data: T) => {\n      const def = funcGetType(data);\n      const directive = resolve(def);\n      return directive === def\n        ? data\n        : data == def\n          ? directive\n          : {\n              ...data,\n              directive,\n            };\n    },\n  ],\n  ['imports', resolve],\n  ['entryComponents', resolve],\n  ['bootstrap', resolve],\n  ['providers', resolveProvider],\n  ['viewProviders', resolveProvider],\n  ['exports', resolve],\n  ['schemas', v => v],\n];\n\nconst processMeta = <\n  T extends Partial<Record<dependencyKeys, any>> & {\n    skipMarkProviders?: boolean;\n  },\n>(\n  ngModule: T,\n  resolve: (def: any) => any,\n  resolveProvider: (def: Provider) => any,\n): Partial<T> => {\n  const mockModuleDef: Partial<T> = {};\n  const keys = configureProcessMetaKeys(resolve, resolveProvider);\n\n  const cachePipe = ngMocksUniverse.flags.has('cachePipe');\n  if (!cachePipe) {\n    ngMocksUniverse.flags.add('cachePipe');\n  }\n  for (const [key, callback] of keys) {\n    if (ngModule[key]?.length) {\n      mockModuleDef[key] = flatToExisting(ngModule[key], callback);\n    }\n  }\n  if (!ngModule.skipMarkProviders) {\n    markProviders(mockModuleDef.providers);\n    markProviders(mockModuleDef.viewProviders);\n  }\n\n  if (!cachePipe) {\n    ngMocksUniverse.flags.delete('cachePipe');\n  }\n\n  return mockModuleDef;\n};\n\nconst resolveDefForExport = (\n  def: any,\n  resolve: (def: any) => any,\n  correctExports: boolean,\n  ngModule?: Type<any>,\n): Type<any> | undefined => {\n  const moduleConfig = ngMocksUniverse.config.get(ngModule) || {};\n  const instance = funcGetType(def);\n  const mockDef = resolve(instance);\n  if (!mockDef) {\n    return undefined;\n  }\n\n  // If we export a declaration, then we have to export its module too.\n  const config = ngMocksUniverse.config.get(instance);\n  if (config?.export && ngModule && !moduleConfig.export) {\n    ngMocksUniverse.config.set(ngModule, {\n      ...moduleConfig,\n      export: true,\n    });\n  }\n\n  if (correctExports && !moduleConfig.exportAll && !config?.export) {\n    return undefined;\n  }\n\n  markExported(instance, ngModule);\n\n  return mockDef;\n};\n\nconst skipAddExports = (mockDef: any, mockModuleDef: NgModule): mockDef is undefined =>\n  !mockDef || (!!mockModuleDef.exports && mockModuleDef.exports.indexOf(mockDef) !== -1);\n\n// if we are in the skipMock mode we need to export only the default exports.\n// if we are in the correctModuleExports mode we need to export only default exports.\nconst addExports = (\n  resolve: (def: any) => any,\n  change: () => void,\n  ngModuleDef: NgModule,\n  mockModuleDef: NgModule,\n  ngModule?: Type<any>,\n): void => {\n  const correctExports = ngMocksUniverse.flags.has('skipMock') || ngMocksUniverse.flags.has('correctModuleExports');\n  for (const def of flatten([ngModuleDef.imports || [], ngModuleDef.declarations || []])) {\n    const mockDef = resolveDefForExport(def, resolve, correctExports, ngModule);\n    if (skipAddExports(mockDef, mockModuleDef)) {\n      continue;\n    }\n\n    change();\n    mockModuleDef.exports = mockModuleDef.exports || [];\n    mockModuleDef.exports.push(mockDef);\n  }\n};\n\nexport default <\n  T extends NgModule & {\n    hostDirectives?: Array<any>;\n    skipMarkProviders?: boolean;\n    skipExports?: boolean;\n  },\n>(\n  ngModuleDef: T,\n  ngModule?: Type<any>,\n): [boolean, Partial<T>, Map<any, any>] => {\n  const hasResolver = ngMocksUniverse.config.has('mockNgDefResolver');\n  if (!hasResolver) {\n    ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  }\n  ngMocksUniverse.config.get('mockNgDefResolver').push();\n\n  let changed = !ngMocksUniverse.flags.has('skipMock');\n  const change = (flag = true) => {\n    changed = changed || flag;\n  };\n  const { resolve, resolveProvider } = createResolvers(change, ngMocksUniverse.config.get('mockNgDefResolver'));\n  const mockModuleDef = processMeta(ngModuleDef, resolve, resolveProvider);\n  if (!ngModuleDef.skipExports) {\n    addExports(resolve, change, ngModuleDef, mockModuleDef, ngModule);\n  }\n  for (const def of ngModule && mockModuleDef.exports ? (flatten(mockModuleDef.exports) as Array<any>) : []) {\n    markExported(def, ngModule);\n  }\n\n  const resolutions = ngMocksUniverse.config.get('mockNgDefResolver').pop();\n  if (!hasResolver) {\n    ngMocksUniverse.config.delete('mockNgDefResolver');\n  }\n\n  return [changed, mockModuleDef, resolutions];\n};\n","import { Directive, NgModule } from '@angular/core';\n\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport mockNgDef from '../../mock-module/mock-ng-def';\n\nexport default (meta?: Directive | NgModule): NgModule | undefined => {\n  if (!meta) {\n    return undefined;\n  }\n\n  const skipMock = ngMocksUniverse.flags.has('skipMock');\n  // istanbul ignore else\n  if (!skipMock) {\n    ngMocksUniverse.flags.add('skipMock');\n  }\n  const [changed, def] = mockNgDef(meta);\n  // istanbul ignore else\n  if (!skipMock) {\n    ngMocksUniverse.flags.delete('skipMock');\n  }\n  if (!changed) {\n    return undefined;\n  }\n\n  return def;\n};\n","import ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport { BuilderData } from './types';\n\nexport default (\n  replaceDef: BuilderData['replaceDef'],\n  defValue: BuilderData['defValue'],\n  source: any,\n  value: any,\n): boolean => {\n  // no reason to touch mocks\n  if (ngMocksUniverse.cacheDeclarations.has(value)) {\n    return true;\n  }\n\n  // no customizations in replacements\n  if (replaceDef.has(source) && value === defValue.get(source)) {\n    return true;\n  }\n\n  return false;\n};\n","import { ValueProvider } from '@angular/core';\nimport { MetadataOverride } from '@angular/core/testing';\n\nimport { mapValues } from '../../common/core.helpers';\nimport coreReflectMeta from '../../common/core.reflect.meta';\nimport { NG_MOCKS_OVERRIDES } from '../../common/core.tokens';\nimport { Type } from '../../common/core.types';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport getOverrideDef from './get-override-def';\nimport skipOverride from './skip-override';\n\nexport default (replaceDef: Set<any>, defValue: Map<any, any>): ValueProvider => {\n  const overrides: Map<Type<any>, [MetadataOverride<any>, MetadataOverride<any>]> = new Map();\n  for (const proto of mapValues(ngMocksUniverse.touches)) {\n    const source: any = proto;\n    const value = ngMocksUniverse.getBuildDeclaration(source) || source;\n    if (skipOverride(replaceDef, defValue, source, value)) {\n      continue;\n    }\n\n    const original = coreReflectMeta(value);\n    const override = getOverrideDef(original);\n    if (!override) {\n      continue;\n    }\n\n    // We need to delete standalone, because Angular was too lazy to check whether it has been really changed.\n    const patchedOriginal: Partial<typeof original> = {};\n    for (const key of Object.keys(override)) {\n      patchedOriginal[key] = original[key];\n    }\n\n    overrides.set(value, [{ set: override }, { set: patchedOriginal }]);\n  }\n\n  return {\n    provide: NG_MOCKS_OVERRIDES,\n    useValue: overrides,\n  };\n};\n","import { ValueProvider } from '@angular/core';\n\nimport { mapEntries } from '../../common/core.helpers';\nimport { NG_MOCKS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): ValueProvider => {\n  const mocks = new Map();\n  for (const [key, value] of [\n    ...mapEntries(ngMocksUniverse.builtProviders),\n    ...mapEntries(ngMocksUniverse.builtDeclarations),\n    ...mapEntries(ngMocksUniverse.cacheDeclarations),\n    ...mapEntries(ngMocksUniverse.cacheProviders),\n  ]) {\n    if (mocks.has(key)) {\n      continue;\n    }\n    mocks.set(key, value);\n  }\n\n  return {\n    provide: NG_MOCKS,\n    useValue: mocks,\n  };\n};\n","import { ValueProvider } from '@angular/core';\n\nimport { mapValues } from '../../common/core.helpers';\nimport { NG_MOCKS_TOUCHES } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): ValueProvider => {\n  // Redefining providers for kept declarations.\n  const touches = new Set();\n  for (const proto of mapValues(ngMocksUniverse.touches)) {\n    const source: any = proto;\n    let value = ngMocksUniverse.getBuildDeclaration(source);\n\n    // kept declarations should be based on their source.\n    if (value === undefined) {\n      value = source;\n    }\n\n    touches.add(source);\n    touches.add(value);\n  }\n\n  return {\n    provide: NG_MOCKS_TOUCHES,\n    useValue: touches,\n  };\n};\n","import { ComponentFactoryResolver, NgModule, Optional } from '@angular/core';\n\nimport coreDefineProperty from '../../common/core.define-property';\nimport { extendClass } from '../../common/core.helpers';\nimport { NG_MOCKS } from '../../common/core.tokens';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport helperCreateClone from '../../mock-service/helper.create-clone';\n\nimport { NgMeta } from './types';\n\nclass EntryComponentsModule {\n  public constructor(map: Map<any, any>, componentFactoryResolver?: ComponentFactoryResolver) {\n    // istanbul ignore if\n    if (!componentFactoryResolver) {\n      return;\n    }\n\n    const originCFR = componentFactoryResolver.resolveComponentFactory;\n    componentFactoryResolver.resolveComponentFactory = helperCreateClone(\n      originCFR,\n      undefined,\n      undefined,\n      (component: any, ...args: any[]) =>\n        originCFR.apply(componentFactoryResolver, [map.get(component) ?? component, ...args] as any),\n    );\n  }\n}\ncoreDefineProperty(EntryComponentsModule, 'parameters', [[NG_MOCKS], [ComponentFactoryResolver, new Optional()]]);\n\nclass IvyModule {}\nNgModule()(IvyModule);\n\nexport default (ngModule: NgMeta): void => {\n  const entryComponents: any[] = [];\n  for (const declaration of ngModule.declarations) {\n    if (isNgDef(declaration, 'c')) {\n      entryComponents.push(declaration);\n    }\n  }\n  // the way to cause entryComponents to do its work\n  const entryModule = extendClass(EntryComponentsModule);\n  NgModule({\n    // Ivy knows how to make any component an entry point,\n    // but we still would like to patch resolveComponentFactory in order to provide mocks.\n    // ɵmod is added only if Ivy has been enabled.\n    entryComponents: (IvyModule as any).ɵmod ? [] : /* istanbul ignore next */ entryComponents,\n  } as never)(entryModule);\n  ngModule.imports.push(entryModule);\n};\n","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"DOCUMENT\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_common_d12e0fe1__.DOCUMENT) });","import { DOCUMENT } from '@angular/common';\n\nimport coreConfig from '../../common/core.config';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nconst skipResolution = (provide: any): boolean | undefined => {\n  const resolution = ngMocksUniverse.getResolution(provide);\n  if (resolution === 'keep' || resolution === 'exclude') {\n    return true;\n  }\n  if (resolution === 'mock') {\n    return false;\n  }\n\n  return undefined;\n};\n\nconst skipSystem = (provide: any): boolean => {\n  if (!provide || provide === DOCUMENT || ngMocksUniverse.touches.has(provide)) {\n    return true;\n  }\n  const skipByResolution = skipResolution(provide);\n  if (skipByResolution !== undefined) {\n    return skipByResolution;\n  }\n\n  if (typeof provide === 'function' && coreConfig.neverMockProvidedFunction.indexOf(provide.name) !== -1) {\n    return true;\n  }\n  // istanbul ignore if because we mock BrowserModule\n  if (isNgInjectionToken(provide) && coreConfig.neverMockToken.indexOf(provide.toString()) !== -1) {\n    return true;\n  }\n\n  return false;\n};\n\n// Checks if we should avoid mocking of the provider.\nexport default (provide: any): boolean => {\n  if (skipSystem(provide)) {\n    return true;\n  }\n\n  // Empty providedIn or things for a platform have to be skipped.\n  const providedIn = coreReflectProvidedIn(provide);\n  const skip = !providedIn || providedIn === 'platform';\n  if (typeof provide === 'function' && skip) {\n    return true;\n  }\n\n  return false;\n};\n","import { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport skipDep from './skip-dep';\nimport { BuilderData } from './types';\n\nexport default (parameters: Set<any>, mockDef: BuilderData['mockDef'], def: any): void => {\n  if (\n    !skipDep(def) &&\n    (mockDef.has(NG_MOCKS_ROOT_PROVIDERS) || !ngMocksUniverse.config.get('ngMocksDepsSkip').has(def))\n  ) {\n    parameters.add(def);\n  }\n};\n","export default (provide: any, bucket: any[], touched: any[]): void => {\n  if (typeof provide === 'function' && touched.indexOf(provide) === -1) {\n    touched.push(provide);\n    bucket.push(provide);\n  }\n};\n","import funcExtractForwardRef from '../../common/func.extract-forward-ref';\n\n// Extracts dependency among flags of parameters.\nexport default (decorators?: any[]): any => {\n  if (!decorators) {\n    return;\n  }\n\n  let provide: any;\n  for (const decorator of decorators) {\n    if (decorator && typeof decorator === 'object' && decorator.token) {\n      provide = decorator.token;\n    }\n    if (!provide && decorator && (typeof decorator !== 'object' || !decorator.ngMetadataName)) {\n      provide = decorator;\n    }\n  }\n\n  return funcExtractForwardRef(provide);\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (): {\n  buckets: any[];\n  touched: any[];\n} => {\n  // We need buckets here to process first all depsSkip, then deps and only after that all other defs.\n  const buckets: any[] = [\n    mapValues(ngMocksUniverse.config.get('ngMocksDepsSkip')),\n    mapValues(ngMocksUniverse.config.get('ngMocksDeps')),\n    mapValues(ngMocksUniverse.touches),\n  ];\n\n  // Also, we need to track what has been touched to check params recursively, but avoiding duplicates.\n  const touched: any[] = [].concat(...buckets);\n\n  return {\n    buckets,\n    touched,\n  };\n};\n","import coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (provide: any): void => {\n  if (ngMocksUniverse.touches.has(provide)) {\n    return;\n  }\n\n  const providedIn = coreReflectProvidedIn(provide);\n  if (!providedIn) {\n    return;\n  }\n\n  if (ngMocksUniverse.config.get('ngMocksDepsSkip').has(providedIn)) {\n    ngMocksUniverse.config.get('ngMocksDepsSkip').add(provide);\n  }\n};\n","import ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport skipDep from './skip-dep';\n\nexport default (provide: any): boolean => {\n  if (skipDep(provide)) {\n    return true;\n  }\n\n  return ngMocksUniverse.config.get('ngMocksDepsSkip').has(provide);\n};\n","import coreReflectParametersResolve from '../../common/core.reflect.parameters-resolve';\nimport { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport addDefToRootProviderParameters from './add-def-to-root-provider-parameters';\nimport checkRootProviderDependency from './check-root-provider-dependency';\nimport extractDep from './extract-dep';\nimport getRootProvidersData from './get-root-providers-data';\nimport handleProvidedInDependency from './handle-provided-in-dependency';\nimport skipRootProviderDependency from './skip-root-provider-dependency';\nimport { BuilderData } from './types';\n\nexport default (mockDef: BuilderData['mockDef']): Set<any> => {\n  const parameters = new Set();\n  const { buckets, touched } = getRootProvidersData();\n\n  for (const bucket of buckets) {\n    for (const def of bucket) {\n      addDefToRootProviderParameters(parameters, mockDef, def);\n\n      for (const decorators of coreReflectParametersResolve(def)) {\n        const provide: any = extractDep(decorators);\n        handleProvidedInDependency(provide);\n        if (skipRootProviderDependency(provide)) {\n          continue;\n        }\n        checkRootProviderDependency(provide, touched, bucket);\n        if (mockDef.has(NG_MOCKS_ROOT_PROVIDERS) || !ngMocksUniverse.config.get('ngMocksDepsSkip').has(def)) {\n          parameters.add(provide);\n        } else {\n          ngMocksUniverse.config.get('ngMocksDepsSkip').add(provide);\n        }\n      }\n    }\n  }\n\n  return parameters;\n};\n","import CoreDefStack from '../../common/core.def-stack';\nimport { mapValues } from '../../common/core.helpers';\nimport { NG_MOCKS_ROOT_PROVIDERS } from '../../common/core.tokens';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport helperResolveProvider from '../../mock-service/helper.resolve-provider';\nimport helperUseFactory from '../../mock-service/helper.use-factory';\n\nimport getRootProviderParameters from './get-root-provider-parameters';\nimport { BuilderData, NgMeta } from './types';\n\n// Mocking root providers.\nexport default (ngModule: NgMeta, { keepDef, mockDef }: BuilderData, resolutions: CoreDefStack<any, any>): void => {\n  // Adding missed providers.\n  const parameters = keepDef.has(NG_MOCKS_ROOT_PROVIDERS) ? new Set() : getRootProviderParameters(mockDef);\n  if (parameters.size > 0) {\n    for (const parameter of mapValues(parameters)) {\n      const mock = helperResolveProvider(parameter, resolutions);\n      if (mock) {\n        ngModule.providers.push(mock);\n      } else if (isNgInjectionToken(parameter)) {\n        const multi =\n          ngMocksUniverse.config.has('ngMocksMulti') && ngMocksUniverse.config.get('ngMocksMulti').has(parameter);\n        ngModule.providers.push(helperUseFactory(parameter, () => (multi ? [] : undefined)));\n      }\n    }\n  }\n};\n","import { ModuleWithProviders } from '@angular/core';\n\nimport { Type } from '../../common/core.types';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport { BuilderData } from './types';\n\nexport default (def: Type<any>, defProviders: BuilderData['defProviders']): Type<any> | ModuleWithProviders<any> => {\n  const loModule = ngMocksUniverse.config.get('mockNgDefResolver').get(def) ?? ngMocksUniverse.getBuildDeclaration(def);\n  const loProviders = defProviders.has(def) ? defProviders.get(def) : undefined;\n\n  return loProviders\n    ? {\n        ngModule: loModule,\n        providers: loProviders,\n      }\n    : loModule;\n};\n","import { flatten, mapValues } from '../../common/core.helpers';\nimport coreReflectProvidedIn from '../../common/core.reflect.provided-in';\nimport { AnyDeclaration, Type } from '../../common/core.types';\nimport errorJestMock from '../../common/error.jest-mock';\nimport funcGetName from '../../common/func.get-name';\nimport funcGetType from '../../common/func.get-type';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport { isNgInjectionToken } from '../../common/func.is-ng-injection-token';\nimport { isStandalone } from '../../common/func.is-standalone';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport markExported from '../../mock/mark-exported';\nimport markProviders from '../../mock-module/mark-providers';\n\nimport initModule from './init-module';\nimport { BuilderData, NgMeta } from './types';\n\nconst skipDef = (def: any): boolean =>\n  ngMocksUniverse.touches.has(def) || isNgDef(def) || isNgInjectionToken(def) || typeof def === 'string';\n\nconst handleDef = ({ imports, declarations, providers }: NgMeta, def: any, defProviders: Map<any, any>): void => {\n  if (!skipDef(def)) {\n    errorJestMock(def);\n  }\n\n  let touched = false;\n\n  if (isNgDef(def, 'm')) {\n    const extendedDef = initModule(def, defProviders);\n    imports.push(extendedDef);\n    touched = true;\n\n    // adding providers to touches\n    if (typeof extendedDef === 'object' && extendedDef.providers) {\n      for (const provider of flatten(extendedDef.providers)) {\n        ngMocksUniverse.touches.add(funcGetType(provider));\n      }\n    }\n  }\n\n  if (isNgDef(def, 'c') || isNgDef(def, 'd') || isNgDef(def, 'p')) {\n    (isStandalone(def) ? imports : declarations).push(ngMocksUniverse.getBuildDeclaration(def));\n    touched = true;\n  }\n\n  if (isNgDef(def, 'i') || !isNgDef(def)) {\n    const mock = ngMocksUniverse.builtProviders.get(def);\n    if (mock && typeof mock !== 'string' && isNgDef(mock, 't') === false) {\n      providers.push(mock);\n      touched = true;\n    }\n  }\n\n  if (touched) {\n    markExported(def);\n    ngMocksUniverse.touches.add(def);\n  }\n};\n\nconst isExportedOnRoot = (\n  def: any,\n  configInstance: Map<any, { exported?: Set<any> }>,\n  configDef: Map<any, any>,\n): undefined | Type<any> => {\n  const cnfInstance = configInstance.get(def);\n  const cnfDef = configDef.get(def) || /* istanbul ignore next */ {};\n\n  if (isNgDef(def, 'm') && cnfDef.onRoot) {\n    return def;\n  }\n\n  if (!cnfInstance?.exported) {\n    return def;\n  }\n\n  for (const parent of mapValues(cnfInstance.exported)) {\n    const returnModule = isExportedOnRoot(parent, configInstance, configDef);\n    // istanbul ignore else\n    if (returnModule) {\n      return returnModule;\n    }\n  }\n\n  return undefined;\n};\n\nconst moveModulesUp = <T>(a: T, b: T) => {\n  const isA = isNgDef(a, 'm');\n  const isB = isNgDef(b, 'm');\n  if (isA && isB) {\n    return 0;\n  }\n  if (isA) {\n    return -1;\n  }\n  if (isB) {\n    return 1;\n  }\n  return 0;\n};\n\nexport default ({ configDefault, keepDef, mockDef, replaceDef }: BuilderData, defProviders: Map<any, any>): NgMeta => {\n  const meta: NgMeta = { imports: [], declarations: [], providers: [] };\n\n  const processed: AnyDeclaration<any>[] = [];\n  const forgotten: AnyDeclaration<any>[] = [];\n\n  const defs = [...mapValues(mockDef), ...mapValues(keepDef), ...mapValues(replaceDef)];\n  defs.sort(moveModulesUp);\n\n  // Adding suitable leftovers.\n  for (const originalDef of defs) {\n    const def =\n      isNgDef(originalDef, 'm') && defProviders.has(originalDef)\n        ? originalDef\n        : isExportedOnRoot(originalDef, ngMocksUniverse.configInstance, ngMocksUniverse.config);\n    if (!def || processed.indexOf(def) !== -1) {\n      continue;\n    }\n    const cnfDef = ngMocksUniverse.config.get(def) || /* istanbul ignore next */ { __set: true };\n    processed.push(def);\n    cnfDef.onRoot = cnfDef.onRoot || !cnfDef.dependency;\n    // istanbul ignore if\n    if (cnfDef.__set) {\n      cnfDef.__set = undefined;\n      ngMocksUniverse.config.set(def, cnfDef);\n    }\n\n    if (isNgDef(def, 'm') && cnfDef.onRoot) {\n      handleDef(meta, def, defProviders);\n    } else if (!cnfDef.dependency && cnfDef.export && (isNgDef(def, 'i') || !isNgDef(def))) {\n      handleDef(meta, def, defProviders);\n      markProviders([def]);\n    } else if (!cnfDef.dependency && cnfDef.export) {\n      handleDef(meta, def, defProviders);\n    } else if (!ngMocksUniverse.touches.has(def) && !cnfDef.dependency) {\n      handleDef(meta, def, defProviders);\n    } else if (\n      cnfDef.dependency &&\n      configDefault.dependency &&\n      coreReflectProvidedIn(def) !== 'root' &&\n      (typeof def !== 'object' || !(def as any).__ngMocksSkip)\n    ) {\n      forgotten.push(def);\n    }\n  }\n\n  // Checking missing dependencies\n  const globalFlags = ngMocksUniverse.global.get('flags');\n  for (const def of forgotten) {\n    if (ngMocksUniverse.touches.has(def)) {\n      continue;\n    }\n\n    const errorMessage = [\n      `MockBuilder has found a missing dependency: ${funcGetName(def)}.`,\n      'It means no module provides it.',\n      'Please, use the \"export\" flag if you want to add it explicitly.',\n      'https://ng-mocks.sudo.eu/api/MockBuilder#export-flag',\n    ].join(' ');\n\n    if (globalFlags.onMockBuilderMissingDependency === 'warn') {\n      console.warn(errorMessage);\n    } else if (globalFlags.onMockBuilderMissingDependency === 'throw') {\n      throw new Error(errorMessage);\n    }\n  }\n\n  return meta;\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport coreConfig from './core.config';\nimport { flatten } from './core.helpers';\nimport { AnyDeclaration } from './core.types';\nimport { getNgType } from './func.get-ng-type';\nimport funcGetType from './func.get-type';\n\nexport const funcExtractDeps = (\n  def: any,\n  result: Set<AnyDeclaration<any>>,\n  recursive = false,\n): Set<AnyDeclaration<any>> => {\n  const meta = collectDeclarations(def);\n  const type = getNgType(def);\n  // istanbul ignore if\n  if (!type || type === 'Injectable') {\n    return result;\n  }\n\n  const decorator = meta[type];\n  for (const field of coreConfig.dependencies) {\n    if (!decorator[field]) {\n      continue;\n    }\n\n    for (const item of flatten(decorator[field])) {\n      // istanbul ignore if: it is here for standalone things, however they don't support modules with providers.\n      const itemType = funcGetType(item);\n      if (!result.has(itemType)) {\n        result.add(itemType);\n        if (recursive) {\n          funcExtractDeps(itemType, result);\n        }\n      }\n    }\n  }\n\n  return result;\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (excludeDef: Set<any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const builtProviders = ngMocksUniverse.builtProviders;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(excludeDef)) {\n    builtDeclarations.set(def, null);\n    builtProviders.set(def, null);\n    resolutions.set(def, 'exclude');\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport { funcExtractDeps } from '../../common/func.extract-deps';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (keepDef: Set<any>, configDef: Map<any, any>): Set<any> => {\n  const dependencies = new Set<any>();\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const builtProviders = ngMocksUniverse.builtProviders;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(keepDef)) {\n    builtDeclarations.set(def, def);\n    builtProviders.set(def, def);\n    resolutions.set(def, 'keep');\n\n    const config = configDef.get(def);\n    if (config.shallow) {\n      funcExtractDeps(def, dependencies);\n    }\n  }\n\n  return dependencies;\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport mockHelperStub from '../../mock-helper/mock-helper.stub';\nimport helperUseFactory from '../../mock-service/helper.use-factory';\nimport mockProvider from '../../mock-service/mock-provider';\nimport { IMockBuilderConfigMock } from '../types';\n\nconst createInstance = (existing: any, params: any, config: IMockBuilderConfigMock): any => {\n  if (config.precise) {\n    return params;\n  }\n\n  return mockHelperStub(existing, params);\n};\n\nexport default (def: any, defValue: Map<any, any>): void => {\n  if (isNgDef(def, 'i') && defValue.has(def)) {\n    const config: IMockBuilderConfigMock = ngMocksUniverse.config.get(def);\n    const instance = defValue.get(def);\n    ngMocksUniverse.builtProviders.set(\n      def,\n      helperUseFactory(def, undefined, existing => createInstance(existing, instance, config)),\n    );\n  } else if (isNgDef(def, 'i')) {\n    ngMocksUniverse.builtProviders.set(def, mockProvider(def, true));\n  }\n\n  if (!isNgDef(def) && defValue.has(def)) {\n    const instance = defValue.get(def);\n    ngMocksUniverse.builtProviders.set(\n      def,\n      helperUseFactory(def, undefined, () => instance),\n    );\n  } else if (!isNgDef(def)) {\n    ngMocksUniverse.builtProviders.set(def, mockProvider(def, true));\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport tryMockProvider from './try-mock-provider';\n\nexport default (mockDef: Set<any>, defValue: Map<any, any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const resolutions: Map<any, string> = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(mockDef)) {\n    const deleteTouch = !ngMocksUniverse.touches.has(def);\n\n    resolutions.set(def, 'mock');\n    builtDeclarations.set(def, undefined);\n    tryMockProvider(def, defValue);\n\n    if (deleteTouch) {\n      ngMocksUniverse.touches.delete(def);\n    }\n  }\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport { MockComponent } from '../../mock-component/mock-component';\nimport { MockDirective } from '../../mock-directive/mock-directive';\nimport { MockPipe } from '../../mock-pipe/mock-pipe';\n\nexport default (def: any): void => {\n  if (ngMocksUniverse.builtDeclarations.get(def) !== undefined) {\n    return;\n  }\n\n  if (isNgDef(def, 'c')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockComponent(def));\n  }\n  if (isNgDef(def, 'd')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockDirective(def));\n  }\n  if (isNgDef(def, 'p')) {\n    ngMocksUniverse.builtDeclarations.set(def, MockPipe(def));\n  }\n};\n","import { mapValues } from '../../common/core.helpers';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\nimport { MockModule } from '../../mock-module/mock-module';\nimport mockNgDef from '../../mock-module/mock-ng-def';\nimport collectDeclarations from '../../resolve/collect-declarations';\n\nimport tryMockDeclaration from './try-mock-declaration';\n\nexport default (\n  keepDef: Set<any>,\n  mockDef: Set<any>,\n  replaceDef: Set<any>,\n  defProviders: Map<any, any>,\n): Map<any, any> => {\n  const loProviders = new Map();\n\n  for (const def of [...mapValues(keepDef), ...mapValues(mockDef), ...mapValues(replaceDef)]) {\n    const meta = collectDeclarations(def);\n    const providers = [\n      ...(defProviders.get(def) ?? []),\n      ...(meta.Component?.providers ?? []),\n      ...(meta.Directive?.providers ?? []),\n    ];\n\n    const deleteTouch = !ngMocksUniverse.touches.has(def);\n    if (!mockDef.has(def)) {\n      ngMocksUniverse.flags.add('skipMock');\n    }\n\n    const isModule = isNgDef(def, 'm');\n    if (providers.length > 0) {\n      const [, loDef] = mockNgDef({ providers, skipMarkProviders: !isModule, skipExports: true });\n      loProviders.set(def, loDef.providers);\n    }\n    if (isModule) {\n      ngMocksUniverse.builtDeclarations.set(def, MockModule(def));\n    }\n\n    ngMocksUniverse.flags.delete('skipMock');\n    if (deleteTouch) {\n      ngMocksUniverse.touches.delete(def);\n    }\n  }\n  for (const def of mapValues(mockDef)) {\n    tryMockDeclaration(def);\n  }\n\n  return loProviders;\n};\n","import { mapValues } from '../../common/core.helpers';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nexport default (replaceDef: Set<any>, defValue: Map<any, any>): void => {\n  const builtDeclarations = ngMocksUniverse.builtDeclarations;\n  const resolutions = ngMocksUniverse.config.get('ngMocksDepsResolution');\n  for (const def of mapValues(replaceDef)) {\n    builtDeclarations.set(def, defValue.get(def));\n    resolutions.set(def, 'replace');\n  }\n};\n","import { mapEntries, mapValues } from '../../common/core.helpers';\nimport { funcExtractDeps } from '../../common/func.extract-deps';\nimport ngMocksUniverse from '../../common/ng-mocks-universe';\n\nimport initExcludeDef from './init-exclude-def';\nimport initKeepDef from './init-keep-def';\nimport initMockDeclarations from './init-mock-declarations';\nimport initModules from './init-modules';\nimport initReplaceDef from './init-replace-def';\nimport { BuilderData } from './types';\n\nexport default ({\n  configDef,\n  defProviders,\n  defValue,\n  excludeDef,\n  keepDef,\n  mockDef,\n  replaceDef,\n}: BuilderData): Map<any, any> => {\n  ngMocksUniverse.flags.add('cachePipe');\n\n  // collecting multi flags of providers.\n  ngMocksUniverse.config.set('ngMocksMulti', new Set());\n  // collecting all deps of providers.\n  ngMocksUniverse.config.set('ngMocksDeps', new Set());\n  // collecting all declarations of kept modules.\n  ngMocksUniverse.config.set('ngMocksDepsSkip', new Set());\n  // flags to understand how to mock nested declarations.\n  ngMocksUniverse.config.set('ngMocksDepsResolution', new Map());\n\n  const dependencies = initKeepDef(keepDef, configDef);\n  for (const dependency of mapValues(dependencies)) {\n    ngMocksUniverse.touches.add(dependency);\n  }\n  for (const dependency of mapValues(keepDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(mockDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(replaceDef)) {\n    dependencies.add(dependency);\n    funcExtractDeps(dependency, dependencies, true);\n  }\n  for (const dependency of mapValues(dependencies)) {\n    if (configDef.has(dependency)) {\n      continue;\n    }\n\n    // Checking global configuration for the dependency.\n    const resolution = ngMocksUniverse.getResolution(dependency);\n    if (resolution === 'replace') {\n      replaceDef.add(dependency);\n      defValue.set(dependency, ngMocksUniverse.getBuildDeclaration(dependency));\n    } else if (resolution === 'keep') {\n      keepDef.add(dependency);\n    } else if (resolution === 'exclude') {\n      excludeDef.add(dependency);\n    } else if (resolution === 'mock') {\n      mockDef.add(dependency);\n    } else if (ngMocksUniverse.touches.has(dependency)) {\n      mockDef.add(dependency);\n    }\n\n    configDef.set(\n      dependency,\n      ngMocksUniverse.touches.has(dependency)\n        ? {\n            dependency: true,\n            __internal: true,\n          }\n        : {},\n    );\n  }\n\n  for (const [k, v] of mapEntries(configDef)) {\n    ngMocksUniverse.config.set(k, {\n      ...ngMocksUniverse.getConfigMock().get(k),\n      ...v,\n      defValue: defValue.get(k),\n    });\n  }\n\n  initReplaceDef(replaceDef, defValue);\n  initExcludeDef(excludeDef);\n  initMockDeclarations(mockDef, defValue);\n\n  return initModules(keepDef, mockDef, replaceDef, defProviders);\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\n\nexport default (\n  def: any,\n  a1: any,\n  a2: any,\n  defaultMockValue: any,\n): {\n  config: any;\n  mock: any;\n} => {\n  let mock: any = def === a1 ? defaultMockValue : a1;\n  let config: any = a2 ?? (a1 !== defaultMockValue && typeof a1 === 'object' ? a1 : undefined);\n  if (isNgDef(def, 'p') && typeof a1 === 'function' && a1 !== def && !isNgDef(a1, 'p')) {\n    mock = {\n      transform: a1,\n    };\n    config = a2;\n  } else if (isNgDef(def, 'i') || !isNgDef(def)) {\n    config = a2;\n  }\n  mock = mock === config ? defaultMockValue : mock;\n\n  return {\n    config,\n    mock,\n  };\n};\n","import funcGetType from '../../common/func.get-type';\n\nexport default (\n  provider: any,\n): {\n  multi: boolean;\n  provide: any;\n} => {\n  const provide = funcGetType(provider);\n  const multi = provide !== provider && provider.multi;\n\n  return {\n    multi,\n    provide,\n  };\n};\n","import { NgModule } from '@angular/core';\nimport { TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten, mapValues } from '../common/core.helpers';\nimport { Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport { MockBuilder } from './mock-builder';\nimport { MockBuilderStash } from './mock-builder-stash';\nimport addRequestedProviders from './promise/add-requested-providers';\nimport applyPlatformModules from './promise/apply-platform-modules';\nimport createNgMocksOverridesToken from './promise/create-ng-mocks-overrides-token';\nimport createNgMocksToken from './promise/create-ng-mocks-token';\nimport createNgMocksTouchesToken from './promise/create-ng-mocks-touches-token';\nimport handleEntryComponents from './promise/handle-entry-components';\nimport handleRootProviders from './promise/handle-root-providers';\nimport initNgModules from './promise/init-ng-modules';\nimport initUniverse from './promise/init-universe';\nimport parseMockArguments from './promise/parse-mock-arguments';\nimport parseProvider from './promise/parse-provider';\nimport { BuilderData } from './promise/types';\nimport {\n  IMockBuilder,\n  IMockBuilderConfig,\n  IMockBuilderConfigAll,\n  IMockBuilderProvider,\n  IMockBuilderResult,\n} from './types';\n\nconst normaliseModule = (\n  module: any,\n): {\n  def: Type<any>;\n  providers?: NgModule['providers'];\n} =>\n  isNgModuleDefWithProviders(module)\n    ? { def: module.ngModule, providers: module.providers }\n    : { def: module, providers: undefined };\n\nconst generateProviderValue = (provider: any, existing: any, multi: boolean): any =>\n  multi ? [...(Array.isArray(existing) ? existing : /* istanbul ignore next */ []), provider] : provider;\n\nconst defaultMock = {}; // simulating Symbol\n\nexport interface MockBuilderPromise {\n  [Symbol.toStringTag]: 'Promise';\n}\n\nexport class MockBuilderPromise implements IMockBuilder {\n  protected beforeCC: Set<(testBed: TestBedStatic) => void> = new Set();\n  protected configDef: BuilderData['configDef'] = new Map();\n  protected defProviders: BuilderData['defProviders'] = new Map();\n  protected defValue: BuilderData['defValue'] = new Map();\n  protected excludeDef: BuilderData['excludeDef'] = new Set();\n  protected keepDef: BuilderData['keepDef'] = new Set();\n  protected mockDef: BuilderData['mockDef'] = new Set();\n  protected providerDef: BuilderData['providerDef'] = new Map();\n  protected replaceDef: BuilderData['replaceDef'] = new Set();\n  protected stash: MockBuilderStash = new MockBuilderStash();\n\n  public constructor(protected configDefault: IMockBuilderConfigAll) {\n    // istanbul ignore else\n    if (typeof Symbol !== 'undefined') {\n      (this as any)[Symbol.toStringTag] = 'Promise';\n    }\n  }\n\n  public beforeCompileComponents(callback: (testBed: TestBedStatic) => void): this {\n    this.beforeCC.add(callback);\n\n    return this;\n  }\n\n  public build(): TestModuleMetadata {\n    this.stash.backup();\n    const defStack = new CoreDefStack();\n    ngMocksUniverse.config.set('mockNgDefResolver', defStack);\n    ngMocksUniverse.flags.add('hasRootModule');\n\n    try {\n      const params = this.combineParams();\n\n      const ngModule = initNgModules(params, initUniverse(params));\n      addRequestedProviders(ngModule, params, defStack);\n      handleRootProviders(ngModule, params, defStack);\n      handleEntryComponents(ngModule);\n      applyPlatformModules();\n\n      ngModule.providers.push(\n        createNgMocksToken(),\n        createNgMocksTouchesToken(),\n        createNgMocksOverridesToken(this.replaceDef, this.defValue),\n        MockBuilder as never,\n      );\n\n      return ngModule;\n    } finally {\n      ngMocksUniverse.flags.delete('hasRootModule');\n      ngMocksUniverse.config.delete('mockNgDefResolver');\n      this.stash.restore();\n    }\n  }\n\n  // istanbul ignore next\n  public async catch(reject?: ((reason: any) => PromiseLike<never>) | undefined | null): Promise<IMockBuilderResult> {\n    return this.then().catch(reject);\n  }\n\n  public exclude(def: any): this {\n    this.wipe(def);\n    this.excludeDef.add(def);\n    this.setConfigDef(def);\n\n    return this;\n  }\n\n  // istanbul ignore next\n  public async finally(callback?: (() => void) | null | undefined): Promise<IMockBuilderResult> {\n    return this.then().finally(callback);\n  }\n\n  public keep(input: any, config?: IMockBuilderConfig): this {\n    const { def, providers } = normaliseModule(input);\n\n    const existing = this.keepDef.has(def) ? this.defProviders.get(def) : [];\n    this.wipe(def);\n    this.keepDef.add(def);\n\n    // a magic to support modules with providers.\n    if (providers) {\n      this.defProviders.set(def, [...(existing || /* istanbul ignore next */ []), ...providers]);\n    }\n\n    this.setConfigDef(def, config);\n\n    return this;\n  }\n\n  public mock(input: any, a1: any = defaultMock, a2?: any): this {\n    const { def, providers } = normaliseModule(input);\n\n    const { config, mock } = parseMockArguments(def, a1, a2, defaultMock);\n    if (isNgDef(mock) && isNgDef(input) && !isNgDef(input, 't')) {\n      throw new Error(\n        [\n          `MockBuilder.mock(${funcGetName(input)}) received a class when its shape is expected.`,\n          'Please try ngMocks.defaultMock instead.',\n        ].join(' '),\n      );\n    }\n\n    const existing = this.mockDef.has(def) ? this.defProviders.get(def) : [];\n    this.wipe(def);\n    this.mockDef.add(def);\n\n    // a magic to support modules with providers.\n    if (providers) {\n      this.defProviders.set(def, [...(existing || /* istanbul ignore next */ []), ...providers]);\n    }\n\n    this.setDefValue(def, mock);\n    this.setConfigDef(def, config);\n\n    return this;\n  }\n\n  public provide(def: IMockBuilderProvider): this {\n    for (const provider of flatten(def)) {\n      const { provide, multi } = parseProvider(provider);\n      const existing = this.providerDef.has(provide) ? this.providerDef.get(provide) : [];\n      this.providerDef.set(provide, generateProviderValue(provider, existing, multi));\n    }\n\n    return this;\n  }\n\n  public replace(source: Type<any>, destination: Type<any>, config?: IMockBuilderConfig): this {\n    if (!isNgDef(destination) || !isNgDef(source) || isNgDef(destination, 'i') || isNgDef(source, 'i')) {\n      throw new Error(\n        'Cannot replace the declaration, both have to be a Module, a Component, a Directive or a Pipe, for Providers use `.mock` or `.provide`',\n      );\n    }\n\n    this.wipe(source);\n    this.replaceDef.add(source);\n    this.defValue.set(source, destination);\n    this.setConfigDef(source, config);\n\n    return this;\n  }\n\n  // eslint-disable-next-line unicorn/no-thenable\n  public async then<TResult1 = IMockBuilderResult>(\n    fulfill?: ((value: IMockBuilderResult) => PromiseLike<TResult1>) | undefined | null,\n    reject?: ((reason: any) => PromiseLike<any>) | undefined | null,\n  ): Promise<TResult1> {\n    const promise = new Promise((resolve: (value: IMockBuilderResult) => void): void => {\n      const testBed: TestBedStatic = TestBed.configureTestingModule(this.build()) as never;\n      for (const callback of mapValues(this.beforeCC)) {\n        callback(testBed);\n      }\n      const testBedPromise = testBed.compileComponents();\n      testBedPromise.then(() => {\n        resolve({ testBed });\n      });\n    });\n\n    return promise.then(fulfill, reject);\n  }\n\n  private combineParams(): BuilderData {\n    return {\n      configDef: this.configDef,\n      configDefault: this.configDefault,\n      defProviders: this.defProviders,\n      defValue: this.defValue,\n      excludeDef: this.excludeDef,\n      keepDef: this.keepDef,\n      mockDef: this.mockDef,\n      providerDef: this.providerDef,\n      replaceDef: this.replaceDef,\n    };\n  }\n\n  private setConfigDef(def: any, config?: any): void {\n    if (config || !this.configDef.has(def)) {\n      this.configDef.set(def, config ?? this.configDefault);\n    }\n  }\n\n  private setDefValue(def: any, mock: any): void {\n    if (mock === defaultMock) {\n      this.defValue.delete(def);\n    } else {\n      this.defValue.set(def, mock);\n    }\n  }\n\n  private wipe(def: Type<any>): void {\n    this.defProviders.delete(def);\n    this.defValue.delete(def);\n    this.excludeDef.delete(def);\n    this.keepDef.delete(def);\n    this.mockDef.delete(def);\n    this.providerDef.delete(def);\n    this.replaceDef.delete(def);\n  }\n}\n","const objectsDiffer = (prototype: any, source: any): boolean => {\n  const prototypeKeys = Object.keys(prototype);\n  const sourceKeys = Object.keys(source);\n  if (prototypeKeys.length !== sourceKeys.length) {\n    return true;\n  }\n  for (const key of prototypeKeys) {\n    if (prototype[key] !== source[key]) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default (prototype: any, source: any): boolean => {\n  if (prototype === source) {\n    return true;\n  }\n  if ((prototype && !source) || (!prototype && source)) {\n    return false;\n  }\n  if (objectsDiffer(prototype, source)) {\n    return false;\n  }\n\n  return true;\n};\n","import equalVariables from './equal-variables';\n\nexport default (prototype: any, source: any): boolean => {\n  if (prototype === source) {\n    return true;\n  }\n  if ((typeof prototype === 'boolean' || typeof source === 'boolean') && prototype !== source) {\n    return false;\n  }\n\n  return prototype.$implicit === source.$implicit && equalVariables(prototype.variables, source.variables);\n};\n","import equalRenderDefs from './equal-render-defs';\n\nconst objectsDiffer = (destination: any, source: any): boolean => {\n  if (Object.keys(destination).length !== Object.keys(source).length) {\n    return true;\n  }\n  for (const key of Object.keys(destination)) {\n    if (!equalRenderDefs(destination[key], source[key])) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default (source: any, destination: any): boolean => {\n  if (!equalRenderDefs(destination, source)) {\n    return false;\n  }\n  if (typeof destination !== 'object' || typeof source !== 'object') {\n    return true;\n  }\n  if (objectsDiffer(destination, source)) {\n    return false;\n  }\n\n  return true;\n};\n","import equalRenderConfigs from './equal-render-configs';\n\nexport default (source: any, destination: any): boolean => {\n  if (destination === source) {\n    return true;\n  }\n  if (destination.dependency !== source.dependency) {\n    return false;\n  }\n  if (destination.export !== source.export) {\n    return false;\n  }\n  if (destination.exportAll !== source.exportAll) {\n    return false;\n  }\n  if (!equalRenderConfigs(source.render, destination.render)) {\n    return false;\n  }\n\n  return true;\n};\n","import { mapKeys } from '../../common/core.helpers';\n\nexport default (source: Map<any, any>, destination: Map<any, any>, compare = (a: any, b: any) => a === b): boolean => {\n  if (!destination || destination.size !== source.size) {\n    return false;\n  }\n  for (const value of mapKeys(source)) {\n    if (!destination.has(value)) {\n      return false;\n    }\n    if (!compare(destination.get(value), source.get(value))) {\n      return false;\n    }\n  }\n\n  return true;\n};\n","import { flatten } from '../../common/core.helpers';\n\nconst areEqualProviderDefs = (thisDef: any, prototypeDef: any, ...keys: string[]) => {\n  for (const key of keys) {\n    if (prototypeDef && thisDef && prototypeDef[key] && thisDef[key] && prototypeDef[key] === thisDef[key]) {\n      return true;\n    }\n  }\n\n  return prototypeDef === thisDef;\n};\n\nexport default (prototype: any, source: any): boolean => {\n  if (Array.isArray(prototype) !== Array.isArray(source)) {\n    return false;\n  }\n\n  const [prototypeDefs, thisDefs] = [flatten(prototype), flatten(source)];\n  if (prototypeDefs.length !== thisDefs.length) {\n    return false;\n  }\n\n  for (let index = 0; index < prototypeDefs.length; index += 1) {\n    const [prototypeDef, thisDef] = [prototypeDefs[index], thisDefs[index]];\n\n    if (prototypeDef && thisDef && prototypeDef.multi !== thisDef.multi) {\n      return false;\n    }\n    if (areEqualProviderDefs(thisDef, prototypeDef, 'useValue', 'useClass', 'useFactory', 'useExisting')) {\n      continue;\n    }\n\n    return false;\n  }\n\n  return true;\n};\n","import { mapValues } from '../../common/core.helpers';\n\nexport default (source: Set<any>, destination: Set<any>): boolean => {\n  if (!destination || destination.size !== source.size) {\n    return false;\n  }\n  for (const value of mapValues(source)) {\n    if (!destination.has(value)) {\n      return false;\n    }\n  }\n\n  return true;\n};\n","export default () => ({\n  beforeCC: new Set(),\n  configDef: new Map(),\n  defProviders: new Map(),\n  defValue: new Map(),\n  excludeDef: new Set(),\n  keepDef: new Set(),\n  mockDef: new Set(),\n  providerDef: new Map(),\n  replaceDef: new Set(),\n});\n","import { TestModuleMetadata } from '@angular/core/testing';\n\nexport default (\n  ngModule: TestModuleMetadata,\n): TestModuleMetadata & {\n  declarations: any[];\n  imports: any[];\n  providers: any[];\n} => ({\n  ...ngModule,\n  declarations: [...(ngModule.declarations || /* istanbul ignore next */ [])],\n  imports: [...(ngModule.imports || /* istanbul ignore next */ [])],\n  providers: [...(ngModule.providers || /* istanbul ignore next */ [])],\n});\n","import { TestBed, TestModuleMetadata } from '@angular/core/testing';\n\nimport { mapEntries, mapValues } from '../common/core.helpers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport { MockBuilderPromise } from './mock-builder.promise';\nimport areEqualConfigParams from './performance/are-equal-config-params';\nimport areEqualMaps from './performance/are-equal-maps';\nimport areEqualProviders from './performance/are-equal-providers';\nimport areEqualSets from './performance/are-equal-sets';\nimport getEmptyConfig from './performance/get-empty-config';\nimport requiredMetadata from './performance/required-metadata';\nimport { IMockBuilderResult } from './types';\n\nexport class MockBuilderPerformance extends MockBuilderPromise {\n  public build(): TestModuleMetadata {\n    const global = ngMocksUniverse.global;\n\n    // avoiding influences on cache when users extend the testing module.\n    if (global.has('builder:module') && global.has('builder:config') && this.equalsTo(global.get('builder:config'))) {\n      return requiredMetadata(global.get('builder:module'));\n    }\n\n    // removal of cached promise in case of mismatch\n    if (global.has('builder:module')) {\n      global.delete(global.get('builder:module'));\n    }\n\n    const clone = this.cloneConfig();\n    const ngModule = super.build();\n    global.set('builder:config', clone);\n    global.set('builder:module', ngModule);\n\n    // avoiding influences on cache when users extend the testing module.\n    return requiredMetadata(ngModule);\n  }\n\n  // eslint-disable-next-line unicorn/no-thenable\n  public async then<TResult1 = IMockBuilderResult>(\n    fulfill?: ((value: IMockBuilderResult) => PromiseLike<TResult1>) | undefined | null,\n    reject?: ((reason: any) => PromiseLike<never>) | undefined | null,\n  ): Promise<TResult1> {\n    const global = ngMocksUniverse.global;\n\n    const flags = global.has('bullet') && global.has('builder:module') && global.has('builder:config');\n    if (flags && this.equalsTo(global.get('builder:config'))) {\n      return global.get(global.get('builder:module')).then(fulfill, reject);\n    }\n\n    // we need to reset testing module in case if we are in bullet mode but current module does not match.\n    if (global.has('bullet') && global.has('bullet:reset')) {\n      console.warn('ngMocks.faster has zero effect due to changes in testing module between runs');\n      global.delete('bullet');\n      TestBed.resetTestingModule();\n      global.set('bullet', true);\n    }\n\n    const promise = super.then(fulfill, reject);\n    global.set(global.get('builder:module'), promise);\n\n    return promise;\n  }\n\n  private cloneConfig() {\n    const config = getEmptyConfig();\n\n    mapValues(this.beforeCC, config.beforeCC);\n    mapValues(this.excludeDef, config.excludeDef);\n    mapValues(this.keepDef, config.keepDef);\n    mapValues(this.mockDef, config.mockDef);\n    mapValues(this.replaceDef, config.replaceDef);\n\n    mapEntries(this.configDef, config.configDef);\n    mapEntries(this.defProviders, config.defProviders);\n    mapEntries(this.defValue, config.defValue);\n    mapEntries(this.providerDef, config.providerDef);\n\n    return config;\n  }\n\n  private equalsTo(prototype: Record<keyof any, any>): boolean {\n    for (const key of ['beforeCC', 'keepDef', 'replaceDef', 'excludeDef', 'mockDef']) {\n      if (!areEqualSets((this as any)[key], prototype[key])) {\n        return false;\n      }\n    }\n    for (const key of ['defValue']) {\n      if (!areEqualMaps((this as any)[key], prototype[key])) {\n        return false;\n      }\n    }\n    for (const key of ['providerDef', 'defProviders']) {\n      if (!areEqualMaps((this as any)[key], prototype[key], areEqualProviders)) {\n        return false;\n      }\n    }\n\n    return areEqualMaps(this.configDef, prototype.configDef, areEqualConfigParams);\n  }\n}\n","import coreDefineProperty from '../common/core.define-property';\nimport { flatten, mapKeys } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { isStandalone } from '../common/func.is-standalone';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport helperExtractPropertyDescriptor from '../mock-service/helper.extract-property-descriptor';\n\nimport { MockBuilderPerformance } from './mock-builder.performance';\nimport { IMockBuilder, IMockBuilderExtended } from './types';\n\nexport type MockBuilderParam = string | AnyDeclaration<any> | NgModuleWithProviders;\n\n/**\n * MockBuilder provides reach and simple interfaces of chain functions\n * to build desired mock environment for tests.\n *\n * @see https://ng-mocks.sudo.eu/api/MockBuilder\n */\nexport function MockBuilder(\n  keepDeclaration?: MockBuilderParam | MockBuilderParam[] | null | undefined,\n  itsModuleAndDependenciesToMock?: MockBuilderParam | MockBuilderParam[] | null | undefined,\n): IMockBuilderExtended;\n\nexport function MockBuilder(...args: Array<MockBuilderParam | MockBuilderParam[] | null | undefined>): IMockBuilder {\n  const [keep, mock] = args;\n\n  const instance = new MockBuilderPerformance(args.length < 2 ? { export: true } : { dependency: true });\n  const extensions: Map<any, any> = ngMocksUniverse.config.get('MockBuilderExtensions');\n  for (const func of extensions ? mapKeys(extensions) : []) {\n    if (helperExtractPropertyDescriptor(instance, func)) {\n      throw new Error(`MockBuilder.${func} is a base method and cannot be customized, please use a different name.`);\n    }\n    coreDefineProperty(instance, func, (...args: Array<any>) => {\n      extensions.get(func)(instance, args);\n      return instance;\n    });\n  }\n\n  if (keep) {\n    for (const declaration of flatten(keep)) {\n      instance.keep(declaration, {\n        export: true,\n        shallow: isStandalone(declaration),\n      });\n    }\n  }\n  if (mock) {\n    for (const declaration of flatten(mock)) {\n      instance.mock(declaration, declaration, {\n        export: true,\n        exportAll: true,\n      });\n    }\n  }\n\n  return instance;\n}\n\nfunction mockBuilderExtend<K extends keyof IMockBuilderExtended & string>(\n  func: K,\n  callback?: (builder: IMockBuilderExtended, parameters: never) => void,\n): void {\n  const extensions: Map<string, typeof callback> = ngMocksUniverse.config.get('MockBuilderExtensions') ?? new Map();\n  if (callback) {\n    extensions.set(func, callback);\n    ngMocksUniverse.config.set('MockBuilderExtensions', extensions);\n  } else {\n    extensions.delete(func);\n  }\n}\n\n// istanbul ignore next: issue in istanbul https://github.com/istanbuljs/nyc/issues/1209\nexport namespace MockBuilder {\n  /**\n   * Adds a custom function to MockBuilder\n   */\n  export function extend<K extends keyof IMockBuilderExtended & string>(\n    func: K,\n    callback: (builder: IMockBuilderExtended, parameters: never) => void,\n  ): void;\n\n  /**\n   * Removes a custom function from MockBuilder\n   */\n  export function extend<K extends keyof IMockBuilderExtended & string>(func: K): void;\n\n  export function extend<K extends keyof IMockBuilderExtended & string>(\n    func: K,\n    callback?: (builder: IMockBuilderExtended, parameters: never) => void,\n  ): void {\n    mockBuilderExtend(func, callback);\n  }\n}\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (value: any): value is MockedDebugNode => {\n  return !!value?.nativeElement || !!value?.nativeNode;\n};\n","import { AnyType, DebugNodeSelector } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nexport default (selector: AnyType<any> | DebugNodeSelector): string => {\n  if (typeof selector === 'string') {\n    return selector;\n  }\n  if (typeof selector === 'function') {\n    return selector.name;\n  }\n  if (isNgDef(selector, 't')) {\n    return (selector as any)._desc;\n  }\n  if (Array.isArray(selector)) {\n    return selector[0];\n  }\n  if (!selector) {\n    return '<EMPTY>';\n  }\n\n  return '<UNKNOWN>';\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (value: any): value is { debugElement: MockedDebugNode } => {\n  return !!value && typeof value === 'object' && value.debugElement !== undefined;\n};\n","import { DebugElement } from '@angular/core';\n\nimport isFixture from '../format/is-fixture';\nimport funcGetLastFixture from '../func.get-last-fixture';\n\nconst findDebugElement = (el: any): DebugElement | undefined => {\n  if (isFixture(el)) {\n    return findDebugElement(el.debugElement);\n  }\n  if (el && el.injector && el.query) {\n    return el;\n  }\n\n  return undefined;\n};\n\nexport default (args: any[], defaultNotFoundValue?: any): [any, any, any] => {\n  let el;\n  let sel;\n  let notFoundValue = defaultNotFoundValue;\n  if (args.length === 3) {\n    el = findDebugElement(args[0]);\n    sel = args[1];\n    notFoundValue = args[2];\n  } else if (args.length === 1) {\n    el = findDebugElement(funcGetLastFixture());\n    [sel] = args;\n  } else if (args[0]) {\n    el = findDebugElement(args[0]);\n    if (el) {\n      sel = args[1];\n    } else {\n      el = findDebugElement(funcGetLastFixture());\n      [sel, notFoundValue] = args;\n    }\n  } else {\n    sel = args[1];\n  }\n  sel = findDebugElement(sel) ?? sel;\n\n  return [el, sel, notFoundValue];\n};\n","var x = (y) => {\n\tvar x = {}; __webpack_require__.d(x, y); return x\n} \nvar y = (x) => (() => (x))\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"By\"]: () => (__WEBPACK_EXTERNAL_MODULE__angular_platform_browser_bc6fa964__.By) });","import { DebugElement, Predicate } from '@angular/core';\nimport { By } from '@angular/platform-browser';\n\nimport { AnyType } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\n\nexport default (selector: string | AnyType<any> | [string] | [string, any]): Predicate<DebugElement> => {\n  return Array.isArray(selector)\n    ? By.css(selector.length === 1 ? `[${selector[0]}]` : `[${selector[0]}=\"${selector[1]}\"]`)\n    : typeof selector === 'string'\n      ? By.css(selector)\n      : By.directive(getSourceOfMock(selector));\n};\n","import { DebugElement } from '@angular/core';\n\nimport isDebugNode from '../format/is-debug-node';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcParseFindArgs from './func.parse-find-args';\nimport funcParseFindTerm from './func.parse-find-term';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]): DebugElement => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, defaultNotFoundValue);\n  const result = isDebugNode(sel) ? sel : el?.query(funcParseFindTerm(sel));\n  if (result) {\n    return result;\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find an element via ngMocks.find(${funcParseFindArgsName(sel)})`);\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (node: MockedDebugNode): boolean => {\n  return node.nativeNode.nodeName === '#text';\n};\n","export default (a: any, b: any): boolean => {\n  if (!a || !b) {\n    return false;\n  }\n\n  return a === b;\n};\n","import detectTextNode from './detect-text-node';\n\nexport default (node: any) => {\n  return detectTextNode(node)\n    ? undefined\n    : node.injector._tNode || // ivy\n        node.injector.elDef || // classic\n        undefined;\n};\n","import { Injector } from '@angular/core';\n\nimport { getTestBedInjection } from './core.helpers';\n\nconst defaultInjector: any = {};\n\nexport default (declaration: any, injector: Injector = defaultInjector): any => {\n  if (injector === defaultInjector) {\n    return getTestBedInjection(declaration);\n  }\n  try {\n    return injector.get(declaration);\n  } catch {\n    return undefined;\n  }\n};\n","import { DebugElement, ViewContainerRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\n\nimport elDefGetNode from './el-def-get-node';\n\nconst getVcr = (node: any, child: any): undefined | ViewContainerRef => {\n  if (node === child) {\n    return undefined;\n  }\n  if (child.nativeNode.nodeName !== '#comment') {\n    return undefined;\n  }\n\n  return coreInjector(ViewContainerRef, child.injector);\n};\n\nconst getScanViewRefRootNodes = (node: any, child: any): Array<[number, any]> => {\n  const vcr = getVcr(node, child);\n  if (!vcr) {\n    return [];\n  }\n\n  const result: Array<[number, any]> = [];\n  for (let vrIndex = 0; vrIndex < vcr.length; vrIndex += 1) {\n    const vr = vcr.get(vrIndex);\n    if (!vr) {\n      continue;\n    }\n\n    for (let rnIndex = 0; rnIndex < (vr as any).rootNodes.length; rnIndex += 1) {\n      result.push([rnIndex, (vr as any).rootNodes[rnIndex]]);\n    }\n  }\n\n  return result;\n};\n\nconst scanViewRef = (node: DebugElement) => {\n  let result: any;\n  let index: any;\n\n  for (const child of node.parent?.childNodes || []) {\n    for (const [rnIndex, rootNode] of getScanViewRefRootNodes(node, child)) {\n      if (rootNode === node.nativeNode && (index === undefined || rnIndex < index)) {\n        result = elDefGetNode(child);\n        index = rnIndex;\n      }\n    }\n  }\n\n  return result;\n};\n\nexport default (node: any) => {\n  return (\n    node.injector._tNode?.parent || // ivy\n    node.injector.elDef?.parent || // classic\n    scanViewRef(node) ||\n    node.parent?.injector._tNode || // ivy\n    node.parent?.injector.elDef || // classic\n    undefined\n  );\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectTextNode from './detect-text-node';\nimport elDefCompare from './el-def-compare';\nimport elDefGetNode from './el-def-get-node';\nimport elDefGetParent from './el-def-get-parent';\n\nexport default (node: MockedDebugNode): MockedDebugNode[] => {\n  const elDef = elDefGetNode(node);\n  if (!elDef || detectTextNode(node)) {\n    return [];\n  }\n\n  const isDirect = (node as any).childNodes !== undefined;\n  const children: MockedDebugNode[] = [];\n  for (const childNode of (node as any).childNodes || node.parent?.childNodes || []) {\n    const childNodeParent = elDefGetParent(childNode);\n\n    if (!isDirect && !elDefCompare(elDef, childNodeParent)) {\n      continue;\n    }\n    if (childNodeParent && !elDefCompare(elDef, childNodeParent)) {\n      continue;\n    }\n\n    children.push(childNode);\n  }\n\n  if ((node as any).parent?.name === 'BODY') {\n    const childNodes: any[] = (node as any).parent.childNodes;\n    let start = childNodes.length;\n    let end = 0;\n    for (let i = childNodes.length - 1; i >= 0; i -= 1) {\n      const childNode = childNodes[i];\n      if (childNode.nativeNode.nodeName === '#comment') {\n        end = i;\n      } else if (childNode.nativeNode === node.nativeNode) {\n        start = i + 1;\n        break;\n      }\n    }\n    for (let i = start; i < end; i += 1) {\n      children.push(childNodes[i]);\n    }\n  }\n\n  return children;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport elDefCompare from './el-def-compare';\nimport elDefGetNode from './el-def-get-node';\nimport elDefGetParent from './el-def-get-parent';\n\nconst detectParent = (node: MockedDebugNode, parent: MockedDebugNode | undefined): MockedDebugNode | undefined => {\n  if (parent) {\n    return parent;\n  }\n\n  const expected = elDefGetParent(node);\n  const currentParent = node.parent ? elDefGetNode(node.parent) : undefined;\n  if (node.parent && elDefCompare(expected, currentParent)) {\n    return node.parent;\n  }\n  for (const childNode of node.parent?.childNodes || []) {\n    const childElDef = elDefGetNode(childNode);\n    if (elDefCompare(expected, childElDef)) {\n      return childNode;\n    }\n  }\n\n  return undefined;\n};\n\nexport default ((): typeof detectParent => detectParent)();\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectTextNode from './detect-text-node';\nimport nestedCheckChildren from './nested-check-children';\nimport nestedCheckParent from './nested-check-parent';\n\nconst nestedCheck = (\n  node: MockedDebugNode | null | undefined,\n  parent: MockedDebugNode | undefined,\n  check: (node: MockedDebugNode, parent?: MockedDebugNode) => void | boolean,\n  includeTextNode = false,\n): boolean => {\n  if (!node) {\n    return false;\n  }\n  if (!includeTextNode && detectTextNode(node)) {\n    return false;\n  }\n  if (check(node, nestedCheckParent(node, parent))) {\n    return true;\n  }\n\n  for (const childNode of nestedCheckChildren(node)) {\n    if (nestedCheck(childNode, node, check, includeTextNode)) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default ((): typeof nestedCheck => nestedCheck)();\n","import { DebugNode } from '@angular/core';\n\nimport { DebugNodeSelector } from '../../common/core.types';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\n\nimport nestedCheck from './nested-check';\n\nexport default (\n  sel: DebugNode | DebugNodeSelector,\n  callback: (node: DebugNode, parent?: DebugNode) => void | boolean,\n  includeTextNode = false,\n): void => {\n  const el = mockHelperFind(funcGetLastFixture(), sel, undefined);\n  nestedCheck(el, undefined, callback, includeTextNode);\n};\n","import isDebugNode from './format/is-debug-node';\nimport isFixture from './format/is-fixture';\nimport funcGetLastFixture from './func.get-last-fixture';\n\nconst isSelector = (value: any): boolean => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n  if (isFixture(value)) {\n    return true;\n  }\n  if (isDebugNode(value)) {\n    return true;\n  }\n\n  return true;\n};\n\nexport default (args: any[], isValidValue: (value: any) => boolean, defaultNotFoundValue?: any): [any, any, any] => {\n  let el;\n  let sel;\n  let notFoundValue = defaultNotFoundValue;\n  if (args.length === 3) {\n    [el, sel, notFoundValue] = args;\n  } else if (args.length === 1) {\n    el = funcGetLastFixture();\n    [sel] = args;\n  } else if (isValidValue(args[1]) && isSelector(args[0])) {\n    [el, sel] = args;\n  } else {\n    el = funcGetLastFixture();\n    [sel, notFoundValue] = args;\n  }\n\n  return [el, sel, notFoundValue];\n};\n","export default (selectors: string[], query: string): boolean => {\n  for (const selector of selectors) {\n    const attributes = selector.match(/\\[([^=\\]]+)/g);\n    if (!attributes) {\n      continue;\n    }\n\n    for (const attribute of attributes) {\n      if (attribute === `[${query}`) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n","import { DebugNode, Directive } from '@angular/core';\n\nimport coreInjector from '../common/core.injector';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport funcGetType from '../common/func.get-type';\n\nconst getMeta = (token: any): Directive | undefined => {\n  try {\n    return coreReflectDirectiveResolve(token);\n  } catch {\n    return undefined;\n  }\n};\n\nexport default (el: DebugNode | null | undefined, token: any): Directive | undefined => {\n  // istanbul ignore if\n  if (!el) {\n    return undefined;\n  }\n\n  try {\n    const provider = funcGetType(token);\n    const instance = coreInjector(provider, el.injector);\n\n    return getMeta(instance.constructor);\n  } catch {\n    return undefined;\n  }\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (node: MockedDebugNode): string[] => {\n  return (node.injector as any).elDef ? Object.keys((node.injector as any).elDef.element.publicProviders) : [];\n};\n","import { DirectiveIo } from '../../common/core.types';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport funcParseProviderTokensDirectives from '../func.parse-provider-tokens-directives';\n\nexport default (node: MockedDebugNode, key: string): [Array<DirectiveIo>, string[], number] => {\n  const config = (node.injector as any).elDef.element.publicProviders[key];\n  const token = config.provider.value;\n  if (!token) {\n    return [[], [], 0];\n  }\n  const meta = funcParseProviderTokensDirectives(node, token);\n\n  const requiredAttributes = config.bindings.map((binding: any) => binding.nonMinifiedName || binding.name);\n\n  return [meta?.inputs || [], requiredAttributes, config.nodeIndex];\n};\n","import funcDirectiveIoParse from '../../common/func.directive-io-parse';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport funcParseProviderTokensDirectives from '../func.parse-provider-tokens-directives';\n\nimport funcGetPublicProviderKeys from './func.get-public-provider-keys';\nimport funcParseInputsAndRequiresAttributes from './func.parse-inputs-and-requires-attributes';\n\nconst collectSelectors = (node: MockedDebugNode): string[] => {\n  const selectors: string[] = [];\n\n  for (const token of node.providerTokens) {\n    const meta = funcParseProviderTokensDirectives(node, token);\n    if (meta?.selector && selectors.indexOf(meta.selector) === -1) {\n      selectors.push(meta.selector);\n    }\n  }\n\n  return selectors;\n};\n\nconst collectAttributesClassic = (node: MockedDebugNode): string[] => {\n  const result: string[] = [];\n\n  for (const key of funcGetPublicProviderKeys(node)) {\n    const [inputs, expectedAttributes] = funcParseInputsAndRequiresAttributes(node, key);\n    for (const input of inputs) {\n      const { name, alias } = funcDirectiveIoParse(input);\n      const attr = alias || name;\n      if (expectedAttributes.indexOf(name) !== -1 && result.indexOf(attr) === -1) {\n        result.push(attr);\n      }\n    }\n  }\n\n  return result;\n};\n\nconst collectAttributesIvy = (node: MockedDebugNode): string[] => {\n  const result: string[] = [];\n\n  const attrs = (node.injector as any)._tNode?.attrs || [];\n  let step = 2;\n  for (let index = 0; index < attrs.length; index += step) {\n    // 3 is a divider between static and dynamic bindings\n    if (typeof attrs[index] === 'number') {\n      step = 1;\n      continue;\n    }\n    const attr = attrs[index];\n    if ((node.injector as any)._tNode.inputs?.[attr] && result.indexOf(attr) === -1) {\n      result.push(attr);\n    }\n  }\n\n  return result;\n};\n\nexport default (node: MockedDebugNode): [string[], string[]] => {\n  const selectors = collectSelectors(node);\n  const attributes = [...collectAttributesClassic(node), ...collectAttributesIvy(node)];\n\n  return [selectors, attributes];\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectAttributeInSelectors from './detect-attribute-in-selectors';\nimport detectSelectorsFromNode from './detect-selectors-from-node';\n\nexport default (attribute: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    const [selectors, attributes] = detectSelectorsFromNode(node);\n\n    if (attributes.indexOf(attribute) !== -1) {\n      return true;\n    }\n\n    if (detectAttributeInSelectors(selectors, attribute)) {\n      return true;\n    }\n\n    return false;\n  };\n","import funcDirectiveIoParse from '../../common/func.directive-io-parse';\nimport { MockedDebugNode } from '../../mock-render/types';\n\nimport funcGetPublicProviderKeys from './func.get-public-provider-keys';\nimport funcParseInputsAndRequiresAttributes from './func.parse-inputs-and-requires-attributes';\n\nconst detectInClassic = (node: MockedDebugNode, attribute: string, value: any): boolean => {\n  for (const key of funcGetPublicProviderKeys(node)) {\n    const [inputs, expectedAttributes, nodeIndex] = funcParseInputsAndRequiresAttributes(node, key);\n    for (const input of inputs) {\n      const { name, alias } = funcDirectiveIoParse(input);\n      if (attribute !== (alias || name) || expectedAttributes.indexOf(name) === -1) {\n        continue;\n      }\n      if (value === (node.injector as any).view.nodes[nodeIndex].instance[name]) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n\nconst detectInIvy = (node: MockedDebugNode, attribute: string, value: any): boolean => {\n  const attrs = (node.injector as any)._tNode?.attrs || [];\n  let step = 2;\n  for (let index = 0; index < attrs.length; index += step) {\n    // 3 is a divider between static and dynamic bindings\n    if (typeof attrs[index] === 'number') {\n      step = 1;\n      continue;\n    }\n    const attr = attrs[index];\n    if (attr !== attribute || !(node.injector as any)._tNode.inputs?.[attr]) {\n      continue;\n    }\n    const [attrIndex, attrProp] = (node.injector as any)._tNode.inputs[attr];\n\n    if (value === (node.injector as any)._lView?.[attrIndex][attrProp]) {\n      return true;\n    }\n  }\n\n  return false;\n};\n\nexport default (attribute: string, value: any): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    if (detectInIvy(node, attribute, value)) {\n      return true;\n    }\n\n    return detectInClassic(node, attribute, value);\n  };\n","import coreInjector from '../../common/core.injector';\nimport { AnyType } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { MockedDebugNode } from '../../mock-render/types';\n\nexport default (declaration: AnyType<any>): ((node: MockedDebugNode) => boolean) => {\n  const source = getSourceOfMock(declaration);\n\n  return node =>\n    !!node && node.providerTokens.indexOf(source) !== -1 && coreInjector(source, node.injector) !== undefined;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nexport default (id: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    return !!node.references[id];\n  };\n","const regExp = new RegExp('\\\\[.*?\\\\]', 'g');\n\nexport default (selectors: string[], query: string): boolean => {\n  for (const selector of selectors) {\n    const attributes = selector.replace(regExp, '').split(',');\n\n    for (const attribute of attributes) {\n      if (attribute.trim() === query) {\n        return true;\n      }\n    }\n  }\n\n  return false;\n};\n","import { MockedDebugNode } from '../../mock-render/types';\n\nimport detectSelectorsFromNode from './detect-selectors-from-node';\nimport detectTagNameInSelectors from './detect-tag-name-in-selectors';\n\nexport default (attribute: string): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    const [selectors] = detectSelectorsFromNode(node);\n\n    return detectTagNameInSelectors(selectors, attribute);\n  };\n","import { AnyType } from '../../common/core.types';\nimport { MockedDebugNode } from '../../mock-render/types';\n\nimport crawlByAttribute from './crawl-by-attribute';\nimport crawlByAttributeValue from './crawl-by-attribute-value';\nimport crawlByDeclaration from './crawl-by-declaration';\nimport crawlById from './crawl-by-id';\nimport crawlByTagName from './crawl-by-tag-name';\n\ntype SELECTOR = string | AnyType<any> | [any] | [any, any];\n\nconst isCrawlByAttribute = (selector: SELECTOR): selector is [string] => {\n  return Array.isArray(selector) && selector.length === 1 && typeof selector[0] === 'string';\n};\n\nconst isCrawlByAttributeValue = (selector: SELECTOR): selector is [string, any] => {\n  return Array.isArray(selector) && selector.length === 2 && typeof selector[0] === 'string';\n};\n\nconst isCrawlById = (selector: SELECTOR): selector is string => {\n  return typeof selector === 'string' && selector.indexOf('#') === 0 && selector.length > 1;\n};\n\nconst isCrawlByTagName = (selector: SELECTOR): selector is string => {\n  return typeof selector === 'string' && selector.indexOf('#') !== 0 && selector.length > 0;\n};\n\nconst isCrawlByDeclaration = (selector: SELECTOR): selector is AnyType<any> => {\n  return typeof selector === 'function';\n};\n\nexport default (selector: SELECTOR): ((node: MockedDebugNode) => boolean) => {\n  if (isCrawlByAttribute(selector)) {\n    return crawlByAttribute(selector[0]);\n  }\n  if (isCrawlByAttributeValue(selector)) {\n    return crawlByAttributeValue(selector[0], selector[1]);\n  }\n  if (isCrawlById(selector)) {\n    return crawlById(selector.slice(1));\n  }\n  if (isCrawlByTagName(selector)) {\n    return crawlByTagName(selector);\n  }\n  if (isCrawlByDeclaration(selector)) {\n    return crawlByDeclaration(selector);\n  }\n\n  throw new Error('Unknown selector');\n};\n","export default (value: any) => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n\n  return typeof value === 'function';\n};\n","import mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport detectCrawler from './detect-crawler';\nimport detectTextNode from './detect-text-node';\nimport funcIsValidRevealSelector from './func.is-valid-reveal-selector';\nimport mockHelperCrawl from './mock-helper.crawl';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]): any => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidRevealSelector, defaultNotFoundValue);\n  const root = mockHelperFind(funcGetLastFixture(), el, undefined);\n\n  const detector = detectCrawler(sel);\n\n  let result;\n  mockHelperCrawl(root, node => {\n    if (node !== root && !detectTextNode(node) && detector(node)) {\n      result = node;\n\n      return true;\n    }\n\n    return false;\n  });\n  if (result) {\n    return result;\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n\n  throw new Error(`Cannot find a DebugElement via ngMocks.reveal(${funcParseFindArgsName(sel)})`);\n};\n","import mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport detectCrawler from './detect-crawler';\nimport detectTextNode from './detect-text-node';\nimport funcIsValidRevealSelector from './func.is-valid-reveal-selector';\nimport mockHelperCrawl from './mock-helper.crawl';\n\nexport default (...args: any[]): any[] => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidRevealSelector);\n  const root = mockHelperFind(funcGetLastFixture(), el, undefined);\n\n  const detector = detectCrawler(sel);\n\n  const result: any[] = [];\n  mockHelperCrawl(root, node => {\n    if (node !== root && !detectTextNode(node) && detector(node)) {\n      result.push(node);\n    }\n  });\n\n  return result;\n};\n","import funcIsMock from './func.is-mock';\nimport { MockControlValueAccessor } from './mock-control-value-accessor';\n\n/**\n * isMockControlValueAccessor helps to assert that an instance is a mock ControlValueAccessor\n * to perform valueChange or touch simulations.\n * Usually, it is used in if statements.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockControlValueAccessor\n * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n */\nexport const isMockControlValueAccessor = <T>(value: T): value is T & MockControlValueAccessor => {\n  if (!funcIsMock(value)) {\n    return false;\n  }\n\n  return !!value.__ngMocksConfig.isControlValueAccessor;\n};\n","export default (value: any): value is HTMLElement => {\n  return !!value && typeof value === 'object' && value.innerHTML !== undefined;\n};\n","import mockHelperStub from '../mock-helper.stub';\n\n/**\n * @see https://developer.mozilla.org/de/docs/Web/Events\n */\nconst preventBubble = ['focus', 'blur', 'load', 'unload', 'change', 'reset', 'scroll'];\n\n// istanbul ignore next\nconst customEvent = (event: string, params?: EventInit) => {\n  const initParams = {\n    bubbles: false,\n    cancelable: false,\n    ...params,\n  };\n  const eventObj = document.createEvent('CustomEvent');\n  eventObj.initCustomEvent(event, initParams.bubbles, initParams.cancelable, null);\n\n  return eventObj;\n};\n\nconst eventCtor =\n  typeof (Event as any) === 'function'\n    ? (event: string, init?: EventInit): CustomEvent => new CustomEvent(event, init)\n    : /* istanbul ignore next */ customEvent;\n\nconst keyMap: Record<string, object> = {\n  alt: {\n    altKey: true,\n    code: 'AltLeft',\n    key: 'Alt',\n    location: 1,\n    which: 18,\n  },\n  arrowdown: {\n    code: 'ArrowDown',\n    key: 'ArrowDown',\n    location: 0,\n    which: 40,\n  },\n  arrowleft: {\n    code: 'ArrowLeft',\n    key: 'ArrowLeft',\n    location: 0,\n    which: 37,\n  },\n  arrowright: {\n    code: 'ArrowRight',\n    key: 'ArrowRight',\n    location: 0,\n    which: 39,\n  },\n  arrowup: {\n    code: 'ArrowUp',\n    key: 'ArrowUp',\n    location: 0,\n    which: 38,\n  },\n  backspace: {\n    code: 'Backspace',\n    key: 'Backspace',\n    location: 0,\n    which: 8,\n  },\n  control: {\n    code: 'ControlLeft',\n    ctrlKey: true,\n    key: 'Control',\n    location: 1,\n    which: 17,\n  },\n  enter: {\n    code: 'Enter',\n    key: 'Enter',\n    location: 0,\n    which: 13,\n  },\n  esc: {\n    code: 'Escape',\n    key: 'Escape',\n    location: 0,\n    which: 27,\n  },\n  meta: {\n    code: 'MetaLeft',\n    key: 'Meta',\n    location: 1,\n    metaKey: true,\n    which: 91,\n  },\n  shift: {\n    code: 'ShiftLeft',\n    key: 'Shift',\n    location: 1,\n    shiftKey: true,\n    which: 16,\n  },\n  space: {\n    code: 'Space',\n    key: ' ',\n    location: 0,\n    which: 32,\n  },\n  tab: {\n    code: 'Tab',\n    key: 'Tab',\n    location: 0,\n    which: 9,\n  },\n};\nfor (let f = 1; f <= 12; f += 1) {\n  keyMap[`f${f}`] = {\n    code: `F${f}`,\n    key: `F${f}`,\n    location: 0,\n    which: f + 111,\n  };\n}\n\nconst getCode = (char: string): string => {\n  const code = char.codePointAt(0);\n  // a-z\n  if (code && code >= 97 && code <= 122) {\n    return `Key${char.toUpperCase()}`;\n  }\n  // A-Z\n  if (code && code >= 65 && code <= 90) {\n    return `Key${char.toUpperCase()}`;\n  }\n  // A-Z\n  if (code && code >= 48 && code <= 57) {\n    return `Digit${char}`;\n  }\n\n  return 'Unknown';\n};\n\nconst applyPayload = (event: Event, payload?: string): void => {\n  const keyData: object = {};\n  for (const key of payload ? payload.split('.') : []) {\n    let map = keyMap[key];\n    if (!map && key.length === 1) {\n      map = {\n        code: getCode(key),\n        key,\n      };\n    }\n\n    if (!map) {\n      throw new Error(`Unknown event part ${key}`);\n    }\n\n    mockHelperStub(keyData, map);\n  }\n\n  if (payload) {\n    mockHelperStub(event, keyData);\n  }\n};\n\nexport default (\n  event: string,\n  init?: EventInit,\n  overrides?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n): CustomEvent => {\n  const dot = event.indexOf('.');\n  const [eventName, eventPayload] = dot === -1 ? [event] : [event.slice(0, Math.max(0, dot)), event.slice(dot + 1)];\n  const eventObj = eventCtor(eventName, {\n    bubbles: preventBubble.indexOf(event) === -1,\n    cancelable: true,\n    ...init,\n  });\n  applyPayload(eventObj, eventPayload);\n\n  if (overrides) {\n    mockHelperStub(eventObj, overrides);\n  }\n\n  return eventObj;\n};\n","import { DebugElement } from '@angular/core';\nimport { ComponentFixture } from '@angular/core/testing';\n\nimport { DebugNodeSelector } from '../../common/core.types';\nimport mockHelperFind from '../find/mock-helper.find';\nimport isDebugNode from '../format/is-debug-node';\nimport isFixture from '../format/is-fixture';\nimport isHtmlElement from '../format/is-html-element';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport mockHelperStub from '../mock-helper.stub';\n\nimport mockHelperEvent from './mock-helper.event';\n\n/**\n * @see https://developer.mozilla.org/de/docs/Web/Events\n */\nconst preventBubble = ['focus', 'blur', 'load', 'unload', 'change', 'reset', 'scroll'];\n\nconst toEventObj = (event: string | UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event): Event => {\n  return typeof event === 'string'\n    ? mockHelperEvent(event, {\n        bubbles: preventBubble.indexOf(event) === -1,\n        cancelable: true,\n      })\n    : event;\n};\n\nconst getNativeElement = (\n  debugElement: DebugElement | HTMLElement | ComponentFixture<any> | undefined | null,\n): HTMLElement | undefined => {\n  if (isDebugNode(debugElement) || isFixture(debugElement)) {\n    return debugElement.nativeElement;\n  }\n  if (isHtmlElement(debugElement)) {\n    return debugElement;\n  }\n\n  return undefined;\n};\n\nexport default (\n  selector: DebugElement | HTMLElement | ComponentFixture<any> | DebugNodeSelector,\n  eventName: string | UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event,\n  payload?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n) => {\n  const debugElement = isHtmlElement(selector) ? selector : mockHelperFind(funcGetLastFixture(), selector, undefined);\n  const nativeElement = getNativeElement(debugElement);\n\n  if (!nativeElement) {\n    throw new Error(\n      `Cannot trigger ${typeof eventName === 'string' ? eventName : eventName.type} event undefined element`,\n    );\n  }\n\n  // nothing to emit on disabled elements\n  if ((nativeElement as HTMLInputElement).disabled) {\n    return;\n  }\n\n  const event = toEventObj(eventName);\n  if (!event.target) {\n    mockHelperStub(event, {\n      target: nativeElement,\n    });\n  }\n  if (payload) {\n    mockHelperStub(event, payload);\n  }\n  nativeElement.dispatchEvent(event);\n};\n","import { DebugNode } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport coreInjector from '../../common/core.injector';\n\nconst message = [\n  'Cannot find ControlValueAccessor on the element.',\n  'If it is a mock input with [formControlName],',\n  'you need either to avoid mocking ReactiveFormsModule',\n  'or to avoid accessing the control in such a way,',\n  'because this tests ReactiveFormsModule instead of own implementation.',\n].join(' ');\n\nexport default (el: DebugNode): Record<keyof any, any> => {\n  const ngControl = coreForm && coreInjector(coreForm.NgControl, el.injector);\n  const valueAccessor = ngControl?.valueAccessor;\n  if (valueAccessor) {\n    return valueAccessor;\n  }\n\n  const formControlDirective = coreForm && coreInjector(coreForm.FormControlDirective, el.injector);\n  if (formControlDirective?.form) {\n    return formControlDirective.form;\n  }\n\n  const ngModel = coreForm && coreInjector(coreForm.NgModel, el.injector);\n  if (ngModel) {\n    return ngModel;\n  }\n\n  throw new Error(message);\n};\n","import { DebugElement } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport { DebugNodeSelector } from '../../common/core.types';\nimport { isMockControlValueAccessor } from '../../common/func.is-mock-control-value-accessor';\nimport helperDefinePropertyDescriptor from '../../mock-service/helper.define-property-descriptor';\nimport helperExtractMethodsFromPrototype from '../../mock-service/helper.extract-methods-from-prototype';\nimport mockHelperTrigger from '../events/mock-helper.trigger';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\nimport mockHelperStubMember from '../mock-helper.stub-member';\n\nimport funcGetVca from './func.get-vca';\n\n// default html behavior\nconst triggerInput = (el: DebugElement, value: any): void => {\n  mockHelperTrigger(el, 'focus');\n\n  const descriptor = Object.getOwnPropertyDescriptor(el.nativeElement, 'value');\n  mockHelperStubMember(el.nativeElement, 'value', value);\n  mockHelperTrigger(el, 'input');\n  mockHelperTrigger(el, 'change');\n  if (descriptor) {\n    helperDefinePropertyDescriptor(el.nativeElement, 'value', descriptor);\n    el.nativeElement.value = value;\n  }\n\n  mockHelperTrigger(el, 'blur');\n};\n\nconst handleKnown = (valueAccessor: any, value: any): boolean => {\n  if (coreForm && valueAccessor instanceof coreForm.AbstractControl) {\n    valueAccessor.setValue(value);\n\n    return true;\n  }\n\n  if (coreForm && valueAccessor instanceof coreForm.NgModel) {\n    valueAccessor.update.emit(value);\n\n    return true;\n  }\n\n  if (isMockControlValueAccessor(valueAccessor.instance)) {\n    valueAccessor.instance.__simulateChange(value);\n\n    return true;\n  }\n\n  return false;\n};\n\nconst hasListener = (el: DebugElement): boolean =>\n  el.listeners.some(listener => listener.name === 'input' || listener.name === 'change');\n\nconst keys = [\n  'onChange',\n  'onChangeCallback',\n  'onChangeCb',\n  'onChangeClb',\n  'onChangeFn',\n\n  '_onChange',\n  '_onChangeCallback',\n  '_onChangeCb',\n  '_onChangeClb',\n  '_onChangeFn',\n\n  'changeFn',\n  '_changeFn',\n\n  'onModelChange',\n\n  'cvaOnChange',\n  'cvaOnChangeCallback',\n  'cvaOnChangeCb',\n  'cvaOnChangeClb',\n  'cvaOnChangeFn',\n\n  '_cvaOnChange',\n  '_cvaOnChangeCallback',\n  '_cvaOnChangeCb',\n  '_cvaOnChangeClb',\n  '_cvaOnChangeFn',\n];\n\nexport default (selector: DebugNodeSelector, value: any, methodName?: string): void => {\n  const el = mockHelperFind(funcGetLastFixture(), selector, undefined);\n  if (!el) {\n    throw new Error(`Cannot find an element via ngMocks.change(${funcParseFindArgsName(selector)})`);\n  }\n\n  const valueAccessor = funcGetVca(el);\n  if (handleKnown(valueAccessor, value) || hasListener(el)) {\n    triggerInput(el, value);\n\n    return;\n  }\n\n  for (const key of methodName ? [methodName] : keys) {\n    if (typeof valueAccessor[key] === 'function') {\n      valueAccessor.writeValue(value);\n      valueAccessor[key](value);\n\n      return;\n    }\n  }\n\n  const methods = helperExtractMethodsFromPrototype(valueAccessor);\n  throw new Error(\n    [\n      'Unsupported type of ControlValueAccessor,',\n      `please ensure it has '${methodName || 'onChange'}' method.`,\n      `If it is a 3rd-party library, please provide the correct name of the method in the 'methodName' parameter.`,\n      'Possible Names: ' + methods.join(', ') + '.',\n    ].join(' '),\n  );\n};\n","import { DebugElement } from '@angular/core';\n\nimport coreForm from '../../common/core.form';\nimport { DebugNodeSelector } from '../../common/core.types';\nimport { isMockControlValueAccessor } from '../../common/func.is-mock-control-value-accessor';\nimport helperExtractMethodsFromPrototype from '../../mock-service/helper.extract-methods-from-prototype';\nimport mockHelperTrigger from '../events/mock-helper.trigger';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcGetVca from './func.get-vca';\n\n// default html behavior\nconst triggerTouch = (el: DebugElement): void => {\n  mockHelperTrigger(el, 'focus');\n  mockHelperTrigger(el, 'blur');\n};\n\nconst handleKnown = (valueAccessor: any): boolean => {\n  if (coreForm && valueAccessor instanceof coreForm.AbstractControl) {\n    valueAccessor.markAsTouched();\n\n    return true;\n  }\n\n  if (isMockControlValueAccessor(valueAccessor.instance)) {\n    valueAccessor.instance.__simulateTouch();\n\n    return true;\n  }\n\n  return false;\n};\n\nconst hasListener = (el: DebugElement): boolean =>\n  el.listeners.some(listener => listener.name === 'focus' || listener.name === 'blur');\n\nconst keys = [\n  'onTouched',\n  'onTouchedCallback',\n  'onTouchedCb',\n  'onTouchedClb',\n  'onTouchedFn',\n\n  '_onTouched',\n  '_onTouchedCallback',\n  '_onTouchedCb',\n  '_onTouchedClb',\n  '_onTouchedFn',\n\n  'markAsTouched',\n  '_markAsTouched',\n\n  'onModelTouched',\n\n  'cvaOnTouch',\n  'cvaOnTouchCallback',\n  'cvaOnTouchCb',\n  'cvaOnTouchClb',\n  'cvaOnTouchFn',\n\n  '_cvaOnTouch',\n  '_cvaOnTouchCallback',\n  '_cvaOnTouchCb',\n  '_cvaOnTouchClb',\n  '_cvaOnTouchFn',\n];\n\nexport default (sel: DebugElement | DebugNodeSelector, methodName?: string): void => {\n  const el = mockHelperFind(funcGetLastFixture(), sel, undefined);\n  if (!el) {\n    throw new Error(`Cannot find an element via ngMocks.touch(${funcParseFindArgsName(sel)})`);\n  }\n\n  const valueAccessor = funcGetVca(el);\n  if (handleKnown(valueAccessor) || hasListener(el)) {\n    triggerTouch(el);\n\n    return;\n  }\n\n  for (const key of methodName ? [methodName] : keys) {\n    if (typeof valueAccessor[key] === 'function') {\n      valueAccessor[key]();\n\n      return;\n    }\n  }\n\n  const methods = helperExtractMethodsFromPrototype(valueAccessor);\n  throw new Error(\n    [\n      'Unsupported type of ControlValueAccessor,',\n      `please ensure it has '${methodName || 'onTouched'}' method.`,\n      `If it is a 3rd-party library, please provide the correct name of the method in the 'methodName' parameter.`,\n      'Possible Names: ' + methods.join(', ') + '.',\n    ].join(' '),\n  );\n};\n","import { DebugNodeSelector } from '../../common/core.types';\n\nimport mockHelperTrigger from './mock-helper.trigger';\n\nexport default (selector: DebugNodeSelector, payload?: object) => {\n  mockHelperTrigger(selector, 'click', payload);\n};\n","import { DebugElement } from '@angular/core';\n\nimport isDebugNode from '../format/is-debug-node';\n\nimport funcParseFindArgs from './func.parse-find-args';\nimport funcParseFindTerm from './func.parse-find-term';\n\nexport default (...args: any[]): DebugElement[] => {\n  const [el, sel] = funcParseFindArgs(args);\n  if (isDebugNode(sel)) {\n    return [sel as any];\n  }\n\n  return el?.queryAll(funcParseFindTerm(sel)) || [];\n};\n","import { DebugNode, Injector } from '@angular/core';\n\nimport coreInjector from '../common/core.injector';\nimport { AnyDeclaration } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nimport { Node } from './func.get-from-node';\n\nconst getParentWithInjector = (node: (DebugNode & Node) | null): Injector | undefined => {\n  let parent: DebugNode | null = node;\n  while (parent?.injector.constructor.name === 'NullInjector') {\n    parent = parent.parent;\n  }\n\n  if (parent) {\n    return parent.injector;\n  }\n\n  return undefined;\n};\n\nexport default <T>(result: T[], node: DebugNode & Node, proto: AnyDeclaration<T>): void => {\n  if (!node.injector || node.injector.constructor.name === 'NullInjector') {\n    return;\n  }\n\n  const parentInjector = getParentWithInjector(node.parent);\n  const parentInstance = parentInjector ? coreInjector(proto, parentInjector) : undefined;\n  const instance = coreInjector(proto, node.injector);\n  // a way to avoid inherited injections\n  if (parentInstance === instance) {\n    return;\n  }\n\n  if (isNgDef(proto, 't') && instance !== undefined) {\n    result.push(instance);\n  } else if (instance !== undefined && result.indexOf(instance) === -1) {\n    result.push(instance);\n  }\n};\n","import { DebugNode } from '@angular/core';\n\nexport default (node: DebugNode): DebugNode =>\n  node.nativeNode?.nodeName === '#text' && node.parent ? node.parent : node;\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nconst detectGatherFlag = (gather: boolean, el: DebugNode | null, node: any): boolean => {\n  // LContainer for structural directives can be a trigger for pipes.\n  if (\n    el &&\n    el.nativeNode &&\n    el.nativeNode.nodeName === '#comment' &&\n    Array.isArray(node) &&\n    node[0] === el.nativeNode\n  ) {\n    return true;\n  }\n\n  // LContainer should stop the scan.\n  if (Array.isArray(node)) {\n    return false;\n  }\n\n  if (!el || !node.nodeName) {\n    return gather;\n  }\n\n  // checking if a commentNode belongs to the current element.\n  // it comes from structural directives.\n  if (node.nodeName === '#comment') {\n    return node === el.nativeNode;\n  }\n\n  // checking if a textNode belongs to the current element.\n  if (node.nodeName === '#text') {\n    return node.parentNode === el.nativeNode;\n  }\n\n  return false;\n};\n\nconst isNotObject = <T>(node: T): boolean => !node || typeof node !== 'object';\n\nconst shouldBeScanned = (scanned: any[], node: any): boolean => scanned.indexOf(node) === -1 && Array.isArray(node);\n\nconst scan = <T>(\n  {\n    result,\n    el,\n    nodes,\n    normalize,\n    proto,\n  }: {\n    el: DebugNode | null;\n    nodes: any[];\n    normalize: (item: T) => T;\n    proto: AnyType<T>;\n    result: T[];\n  },\n  gatherDefault: boolean,\n  scanned: any[] = [],\n): void => {\n  scanned.push(nodes);\n  let gather = gatherDefault;\n\n  let nodesLength = nodes.length;\n  if (nodes.length > 1 && nodes[1] && typeof nodes[1] === 'object' && nodes[1].bindingStartIndex) {\n    nodesLength = nodes[1].bindingStartIndex;\n  }\n\n  for (let index = 0; index < nodesLength; index += 1) {\n    const node = normalize(nodes[index]);\n    if (isNotObject(node)) {\n      continue;\n    }\n\n    if (shouldBeScanned(scanned, node) && Array.isArray(node)) {\n      scan({ result, el, nodes: node, normalize, proto }, gather, scanned);\n    }\n\n    gather = detectGatherFlag(gather, el, node);\n    if (!gather) {\n      continue;\n    }\n\n    if (result.indexOf(node) === -1 && node instanceof proto) {\n      result.push(node);\n    }\n  }\n};\n\nexport default (() => scan)();\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nimport { Node } from './func.get-from-node';\nimport funcGetFromNodeElement from './func.get-from-node-element';\nimport funcGetFromNodeScan from './func.get-from-node-scan';\n\nconst detectContextByIndex = (rootView: any, index: number) => {\n  if (typeof rootView[1] === 'object' && rootView[20] === index) {\n    return rootView;\n  }\n\n  for (let i = 21; i < rootView.length; i += 1) {\n    const item = rootView[i];\n    if (Array.isArray(item) && typeof item[1] === 'object' && item[20] === index) {\n      return item;\n    }\n  }\n\n  return undefined;\n};\n\nconst detectContext = (node: DebugNode): any => {\n  let current = node;\n  let context = current.nativeNode?.__ngContext__;\n  while (context === undefined && current.parent) {\n    current = current.parent;\n    context = current.nativeNode.__ngContext__;\n  }\n  if (typeof context !== 'number') {\n    return context;\n  }\n  // welcome to A12 and its optimization\n  // https://github.com/angular/angular/pull/41358\n\n  const rootView = (current.injector as any)._lView;\n  if (Array.isArray(rootView)) {\n    return detectContextByIndex(rootView, context);\n  }\n\n  return undefined;\n};\n\nconst contextToNodes = (context: any): any => (Array.isArray(context) ? context : context?.lView);\n\nexport default <T>(result: T[], node: (DebugNode & Node) | null | undefined, proto: AnyType<T>): void => {\n  if (!node || node._debugContext) {\n    return;\n  }\n\n  const el = funcGetFromNodeElement(node);\n  funcGetFromNodeScan(\n    {\n      el,\n      nodes: contextToNodes(detectContext(node)) || [],\n      normalize: item => item,\n      proto,\n      result,\n    },\n    true,\n  );\n};\n","import { DebugNode } from '@angular/core';\n\nimport { AnyType } from '../common/core.types';\n\nimport { Node } from './func.get-from-node';\nimport funcGetFromNodeElement from './func.get-from-node-element';\nimport funcGetFromNodeScan from './func.get-from-node-scan';\n\nconst normalize = (item: any): any => {\n  if (!item || typeof item !== 'object') {\n    return item;\n  }\n\n  for (const key of ['renderElement', 'renderText', 'instance']) {\n    if (item[key]) {\n      return item[key];\n    }\n  }\n\n  return null;\n};\n\nexport default <T>(result: T[], node: (DebugNode & Node) | null | undefined, proto: AnyType<T>): void => {\n  if (!node || !node._debugContext) {\n    return;\n  }\n\n  const el = funcGetFromNodeElement(node);\n\n  funcGetFromNodeScan(\n    {\n      el,\n      nodes: node._debugContext.view.nodes,\n      normalize,\n      proto,\n      result,\n    },\n    true,\n  );\n};\n","import { DebugNode } from '@angular/core';\n\nimport { AnyDeclaration } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nimport funcGetFromNodeInjector from './func.get-from-node-injector';\nimport funcGetFromNodeIvy from './func.get-from-node-ivy';\nimport funcGetFromNodeStandard from './func.get-from-node-standard';\n\nexport interface Node {\n  _debugContext?: {\n    elDef: {\n      nodeIndex: number;\n    };\n    nodeDef: {\n      nodeIndex: number;\n    };\n    nodeIndex: number;\n    view: {\n      nodes: Array<{\n        instance?: any;\n        renderElement?: any;\n        renderText?: any;\n        value?: any;\n      }>;\n    };\n  };\n  parent?: (DebugNode & Node) | null;\n}\n\nexport default <T>(result: T[], node: DebugNode & Node, proto: AnyDeclaration<T>): T[] => {\n  funcGetFromNodeInjector(result, node, proto);\n  if (!isNgDef(proto, 't') && typeof proto !== 'string') {\n    funcGetFromNodeStandard(result, node, proto);\n    funcGetFromNodeIvy(result, node, proto);\n  }\n\n  return result;\n};\n","import { isNgDef } from '../../common/func.is-ng-def';\n\nexport default (value: any): boolean => {\n  return typeof value === 'function' || isNgDef(value, 't');\n};\n","import { getInjection } from '../../common/core.helpers';\nimport { Type } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport mockHelperCrawl from '../crawl/mock-helper.crawl';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetFromNode from '../func.get-from-node';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport funcIsValidFindInstanceSelector from './func.is-valid-find-instance-selector';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default <T>(...args: any[]): T => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidFindInstanceSelector, defaultNotFoundValue);\n  if (typeof sel !== 'function' && !isNgDef(sel, 't') && typeof sel !== 'string') {\n    throw new Error('Only classes or tokens are accepted');\n  }\n\n  const declaration: Type<T> = getSourceOfMock(sel);\n  const result: T[] = [];\n  const fixture = funcGetLastFixture();\n  if (fixture) {\n    mockHelperCrawl(\n      mockHelperFind(fixture, el, undefined),\n      (node, parent) => {\n        funcGetFromNode(result, node, declaration);\n        if (result.length === 0 && parent && parent.nativeNode.nodeName === '#comment') {\n          funcGetFromNode(result, parent, declaration);\n        }\n\n        return result.length > 0;\n      },\n      true,\n    );\n  } else {\n    try {\n      result.push(getInjection(declaration));\n    } catch (error) {\n      // forwarding unexpected errors: https://github.com/help-me-mom/ng-mocks/issues/7041\n      if (!error || typeof error !== 'object' || (error as any).ngTempTokenPath === undefined) {\n        throw error;\n      }\n    }\n  }\n\n  if (result.length > 0) {\n    return result[0];\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find an instance via ngMocks.findInstance(${funcParseFindArgsName(sel)})`);\n};\n","import { getInjection } from '../../common/core.helpers';\nimport { Type } from '../../common/core.types';\nimport { getSourceOfMock } from '../../common/func.get-source-of-mock';\nimport { isNgDef } from '../../common/func.is-ng-def';\nimport mockHelperCrawl from '../crawl/mock-helper.crawl';\nimport mockHelperFindAll from '../find/mock-helper.find-all';\nimport funcGetFromNode from '../func.get-from-node';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport funcIsValidFindInstanceSelector from './func.is-valid-find-instance-selector';\n\nexport default <T>(...args: any[]): T[] => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidFindInstanceSelector);\n  if (typeof sel !== 'function' && !isNgDef(sel, 't') && typeof sel !== 'string') {\n    throw new Error('Only classes or tokens are accepted');\n  }\n\n  const declaration: Type<T> = getSourceOfMock(sel);\n  const result: T[] = [];\n  const scanned: any[] = [];\n  const fixture = funcGetLastFixture();\n  if (fixture) {\n    const elements = mockHelperFindAll(fixture, el, undefined);\n    for (const element of elements) {\n      mockHelperCrawl(\n        element,\n        (node, parent) => {\n          if (scanned.indexOf(node) === -1) {\n            funcGetFromNode(result, node, declaration);\n            scanned.push(node);\n          }\n          if (parent && parent.nativeNode.nodeName === '#comment' && scanned.indexOf(parent) === -1) {\n            funcGetFromNode(result, parent, declaration);\n            scanned.push(parent);\n          }\n        },\n        true,\n      );\n    }\n  } else {\n    try {\n      result.push(getInjection(declaration));\n    } catch {\n      // nothing to do\n    }\n  }\n\n  return result;\n};\n","export default (format: any, html: any) => {\n  return format((html as any[]).map(item => format(item, true)).join(''));\n};\n","import nestedCheckChildren from '../crawl/nested-check-children';\n\nimport handleArray from './handle-array';\nimport isDebugNode from './is-debug-node';\nimport isFixture from './is-fixture';\nimport { FORMAT_SET, FORMAT_SINGLE } from './types';\n\nexport default (handlePrimitives: any) =>\n  (html: any, outer = false) => {\n    const format = (value: Text | Comment | FORMAT_SINGLE | FORMAT_SET, innerOuter = false): any => {\n      if (Array.isArray(value)) {\n        return handleArray(format, value);\n      }\n      if (isFixture(value)) {\n        return format(value.debugElement, outer);\n      }\n      const result = handlePrimitives(format, value, innerOuter);\n      if (result !== undefined) {\n        return result;\n      }\n\n      if (isDebugNode(value) && value.nativeNode.nodeName === '#comment') {\n        return format(nestedCheckChildren(value), true);\n      }\n\n      return isDebugNode(value) ? format(value.nativeNode, innerOuter) : '';\n    };\n\n    return Array.isArray(html) ? html.map((item: any) => format(item, outer)) : format(html, outer);\n  };\n","export default (html: Text): string => html.nodeValue ?? html.textContent ?? html.wholeText;\n","export default (value: any): value is Text => {\n  return !!value && typeof value === 'object' && value.nodeName === '#text';\n};\n","import formatHandler from './format-handler';\nimport handleText from './handle-text';\nimport isHtmlElement from './is-html-element';\nimport isText from './is-text';\n\nconst normalizeValue = (html: string | undefined): string =>\n  html\n    ? html\n        .replace(new RegExp('\\\\s+', 'mg'), ' ')\n        .replace(new RegExp('<!--(.|\\\\n|\\\\r)*?-->|<!--(.|\\\\n|\\\\r)*', 'mg'), '')\n        .replace(new RegExp('\\\\s+', 'mg'), ' ')\n        .replace(new RegExp('>\\\\s+<', 'mg'), '><')\n        .replace(new RegExp('\"\\\\s+>', 'mg'), '\">')\n    : '';\n\nconst normalizeText = (text: string): string =>\n  text\n    .replace(new RegExp('&', 'mg'), '&amp;')\n    .replace(new RegExp('\"', 'mg'), '&quot;')\n    .replace(new RegExp('<', 'mg'), '&lt;')\n    .replace(new RegExp('>', 'mg'), '&gt;')\n    .replace(new RegExp(\"'\", 'mg'), '&#39;');\n\nconst getElementValue = (element: HTMLElement, outer: boolean): string =>\n  outer ? element.outerHTML : element.innerHTML;\n\nconst handlePrimitives = (format: any, value: any, outer: boolean): string | undefined => {\n  if (typeof value === 'string' || value === undefined) {\n    const result = normalizeValue(value);\n\n    return outer ? result : result.trim();\n  }\n  if (isHtmlElement(value)) {\n    return format(getElementValue(value, outer));\n  }\n  if (isText(value)) {\n    return handlePrimitives(format, normalizeText(handleText(value)), outer);\n  }\n\n  return undefined;\n};\n\nexport default (() => formatHandler(handlePrimitives))();\n","import formatHandler from './format-handler';\nimport handleText from './handle-text';\nimport isHtmlElement from './is-html-element';\nimport isText from './is-text';\n\nconst normalizeValue = (html: string | undefined): string => (html ? html.replace(new RegExp('\\\\s+', 'mg'), ' ') : '');\n\nconst getElementValue = (element: HTMLElement, outer: boolean): string => {\n  const value = element.textContent ?? '';\n\n  return outer ? value : value.trim();\n};\n\nconst handlePrimitives = (format: any, value: any, outer: boolean): string | undefined => {\n  if (typeof value === 'string' || value === undefined) {\n    const result = normalizeValue(value);\n\n    return outer ? result : result.trim();\n  }\n  if (isHtmlElement(value)) {\n    return format(getElementValue(value, outer));\n  }\n  if (isText(value)) {\n    return handlePrimitives(format, handleText(value), outer);\n  }\n\n  return undefined;\n};\n\nexport default (() => formatHandler(handlePrimitives))();\n","import { registerMockFunction } from '../mock-service/helper.mock-service';\nimport { CustomMockFunction } from '../mock-service/types';\n\ntype param = 'jasmine' | 'jest' | 'default' | 'reset' | CustomMockFunction;\n\nconst calls: param[] = [];\n\nexport default (type: param) => {\n  if (type === 'reset') {\n    calls.pop();\n  } else {\n    calls.push(type);\n  }\n  const action: param | undefined = calls[calls.length - 1];\n\n  if (action === 'jasmine') {\n    return registerMockFunction(mockName => jasmine.createSpy(mockName));\n  }\n  // istanbul ignore if: because it is run with jasmine\n  if (action === 'jest') {\n    return registerMockFunction(name => jest.fn().mockName(name));\n  }\n  if (!action || action === 'default' || action === 'reset') {\n    return registerMockFunction();\n  }\n\n  return registerMockFunction(action);\n};\n","/* eslint-disable no-console */\n\nimport coreDefineProperty from '../common/core.define-property';\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default (defaultMethods: Array<keyof typeof console>, factory: (name: string) => any) =>\n  (...methods: Array<keyof typeof console>): void => {\n    const backup: Array<keyof typeof console> = [];\n\n    beforeEach(() => {\n      for (const method of defaultMethods) {\n        if (methods.indexOf(method) === -1) {\n          methods.push(method);\n        }\n      }\n\n      for (const method of methods) {\n        coreDefineProperty(console, `__ngMocksBackup_${method}`, (console as any)[`__ngMocksBackup_${method}`] || []);\n        (console as any)[`__ngMocksBackup_${method}`].push(console[method]);\n        backup.push(method);\n        console[method] = factory(method) as never;\n      }\n    });\n\n    afterEach(() => {\n      for (const method of backup) {\n        console[method] = (console as any)[`__ngMocksBackup_${method}`].pop();\n      }\n      backup.splice(0, backup.length);\n    });\n  };\n","import helperMockService from '../mock-service/helper.mock-service';\n\nimport mockHelperConsole from './mock-helper.console';\n\nconst factory = (propName: string) => helperMockService.mockFunction(`console.${propName}`);\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default mockHelperConsole(['log'], factory);\n","import coreDefineProperty from '../common/core.define-property';\n\nimport mockHelperConsole from './mock-helper.console';\n\nconst factory =\n  (propName: string) =>\n  (...args: any[]) => {\n    const error = new Error(args.join(' '));\n    coreDefineProperty(error, 'ngMocksConsoleCatch', propName);\n    throw error;\n  };\n\n// Thanks Ivy, it does not throw an error, and we have to use injector.\nexport default mockHelperConsole(['warn', 'error'], factory);\n","import { flatten } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { IMockBuilderConfig } from '../mock-builder/types';\n\nexport default <T>(\n  def: AnyDeclaration<T> | string | Array<AnyDeclaration<T> | string>,\n  config?: IMockBuilderConfig,\n): void => {\n  const map = ngMocksUniverse.getConfigMock();\n  for (const item of flatten(def)) {\n    if (config) {\n      map.set(item, config);\n    } else {\n      map.delete(item);\n    }\n  }\n};\n","import { Injector } from '@angular/core';\n\nimport { flatten } from '../common/core.helpers';\nimport { AnyDeclaration } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default <T>(\n  def: AnyDeclaration<T> | string | Array<AnyDeclaration<T> | string>,\n  callback?: (instance: undefined | T, injector: Injector) => void | Partial<T>,\n): void => {\n  const map = ngMocksUniverse.getOverrides();\n  for (const item of flatten(def)) {\n    if (callback) {\n      const set: Set<any> = map.has(item) ? map.get(item) : new Set();\n      set.add(callback);\n      map.set(item, set);\n    } else {\n      map.delete(item);\n    }\n  }\n};\n","import { getTestBed, TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nconst hooks: {\n  after: Array<\n    (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic) => TestBedStatic['resetTestingModule']\n  >;\n  before: Array<\n    (\n      original: TestBedStatic['configureTestingModule'],\n      instance: TestBedStatic,\n    ) => TestBedStatic['configureTestingModule']\n  >;\n} = ngMocksUniverse.global.get('faster-hooks') || {\n  after: [],\n  before: [],\n};\nngMocksUniverse.global.set('faster-hooks', hooks);\n\nconst configureTestingModule =\n  (\n    original: TestBedStatic['configureTestingModule'],\n    instance: TestBedStatic,\n  ): TestBedStatic['configureTestingModule'] =>\n  (moduleDef: TestModuleMetadata) => {\n    if ((TestBed as any).ngMocksFasterLock) {\n      return original.call(instance, moduleDef);\n    }\n\n    ngMocksUniverse.global.set('bullet:customized', true);\n\n    let final = original;\n    for (const callback of hooks.before) {\n      final = callback(final, instance);\n    }\n\n    try {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', true);\n\n      return final.call(instance, moduleDef);\n    } finally {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', undefined);\n    }\n  };\n\nconst resetTestingModule =\n  (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic): TestBedStatic['resetTestingModule'] =>\n  () => {\n    if ((TestBed as any).ngMocksFasterLock) {\n      return original.call(instance);\n    }\n\n    if (ngMocksUniverse.global.has('bullet')) {\n      if (ngMocksUniverse.global.has('bullet:customized')) {\n        ngMocksUniverse.global.set('bullet:reset', true);\n      }\n\n      return instance;\n    }\n    ngMocksUniverse.global.delete('bullet:customized');\n    ngMocksUniverse.global.delete('bullet:reset');\n\n    let final = original;\n    for (const callback of hooks.after) {\n      final = callback(final, instance);\n    }\n\n    try {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', true);\n\n      return final.call(instance);\n    } finally {\n      coreDefineProperty(TestBed, 'ngMocksFasterLock', undefined);\n    }\n  };\n\nexport default () => {\n  if (!(TestBed as any).ngMocksFasterInstalled) {\n    TestBed.configureTestingModule = configureTestingModule(TestBed.configureTestingModule as never, TestBed as never);\n    TestBed.resetTestingModule = resetTestingModule(TestBed.resetTestingModule as never, TestBed as never);\n    coreDefineProperty(TestBed, 'ngMocksFasterInstalled', true);\n  }\n\n  const testBed = getTestBed();\n  if (!(testBed as any).ngMocksFasterInstalled) {\n    testBed.configureTestingModule = configureTestingModule(testBed.configureTestingModule as never, testBed as never);\n    testBed.resetTestingModule = resetTestingModule(testBed.resetTestingModule as never, testBed as never);\n    coreDefineProperty(testBed, 'ngMocksFasterInstalled', true);\n  }\n\n  return hooks;\n};\n","import { getTestBed } from '@angular/core/testing';\n\nexport default (): void => {\n  const testBed: any = getTestBed();\n  testBed._instantiated = false;\n  testBed._moduleFactory = undefined;\n  testBed._testModuleRef = null;\n};\n","import { ComponentFixture, getTestBed, TestBed } from '@angular/core/testing';\n\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockHelperFasterInstall from './mock-helper.faster-install';\nimport mockHelperFlushTestBed from './mock-helper.flush-test-bed';\n\nconst resetFixtures = (id: never) => {\n  const activeFixtures: Array<ComponentFixture<any> & { ngMocksStackId?: any }> =\n    (getTestBed() as any)._activeFixtures || /* istanbul ignore next */ [];\n\n  let active = 0;\n  for (let i = activeFixtures.length - 1; i >= 0; i -= 1) {\n    if (!activeFixtures[i].ngMocksStackId || activeFixtures[i].ngMocksStackId === id) {\n      activeFixtures[i].ngMocksStackId = undefined;\n      activeFixtures[i].destroy();\n      activeFixtures.splice(i, 1);\n    } else {\n      active += 1;\n    }\n  }\n  if (active === 0) {\n    mockHelperFlushTestBed();\n  }\n};\n\nconst idAdd = (id: any) => {\n  const bulletStack: any[] = ngMocksUniverse.global.get('bullet:stack') ?? [];\n  bulletStack.push(id);\n  ngMocksUniverse.global.set('bullet:stack', bulletStack);\n  ngMocksUniverse.global.set('bullet:stack:id', id);\n};\nconst idRemove = (id: any) => {\n  const bulletStack: any[] = ngMocksUniverse.global.get('bullet:stack');\n  bulletStack.splice(bulletStack.indexOf(id), 1);\n  if (bulletStack.length > 0) {\n    ngMocksUniverse.global.set('bullet:stack:id', bulletStack[bulletStack.length - 1]);\n  } else {\n    ngMocksUniverse.global.delete('bullet:stack:id');\n  }\n\n  resetFixtures(id as never);\n};\n\nexport default () => {\n  mockHelperFasterInstall();\n\n  const idAll = {};\n  const idEach = {};\n\n  beforeAll(() => {\n    if (ngMocksUniverse.global.has('bullet:customized')) {\n      TestBed.resetTestingModule();\n    }\n    ngMocksUniverse.global.set('bullet', true);\n    idAdd(idAll);\n  });\n\n  beforeEach(() => {\n    idAdd(idEach);\n  });\n  afterEach(() => {\n    idRemove(idEach);\n  });\n\n  afterAll(() => {\n    idRemove(idAll);\n    ngMocksUniverse.global.delete('bullet');\n    if (ngMocksUniverse.global.has('bullet:reset')) {\n      TestBed.resetTestingModule();\n    }\n  });\n};\n","import { DebugElement } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport { Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport { getSourceOfMock } from '../common/func.get-source-of-mock';\nimport { MockedDebugElement } from '../mock-render/types';\n\nimport nestedCheckParent from './crawl/nested-check-parent';\nimport mockHelperFind from './find/mock-helper.find';\nimport funcGetFromNode from './func.get-from-node';\nimport funcGetLastFixture from './func.get-last-fixture';\nimport funcParseFindArgsName from './func.parse-find-args-name';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nconst parseArgs = <T>(\n  args: any[],\n): {\n  el: MockedDebugElement | null | undefined;\n  notFoundValue: any;\n  sel: Type<T>;\n} => ({\n  el: args[0],\n  notFoundValue: args.length === 3 ? args[2] : defaultNotFoundValue,\n  sel: args[1],\n});\n\nexport default <T>(...args: any[]) => {\n  if (args.length === 1) {\n    try {\n      return TestBed.inject ? TestBed.inject(args[0]) : /* istanbul ignore next */ TestBed.get(args[0]);\n    } catch (error) {\n      // forwarding unexpected errors: https://github.com/help-me-mom/ng-mocks/issues/7041\n      if (!error || typeof error !== 'object' || (error as any).ngTempTokenPath === undefined) {\n        throw error;\n      }\n      throw new Error(`Cannot find an instance via ngMocks.get(${funcParseFindArgsName(args[0])})`);\n    }\n  }\n\n  const { el, sel, notFoundValue } = parseArgs<T>(args);\n  const root: DebugElement | undefined = mockHelperFind(funcGetLastFixture(), el, undefined);\n  const source = getSourceOfMock(sel);\n\n  // Looking in the root.\n  if (root) {\n    const result = funcGetFromNode([], root, source);\n    if (result.length > 0) {\n      return result[0];\n    }\n  }\n\n  // Looking for a related structural directive.\n  if (root) {\n    const parent = nestedCheckParent(root, undefined);\n    if (parent && parent.nativeNode.nodeName === '#comment') {\n      const result = funcGetFromNode([], parent, source);\n      if (result.length > 0) {\n        return result[0];\n      }\n    }\n  }\n\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find ${funcGetName(sel)} instance via ngMocks.get`);\n};\n","import collectDeclarations from '../resolve/collect-declarations';\n\nimport coreConfig from './core.config';\nimport { flatten } from './core.helpers';\nimport { AnyDeclaration } from './core.types';\nimport funcGetType from './func.get-type';\n\nconst iterator = <T = any>(\n  source: AnyDeclaration<T>,\n  callback: (source: AnyDeclaration<T>) => void,\n  scanned = new Set<any>(),\n): void => {\n  const meta = collectDeclarations(source);\n  for (const decorator of meta.decorators) {\n    for (const key of coreConfig.dependencies) {\n      if (!meta[decorator][key]) {\n        continue;\n      }\n      for (const def of flatten(meta[decorator][key])) {\n        const declaration = funcGetType(def);\n        if (!declaration || scanned.has(declaration)) {\n          continue;\n        }\n        scanned.add(declaration);\n        callback(declaration);\n        iterator(declaration, callback, scanned);\n      }\n    }\n  }\n};\n\nexport default iterator;\n","import ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default () => {\n  ngMocksUniverse.cacheDeclarations.clear();\n  ngMocksUniverse.config.get('ngMocksDepsSkip')?.clear();\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['exclude']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['keep']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().set(source, ['mock']);\n};\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { AnyType } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\n\nexport default (source: AnyType<any>, destination: AnyType<any>): void => {\n  let fail = true;\n  if (isNgDef(source, 'm') && isNgDef(destination, 'm')) {\n    fail = false;\n  } else if (isNgDef(source, 'c') && isNgDef(destination, 'c')) {\n    fail = false;\n  } else if (isNgDef(source, 'd') && isNgDef(destination, 'd')) {\n    fail = false;\n  } else if (isNgDef(source, 'p') && isNgDef(destination, 'p')) {\n    fail = false;\n  }\n\n  if (fail) {\n    throw new Error('Cannot replace the declaration, both have to be a Module, a Component, a Directive or a Pipe');\n  }\n\n  funcGlobalPrepare();\n  ngMocksUniverse.getDefaults().set(source, ['replace', destination]);\n};\n","import { AnyDeclaration } from '../common/core.types';\nimport funcIterateDeclaration from '../common/func.iterate-declaration';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport funcGlobalPrepare from './func.global-prepare';\nimport mockHelperDefaultMock from './mock-helper.default-mock';\n\nconst action = (source: AnyDeclaration<any>): void => {\n  ngMocksUniverse.getDefaults().delete(source);\n  mockHelperDefaultMock(source);\n};\n\nexport default (source: AnyDeclaration<any>, recursively = false): void => {\n  funcGlobalPrepare();\n  action(source);\n\n  if (recursively) {\n    funcIterateDeclaration(source, action);\n  }\n};\n","import { TestModuleMetadata } from '@angular/core/testing';\n\nimport CoreDefStack from '../common/core.def-stack';\nimport { flatten, mapKeys, mapValues } from '../common/core.helpers';\nimport coreReflectModuleResolve from '../common/core.reflect.module-resolve';\nimport funcGetType from '../common/func.get-type';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { isNgInjectionToken } from '../common/func.is-ng-injection-token';\nimport { isNgModuleDefWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockModule } from '../mock-module/mock-module';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport mockProvider from '../mock-service/mock-provider';\n\ntype Data = {\n  declarations: any[];\n  exclude: Set<any>;\n  imports: any[];\n  keep: Set<any>;\n  mock: Set<any>;\n  optional: Map<any, any>;\n  providers: any[];\n  skip: Set<any>;\n};\n\nconst skipDef = (def: any, skip: Set<any>, exclude: Set<any>): boolean => {\n  if (skip.has(def)) {\n    return true;\n  }\n  skip.add(def);\n\n  return exclude.has(def);\n};\n\nconst createMetaHandler = (\n  optional: Map<any, any>,\n  proto: any,\n  imports: any[],\n  declarations: any[],\n  providers: any[],\n): void => {\n  const def = optional.get(proto) || proto;\n\n  if (isNgDef(def, 'm')) {\n    imports.push(def);\n  } else if (isNgDef(def, 'c') || isNgDef(def, 'd')) {\n    declarations.push(def);\n  } else if (isNgDef(def, 'p')) {\n    declarations.push(def);\n    providers.push(def);\n  } else if (!isNgInjectionToken(def)) {\n    providers.push(def);\n  }\n};\n\nconst createMeta = ({ keep, skip, optional, exclude, imports, declarations, providers }: Data): TestModuleMetadata => {\n  for (const proto of keep) {\n    if (skip.has(proto) || exclude.has(proto) || optional.has(proto)) {\n      continue;\n    }\n    createMetaHandler(optional, proto, imports, declarations, providers);\n  }\n\n  return { declarations, imports, providers };\n};\n\nconst typeMap: Array<[any, string]> = [\n  ['m', 'module'],\n  ['c', 'component'],\n  ['d', 'directive'],\n  ['p', 'pipe'],\n];\n\nconst getType = (def: any, keep: Set<any>): string => {\n  if (isNgModuleDefWithProviders(def)) {\n    return 'module-with-providers';\n  }\n  for (const [flag, value] of typeMap) {\n    if (isNgDef(def, flag)) {\n      return flag === 'm' && keep.has(def) ? `${value}-keep` : value;\n    }\n  }\n\n  return '';\n};\n\nconst handleModuleWithProviders = (data: Data, def: any): void => {\n  if (data.skip.has(def.ngModule)) {\n    return;\n  }\n  data.skip.add(def.ngModule);\n  if (data.exclude.has(def.ngModule)) {\n    return;\n  }\n\n  data.imports.push(data.keep.has(def.ngModule) ? def : MockModule(def));\n};\n\nconst handleDeclaration = (data: Data, def: any, callback: any, bucket: any[]): void => {\n  if (skipDef(def, data.skip, data.exclude)) {\n    return;\n  }\n\n  bucket.push(data.keep.has(def) ? def : callback(def));\n};\n\nconst handleDestructuring = (data: Data, def: any, callback: any): void => {\n  if (skipDef(def, data.skip, data.exclude)) {\n    return;\n  }\n\n  const meta = coreReflectModuleResolve(def);\n  for (const toMock of flatten([meta.declarations, meta.imports])) {\n    callback(data, toMock);\n  }\n  for (const toMock of meta.providers ? flatten(meta.providers) : []) {\n    resolveProvider(data, toMock);\n  }\n};\n\nconst resolveProvider = ({ skip, keep, providers, exclude }: Data, def: any): void => {\n  const provider = funcGetType(def);\n  skip.add(provider);\n  if (exclude.has(provider)) {\n    return;\n  }\n\n  const providerDef = keep.has(provider) ? def : mockProvider(def);\n  if (providerDef) {\n    providers.push(providerDef);\n  }\n};\n\nconst resolveMap: Record<string, any> = {\n  component: MockComponent,\n  directive: MockDirective,\n  pipe: MockPipe,\n};\n\nconst resolveHandler = (data: Data, type: string, def: any, skipDestruction: boolean): void => {\n  if (type === 'module-with-providers') {\n    handleModuleWithProviders(data, def);\n  } else if (type === 'module-keep') {\n    handleDeclaration(data, def, MockModule, data.imports); // MockModule will not be called because the def is kept.\n  } else if (type === 'module' && skipDestruction) {\n    handleDeclaration(data, def, MockModule, data.imports);\n  } else if (type === 'module') {\n    handleDestructuring(data, def, resolve);\n  } else if (resolveMap[type]) {\n    handleDeclaration(data, def, resolveMap[type], data.declarations);\n  } else {\n    resolveProvider(data, def);\n  }\n};\n\nconst resolve = (data: Data, proto: any, skipDestruction = true): void => {\n  if (!proto) {\n    return;\n  }\n\n  const type = getType(proto, data.keep);\n  let def: any;\n\n  // an attempt to replace declarations.\n  if (type !== 'module-with-providers') {\n    const value = data.optional.get(proto);\n    if (value && value !== proto) {\n      def = value;\n      data.keep.add(def);\n    }\n  }\n  if (!def) {\n    def = proto;\n  }\n\n  resolveHandler(data, type, def, skipDestruction);\n};\n\nconst generateDataWithUniverse = (keep: Set<any>, mock: Set<any>, exclude: Set<any>, optional: Map<any, any>): void => {\n  for (const k of mapKeys(ngMocksUniverse.getDefaults())) {\n    const v = ngMocksUniverse.getBuildDeclaration(k);\n    if (keep.has(k) || mock.has(k) || exclude.has(k)) {\n      continue;\n    }\n    optional.set(k, v);\n\n    if (v === null) {\n      exclude.add(k);\n    } else if (v === undefined) {\n      mock.add(k);\n    } else if (k === v) {\n      keep.add(k);\n    }\n  }\n};\n\nconst generateData = (protoKeep: any, protoMock: any, protoExclude: any): Data => {\n  const keep = new Set(flatten(protoKeep || []));\n  const mock = new Set(flatten(protoMock || []));\n  const exclude = new Set(flatten(protoExclude || []));\n  const optional = new Map();\n  generateDataWithUniverse(keep, mock, exclude, optional);\n\n  return {\n    declarations: [],\n    exclude,\n    imports: [],\n    keep,\n    mock,\n    optional,\n    providers: [],\n    skip: new Set(),\n  };\n};\n\nexport default (keep: any, mock: any = null, exclude: any = null): TestModuleMetadata => {\n  const data: Data = generateData(keep, mock, exclude);\n\n  const resolutions = new Map();\n  ngMocksUniverse.config.set('ngMocksDepsResolution', resolutions);\n  for (const mockDef of mapValues(data.keep)) {\n    resolutions.set(mockDef, 'keep');\n  }\n  for (const mockDef of mapValues(data.exclude)) {\n    resolutions.set(mockDef, 'exclude');\n  }\n\n  ngMocksUniverse.config.set('mockNgDefResolver', new CoreDefStack());\n  for (const def of mapValues(data.mock)) {\n    resolutions.set(def, 'mock');\n    if (data.optional.has(def)) {\n      continue;\n    }\n    resolve(data, def, false);\n  }\n  const meta = createMeta(data);\n  ngMocksUniverse.config.delete('mockNgDefResolver');\n  ngMocksUniverse.config.delete('ngMocksDepsResolution');\n\n  return meta;\n};\n","import { DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\nimport { MockedDebugElement } from '../mock-render/types';\n\nimport mockHelperFind from './find/mock-helper.find';\nimport funcGetLastFixture from './func.get-last-fixture';\nimport funcParseProviderTokensDirectives from './func.parse-provider-tokens-directives';\nimport mockHelperGet from './mock-helper.get';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nconst parseArgs = (args: any[]): [MockedDebugElement | null | undefined, string, any] => [\n  args[0],\n  args[1],\n  args.length === 3 ? args[2] : defaultNotFoundValue,\n];\n\nconst attrMatches = (attribute: DirectiveIo, selector: string): string | undefined => {\n  const { name, alias = '' } = funcDirectiveIoParse(attribute);\n\n  if ((!alias && name === selector) || (!!alias && alias === selector)) {\n    return name;\n  }\n\n  return undefined;\n};\n\nconst detectAttribute = (el: MockedDebugElement | null | undefined, attr: 'inputs' | 'outputs', sel: string) => {\n  for (const token of el?.providerTokens || []) {\n    const meta = funcParseProviderTokensDirectives(el, token);\n    if (!meta) {\n      continue;\n    }\n\n    for (const attrDef of meta[attr] || /* istanbul ignore next */ []) {\n      const prop = attrMatches(attrDef, sel);\n      if (prop) {\n        return mockHelperGet(el, token)[prop];\n      }\n    }\n  }\n\n  throw new Error('Not found');\n};\n\nexport default (label: string, attr: 'inputs' | 'outputs', ...args: any[]) => {\n  const [el, sel, notFoundValue] = parseArgs(args);\n\n  try {\n    return detectAttribute(mockHelperFind(funcGetLastFixture(), el, undefined), attr, sel);\n  } catch {\n    // nothing to do\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n  throw new Error(`Cannot find ${sel} ${label} via ngMocks.${label}`);\n};\n","import mockHelperAttributes from './mock-helper.attributes';\n\nexport default (...args: any[]) => mockHelperAttributes('input', 'inputs', ...args);\n","import mockHelperAttributes from './mock-helper.attributes';\n\nexport default (...args: any[]) => mockHelperAttributes('output', 'outputs', ...args);\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (): void => {\n  ngMocksUniverse.builtDeclarations = new Map();\n  ngMocksUniverse.builtProviders = new Map();\n  ngMocksUniverse.cacheDeclarations = new Map();\n  ngMocksUniverse.cacheProviders = new Map();\n  ngMocksUniverse.config = new Map();\n  ngMocksUniverse.configInstance = new Map();\n  ngMocksUniverse.flags = new Set(coreConfig.flags);\n  ngMocksUniverse.touches = new Set();\n};\n","import { QueryList, TemplateRef, ViewContainerRef } from '@angular/core';\n\nimport funcIsMock from '../../common/func.is-mock';\nimport { MockConfig } from '../../common/mock';\n\nconst getValVcr = (entryPoint: MockConfig): Array<[any, ViewContainerRef]> => {\n  const result: Array<[any, ViewContainerRef]> = [];\n\n  for (const key of entryPoint.__ngMocksConfig.queryScanKeys || /* istanbul ignore next */ []) {\n    const value = (entryPoint as any)[key];\n    const vcr = (entryPoint as any)[`__ngMocksVcr_${key}`];\n\n    const scanValue = value instanceof QueryList ? value.toArray() : [value];\n    const scanVcr = vcr instanceof QueryList ? vcr.toArray() : [vcr];\n\n    for (let index = 0; index < scanValue.length; index += 1) {\n      result.push([scanValue[index], scanVcr[index]]);\n    }\n  }\n\n  return result;\n};\n\nconst handleDirective = (\n  entryPoint: {\n    __template?: TemplateRef<any>;\n    __vcr?: ViewContainerRef;\n  },\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n  callback: (vcr: ViewContainerRef, tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  return (\n    !!entryPoint.__template &&\n    !!entryPoint.__vcr &&\n    isExpectedTemplate(entryPoint.__template) &&\n    callback(entryPoint.__vcr, entryPoint.__template)\n  );\n};\n\nconst isRightTemplate = (\n  localVcr: ViewContainerRef | undefined,\n  localValue: any,\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  return !!localVcr && localValue instanceof TemplateRef && isExpectedTemplate(localValue);\n};\n\nconst findDeep = (\n  entryPoint: object,\n  isExpectedTemplate: (tpl: TemplateRef<any>) => boolean,\n  callback: (vcr: ViewContainerRef, tpl: TemplateRef<any>) => boolean,\n): boolean => {\n  if (!funcIsMock(entryPoint)) {\n    throw new Error('Only instances of mock declarations are accepted');\n  }\n\n  // structural directive\n  if (handleDirective(entryPoint, isExpectedTemplate, callback)) {\n    return true;\n  }\n\n  for (const [localValue, localVcr] of getValVcr(entryPoint)) {\n    if (funcIsMock(localValue) && findDeep(localValue, isExpectedTemplate, callback)) {\n      return true;\n    }\n    if (isRightTemplate(localVcr, localValue, isExpectedTemplate)) {\n      return callback(localVcr, localValue);\n    }\n  }\n\n  return false;\n};\n\nexport default ((): typeof findDeep => findDeep)();\n","import { TemplateRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\nimport funcIsMock from '../../common/func.is-mock';\n\nexport default (param: any): TemplateRef<any> => {\n  if (param instanceof TemplateRef) {\n    return param;\n  }\n  if (funcIsMock(param) && param.__template) {\n    return param.__template;\n  }\n\n  const injector = param?.nativeNode && param.injector;\n  if (injector) {\n    const template = coreInjector(TemplateRef, injector);\n\n    if (template) {\n      return template;\n    }\n  }\n\n  const error = new Error(\n    'Unknown template has been passed, only TemplateRef or a mock structural directive are supported',\n  );\n  (error as any).param = param;\n\n  throw error;\n};\n","import funcFindDeep from './func.find-deep';\nimport funcParseTemplate from './func.parse-template';\n\nexport default (instance: object, param?: object) => {\n  const template = param ? funcParseTemplate(param) : undefined;\n\n  let result = false;\n  funcFindDeep(\n    instance,\n    tpl => {\n      if (!template) {\n        return true;\n      }\n\n      return tpl.elementRef.nativeElement === template.elementRef.nativeElement;\n    },\n    vcr => {\n      vcr.clear();\n      result = true;\n\n      return false;\n    },\n  );\n\n  if (!result) {\n    throw new Error('Cannot find path to the TemplateRef');\n  }\n};\n","import funcFindDeep from './func.find-deep';\nimport funcParseTemplate from './func.parse-template';\n\nexport default (instance: object, param: object, $implicit?: any, variables?: Record<keyof any, any>) => {\n  const template = funcParseTemplate(param);\n\n  const result = funcFindDeep(\n    instance,\n    tpl => tpl.elementRef.nativeElement === template.elementRef.nativeElement,\n    (vcr, tpl) => {\n      const context = {\n        ...variables,\n        $implicit,\n      };\n      vcr.clear();\n      vcr.createEmbeddedView(tpl, context).detectChanges();\n\n      return true;\n    },\n  );\n\n  if (!result) {\n    throw new Error('Cannot find path to the TemplateRef');\n  }\n};\n","import { Type } from '../../common/core.types';\nimport crawlByAttribute from '../crawl/crawl-by-attribute';\nimport crawlByAttributeValue from '../crawl/crawl-by-attribute-value';\nimport crawlByDeclaration from '../crawl/crawl-by-declaration';\nimport crawlById from '../crawl/crawl-by-id';\n\nexport default (selector: string | Type<any> | [string] | [string, any] | any) => {\n  if (typeof selector === 'string') {\n    return crawlById(selector);\n  }\n  if (Array.isArray(selector) && selector.length === 1 && typeof selector[0] === 'string') {\n    return crawlByAttribute(selector[0]);\n  }\n  if (Array.isArray(selector) && selector.length === 2 && typeof selector[0] === 'string') {\n    return crawlByAttributeValue(selector[0], selector[1]);\n  }\n  if (typeof selector === 'function') {\n    return crawlByDeclaration(selector);\n  }\n\n  throw new Error('Unknown selector');\n};\n","import { TemplateRef } from '@angular/core';\n\nimport coreInjector from '../../common/core.injector';\nimport { MockedDebugNode } from '../../mock-render/types';\nimport detectTextNode from '../crawl/detect-text-node';\n\nexport default (\n    result: Array<TemplateRef<any>>,\n    detector: (node: MockedDebugNode) => boolean,\n    limit = 0,\n  ): ((node: MockedDebugNode) => boolean) =>\n  node => {\n    try {\n      const instance = !detectTextNode(node) && detector(node) ? coreInjector(TemplateRef, node.injector) : undefined;\n      if (instance) {\n        result.push(instance);\n      }\n    } catch {\n      // nothing to do\n    }\n\n    return !!limit && result.length === limit;\n  };\n","export default (value: any): boolean => {\n  if (typeof value === 'string') {\n    return true;\n  }\n  if (Array.isArray(value) && typeof value[0] === 'string') {\n    return true;\n  }\n  if (typeof value === 'function') {\n    return true;\n  }\n\n  return false;\n};\n","import { TemplateRef } from '@angular/core';\n\nimport nestedCheck from '../crawl/nested-check';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\nimport funcParseFindArgsName from '../func.parse-find-args-name';\n\nimport detectCrawler from './detect-crawler';\nimport detectTemplateRef from './detect-template-ref';\nimport funcIsValidTemplateRefSelector from './func.is-valid-template-ref-selector';\n\nconst defaultNotFoundValue = {}; // simulating Symbol\n\nexport default (...args: any[]) => {\n  const [el, sel, notFoundValue] = funcParseFindArgs(args, funcIsValidTemplateRefSelector, defaultNotFoundValue);\n\n  const result: Array<TemplateRef<any>> = [];\n  const detector = detectCrawler(sel);\n  nestedCheck(mockHelperFind(funcGetLastFixture(), el, undefined), undefined, detectTemplateRef(result, detector, 1));\n  if (result.length > 0) {\n    return result[0];\n  }\n  if (notFoundValue !== defaultNotFoundValue) {\n    return notFoundValue;\n  }\n\n  throw new Error(`Cannot find a TemplateRef via ngMocks.findTemplateRef(${funcParseFindArgsName(sel)})`);\n};\n","import { TemplateRef } from '@angular/core';\n\nimport nestedCheck from '../crawl/nested-check';\nimport mockHelperFind from '../find/mock-helper.find';\nimport funcGetLastFixture from '../func.get-last-fixture';\nimport funcParseFindArgs from '../func.parse-find-args';\n\nimport detectCrawler from './detect-crawler';\nimport detectTemplateRef from './detect-template-ref';\nimport funcIsValidTemplateRefSelector from './func.is-valid-template-ref-selector';\n\nexport default (...args: any[]): Array<TemplateRef<any>> => {\n  const [el, sel] = funcParseFindArgs(args, funcIsValidTemplateRefSelector);\n\n  const result: Array<TemplateRef<any>> = [];\n  const detector = detectCrawler(sel);\n  nestedCheck(mockHelperFind(funcGetLastFixture(), el, undefined), undefined, detectTemplateRef(result, detector));\n\n  return result;\n};\n","import coreConfig from '../common/core.config';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockHelperCrawl from './crawl/mock-helper.crawl';\nimport mockHelperReveal from './crawl/mock-helper.reveal';\nimport mockHelperRevealAll from './crawl/mock-helper.reveal-all';\nimport mockHelperChange from './cva/mock-helper.change';\nimport mockHelperTouch from './cva/mock-helper.touch';\nimport mockHelperClick from './events/mock-helper.click';\nimport mockHelperEvent from './events/mock-helper.event';\nimport mockHelperTrigger from './events/mock-helper.trigger';\nimport mockHelperFind from './find/mock-helper.find';\nimport mockHelperFindAll from './find/mock-helper.find-all';\nimport mockHelperFindInstance from './find-instance/mock-helper.find-instance';\nimport mockHelperFindInstances from './find-instance/mock-helper.find-instances';\nimport mockHelperFormatHtml from './format/mock-helper.format-html';\nimport mockHelperFormatText from './format/mock-helper.format-text';\nimport mockHelperAutoSpy from './mock-helper.auto-spy';\nimport mockHelperConsoleIgnore from './mock-helper.console-ignore';\nimport mockHelperConsoleThrow from './mock-helper.console-throw';\nimport mockHelperDefaultConfig from './mock-helper.default-config';\nimport mockHelperDefaultMock from './mock-helper.default-mock';\nimport mockHelperFaster from './mock-helper.faster';\nimport mockHelperFlushTestBed from './mock-helper.flush-test-bed';\nimport mockHelperGet from './mock-helper.get';\nimport mockHelperGlobalExclude from './mock-helper.global-exclude';\nimport mockHelperGlobalKeep from './mock-helper.global-keep';\nimport mockHelperGlobalMock from './mock-helper.global-mock';\nimport mockHelperGlobalReplace from './mock-helper.global-replace';\nimport mockHelperGlobalWipe from './mock-helper.global-wipe';\nimport mockHelperGuts from './mock-helper.guts';\nimport mockHelperInput from './mock-helper.input';\nimport mockHelperOutput from './mock-helper.output';\nimport mockHelperReset from './mock-helper.reset';\nimport mockHelperStub from './mock-helper.stub';\nimport mockHelperStubMember from './mock-helper.stub-member';\nimport mockHelperHide from './render/mock-helper.hide';\nimport mockHelperRender from './render/mock-helper.render';\nimport mockHelperFindTemplateRef from './template-ref/mock-helper.find-template-ref';\nimport mockHelperFindTemplateRefs from './template-ref/mock-helper.find-template-refs';\n\nconst flagNames = ['onMockBuilderMissingDependency', 'onMockInstanceRestoreNeed', 'onTestBedFlushNeed'] as const;\n\nexport default {\n  autoSpy: mockHelperAutoSpy,\n  change: mockHelperChange,\n  click: mockHelperClick,\n  config: (config: {\n    mockRenderCacheSize?: number | null;\n    onMockBuilderMissingDependency?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onMockInstanceRestoreNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onTestBedFlushNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n  }) => {\n    const flags = ngMocksUniverse.global.get('flags');\n    for (const flag of flagNames) {\n      if (config[flag] === null) {\n        flags[flag] = coreConfig[flag];\n      } else if (config[flag] !== undefined) {\n        flags[flag] = config[flag];\n      }\n    }\n    if (config.mockRenderCacheSize === null) {\n      ngMocksUniverse.global.delete('mockRenderCacheSize');\n    } else if (config.mockRenderCacheSize !== undefined) {\n      ngMocksUniverse.global.set('mockRenderCacheSize', config.mockRenderCacheSize);\n    }\n  },\n  crawl: mockHelperCrawl,\n  defaultConfig: mockHelperDefaultConfig,\n  defaultMock: mockHelperDefaultMock,\n  event: mockHelperEvent,\n  faster: mockHelperFaster,\n  find: mockHelperFind,\n  findAll: mockHelperFindAll,\n  findInstance: mockHelperFindInstance,\n  findInstances: mockHelperFindInstances,\n  findTemplateRef: mockHelperFindTemplateRef,\n  findTemplateRefs: mockHelperFindTemplateRefs,\n  flushTestBed: mockHelperFlushTestBed,\n  formatHtml: mockHelperFormatHtml,\n  formatText: mockHelperFormatText,\n  get: mockHelperGet,\n  globalExclude: mockHelperGlobalExclude,\n  globalKeep: mockHelperGlobalKeep,\n  globalMock: mockHelperGlobalMock,\n  globalReplace: mockHelperGlobalReplace,\n  globalWipe: mockHelperGlobalWipe,\n  guts: mockHelperGuts,\n  hide: mockHelperHide,\n  ignoreOnConsole: mockHelperConsoleIgnore,\n  input: mockHelperInput,\n  output: mockHelperOutput,\n  render: mockHelperRender,\n  reset: mockHelperReset,\n  reveal: mockHelperReveal,\n  revealAll: mockHelperRevealAll,\n  stub: mockHelperStub,\n  stubMember: mockHelperStubMember,\n  throwOnConsole: mockHelperConsoleThrow,\n  touch: mockHelperTouch,\n  trigger: mockHelperTrigger,\n};\n","/* eslint-disable max-lines */\n\nimport { DebugNode, EventEmitter, InjectionToken, Injector, Provider, TemplateRef } from '@angular/core';\nimport { ComponentFixture, TestModuleMetadata } from '@angular/core/testing';\n\nimport { AnyDeclaration, AnyType, DebugNodeSelector, Type } from '../common/core.types';\nimport { NgModuleWithProviders } from '../common/func.is-ng-module-def-with-providers';\nimport { IMockBuilderConfig } from '../mock-builder/types';\nimport { MockedDebugElement, MockedDebugNode } from '../mock-render/types';\nimport { CustomMockFunction, MockedFunction } from '../mock-service/types';\n\nimport { FORMAT_SET, FORMAT_SINGLE } from './format/types';\nimport mockHelperObject from './mock-helper.object';\n\n/**\n * ngMocks provides a lot of tools to simply testing.\n *\n * @see https://ng-mocks.sudo.eu/api/ngMocks\n */\nexport const ngMocks: {\n  /**\n   * ngMocks.autoSpy installs proper spies instead of empty functions.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/auto-spy\n   */\n  autoSpy(type: 'jasmine' | 'jest' | 'default' | 'reset'): void;\n\n  /**\n   * ngMocks.autoSpy installs proper spies instead of empty functions.\n   *\n   * @see https://ng-mocks.sudo.eu/extra/auto-spy\n   */\n  autoSpy(type: CustomMockFunction): void;\n\n  /**\n   * ngMocks.defaultConfig sets the default config of declarations for MockBuilder.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultConfig\n   */\n  defaultConfig<T>(token: string | AnyDeclaration<T>, config?: IMockBuilderConfig): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T>(\n    token: InjectionToken<T>,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock string tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T = any>(\n    token: string,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock declarations.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T>(\n    def: AnyType<T>,\n    handler?: (value: T, injector: Injector) => void | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.defaultMock sets default customizations of mock declarations and tokens.\n   * It helps to avoid repetitions from test to test.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/defaultMock\n   */\n  defaultMock<T = any>(\n    defs: Array<AnyDeclaration<T>>,\n    handler?: (value: undefined | T, injector: Injector) => undefined | Partial<T>,\n    config?: IMockBuilderConfig,\n  ): void;\n\n  /**\n   * ngMocks.globalExclude configures which declarations, providers and tokens\n   * should be excluded from mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalExclude\n   *\n   * ```ts\n   * ngMocks.globalExclude(TranslationModule);\n   * ```\n   */\n  globalExclude(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalKeep configures which declarations, providers and tokens\n   * should not be mocked and will stay as they are in mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalKeep\n   *\n   * ```ts\n   * ngMocks.globalKeep(TranslationModule);\n   * ```\n   */\n  globalKeep(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalMock configures which declarations, providers and tokens\n   * should be mocked in kept declarations.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalMock\n   *\n   * ```ts\n   * ngMocks.globalMock(TranslationModule);\n   * ```\n   */\n  globalMock(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.globalReplace configures which declarations, providers and tokens\n   * should be substituted in mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalReplace\n   *\n   * ```ts\n   * ngMocks.globalReplace(BrowserAnimationsModule, NoopAnimationsModule);\n   * ```\n   */\n  globalReplace(source: AnyType<any>, destination: AnyType<any>): void;\n\n  /**\n   * ngMocks.globalWipe resets all customizations of ngMocks.global* and mgMocks.default* functions.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/globalWipe\n   *\n   * ```ts\n   * ngMocks.globalWipe(TranslationModule);\n   * ngMocks.globalWipe(BrowserAnimationsModule);\n   * ```\n   */\n  globalWipe(source: AnyDeclaration<any>, recursively?: boolean): void;\n\n  /**\n   * ngMocks.change triggers ControlValueAccessor update.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/change\n   */\n  change(elSelector: DebugNodeSelector, value: any, methodName?: string): void;\n\n  /**\n   * ngMocks.touch triggers ControlValueAccessor touch.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/touch\n   */\n  touch(elSelector: DebugNode | DebugNodeSelector, methodName?: string): void;\n\n  /**\n   * ngMocks.click properly simulates a click on an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/click\n   */\n  click(elSelector: HTMLElement | DebugNodeSelector, payload?: Partial<MouseEvent>): void;\n\n  /**\n   * ngMocks.trigger lets trigger custom events on DebugElements.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/trigger\n   *\n   * ```ts\n   * ngMocks.trigger(el, new CustomEvent('my-event'));\n   * ```\n   */\n  trigger(elSelector: DebugNodeSelector, event: Event): void;\n\n  /**\n   * ngMocks.trigger lets trigger custom events on DebugElements.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/trigger\n   *\n   * ```ts\n   * ngMocks.trigger(el, 'click');\n   * ngMocks.trigger(el, 'keydown.control.shift.z');\n   * ```\n   */\n  trigger(\n    elSelector: HTMLElement | DebugNodeSelector,\n    event: string,\n    payload?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent>,\n  ): void;\n\n  /**\n   * ngMocks.event builds correct event objects.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/event\n   */\n  event(\n    event: string,\n    init?: EventInit,\n    overrides?: Partial<UIEvent | KeyboardEvent | MouseEvent | TouchEvent | Event>,\n  ): Event;\n\n  /**\n   * ngMocks.render renders a templateRef or DebugElement.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/render\n   *\n   * ```ts\n   * ngMocks.header(component, headerEl);\n   * ```\n   */\n  render(\n    instance: object,\n    template: TemplateRef<any> | DebugNode,\n    $implicit?: any,\n    variables?: Record<keyof any, any>,\n  ): void;\n\n  /**\n   * ngMocks.render renders a structural directive.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/render\n   *\n   * ```ts\n   * ngMocks.render(component, directiveInstance);\n   * ```\n   */\n  render(instance: object, directive: object, $implicit?: any, variables?: Record<keyof any, any>): void;\n\n  /**\n   * ngMocks.hide hides a rendered templateRef or DebugElement.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/hide\n   *\n   * ```ts\n   * ngMocks.hide(component, headerEl);\n   * ```\n   */\n  hide(instance: object, tpl?: TemplateRef<any> | DebugNode): void;\n\n  /**\n   * ngMocks.hide hides a rendered structural directive.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/hide\n   *\n   * ```ts\n   * ngMocks.hide(component, directiveInstance);\n   * ```\n   */\n  hide(instance: object, directive: object): void;\n\n  /**\n   * ngMocks.input allows to get an input value without knowing\n   * which component / directive it belongs to.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/input\n   *\n   * ```ts\n   * const input = ngMocks.input('app-component', 'version');\n   * ```\n   */\n  input<T = any>(elSelector: DebugNodeSelector, input: string): T;\n\n  /**\n   * ngMocks.input allows to get an input value without knowing\n   * which component / directive it belongs to, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/input\n   *\n   * ```ts\n   * const input = ngMocks.input('app-component', 'version', undefined);\n   * ```\n   */\n  input<T = any, D = undefined>(elSelector: DebugNodeSelector, input: string, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.output allows to get an output emitter without knowing\n   * which component / directive it belongs to.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/output\n   *\n   * ```ts\n   * const outputEmitter = ngMocks.output('app-component', 'update');\n   * ```\n   */\n  output<T = any>(elSelector: DebugNodeSelector, output: string): EventEmitter<T>;\n\n  /**\n   * ngMocks.output allows to get an output emitter without knowing\n   * which component / directive it belongs to, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/output\n   *\n   * ```ts\n   * const outputEmitter = ngMocks.output('app-component', 'update', undefined);\n   * ```\n   */\n  output<T = any, D = undefined>(elSelector: DebugNodeSelector, output: string, notFoundValue: D): D | EventEmitter<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component,\n   * and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(MyComponent);\n   * ```\n   */\n  find<T>(component: Type<T>): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component\n   * starting from an element, and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, MyComponent);\n   * ```\n   */\n  find<T>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n  ): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component,\n   * and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(MyComponent, undefined);\n   * ```\n   */\n  find<T, D>(component: Type<T>, notFoundValue: D): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement of a particular component\n   * starting from an element, and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture, MyComponent, undefined);\n   * ```\n   */\n  find<T, D>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector,\n   * and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find('.header');\n   * const el = ngMocks.find('[data-key=5]');\n   * const el = ngMocks.find(['data-key', 5]);\n   * ```\n   */\n  find<T = any>(cssSelector: string | [string] | [string, string | number]): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector\n   * starting from an element, and returns the first found.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, '.header');\n   * const el = ngMocks.find(fixture, '[data-key=5]');\n   * const el = ngMocks.find(debugElement, ['data-key', 5]);\n   * ```\n   */\n  find<T = any>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n  ): MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector,\n   * and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find('.header', undefined);\n   * const el = ngMocks.find('[data-key=5]', null);\n   * const el = ngMocks.find(['data-key', 5], null);\n   * ```\n   */\n  find<T = any, D = undefined>(\n    cssSelector: string | [string] | [string, string | number],\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.find searches for the DebugElement based on css selector\n   * starting from an element, and returns the first found, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/find\n   *\n   * ```ts\n   * const el = ngMocks.find(fixture.debugElement, '.header', undefined);\n   * const el = ngMocks.find(fixture, '[data-key=5]', null);\n   * const el = ngMocks.find(debugElement, ['data-key', 5], null);\n   * ```\n   */\n  find<T = any, D = undefined>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n    notFoundValue: D,\n  ): D | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements of a particular component,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(MyComponent);\n   * ```\n   */\n  findAll<T>(component: Type<T>): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements of a particular component\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(fixture.debugElement, MyComponent);\n   * ```\n   */\n  findAll<T>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    component: Type<T>,\n  ): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements based on css selector,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll('.header');\n   * const all = ngMocks.findAll('[data-key=5]');\n   * const all = ngMocks.findAll(['data-key', 5]);\n   * ```\n   */\n  findAll<T = any>(cssSelector: string | [string] | [string, string | number]): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.findAll searches for all DebugElements based on css selector\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findAll\n   *\n   * ```ts\n   * const all = ngMocks.findAll(fixture.debugElement, '.header');\n   * const all = ngMocks.findAll(fixture, '[data-key=5]');\n   * const all = ngMocks.findAll(debugElement, ['data-key', 5]);\n   * ```\n   */\n  findAll<T = any>(\n    debugElement: MockedDebugElement | ComponentFixture<any> | undefined | null,\n    cssSelector: string | [string] | [string, string | number],\n  ): Array<MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(HeaderComponent);\n   * ```\n   */\n  reveal<T>(selector: AnyType<T>): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('header', HeaderComponent);\n   * ```\n   */\n  reveal<T>(elSelector: DebugNodeSelector, selector: AnyType<T>): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(['tpl', 'header']);\n   * ```\n   */\n  reveal<T = any>(selector: string | [string] | [string, any]): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('header', ['tpl', 'header']);\n   * ```\n   */\n  reveal<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n  ): MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template,\n   * otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(HeaderComponent, undefined);\n   * ```\n   */\n  reveal<T, D>(selector: AnyType<T>, notFoundValue: D): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('sidebar', HeaderComponent, undefined);\n   * ```\n   */\n  reveal<T, D>(\n    elSelector: DebugNodeSelector,\n    selector: AnyType<T>,\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template,\n   * otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal(['tpl', 'header'], undefined);\n   * ```\n   */\n  reveal<T = any, D = undefined>(\n    selector: string | [string] | [string, any],\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.reveal allows finding DebugNodes which belong to ng-container or ng-template\n   * starting from an element, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reveal\n   *\n   * ```ts\n   * const ngContainer = ngMocks.reveal('sidebar', ['tpl', 'header'], undefined);\n   * ```\n   */\n  reveal<T = any, D = undefined>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n    notFoundValue: D,\n  ): D | MockedDebugNode<T> | MockedDebugElement<T>;\n\n  /**\n   * ngMocks.revealAll allows finding all DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll(HeaderComponent);\n   * ```\n   */\n  revealAll<T>(selector: AnyType<T>): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll(['tpl', 'header']);\n   * ```\n   */\n  revealAll<T = any>(selector: string | [string] | [string, any]): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll('sidebar', HeaderComponent);\n   * ```\n   */\n  revealAll<T>(elSelector: DebugNodeSelector, selector: AnyType<T>): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.reveal allows finding all DebugNodes which belong to ng-container or ng-template\n   * starting from an element.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/revealAll\n   *\n   * ```ts\n   * const ngContainers = ngMocks.revealAll('sidebar', ['tpl', 'header']);\n   * ```\n   */\n  revealAll<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any],\n  ): Array<MockedDebugNode<T> | MockedDebugElement<T>>;\n\n  /**\n   * ngMocks.get tries to get an instance of declaration, provider or token\n   * from the element which is matching a selector.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get('my-component', MyComponent);\n   * const myDirective = ngMocks.get('my-component', MyDirective);\n   * ```\n   */\n  get<T>(elSelector: DebugNodeSelector, provider: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.get tries to get an instance of declaration, provider or token\n   * from the element which is matching a selector, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get('my-component', MyComponent, undefined);\n   * const myDirective = ngMocks.get('my-component', MyDirective, null);\n   * ```\n   */\n  get<T, D>(elSelector: DebugNodeSelector, provider: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.get tries to get an instance of provider or token for TestBed.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/get\n   *\n   * ```ts\n   * const myComponent = ngMocks.get(MyComponent);\n   * const myDirective = ngMocks.get(MyDirective);\n   * ```\n   */\n  get<T>(provider: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token,\n   * and returns the first one.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(SidebarComponent);\n   * const service = ngMocks.findInstance(AuthService);\n   * const config = ngMocks.findInstance(APP_CONFIG);\n   * ```\n   */\n  findInstance<T>(instanceClass: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token\n   * starting from an element, and returns the first one.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(fixture, SidebarComponent);\n   * const service = ngMocks.findInstance('header', AuthService);\n   * const config = ngMocks.findInstance(debugElement, APP_CONFIG);\n   * ```\n   */\n  findInstance<T>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>): T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token,\n   * and returns the first one, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(SidebarComponent, undefined);\n   * const service = ngMocks.findInstance(AuthService, null);\n   * const config = ngMocks.findInstance(APP_CONFIG, false);\n   */\n  findInstance<T, D>(instanceClass: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.findInstance searches for an instance of declaration, provider or token\n   * starting from an element, and returns the first one, otherwise the notFoundValue.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstance\n   *\n   * ```ts\n   * const component = ngMocks.findInstance(fixture, SidebarComponent, undefined);\n   * const service = ngMocks.findInstance('header', AuthService, null);\n   * const config = ngMocks.findInstance(debugElement, APP_CONFIG, false);\n   * ```\n   */\n  findInstance<T, D>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>, notFoundValue: D): D | T;\n\n  /**\n   * ngMocks.findInstances searches for all instances of declaration, provider or token,\n   * and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstances\n   *\n   * ```ts\n   * const components = ngMocks.findInstances(SidebarComponent);\n   * const services = ngMocks.findInstances(AuthService);\n   * const configs = ngMocks.findInstances(APP_CONFIG);\n   * ```\n   */\n  findInstances<T>(instanceClass: AnyDeclaration<T>): T[];\n\n  /**\n   * ngMocks.findInstances searches for all instances of declaration, provider or token\n   * starting from an element, and returns an array of them.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findInstances\n   *\n   * ```ts\n   * const components = ngMocks.findInstances(fixture, SidebarComponent);\n   * const services = ngMocks.findInstances('header', AuthService);\n   * const configs = ngMocks.findInstances(debugElement, APP_CONFIG);\n   * ```\n   */\n  findInstances<T>(elSelector: DebugNodeSelector, instanceClass: AnyDeclaration<T>): T[];\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found, otherwise the notFoundValue.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef('sidebar', StructuralDirective, undefined);\n   * ```\n   */\n  findTemplateRef<T = any, D = undefined>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n    notFoundValue: D,\n  ): D | TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef('sidebar', StructuralDirective);\n   * ```\n   */\n  findTemplateRef<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n  ): TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found, otherwise the notFoundValue.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef(['mat-row'], null);\n   * ```\n   */\n  findTemplateRef<T = any, D = undefined>(\n    selector: string | [string] | [string, any] | AnyType<any>,\n    notFoundValue: D,\n  ): D | TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRef searches for a TemplateRef which is matching the selector,\n   * and returns the first found.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRef\n   *\n   * ```ts\n   * const templateRef = ngMocks.findTemplateRef(['mat-row']);\n   * ```\n   */\n  findTemplateRef<T = any>(selector: string | [string] | [string, any] | AnyType<any>): TemplateRef<T>;\n\n  /**\n   * ngMocks.findTemplateRefs searches for all TemplateRefs which is matching the selector\n   * starting from an element, and returns an array of them.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRefs\n   *\n   * ```ts\n   * const templateRefs = ngMocks.findTemplateRefs('header', StructuralDirective);\n   * ```\n   */\n  findTemplateRefs<T = any>(\n    elSelector: DebugNodeSelector,\n    selector: string | [string] | [string, any] | AnyType<any>,\n  ): Array<TemplateRef<T>>;\n\n  /**\n   * ngMocks.findTemplateRefs searches for all TemplateRefs which is matching the selector,\n   * and returns an array of them.\n   * The TemplateRef can be rendered later on.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/findTemplateRefs\n   *\n   * ```ts\n   * const templateRefs = ngMocks.findTemplateRefs(['mat-row']);\n   * ```\n   */\n  findTemplateRefs<T = any>(selector: string | [string] | [string, any] | AnyType<any>): Array<TemplateRef<T>>;\n\n  /**\n   * ngMocks.crawl correctly crawls through Angular DOM with respect of TemplateRefs and ng-containers.\n   * Usually, it's used internally.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/crawl\n   */\n  crawl(\n    elSelector: DebugNodeSelector,\n    callback: (\n      node: MockedDebugNode | MockedDebugElement,\n      parent?: MockedDebugNode | MockedDebugElement,\n    ) => boolean | void,\n    includeTextNodes?: boolean,\n  ): void;\n\n  /**\n   * ngMocks.stub lets replace a method, getter or setter with a dummy callback.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stub\n   *\n   * ```ts\n   * ngMocks.stub(instance, 'save'); // save is an empty callback now.\n   * ngMocks.stub(instance, 'user', 'get'); // getter is an empty callback now.\n   * ngMocks.stub(instance, 'user', 'set'); // setter is an empty callback now.\n   * ```\n   */\n  stub<T = MockedFunction, I = any>(instance: I, name: keyof I, style?: 'get' | 'set'): T;\n\n  /**\n   * ngMocks.stub lets apply partial customizations to an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stub\n   *\n   * ```ts\n   * ngMocks.stub(instance, {\n   *   save: () => undefined,\n   *   user: null,\n   * });\n   * ```\n   */\n  stub<I extends object>(instance: I, overrides: Partial<I>): I;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to getters of properties of an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'user', jasmine.createSpy(), 'get')\n   *   .and.returnValue(null);\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends () => T[K]>(\n    instance: T,\n    name: K,\n    stub: S,\n    encapsulation: 'get',\n  ): S;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to setters of properties of an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'user', jasmine.createSpy(), 'set')\n   *   .and.throwError('setter is forbidden');\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends (value: T[K]) => void>(\n    instance: T,\n    name: K,\n    stub: S,\n    encapsulation: 'set',\n  ): S;\n\n  /**\n   * ngMocks.stubMember lets inject spies it to an instance.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/stubMember\n   *\n   * ```ts\n   * ngMocks.stubMember(instance, 'save', jasmine.createSpy());\n   * ngMocks.stubMember(instance, 'user', null);\n   * ```\n   */\n  stubMember<T extends object, K extends keyof T, S extends T[K]>(instance: T, name: K, stub: S): S;\n\n  /**\n   * ngMocks.guts provides a simple way to configure complex mocks.\n   * Please check documentation.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/guts\n   */\n  guts(\n    keep: AnyDeclaration<any> | Provider | Array<AnyDeclaration<any> | Provider> | null | undefined,\n    mock?:\n      | AnyDeclaration<any>\n      | NgModuleWithProviders\n      | Provider\n      | Array<AnyDeclaration<any> | NgModuleWithProviders | Provider>\n      | null\n      | undefined,\n    exclude?: AnyDeclaration<any> | Array<AnyDeclaration<any>> | null | undefined,\n  ): TestModuleMetadata;\n\n  /**\n   * ngMocks.faster lets reuse the same TestBed between tests instead of resetting it.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/faster\n   */\n  faster(): void;\n\n  /**\n   * ignoreOnConsole suppresses any log calls, other methods can be suppressed too.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/ignoreOnConsole\n   */\n  ignoreOnConsole(...args: Array<keyof typeof console>): void;\n\n  /**\n   * Thanks Ivy, it does not throw an error, and we have to use injector.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/throwOnConsole\n   */\n  throwOnConsole(...args: Array<keyof typeof console>): void;\n\n  /**\n   * ngMocks.formatHtml normalizes html for a DebugElement, fixture or html string.\n   * It removes redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatHtml\n   *\n   * ```ts\n   * const html = ngMocks.formatHTML(fixture);\n   * const html = ngMocks.formatHTML(debugElement);\n   * const html = ngMocks.formatHTML('<div>   </div>');\n   * ```\n   */\n  formatHtml(html: FORMAT_SINGLE, outer?: boolean): string;\n\n  /**\n   * ngMocks.formatHtml normalizes html for an array of DebugElements, fixtures or html strings.\n   * It removes redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatHtml\n   *\n   * const [html1, html2] = ngMocks.formatHTML([fixture1, fixture2]);\n   * const htmlStrings = ngMocks.formatHTML(debugElements);\n   */\n  formatHtml(html: FORMAT_SET, outer?: boolean): string[];\n\n  /**\n   * ngMocks.formatText normalizes text for a DebugElement, fixture or html string.\n   * It removes tags, redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatText\n   *\n   * ```ts\n   * const txt = ngMocks.formatText(fixture);\n   * const txt = ngMocks.formatText(debugElement);\n   * const txt = ngMocks.formatText('<div>   </div>');\n   * ```\n   */\n  formatText(text: FORMAT_SINGLE, outer?: boolean): string;\n\n  /**\n   * ngMocks.formatText normalizes text for an array of DebugElements, fixtures or html strings.\n   * It removes tags, redundant spaces, comments etc.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/formatText\n   *\n   * const [txt1, txt2] = ngMocks.formatText([fixture1, fixture2]);\n   * const txtStrings = ngMocks.formatText(debugElements);\n   */\n  formatText(text: FORMAT_SET, outer?: boolean): string[];\n\n  /**\n   * ngMocks.flushTestBed resets TestBed.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/flushTestBed\n   */\n  flushTestBed(): void;\n\n  /**\n   * ngMocks.reset resets cache of ng-mocks.\n   *\n   * @see https://ng-mocks.sudo.eu/api/ngMocks/reset\n   */\n  reset(): void;\n\n  /**\n   * ngMocks.config lets customize default behavior of error reporting.\n   */\n  config(config: {\n    mockRenderCacheSize?: number | null;\n    onMockBuilderMissingDependency?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onMockInstanceRestoreNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n    onTestBedFlushNeed?: 'throw' | 'warn' | 'i-know-but-disable' | null;\n  }): void;\n} = mockHelperObject;\n","import {\n  ClassProvider,\n  ExistingProvider,\n  FactoryProvider,\n  InjectionToken,\n  Provider,\n  StaticClassProvider,\n  ValueProvider,\n} from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\nimport funcImportExists from '../common/func.import-exists';\nimport mockHelperStub from '../mock-helper/mock-helper.stub';\nimport helperUseFactory from '../mock-service/helper.use-factory';\nimport { MockService } from '../mock-service/mock-service';\n\nconst defaultValue = {};\n\n/**\n * MockProviders creates an array of mock providers out of passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: MockProviders(\n *     Dep1Service,\n *     Dep2Service,\n *   ),\n * });\n * ```\n */\nexport function MockProviders(...providers: Array<AnyDeclaration<any>>): FactoryProvider[] {\n  return providers.map((provider: any) => MockProvider(provider, defaultValue));\n}\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary service.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(Dep1Service),\n *     MockProvider(Dep2Service, {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I extends object>(instance: AnyType<I>, overrides?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(APP_ID),\n *     MockProvider(WEB_SOCKET, {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(provider: InjectionToken<I>, useValue?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider creates a mock provider out of passed an arbitrary string token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider('web_socket', {\n *       prop: true,\n *       func: () => 'mock',\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I = any>(provider: string, useValue?: Partial<I>): FactoryProvider;\n\n/**\n * MockProvider generates useValue based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useValue\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, {isLoggedIn: true}, 'useValue'),\n *     MockProvider(APP_ROUTES, 5, 'useValue', true), // multi flag\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: ValueProvider['useValue'],\n  style: 'useValue',\n  multi?: ValueProvider['multi'],\n): ValueProvider;\n\n/**\n * MockProvider generates useExisting based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useExisting\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, MockAuthService, 'useExisting', true),\n *     MockProvider(APP_ROUTES, MOCK_ROUTES, 'useExisting', true), // multi flag\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: ExistingProvider['useExisting'],\n  style: 'useExisting',\n  multi?: ExistingProvider['multi'],\n): ExistingProvider;\n\n/**\n * MockProvider generates useClass based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useClass\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, MockAuthService, 'useClass', [ctorDep1, ctorDep2]),\n *     MockProvider(UserService, MockUserService, 'useClass', {\n *       multi: true, // multi flag\n *       deps: [ctorDep1, ctorDep2],\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: StaticClassProvider['useClass'],\n  style: 'useClass',\n  multiDeps?:\n    | StaticClassProvider['multi']\n    | StaticClassProvider['deps']\n    | {\n        multi?: StaticClassProvider['multi'];\n        deps?: StaticClassProvider['deps'];\n      },\n): ClassProvider;\n\n/**\n * MockProvider generates useFactory based on passed parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockProvider#useFactory\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   providers: [\n *     MockProvider(AuthService, (dep1, dep2) => {\n *       // ...\n *     }, 'useFactory', [ctorDep1, ctorDep2]),\n *     MockProvider(UserService, (dep1, dep2) => {\n *       // ...\n *     }, 'useFactory', {\n *       multi: true, // multi flag\n *       deps: [ctorDep1, ctorDep2],\n *     }),\n *   ],\n * });\n * ```\n */\nexport function MockProvider<I>(\n  provider: AnyDeclaration<I>,\n  value: FactoryProvider['useFactory'],\n  style: 'useFactory',\n  multiDeps?:\n    | FactoryProvider['multi']\n    | FactoryProvider['deps']\n    | {\n        multi?: FactoryProvider['multi'];\n        deps?: FactoryProvider['deps'];\n      },\n): FactoryProvider;\n\nexport function MockProvider(\n  provide: any,\n  overrides: any = defaultValue,\n  style?: 'useValue' | 'useExisting' | 'useClass' | 'useFactory',\n  flags:\n    | boolean\n    | any[]\n    | {\n        deps?: any[];\n        multi?: boolean;\n      } = {},\n): Provider {\n  funcImportExists(provide, 'MockProvider');\n\n  const { deps, multi } =\n    typeof flags === 'boolean'\n      ? { deps: undefined, multi: flags }\n      : Array.isArray(flags)\n        ? {\n            deps: flags,\n            multi: undefined,\n          }\n        : flags;\n\n  if (style) {\n    return {\n      provide,\n      [style]: overrides,\n      deps,\n      multi,\n    };\n  }\n\n  return helperUseFactory(\n    provide,\n    () => MockService(provide),\n    value => {\n      if (overrides === defaultValue) {\n        return value;\n      }\n      if (!value) {\n        return overrides;\n      }\n\n      return mockHelperStub(value, overrides);\n    },\n  );\n}\n","import { Injector, ViewContainerRef } from '@angular/core';\nimport { getTestBed, MetadataOverride, TestBed, TestBedStatic, TestModuleMetadata } from '@angular/core/testing';\n\nimport funcExtractTokens from '../mock-builder/func.extract-tokens';\nimport { MockBuilder } from '../mock-builder/mock-builder';\nimport getOverrideDef from '../mock-builder/promise/get-override-def';\nimport { ngMocks } from '../mock-helper/mock-helper';\nimport mockHelperFasterInstall from '../mock-helper/mock-helper.faster-install';\nimport { MockProvider } from '../mock-provider/mock-provider';\nimport helperCreateClone from '../mock-service/helper.create-clone';\n\nimport coreConfig from './core.config';\nimport coreDefineProperty from './core.define-property';\nimport { flatten, mapEntries, mapValues } from './core.helpers';\nimport coreInjector from './core.injector';\nimport coreReflectMeta from './core.reflect.meta';\nimport coreReflectModuleResolve from './core.reflect.module-resolve';\nimport coreReflectProvidedIn from './core.reflect.provided-in';\nimport { NG_MOCKS, NG_MOCKS_ROOT_PROVIDERS, NG_MOCKS_TOUCHES } from './core.tokens';\nimport { AnyType, dependencyKeys } from './core.types';\nimport { getSourceOfMock } from './func.get-source-of-mock';\nimport funcGetType from './func.get-type';\nimport { isMockNgDef } from './func.is-mock-ng-def';\nimport { isNgDef } from './func.is-ng-def';\nimport { isNgModuleDefWithProviders } from './func.is-ng-module-def-with-providers';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst applyOverride = (def: any, override: any) => {\n  if (isNgDef(def, 'c')) {\n    TestBed.overrideComponent(def, override);\n  } else if (isNgDef(def, 'd')) {\n    TestBed.overrideDirective(def, override);\n  } else if (isNgDef(def, 'm')) {\n    TestBed.overrideModule(def, override);\n  }\n  if (isNgDef(def, 't')) {\n    TestBed.overrideProvider(def, override);\n  } else if (isNgDef(def, 'i')) {\n    TestBed.overrideProvider(def, override);\n  }\n};\n\nconst applyOverrides = (overrides: Map<AnyType<any>, [MetadataOverride<any>, MetadataOverride<any>]>): void => {\n  for (const [def, [override, original]] of mapEntries(overrides)) {\n    (TestBed as any).ngMocksOverrides.set(def, {\n      ...original,\n      override,\n    });\n    applyOverride(def, override);\n  }\n};\n\n// Thanks Ivy and its TestBed.override - it does not clean up leftovers.\nconst applyNgMocksOverrides = (testBed: TestBedStatic & { ngMocksOverrides?: Map<any, any> }): void => {\n  if (testBed.ngMocksOverrides?.size) {\n    ngMocks.flushTestBed();\n    for (const [def, original] of mapEntries(testBed.ngMocksOverrides)) {\n      applyOverride(def, original);\n    }\n  }\n  testBed.ngMocksOverrides = undefined;\n};\n\nconst initTestBed = () => {\n  if (!(TestBed as any).ngMocksSelectors) {\n    coreDefineProperty(TestBed, 'ngMocksSelectors', new Map());\n  }\n  // istanbul ignore else\n  if (!(TestBed as any).ngMocksOverrides) {\n    coreDefineProperty(TestBed, 'ngMocksOverrides', new Map());\n  }\n};\n\nconst generateTouches = (moduleDef: Partial<Record<dependencyKeys, any>>, touches: Set<any>): void => {\n  for (const key of coreConfig.dependencies) {\n    for (const item of moduleDef[key] ? flatten(moduleDef[key]) : []) {\n      const def = funcGetType(item);\n      if (isNgModuleDefWithProviders(item)) {\n        generateTouches(item, touches);\n      }\n      if (touches.has(def)) {\n        continue;\n      }\n      touches.add(def);\n      if (typeof def !== 'function') {\n        continue;\n      }\n\n      if (!Object.prototype.hasOwnProperty.call(def, '__ngMocksTouches')) {\n        const local = new Set<any>();\n        const meta = coreReflectMeta(def);\n        coreDefineProperty(def, '__ngMocksTouches', local, false);\n        if (meta) {\n          generateTouches(meta, local);\n        }\n      }\n\n      mapValues(def.__ngMocksTouches, touches);\n    }\n  }\n};\n\nconst defineTouches = (testBed: TestBed, moduleDef: TestModuleMetadata, knownTouches?: Set<any>) => {\n  let touches = knownTouches;\n\n  if (!touches && ngMocksUniverse.getDefaults().size > 0) {\n    touches = funcExtractTokens(\n      (testBed as any)._providers || /* istanbul ignore next Ivy part */ (testBed as any)._compiler?.providers,\n    ).touches;\n    if (!touches) {\n      touches = new Set();\n      moduleDef.providers = moduleDef.providers || [];\n      moduleDef.providers.push({ provide: NG_MOCKS_TOUCHES, useValue: touches });\n    }\n    generateTouches(moduleDef, touches);\n  }\n\n  return touches;\n};\n\nconst applyPlatformOverrideDef = (def: any) => {\n  const ngModule = funcGetType(def);\n  if ((TestBed as any).ngMocksOverrides.has(ngModule)) {\n    return;\n  }\n\n  const original = coreReflectModuleResolve(ngModule);\n  const set = getOverrideDef(original);\n  if (set) {\n    (TestBed as any).ngMocksOverrides.set(ngModule, { set: original });\n    TestBed.overrideModule(ngModule, { set });\n  }\n};\n\nconst applyPlatformOverridesBasedOnProvidedIn = (provide: any, touches: Set<any>) => {\n  const providedIn = coreReflectProvidedIn(provide);\n  if (!providedIn) {\n    return;\n  }\n  // knownTouches present from MockBuilder and we can rely on it,\n  // otherwise we have to override the provider always.\n  if (typeof providedIn !== 'string' && !touches.has(providedIn)) {\n    return;\n  }\n  (TestBed as any).ngMocksOverrides.set(provide, {});\n  TestBed.overrideProvider(provide, MockProvider(provide as never));\n};\n\nconst applyPlatformOverridesBasedOnDefaults = (touches: Set<any>) => {\n  for (const [provide, [config]] of mapEntries(ngMocksUniverse.getDefaults())) {\n    if (config !== 'mock') {\n      continue;\n    }\n    if (!isNgDef(provide, 'i') && !isNgDef(provide, 't')) {\n      continue;\n    }\n    if (touches.has(provide)) {\n      continue;\n    }\n    if ((TestBed as any).ngMocksOverrides.has(provide)) {\n      continue;\n    }\n    applyPlatformOverridesBasedOnProvidedIn(provide, touches);\n  }\n};\n\nconst applyPlatformOverrides = (testBed: TestBed, touches: Set<any>) => {\n  // istanbul ignore else\n  if ((TestBed as any).ngMocksOverrides) {\n    const backup = ngMocksUniverse.touches;\n    ngMocksUniverse.touches = touches;\n    for (const def of flatten(testBed.ngModule || /* istanbul ignore next */ [])) {\n      applyPlatformOverrideDef(def);\n    }\n    applyPlatformOverridesBasedOnDefaults(touches);\n    ngMocksUniverse.touches = backup;\n  }\n};\n\nconst configureTestingModule =\n  (\n    original: TestBedStatic['configureTestingModule'],\n    instance: TestBedStatic,\n  ): TestBedStatic['configureTestingModule'] =>\n  (moduleDef: TestModuleMetadata) => {\n    initTestBed();\n\n    const useMockBuilder =\n      typeof moduleDef === 'object' &&\n      !!moduleDef &&\n      (!moduleDef.providers || moduleDef.providers.indexOf(MockBuilder) === -1);\n    // 0b10 - mock exist\n    // 0b01 - real exist\n    let hasMocks = 0;\n    const mockBuilder: Array<[any, any, boolean]> = [];\n    for (const key of useMockBuilder ? ['imports', 'declarations'] : []) {\n      for (const declaration of flatten(moduleDef[key as never]) as any[]) {\n        if (!declaration) {\n          continue;\n        }\n        mockBuilder.push([\n          isNgModuleDefWithProviders(declaration)\n            ? {\n                ngModule: getSourceOfMock(declaration.ngModule),\n                providers: declaration.providers,\n              }\n            : getSourceOfMock(declaration),\n          isNgModuleDefWithProviders(declaration) ? declaration.ngModule : declaration,\n          isMockNgDef(funcGetType(declaration)),\n        ]);\n        hasMocks |= mockBuilder[mockBuilder.length - 1][2] ? 0b10 : 0b01;\n      }\n    }\n    // We should do magic only then both mock and real exist.\n    let finalModuleDef = hasMocks === 0b11 ? undefined : moduleDef;\n    if (!finalModuleDef) {\n      let builder = MockBuilder(NG_MOCKS_ROOT_PROVIDERS);\n\n      for (const [source, def, isMock] of mockBuilder) {\n        const transform = def.prototype.__ngMocksConfig?.transform;\n        const options = {\n          export: !isNgDef(source, 'm'),\n          exportAll: false,\n          onRoot: true,\n        };\n        builder =\n          isMock && transform\n            ? builder.mock(source, transform, options)\n            : isMock\n              ? builder.mock(source, options)\n              : builder.keep(source, options);\n      }\n\n      finalModuleDef = builder.build();\n      finalModuleDef = {\n        ...moduleDef,\n        ...finalModuleDef,\n        providers: [...(moduleDef.providers ?? []), ...(finalModuleDef.providers as never)],\n      };\n    }\n\n    const testBed = getTestBed();\n\n    const providers = funcExtractTokens(finalModuleDef.providers);\n    const { mocks, overrides } = providers;\n    // touches are important,\n    // therefore we are trying to fetch them from the known providers.\n    const touches = defineTouches(testBed, finalModuleDef, providers.touches);\n\n    if (mocks) {\n      ngMocks.flushTestBed();\n    }\n\n    // istanbul ignore else\n    if (overrides) {\n      applyOverrides(overrides);\n    }\n    // _testModuleRef exists only after the 1st call,\n    // so we shouldn't override platform again.\n    if (touches && !(testBed as any)._instantiated && !(testBed as any)._testModuleRef) {\n      applyPlatformOverrides(testBed, touches);\n    }\n\n    return original.call(instance, finalModuleDef);\n  };\n\nconst resetTestingModule =\n  (original: TestBedStatic['resetTestingModule'], instance: TestBedStatic): TestBedStatic['resetTestingModule'] =>\n  () => {\n    ngMocksUniverse.global.delete('builder:config');\n    ngMocksUniverse.global.delete('builder:module');\n    (TestBed as any).ngMocksSelectors = undefined;\n    applyNgMocksOverrides(TestBed);\n\n    return original.call(instance);\n  };\n\n// Monkey-patching ViewContainerRef.createComponent to replace dynamic imports with mocked declarations.\nconst patchVcrInstance = (vcrInstance: ViewContainerRef) => {\n  if (!(ViewContainerRef as any).ngMocksOverridesPatched) {\n    coreDefineProperty(ViewContainerRef, 'ngMocksOverridesPatched', true);\n\n    // istanbul ignore else\n    if (vcrInstance.createComponent) {\n      const createComponent = vcrInstance.createComponent;\n      const patchedCreateComponent = helperCreateClone(\n        createComponent,\n        undefined,\n        undefined,\n        function (component: any, ...createComponentArgs: any[]) {\n          // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n          // @ts-ignore\n          const thisVrc: ViewContainerRef = this;\n          const map = coreInjector(NG_MOCKS, thisVrc.injector);\n\n          return createComponent.apply(thisVrc, [map?.get(component) ?? component, ...createComponentArgs] as any);\n        },\n      );\n\n      coreDefineProperty(vcrInstance.constructor.prototype, 'createComponent', patchedCreateComponent, true);\n      coreDefineProperty(vcrInstance, 'createComponent', patchedCreateComponent, true);\n    }\n  }\n};\n\nconst createComponent =\n  (original: TestBedStatic['createComponent'], instance: TestBedStatic): TestBedStatic['createComponent'] =>\n  component => {\n    const fixture = original.call(instance, component);\n    try {\n      const vcr = fixture.debugElement.injector.get(ViewContainerRef);\n      patchVcrInstance(vcr);\n    } catch {\n      // nothing to do\n    }\n\n    return fixture as never;\n  };\n\nconst viewContainerInstall = () => {\n  const vcr: any = ViewContainerRef;\n\n  // istanbul ignore else\n  if (!vcr.ngMocksOverridesInstalled) {\n    const ngElementId = vcr.__NG_ELEMENT_ID__;\n\n    // istanbul ignore else\n    if (ngElementId) {\n      coreDefineProperty(\n        vcr,\n        '__NG_ELEMENT_ID__',\n        helperCreateClone(ngElementId, undefined, undefined, (...ngElementIdArgs: any[]) => {\n          const vcrInstance = ngElementId.apply(ngElementId, ngElementIdArgs);\n          patchVcrInstance(vcrInstance);\n\n          return vcrInstance;\n        }),\n        true,\n      );\n    }\n    coreDefineProperty(TestBed, 'createComponent', createComponent(TestBed.createComponent as never, TestBed as never));\n\n    coreDefineProperty(ViewContainerRef, 'ngMocksOverridesInstalled', true);\n  }\n};\n\n// this function monkey-patches Angular injectors.\nconst installInjector = (injector: Injector & { __ngMocksInjector?: any }): Injector => {\n  // skipping the matched injector\n  if (injector.constructor.prototype.__ngMocksInjector || !injector.constructor.prototype.get) {\n    return injector;\n  }\n\n  // marking the injector as patched\n  coreDefineProperty(injector.constructor.prototype, '__ngMocksInjector', true);\n  const injectorGet = injector.constructor.prototype.get;\n\n  // patch\n  injector.constructor.prototype.get = helperCreateClone(\n    injectorGet,\n    undefined,\n    undefined,\n    function (token: any, ...argsGet: any) {\n      // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n      // @ts-ignore\n      const binding: any = this;\n\n      // Here we can implement custom logic how to inject token,\n      // for example, replace with a provider def we need.\n\n      const result = injectorGet.call(binding, token, ...argsGet);\n      // If the result is an injector, we should patch it too.\n      if (\n        result &&\n        typeof result === 'object' &&\n        typeof result.constructor === 'function' &&\n        typeof result.constructor.name === 'string' &&\n        result.constructor.name.slice(-8) === 'Injector'\n      ) {\n        installInjector(result);\n      }\n\n      return result;\n    },\n  );\n\n  return injector;\n};\n\nconst install = () => {\n  // istanbul ignore else\n  if (!(TestBed as any).ngMocksOverridesInstalled) {\n    const hooks = mockHelperFasterInstall();\n    viewContainerInstall();\n\n    // istanbul ignore else\n    if (hooks.before.indexOf(configureTestingModule) === -1) {\n      hooks.before.push(configureTestingModule);\n    }\n    // istanbul ignore else\n    if (hooks.after.indexOf(resetTestingModule) === -1) {\n      hooks.after.push(resetTestingModule);\n    }\n\n    coreDefineProperty(TestBed, 'ngMocksOverridesInstalled', true);\n    const injectorCreate = Injector.create;\n    Injector.create = helperCreateClone(injectorCreate, undefined, undefined, (...argsCreate: any) =>\n      installInjector(injectorCreate.apply(Injector, argsCreate)),\n    );\n    try {\n      // force install of our injector.\n      Injector.create({ length: 0, providers: [] } as never);\n    } catch {\n      // nothing to do.\n    }\n  }\n};\n\ninstall();\n","import { PipeTransform } from '@angular/core';\n\nimport { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { Type } from './core.types';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * Checks whether a declaration is the mock class of a module.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockModule, RealModule, 'm'); // returns true\n * isMockedNgDefOf(MockModule, ArbitraryModule, 'm'); // returns false\n * isMockedNgDefOf(MockModule, ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>, ngType: 'm'): declaration is Type<MockedModule<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockComponent, RealComponent, 'c'); // returns true\n * isMockedNgDefOf(MockComponent, ArbitraryComponent, 'c'); // returns false\n * isMockedNgDefOf(MockComponent, ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'c',\n): declaration is Type<MockedComponent<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockDirective, RealDirective, 'd'); // returns true\n * isMockedNgDefOf(MockDirective, ArbitraryDirective, 'd'); // returns false\n * isMockedNgDefOf(MockDirective, ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'd',\n): declaration is Type<MockedDirective<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockPipe, RealPipe, 'p'); // returns true\n * isMockedNgDefOf(MockPipe, ArbitraryPipe, 'p'); // returns false\n * isMockedNgDefOf(MockPipe, ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T extends PipeTransform>(\n  declaration: any,\n  type: Type<T>,\n  ngType: 'p',\n): declaration is Type<MockedPipe<T>>;\n\n/**\n * Checks whether a declaration is the mock class of a thing.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockedNgDefOf\n *\n * ```ts\n * isMockedNgDefOf(MockPipe, RealPipe); // returns true\n * isMockedNgDefOf(MockComponent, ArbitraryComponent); // returns false\n * isMockedNgDefOf(MockPipe, ArbitraryClass); // returns false\n * ```\n */\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>): declaration is Type<T>;\n\nexport function isMockedNgDefOf<T>(declaration: any, type: Type<T>, ngType?: any): declaration is Type<T> {\n  return (\n    typeof declaration === 'function' && declaration.mockOf === type && (ngType ? isNgDef(declaration, ngType) : true)\n  );\n}\n","import { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport coreInjector from './core.injector';\nimport { NG_MOCKS } from './core.tokens';\nimport { AnyType, Type } from './core.types';\nimport funcGetName from './func.get-name';\nimport { isMockedNgDefOf } from './func.is-mocked-ng-def-of';\nimport ngMocksUniverse from './ng-mocks-universe';\n\nconst getMock = (declaration: any, source: any, mocks?: Map<any, any>) => {\n  if (mocks && !mocks.has(source)) {\n    throw new Error(`There is no mock for ${funcGetName(source)}`);\n  }\n  let mock = mocks ? mocks.get(source) : undefined;\n  if (mock === source) {\n    mock = undefined;\n  }\n\n  // If we are not in the MockBuilder env we can rely on the current cache.\n  if (!mock && source !== declaration) {\n    mock = declaration;\n  } else if (!mock && ngMocksUniverse.cacheDeclarations.has(source)) {\n    mock = ngMocksUniverse.cacheDeclarations.get(source);\n  }\n\n  return mock;\n};\n\n/**\n * Returns the mock class of a mock module based on a mock module or a source module.\n * It works in runtime if the module has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealModule, 'm'); // returns MockModule\n * getMockedNgDefOf(MockModule, 'm'); // returns MockModule\n * getMockedNgDefOf(ArbitraryClass, 'm'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'm'): Type<MockedModule<T>>;\n\n/**\n * Returns the mock class of a mock component based on a mock component or a source component.\n * It works in runtime if the component has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealComponent, 'c'); // returns MockComponent\n * getMockedNgDefOf(MockComponent, 'c'); // returns MockComponent\n * getMockedNgDefOf(ArbitraryClass, 'c'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'c'): Type<MockedComponent<T>>;\n\n/**\n * Returns the mock class of a mock directive based on a mock directive or a source directive.\n * It works in runtime if the directive has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealDirective, 'd'); // returns MockDirective\n * getMockedNgDefOf(MockDirective, 'd'); // returns MockDirective\n * getMockedNgDefOf(ArbitraryClass, 'd'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'd'): Type<MockedDirective<T>>;\n\n/**\n * Returns the mock class of a mock pipe based on a mock pipe or a source pipe.\n * It works in runtime if the pipe has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealPipe, 'p'); // returns MockPipe\n * getMockedNgDefOf(MockPipe, 'p'); // returns MockPipe\n * getMockedNgDefOf(ArbitraryClass, 'p'); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>, type: 'p'): Type<MockedPipe<T>>;\n\n/**\n * Returns the mock class of a thing based on a mock class or a source class.\n * It works in runtime if the thing has been mocked.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/getMockedNgDefOf\n *\n * ```ts\n * getMockedNgDefOf(RealComponent); // returns MockComponent\n * getMockedNgDefOf(MockPipe); // returns MockPipe\n * getMockedNgDefOf(ArbitraryClass); // throws\n * ```\n */\nexport function getMockedNgDefOf<T>(declaration: AnyType<T>): Type<T>;\n\nexport function getMockedNgDefOf(declaration: any, type?: any): any {\n  const source = declaration.mockOf ?? declaration;\n  const mocks = coreInjector(NG_MOCKS);\n\n  const mock = getMock(declaration, source, mocks);\n  if (mock && !type) {\n    return mock;\n  }\n  if (mock && type && isMockedNgDefOf(mock, source, type)) {\n    return mock;\n  }\n\n  throw new Error(`There is no mock for ${funcGetName(source)}`);\n}\n","import { PipeTransform } from '@angular/core';\n\nimport { MockedComponent } from '../mock-component/types';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockedModule } from '../mock-module/types';\nimport { MockedPipe } from '../mock-pipe/types';\n\nimport { Type } from './core.types';\nimport funcIsMock from './func.is-mock';\nimport { isNgDef } from './func.is-ng-def';\n\n/**\n * Checks whether the instance derives from a mock module.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(moduleInstance, RealModule, 'm'); // returns true\n * isMockOf(moduleInstance, ArbitraryClass, 'm'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'm'): instance is MockedModule<T>;\n\n/**\n * Checks whether the instance derives from a mock component.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(componentInstance, RealComponent, 'c'); // returns true\n * isMockOf(componentInstance, ArbitraryClass, 'c'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'c'): instance is MockedComponent<T>;\n\n/**\n * Checks whether the instance derives from a mock directive.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(directiveInstance, RealDirective, 'd'); // returns true\n * isMockOf(directiveInstance, ArbitraryClass, 'd'); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType: 'd'): instance is MockedDirective<T>;\n\n/**\n * Checks whether the instance derives from a mock pipe.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(pipeInstance, RealPipe, 'p'); // returns true\n * isMockOf(pipeInstance, ArbitraryClass, 'p'); // returns false\n * ```\n */\nexport function isMockOf<T extends PipeTransform>(\n  instance: any,\n  declaration: Type<T>,\n  ngType: 'p',\n): instance is MockedPipe<T>;\n\n/**\n * Checks whether the instance derives from a mock type.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockOf\n *\n * ```ts\n * isMockOf(componentInstance, RealComponent); // returns true\n * isMockOf(pipeInstance, RealPipe); // returns true\n * isMockOf(pipeInstance, ArbitraryClass); // returns false\n * ```\n */\nexport function isMockOf<T>(instance: any, declaration: Type<T>): instance is T;\n\nexport function isMockOf<T>(instance: any, declaration: Type<T>, ngType?: any): instance is T {\n  return (\n    funcIsMock(instance) &&\n    instance.constructor === declaration &&\n    (ngType ? isNgDef(instance.constructor, ngType) : isNgDef(instance.constructor))\n  );\n}\n","import funcIsMock from './func.is-mock';\nimport { MockValidator } from './mock-control-value-accessor';\n\n/**\n * isMockValidator helps to assert that an instance is a mock Validator\n * to perform validationChange simulations.\n * Usually, it is used in if statements.\n *\n * @see https://ng-mocks.sudo.eu/api/helpers/isMockValidator\n */\nexport const isMockValidator = <T>(value: T): value is T & MockValidator => {\n  if (!funcIsMock(value)) {\n    return false;\n  }\n\n  return !!(value as any).__ngMocksConfig.isValidator;\n};\n","import funcGetName from '../common/func.get-name';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nexport default (checkReset: Array<[any, any, any?]>) => {\n  const showError: string[] = [];\n\n  // istanbul ignore next: because of the installed global scope switcher we cannot test this part\n  while (checkReset.length > 0) {\n    const [declaration, config] = checkReset.pop() || /* istanbul ignore next */ [];\n    if (config === ngMocksUniverse.configInstance.get(declaration)) {\n      showError.push(typeof declaration === 'function' ? funcGetName(declaration) : declaration);\n    }\n  }\n\n  // istanbul ignore if: because of the installed global scope switcher we cannot test this part\n  if (showError.length > 0) {\n    const globalFlags = ngMocksUniverse.global.get('flags');\n    const errorMessage = [\n      `MockInstance: side effects have been detected (${showError.join(', ')}).`,\n      'Forgot to add MockInstance.scope() or to call MockInstance.restore()?',\n    ].join(' ');\n    if (globalFlags.onMockInstanceRestoreNeed === 'warn') {\n      console.warn(errorMessage);\n    } else if (globalFlags.onMockInstanceRestoreNeed === 'throw') {\n      throw new Error(errorMessage);\n    }\n  }\n};\n","import { InjectionToken, Injector } from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\nimport funcImportExists from '../common/func.import-exists';\nimport ngMocksStack, { NgMocksStack } from '../common/ng-mocks-stack';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\n\nimport mockInstanceForgotReset from './mock-instance-forgot-reset';\n\nlet currentStack: NgMocksStack;\nngMocksStack.subscribePush(state => {\n  currentStack = state;\n});\nngMocksStack.subscribePop((state, stack) => {\n  for (const declaration of state.mockInstance || /* istanbul ignore next */ []) {\n    if (ngMocksUniverse.configInstance.has(declaration)) {\n      const universeConfig = ngMocksUniverse.configInstance.get(declaration);\n      universeConfig.overloads.pop();\n      ngMocksUniverse.configInstance.set(declaration, {\n        ...universeConfig,\n      });\n    }\n  }\n  currentStack = stack[stack.length - 1];\n});\n\ninterface MockInstanceArgs {\n  accessor?: 'get' | 'set';\n  data?: any;\n  key?: string;\n  value?: any;\n}\n\nconst parseMockInstanceArgs = (args: any[]): MockInstanceArgs => {\n  const set: MockInstanceArgs = {};\n\n  if (typeof args[0] === 'string') {\n    set.key = args[0];\n    set.value = args[1];\n    set.accessor = args[2];\n  } else {\n    set.value = args[0];\n    if (set.value && typeof set.value === 'object') {\n      set.value = set.value.init;\n    }\n  }\n\n  return set;\n};\n\nconst checkReset: Array<[any, any, any?]> = [];\nlet checkCollect = false;\n\n// istanbul ignore else: maybe a different runner is used\nif (typeof beforeEach !== 'undefined') {\n  beforeEach(() => (checkCollect = true));\n  beforeEach(() => mockInstanceForgotReset(checkReset));\n  afterEach(() => (checkCollect = false));\n}\n\nconst mockInstanceConfig = <T>(\n  declaration: AnyDeclaration<T>,\n  name: string | undefined,\n  stub: any,\n  encapsulation?: 'get' | 'set',\n) => {\n  const config = ngMocksUniverse.configInstance.has(declaration) ? ngMocksUniverse.configInstance.get(declaration) : {};\n  const overloads = config.overloads || [];\n  overloads.push([name, stub, encapsulation]);\n  config.overloads = overloads;\n  ngMocksUniverse.configInstance.set(declaration, {\n    ...config,\n  });\n  const mockInstances = currentStack.mockInstance ?? [];\n  mockInstances.push(declaration);\n  currentStack.mockInstance = mockInstances;\n\n  if (checkCollect) {\n    checkReset.push([declaration, ngMocksUniverse.configInstance.get(declaration), currentStack]);\n  }\n\n  return stub;\n};\n\n/**\n * This signature of MockInstance lets customize the getter of a property.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, 'currentUser$', () => mockUser$, 'get');\n * MockInstance(ArbitraryService, 'enabled', () => false, 'get');\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends () => T[K]>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n  encapsulation: 'get',\n): S;\n\n/**\n * This signature of MockInstance lets customize the setters of a property.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * const currentUserSetterSpy = jasmine.createSpy();\n * MockInstance(ArbitraryComponent, 'currentUser', currentUserSetterSpy, 'set');\n *\n * let relServiceEnabled: boolean;\n * MockInstance(ArbitraryService, 'enabled', value => relServiceEnabled = value, 'set');\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends (value: T[K]) => void>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n  encapsulation: 'set',\n): S;\n\n/**\n * This signature of MockInstance lets customize the properties and methods.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, 'onInit', onInitSpy);\n * MockInstance(ArbitraryDirective, 'onDestroy', () => {});\n * MockInstance(ArbitraryService, 'currentDate', new Date());\n * MockInstance(ArbitraryModule, 'currentUser', mockUser);\n * ```\n */\nexport function MockInstance<T extends object, K extends keyof T, S extends T[K]>(\n  instance: AnyType<T>,\n  name: K,\n  stub: S,\n): S;\n\n/**\n * This signature of MockInstance lets customize tokens with a callback.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(webSocketToken, () => mockWebSocket);\n * ```\n */\nexport function MockInstance<T>(\n  declaration: InjectionToken<T>,\n  init?: (instance: T | undefined, injector: Injector | undefined) => Partial<T> | Array<Partial<T>>,\n): void;\n\n/**\n * This signature of MockInstance lets customize tokens with a callback.\n *\n * @deprecated please pass the callback directly instead of config.\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(webSocketToken, {\n *   init: () => mockWebSocket,\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: InjectionToken<T>,\n  config?: {\n    init?: (instance: T | undefined, injector: Injector | undefined) => Partial<T> | Array<Partial<T>>;\n  },\n): void;\n\n/**\n * This signature of MockInstance lets customize the instances of mock classes with a callback.\n * You can return a shape or change the instance.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, (instance, injector) => {\n *   instance.enabled = true;\n *   instance.db = injector.get(DatabaseService);\n * });\n * MockInstance(ArbitraryDirective, () => {\n *   return {\n *     someProperty: true,\n *   };\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: AnyType<T>,\n  init?: (instance: T, injector: Injector | undefined) => void | Partial<T> | Array<Partial<T>>,\n): void;\n\n/**\n * This signature of MockInstance lets customize the instances of mock classes with a callback.\n * You can return a shape or change the instance.\n *\n * @deprecated please pass the callback directly instead of config.\n * @see https://ng-mocks.sudo.eu/api/MockInstance\n *\n * ```ts\n * MockInstance(ArbitraryComponent, {\n *   init: (instance, injector) => {\n *     instance.enabled = true;\n *     instance.db = injector.get(DatabaseService);\n *   },\n * });\n * MockInstance(ArbitraryDirective, {\n *   init: () => {\n *     return {\n *       someProperty: true,\n *     };\n *   },\n * });\n * ```\n */\nexport function MockInstance<T>(\n  declaration: AnyType<T>,\n  config?: {\n    init?: (instance: T, injector: Injector | undefined) => void | Partial<T> | Array<Partial<T>>;\n  },\n): void;\n\nexport function MockInstance<T>(declaration: AnyDeclaration<T>, ...args: any[]) {\n  funcImportExists(declaration, 'MockInstance');\n\n  if (args.length > 0) {\n    const { key, value, accessor } = parseMockInstanceArgs(args);\n\n    return mockInstanceConfig(declaration, key, value, accessor);\n  }\n\n  const config = ngMocksUniverse.configInstance.get(declaration) || /* istanbul ignore next */ {};\n\n  ngMocksUniverse.configInstance.set(declaration, {\n    ...config,\n    overloads: [],\n  });\n\n  // When we are calling MockInstance without a config we need to reset it from the checks too.\n  for (let i = checkReset.length - 1; i >= 0; i -= 1) {\n    if (checkReset[i][0] === declaration && checkReset[i][2] === currentStack) {\n      checkReset.splice(i, 1);\n    }\n  }\n}\n\n/**\n * Interface describes how to configure scopes for MockInstance.\n *\n * @see https://ng-mocks.sudo.eu/api/MockInstance#customization-scopes\n */\n// istanbul ignore next: issue in istanbul https://github.com/istanbuljs/nyc/issues/1209\nexport namespace MockInstance {\n  /**\n   * Creates a scope which remembers all future customizations of MockInstance.\n   * It allows to reset them afterwards.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#remember\n   */\n  export function remember() {\n    ngMocksStack.stackPush();\n  }\n\n  /**\n   * Resets all changes in the current scope.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#restore\n   */\n  export function restore() {\n    ngMocksStack.stackPop();\n  }\n\n  /**\n   * Creates a local scope in `beforeEach` and `afterEach`.\n   * If `suite` has been passed, then `beforeAll` and `afterAll` are used.\n   *\n   * @see https://ng-mocks.sudo.eu/api/MockInstance#scope\n   */\n  export function scope(scope: 'all' | 'suite' | 'case' = 'case') {\n    if (scope === 'all' || scope === 'suite') {\n      beforeAll(MockInstance.remember);\n      afterAll(MockInstance.restore);\n    }\n    if (scope === 'all' || scope === 'case') {\n      beforeEach(MockInstance.remember);\n      afterEach(MockInstance.restore);\n    }\n  }\n}\n\n/**\n * MockReset resets everything what has been configured in MockInstance.\n * Please consider using MockInstance.scope() instead,\n * which respects customizations between tests.\n *\n * https://ng-mocks.sudo.eu/api/MockInstance#resetting-customization\n * https://ng-mocks.sudo.eu/api/MockInstance#scope\n */\nexport function MockReset() {\n  ngMocksUniverse.configInstance.clear();\n}\n","import { Type } from '../common/core.types';\nimport errorJestMock from '../common/error.jest-mock';\nimport funcGetName from '../common/func.get-name';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport { MockComponent } from '../mock-component/mock-component';\nimport { MockedComponent } from '../mock-component/types';\nimport { MockDirective } from '../mock-directive/mock-directive';\nimport { MockedDirective } from '../mock-directive/types';\nimport { MockPipe } from '../mock-pipe/mock-pipe';\nimport { MockedPipe } from '../mock-pipe/types';\n\n/**\n * MockDeclarations creates an array of mock declaration classes out of declarations passed as parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: MockDeclarations(\n *     Dep1Component,\n *     Dep2Directive,\n *     Dep3Pipe,\n *   ),\n * });\n * ```\n */\nexport function MockDeclarations(...declarations: Array<Type<any>>): Array<Type<any>> {\n  return declarations.map(MockDeclaration);\n}\n\n/**\n * MockDeclaration creates a mock declaration class out of an arbitrary declaration.\n *\n * @see https://ng-mocks.sudo.eu/api/MockComponent\n * @see https://ng-mocks.sudo.eu/api/MockDirective\n * @see https://ng-mocks.sudo.eu/api/MockPipe\n *\n * ```ts\n * TestBed.configureTestingModule({\n *   declarations: [\n *     MockDeclaration(Dep1Component),\n *     MockDeclaration(Dep2Directive),\n *     MockDeclaration(Dep3Pipe),\n *   ],\n * });\n * ```\n */\nexport function MockDeclaration<T>(declaration: Type<T>): Type<MockedPipe<T> | MockedDirective<T> | MockedComponent<T>>;\n\nexport function MockDeclaration<T>(\n  declaration: Type<T>,\n): Type<MockedPipe<T> | MockedDirective<T> | MockedComponent<T>> {\n  if (isNgDef(declaration, 'p')) {\n    return MockPipe(declaration);\n  }\n  if (isNgDef(declaration, 'c')) {\n    return MockComponent(declaration);\n  }\n  if (isNgDef(declaration, 'd')) {\n    return MockDirective(declaration);\n  }\n\n  errorJestMock(declaration);\n  throw new Error(\n    [\n      'MockDeclaration does not know how to mock',\n      typeof declaration === 'function' ? funcGetName(declaration) : declaration,\n    ].join(' '),\n  );\n}\n","import coreReflectPipeResolve from '../common/core.reflect.pipe-resolve';\nimport { DirectiveIo } from '../common/core.types';\nimport funcDirectiveIoParse from '../common/func.directive-io-parse';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nconst generateTemplateAttrWrap = (prop: string, type: 'i' | 'o') => (type === 'i' ? `[${prop}]` : `(${prop})`);\n\nconst generateTemplateAttrWithParams = (prop: string, type: 'i' | 'o'): string => {\n  let tpl = ` ${generateTemplateAttrWrap(prop, type)}=\"`;\n  tpl += type === 'i' ? prop : `__ngMocksOutput('${prop}', $event)`;\n  tpl += '\"';\n\n  return tpl;\n};\n\nconst generateTemplateAttr = (bindings: null | undefined | any[], attr: Array<DirectiveIo>, type: 'i' | 'o') => {\n  // unprovided params for inputs should render empty placeholders\n  if (!bindings && type === 'o') {\n    return '';\n  }\n\n  let mockTemplate = '';\n  const keys = bindings ?? attr;\n  for (const definition of attr) {\n    const { name, alias } = funcDirectiveIoParse(definition);\n\n    mockTemplate += keys.indexOf(alias || name) === -1 ? '' : generateTemplateAttrWithParams(alias || name, type);\n  }\n\n  return mockTemplate;\n};\n\nexport default (declaration: any, { selector, bindings, inputs, outputs }: any): string => {\n  let mockTemplate = '';\n\n  // istanbul ignore else\n  if (typeof declaration === 'string') {\n    mockTemplate = declaration;\n  } else if (isNgDef(declaration, 'p') && bindings && bindings.indexOf('$implicit') !== -1) {\n    mockTemplate = `{{ $implicit | ${coreReflectPipeResolve(declaration).name} }}`;\n  } else if (selector) {\n    mockTemplate += `<${selector}`;\n    mockTemplate += generateTemplateAttr(bindings, inputs, 'i');\n    mockTemplate += generateTemplateAttr(bindings, outputs, 'o');\n    mockTemplate += `></${selector}>`;\n  }\n\n  return mockTemplate;\n};\n","import { Component, Directive } from '@angular/core';\n\nimport coreConfig from '../common/core.config';\nimport coreDefineProperty from '../common/core.define-property';\nimport { Type } from '../common/core.types';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\n\nimport funcGenerateTemplate from './func.generate-template';\n\nconst generateWrapperOutput =\n  (instance: any) =>\n  (prop: keyof any, event: any): void => {\n    if (typeof instance[prop] === 'function') {\n      return instance[prop](event);\n    }\n    if (instance[prop] && typeof instance[prop] === 'object' && typeof instance[prop].emit === 'function') {\n      return instance[prop].emit(event);\n    }\n    if (instance[prop] && typeof instance[prop] === 'object' && typeof instance[prop].next === 'function') {\n      return instance[prop].next(event);\n    }\n\n    instance[prop] = event;\n  };\n\nconst generateWrapperComponent = ({ bindings, options, inputs }: any) => {\n  class MockRenderComponent {\n    public constructor() {\n      coreDefineProperty(this, '__ngMocksOutput', generateWrapperOutput(this));\n\n      // The getter helps to remove the __ngContext__ attribute from <mock-render> tag.\n      // It helps with snapshot assertions.\n      // @see https://github.com/help-me-mom/ng-mocks/issues/3811\n      let ngContext = 0;\n      helperDefinePropertyDescriptor(this, '__ngContext__', {\n        get: () => ngContext,\n        set: (newValue: any) => (ngContext = newValue),\n        enumerable: false,\n      });\n\n      if (!bindings) {\n        for (const input of inputs || []) {\n          let value: any = null;\n          helperDefinePropertyDescriptor(this, input, {\n            get: () => value,\n            set: (newValue: any) => (value = newValue),\n          });\n        }\n      }\n    }\n  }\n\n  // A16: adding unique property.\n  coreDefineProperty(MockRenderComponent.prototype, `__ngMocks_index_${ngMocksUniverse.index()}`, undefined, false);\n  Component(options)(MockRenderComponent);\n\n  return MockRenderComponent;\n};\n\nconst generateWrapperDirective = ({ selector, options }: any) => {\n  class MockRenderDirective {}\n  Directive({\n    selector,\n    providers: options.providers,\n  })(MockRenderDirective);\n\n  return MockRenderDirective;\n};\n\nconst getCache = () => {\n  const caches: Array<Type<any> & Record<'cacheKey', any[]>> = ngMocksUniverse.config.get('MockRenderCaches') ?? [];\n  if (caches.length === 0) {\n    ngMocksUniverse.config.set('MockRenderCaches', caches);\n  }\n\n  return caches;\n};\n\nconst checkCache = (caches: Array<Type<any> & Record<'cacheKey', any[]>>, cacheKey: any[]): undefined | Type<any> => {\n  for (const cache of caches) {\n    if (cache.cacheKey.length !== cacheKey.length) {\n      continue;\n    }\n    let isValid = true;\n    for (let i = 0; i < cacheKey.length; i += 1) {\n      if (cache.cacheKey[i] !== cacheKey[i]) {\n        isValid = false;\n        break;\n      }\n    }\n    if (isValid) {\n      return cache;\n    }\n  }\n\n  return undefined;\n};\n\nexport default (\n  template: any,\n  meta: Directive,\n  bindings: undefined | null | any[],\n  flags: Record<keyof any, any>,\n): Type<any> => {\n  const caches = getCache();\n\n  // nulls help to detect defaults\n  const cacheKey = [\n    template,\n    ...(bindings ?? [null]),\n    ...(flags.providers ?? [null]),\n    ...(flags.viewProviders ?? [null]),\n  ];\n  let ctor = checkCache(caches, cacheKey);\n  if (ctor) {\n    return ctor;\n  }\n\n  const inputs = meta.inputs ? [...meta.inputs] : [];\n  const outputs = meta.outputs ? [...meta.outputs] : [];\n  if (meta.hostDirectives) {\n    for (const hostDirective of meta.hostDirectives) {\n      if (typeof hostDirective !== 'object' || !hostDirective.directive) {\n        continue;\n      }\n\n      if (hostDirective.inputs) {\n        inputs.push(...hostDirective.inputs);\n      }\n      if (hostDirective.outputs) {\n        outputs.push(...hostDirective.outputs);\n      }\n    }\n  }\n\n  const mockTemplate = funcGenerateTemplate(template, { selector: meta.selector, inputs, outputs, bindings });\n  const options: Component = {\n    providers: flags.providers,\n    selector: 'mock-render',\n    template: mockTemplate,\n    viewProviders: flags.viewProviders,\n    standalone: false,\n  };\n\n  ctor = generateWrapperComponent({ ...meta, bindings, options });\n  coreDefineProperty(ctor, 'cacheKey', cacheKey);\n  coreDefineProperty(ctor, 'tpl', mockTemplate);\n\n  if (meta.selector && options.providers) {\n    const dir = generateWrapperDirective({ ...meta, bindings, options });\n    coreDefineProperty(ctor, 'providers', dir);\n  }\n\n  caches.unshift(ctor as any);\n  caches.splice(ngMocksUniverse.global.get('mockRenderCacheSize') ?? coreConfig.mockRenderCacheSize);\n\n  return ctor;\n};\n","import coreDefineProperty from '../common/core.define-property';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\nimport helperMockService from '../mock-service/helper.mock-service';\n\nconst createPropertyGet = (key: keyof any & string, reader: Record<keyof any, any>, source: Record<keyof any, any>) => {\n  const handler = () => {\n    if (typeof source[key] === 'function') {\n      if (reader[`__ngMocks_${key}__origin`] !== source[key]) {\n        const clone = helperMockService.createClone(source[key], reader, source);\n        coreDefineProperty(reader, `__ngMocks_${key}`, clone);\n        coreDefineProperty(reader, `__ngMocks_${key}__origin`, source[key]);\n      }\n\n      return reader[`__ngMocks_${key}`];\n    }\n\n    return source[key];\n  };\n  coreDefineProperty(handler, '__ngMocksProxy', true);\n\n  return handler;\n};\n\nconst createPropertySet = (key: keyof any & string, reader: Record<keyof any, any>, source: Record<keyof any, any>) => {\n  const handler = (newValue: any) => {\n    if (reader[`__ngMocks_${key}`]) {\n      reader[`__ngMocks_${key}`] = undefined;\n    }\n    if (reader[`__ngMocks_${key}__origin`]) {\n      reader[`__ngMocks_${key}__origin`] = undefined;\n    }\n    source[key] = newValue;\n  };\n  coreDefineProperty(handler, '__ngMocksProxy', true);\n\n  return handler;\n};\n\nconst extractAllKeys = (instance: object) => [\n  ...helperMockService.extractPropertiesFromPrototype(Object.getPrototypeOf(instance)),\n  ...helperMockService.extractMethodsFromPrototype(Object.getPrototypeOf(instance)),\n  ...Object.keys(instance),\n];\n\nconst extractOwnKeys = (instance: object) => [...Object.getOwnPropertyNames(instance), ...Object.keys(instance)];\n\nexport default (\n  reader: Record<keyof any, any>,\n  source: Record<keyof any, any> | undefined,\n  extra: string[],\n  force = false,\n): void => {\n  if (!source) {\n    return;\n  }\n  coreDefineProperty(reader, '__ngMocks__source', source);\n  const exists = extractOwnKeys(reader);\n  const fields = [...extractAllKeys(source), ...extra];\n  for (const key of fields) {\n    if (!force && exists.indexOf(key) !== -1) {\n      continue;\n    }\n    helperDefinePropertyDescriptor(reader, key, {\n      get: createPropertyGet(key, reader, source),\n      set: createPropertySet(key, reader, source),\n    });\n    exists.push(key);\n  }\n};\n","import { Component, Directive } from '@angular/core';\nimport { TestBed } from '@angular/core/testing';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport { extendClass } from '../common/core.helpers';\nimport coreReflectDirectiveResolve from '../common/core.reflect.directive-resolve';\nimport { AnyType } from '../common/core.types';\nimport { isNgDef } from '../common/func.is-ng-def';\n\nconst registerTemplateMiddleware = (template: AnyType<any>, meta: Directive): void => {\n  const child = extendClass(template);\n\n  const alias = {\n    provide: template,\n    useExisting: child,\n  };\n  meta.providers = [...(meta.providers || []), alias];\n\n  // https://github.com/help-me-mom/ng-mocks/issues/1876\n  // We need to apply overrides to our cloned declaration.\n  let set: any = {};\n  try {\n    const ngMocksOverrides: Map<any, any> = (TestBed as any).ngMocksOverrides;\n    const { override } = ngMocksOverrides.get(template);\n    set = { ...override.set };\n    set.providers = set.providers ? [...set.providers, alias] : meta.providers;\n  } catch {\n    // nothing to do\n  }\n\n  const standalone = (meta as any).__ngMocksStandalone === true;\n  (isNgDef(template, 'c') ? Component : Directive)({\n    ...meta,\n    ...set,\n    ...(standalone ? { standalone } : {}),\n  })(child);\n  TestBed.configureTestingModule({\n    [standalone ? 'imports' : 'declarations']: [child],\n  });\n};\n\nexport default (template: AnyType<any>): Directive => {\n  if (!isNgDef(template, 'c') && !isNgDef(template, 'd')) {\n    return {};\n  }\n\n  const meta = coreReflectDirectiveResolve(template);\n  const override: Directive = {};\n  for (const key of Object.keys(meta)) {\n    if (key === 'standalone') {\n      coreDefineProperty(override, '__ngMocksStandalone', !!meta[key as never]);\n      continue;\n    }\n\n    override[key as never] = meta[key as never];\n  }\n\n  if (override.selector && /[\\s,[\\]]/.test(override.selector)) {\n    override.selector = '';\n  }\n\n  if (!override.selector) {\n    // istanbul ignore next\n    override.selector = (TestBed as any).ngMocksSelectors?.get(template) || '';\n    if (!override.selector) {\n      override.selector = `ng-mocks-${template.name}`;\n      registerTemplateMiddleware(template, override);\n      // istanbul ignore else\n      if ((TestBed as any).ngMocksSelectors) {\n        (TestBed as any).ngMocksSelectors.set(template, override.selector);\n      }\n    }\n  }\n\n  return override;\n};\n","import { DebugElement, Directive, InjectionToken } from '@angular/core';\nimport { getTestBed, TestBed } from '@angular/core/testing';\n\nimport coreDefineProperty from '../common/core.define-property';\nimport { getInjection } from '../common/core.helpers';\nimport { AnyDeclaration, AnyType, Type } from '../common/core.types';\nimport funcGetName from '../common/func.get-name';\nimport funcImportExists from '../common/func.import-exists';\nimport { isNgDef } from '../common/func.is-ng-def';\nimport ngMocksStack from '../common/ng-mocks-stack';\nimport ngMocksUniverse from '../common/ng-mocks-universe';\nimport { ngMocks } from '../mock-helper/mock-helper';\nimport helperDefinePropertyDescriptor from '../mock-service/helper.define-property-descriptor';\nimport { MockService } from '../mock-service/mock-service';\n\nimport funcCreateWrapper from './func.create-wrapper';\nimport funcInstallPropReader from './func.install-prop-reader';\nimport funcReflectTemplate from './func.reflect-template';\nimport { IMockRenderFactoryOptions, MockedComponentFixture } from './types';\n\nexport interface MockRenderFactory<C = any, F extends keyof any = keyof C> {\n  bindings: keyof F;\n  configureTestBed: () => void;\n  declaration: AnyType<never>;\n  <T extends Record<F, any>>(params?: Partial<T>, detectChanges?: boolean): MockedComponentFixture<C, T>;\n}\n\nconst renderDeclaration = (fixture: any, template: any, params: any): void => {\n  fixture.point =\n    fixture.debugElement.children[0] &&\n    fixture.debugElement.children[0].nativeElement.nodeName !== '#text' &&\n    fixture.debugElement.children[0].nativeElement.nodeName !== '#comment'\n      ? fixture.debugElement.children[0]\n      : fixture.debugElement;\n  if (isNgDef(template, 'd')) {\n    helperDefinePropertyDescriptor(fixture.point, 'componentInstance', {\n      get: () => ngMocks.get(fixture.point, template),\n    });\n  } else if (isNgDef(template, 'p')) {\n    helperDefinePropertyDescriptor(fixture.point, 'componentInstance', {\n      get: () => ngMocks.findInstance(fixture.point, template),\n    });\n  }\n  tryWhen(!params, () => funcInstallPropReader(fixture.componentInstance, fixture.point.componentInstance, []));\n};\n\nconst renderInjection = (fixture: any, template: any, params: any): void => {\n  let instance: any;\n  try {\n    instance = getInjection(template);\n  } catch (error) {\n    if (isNgDef(template, 'p')) {\n      throw new Error(\n        [\n          `Cannot render ${funcGetName(template)}.`,\n          'Did you forget to set $implicit param, or add the pipe to providers?',\n          'https://ng-mocks.sudo.eu/guides/pipe',\n        ].join(' '),\n      );\n    }\n    throw error;\n  }\n  if (params) {\n    ngMocks.stub(instance, params);\n  }\n  fixture.point = MockService(DebugElement, {\n    childNodes: [],\n    children: [],\n    componentInstance: instance,\n    nativeElement: MockService(HTMLElement),\n  });\n  funcInstallPropReader(fixture.componentInstance, fixture.point.componentInstance, [], true);\n};\n\nconst tryWhen = (flag: boolean, callback: () => void) => {\n  if (!flag) {\n    return;\n  }\n  try {\n    // ivy throws Error: Expecting instance of DOM Element\n    callback();\n  } catch {\n    // nothing to do\n  }\n};\n\nconst fixtureMessage = [\n  'Forgot to flush TestBed?',\n  'MockRender cannot be used without a reset after TestBed.get / TestBed.inject / TestBed.createComponent and another MockRender in the same test.',\n  'If you want to mock a service before rendering, consider usage of MockRenderFactory or MockInstance.',\n  'To flush TestBed, add a call of ngMocks.flushTestBed() before the call of MockRender, or pass `reset: true` to MockRender options.',\n].join(' ');\n\nconst handleFixtureError = (e: any) => {\n  const error = new Error(fixtureMessage);\n  coreDefineProperty(error, 'parent', e);\n  throw error;\n};\n\nconst flushTestBed = (flags: Record<string, any>): void => {\n  const globalFlags = ngMocksUniverse.global.get('flags');\n  const testBed: any = getTestBed();\n  if (flags.reset || (!testBed._instantiated && !testBed._testModuleRef)) {\n    ngMocks.flushTestBed();\n  } else if (globalFlags.onTestBedFlushNeed !== 'throw' && (testBed._instantiated || testBed._testModuleRef)) {\n    if (globalFlags.onTestBedFlushNeed === 'warn') {\n      console.warn(fixtureMessage);\n    }\n    ngMocks.flushTestBed();\n  }\n};\n\nconst generateFactoryInstall =\n  (ctor: AnyType<any> & { providers?: AnyType<any> }, options: IMockRenderFactoryOptions) => () => {\n    const testBed: TestBed & {\n      _compiler?: {\n        declarations?: Array<AnyType<any>>;\n      };\n      _declarations?: Array<AnyType<any>>;\n      declarations?: Array<AnyType<any>>;\n    } = getTestBed();\n    // istanbul ignore next\n    const existing = testBed._compiler?.declarations || testBed.declarations || testBed._declarations;\n    if (!existing || existing.indexOf(ctor) === -1) {\n      flushTestBed(options);\n      try {\n        const declarations: Array<AnyType<any>> = [];\n        if (ctor.providers) {\n          declarations.push(ctor.providers);\n        }\n        declarations.push(ctor);\n        TestBed.configureTestingModule({\n          declarations,\n        });\n      } catch (error) {\n        handleFixtureError(error);\n      }\n    }\n  };\n\nconst generateFactory = (\n  componentCtor: Type<any> & { tpl?: string },\n  bindings: undefined | null | string[],\n  template: any,\n  options: IMockRenderFactoryOptions,\n) => {\n  const result = (params: any, detectChanges?: boolean) => {\n    result.configureTestBed();\n    const fixture: any = TestBed.createComponent(componentCtor);\n\n    funcInstallPropReader(fixture.componentInstance, params ?? {}, bindings ?? []);\n    coreDefineProperty(fixture, 'ngMocksStackId', ngMocksUniverse.global.get('bullet:stack:id'));\n\n    if (detectChanges === undefined || detectChanges) {\n      fixture.detectChanges();\n    }\n\n    if (\n      typeof template === 'string' ||\n      isNgDef(template, 'c') ||\n      isNgDef(template, 'd') ||\n      (componentCtor.tpl && isNgDef(template, 'p'))\n    ) {\n      renderDeclaration(fixture, template, params);\n    } else {\n      renderInjection(fixture, template, params);\n    }\n\n    return fixture;\n  };\n  result.declaration = componentCtor;\n  result.bindings = bindings;\n  result.configureTestBed = generateFactoryInstall(componentCtor, options);\n\n  return result;\n};\n\n/**\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: InjectionToken<MComponent>,\n  bindings?: undefined | null,\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, never>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: AnyType<MComponent>,\n  bindings: undefined | null,\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, keyof MComponent>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent, TKeys extends keyof any>(\n  template: AnyType<MComponent>,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent, TKeys extends keyof any = keyof any>(\n  template: AnyType<MComponent>,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\n/**\n * Without params we should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent>(\n  template: AnyType<MComponent>,\n): MockRenderFactory<MComponent, keyof MComponent>;\n\n/**\n * An empty string does not have point.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory(template: ''): MockRenderFactory<void, never>;\n\n/**\n * Without params we should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent = void>(template: string): MockRenderFactory<MComponent>;\n\n/**\n * MockRenderFactory is a delayed version of MockRender.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender#factory\n */\nexport function MockRenderFactory<MComponent = void, TKeys extends keyof any = keyof any>(\n  template: string,\n  bindings: TKeys[],\n  options?: IMockRenderFactoryOptions,\n): MockRenderFactory<MComponent, TKeys>;\n\nexport function MockRenderFactory<MComponent, TKeys extends string>(\n  template: string | AnyDeclaration<MComponent>,\n  bindings?: undefined | null | TKeys[],\n  options: IMockRenderFactoryOptions = {},\n): any {\n  funcImportExists(template, 'MockRender');\n\n  const meta: Directive = typeof template === 'string' || isNgDef(template, 't') ? {} : funcReflectTemplate(template);\n  const componentCtor: any = funcCreateWrapper(template, meta, bindings, options);\n  const factory = generateFactory(componentCtor, bindings, template, options);\n  if (ngMocksStack.current().level !== 'root' && options.configureTestBed !== false) {\n    factory.configureTestBed();\n  }\n\n  return factory;\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { AnyDeclaration, AnyType } from '../common/core.types';\n\nimport { MockRenderFactory } from './mock-render-factory';\nimport { IMockRenderOptions, MockedComponentFixture } from './types';\n\n/**\n * This signature of MockRender lets create an empty fixture.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender(): MockedComponentFixture<void, void>;\n\n/**\n * This signature of MockRender lets create a fixture to access a token.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(\n  template: InjectionToken<MComponent>,\n  params?: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, void>;\n\n/**\n * This signature of MockRender lets create a fixture to access a component without parameters.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(\n  template: AnyType<MComponent>,\n  params: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, MComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends object>(\n  template: AnyType<MComponent>,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a component.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends object = Record<keyof any, any>>(\n  template: AnyType<MComponent>,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender without params should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent>(template: AnyType<MComponent>): MockedComponentFixture<MComponent, MComponent>;\n\n/**\n * This signature of MockRender without params should not autocomplete any keys of any types.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void>(template: string): MockedComponentFixture<MComponent>;\n\n/**\n * This signature of MockRender lets create a fixture based on string template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void>(\n  template: string,\n  params: undefined | null,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, void>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a string based template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent = void, TComponent extends Record<keyof any, any> = Record<keyof any, any>>(\n  template: string,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\n/**\n * This signature of MockRender lets create a fixture with parameters to access a string based template.\n *\n * @see https://ng-mocks.sudo.eu/api/MockRender\n */\nexport function MockRender<MComponent, TComponent extends Record<keyof any, any> = Record<keyof any, any>>(\n  template: string,\n  params: TComponent,\n  detectChangesOrOptions?: boolean | IMockRenderOptions,\n): MockedComponentFixture<MComponent, TComponent>;\n\nexport function MockRender<MComponent, TComponent extends Record<keyof any, any>>(\n  template?: string | AnyDeclaration<MComponent>,\n  params?: TComponent,\n  flags: boolean | IMockRenderOptions = true,\n): any {\n  const tpl = arguments.length === 0 ? '' : template;\n  const bindings = params && typeof params === 'object' ? Object.keys(params) : params;\n  const options = typeof flags === 'boolean' ? { detectChanges: flags } : { ...flags };\n  const factory = (MockRenderFactory as any)(tpl, bindings, options);\n\n  return factory(params, options.detectChanges);\n}\n"],"names":["flags","mockRenderCacheSize","neverMockModule","neverMockProvidedFunction","neverMockToken","onMockBuilderMissingDependency","onMockInstanceRestoreNeed","onTestBedFlushNeed","dependencies","instance","property","value","enumerable","definePropertyDescriptor","configurable","writable","getTestBedInjection","token","getInjection","testBed","getTestBed","inject","get","flatten","values","result","Array","isArray","push","mapKeys","set","forEach","_","mapValues","destination","add","mapEntries","key","extractDependencyArray","deps","flag","name","ngMetadataName","undefined","extractDependency","dep","extendClassicClass","base","child","index","glb","ngMocksParent","eval","ngMocksResult","MockMiddleware","prototype","extendClass","parameters","length","def","NG_MOCKS","InjectionToken","__ngMocksSkip","NG_MOCKS_TOUCHES","NG_MOCKS_OVERRIDES","NG_MOCKS_GUARDS","NG_MOCKS_RESOLVERS","NG_MOCKS_INTERCEPTORS","NG_MOCKS_ROOT_PROVIDERS","alias","required","skipName","param","split","map","v","trim","provide","__forward_ref__","window","g","badCharacters","RegExp","_desc","constructor","replace","provider","ngModule","directive","isNgType","declaration","type","decorators","offset","indexOf","isModuleCheck","ngType","isComponentCheck","isDirectiveCheck","isPipeCheck","isInjectableCheck","isNgDef","isModule","isComponent","isDirective","isPipe","isInjectable","isNgInjectionToken","isNgModuleDefWithProviders","globalMap","ngMocksUniverse","global","has","Map","builtDeclarations","builtProviders","cacheDeclarations","cacheProviders","config","configInstance","Set","touches","getOverrides","getDefaults","getConfigMock","defValue","getResolution","getBuildDeclaration","mode","replacement","hasBuildDeclaration","isExcludedDef","resolution","isProvidedDef","indexValue","encapsulation","__ngMocksProxy","descriptor","Object","defineProperty","override","style","mock","correctInstance","applyOverrides","skipProps","createClone","getOwnPropertyNames","keys","desc","hasOwnProperty","call","callbacks","overloads","stub","service","bindFrom","bindTo","args","apply","this","prop","sourceDesc","sanitizerMethods","extraMethods","DomSanitizer","Sanitizer","method","getPrototypeOf","getOwnPropertyDescriptor","mockFunction","mockName","original","func","customMockFunction","val","setValue","newSetValue","newValue","handleItemKeys","handleItemGetGuards","section","guards","guard","handleSection","replaceWithMocks","cache","updated","callback","valueItem","handleArray","resolve","resolveUpdated","resolver","handleItem","setPrototypeOf","ngMockshelperMockService","registerMockFunction","createMockFromPrototype","methods","extractMethodsFromPrototype","properties","extractPropertiesFromPrototype","extractPropertyDescriptor","accessType","parseArgs","detectedMockName","createName","mockDef","generateMockDef","__ngMocks","__ngMocksSet","__ngMocksGet","clear","resolveProvider","useFactory","areEqualDefs","providerDiffers","defDiffers","a","b","anyDiffers","resolutions","changed","multi","change","parseProvider","toString","isSuitableProvider","useValue","interceptor","useExisting","useClass","excludeInterceptors","isPreconfiguredDependency","mockOf","__internal","isPreconfiguredUseExisting","existingMock","createFromResolution","createPredefinedMockProvider","createMockProvider","applyCallbackToken","init","overrides","Injector","injector","configGlobal","inst","applyCallback","normalizePrimitivesMap","handleProvider","mockProvider","check","normalizePrimitives","createValueProvider","createClassProvider","isNeverMockFunction","isNeverMockToken","existing","applyMissingClassProperties","createFactoryProvider","__annotations__","__parameters__","isAngularClass","proto","match","cls","clsCode","codePointAt","regEx","guessClass","mockVariableMap","prefix","mockService","createMock","mockVariable","MockService","pushDecorator","decorator","deleteIndex","splice","getAllKeys","props","parsePropMetadataParserFactoryProp","bindingPropertyName","normalizedDef","defName","defAlias","defRequired","unshift","parsePropMetadataParserInput","parsePropMetadataParserOutput","parsePropMetadataParserFactoryQueryChild","isViewQuery","queries","selector","read","static","parsePropMetadataParserContentChild","parsePropMetadataParserViewChild","parsePropMetadataParserFactoryQueryChildren","descendants","emitDistinctChangesOnly","parsePropMetadataMap","ContentChild","ContentChildren","HostBinding","hostPropertyName","host","hostBindings","HostListener","eventName","hostListeners","Input","Output","ViewChild","ViewChildren","parsePropDecoratorsParserFactoryProp","parsePropDecoratorsParserInput","parsePropDecoratorsParserOutput","parsePropDecoratorsParserFactoryQuery","parsePropDecoratorsParserContent","parsePropDecoratorsParserView","parsePropDecoratorsMap","buildDeclaration","inputs","input","outputs","output","reflectionCapabilities","parse","__ngMocksDeclarations","parent","parentDeclarations","attributes","propDecorators","createDeclarations","attributeName","parseParameters","annotation","parseAnnotations","parseDecorators","parsePropDecorators","__prop__metadata__","parsePropMetadata","Directive","Component","module","exports","y","x","__webpack_require__","d","__WEBPACK_EXTERNAL_MODULE__angular_core_bcead0df__","__WEBPACK_EXTERNAL_MODULE__angular_core_testing_89899de6__","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","definition","o","globalThis","Function","e","obj","r","Symbol","toStringTag","stackRoot","id","level","stack","current","listenersPush","listenersPop","stackPush","state","stackPop","pop","subscribePush","subscribePop","unsubscribePush","unsubscribePop","providers","mocks","getNgType","isStandalone","declarations","Number","VERSION","major","standalone","i","merge","MockBuilderStash","data","backup","restore","providedIn","ngInjectableDef","providerDef","Error","join","_isMockFunction","jest","arg","NgModule","getSourceOfMock","instanceDef","ngModuleDef","__set","exported","__WEBPACK_EXTERNAL_MODULE__angular_forms_df10eade__","AbstractControl","DefaultValueAccessor","FormControl","FormControlDirective","NG_ASYNC_VALIDATORS","NG_VALIDATORS","NG_VALUE_ACCESSOR","NgControl","NgModel","applyProxy","proxy","storage","MockControlValueAccessorProxy","target","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","writeValue","MockValidatorProxy","registerOnValidatorChange","validate","control","MockAsyncValidatorProxy","Promise","setValueAccessor","ngControl","valueAccessor","__ngMocksConfig","setControlValueAccessor","__ngMocksCtor","installValueAccessor","isControlValueAccessor","installValidator","validators","validator","isValidator","applyNgValueAccessor","_rawValidators","_rawAsyncValidators","applyOutputs","mockOutputs","EventEmitter","applyPrototype","applyMethods","applyProps","Mock","queryScanKeys","Optional","Self","LegacyControlValueAccessor","__simulateChange","__simulateTouch","__simulateValidatorChange","exclude","source","configInput","isInternalKey","cloneVcrQuery","query","ViewContainerRef","generateFinalQueries","final","scanKeys","processTokens","mockType","processOwnUseExisting","sourceType","processProvider","buildConfig","meta","params","hasResolver","options","exportAs","imports","skipExports","hostDirectives","viewProviders","delete","getType","funcName","isMockNgDef","component","fixtures","_activeFixtures","debugElement","__ngMocksResolutions","cacheFlag","hasNgMocksDepsResolution","vcrArgs","trArgs","TemplateRef","viewChildTemplate","isTemplateRefQuery","parts","contentChildSelector","indices","mixRenderPrepareVcr","cdr","vcrNgIf","trNgIf","createEmbeddedView","detectChanges","mixRenderReorderViews","viewContainer","views","view","destroy","viewIndex","move","mixRenderApplyContext","context","contextKey","markForCheck","mixRenderHandleViews","vcr","templates","templateRef","mixRender","$implicit","variables","QueryList","toArray","mixHideHandler","mixHide","changeDetector","ComponentMockBase","super","ngAfterViewInit","__rendered","render","block","__render","ChangeDetectorRef","decorateClass","template","MockComponents","components","MockComponent","DirectiveMockBase","element","__ngMocksInstall","ngOnInit","ElementRef","MockDirectives","directives","MockDirective","Pipe","MockPipes","pipes","pipe","MockPipe","getMockClass","transformValue","transform","flagMock","flagKeep","flagReplace","flagNever","preProcessFlags","toggleSkipMockFlag","isRootModule","postProcessFlags","extractModuleAndProviders","ngModuleProviders","getExistingMockModule","detectMockModule","mockModule","getMockProviders","generateReturn","mockModuleProviders","MockModule","processDefMap","processDef","createResolveProvider","createResolveWithProviders","createResolveExisting","createResolveExcluded","createResolve","detectedDef","flatToExisting","filter","item","configureProcessMetaKeys","processMeta","mockModuleDef","cachePipe","skipMarkProviders","resolveDefForExport","correctExports","moduleConfig","export","exportAll","skipAddExports","addExports","skipMock","replaceDef","patchedOriginal","EntryComponentsModule","componentFactoryResolver","originCFR","resolveComponentFactory","ComponentFactoryResolver","IvyModule","entryComponents","entryModule","__WEBPACK_EXTERNAL_MODULE__angular_common_d12e0fe1__","skipResolution","skipSystem","DOCUMENT","skipByResolution","bucket","touched","buckets","concat","keepDef","size","parameter","defProviders","loModule","loProviders","skipDef","handleDef","extendedDef","isExportedOnRoot","configDef","cnfInstance","cnfDef","onRoot","returnModule","moveModulesUp","isA","isB","configDefault","processed","forgotten","defs","sort","originalDef","dependency","globalFlags","errorMessage","console","warn","funcExtractDeps","recursive","field","itemType","excludeDef","shallow","createInstance","precise","deleteTouch","loDef","k","a1","a2","defaultMockValue","normaliseModule","generateProviderValue","defaultMock","MockBuilderPromise","beforeCC","stash","beforeCompileComponents","build","defStack","combineParams","MockBuilder","reject","then","catch","wipe","setConfigDef","finally","keep","setDefValue","fulfill","promise","TestBed","configureTestingModule","compileComponents","objectsDiffer","prototypeKeys","sourceKeys","compare","areEqualProviderDefs","thisDef","prototypeDef","prototypeDefs","thisDefs","MockBuilderPerformance","equalsTo","clone","cloneConfig","resetTestingModule","extensions","mockBuilderExtend","extend","nativeElement","nativeNode","findDebugElement","el","defaultNotFoundValue","sel","notFoundValue","__WEBPACK_EXTERNAL_MODULE__angular_platform_browser_bc6fa964__","By","css","node","nodeName","_tNode","elDef","defaultInjector","getVcr","getScanViewRefRootNodes","vrIndex","vr","rnIndex","rootNodes","scanViewRef","childNodes","rootNode","isDirect","children","childNode","childNodeParent","start","end","detectParent","expected","currentParent","childElDef","nestedCheck","includeTextNode","isSelector","isValidValue","selectors","attribute","getMeta","publicProviders","requiredAttributes","bindings","binding","nonMinifiedName","nodeIndex","collectSelectors","providerTokens","collectAttributesClassic","expectedAttributes","attr","collectAttributesIvy","attrs","step","detectInClassic","nodes","detectInIvy","attrIndex","attrProp","_lView","references","regExp","isCrawlByAttribute","isCrawlByAttributeValue","isCrawlById","isCrawlByTagName","isCrawlByDeclaration","slice","root","detector","isMockControlValueAccessor","innerHTML","preventBubble","customEvent","event","initParams","bubbles","cancelable","eventObj","document","createEvent","initCustomEvent","eventCtor","Event","CustomEvent","keyMap","alt","altKey","code","location","which","arrowdown","arrowleft","arrowright","arrowup","backspace","ctrlKey","enter","esc","metaKey","shift","shiftKey","space","tab","f","getCode","char","toUpperCase","applyPayload","payload","keyData","dot","eventPayload","Math","max","toEventObj","getNativeElement","disabled","dispatchEvent","message","formControlDirective","form","ngModel","triggerInput","handleKnown","update","emit","hasListener","listeners","some","listener","methodName","triggerTouch","markAsTouched","queryAll","getParentWithInjector","parentInjector","parentInstance","detectGatherFlag","gather","parentNode","isNotObject","shouldBeScanned","scanned","scan","normalize","gatherDefault","nodesLength","bindingStartIndex","detectContextByIndex","rootView","detectContext","__ngContext__","contextToNodes","lView","_debugContext","fixture","error","ngTempTokenPath","elements","format","html","handlePrimitives","outer","innerOuter","nodeValue","textContent","wholeText","normalizeValue","normalizeText","text","getElementValue","outerHTML","calls","action","jasmine","createSpy","defaultMethods","factory","beforeEach","afterEach","propName","hooks","after","before","moduleDef","ngMocksFasterLock","ngMocksFasterInstalled","_instantiated","_moduleFactory","_testModuleRef","resetFixtures","activeFixtures","active","ngMocksStackId","idAdd","bulletStack","idRemove","idAll","idEach","beforeAll","afterAll","iterator","recursively","fail","skip","createMetaHandler","optional","createMeta","typeMap","handleModuleWithProviders","handleDeclaration","handleDestructuring","toMock","resolveMap","resolveHandler","skipDestruction","generateDataWithUniverse","generateData","protoKeep","protoMock","protoExclude","attrMatches","detectAttribute","attrDef","label","getValVcr","entryPoint","scanValue","scanVcr","handleDirective","isExpectedTemplate","__template","__vcr","isRightTemplate","localVcr","localValue","findDeep","tpl","elementRef","limit","flagNames","autoSpy","click","crawl","defaultConfig","faster","find","findAll","findInstance","findInstances","findTemplateRef","findTemplateRefs","flushTestBed","formatHtml","formatText","globalExclude","globalKeep","globalMock","globalReplace","globalWipe","guts","hide","ignoreOnConsole","reset","reveal","revealAll","stubMember","throwOnConsole","touch","trigger","ngMocks","defaultValue","MockProviders","MockProvider","applyOverride","overrideComponent","overrideDirective","overrideModule","overrideProvider","ngMocksOverrides","applyNgMocksOverrides","initTestBed","ngMocksSelectors","generateTouches","local","__ngMocksTouches","defineTouches","knownTouches","_providers","_compiler","applyPlatformOverrideDef","applyPlatformOverridesBasedOnProvidedIn","applyPlatformOverridesBasedOnDefaults","applyPlatformOverrides","useMockBuilder","hasMocks","mockBuilder","finalModuleDef","builder","isMock","patchVcrInstance","vcrInstance","ngMocksOverridesPatched","createComponent","patchedCreateComponent","createComponentArgs","viewContainerInstall","ngMocksOverridesInstalled","ngElementId","__NG_ELEMENT_ID__","ngElementIdArgs","installInjector","__ngMocksInjector","injectorGet","argsGet","install","injectorCreate","create","argsCreate","isMockedNgDefOf","getMock","getMockedNgDefOf","isMockOf","isMockValidator","checkReset","showError","currentStack","mockInstance","universeConfig","parseMockInstanceArgs","accessor","checkCollect","mockInstanceConfig","mockInstances","MockInstance","MockReset","MockDeclarations","MockDeclaration","remember","scope","generateTemplateAttrWrap","generateTemplateAttrWithParams","generateTemplateAttr","mockTemplate","generateWrapperOutput","next","generateWrapperComponent","MockRenderComponent","ngContext","generateWrapperDirective","MockRenderDirective","getCache","caches","checkCache","cacheKey","isValid","ctor","hostDirective","dir","createPropertyGet","reader","handler","createPropertySet","extractAllKeys","extractOwnKeys","extra","force","exists","fields","registerTemplateMiddleware","__ngMocksStandalone","test","renderDeclaration","point","tryWhen","componentInstance","renderInjection","DebugElement","HTMLElement","fixtureMessage","handleFixtureError","generateFactoryInstall","_declarations","generateFactory","componentCtor","configureTestBed","MockRenderFactory","MockRender","arguments"],"sourceRoot":""}