{"version":3,"names":["ownerDocument","ownerWindow","node","doc","defaultView","window"],"sources":["owner-window.ts"],"sourcesContent":["import { ownerDocument } from \"./owner-document\";\n\n/**\n * Returns the window that owns `node`, falling back to the ambient `window`\n * global when `node` is null or detached. Use this instead of reading\n * `window` directly so realm-sensitive checks (`node instanceof\n * win.HTMLElement`) work across iframes.\n */\nexport function ownerWindow(node: Node | null | undefined): Window {\n\tconst doc = ownerDocument(node);\n\treturn doc.defaultView ?? window;\n}\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAACC,IAA6B,EAAU;EAClE,MAAMC,GAAG,GAAGH,aAAa,CAACE,IAAI,CAAC;EAC/B,OAAOC,GAAG,CAACC,WAAW,IAAIC,MAAM;AACjC","ignoreList":[]}