{"version":3,"file":"ngx-tethys-resizable.mjs","sources":["../../../src/resizable/resizable.service.ts","../../../src/resizable/utils.ts","../../../src/resizable/resizable.directive.ts","../../../src/resizable/interface.ts","../../../src/resizable/resize-handle.component.ts","../../../src/resizable/resize-handles.component.ts","../../../src/resizable/module.ts","../../../src/resizable/ngx-tethys-resizable.ts"],"sourcesContent":["import { Injectable, NgZone, OnDestroy, inject, DOCUMENT } from '@angular/core';\nimport { isTouchEvent } from 'ngx-tethys/util';\nimport { Subject } from 'rxjs';\nimport { ThyResizeHandleMouseDownEvent } from './interface';\n\n/**\n * @internal\n */\n@Injectable()\nexport class ThyResizableService implements OnDestroy {\n    private ngZone = inject(NgZone);\n\n    private document: Document;\n    private listeners = new Map<string, (event: MouseEvent | TouchEvent) => void>();\n\n    /**\n     * The `OutsideAngular` prefix means that the subject will emit events outside of the Angular zone,\n     * so that becomes a bit more descriptive for those who'll maintain the code in the future:\n     * ```ts\n     * thyResizableService.handleMouseDownOutsideAngular$.subscribe(event => {\n     *   console.log(Zone.current); // <root>\n     *   console.log(NgZone.isInAngularZone()); // false\n     * });\n     * ```\n     */\n\n    handleMouseDownOutsideAngular$ = new Subject<ThyResizeHandleMouseDownEvent>();\n    documentMouseUpOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n    documentMouseMoveOutsideAngular$ = new Subject<MouseEvent | TouchEvent>();\n    mouseEnteredOutsideAngular$ = new Subject<boolean>();\n\n    constructor() {\n        const document = inject(DOCUMENT);\n\n        this.document = document;\n    }\n\n    startResizing(event: MouseEvent | TouchEvent): void {\n        const _isTouchEvent = isTouchEvent(event);\n        this.clearListeners();\n        const moveEvent = _isTouchEvent ? 'touchmove' : 'mousemove';\n        const upEvent = _isTouchEvent ? 'touchend' : 'mouseup';\n        const moveEventHandler = (e: MouseEvent | TouchEvent) => {\n            this.documentMouseMoveOutsideAngular$.next(e);\n        };\n        const upEventHandler = (e: MouseEvent | TouchEvent) => {\n            this.documentMouseUpOutsideAngular$.next(e);\n            this.clearListeners();\n        };\n\n        this.listeners.set(moveEvent, moveEventHandler);\n        this.listeners.set(upEvent, upEventHandler);\n        this.ngZone.runOutsideAngular(() => {\n            this.listeners.forEach((handler, name) => {\n                this.document.addEventListener(name, handler as EventListener);\n            });\n        });\n    }\n\n    private clearListeners(): void {\n        this.listeners.forEach((handler, name) => {\n            this.document.removeEventListener(name, handler as EventListener);\n        });\n        this.listeners.clear();\n    }\n\n    ngOnDestroy(): void {\n        this.handleMouseDownOutsideAngular$.complete();\n        this.documentMouseUpOutsideAngular$.complete();\n        this.documentMouseMoveOutsideAngular$.complete();\n        this.mouseEnteredOutsideAngular$.complete();\n        this.clearListeners();\n    }\n}\n","import { isTouchEvent } from 'ngx-tethys/util';\n\nexport function getEventWithPoint(event: MouseEvent | TouchEvent): MouseEvent | Touch {\n    return isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : (event as MouseEvent);\n}\n\nexport function ensureInBounds(value: number, boundValue: number): number {\n    return value ? (value < boundValue ? value : boundValue) : boundValue;\n}\n\nexport function setCompatibleStyle(element: HTMLElement, key: string, value: string) {\n    // @ts-ignore\n    element.style[key] = value;\n    // @ts-ignore\n    element.style[`-webkit-${key}`] = value;\n    // @ts-ignore\n    element.style[`-moz-${key}`] = value;\n    // @ts-ignore\n    element.style[`-ms-${key}`] = value;\n}\n","import {\n    Directive,\n    OnDestroy,\n    ElementRef,\n    Renderer2,\n    NgZone,\n    inject,\n    DestroyRef,\n    numberAttribute,\n    input,\n    output,\n    signal\n} from '@angular/core';\nimport { ThyResizableService } from './resizable.service';\nimport { Platform } from '@angular/cdk/platform';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ThyResizeHandleMouseDownEvent, ThyResizeEvent } from './interface';\nimport { getEventWithPoint, ensureInBounds, setCompatibleStyle } from './utils';\nimport { fromEvent } from 'rxjs';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\n/**\n * 调整尺寸\n * @name thyResizable\n */\n@Directive({\n    selector: '[thyResizable]',\n    providers: [ThyResizableService],\n    host: {\n        class: 'thy-resizable',\n        '[class.thy-resizable-resizing]': 'resizing()',\n        '[class.thy-resizable-disabled]': 'thyDisabled()'\n    }\n})\nexport class ThyResizableDirective implements OnDestroy {\n    private elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n    private renderer = inject(Renderer2);\n    private platform = inject(Platform);\n    private ngZone = inject(NgZone);\n    private thyResizableService = inject(ThyResizableService);\n\n    /**\n     * 调整尺寸的边界\n     * @default parent\n     * @type 'window' | 'parent' | ElementRef<HTMLElement>\n     */\n    readonly thyBounds = input<'window' | 'parent' | ElementRef<HTMLElement>>('parent');\n\n    /**\n     * 最大高度(超过边界部分忽略)\n     */\n    readonly thyMaxHeight = input<number, unknown>(undefined, { transform: numberAttribute });\n\n    /**\n     * 最大宽度(超过边界部分忽略)\n     */\n    readonly thyMaxWidth = input<number, unknown>(undefined, { transform: numberAttribute });\n\n    /**\n     * 最小高度\n     */\n    readonly thyMinHeight = input(40, { transform: numberAttribute });\n\n    /**\n     * 最小宽度\n     */\n    readonly thyMinWidth = input(40, { transform: numberAttribute });\n\n    /**\n     * 栅格列数(-1 为不栅格)\n     */\n    readonly thyGridColumnCount = input(-1, { transform: numberAttribute });\n\n    /**\n     * 栅格最大列数\n     */\n    readonly thyMaxColumn = input(-1, { transform: numberAttribute });\n\n    /**\n     * 栅格最小列数\n     */\n    readonly thyMinColumn = input(-1, { transform: numberAttribute });\n\n    /**\n     * 锁定宽高比\n     */\n    readonly thyLockAspectRatio = input(false, { transform: coerceBooleanProperty });\n\n    /**\n     * 是否预览模式\n     */\n    readonly thyPreview = input(false, { transform: coerceBooleanProperty });\n\n    /**\n     * 是否禁用调整大小\n     */\n    readonly thyDisabled = input(false, { transform: coerceBooleanProperty });\n\n    /**\n     * 调整尺寸时的事件\n     */\n    readonly thyResize = output<ThyResizeEvent>();\n\n    /**\n     * 开始调整尺寸时的事件\n     */\n    readonly thyResizeStart = output<ThyResizeEvent>();\n\n    /**\n     * 结束调整尺寸时的事件\n     */\n    readonly thyResizeEnd = output<ThyResizeEvent>();\n\n    resizing = signal(false);\n    private get nativeElement() {\n        return this.elementRef.nativeElement as HTMLElement;\n    }\n    private nativeElementRect!: ClientRect | DOMRect;\n    private sizeCache: ThyResizeEvent | null = null;\n    private ghostElement: HTMLDivElement | null = null;\n    private currentHandleEvent: ThyResizeHandleMouseDownEvent | null = null;\n    private readonly destroyRef = inject(DestroyRef);\n\n    constructor() {\n        this.thyResizableService.handleMouseDownOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n            if (this.thyDisabled()) {\n                return;\n            }\n            this.resizing.set(true);\n            const { mouseEvent } = event;\n            this.thyResizableService.startResizing(mouseEvent);\n            this.currentHandleEvent = event;\n            this.setCursor();\n            // Re-enter the Angular zone and run the change detection only if there're any `thyResizeStart` listeners,\n            // e.g.: `<div thyResizable (thyResizeStart)=\"...\"></div>`.\n            this.ngZone.run(() => this.thyResizeStart.emit({ mouseEvent }));\n            this.nativeElementRect = this.nativeElement.getBoundingClientRect();\n        });\n\n        this.thyResizableService.documentMouseUpOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n            if (this.resizing()) {\n                this.ngZone.run(() => {\n                    this.resizing.set(false);\n                });\n                this.thyResizableService.documentMouseUpOutsideAngular$.next(event);\n                this.endResize(event);\n            }\n        });\n\n        this.thyResizableService.documentMouseMoveOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(event => {\n            if (this.resizing()) {\n                this.resize(event);\n            }\n        });\n\n        this.bindMouseEnterAndLeaveEvents();\n    }\n\n    private bindMouseEnterAndLeaveEvents() {\n        if (!this.platform.isBrowser) {\n            return;\n        }\n        this.ngZone.runOutsideAngular(() => {\n            fromEvent(this.nativeElement, 'mouseenter')\n                .pipe(takeUntilDestroyed(this.destroyRef))\n                .subscribe(() => {\n                    this.thyResizableService.mouseEnteredOutsideAngular$.next(true);\n                });\n\n            fromEvent(this.nativeElement, 'mouseleave')\n                .pipe(takeUntilDestroyed(this.destroyRef))\n                .subscribe(() => {\n                    this.thyResizableService.mouseEnteredOutsideAngular$.next(false);\n                });\n        });\n    }\n\n    setCursor(): void {\n        switch (this.currentHandleEvent!.direction) {\n            case 'left':\n            case 'right':\n                this.renderer.setStyle(document.body, 'cursor', 'ew-resize');\n                break;\n            case 'top':\n            case 'bottom':\n                this.renderer.setStyle(document.body, 'cursor', 'ns-resize');\n                break;\n            case 'topLeft':\n            case 'bottomRight':\n                this.renderer.setStyle(document.body, 'cursor', 'nwse-resize');\n                break;\n            case 'topRight':\n            case 'bottomLeft':\n                this.renderer.setStyle(document.body, 'cursor', 'nesw-resize');\n                break;\n        }\n        setCompatibleStyle(document.body, 'user-select', 'none');\n    }\n\n    endResize(event: MouseEvent | TouchEvent): void {\n        this.renderer.setStyle(document.body, 'cursor', '');\n        setCompatibleStyle(document.body, 'user-select', '');\n        this.removeGhostElement();\n        const size = this.sizeCache\n            ? { ...this.sizeCache }\n            : {\n                  width: this.nativeElementRect.width,\n                  height: this.nativeElementRect.height\n              };\n        // Re-enter the Angular zone and run the change detection only if there're any `thyResizeEnd` listeners,\n        // e.g.: `<div thyResizable (thyResizeEnd)=\"...\"></div>`.\n        this.ngZone.run(() => {\n            this.thyResizeEnd.emit({\n                ...size,\n                mouseEvent: event\n            });\n        });\n        this.sizeCache = null;\n        this.currentHandleEvent = null;\n    }\n\n    resize(event: MouseEvent | TouchEvent): void {\n        const nativeElementRect = this.nativeElementRect;\n        const resizeEvent = getEventWithPoint(event);\n        const handleEvent = getEventWithPoint(this.currentHandleEvent!.mouseEvent);\n        let width = nativeElementRect.width;\n        let height = nativeElementRect.height;\n        const ratio = this.thyLockAspectRatio() ? width / height : -1;\n        switch (this.currentHandleEvent!.direction) {\n            case 'bottomRight':\n                width = resizeEvent.clientX - nativeElementRect.left;\n                height = resizeEvent.clientY - nativeElementRect.top;\n                break;\n            case 'bottomLeft':\n                width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n                height = resizeEvent.clientY - nativeElementRect.top;\n                break;\n            case 'topRight':\n                width = resizeEvent.clientX - nativeElementRect.left;\n                height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n                break;\n            case 'topLeft':\n                width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n                height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n                break;\n            case 'top':\n                height = nativeElementRect.height + (handleEvent.clientY - resizeEvent.clientY);\n                break;\n            case 'right':\n                width = resizeEvent.clientX - nativeElementRect.left;\n                break;\n            case 'bottom':\n                height = resizeEvent.clientY - nativeElementRect.top;\n                break;\n            case 'left':\n                width = nativeElementRect.width + (handleEvent.clientX - resizeEvent.clientX);\n        }\n        const size = this.calcSize(width, height, ratio);\n        this.sizeCache = { ...size };\n        // Re-enter the Angular zone and run the change detection only if there're any `thyResize` listeners,\n        // e.g.: `<div thyResizable (thyResize)=\"...\"></div>`.\n        this.ngZone.run(() => {\n            this.thyResize.emit({\n                ...size,\n                mouseEvent: event\n            });\n        });\n\n        if (this.thyPreview()) {\n            this.previewResize(size);\n        }\n    }\n\n    calcSize(width: number, height: number, ratio: number): ThyResizeEvent {\n        let newWidth!: number;\n        let newHeight!: number;\n        let maxWidth!: number;\n        let col = 0;\n        let spanWidth = 0;\n        let minWidth = this.thyMinWidth();\n        let boundWidth = Infinity;\n        let boundHeight = Infinity;\n        const bounds = this.thyBounds();\n        if (bounds === 'parent') {\n            const parent = this.renderer.parentNode(this.nativeElement);\n            if (parent instanceof HTMLElement) {\n                const parentRect = parent.getBoundingClientRect();\n                boundWidth = parentRect.width;\n                boundHeight = parentRect.height;\n            }\n        } else if (bounds === 'window') {\n            if (typeof window !== 'undefined') {\n                boundWidth = window.innerWidth;\n                boundHeight = window.innerHeight;\n            }\n        } else if (bounds && bounds.nativeElement && bounds.nativeElement instanceof HTMLElement) {\n            const boundsRect = bounds.nativeElement.getBoundingClientRect();\n            boundWidth = boundsRect.width;\n            boundHeight = boundsRect.height;\n        }\n\n        maxWidth = ensureInBounds(this.thyMaxWidth()!, boundWidth);\n        const maxHeight = ensureInBounds(this.thyMaxHeight()!, boundHeight);\n\n        const gridColumnCount = this.thyGridColumnCount();\n        if (gridColumnCount !== -1) {\n            spanWidth = maxWidth / gridColumnCount;\n            const minColumn = this.thyMinColumn();\n            minWidth = minColumn !== -1 ? spanWidth * minColumn : minWidth;\n            const maxColumn = this.thyMaxColumn();\n            maxWidth = maxColumn !== -1 ? spanWidth * maxColumn : maxWidth;\n        }\n\n        const minHeight = this.thyMinHeight();\n        if (ratio !== -1) {\n            if (/(left|right)/i.test(this.currentHandleEvent!.direction)) {\n                newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n                newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);\n                if (newHeight >= maxHeight || newHeight <= minHeight) {\n                    newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n                }\n            } else {\n                newHeight = Math.min(Math.max(height, minHeight), maxHeight);\n                newWidth = Math.min(Math.max(newHeight * ratio, minWidth), maxWidth);\n                if (newWidth >= maxWidth || newWidth <= minWidth) {\n                    newHeight = Math.min(Math.max(newWidth / ratio, minHeight), maxHeight);\n                }\n            }\n        } else {\n            newWidth = Math.min(Math.max(width, minWidth), maxWidth);\n            newHeight = Math.min(Math.max(height, minHeight), maxHeight);\n        }\n\n        if (gridColumnCount !== -1) {\n            col = Math.round(newWidth / spanWidth);\n            newWidth = col * spanWidth;\n        }\n\n        return {\n            col,\n            width: newWidth,\n            height: newHeight\n        };\n    }\n\n    previewResize({ width, height }: ThyResizeEvent): void {\n        this.createGhostElement();\n        this.renderer.setStyle(this.ghostElement, 'width', `${width}px`);\n        this.renderer.setStyle(this.ghostElement, 'height', `${height}px`);\n    }\n\n    createGhostElement(): void {\n        if (!this.ghostElement) {\n            this.ghostElement = this.renderer.createElement('div');\n            this.renderer.setAttribute(this.ghostElement, 'class', 'thy-resizable-preview');\n        }\n        this.renderer.appendChild(this.nativeElement, this.ghostElement);\n    }\n\n    removeGhostElement(): void {\n        if (this.ghostElement) {\n            this.renderer.removeChild(this.nativeElement, this.ghostElement);\n        }\n    }\n\n    ngOnDestroy(): void {\n        this.ghostElement = null;\n        this.sizeCache = null;\n    }\n}\n","export type ThyResizeDirection = 'top' | 'right' | 'bottom' | 'left' | 'topRight' | 'bottomRight' | 'bottomLeft' | 'topLeft';\n\nexport interface ThyResizeEvent {\n    width?: number;\n    height?: number;\n    col?: number;\n    mouseEvent?: MouseEvent | TouchEvent;\n}\n\nexport class ThyResizeHandleMouseDownEvent {\n    constructor(\n        public direction: ThyResizeDirection,\n        public mouseEvent: MouseEvent | TouchEvent\n    ) {}\n}\n","import { OnInit, Component, NgZone, ElementRef, inject, DestroyRef, input, output } from '@angular/core';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ThyResizeDirection, ThyResizeHandleMouseDownEvent } from './interface';\nimport { ThyResizableService } from './resizable.service';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { fromEvent, merge } from 'rxjs';\nimport { useHostRenderer } from '@tethys/cdk/dom';\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({ passive: true }) as AddEventListenerOptions;\n\n/**\n * 定义调整手柄及方向\n * @name thy-resize-handle\n */\n@Component({\n    selector: 'thy-resize-handle, [thy-resize-handle]',\n    exportAs: 'thyResizeHandle',\n    template: `\n        <ng-content></ng-content>\n        @if (thyLine()) {\n            <div class=\"thy-resizable-handle-line\"></div>\n        }\n    `,\n    host: {\n        class: 'thy-resizable-handle',\n        '[class.thy-resizable-handle-top]': `thyDirection() === 'top'`,\n        '[class.thy-resizable-handle-right]': `thyDirection() === 'right'`,\n        '[class.thy-resizable-handle-bottom]': `thyDirection() === 'bottom'`,\n        '[class.thy-resizable-handle-left]': `thyDirection() === 'left'`,\n        '[class.thy-resizable-handle-topRight]': `thyDirection() === 'topRight'`,\n        '[class.thy-resizable-handle-bottomRight]': `thyDirection() === 'bottomRight'`,\n        '[class.thy-resizable-handle-bottomLeft]': `thyDirection() === 'bottomLeft'`,\n        '[class.thy-resizable-handle-topLeft]': `thyDirection() === 'topLeft'`,\n        '[class.thy-resizable-handle-box-hover]': 'entered()'\n    },\n    imports: []\n})\nexport class ThyResizeHandle implements OnInit {\n    private ngZone = inject(NgZone);\n    private thyResizableService = inject(ThyResizableService);\n    private host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n    /**\n     * 调整方向\n     * @type top | right | bottom | left | topRight | bottomRight | bottomLeft | topLeft\n     */\n    readonly thyDirection = input<ThyResizeDirection>('bottomRight');\n\n    /**\n     * 是否展示拖拽线\n     * @type boolean\n     */\n    readonly thyLine = input(false, { transform: coerceBooleanProperty });\n\n    /**\n     * MouseDown 回调事件\n     */\n    readonly thyMouseDown = output<ThyResizeHandleMouseDownEvent>();\n\n    private hostRenderer = useHostRenderer();\n\n    private readonly destroyRef = inject(DestroyRef);\n\n    protected entered = toSignal(this.thyResizableService.mouseEnteredOutsideAngular$);\n\n    ngOnInit(): void {\n        this.thyResizableService.mouseEnteredOutsideAngular$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(entered => {\n            if (entered) {\n                this.hostRenderer.addClass('thy-resizable-handle-box-hover');\n            } else {\n                this.hostRenderer.removeClass('thy-resizable-handle-box-hover');\n            }\n        });\n        this.ngZone.runOutsideAngular(() => {\n            // Note: since Chrome 56 defaults document level `touchstart` listener to passive.\n            // The element `touchstart` listener is not passive by default\n            // We never call `preventDefault()` on it, so we're safe making it passive too.\n            merge(\n                fromEvent<MouseEvent>(this.host.nativeElement, 'mousedown', passiveEventListenerOptions),\n                fromEvent<TouchEvent>(this.host.nativeElement, 'touchstart', passiveEventListenerOptions)\n            )\n                .pipe(takeUntilDestroyed(this.destroyRef))\n                .subscribe((event: MouseEvent | TouchEvent) => {\n                    this.thyResizableService.handleMouseDownOutsideAngular$.next(\n                        new ThyResizeHandleMouseDownEvent(this.thyDirection(), event)\n                    );\n                });\n        });\n    }\n}\n","import { Component, computed, input } from '@angular/core';\nimport { ThyResizeDirection } from './interface';\nimport { ThyResizeHandle } from './resize-handle.component';\n\nimport { coerceBooleanProperty } from 'ngx-tethys/util';\n\nexport const DEFAULT_RESIZE_DIRECTION: ThyResizeDirection[] = [\n    'bottomRight',\n    'topRight',\n    'bottomLeft',\n    'topLeft',\n    'bottom',\n    'right',\n    'top',\n    'left'\n];\n\n/**\n * 定义调整手柄的快捷组件\n * @name thy-resize-handles\n */\n@Component({\n    selector: 'thy-resize-handles',\n    exportAs: 'thyResizeHandles',\n    template: `\n        @for (dir of directions(); track $index) {\n            <thy-resize-handle [thyLine]=\"thyLine()\" [thyDirection]=\"dir\"></thy-resize-handle>\n        }\n    `,\n    imports: [ThyResizeHandle]\n})\nexport class ThyResizeHandles {\n    /**\n     * 定义调整手柄的方向\n     * @type ThyResizeDirection[]\n     */\n    readonly thyDirections = input<ThyResizeDirection[]>(DEFAULT_RESIZE_DIRECTION);\n\n    /**\n     * 是否展示拖拽线\n     */\n    readonly thyLine = input(false, { transform: coerceBooleanProperty });\n\n    readonly directions = computed(() => {\n        const directions = this.thyDirections();\n        return new Set<ThyResizeDirection>(directions);\n    });\n}\n","import { NgModule } from '@angular/core';\nimport { ThyResizableDirective } from './resizable.directive';\nimport { ThyResizeHandle } from './resize-handle.component';\nimport { ThyResizeHandles } from './resize-handles.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n    imports: [CommonModule, ThyResizableDirective, ThyResizeHandle, ThyResizeHandles],\n    exports: [ThyResizableDirective, ThyResizeHandle, ThyResizeHandles]\n})\nexport class ThyResizableModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAKA;;AAEG;MAEU,mBAAmB,CAAA;AAsB5B,IAAA,WAAA,GAAA;AArBQ,QAAA,IAAA,CAAA,MAAM,GAAG,MA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