UNPKG

tippy.vue

Version:

Nesting-free Vue components for Tippy.js - a drop-in addition with no structural or css changes required

1 lines 38.6 kB
{"version":3,"file":"index.esm.js","sources":["../src/TippyDirective.ts","../src/common.ts","../src/builtin.ts","../src/Tippy.ts","../src/TippySingleton.ts","../src/index.ts"],"sourcesContent":["import tippy, {Instance as TippyInstance, Props} from \"tippy.js\";\nimport {Directive, DirectiveBinding} from \"vue\";\n\nconst _mode = Symbol(\"v-tippy mode\")\ntype VTippyMode = 'inline' | 'target'\nconst _tippy = Symbol(\"v-tippy instance\")\n\ndeclare global {\n interface HTMLElement {\n [_mode]?: VTippyMode\n [_tippy]?: TippyInstance\n }\n}\n\nfunction createOptions(value: string | Partial<Props> | undefined): Partial<Props> {\n if(typeof value === 'string') {\n return {content: value}\n } else if(typeof value === 'undefined') {\n return {}\n } else {\n return value\n }\n}\n\nexport const TippyDirective: Directive<HTMLElement, string | Partial<Props> | undefined> = {\n mounted(el: HTMLElement, binding: DirectiveBinding<string | Partial<Props> | undefined>): void {\n if (binding.value === undefined) {\n el[_mode] = 'target'\n el.dataset.tippyTarget = binding.arg || \"\"\n } else {\n el[_mode] = 'inline'\n el[_tippy] = tippy(el, createOptions(binding.value))\n }\n },\n beforeUnmount(el: HTMLElement): void {\n if (el[_mode] === 'inline') {\n let tip = el[_tippy]\n tip && tip.destroy()\n } else {\n delete el.dataset.tippyTarget;\n }\n },\n updated(el: HTMLElement, binding: DirectiveBinding<string | Partial<Props> | undefined>): void {\n if (el[_mode] === 'inline') {\n let tip = el[_tippy]\n tip && tip.setProps(createOptions(binding.value))\n }\n }\n}\n","import tippy, {Instance as TippyInstance, LifecycleHooks, Props} from \"tippy.js\";\nimport {computed, Ref, ToRefs, toRefs, watch} from \"vue\";\nimport {ComponentPropsOptions, ExtractPropTypes, PropType, SetupContext} from \"@vue/runtime-core\";\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport const commonEmits = {\n mount: (instance: TippyInstance) => true,\n show: (instance: TippyInstance) => true,\n shown: (instance: TippyInstance) => true,\n hidden: (instance: TippyInstance) => true,\n hide: (instance: TippyInstance) => true,\n trigger: (instance: TippyInstance, event: Event) => true,\n untrigger: (instance: TippyInstance, event: Event) => true,\n}\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\nexport type Plugin<P extends ComponentPropsOptions = {}> = {\n props: P,\n setup?(props: Required<ToRefs<ExtractPropTypes<P>>> & Record<string, Ref<unknown>>, tip: Ref<TippyInstance | undefined>): void\n build?(props: Required<ToRefs<ExtractPropTypes<P>>> & Record<string, Ref<unknown>>, options: Partial<Props>): void\n}\n\n/**\n * Infers the plugin type to provide type hinting for the parameter\n */\nexport function inferPlugin<P extends ComponentPropsOptions>(plugin: Plugin<P>): Plugin<P> {\n return plugin\n}\n\n/**\n * Creates a plugin that exposes a Tippy.js option as a Vue prop\n * @param name The name of the Tippy.js option\n * @param type The type of the Vue property (e.g. `String`, `Boolean`, etc.)\n * @param def The default value, if any\n */\nexport function optionPlugin<T extends keyof Props>(name: T, type?: PropType<any>, def?: Props[T]): Plugin<Record<T, { type: PropType<Props[T]>, required: false }>> {\n return {\n props: {\n [name]: {\n type: type ? type : null,\n required: false,\n default: def,\n },\n } as Record<T, {type: PropType<Props[T]>, required: false, default: typeof def}>,\n build(props, options) {\n if (props[name].value !== undefined) {\n options[name] = props[name].value;\n }\n }\n }\n}\n\nexport function commonSetup<P extends Plugin[], E extends typeof commonEmits>(\n props: Record<string, unknown>,\n plugins: P,\n baseContext: SetupContext<E>,\n tip: Ref<TippyInstance | undefined>,\n hooks?: Partial<LifecycleHooks>,\n) {\n const context = baseContext as unknown as SetupContext<typeof commonEmits>\n\n let refs = toRefs(props)\n const tippyOptions = computed<Partial<Props>>(() => {\n const options: Partial<Props> = {}\n\n for (const plugin of plugins) {\n let buildFn = plugin.build\n if(buildFn) buildFn(refs, options)\n }\n\n options.onShow = joinCallbacks(instance => context.emit(\"show\", instance), hooks && hooks.onShow, options.onShow)\n options.onShown = joinCallbacks(instance => context.emit(\"shown\", instance), hooks && hooks.onShown, options.onShown)\n options.onHidden = joinCallbacks(instance => context.emit(\"hidden\", instance), hooks && hooks.onHidden, options.onHidden)\n options.onHide = joinCallbacks(instance => context.emit(\"hide\", instance), hooks && hooks.onHide, options.onHide)\n options.onMount = joinCallbacks(instance => context.emit(\"mount\", instance), hooks && hooks.onMount, options.onMount)\n options.onTrigger = joinCallbacks((instance, event) => context.emit(\"trigger\", instance, event), hooks && hooks.onTrigger, options.onTrigger)\n options.onUntrigger = joinCallbacks((instance, event) => context.emit(\"untrigger\", instance, event), hooks && hooks.onUntrigger, options.onUntrigger)\n\n return options;\n })\n\n for (const plugin of plugins) {\n let setupFn = plugin.setup\n if (setupFn) setupFn(refs, tip)\n }\n\n watch(tippyOptions, value => {\n if(tip.value)\n tip.value.setProps(value)\n }, {\n deep: true\n })\n\n return {\n tippyOptions\n }\n}\n\nfunction joinCallbacks<Args extends any[], Return>(\n ...callbacks: (((...args: Args) => Return) | undefined)[]\n): (...args: Args) => Return {\n return (...args: Args) => {\n let result\n for(let callback of callbacks) {\n if(callback)\n result = callback(...args)\n }\n return result as Return\n }\n}\n","import {watch} from \"vue\";\nimport {PropType} from \"@vue/runtime-core\";\nimport {CreateSingletonProps, Props} from \"tippy.js\";\nimport {Plugin, optionPlugin, inferPlugin} from \"./common\";\n\n\n/**\n * Extra options for tippy.js\n */\nexport const extra = inferPlugin({\n props: {\n extra: {\n type: Object as PropType<Partial<Props>>,\n required: false,\n },\n },\n build(props, options) {\n Object.assign(options, props.extra.value || {});\n }\n})\n\n/**\n * Whether the tooltip should be enabled\n */\nexport const enabled = inferPlugin({\n props: {\n enabled: {\n type: Boolean,\n required: false,\n default: true,\n }\n },\n\n setup(props, tip) {\n watch(props.enabled, value => {\n if (!tip.value) return;\n if (value) {\n tip.value.enable();\n } else {\n tip.value.hide();\n tip.value.disable();\n }\n })\n }\n})\n\n/**\n * Where to place the tooltip relative to the target element\n */\nexport const placement = optionPlugin(\"placement\", String, 'top')\n\n/**\n * Whether the tippy should be interactive. You don't need to specify a value for this property, its presence is\n * sufficient (e.g. `<tippy interactive>`).\n *\n * This is a shorthand for `interactive: true` in the `extra` property.\n */\nexport const interactive = optionPlugin(\"interactive\", Boolean)\n\n/**\n * Whether to hide the tooltip when the target element is clicked. Defaults to false when using the `'manual'`\n * trigger, otherwise defaults to true.\n */\nexport const hideOnClick = optionPlugin(\"hideOnClick\", Boolean)\n\n/**\n * Whether the tippy should *always* be appended to the `<body>`. You don't need to specify a value for this property,\n * its presence is sufficient (e.g. `<tippy on-body>`).\n *\n * Normally, tooltips will be appended to the document body element, *however*, interactive elements are appended\n * adjacent to their trigger, in the interest of maintaining keyboard focus order.\n * [more info](https://atomiks.github.io/tippyjs/v6/accessibility/#clipping-issues)\n *\n * This can cause zIndex issues, so sometimes it's necessary to put an interactive tooltip on the body element.\n *\n * This is a shorthand for `appendTo: () => document.body` in the `extra` property. (Note that you can't access\n * `document` directly in a vue template, so you would have to use a computed property if you wanted to set this in\n * `extra` yourself.\n */\nexport const onBody = inferPlugin({\n props: {\n onBody: {\n type: Boolean,\n required: false,\n },\n },\n\n build(props, options) {\n if (props.onBody.value === true) {\n options.appendTo = () => document.body;\n }\n }\n})\n\n/**\n * The events that trigger the tooltip. Setting the trigger key in `extra` will override this property.\n */\nexport const trigger = inferPlugin({\n props: {\n trigger: {\n type: String,\n required: false,\n },\n },\n build(props, options) {\n if (props.trigger.value) {\n options.trigger = props.trigger.value;\n if (props.trigger.value === 'manual' && options.hideOnClick === undefined) {\n options.hideOnClick = false;\n }\n }\n }\n})\n\nconst delayPattern = /^([0-9]+)$|^([0-9]+|-)\\s*,\\s*([0-9]+|-)$/\ntype DelayType = number | [number | null, number | null] | `${number}` | `${number | '-'},${number | '-'}`\n\nfunction parseDelay(input: DelayType): number | [number | null, number | null] | undefined {\n if (typeof input === \"string\") {\n let match = input.match(delayPattern)\n if (match) {\n if (match[1]) {\n return parseFloat(match[1])\n } else {\n return [\n match[2] === '-' ? null : parseFloat(match[2]),\n match[3] === '-' ? null : parseFloat(match[3])\n ]\n }\n } else {\n return undefined\n }\n } else {\n return input\n }\n}\n\n/**\n * The delay when showing or hiding the tooltip. One of four formats:\n * - A number (or number string) representing the delay in milliseconds\n * - A string consisting of two comma-separated elements representing the show and hide delays, each of which is\n * either a number or a '-'\n * - An array of two `number | null` elements\n */\nexport const delay = inferPlugin<{\n delay: {\n type: PropType<DelayType>;\n required: boolean;\n validator(value: unknown): boolean;\n }\n}>({\n props: {\n delay: {\n type: [String, Number, Array] as PropType<DelayType>,\n required: false,\n validator(value: unknown): boolean {\n return parseDelay(value as DelayType) !== undefined\n }\n }\n },\n build(props, options) {\n if (props.delay.value !== undefined) {\n options.delay = parseDelay(props.delay.value)\n }\n }\n})\n\n/**\n * Only used when using the manual trigger. To show/hide when using another trigger, use `tippy().show()` and\n * `tippy().hide()`\n */\nexport const visible = inferPlugin({\n props: {\n visible: {\n type: Boolean,\n required: false,\n },\n },\n setup(props, tip) {\n watch(props.visible, value => {\n if (!tip.value || (props.trigger && props.trigger.value !== 'manual')) return;\n if (value) {\n tip.value.show();\n } else {\n tip.value.hide();\n }\n })\n }\n})\n\n/**\n * Tippy.js options that should be overridden by the individual instances.\n */\nexport const overrides = inferPlugin({\n props: {\n overrides: {\n type: Array as PropType<Array<keyof Props>>,\n required: false,\n },\n },\n build(props, options) {\n const sOptions = options as Partial<CreateSingletonProps>\n sOptions.overrides = (sOptions.overrides || []).concat(props.overrides.value || [])\n }\n})\n\n/**\n * The CSS transition to use when moving between instances within the singleton\n */\nexport const moveTransition = optionPlugin(\"moveTransition\", String)\n","import {ComputedRef, defineComponent, h, nextTick, Ref, ref} from \"vue\";\nimport {PropType} from \"@vue/runtime-core\";\nimport {commonEmits, commonSetup, Plugin} from \"./common\";\nimport tippy, {Instance as TippyInstance, Props as TippyProps} from \"tippy.js\";\nimport {VueSingleton} from \"./TippySingleton\";\nimport {\n delay,\n enabled,\n extra,\n hideOnClick,\n interactive,\n onBody,\n placement,\n trigger,\n visible\n} from \"./builtin\";\nimport {DefineComponent, ExtractPluginProps} from \"./types\";\n\nexport const defaultTippyProps = [\n visible,\n\n enabled,\n placement,\n onBody,\n interactive,\n trigger,\n hideOnClick,\n delay,\n extra,\n]\n\nconst baseProps = {\n /**\n * The v-tippy target name. Defaults to `\"\"` (the default name used by `v-tippy`)\n */\n target: {\n type: String as PropType<string | '_parent'>,\n required: false,\n default: \"\"\n },\n\n /**\n * Whether to perform a deep search for targets (using querySelector) or to only search for direct siblings.\n */\n deepSearch: {\n type: Boolean,\n required: false,\n default: false\n },\n\n singleton: {\n type: String as PropType<boolean | string | '' | null>,\n required: false,\n default: null,\n },\n\n /**\n * Whether to eagerly render the content or only render when the tooltip is visible\n */\n eager: {\n type: Boolean,\n required: false,\n default: false\n },\n}\n\nexport type TippyComponentType<Plugins extends Plugin[] = [], DefaultPlugins extends Plugin[] = typeof defaultTippyProps> = DefineComponent<//\n /* Props = */ typeof baseProps & ExtractPluginProps<Plugins[number] | DefaultPlugins[number]>,\n /* Emits = */ typeof commonEmits & { attach: (instance: TippyInstance) => true },\n /* Data = */ { tip: Ref<TippyInstance | undefined>, tippyOptions: ComputedRef<Partial<TippyProps>> },\n /* Methods = */ { attach(): void }>;\n\nexport function createTippyComponent<P extends Plugin[]>(...plugins: P): TippyComponentType<P> {\n let pluginProps = {}\n for (const plugin of plugins) {\n Object.assign(pluginProps, plugin.props)\n }\n\n return defineComponent({\n props: {\n ...baseProps,\n ...pluginProps\n },\n /* eslint-disable @typescript-eslint/no-unused-vars */\n emits: {\n attach: (instance: TippyInstance) => true,\n ...commonEmits\n },\n /* eslint-enable @typescript-eslint/no-unused-vars */\n render() {\n return h('div', {\n 'tippy-missing-target': this.tippyTargetMissing ? '' : undefined,\n }, (this.$props.eager || this.singletonInstance || this.shouldRenderContent) && this.$slots.default ? this.$slots.default() : [])\n },\n setup(props, context) {\n const tip = ref<TippyInstance>()\n const singletonInstance = ref<VueSingleton>()\n const tippyTargetMissing = ref<boolean>(false)\n const shouldRenderContent = ref<boolean>(false)\n\n const { tippyOptions } = commonSetup(props, plugins, context, tip, {\n onShow() {\n shouldRenderContent.value = true\n },\n onHidden() {\n shouldRenderContent.value = false\n }\n })\n\n return {\n tip,\n tippyOptions,\n singletonInstance,\n tippyTargetMissing,\n shouldRenderContent,\n }\n },\n methods: {\n attach() {\n // destroy old tip\n if (this.tip) {\n const tip = this.tip\n this.tip = undefined\n if(this.singletonInstance) {\n this.singletonInstance.remove(tip)\n this.singletonInstance = undefined\n }\n tip.destroy();\n }\n\n // find the target\n let target: Element | null\n if(this.target === '_parent') {\n target = this.$el.parentElement\n } else if (this.deepSearch) {\n target = this.$el.parentElement.querySelector(`[data-tippy-target=\"${this.target}\"]`);\n } else {\n const targetValue = this.target\n target = findElement(this.$el, {\n test(el): boolean {\n let a = el as any\n return a && a.dataset && a.dataset.tippyTarget === targetValue\n }\n })\n }\n this.tippyTargetMissing = !target\n if (!target) {\n throw new Error(`Unable to find tippy target named '${this.target}'`)\n }\n\n // find the singleton\n if (this.singleton != null) {\n const targetValue = this.singleton\n const singletonElement = findElement(this.$el, {\n test(el): boolean {\n let a = el as any\n return a && a.dataset && a.dataset.tippySingleton === targetValue\n },\n recurse: true\n })\n this.singletonInstance = singletonElement ? singletonElement._tippySingleton : undefined;\n } else {\n this.singletonInstance = undefined\n }\n\n // create and bind tip\n this.tip = tippy(target, this.tippyOptions);\n if (!this.tip) {\n throw new Error(`Unable to create tippy instance`)\n }\n this.tip.setContent(this.$el)\n this.singletonInstance && this.singletonInstance.add(this.tip)\n\n if((this as any).enabled === false) {\n this.tip.disable();\n }\n if ((this as any).trigger === 'manual' && (this as any).visible === true) {\n this.tip.show();\n }\n\n this.$emit(\"attach\", this.tip);\n }\n },\n async mounted() {\n await nextTick()\n this.attach()\n },\n beforeUnmount() {\n this.tip && this.tip.destroy()\n },\n }) as unknown as TippyComponentType<P>\n}\n\ntype StandardSearch = {\n /**\n * Tests if an element matches\n */\n test(element: Element): boolean,\n /**\n * Whether to recurse up through the element's parents.\n */\n recurse?: boolean,\n /**\n * Whether to test the starting element. When recursing this also controls whether to test the element's direct\n * parents.\n */\n selftest?: boolean\n}\n\n/**\n * @param start the element to start at. will not test the starting element or any of its parents\n * @param search the search parameters to use\n */\nfunction findElement(start: any, search: StandardSearch): Element | null {\n let found: Element | null = null\n let current = start\n do {\n found = findSibling(current, search.test, search.selftest === undefined ? false : search.selftest)\n current = current.parentElement\n } while(search.recurse && current && !found)\n return found\n}\n\nfunction findSibling(element: Element, test: (element: Element) => boolean, testSelf: boolean): Element | null {\n if(testSelf && test(element)) {\n return element\n }\n for(let sibling = element.previousElementSibling; sibling; sibling = sibling.previousElementSibling) {\n if (test(sibling))\n return sibling;\n }\n for(let sibling = element.nextElementSibling; sibling; sibling = sibling.nextElementSibling) {\n if (test(sibling))\n return sibling;\n }\n return null;\n}\n","import {defineComponent, h, Ref, ref} from \"vue\";\nimport {PropType} from \"@vue/runtime-core\";\nimport {commonEmits, commonSetup, Plugin} from \"./common\";\nimport {createSingleton, CreateSingletonInstance, Instance as TippyInstance} from \"tippy.js\";\nimport {\n delay,\n enabled, extra,\n hideOnClick,\n interactive,\n moveTransition,\n onBody,\n overrides,\n placement,\n trigger\n} from \"./builtin\";\nimport {DefineComponent, ExtractPluginProps} from \"./types\";\n\nexport type VueSingleton = {\n add(instance: TippyInstance): void,\n remove(instance: TippyInstance): void\n}\n\ndeclare global {\n interface Element {\n _tippySingleton?: VueSingleton\n }\n}\n\nexport const defaultTippySingletonProps = [\n overrides,\n moveTransition,\n\n enabled,\n placement,\n onBody,\n interactive,\n trigger,\n hideOnClick,\n delay,\n extra,\n]\n\nconst baseProps = {\n /**\n * The singleton name. Defaults to `\"\"` (the default name used by `<tippy singleton>`)\n */\n name: {\n type: String as PropType<string>,\n required: false,\n default: \"\"\n },\n}\n\nexport type TippySingletonComponentType<Plugins extends Plugin[] = [], DefaultPlugins extends Plugin[] = typeof defaultTippySingletonProps> = DefineComponent<//\n /* Props = */ typeof baseProps & ExtractPluginProps<Plugins[number] | DefaultPlugins[number]>,\n /* Emits = */ typeof commonEmits & { add: (instance: TippyInstance) => true, remove: (instance: TippyInstance) => true },\n /* Data = */ { instances: Ref<TippyInstance[]>, singleton: Ref<CreateSingletonInstance> },\n /* Methods = */ { add(instance: TippyInstance): void, remove(instance: TippyInstance): void }>;\n\nexport function createTippySingletonComponent<P extends Plugin[]>(...plugins: P): TippySingletonComponentType<P> {\n let pluginProps = {}\n for (const plugin of plugins) {\n Object.assign(pluginProps, plugin.props)\n }\n\n return defineComponent({\n props: {\n ...baseProps,\n ...pluginProps\n },\n /* eslint-disable @typescript-eslint/no-unused-vars */\n emits: {\n add: (instance: TippyInstance) => true,\n remove: (instance: TippyInstance) => true,\n ...commonEmits\n },\n /* eslint-enable @typescript-eslint/no-unused-vars */\n render() {\n return h('div', {\n 'style': 'display: none;',\n 'data-tippy-singleton': this.name\n }, [])\n },\n setup(props, context) {\n const singleton = ref<CreateSingletonInstance>()\n const {tippyOptions} = commonSetup(props, plugins, context, singleton)\n\n const instances = ref<TippyInstance[]>([])\n\n return {\n tippyOptions,\n instances,\n singleton,\n }\n },\n mounted() {\n this.$el._tippySingleton = this\n this.singleton = createSingleton(this.instances as TippyInstance[], this.tippyOptions)\n if ((this as any).enabled === false) {\n this.singleton.disable();\n }\n },\n beforeUnmount() {\n this.singleton && this.singleton.destroy()\n },\n methods: {\n remove(instance: TippyInstance) {\n const index = this.instances.indexOf(instance)\n if (index === -1) {\n return\n }\n this.instances.splice(index, 1)\n this.$emit('remove', instance)\n this.singleton && this.singleton.setInstances(this.instances as TippyInstance[])\n },\n\n add(instance: TippyInstance) {\n if (this.instances.indexOf(instance) !== -1) {\n return\n }\n this.instances.push(instance)\n this.$emit('add', instance)\n this.singleton && this.singleton.setInstances(this.instances as TippyInstance[])\n }\n }\n }) as unknown as TippySingletonComponentType<P>\n}\n","import {App, Plugin as VuePlugin} from \"vue\";\nimport tippy, {DefaultProps} from \"tippy.js\";\nimport {TippyDirective} from \"./TippyDirective\";\nimport {createTippyComponent, defaultTippyProps, TippyComponentType} from \"./Tippy\";\nimport {createTippySingletonComponent, defaultTippySingletonProps, TippySingletonComponentType} from \"./TippySingleton\";\nimport {Plugin} from \"./common\";\n\nexport function install(app: App, options?: {\n tippyDefaults?: Partial<DefaultProps>,\n tippyProps?: Plugin[],\n tippySingletonProps?: Plugin[],\n}) {\n if (options && options.tippyDefaults) {\n tippy.setDefaultProps(options.tippyDefaults)\n }\n app.directive('tippy', TippyDirective)\n app.component(\n 'tippy',\n createTippyComponent(...(options && options.tippyProps || defaultTippyProps))\n )\n app.component(\n 'tippy-singleton',\n createTippySingletonComponent(...(options && options.tippySingletonProps || defaultTippySingletonProps))\n )\n}\n\nexport const TippyPlugin: VuePlugin = {\n install\n}\nexport const Tippy = createTippyComponent(...defaultTippyProps)\nexport const TippySingleton = createTippySingletonComponent(...defaultTippySingletonProps)\n\nexport type {Plugin, TippyComponentType, TippySingletonComponentType};\nexport {inferPlugin, optionPlugin} from './common'\nexport {TippyDirective} from \"./TippyDirective\";\nexport {createTippyComponent, defaultTippyProps} from \"./Tippy\";\nexport {createTippySingletonComponent, defaultTippySingletonProps} from \"./TippySingleton\";\nexport * as props from \"./builtin\";\n"],"names":["baseProps"],"mappings":";;;AAGA,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;AAEpC,MAAM,MAAM,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;AASzC,SAAS,aAAa,CAAC,KAA0C;IAC/D,IAAG,OAAO,KAAK,KAAK,QAAQ,EAAE;QAC5B,OAAO,EAAC,OAAO,EAAE,KAAK,EAAC,CAAA;KACxB;SAAM,IAAG,OAAO,KAAK,KAAK,WAAW,EAAE;QACtC,OAAO,EAAE,CAAA;KACV;SAAM;QACL,OAAO,KAAK,CAAA;KACb;AACH,CAAC;MAEY,cAAc,GAAgE;IACzF,OAAO,CAAC,EAAe,EAAE,OAA8D;Q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