{"ast":null,"code":"var _NzSpinComponent, _NzSpinModule;\nconst _c0 = [\"*\"];\nfunction _NzSpinComponent_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 2);\n i0.ɵɵelement(1, \"i\", 3)(2, \"i\", 3)(3, \"i\", 3)(4, \"i\", 3);\n i0.ɵɵelementEnd();\n }\n}\nfunction _NzSpinComponent_Conditional_2_ng_template_2_Template(rf, ctx) {}\nfunction _NzSpinComponent_Conditional_2_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 6);\n i0.ɵɵtext(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext(2);\n i0.ɵɵadvance();\n i0.ɵɵtextInterpolate(ctx_r0.nzTip);\n }\n}\nfunction _NzSpinComponent_Conditional_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\")(1, \"div\", 4);\n i0.ɵɵtemplate(2, _NzSpinComponent_Conditional_2_ng_template_2_Template, 0, 0, \"ng-template\", 5)(3, _NzSpinComponent_Conditional_2_Conditional_3_Template, 2, 1, \"div\", 6);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n const defaultTemplate_r2 = i0.ɵɵreference(1);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"ant-spin-rtl\", ctx_r0.dir === \"rtl\")(\"ant-spin-spinning\", ctx_r0.isLoading)(\"ant-spin-lg\", ctx_r0.nzSize === \"large\")(\"ant-spin-sm\", ctx_r0.nzSize === \"small\")(\"ant-spin-show-text\", ctx_r0.nzTip);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", ctx_r0.nzIndicator || defaultTemplate_r2);\n i0.ɵɵadvance();\n i0.ɵɵconditional(ctx_r0.nzTip ? 3 : -1);\n }\n}\nfunction _NzSpinComponent_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 7);\n i0.ɵɵprojection(1);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r0 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"ant-spin-blur\", ctx_r0.isLoading);\n }\n}\nimport { __decorate } from 'tslib';\nimport { NgTemplateOutlet } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { numberAttribute, booleanAttribute, Component, ViewEncapsulation, Input, NgModule } from '@angular/core';\nimport { Subject, BehaviorSubject, ReplaySubject, timer } from 'rxjs';\nimport { startWith, distinctUntilChanged, switchMap, debounce, takeUntil } from 'rxjs/operators';\nimport * as i1 from 'ng-zorro-antd/core/config';\nimport { WithConfig } from 'ng-zorro-antd/core/config';\nimport * as i2 from '@angular/cdk/bidi';\nconst NZ_CONFIG_MODULE_NAME = 'spin';\nclass NzSpinComponent {\n constructor(nzConfigService, cdr, directionality) {\n this.nzConfigService = nzConfigService;\n this.cdr = cdr;\n this.directionality = directionality;\n this._nzModuleName = NZ_CONFIG_MODULE_NAME;\n this.nzIndicator = null;\n this.nzSize = 'default';\n this.nzTip = null;\n this.nzDelay = 0;\n this.nzSimple = false;\n this.nzSpinning = true;\n this.destroy$ = new Subject();\n this.spinning$ = new BehaviorSubject(this.nzSpinning);\n this.delay$ = new ReplaySubject(1);\n this.isLoading = false;\n this.dir = 'ltr';\n }\n ngOnInit() {\n var _this$directionality$;\n const loading$ = this.delay$.pipe(startWith(this.nzDelay), distinctUntilChanged(), switchMap(delay => {\n if (delay === 0) {\n return this.spinning$;\n }\n return this.spinning$.pipe(debounce(spinning => timer(spinning ? delay : 0)));\n }), takeUntil(this.destroy$));\n loading$.subscribe(loading => {\n this.isLoading = loading;\n this.cdr.markForCheck();\n });\n this.nzConfigService.getConfigChangeEventForComponent(NZ_CONFIG_MODULE_NAME).pipe(takeUntil(this.destroy$)).subscribe(() => this.cdr.markForCheck());\n (_this$directionality$ = this.directionality.change) === null || _this$directionality$ === void 0 || _this$directionality$.pipe(takeUntil(this.destroy$)).subscribe(direction => {\n this.dir = direction;\n this.cdr.detectChanges();\n });\n this.dir = this.directionality.value;\n }\n ngOnChanges(changes) {\n const {\n nzSpinning,\n nzDelay\n } = changes;\n if (nzSpinning) {\n this.spinning$.next(this.nzSpinning);\n }\n if (nzDelay) {\n this.delay$.next(this.nzDelay);\n }\n }\n ngOnDestroy() {\n this.destroy$.next();\n this.destroy$.complete();\n }\n}\n_NzSpinComponent = NzSpinComponent;\n_NzSpinComponent.ɵfac = function _NzSpinComponent_Factory(__ngFactoryType__) {\n return new (__ngFactoryType__ || _NzSpinComponent)(i0.ɵɵdirectiveInject(i1.NzConfigService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2.Directionality));\n};\n_NzSpinComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: _NzSpinComponent,\n selectors: [[\"nz-spin\"]],\n hostVars: 2,\n hostBindings: function _NzSpinComponent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"ant-spin-nested-loading\", !ctx.nzSimple);\n }\n },\n inputs: {\n nzIndicator: \"nzIndicator\",\n nzSize: \"nzSize\",\n nzTip: \"nzTip\",\n nzDelay: [2, \"nzDelay\", \"nzDelay\", numberAttribute],\n nzSimple: [2, \"nzSimple\", \"nzSimple\", booleanAttribute],\n nzSpinning: [2, \"nzSpinning\", \"nzSpinning\", booleanAttribute]\n },\n exportAs: [\"nzSpin\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 4,\n vars: 2,\n consts: [[\"defaultTemplate\", \"\"], [1, \"ant-spin-container\", 3, \"ant-spin-blur\"], [1, \"ant-spin-dot\", \"ant-spin-dot-spin\"], [1, \"ant-spin-dot-item\"], [1, \"ant-spin\"], [3, \"ngTemplateOutlet\"], [1, \"ant-spin-text\"], [1, \"ant-spin-container\"]],\n template: function _NzSpinComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, _NzSpinComponent_ng_template_0_Template, 5, 0, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor)(2, _NzSpinComponent_Conditional_2_Template, 4, 12, \"div\")(3, _NzSpinComponent_Conditional_3_Template, 2, 2, \"div\", 1);\n }\n if (rf & 2) {\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(ctx.isLoading ? 2 : -1);\n i0.ɵɵadvance();\n i0.ɵɵconditional(!ctx.nzSimple ? 3 : -1);\n }\n },\n dependencies: [NgTemplateOutlet],\n encapsulation: 2\n});\n__decorate([WithConfig()], NzSpinComponent.prototype, \"nzIndicator\", void 0);\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && i0.ɵsetClassMetadata(NzSpinComponent, [{\n type: Component,\n args: [{\n selector: 'nz-spin',\n exportAs: 'nzSpin',\n preserveWhitespaces: false,\n encapsulation: ViewEncapsulation.None,\n template: `\n