const QWIK_BACKPATCH_EXECUTOR_MINIFIED = "const t='script[type=\"qwik/backpatch\"]',e=document.currentScript;if(e){const o=e.closest(\"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\");if(o){const e=o.querySelector(t);if(e){const t=JSON.parse(e.textContent||\"[]\"),n=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT);let r=n.currentNode,c=0;for(let e=0;e<t.length;e+=3){const o=t[e],i=t[e+1];let l=t[e+2];for(;c<o;)r=n.nextNode(),c++;const s=r;null==l||!1===l?s.removeAttribute(i):(\"boolean\"==typeof l&&(l=\"\"),s.setAttribute(i,l))}}}}";
const QWIK_BACKPATCH_EXECUTOR_DEBUG = "const BACKPATCH_DATA_SELECTOR = 'script[type=\"qwik/backpatch\"]';\nconst executorScript = document.currentScript;\nif (executorScript) {\n  const container = executorScript.closest(\n    \"[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])\"\n  );\n  if (container) {\n    const script = container.querySelector(BACKPATCH_DATA_SELECTOR);\n    if (script) {\n      const data = JSON.parse(script.textContent || \"[]\");\n      const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT);\n      let currentNode = walker.currentNode;\n      let currentNodeIdx = 0;\n      for (let i = 0; i < data.length; i += 3) {\n        const elementIdx = data[i];\n        const attrName = data[i + 1];\n        let value = data[i + 2];\n        while (currentNodeIdx < elementIdx) {\n          currentNode = walker.nextNode();\n          currentNodeIdx++;\n        }\n        const element = currentNode;\n        if (value == null || value === false) {\n          element.removeAttribute(attrName);\n        } else {\n          if (typeof value === \"boolean\") {\n            value = \"\";\n          }\n          element.setAttribute(attrName, value);\n        }\n      }\n    }\n  }\n}";
globalThis.QWIK_BACKPATCH_EXECUTOR_MINIFIED = QWIK_BACKPATCH_EXECUTOR_MINIFIED;
globalThis.QWIK_BACKPATCH_EXECUTOR_DEBUG = QWIK_BACKPATCH_EXECUTOR_DEBUG;
export { QWIK_BACKPATCH_EXECUTOR_MINIFIED, QWIK_BACKPATCH_EXECUTOR_DEBUG };
