{
  "version": 3,
  "sources": ["../../src/services/hooks/useServiceStream.tsx", "../../src/services/hooks/useIFrameWithChannel.tsx", "../../src/services/hooks/iframeFeaturePolicy.ts"],
  "sourcesContent": ["import type { Service, ServiceChannel, ServiceStream } from \"@framerjs/framer-services\"\nimport { ServiceError, ServiceManager } from \"@framerjs/framer-services\"\nimport { delay, reportableError, unhandledError } from \"@framerjs/shared\"\nimport { useEffect, useRef } from \"react\"\n\n/**\n * Manages a ServiceStream for use within a component. Setup and teardown is transparently managed within the\n * lifecycle of the component. Should be used in favor of manual stream handling whenever possible.\n *\n * @param configuration The channel, service definition, and callbacks for stream creation and error handling.\n * @param onStreamValue The callback invoked when the stream produces a new value.\n */\nexport function useServiceStream<Interface, T extends object>(\n\tconfiguration: Readonly<{\n\t\t// The channel providing the service.\n\t\tchannel: ServiceChannel | undefined\n\t\t// The service's generated namespace (from @framerjs/framer-services).\n\t\tservice: { service: Service<Interface> }\n\t\t// The stream to read. Called after service discovery.\n\t\tonDiscover: (service: Interface) => ServiceStream<T>\n\t\t// Required error handling (or at least explicit non-handling) with optional retry support.\n\t\tonError: (error: Error) => { retry: true } | undefined\n\t}>,\n\t// Called for new stream values. Equivalent in behavior to the callback for ServiceStream.read().\n\tonStreamValue: (value: T) => Promise<void>,\n): void {\n\tconst init = {\n\t\tservice: configuration.service.service,\n\t\tonDiscover: configuration.onDiscover,\n\t}\n\n\t// Always use the service and stream configuration as passed in the initial call\n\tconst initRef = useRef(init)\n\tif (initRef.current.service !== init.service) {\n\t\tthrow new Error(\"useServiceStream: service must be identical between re-renders\")\n\t}\n\n\t// Update the callback functions ref every time this hook is called. We don't want to cancel/replace the stream when\n\t// a callback changes, e.g. in response to a prop change in the containing component or simply because it's not\n\t// correctly wrapped with useCallback().\n\tconst callbacks = { onStreamValue, onError: configuration.onError }\n\tconst callbacksRef = useRef(callbacks)\n\tcallbacksRef.current = callbacks\n\n\t// The current stream (if any)\n\tconst streamRef = useRef<ServiceStream<object>>()\n\n\t// Respond to channel changes\n\tconst { channel } = configuration\n\tuseEffect(() => {\n\t\tif (!channel) return // Nothing to read or clean up\n\n\t\tlet isActive = true\n\t\tconst cancelStream = () => {\n\t\t\tconst stream = streamRef.current\n\t\t\tstreamRef.current = undefined\n\t\t\tstream?.cancel().catch(() => {}) // Ignore errors\n\t\t}\n\n\t\tconst readStream = async () => {\n\t\t\tlet done = false\n\t\t\tlet previousErrorCount = 0\n\t\t\twhile (!done) {\n\t\t\t\t// Default to *not* looping indefinitely\n\t\t\t\tdone = true\n\n\t\t\t\ttry {\n\t\t\t\t\t// Discover the service\n\t\t\t\t\tconst currentInit = initRef.current\n\t\t\t\t\tconst implementation = await ServiceManager.shared().discover(currentInit.service, channel)\n\t\t\t\t\tif (!isActive) return\n\n\t\t\t\t\t// Request a new stream\n\t\t\t\t\tconst stream = currentInit.onDiscover(implementation)\n\t\t\t\t\tstreamRef.current = stream\n\n\t\t\t\t\t// Reset the error count if we get past discovery\n\t\t\t\t\tpreviousErrorCount = 0\n\n\t\t\t\t\t// Read until the stream ends\n\t\t\t\t\tawait stream.read(value => {\n\t\t\t\t\t\tif (!isActive) return Promise.resolve()\n\t\t\t\t\t\treturn callbacksRef.current.onStreamValue(value)\n\t\t\t\t\t})\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (!isActive) return\n\n\t\t\t\t\t// Allow error recovery...\n\t\t\t\t\tconst recovery = callbacksRef.current.onError(reportableError(error))\n\n\t\t\t\t\t// ...but only once for every successful discovery\n\t\t\t\t\tpreviousErrorCount++\n\t\t\t\t\tif (previousErrorCount > 1) {\n\t\t\t\t\t\tcontinue\n\t\t\t\t\t}\n\n\t\t\t\t\tif (recovery?.retry === true) {\n\t\t\t\t\t\t// Wait until the next event loop (e.g. to let a frame's \"unload\" finish) before trying again\n\t\t\t\t\t\tawait delay(0)\n\t\t\t\t\t\tif (!isActive) return\n\t\t\t\t\t\tdone = false\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treadStream().catch(unhandledError)\n\t\treturn () => {\n\t\t\tisActive = false\n\t\t\tcancelStream()\n\t\t}\n\t}, [channel])\n}\n\n// Generic handler for useServiceStream() error handler\nexport function unhandledStreamError(err: Error): { retry: true } | undefined {\n\tif (err instanceof ServiceError.ServiceGone) {\n\t\t// The frame may have reloaded, try rediscovering the stream\n\t\treturn { retry: true }\n\t} else {\n\t\tunhandledError(err)\n\t}\n}\n", "import { assertAllowSameOriginForSandboxApp, sandboxAppRelativeToEditor } from \"@framerjs/framer-environment/domains.ts\"\nimport { PostMessageChannel, ServiceError, ServiceManager } from \"@framerjs/framer-services\"\nimport { getLogger, unhandledError } from \"@framerjs/shared\"\nimport type React from \"react\"\nimport { useCallback, useEffect, useReducer, useRef } from \"react\"\nimport { getIFrameAllowPolicy } from \"./iframeFeaturePolicy.ts\"\n\nconst logger = getLogger(\"services:hooks:useiframewithchannel\")\n\ntype Props = React.HTMLAttributes<HTMLDivElement>\n\ntype Return = [React.ComponentType<Props>, PostMessageChannel | null, HTMLIFrameElement | null]\n\nclass IFrameWithChannelError extends Error {\n\tconstructor(\n\t\tmessage: string,\n\t\treadonly extras: Record<string, unknown> = {},\n\t) {\n\t\tsuper(message)\n\t}\n}\n\n/**\n * Returns a component class that wraps an <iframe> element, a channel to communicate with that IFrame,\n * and the iframe element itself.\n * @param src The src of the <iframe> element that will be created.\n * @param targetOrigin Target origin for the postMessage. Defaults to the origin of the <iframe>.\n * @param onSetup Called when the <iframe> is created for the first time. If something\n *                needs to run when the <iframe> is reloaded, add an onload handler.\n * @param type \"canvas\" or \"preview\", used to differentiate which feature policies to enable in the iframe\n */\nexport function useIFrameWithChannel(config: {\n\tsrc: string | null\n\ttargetOrigin?: string\n\ttype: \"canvas\" | \"preview\"\n\tonSetup?: (iframe: HTMLIFrameElement) => ReturnType<React.EffectCallback>\n}): Return {\n\tconst { onSetup = () => {}, targetOrigin, type, src } = config\n\n\tlet resolvedURL: string | null = src\n\n\tif (src) {\n\t\tconst { pathname, search, hash } = new URL(src)\n\t\tconst relativePath = `${pathname}${search}${hash}`\n\t\tassertAllowSameOriginForSandboxApp(relativePath)\n\n\t\tresolvedURL = sandboxAppRelativeToEditor(relativePath).url\n\t}\n\n\tconst [channel, setChannel] = useReducer(\n\t\t(oldChannel: PostMessageChannel | null, newChannel: PostMessageChannel | null) => {\n\t\t\tif (oldChannel) {\n\t\t\t\tServiceManager.shared()\n\t\t\t\t\t.unregister(oldChannel)\n\t\t\t\t\t.catch(err => {\n\t\t\t\t\t\t// No need to handle cases where service is already torn down.\n\t\t\t\t\t\tif (!(err instanceof ServiceError.ServiceGone)) {\n\t\t\t\t\t\t\tunhandledError(err)\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t}\n\t\t\treturn newChannel\n\t\t},\n\t\tnull,\n\t)\n\n\t// This will create an <iframe> synchronously once the container\n\t// component (`componentType`) has mounted. The reason for this\n\t// is so that no code can run between the <iframe> being created\n\t// and the `setUpIFrame` callback running.\n\tconst ref = useRef<HTMLDivElement>(null)\n\tconst iframeRef = useRef<HTMLIFrameElement | null>(null)\n\tconst handlersRef = useRef<{\n\t\tonError: ((e: ErrorEvent) => void) | null\n\t\tonLoad: (() => void) | null\n\t}>({\n\t\tonError: null,\n\t\tonLoad: null,\n\t})\n\n\tuseEffect(() => {\n\t\tif (!resolvedURL || !ref.current) {\n\t\t\t// The <div> is not in the DOM.\n\t\t\tiframeRef.current = null\n\t\t\tif (channel) setChannel(null)\n\t\t\treturn\n\t\t}\n\n\t\tif (iframeRef.current) {\n\t\t\t// We already created an <iframe>.\n\t\t\treturn\n\t\t}\n\n\t\tconst iframe = document.createElement(\"iframe\")\n\t\tiframe.src = resolvedURL\n\t\tiframe.style.border = \"none\"\n\t\tiframe.style.display = \"block\"\n\t\tiframe.style.height = \"100%\"\n\t\tiframe.style.width = \"100%\"\n\t\tiframe.dataset.testid = `${type}-iframe`\n\t\tiframe.allowFullscreen = true\n\n\t\t// TODO: It's very unclear under what conditions this event is called\n\t\t// so we will likely also need to do some form of timeout. For example\n\t\t// a 404 will result in a load event, but a blocked network request\n\t\t// e.g. from an ad blocker will result in \"load\" never being called\n\t\t// by which time we'll likely have crashed somewhere else after\n\t\t// onSetup() is called with an invalid iframe/contentWindow.\n\t\tconst onError = (evt: ErrorEvent) => {\n\t\t\tsetChannel(null)\n\t\t\tlogger.reportError(\n\t\t\t\tnew IFrameWithChannelError(\"iframe load error\", {\n\t\t\t\t\tmessage: evt.message,\n\t\t\t\t\tfilename: evt.filename,\n\t\t\t\t\tlineno: evt.lineno,\n\t\t\t\t\tcolno: evt.colno,\n\t\t\t\t\terror: evt.error,\n\t\t\t\t}),\n\t\t\t)\n\t\t}\n\t\tiframe.addEventListener(\"error\", onError)\n\t\thandlersRef.current.onError = onError\n\n\t\t// Setup sandboxing if required.\n\t\tconst iframeOrigin = new URL(resolvedURL, document.baseURI).origin\n\t\tconst sandbox = iframe.sandbox as undefined | HTMLIFrameElement[\"sandbox\"]\n\t\tsandbox?.add(\"allow-downloads\")\n\t\tsandbox?.add(\"allow-popups\")\n\t\tsandbox?.add(\"allow-popups-to-escape-sandbox\")\n\t\tsandbox?.add(\"allow-same-origin\")\n\t\tsandbox?.add(\"allow-scripts\")\n\t\tsandbox?.add(\"allow-forms\")\n\n\t\tiframe.allow = getIFrameAllowPolicy(type === \"canvas\" ? \"editor\" : \"preview\")\n\n\t\tref.current.appendChild(iframe)\n\n\t\tiframeRef.current = iframe\n\n\t\t// Allow wildcard origin in situations where the origin is not\n\t\t// protected. This should only apply to the development env.\n\n\t\tconst createChannel = () => {\n\t\t\tconst { contentWindow } = iframe\n\t\t\tif (!contentWindow) {\n\t\t\t\t// Something is wrong...\n\t\t\t\tref.current?.removeChild(iframe)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\treturn new PostMessageChannel(contentWindow, targetOrigin ?? iframeOrigin)\n\t\t}\n\n\t\tconst onLoad = () => {\n\t\t\tconst newChannel = createChannel()\n\t\t\tsetChannel(newChannel)\n\t\t}\n\n\t\tiframe.addEventListener(\"load\", onLoad)\n\t\thandlersRef.current.onLoad = onLoad\n\n\t\t// Allow setting up the <iframe> before it gets a chance to start\n\t\t// executing JavaScript (so we can inject globals, et cetera).\n\t\treturn onSetup(iframe)\n\t}, [channel, setChannel, onSetup, resolvedURL, targetOrigin, type])\n\n\t// Clean-up iframe on unmount.\n\tuseEffect(\n\t\t() => () => {\n\t\t\tif (handlersRef.current.onError) {\n\t\t\t\tiframeRef.current?.removeEventListener(\"error\", handlersRef.current.onError)\n\t\t\t}\n\t\t\tif (handlersRef.current.onLoad) {\n\t\t\t\tiframeRef.current?.removeEventListener(\"load\", handlersRef.current.onLoad)\n\t\t\t}\n\t\t\thandlersRef.current.onError = null\n\t\t\thandlersRef.current.onLoad = null\n\t\t\tiframeRef.current = null\n\t\t\tsetChannel(null)\n\t\t},\n\t\t[],\n\t)\n\n\tconst componentType = useCallback(function IFrameWithChannel(props: Props) {\n\t\t// biome-ignore lint/correctness/useHookAtTopLevel: this is a functional component\n\t\tuseEffect(() => {\n\t\t\t// Throw an error if the component is re-mounted as this will cause the\n\t\t\t// iframe and internal channel to reload. Use an ErrorBoundary to handle\n\t\t\t// this error if desired.\n\t\t\tif (ref.current?.children.length === 0 && iframeRef.current) {\n\t\t\t\tthrow new Error(\"IFrameWithChannel was re-rendered. The Service connection will be broken.\")\n\t\t\t}\n\t\t})\n\t\treturn <div {...props} ref={ref} />\n\t}, [])\n\n\treturn [componentType, channel, iframeRef.current]\n}\n", "import { assertNever } from \"@framerjs/shared/src/assert.ts\"\n\nconst CANVAS_IFRAME_FEATURE_POLICY =\n\t\"autoplay; ambient-light-sensor; accelerometer; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; magnetometer; microphone; midi; picture-in-picture; usb; xr-spatial-tracking\"\n\nconst CANVAS_ON_PAGE_IFRAME_FEATURE_POLICY = \"autoplay\"\n\nconst PREVIEW_IFRAME_FEATURE_POLICY =\n\t\"autoplay; ambient-light-sensor; accelerometer; camera; display-capture; encrypted-media; fullscreen; geolocation; gyroscope; magnetometer; microphone; midi; picture-in-picture; usb; xr-spatial-tracking; clipboard-read; clipboard-write\"\n\n/**\n * Returns the appropriate iframe allow policy for the given type.\n * Automatically appends local-network-access in development builds.\n */\nexport function getIFrameAllowPolicy(type: \"on_page\" | \"editor\" | \"preview\"): string {\n\tlet basePolicy: string | undefined\n\n\tswitch (type) {\n\t\tcase \"on_page\":\n\t\t\tbasePolicy = CANVAS_ON_PAGE_IFRAME_FEATURE_POLICY\n\t\t\tbreak\n\t\tcase \"editor\":\n\t\t\tbasePolicy = CANVAS_IFRAME_FEATURE_POLICY\n\t\t\tbreak\n\t\tcase \"preview\":\n\t\t\tbasePolicy = PREVIEW_IFRAME_FEATURE_POLICY\n\t\t\tbreak\n\t\tdefault:\n\t\t\tassertNever(type)\n\t}\n\n\t// Append local-network-access in development builds\n\tif (process.env.NODE_ENV === \"development\") {\n\t\treturn `${basePolicy}; local-network-access`\n\t}\n\n\treturn basePolicy\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mBAAkC;AAS3B,SAAS,iBACf,eAWA,eACO;AACP,QAAM,OAAO;AAAA,IACZ,SAAS,cAAc,QAAQ;AAAA,IAC/B,YAAY,cAAc;AAAA,EAC3B;AAGA,QAAM,cAAU,qBAAO,IAAI;AAC3B,MAAI,QAAQ,QAAQ,YAAY,KAAK,SAAS;AAC7C,UAAM,IAAI,MAAM,gEAAgE;AAAA,EACjF;AAKA,QAAM,YAAY,EAAE,eAAe,SAAS,cAAc,QAAQ;AAClE,QAAM,mBAAe,qBAAO,SAAS;AACrC,eAAa,UAAU;AAGvB,QAAM,gBAAY,qBAA8B;AAGhD,QAAM,EAAE,QAAQ,IAAI;AACpB,8BAAU,MAAM;AACf,QAAI,CAAC,QAAS;AAEd,QAAI,WAAW;AACf,UAAM,eAAe,MAAM;AAC1B,YAAM,SAAS,UAAU;AACzB,gBAAU,UAAU;AACpB,cAAQ,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