{"version":3,"names":["contextMenuCss","EonUiContextMenuStyle0","ContextMenu","this","schemeConfig","CONTEXT_MENU_SCHEME_CONFIG","schemeMap","CONTEXT_MENU_SCHEME_MAP","selectLabels","CONTEXT_MENU_SIZE_NORMAL","componentWillLoad","applyScheme","collectMenuItems","onWindowResize","componentDidLoad","detectSlotChanges","menuElementSelectionHandler","hostElement","setCssVariables","setInitialMenuItem","applySchemeDelegate","setCssVariablesDelegate","onDocumentClick","event","closeContextMenu","initContextMenu","isTouchDevice","initTouchContextMenu","eventFiredElement","parentElement","containerWidth","getBoundingClientRect","width","containerHeight","height","tempSelectItems","label","tempSelectLabelItem","value","selectedItem","selectedMenuItem","innerText","disabled","push","menuItems","forEach","item","optionElement","href","selectItems","leftPos","left","menuExpandPosition","window","innerWidth","iconAlignment","offsetTop","_a","menuContainerHead","setCssVariable","menuOffsetX","Array","from","getNestedChildrenOf","contextMenuFocus","emit","setFocus","visible","setTimeout","menuContainer","focus","shadowRoot","firstChild","OpenContextMenu","e","srcElement","tagName","contains","stopImmediatePropagation","toggleMenuList","openingItem","querySelector","ariaExpanded","collapseMenu","menuItem","focusedItem","prevSelectedMenuItem","size","focusOnMenuItems","onclick","target","handleMenuKeyDown","focusedMenuItemIndex","key","KeyIds","SPACE","ENTER","preventDefault","focusedMenuItem","selectionOfMenuItems","DOWN","indexOf","length","UP","ESCAPE","TAB","handleNewSelectedMenuItem","contextMenuItemOnSelect","handleSelectionChange","newSelectedOption","filter","option","select","location","render","styleProp","style","h","Host","class","pfx","role","tabIndex","onKeyDown","ref","el","iconWithLabel","innerHTML","iconName","noSpace","name","divider","onChange","onFocus","onBlur","contextMenuBlur","map","selected"],"sources":["src/components/context-menu/context-menu.scss?tag=eon-ui-context-menu&encapsulation=shadow","src/components/context-menu/context-menu.tsx"],"sourcesContent":["/**\n * THEME JSON CONFIG CSS VARS\n * The following default component scss variables can be overwritten via theme configuration per brand.\n * If you need to add new one, please make sure to set a default value.\n * JSON Definition for Component with name \"Example\": testCssVar: \"20px\"\n * Resulting CSS var: $example-test-css-var: 20px;\n */\n\n$context-menu-box-shadow: 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12) !default;\n$context-menu-border-radius: 3px !default;\n$context-menu-normal-padding: 12px !default;\n$context-menu-max-width: 270px !default;\n$context-menu-inset-box-shadow: inset 0px -1px 0px #e5e5e5 !default;\n$context-menu-max-icon-height: 32px !default;\n$context-menu-max-icon-width: 32px !default;\n$context-menu-font-size: 18px !default;\n$context-menu-border-color: transparent !default;\n$context-menu-border-width: 0px !default;\n$context-menu-border-style: none !default;\n$context-menu-divider-border-color: transparent !default;\n$context-menu-divider-border-width: 0px !default;\n$context-menu-divider-border-style: none !default;\n/* END THEME JSON CONFIG CSS VARS ******************************************************* */\n\n:host {\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n font-family: $font-family-base;\n z-index: 100;\n margin: 0 !important; // For proper positioning of Menu on component which fired the click event, \"important!\" is necessary\n padding: 0 !important;\n\n * {\n box-sizing: border-box;\n outline: none;\n }\n}\n\n:host(.#{$prefix}position-left) {\n left: 0;\n right: unset;\n}\n\n:host(.#{$prefix}position-right) {\n left: unset;\n right: 0;\n}\n\n.#{$prefix}context-menu-container {\n display: inline-block;\n position: absolute;\n top: -2px;\n width: $context-menu-max-width;\n box-shadow: $context-menu-box-shadow;\n border-radius: $context-menu-border-radius;\n border: $context-menu-border-width $context-menu-border-style $context-menu-border-color;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.25s cubic-bezier(0.33, 0, 0.35, 1) 0.5s, visibility 0.25s cubic-bezier(0.33, 0, 0.35, 1) 0.5s,\n transform 0.25s ease-in-out 0.5s;\n\n &.#{$prefix}visible {\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.25s cubic-bezier(0.33, 0, 0.35, 1) 0s, visibility 0.25s cubic-bezier(0.33, 0, 0.35, 1) 0s,\n transform 0.25s ease-in-out 0s;\n }\n\n &.#{$prefix}position-left {\n transform: translate3d(var(--offsetLeft), var(--offsetTop), 0px);\n left: 0;\n }\n\n &.#{$prefix}position-right {\n transform: translate3d(calc(var(--offsetLeft) * -1), var(--offsetTop), 0px);\n right: -2px;\n }\n\n .#{$prefix}context-menu-wrapper {\n width: 100%;\n display: flex;\n flex-direction: column;\n background-color: v(backgroundColor);\n overflow: hidden;\n border-radius: $context-menu-border-radius;\n\n .#{$prefix}context-menu-items {\n list-style: none;\n margin: 0;\n padding: 0;\n }\n\n .#{$prefix}context-menu-title {\n display: flex;\n align-items: center;\n width: 100%;\n padding: $context-menu-normal-padding;\n height: 48px;\n box-shadow: $context-menu-inset-box-shadow;\n background-color: v(menuTitleBackgroundColor);\n\n .#{$prefix}context-menu-label {\n width: 100%;\n cursor: initial;\n }\n\n .#{$prefix}context-menu-label {\n font-weight: normal;\n font-size: 18px;\n line-height: 24px;\n color: v(labelColor);\n @include noneUserSelect();\n }\n\n .#{$prefix}context-menu-icon {\n fill: v(iconColor);\n width: auto;\n }\n\n &.#{$prefix}icon-with-label {\n &.#{$prefix}icon-right {\n flex-direction: row-reverse;\n justify-content: flex-start;\n\n .#{$prefix}context-menu-label {\n justify-content: flex-end;\n text-align: right;\n padding-left: 10px;\n }\n\n .#{$prefix}context-menu-icon {\n justify-content: flex-end;\n }\n }\n\n &.#{$prefix}icon-left {\n flex-direction: row-reverse;\n justify-content: flex-end;\n\n .#{$prefix}context-menu-label {\n justify-content: flex-start;\n text-align: left;\n }\n\n .#{$prefix}context-menu-icon {\n justify-content: flex-start;\n padding-right: 10px;\n }\n }\n\n .#{$prefix}context-menu-label,\n .#{$prefix}context-menu-icon {\n width: auto;\n }\n }\n\n &.#{$prefix}icon-right {\n flex-direction: row;\n\n .#{$prefix}context-menu-label {\n justify-content: flex-start;\n text-align: left;\n }\n\n .#{$prefix}context-menu-icon {\n justify-content: flex-end;\n }\n\n &:not(.#{$prefix}icon-with-label) {\n margin-left: -2px;\n }\n }\n\n &.#{$prefix}icon-left {\n flex-direction: row-reverse;\n\n .#{$prefix}context-menu-label {\n justify-content: flex-end;\n text-align: left;\n }\n\n .#{$prefix}context-menu-icon {\n justify-content: flex-start;\n padding-right: $context-menu-normal-padding;\n }\n }\n }\n }\n\n &.#{$prefix}small {\n .#{$prefix}context-menu-title {\n height: 33px;\n padding: 10px;\n\n .#{$prefix}context-menu-label {\n font-weight: normal;\n font-size: 16px;\n line-height: 22px;\n }\n }\n }\n\n &.#{$prefix}touch-device {\n width: #{$context-menu-max-icon-width};\n height: #{$context-menu-max-icon-height};\n opacity: 0 !important;\n\n &.#{$prefix}visible {\n opacity: 0 !important;\n\n select {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n z-index: 100;\n font-size: $context-menu-font-size;\n }\n }\n\n select {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n z-index: 100;\n font-size: $context-menu-font-size;\n }\n\n &.#{$prefix}small {\n select {\n font-size: 16px;\n }\n }\n }\n\n .#{$prefix}divider-wrapper {\n position: absolute;\n padding: 0px 12px;\n top: 48px;\n width: 100%;\n\n .#{$prefix}divider {\n border: $context-menu-divider-border-width $context-menu-divider-border-style $context-menu-divider-border-color;\n }\n }\n\n &.#{$prefix}small {\n .#{$prefix}divider-wrapper {\n top: 33px;\n }\n }\n}\n","import { h, Component, Host, State, Element, Prop, Watch, Listen, Event, EventEmitter } from \"@stencil/core\";\nimport { ColorableComponent, applySchemeDelegate, setCssVariablesDelegate } from \"../../common/colorable-component\";\nimport { ContextMenuSchemeDefinition, ContextMenuSchemeName, ContextMenuSize } from \"./constants/context-menu-types\";\nimport {\n CONTEXT_MENU_SCHEME_CONFIG,\n CONTEXT_MENU_SCHEME_MAP,\n CONTEXT_MENU_SIZE_NORMAL\n} from \"./constants/context-menu-constants\";\nimport { ContextMenuSchemeConfiguration } from \"../../constants/colors\";\nimport pfx from \"../../utils/style-class-prefix-helper\";\nimport { getNestedChildrenOf } from \"../../utils/dom-helper\";\nimport { detectSlotChanges } from \"../../utils/slot-helper\";\nimport { KeyIds } from \"../../constants/keys\";\nimport { isTouchDevice } from \"../../utils/touch-helper\";\nimport { setCssVariable } from \"../../utils/css-variables\";\n// import { InitLogging } from \"../../decorators/init-logging\";\n\n/**\n * @slot [unnamed] - holds any number of HTML elements.\n */\n@Component({\n tag: \"eon-ui-context-menu\",\n styleUrl: \"context-menu.scss\",\n shadow: true\n})\nexport class ContextMenu implements ColorableComponent> {\n // @InitLogging() sentryTransaction;\n schemeConfig: ContextMenuSchemeConfiguration = CONTEXT_MENU_SCHEME_CONFIG;\n schemeMap = CONTEXT_MENU_SCHEME_MAP;\n\n private menuContainerHead: HTMLElement;\n private menuContainer: HTMLElement;\n selectLabels: string[] = [];\n select: HTMLSelectElement;\n\n @State() selectItems: any[] = [];\n\n @State() containerHeight: any;\n\n @State() containerWidth: any;\n\n /**\n * The components active scheme. If {@link scheme} is set, it will be set to the corresponding scheme.\n * If not set, the component will try to calculate it based on the nearest enclosing background information given by inner-background attribute or eon-ui-background component.\n */\n @State() activeScheme: ContextMenuSchemeDefinition;\n\n /**\n * Collection of all the menu items\n */\n @State() menuItems: HTMLEonUiContextMenuItemElement[] = [];\n\n /**\n * Newly Selected menu item\n */\n @State() selectedMenuItem: HTMLEonUiContextMenuItemElement;\n\n /**\n * Decides the side where the menu should be opened\n * @example \"left\" | \"right\"\n */\n @State() menuExpandPosition: string;\n\n /**\n * Newly Focused menu item\n */\n @State() focusedMenuItem: HTMLEonUiContextMenuItemElement;\n\n /**\n * Previously selected menu item\n */\n @State() prevSelectedMenuItem: HTMLEonUiContextMenuItemElement;\n\n /**\n * When Context Menu collapses\n */\n @State() collapseMenu: boolean;\n\n @Element() hostElement: HTMLEonUiContextMenuElement;\n\n /**\n * Raised when the input is focused.\n */\n @Event() contextMenuFocus: EventEmitter;\n\n /**\n * Raised when the input is losing focus.\n */\n @Event() contextMenuBlur: EventEmitter;\n\n /**\n * Raised when item has been selected from Context Menu.\n */\n @Event() contextMenuItemOnSelect: EventEmitter;\n\n /**\n * The name of the color scheme of the component.\n * If not set, the component will try to calculate it based on the nearest enclosing background information given by inner-background attribute or eon-ui-background component.\n */\n @Prop({ reflect: true }) scheme: ContextMenuSchemeName;\n\n /**\n * if this property is true, the context menu will be displayed\n */\n @Prop({ mutable: true, reflect: true }) visible: boolean = false;\n\n /**\n * Label Headline for Menu\n */\n @Prop({ reflect: true }) label: string;\n\n /**\n * Icon in aligned with label headline\n */\n @Prop({ reflect: true }) iconName: string;\n\n /**\n * Alignment on Icon on Menu title\n * @example \"left\", \"right\"\n */\n @Prop({ reflect: true, mutable: true }) iconAlignment: string = \"right\";\n\n /**\n * Allows to define an offset for exact positioning of context menu on x-axis\n */\n @Prop() menuOffsetX: number = 0;\n\n /**\n * Selected Value from context menun item component\n */\n @Prop({ reflect: true, mutable: true }) value: string;\n\n /**\n * Set the size of the component\n */\n @Prop() size: ContextMenuSize = CONTEXT_MENU_SIZE_NORMAL;\n\n /**\n * Icon and label are placed together\n */\n @Prop({ reflect: true, mutable: true }) iconWithLabel: boolean = false;\n\n componentWillLoad() {\n this.applyScheme();\n this.collectMenuItems();\n this.onWindowResize();\n }\n\n componentDidLoad() {\n detectSlotChanges(() => {\n this.collectMenuItems();\n this.menuElementSelectionHandler();\n this.onWindowResize();\n }, this.hostElement);\n\n this.setCssVariables();\n this.collectMenuItems();\n this.menuElementSelectionHandler();\n this.onWindowResize();\n this.setInitialMenuItem();\n }\n\n @Watch(\"scheme\")\n applyScheme() {\n applySchemeDelegate(this);\n }\n\n @Watch(\"activeScheme\")\n setCssVariables(): void {\n setCssVariablesDelegate(this);\n }\n\n @Listen(\"click\", { target: \"document\" })\n onDocumentClick(event) {\n this.closeContextMenu(event);\n }\n\n @Listen(\"resize\", { target: \"window\" })\n onWindowResize() {\n this.initContextMenu();\n if (isTouchDevice()) this.initTouchContextMenu();\n }\n\n private initTouchContextMenu() {\n const eventFiredElement = this.hostElement.parentElement;\n this.containerWidth = eventFiredElement.getBoundingClientRect().width;\n this.containerHeight = eventFiredElement.getBoundingClientRect().height;\n let tempSelectItems: any[] = [];\n\n if (this.label) {\n let tempSelectLabelItem = {\n value: \"\",\n label: this.label,\n selectedItem: !this.selectedMenuItem ? true : false,\n innerText: this.label,\n disabled: true\n };\n\n tempSelectItems.push(tempSelectLabelItem);\n }\n\n this.menuItems.forEach((item: HTMLEonUiContextMenuItemElement) => {\n let optionElement = {\n value: item.value,\n label: item.label,\n href: item.href,\n selectedItem: this.selectedMenuItem && this.selectedMenuItem.value === item.value ? true : false,\n innerText: item.label\n };\n\n tempSelectItems.push(optionElement);\n });\n\n this.selectItems = tempSelectItems;\n }\n\n private initContextMenu() {\n const eventFiredElement = this.hostElement.parentElement;\n this.containerWidth = eventFiredElement.getBoundingClientRect().width;\n\n // Detects the position of parent from where the click event is fired\n // and on basis of that the menu should open on right or left\n let leftPos = eventFiredElement.getBoundingClientRect().left;\n this.menuExpandPosition = window.innerWidth / 2 < leftPos ? \"right\" : \"left\";\n\n if (this.menuExpandPosition === \"left\") {\n this.iconAlignment = \"left\";\n } else if (this.menuExpandPosition === \"right\") {\n this.iconAlignment = \"right\";\n }\n\n let offsetTop =\n this.hostElement.parentElement.getBoundingClientRect().height * 0.5 -\n this.menuContainerHead?.getBoundingClientRect().height * 0.5;\n\n setCssVariable(this.hostElement, `--offsetLeft`, `${this.menuOffsetX}px`);\n setCssVariable(this.hostElement, `--offsetTop`, `${offsetTop}px`);\n }\n\n @Watch(\"visible\")\n private collectMenuItems() {\n this.menuItems = Array.from(\n getNestedChildrenOf(\n this.hostElement,\n \"eon-ui-context-menu-item\"\n ) as HTMLCollectionOf\n );\n\n isTouchDevice() && this.contextMenuFocus.emit();\n }\n\n @Watch(\"visible\")\n setFocus() {\n if (this.visible) {\n setTimeout(() => {\n this.menuContainer.focus();\n }, 50);\n } else {\n (this.hostElement.parentElement?.shadowRoot.firstChild as HTMLElement).focus();\n }\n }\n\n @Listen(\"contextMenuFocus\")\n OpenContextMenu() {\n this.visible = true;\n }\n\n private closeContextMenu(e) {\n const srcElement = e.srcElement as HTMLElement;\n\n if (\n srcElement?.tagName != \"EON-UI-CONTEXT-MENU\" &&\n !this.hostElement.contains(srcElement) &&\n this.hostElement.parentElement !== srcElement\n ) {\n isTouchDevice() && e.stopImmediatePropagation();\n this.visible = false;\n this.toggleMenuList();\n const openingItem = this.hostElement.parentElement.shadowRoot.querySelector('[aria-expanded=\"true\"]');\n if (openingItem) {\n openingItem.ariaExpanded = \"false\";\n }\n }\n\n if (this.collapseMenu) {\n this.menuItems.forEach((menuItem: HTMLEonUiContextMenuItemElement) => {\n menuItem.focusedItem = null;\n });\n }\n }\n\n private menuElementSelectionHandler() {\n let prevSelectedMenuItem: HTMLEonUiContextMenuItemElement;\n\n this.menuItems.forEach((menuItem: HTMLEonUiContextMenuItemElement) => {\n menuItem.size = this.size;\n if (menuItem.selectedItem) {\n this.selectedMenuItem = menuItem;\n this.focusOnMenuItems(this.selectedMenuItem);\n }\n menuItem.onclick = (event) => {\n prevSelectedMenuItem = this.selectedMenuItem;\n this.selectedMenuItem = event.target as HTMLEonUiContextMenuItemElement;\n\n if (prevSelectedMenuItem?.label !== this.selectedMenuItem.label) {\n prevSelectedMenuItem && (prevSelectedMenuItem.selectedItem = null);\n this.selectedMenuItem.selectedItem = true;\n this.focusOnMenuItems(this.selectedMenuItem);\n }\n\n this.visible = false;\n this.toggleMenuList();\n this.value = this.selectedMenuItem?.value;\n };\n });\n }\n\n private toggleMenuList() {\n this.collapseMenu = !this.collapseMenu;\n }\n\n private handleMenuKeyDown(e: KeyboardEvent) {\n let focusedMenuItemIndex: number;\n\n switch (e.key) {\n case KeyIds.SPACE:\n case KeyIds.ENTER:\n e.preventDefault();\n if (this.collapseMenu) {\n if (this.selectedMenuItem) {\n this.focusedMenuItem = this.selectedMenuItem;\n }\n this.toggleMenuList();\n } else {\n if (this.focusedMenuItem) {\n this.selectionOfMenuItems(this.focusedMenuItem);\n }\n this.closeContextMenu(e);\n }\n break;\n case KeyIds.DOWN:\n e.preventDefault();\n if (this.collapseMenu) {\n if (this.selectedMenuItem) {\n this.focusedMenuItem = this.selectedMenuItem;\n this.focusOnMenuItems(this.focusedMenuItem);\n }\n this.toggleMenuList();\n } else {\n focusedMenuItemIndex = this.menuItems.indexOf(this.focusedMenuItem);\n if (focusedMenuItemIndex === -1) {\n this.focusOnMenuItems(this.menuItems[0]);\n } else if (focusedMenuItemIndex < this.menuItems.length - 1) {\n this.focusOnMenuItems(this.menuItems[focusedMenuItemIndex + 1]);\n } else if (focusedMenuItemIndex === this.menuItems.length - 1) {\n this.focusOnMenuItems(this.menuItems[0]);\n }\n }\n break;\n case KeyIds.UP:\n e.preventDefault();\n if (this.collapseMenu) {\n if (this.selectedMenuItem) {\n this.focusedMenuItem = this.selectedMenuItem;\n this.focusOnMenuItems(this.focusedMenuItem);\n }\n this.toggleMenuList();\n } else {\n focusedMenuItemIndex = this.menuItems.indexOf(this.focusedMenuItem);\n if (focusedMenuItemIndex === -1) {\n this.focusOnMenuItems(this.menuItems[0]);\n } else if (focusedMenuItemIndex > 0) {\n this.focusOnMenuItems(this.menuItems[focusedMenuItemIndex - 1]);\n } else if (focusedMenuItemIndex === 0) {\n this.focusOnMenuItems(this.menuItems[this.menuItems.length - 1]);\n }\n }\n break;\n case KeyIds.ESCAPE:\n case KeyIds.TAB:\n this.visible = false;\n break;\n }\n }\n\n private focusOnMenuItems(item: HTMLEonUiContextMenuItemElement) {\n this.focusedMenuItem = item;\n this.menuItems.forEach((menuItem: HTMLEonUiContextMenuItemElement) => {\n menuItem.focusedItem = null;\n });\n this.focusedMenuItem.focusedItem = true;\n }\n\n private selectionOfMenuItems(item: HTMLEonUiContextMenuItemElement) {\n this.selectedMenuItem = item;\n this.menuItems.forEach((menuItem: HTMLEonUiContextMenuItemElement) => {\n menuItem.selectedItem = null;\n this.value = this.selectedMenuItem?.value;\n });\n this.selectedMenuItem.selectedItem = true;\n }\n\n @Watch(\"selectedMenuItem\")\n handleNewSelectedMenuItem() {\n this.contextMenuItemOnSelect.emit(this.selectedMenuItem);\n }\n\n private handleSelectionChange() {\n const newSelectedOption: HTMLEonUiContextMenuItemElement = this.menuItems.filter(\n (option) => option.value === this.select.value\n )[0];\n if (newSelectedOption) {\n this.menuItems.forEach((menuItem) => {\n menuItem.selectedItem = null;\n });\n newSelectedOption.selectedItem = true;\n this.selectedMenuItem = newSelectedOption;\n this.value = newSelectedOption.value;\n }\n if (this.selectedMenuItem.href) {\n window.location.href = this.selectedMenuItem.href;\n }\n }\n\n private setInitialMenuItem() {\n this.selectedMenuItem = this.menuItems?.[0];\n this.selectionOfMenuItems(this.selectedMenuItem);\n this.value = this.selectedMenuItem.value;\n }\n\n render() {\n const styleProp = this.containerHeight &&\n this.containerWidth && {\n style: {\n height: `${this.containerHeight}px`,\n width: `${this.containerWidth}px`\n }\n };\n return (\n \n {!isTouchDevice() && (\n this.handleMenuKeyDown(event)}\n ref={(el) => (this.menuContainer = el as HTMLElement)}\n >\n
\n (this.menuContainerHead = el as HTMLElement)}\n >\n \n {this.iconName && (\n \n )}\n
\n
    \n \n
\n \n
\n
\n
\n \n )}\n {isTouchDevice() && (\n \n (this.select = el as HTMLSelectElement)}\n onChange={() => this.handleSelectionChange()}\n onFocus={(event) => this.contextMenuFocus.emit(event)}\n onBlur={(event) => this.contextMenuBlur.emit(event)}\n name={this.value}\n >\n {this.selectItems.map((option) => (\n \n {option.innerText}\n \n ))}\n \n \n )}\n \n );\n }\n}\n"],"mappings":"gdAAA,MAAMA,EAAiB,q/gDACvB,MAAAC,EAAeD,E,MCwBFE,EAAW,M,8LAEtBC,KAAAC,aAA4EC,EAC5EF,KAAAG,UAAYC,EAIZJ,KAAAK,aAAyB,G,iBAGK,G,wGAe0B,G,oMAsDG,M,gEAgBK,Q,iBAKlC,E,+BAUEC,E,mBAKiC,K,CAEjE,iBAAAC,GACEP,KAAKQ,cACLR,KAAKS,mBACLT,KAAKU,gB,CAGP,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