{
  "version": 3,
  "sources": ["../../src/document/stores/FramerFontStore.ts", "../../src/utils/setOverlayAndDescendantVisibility.ts", "../../src/renderer/ShaderNodeRenderer.tsx", "../../src/web/components/darkThemeClassName.ts", "../../src/renderer/useShaderModuleState.ts"],
  "sourcesContent": ["import { FRAMER_BUILTIN_FONTS, INTER_FONTS } from \"document/utils/interFonts.ts\"\nimport { fontStore } from \"library/render/fonts/fontStore.ts\"\n\nexport class FramerFontStore {\n\tconstructor() {\n\t\tthis.importFonts()\n\t}\n\n\tprivate importFonts() {\n\t\treturn fontStore.importFramerFonts(FRAMER_BUILTIN_FONTS)\n\t}\n\n\tpublic testing = {\n\t\tloadInterFonts() {\n\t\t\t// @TODO Should this include inter display?\n\t\t\treturn fontStore.loadFonts(INTER_FONTS.map(font => font.selector))\n\t\t},\n\t}\n}\n", "import type { CanvasNode, CanvasTree } from \"document/models/CanvasTree/index.ts\"\nimport { isRootNode } from \"document/models/CanvasTree/nodes/utils/nodeCheck.ts\"\n\n/**\n * Toggling overlay edit mode does not involve an actual tree/node change, so\n * our normal tree cache update (e.g. updateTreeCacheForVekter) might not be\n * called, or would just early return at the ground node since no props have\n * changed. Therefore, we manually set cache.overlayVisible, which will be used\n * to determine if the overlayNode should be visible in future cache updates.\n */\nexport function setOverlayAndDescendantVisibility(tree: CanvasTree, overlayNode: CanvasNode, visible: boolean) {\n\toverlayNode.cache.overlayVisible = visible\n\n\tlet parent = tree.get(overlayNode.parentid)\n\n\t// If the OverlayNode was just created, its cache might not be updated yet. Prematurely updating the cached props we\n\t// need for future calculations.\n\toverlayNode.cache.masterAncestorId = overlayNode.cache.masterAncestorId ?? parent?.cache.masterAncestorId\n\toverlayNode.cache.replicaAncestorId = overlayNode.cache.replicaAncestorId ?? parent?.cache.replicaAncestorId\n\n\twhile (parent && !isRootNode(parent)) {\n\t\t// When updating the tree cache, we compare the new value with the ones in\n\t\t// the node cache. If nothing has changed, we stop walking downstream. Since\n\t\t// there's no change for the ancestors when toggling overlay edit mode, we\n\t\t// reset all ancestors' node cache manually so that updateTreeCacheFor...\n\t\t// will reach the overlay node to update its cache.\n\t\tparent.cache.lastUpdate = -1\n\t\tparent = tree.get(parent.parentid)\n\t}\n}\n", "import { createAbsoluteImageAssetURL, parseAssetReference } from \"@framerjs/assets\"\nimport type { AnyComponentLoader, VerifiedPropertyControls } from \"@framerjs/framer-runtime\"\nimport { RenderPlaceholder } from \"@framerjs/framer-runtime/components/RenderPlaceholder\"\nimport { useExperimentIsOn } from \"app/experiments.ts\"\nimport type { CanvasTree } from \"document/models/CanvasTree/index.ts\"\nimport type ShaderNode from \"document/models/CanvasTree/nodes/ShaderNode.ts\"\nimport { iterateShaderUniforms } from \"document/models/CanvasTree/nodes/utils/shaderUniforms.ts\"\nimport type { CombinedVariableProviderValueMap } from \"document/models/CanvasTree/traits/VariableProvider.ts\"\nimport { withShaderMouse } from \"document/models/CanvasTree/traits/WithShaderMouse.ts\"\nimport { findTokenNode } from \"document/models/CanvasTree/utils/findTokenNode.ts\"\nimport {\n\tfallbackValueFromCSSVariable,\n\tisTokenCSSVariable,\n\ttokenIdFromCSSVariable,\n} from \"document/models/CanvasTree/utils/tokens.ts\"\nimport { type ShaderMouseDefault, isShaderUniformControl } from \"library/modules/defineShader.ts\"\nimport { FrameWithMotion } from \"library/render/presentation/Frame/FrameWithMotion.tsx\"\nimport { Shader } from \"library/render/presentation/Shader/Shader.tsx\"\nimport type { UniformName } from \"library/render/presentation/Shader/WebGL2ShaderRenderer.ts\"\nimport type { ResolvedShaderMouseConfig, ShaderUniformInput } from \"library/render/presentation/Shader/types.ts\"\nimport { P3Color } from \"library/render/types/Color/Color.ts\"\nimport { ControlType } from \"library/render/types/PropertyControls.ts\"\nimport { RenderTarget } from \"library/render/types/RenderEnvironment.ts\"\nimport type { Locale } from \"library/router/types.ts\"\nimport { useMemo } from \"react\"\nimport { useDarkAppearance } from \"web/components/darkThemeClassName.ts\"\nimport { useModulesRuntime } from \"../utils/ModulesRuntimeContext.ts\"\nimport { getAssetResolverWithHash } from \"./getAssetResolver.ts\"\nimport { useShaderModuleState } from \"./useShaderModuleState.ts\"\n\ninterface ShaderNodeRendererProps {\n\tnode: ShaderNode\n\tcomponentLoader: AnyComponentLoader\n\tcombinedValueMap?: CombinedVariableProviderValueMap\n\tactiveLocale?: Locale\n\tisMultiSelected?: boolean\n\tisPreviewActive?: boolean\n\tstyle?: React.CSSProperties\n\twidth?: number | string\n\theight?: number | string\n\t[key: string]: unknown\n}\n\n/**\n * Pool-based rendering: the <Shader> component registers with the ShaderPool\n * via context. The pool decides which shaders get WebGL contexts (up to a limit),\n * which animate (selected), and which show fallback images (overflow).\n */\nexport function ShaderNodeRenderer({\n\tnode,\n\tcomponentLoader,\n\tcombinedValueMap,\n\tactiveLocale,\n\tisMultiSelected,\n\tisPreviewActive,\n\t...props\n}: ShaderNodeRendererProps) {\n\tconst isExporting = RenderTarget.current() === RenderTarget.export\n\tconst isDarkMode = useDarkAppearance()\n\tconst modulesRuntime = useModulesRuntime()\n\tconst { moduleState, onShaderError } = useShaderModuleState(modulesRuntime, node.shaderModuleIdentifier)\n\n\tconst fallbackUrl = useMemo(() => {\n\t\tif (!node.shaderFallbackImage) return undefined\n\t\tconst parsed = parseAssetReference(node.shaderFallbackImage)\n\t\tif (!parsed) return undefined\n\t\treturn createAbsoluteImageAssetURL(parsed.identifier)\n\t}, [node.shaderFallbackImage])\n\n\tconst isExperimentOn = useExperimentIsOn(\"shaders\")\n\n\tif (!isExperimentOn) return null\n\n\tif (moduleState.status === \"loading\") {\n\t\treturn (\n\t\t\t<FrameWithMotion {...props} background={null}>\n\t\t\t\t<RenderPlaceholder />\n\t\t\t</FrameWithMotion>\n\t\t)\n\t}\n\n\tif (moduleState.status === \"error\") {\n\t\treturn (\n\t\t\t<FrameWithMotion {...props} background={null}>\n\t\t\t\t<RenderPlaceholder error={moduleState.error} />\n\t\t\t</FrameWithMotion>\n\t\t)\n\t}\n\n\t// Module loaded \u2014 always compute live props. The pool decides rendering.\n\tconst shaderDefinition = componentLoader.shaderForIdentifier(node.shaderModuleIdentifier ?? \"\")\n\tconst propertyControls = shaderDefinition?.properties ?? {}\n\n\tconst assetResolverWithHash = getAssetResolverWithHash()\n\tconst rawResolvedControlProps = node.getResolvedControlPropValues(\n\t\tcomponentLoader,\n\t\tassetResolverWithHash,\n\t\tcombinedValueMap,\n\t\tactiveLocale,\n\t)\n\tconst tree = node.tree?.()\n\tconst resolvedControlProps = tree\n\t\t? resolveShaderTokenColors(rawResolvedControlProps, propertyControls, tree, isDarkMode)\n\t\t: rawResolvedControlProps\n\n\tlet uniforms: Record<UniformName, ShaderUniformInput> | undefined\n\tfor (const { name, uniform } of iterateShaderUniforms(propertyControls, resolvedControlProps)) {\n\t\tif (!uniforms) uniforms = {}\n\t\tuniforms[name] = uniform\n\t}\n\n\tconst mouseConfig = moduleState.mouse ? resolveMouseConfig(node, moduleState.mouse) : undefined\n\n\treturn (\n\t\t<Shader\n\t\t\t{...props}\n\t\t\tpoolId={node.id}\n\t\t\tisSelected={node.cache.selected}\n\t\t\tisMultiSelected={isMultiSelected}\n\t\t\tisPreviewActive={isPreviewActive}\n\t\t\tfallbackImage={fallbackUrl}\n\t\t\tfragmentShader={moduleState.fragmentShader}\n\t\t\tvertexShader={moduleState.vertexShader}\n\t\t\tuniforms={uniforms}\n\t\t\tmode={isExporting ? \"instant\" : undefined}\n\t\t\tanimated={isExporting ? false : moduleState.animated}\n\t\t\tresolutionScale={isExporting ? undefined : moduleState.resolutionScale}\n\t\t\theightmapSource={moduleState.heightmapSource}\n\t\t\tmouse={mouseConfig}\n\t\t\tbuffers={moduleState.buffers}\n\t\t\tonError={onShaderError}\n\t\t\tplaceholder={<RenderPlaceholder />}\n\t\t/>\n\t)\n}\n\n/** Resolves module defaults + per-instance overrides into a single config for the Shader component. */\nfunction resolveMouseConfig(node: ShaderNode, mouse: ShaderMouseDefault): ResolvedShaderMouseConfig | undefined {\n\tif (!withShaderMouse(node)) return undefined\n\n\tconst enabled = node.shaderMouseEnabled ?? mouse === \"enabledByDefault\"\n\n\treturn { enabled, springOptions: node.shaderMouseSpringOptions }\n}\n\n/**\n * Resolves a token color for shader use, respecting dark mode.\n * If the resolved value is P3, converts it to sRGB since shaders only work with sRGB.\n */\nfunction resolveShaderTokenColor(tree: CanvasTree, tokenValue: string, isDarkMode: boolean): string | null {\n\tconst tokenId = tokenIdFromCSSVariable(tokenValue)\n\tconst token = tokenId ? findTokenNode(tokenId, tree) : null\n\tif (!token) return fallbackValueFromCSSVariable(tokenValue)\n\tconst resolved = token.colorForMode(isDarkMode)\n\tif (!resolved) return fallbackValueFromCSSVariable(tokenValue)\n\treturn P3Color.srgbFromValue(resolved)\n}\n\n/**\n * Resolves token CSS variables in shader control prop values to their actual\n * color strings. On the canvas, tokens are looked up from the tree directly\n * (same pattern as getResolvedColor / resolveTokenColor). This avoids passing\n * unresolved var(--token-...) strings to the shader runtime.\n */\nexport function resolveShaderTokenColors(\n\tresolvedProps: Record<string, unknown>,\n\tpropertyControls: VerifiedPropertyControls,\n\ttree: CanvasTree,\n\tisDarkMode: boolean,\n): Record<string, unknown> {\n\tlet result: Record<string, unknown> | undefined\n\tfor (const key in propertyControls) {\n\t\tconst control = propertyControls[key]\n\t\tif (!control || !isShaderUniformControl(control)) continue\n\n\t\tconst value = resolvedProps[key]\n\t\tif (control.type === ControlType.Color && isTokenCSSVariable(value)) {\n\t\t\tconst resolved = resolveShaderTokenColor(tree, value, isDarkMode)\n\t\t\tif (resolved) {\n\t\t\t\tresult ??= { ...resolvedProps }\n\t\t\t\tresult[key] = resolved\n\t\t\t}\n\t\t} else if (\n\t\t\tcontrol.type === ControlType.Array &&\n\t\t\tcontrol.control?.type === ControlType.Color &&\n\t\t\tArray.isArray(value)\n\t\t) {\n\t\t\tlet arrayResult: string[] | undefined\n\t\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\t\tif (isTokenCSSVariable(value[i])) {\n\t\t\t\t\tconst resolved = resolveShaderTokenColor(tree, value[i], isDarkMode)\n\t\t\t\t\tif (resolved) {\n\t\t\t\t\t\tarrayResult ??= [...value]\n\t\t\t\t\t\tarrayResult[i] = resolved\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (arrayResult) {\n\t\t\t\tresult ??= { ...resolvedProps }\n\t\t\t\tresult[key] = arrayResult\n\t\t\t}\n\t\t}\n\t}\n\treturn result ?? resolvedProps\n}\n", "import { useSyncExternalStore } from \"react\"\n\n/**\n * This function allows determining the active color-theme without requiring\n * either:\n * 1. having access to the engine\n * 2. relying on a hook into a React context\n *\n * This is required to allow `Menu` to be presented in the right color-theme\n * without configuring it in either of these ways every time. Menu instances\n * don't rerender when the color theme changes, so its safe to grab the value\n * once at the moment the menu is presented, and not react to changes.\n *\n * You probably shouldn't use this function for any other scenario.\n */\nfunction getIsDocumentDarkMode() {\n\treturn document.body.dataset.framerTheme === \"dark\"\n}\n\nfunction subscribeToDarkAppearance(callback: () => void) {\n\tconst observer = new MutationObserver(callback)\n\tobserver.observe(document.body, { attributes: true, attributeFilter: [\"data-framer-theme\"] })\n\treturn () => observer.disconnect()\n}\n\n/**\n * Reactively tracks the document's dark appearance via the `data-framer-theme`\n * body attribute. Works in both the main frame and the canvas sandbox without\n * requiring access to an engine or a React context.\n */\nexport function useDarkAppearance(): boolean {\n\treturn useSyncExternalStore(subscribeToDarkAppearance, getIsDocumentDarkMode)\n}\n", "import type { LocalModuleExportIdentifierString, ModuleExportIdentifierString } from \"@framerjs/shared\"\nimport { getLogger, isExternalModuleIdentifier, isLocalModuleIdentifier, parseModuleIdentifier } from \"@framerjs/shared\"\nimport { type ResolvedShaderConfig, isShaderConfig } from \"library/modules/defineShader.ts\"\nimport { useCallback, useEffect, useState } from \"react\"\nimport type { ModulesRuntime } from \"../modulesRuntime/ModulesRuntime.ts\"\nimport type { ModuleEvaluationResult } from \"../modulesRuntime/types.ts\"\n\nconst log = getLogger(\"useShaderModuleState\")\n\ninterface ShaderError {\n\ttitle: string\n\tmessage: string\n}\n\ntype ShaderModuleState =\n\t| {\n\t\t\tstatus: \"loading\"\n\t\t\tvertexShader?: undefined\n\t\t\tfragmentShader?: undefined\n\t\t\tpropertyControls?: undefined\n\t\t\terror?: undefined\n\t  }\n\t| {\n\t\t\tstatus: \"error\"\n\t\t\tvertexShader?: undefined\n\t\t\tfragmentShader?: undefined\n\t\t\tpropertyControls?: undefined\n\t\t\terror: ShaderError\n\t  }\n\t| {\n\t\t\tstatus: \"success\"\n\t\t\tvertexShader: ResolvedShaderConfig[\"vertex\"]\n\t\t\tfragmentShader: ResolvedShaderConfig[\"fragment\"]\n\t\t\tpropertyControls: ResolvedShaderConfig[\"propertyControls\"]\n\t\t\tresolutionScale: ResolvedShaderConfig[\"resolutionScale\"]\n\t\t\theightmapSource: ResolvedShaderConfig[\"heightmapSource\"]\n\t\t\tanimated: ResolvedShaderConfig[\"animated\"]\n\t\t\tmouse: ResolvedShaderConfig[\"mouse\"]\n\t\t\tbuffers: ResolvedShaderConfig[\"buffers\"]\n\t\t\terror?: undefined\n\t  }\n\ninterface ShaderModuleStateResult {\n\tmoduleState: ShaderModuleState\n\tonShaderError: (error: Error) => void\n}\n\nfunction extractShaderState(exports: ModuleEvaluationResult | undefined): ShaderModuleState {\n\tif (exports === undefined) {\n\t\treturn { status: \"loading\" }\n\t}\n\n\tif (exports instanceof Error) {\n\t\treturn {\n\t\t\tstatus: \"error\",\n\t\t\terror: {\n\t\t\t\ttitle: \"Module Error\",\n\t\t\t\tmessage: exports.message,\n\t\t\t},\n\t\t}\n\t}\n\n\tconst shaderConfig = exports[\"default\"]\n\n\tif (!isShaderConfig(shaderConfig)) {\n\t\treturn {\n\t\t\tstatus: \"error\",\n\t\t\terror: {\n\t\t\t\ttitle: \"Invalid Shader Configuration\",\n\t\t\t\tmessage: \"Module does not provide a valid shader configuration\",\n\t\t\t},\n\t\t}\n\t}\n\n\treturn {\n\t\tstatus: \"success\",\n\t\tvertexShader: shaderConfig.vertex,\n\t\tfragmentShader: shaderConfig.fragment,\n\t\tpropertyControls: shaderConfig.propertyControls,\n\t\tresolutionScale: shaderConfig.resolutionScale,\n\t\theightmapSource: shaderConfig.heightmapSource,\n\t\tanimated: shaderConfig.animated,\n\t\tmouse: shaderConfig.mouse,\n\t\tbuffers: shaderConfig.buffers,\n\t}\n}\n\nfunction extractShaderStateFromDefinition(\n\tmodulesRuntime: ModulesRuntime,\n\tmoduleIdentifier: ModuleExportIdentifierString,\n): ShaderModuleState {\n\tconst shaderDefinition = modulesRuntime.componentLoader.shaderForIdentifier(moduleIdentifier)\n\tif (!shaderDefinition) {\n\t\treturn { status: \"loading\" }\n\t}\n\n\t// The actual shader config is stored in definition.class\n\tconst shaderConfig = shaderDefinition.class\n\tif (!isShaderConfig(shaderConfig)) {\n\t\treturn {\n\t\t\tstatus: \"error\",\n\t\t\terror: {\n\t\t\t\ttitle: \"Invalid Shader Configuration\",\n\t\t\t\tmessage: \"Module does not provide a valid shader configuration\",\n\t\t\t},\n\t\t}\n\t}\n\n\treturn {\n\t\tstatus: \"success\",\n\t\tvertexShader: shaderConfig.vertex,\n\t\tfragmentShader: shaderConfig.fragment,\n\t\tpropertyControls: shaderConfig.propertyControls,\n\t\tresolutionScale: shaderConfig.resolutionScale,\n\t\theightmapSource: shaderConfig.heightmapSource,\n\t\tanimated: shaderConfig.animated,\n\t\tmouse: shaderConfig.mouse,\n\t\tbuffers: shaderConfig.buffers,\n\t}\n}\n\nfunction getInitialShaderState(\n\tmodulesRuntime: ModulesRuntime,\n\tmoduleIdentifier: ModuleExportIdentifierString | undefined,\n): ShaderModuleState {\n\tif (!moduleIdentifier) {\n\t\treturn { status: \"loading\" }\n\t}\n\n\tconst parsed = parseModuleIdentifier(moduleIdentifier)\n\n\tif (isLocalModuleIdentifier(parsed)) {\n\t\tconst moduleId = moduleIdentifier as LocalModuleExportIdentifierString\n\t\tconst initialExports = modulesRuntime.getLocalModuleExports(moduleId)\n\t\treturn extractShaderState(initialExports)\n\t}\n\n\tif (isExternalModuleIdentifier(parsed)) {\n\t\treturn extractShaderStateFromDefinition(modulesRuntime, moduleIdentifier)\n\t}\n\n\treturn {\n\t\tstatus: \"error\",\n\t\terror: {\n\t\t\ttitle: \"Invalid Module\",\n\t\t\tmessage: \"Invalid shader module identifier\",\n\t\t},\n\t}\n}\n\n/**\n * Hook for loading shader code from a module.\n *\n * @param modulesRuntime - The modules runtime instance\n * @param moduleIdentifier - The module identifier (e.g., \"local-module:shader/MyShader:default\" or external module identifier)\n * @returns ShaderModuleStateResult with state and error handler\n */\nexport function useShaderModuleState(\n\tmodulesRuntime: ModulesRuntime,\n\tmoduleIdentifier: ModuleExportIdentifierString | undefined,\n): ShaderModuleStateResult {\n\tconst [moduleState, setModuleState] = useState<ShaderModuleState>(() =>\n\t\tgetInitialShaderState(modulesRuntime, moduleIdentifier),\n\t)\n\tconst [compilationError, setCompilationError] = useState<ShaderError | null>(null)\n\n\tconst onShaderError = useCallback((error: Error) => {\n\t\tlog.error(\"Shader compilation failed:\", error.message)\n\t\tsetCompilationError({\n\t\t\ttitle: \"Shader Error\",\n\t\t\tmessage: error.message,\n\t\t})\n\t}, [])\n\n\tuseEffect(() => {\n\t\tif (!moduleIdentifier) {\n\t\t\tsetModuleState({ status: \"loading\" })\n\t\t\treturn\n\t\t}\n\n\t\tconst parsed = parseModuleIdentifier(moduleIdentifier)\n\n\t\tif (isLocalModuleIdentifier(parsed)) {\n\t\t\tconst moduleId = moduleIdentifier as LocalModuleExportIdentifierString\n\n\t\t\t// Reset state if module identifier changed\n\t\t\tsetModuleState(getInitialShaderState(modulesRuntime, moduleIdentifier))\n\t\t\tsetCompilationError(null)\n\n\t\t\tconst unsubscribe = modulesRuntime.subscribeToLocalModuleExports(moduleId, updatedExports => {\n\t\t\t\tsetModuleState(extractShaderState(updatedExports))\n\t\t\t\tsetCompilationError(null)\n\t\t\t})\n\n\t\t\treturn unsubscribe\n\t\t}\n\n\t\tif (isExternalModuleIdentifier(parsed)) {\n\t\t\tconst initialState = extractShaderStateFromDefinition(modulesRuntime, moduleIdentifier)\n\t\t\tif (initialState.status === \"success\") {\n\t\t\t\tsetModuleState(initialState)\n\t\t\t\tsetCompilationError(null)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tsetModuleState({ status: \"loading\" })\n\n\t\t\tlet active = true\n\t\t\tmodulesRuntime\n\t\t\t\t.ensureExternalModuleLoaded(parsed)\n\t\t\t\t.then(() => {\n\t\t\t\t\tif (!active) return\n\n\t\t\t\t\tconst shaderState = extractShaderStateFromDefinition(modulesRuntime, moduleIdentifier)\n\n\t\t\t\t\tif (shaderState.status === \"loading\") {\n\t\t\t\t\t\tsetModuleState({\n\t\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\t\ttitle: \"Shader Not Found\",\n\t\t\t\t\t\t\t\tmessage: \"Could not find shader definition in external module\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t})\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetModuleState(shaderState)\n\t\t\t\t\t\tsetCompilationError(null)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch(error => {\n\t\t\t\t\tif (!active) return\n\n\t\t\t\t\tsetModuleState({\n\t\t\t\t\t\tstatus: \"error\",\n\t\t\t\t\t\terror: {\n\t\t\t\t\t\t\ttitle: \"Module Error\",\n\t\t\t\t\t\t\tmessage: error instanceof Error ? error.message : \"Failed to load external shader module\",\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t})\n\n\t\t\treturn () => {\n\t\t\t\tactive = false\n\t\t\t}\n\t\t}\n\n\t\tsetModuleState({\n\t\t\tstatus: \"error\",\n\t\t\terror: {\n\t\t\t\ttitle: \"Invalid Module\",\n\t\t\t\tmessage: \"Invalid shader module identifier\",\n\t\t\t},\n\t\t})\n\t}, [moduleIdentifier, modulesRuntime])\n\n\t// If there's a compilation error, return error state\n\tif (compilationError && moduleState.status === \"success\") {\n\t\treturn {\n\t\t\t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