@filip.mazev/blocks-core 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -109,10 +109,10 @@ class DeviceTypeService {
|
|
|
109
109
|
getDeviceOS() {
|
|
110
110
|
return this.getMobileOS() ?? this.getDesktopOS();
|
|
111
111
|
}
|
|
112
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
113
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DeviceTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
113
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DeviceTypeService, providedIn: 'root' });
|
|
114
114
|
}
|
|
115
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: DeviceTypeService, decorators: [{
|
|
116
116
|
type: Injectable,
|
|
117
117
|
args: [{
|
|
118
118
|
providedIn: 'root'
|
|
@@ -134,11 +134,11 @@ class WindowDimensionsService {
|
|
|
134
134
|
ngZone = inject(NgZone);
|
|
135
135
|
platformId = inject(PLATFORM_ID);
|
|
136
136
|
isBrowser = isPlatformBrowser(this.platformId);
|
|
137
|
-
_dimensions = signal(this.getCurrentDimensions(), ...(ngDevMode ? [{ debugName: "_dimensions" }] : []));
|
|
137
|
+
_dimensions = signal(this.getCurrentDimensions(), ...(ngDevMode ? [{ debugName: "_dimensions" }] : /* istanbul ignore next */ []));
|
|
138
138
|
dimensions = this._dimensions.asReadonly();
|
|
139
|
-
isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md, ...(ngDevMode ? [{ debugName: "isMobile" }] : []));
|
|
140
|
-
isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isTablet" }] : []));
|
|
141
|
-
isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isDesktop" }] : []));
|
|
139
|
+
isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md, ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
140
|
+
isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isTablet" }] : /* istanbul ignore next */ []));
|
|
141
|
+
isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg, ...(ngDevMode ? [{ debugName: "isDesktop" }] : /* istanbul ignore next */ []));
|
|
142
142
|
breakpoints = BREAKPOINTS;
|
|
143
143
|
constructor() {
|
|
144
144
|
this.initResizeListener();
|
|
@@ -165,10 +165,10 @@ class WindowDimensionsService {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
169
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
168
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WindowDimensionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
169
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WindowDimensionsService, providedIn: 'root' });
|
|
170
170
|
}
|
|
171
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
171
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WindowDimensionsService, decorators: [{
|
|
172
172
|
type: Injectable,
|
|
173
173
|
args: [{
|
|
174
174
|
providedIn: 'root'
|
|
@@ -183,7 +183,7 @@ class ScrollLockService {
|
|
|
183
183
|
activeLocks = new Map();
|
|
184
184
|
boundHandleTouchMove = this.handleTouchMove.bind(this);
|
|
185
185
|
boundPreventDefault = this.preventDefault.bind(this);
|
|
186
|
-
_isScrollDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isScrollDisabled" }] : []));
|
|
186
|
+
_isScrollDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isScrollDisabled" }] : /* istanbul ignore next */ []));
|
|
187
187
|
isScrollDisabled = this._isScrollDisabled.asReadonly();
|
|
188
188
|
previousBodyPadding = null;
|
|
189
189
|
pendingListenerTimeout = null;
|
|
@@ -309,10 +309,10 @@ class ScrollLockService {
|
|
|
309
309
|
event.preventDefault();
|
|
310
310
|
event.stopPropagation();
|
|
311
311
|
}
|
|
312
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
313
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
312
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ScrollLockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
313
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ScrollLockService, providedIn: 'root' });
|
|
314
314
|
}
|
|
315
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ScrollLockService, decorators: [{
|
|
316
316
|
type: Injectable,
|
|
317
317
|
args: [{ providedIn: 'root' }]
|
|
318
318
|
}] });
|
|
@@ -320,11 +320,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
320
320
|
class ThemingService {
|
|
321
321
|
platformId = inject(PLATFORM_ID);
|
|
322
322
|
isBrowser = isPlatformBrowser(this.platformId);
|
|
323
|
-
_systemTheme = signal('light', ...(ngDevMode ? [{ debugName: "_systemTheme" }] : []));
|
|
324
|
-
_applicationTheme = signal(null, ...(ngDevMode ? [{ debugName: "_applicationTheme" }] : []));
|
|
323
|
+
_systemTheme = signal('light', ...(ngDevMode ? [{ debugName: "_systemTheme" }] : /* istanbul ignore next */ []));
|
|
324
|
+
_applicationTheme = signal(null, ...(ngDevMode ? [{ debugName: "_applicationTheme" }] : /* istanbul ignore next */ []));
|
|
325
325
|
systemTheme = this._systemTheme.asReadonly();
|
|
326
326
|
applicationTheme = this._applicationTheme.asReadonly();
|
|
327
|
-
activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme(), ...(ngDevMode ? [{ debugName: "activeTheme" }] : []));
|
|
327
|
+
activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme(), ...(ngDevMode ? [{ debugName: "activeTheme" }] : /* istanbul ignore next */ []));
|
|
328
328
|
systemTheme$ = toObservable(this._systemTheme);
|
|
329
329
|
applicationTheme$ = toObservable(this._applicationTheme);
|
|
330
330
|
mediaQueryList;
|
|
@@ -368,10 +368,10 @@ class ThemingService {
|
|
|
368
368
|
};
|
|
369
369
|
this.mediaQueryList.addEventListener('change', this.mediaQueryListener);
|
|
370
370
|
}
|
|
371
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
372
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
372
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemingService, providedIn: 'root' });
|
|
373
373
|
}
|
|
374
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ThemingService, decorators: [{
|
|
375
375
|
type: Injectable,
|
|
376
376
|
args: [{
|
|
377
377
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/constants/window-dimension.constants.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}\n","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}\n","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType, LegacyScreenOrientation, MSStreamWindow, OperaCapableWindow } from '../types/core.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private readonly isDesktopDevice = !this.isMobileDevice() && !this.isTabletDevice();\n private userAgent?: string = navigator.userAgent || navigator.vendor || (window as OperaCapableWindow)?.opera || undefined;\n\n private supportedScreenOrientation =\n (screen?.orientation || {}).type ?? (screen as LegacyScreenOrientation).mozOrientation ?? (screen as LegacyScreenOrientation).msOrientation;\n\n private safariScreenOrientation: DeviceOrientationType =\n !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n\n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener('change', (ev: Event) => {\n const orientation = ev.target as ScreenOrientation | null;\n if (orientation?.type) {\n this.screenOrientation = orientation.type;\n }\n });\n }\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some((b) => this.userAgent?.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent?.toLowerCase() ?? '');\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice() && this.userAgent) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as MSStreamWindow).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n }\n return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice && this.userAgent) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n}\n","export const BREAKPOINTS = {\n xs: 360,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n '3xl': 1920,\n '4xl': 2560\n} as const;\n","import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';\nimport { BREAKPOINTS } from '../constants/window-dimension.constants';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WindowDimensionsService {\n public readonly ngZone = inject(NgZone);\n public readonly platformId = inject(PLATFORM_ID);\n\n public readonly isBrowser = isPlatformBrowser(this.platformId);\n\n public readonly _dimensions = signal<WindowDimensions>(this.getCurrentDimensions());\n\n public readonly dimensions = this._dimensions.asReadonly();\n\n public readonly isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md);\n public readonly isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg);\n public readonly isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg);\n\n public readonly breakpoints = BREAKPOINTS;\n\n constructor() {\n this.initResizeListener();\n }\n\n private getCurrentDimensions(): WindowDimensions {\n if (!this.isBrowser) {\n return { width: 0, height: 0 };\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n\n private initResizeListener(): void {\n if (!this.isBrowser) return;\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(150),\n map(() => this.getCurrentDimensions()),\n distinctUntilChanged((prev, curr) => prev.width === curr.width && prev.height === curr.height)\n )\n .subscribe((dims) => {\n this.ngZone.run(() => {\n this._dimensions.set(dims);\n });\n });\n });\n }\n}\n","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class ScrollLockService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly deviceTypeService = inject(DeviceTypeService);\n private readonly windowDimensionsService = inject(WindowDimensionsService);\n\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n private readonly activeLocks = new Map<string, IScrollLockConfig>();\n private readonly boundHandleTouchMove = this.handleTouchMove.bind(this);\n private readonly boundPreventDefault = this.preventDefault.bind(this);\n\n public readonly _isScrollDisabled = signal(false);\n public readonly isScrollDisabled = this._isScrollDisabled.asReadonly();\n\n private previousBodyPadding: string | null = null;\n\n private pendingListenerTimeout: number | null = null;\n\n public ngOnDestroy(): void {\n if (!this.isBrowser) return;\n this.clearPendingTimeout();\n this.forceCleanupAll();\n }\n\n public disableScroll(usageId: string, config: IScrollLockConfig): void {\n if (!this.isBrowser) return;\n\n const wasDisabled = this._isScrollDisabled();\n\n this.activeLocks.set(usageId, config);\n this._isScrollDisabled.set(true);\n\n if (wasDisabled) return;\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n\n if (scrollBarWidth > 0) {\n this.previousBodyPadding = document.body.style.paddingRight;\n const computedPadding = parseInt(getComputedStyle(document.body).paddingRight, 10) || 0;\n\n document.body.style.setProperty('padding-right', `${computedPadding + scrollBarWidth}px`, 'important');\n }\n\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n document.body.style.setProperty('touch-action', 'none', 'important');\n }\n\n this.clearPendingTimeout();\n\n this.pendingListenerTimeout = window.setTimeout(\n () => {\n if (!this._isScrollDisabled()) return;\n\n if (config.handleTouchInput === true) {\n document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });\n }\n\n if (config.handleExtremeOverflow === true) {\n const opt = { passive: false };\n window.addEventListener('wheel', this.boundPreventDefault, opt);\n window.addEventListener('mousewheel', this.boundPreventDefault, opt);\n window.addEventListener('scroll', this.boundPreventDefault, opt);\n window.addEventListener('DOMMouseScroll', this.boundPreventDefault, opt);\n }\n },\n (config.animationDuration ?? 0) + 10\n );\n }\n\n public enableScroll(usageId: string, extremeOverflow?: boolean): void {\n if (!this.isBrowser) return;\n\n if (!this.activeLocks.has(usageId)) return;\n\n this.activeLocks.delete(usageId);\n\n if (this.activeLocks.size > 0) return;\n\n this.updateStateAndCleanup(extremeOverflow);\n }\n\n private getActiveConfig(): IScrollLockConfig | null {\n if (this.activeLocks.size === 0) return null;\n const keys = Array.from(this.activeLocks.keys());\n return this.activeLocks.get(keys[keys.length - 1]) ?? null;\n }\n\n private updateStateAndCleanup(extremeOverflow?: boolean): void {\n if (!this.isBrowser) return;\n\n this.clearPendingTimeout();\n\n this._isScrollDisabled.set(false);\n\n document.body.style.removeProperty('overflow');\n\n if (this.previousBodyPadding !== null) {\n if (this.previousBodyPadding) {\n document.body.style.setProperty('padding-right', this.previousBodyPadding);\n } else {\n document.body.style.removeProperty('padding-right');\n }\n this.previousBodyPadding = null;\n }\n\n document.body.removeEventListener('touchmove', this.boundHandleTouchMove);\n document.body.style.removeProperty('touch-action');\n\n if (extremeOverflow !== false) {\n window.removeEventListener('wheel', this.boundPreventDefault);\n window.removeEventListener('mousewheel', this.boundPreventDefault);\n window.removeEventListener('scroll', this.boundPreventDefault);\n window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);\n }\n }\n\n private forceCleanupAll(): void {\n this.activeLocks.clear();\n this.updateStateAndCleanup(true);\n }\n\n private clearPendingTimeout(): void {\n if (this.pendingListenerTimeout !== null) {\n clearTimeout(this.pendingListenerTimeout);\n this.pendingListenerTimeout = null;\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const cfg = this.getActiveConfig();\n\n if (!this.isAllowedToScroll(targetNode) && (cfg === null || cfg.handleTouchInput !== false)) {\n if (\n cfg === null ||\n cfg.mobileOnlyTouchPrevention !== true ||\n (cfg.mobileOnlyTouchPrevention === true &&\n (!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet) &&\n this.windowDimensionsService.dimensions().width < this.windowDimensionsService.breakpoints.sm)\n ) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const cfg = this.getActiveConfig();\n const allow = cfg?.allowTouchInputOn;\n\n if (!allow) return true;\n\n if (Array.isArray(allow)) {\n if (allow.length === 0) return true;\n return allow.some((el) => el.contains(targetNode));\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTheme } from '@core/types/core.types';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private _systemTheme = signal<DeviceTheme>('light');\n private _applicationTheme = signal<DeviceTheme | null>(null);\n\n public readonly systemTheme = this._systemTheme.asReadonly();\n public readonly applicationTheme = this._applicationTheme.asReadonly();\n public readonly activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme());\n\n private readonly systemTheme$ = toObservable(this._systemTheme);\n private readonly applicationTheme$ = toObservable(this._applicationTheme);\n\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n constructor() {\n if (this.isBrowser) {\n this._systemTheme.set(this.detectInitialSystemTheme());\n\n const storedTheme = localStorage.getItem('theme') as DeviceTheme | null;\n if (storedTheme === 'dark' || storedTheme === 'light') {\n this._applicationTheme.set(storedTheme);\n }\n\n this.initSystemThemeListener();\n }\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryList && this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this._applicationTheme.set(theme);\n if (this.isBrowser) {\n localStorage.setItem('theme', theme);\n }\n }\n\n public getSystemTheme$() {\n return this.systemTheme$;\n }\n\n public getApplicationTheme$() {\n return this.applicationTheme$;\n }\n\n private detectInitialSystemTheme(): DeviceTheme {\n if (!this.isBrowser) return 'light';\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n\n private initSystemThemeListener(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n this.mediaQueryListener = (event: MediaQueryListEvent) => {\n this._systemTheme.set(event.matches ? 'dark' : 'light');\n };\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';\n","export function uuidv4() {\n return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}\n","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/constants/window-dimension.constants';\nexport * from './lib/constants/scroll-lock.constants';\n\nexport * from './lib/types/core.types';\n\nexport * from './lib/helpers/uui4';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX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AAC;AAC/J;;ACFA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/constants/window-dimension.constants.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}\n","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}\n","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType, LegacyScreenOrientation, MSStreamWindow, OperaCapableWindow } from '../types/core.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private readonly isDesktopDevice = !this.isMobileDevice() && !this.isTabletDevice();\n private userAgent?: string = navigator.userAgent || navigator.vendor || (window as OperaCapableWindow)?.opera || undefined;\n\n private supportedScreenOrientation =\n (screen?.orientation || {}).type ?? (screen as LegacyScreenOrientation).mozOrientation ?? (screen as LegacyScreenOrientation).msOrientation;\n\n private safariScreenOrientation: DeviceOrientationType =\n !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n\n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener('change', (ev: Event) => {\n const orientation = ev.target as ScreenOrientation | null;\n if (orientation?.type) {\n this.screenOrientation = orientation.type;\n }\n });\n }\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some((b) => this.userAgent?.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent?.toLowerCase() ?? '');\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice() && this.userAgent) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as MSStreamWindow).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n }\n return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice && this.userAgent) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n}\n","export const BREAKPOINTS = {\n xs: 360,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n '3xl': 1920,\n '4xl': 2560\n} as const;\n","import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';\nimport { BREAKPOINTS } from '../constants/window-dimension.constants';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class WindowDimensionsService {\n public readonly ngZone = inject(NgZone);\n public readonly platformId = inject(PLATFORM_ID);\n\n public readonly isBrowser = isPlatformBrowser(this.platformId);\n\n public readonly _dimensions = signal<WindowDimensions>(this.getCurrentDimensions());\n\n public readonly dimensions = this._dimensions.asReadonly();\n\n public readonly isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md);\n public readonly isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg);\n public readonly isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg);\n\n public readonly breakpoints = BREAKPOINTS;\n\n constructor() {\n this.initResizeListener();\n }\n\n private getCurrentDimensions(): WindowDimensions {\n if (!this.isBrowser) {\n return { width: 0, height: 0 };\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight\n };\n }\n\n private initResizeListener(): void {\n if (!this.isBrowser) return;\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(150),\n map(() => this.getCurrentDimensions()),\n distinctUntilChanged((prev, curr) => prev.width === curr.width && prev.height === curr.height)\n )\n .subscribe((dims) => {\n this.ngZone.run(() => {\n this._dimensions.set(dims);\n });\n });\n });\n }\n}\n","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\n\n@Injectable({ providedIn: 'root' })\nexport class ScrollLockService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly deviceTypeService = inject(DeviceTypeService);\n private readonly windowDimensionsService = inject(WindowDimensionsService);\n\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n private readonly activeLocks = new Map<string, IScrollLockConfig>();\n private readonly boundHandleTouchMove = this.handleTouchMove.bind(this);\n private readonly boundPreventDefault = this.preventDefault.bind(this);\n\n public readonly _isScrollDisabled = signal(false);\n public readonly isScrollDisabled = this._isScrollDisabled.asReadonly();\n\n private previousBodyPadding: string | null = null;\n\n private pendingListenerTimeout: number | null = null;\n\n public ngOnDestroy(): void {\n if (!this.isBrowser) return;\n this.clearPendingTimeout();\n this.forceCleanupAll();\n }\n\n public disableScroll(usageId: string, config: IScrollLockConfig): void {\n if (!this.isBrowser) return;\n\n const wasDisabled = this._isScrollDisabled();\n\n this.activeLocks.set(usageId, config);\n this._isScrollDisabled.set(true);\n\n if (wasDisabled) return;\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n\n if (scrollBarWidth > 0) {\n this.previousBodyPadding = document.body.style.paddingRight;\n const computedPadding = parseInt(getComputedStyle(document.body).paddingRight, 10) || 0;\n\n document.body.style.setProperty('padding-right', `${computedPadding + scrollBarWidth}px`, 'important');\n }\n\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n document.body.style.setProperty('touch-action', 'none', 'important');\n }\n\n this.clearPendingTimeout();\n\n this.pendingListenerTimeout = window.setTimeout(\n () => {\n if (!this._isScrollDisabled()) return;\n\n if (config.handleTouchInput === true) {\n document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });\n }\n\n if (config.handleExtremeOverflow === true) {\n const opt = { passive: false };\n window.addEventListener('wheel', this.boundPreventDefault, opt);\n window.addEventListener('mousewheel', this.boundPreventDefault, opt);\n window.addEventListener('scroll', this.boundPreventDefault, opt);\n window.addEventListener('DOMMouseScroll', this.boundPreventDefault, opt);\n }\n },\n (config.animationDuration ?? 0) + 10\n );\n }\n\n public enableScroll(usageId: string, extremeOverflow?: boolean): void {\n if (!this.isBrowser) return;\n\n if (!this.activeLocks.has(usageId)) return;\n\n this.activeLocks.delete(usageId);\n\n if (this.activeLocks.size > 0) return;\n\n this.updateStateAndCleanup(extremeOverflow);\n }\n\n private getActiveConfig(): IScrollLockConfig | null {\n if (this.activeLocks.size === 0) return null;\n const keys = Array.from(this.activeLocks.keys());\n return this.activeLocks.get(keys[keys.length - 1]) ?? null;\n }\n\n private updateStateAndCleanup(extremeOverflow?: boolean): void {\n if (!this.isBrowser) return;\n\n this.clearPendingTimeout();\n\n this._isScrollDisabled.set(false);\n\n document.body.style.removeProperty('overflow');\n\n if (this.previousBodyPadding !== null) {\n if (this.previousBodyPadding) {\n document.body.style.setProperty('padding-right', this.previousBodyPadding);\n } else {\n document.body.style.removeProperty('padding-right');\n }\n this.previousBodyPadding = null;\n }\n\n document.body.removeEventListener('touchmove', this.boundHandleTouchMove);\n document.body.style.removeProperty('touch-action');\n\n if (extremeOverflow !== false) {\n window.removeEventListener('wheel', this.boundPreventDefault);\n window.removeEventListener('mousewheel', this.boundPreventDefault);\n window.removeEventListener('scroll', this.boundPreventDefault);\n window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);\n }\n }\n\n private forceCleanupAll(): void {\n this.activeLocks.clear();\n this.updateStateAndCleanup(true);\n }\n\n private clearPendingTimeout(): void {\n if (this.pendingListenerTimeout !== null) {\n clearTimeout(this.pendingListenerTimeout);\n this.pendingListenerTimeout = null;\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const cfg = this.getActiveConfig();\n\n if (!this.isAllowedToScroll(targetNode) && (cfg === null || cfg.handleTouchInput !== false)) {\n if (\n cfg === null ||\n cfg.mobileOnlyTouchPrevention !== true ||\n (cfg.mobileOnlyTouchPrevention === true &&\n (!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet) &&\n this.windowDimensionsService.dimensions().width < this.windowDimensionsService.breakpoints.sm)\n ) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const cfg = this.getActiveConfig();\n const allow = cfg?.allowTouchInputOn;\n\n if (!allow) return true;\n\n if (Array.isArray(allow)) {\n if (allow.length === 0) return true;\n return allow.some((el) => el.contains(targetNode));\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTheme } from '@core/types/core.types';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private _systemTheme = signal<DeviceTheme>('light');\n private _applicationTheme = signal<DeviceTheme | null>(null);\n\n public readonly systemTheme = this._systemTheme.asReadonly();\n public readonly applicationTheme = this._applicationTheme.asReadonly();\n public readonly activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme());\n\n private readonly systemTheme$ = toObservable(this._systemTheme);\n private readonly applicationTheme$ = toObservable(this._applicationTheme);\n\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n constructor() {\n if (this.isBrowser) {\n this._systemTheme.set(this.detectInitialSystemTheme());\n\n const storedTheme = localStorage.getItem('theme') as DeviceTheme | null;\n if (storedTheme === 'dark' || storedTheme === 'light') {\n this._applicationTheme.set(storedTheme);\n }\n\n this.initSystemThemeListener();\n }\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryList && this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this._applicationTheme.set(theme);\n if (this.isBrowser) {\n localStorage.setItem('theme', theme);\n }\n }\n\n public getSystemTheme$() {\n return this.systemTheme$;\n }\n\n public getApplicationTheme$() {\n return this.applicationTheme$;\n }\n\n private detectInitialSystemTheme(): DeviceTheme {\n if (!this.isBrowser) return 'light';\n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n\n private initSystemThemeListener(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n this.mediaQueryListener = (event: MediaQueryListEvent) => {\n this._systemTheme.set(event.matches ? 'dark' : 'light');\n };\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';\n","export function uuidv4() {\n return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}\n","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/constants/window-dimension.constants';\nexport * from './lib/constants/scroll-lock.constants';\n\nexport * from './lib/types/core.types';\n\nexport * from './lib/helpers/uui4';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACnB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAChC,CAAC,EALW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;;MCSP,iBAAiB,CAAA;AACX,IAAA,eAAe,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,C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