export declare const WALKER_RUNTIME_CODE = "((runtimeId) => (self[runtimeId] ||= (\n  renderId,\n  prefix = runtimeId + renderId,\n  prefixLen = prefix.length,\n  lookup = {},\n  visits = [],\n  doc = document,\n  walker = doc.createTreeWalker(\n    doc,\n    129 /* NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_ELEMENT */,\n  ),\n) =>\n  doc = (self[runtimeId][renderId] = {\n    i: prefix,\n    d: doc,\n    l: lookup,\n    v: visits,\n    x() {},\n    w(node, op, id) {\n      while ((node = walker.nextNode())) {\n        // Only reorder markers (\"#\", \"!\") are ever looked up, so only they are\n        // kept: the lookup lives as long as the page, and every node marker\n        // would otherwise stay referenced in it after resume consumed it.\n        doc.x(\n          (op =\n            (op = node.data) &&\n            !op.indexOf(prefix) &&\n            ((id = op.slice(prefixLen + 1)),\n            (op = op[prefixLen]) > \"#\" || (lookup[id] = node),\n            op)),\n          id,\n          node,\n        );\n\n        if (op > \"#\") {\n          visits.push(node);\n        }\n      }\n    },\n  })\n, self[runtimeId]))";
export declare const REORDER_RUNTIME_CODE = "((runtime) => {\n  if (runtime.j) return;\n  let onNextSibling,\n    placeholder,\n    nextSibling,\n    placeholders = runtime.p = {},\n    replace = (id, container) => runtime.l[id].replaceWith(...container.childNodes);\n  runtime.j = {};\n  runtime.x = (op, id, node, placeholderRoot, placeholderCb) => {\n    if (node == nextSibling) {\n      onNextSibling();\n    }\n\n    if (op == \"#\") {\n      (placeholders[id] = placeholder).i++;\n    } else if (op == \"!\") {\n      if (runtime.l[id] && placeholders[id]) {\n        nextSibling = node.nextSibling;\n        onNextSibling = () => placeholders[id].c();\n      }\n    } else if (node.tagName == \"T\" && (id = node.getAttribute(runtime.i))) {\n      nextSibling = node.nextSibling;\n      onNextSibling = () => {\n        node.remove();\n        placeholderRoot || replace(id, node);\n        placeholder.c();\n      };\n      placeholder =\n        placeholders[id] ||\n        (placeholderRoot = placeholders[id] =\n          {\n            i: runtime.l[id] ? 1 : 2,\n            r: id,\n            // Resume may still walk markers inside the dropped placeholder, so\n            // park it in any detached parent (a bare <t> clone is the cheapest).\n            c(start = runtime.l[\"^\" + id], removed = node.cloneNode()) {\n              if (--placeholderRoot.i) return 1;\n              for (\n                ;\n                removed.prepend(\n                  (nextSibling = runtime.l[id].previousSibling || start),\n                ),\n                  start != nextSibling;\n\n              );\n              replace(id, node);\n            },\n          });\n      // Opens the chunk's visits for resume to parent to the root's branch; the\n      // walk that this chunk's own script triggers closes it.\n      runtime.v.push({ data: runtime.i + \"*\" + placeholder.r });\n      // repurpose \"op\" for callbacks ...carefully\n      if ((op = runtime.j[id])) {\n        placeholderCb = placeholder.c;\n        placeholder.c = () => placeholderCb() || op(runtime.r);\n      }\n    }\n  };\n})";
