/* Partytown 0.5.4 - MIT builder.io */
(self => {
const WinIdKey = Symbol();
const InstanceIdKey = Symbol();
const InstanceDataKey = Symbol();
const NamespaceKey = Symbol();
const ApplyPathKey = Symbol();
const InstanceStateKey = Symbol();
const HookContinue = Symbol();
const HookPrevent = Symbol();
const webWorkerInstances = new Map;
const webWorkerRefsByRefId = {};
const webWorkerRefIdsByRef = new WeakMap;
const postMessages = [];
const webWorkerCtx = {};
const webWorkerlocalStorage = new Map;
const webWorkerSessionStorage = new Map;
const environments = {};
const cachedDimensions = new Map;
const cachedStructure = new Map;
const commaSplit = str => str.split(",");
const partytownLibUrl = url => {
url = webWorkerCtx.$libPath$ + url;
if (new URL(url).origin != location.origin) {
throw "Invalid " + url;
}
return url;
};
const getterDimensionPropNames = commaSplit("clientWidth,clientHeight,clientTop,clientLeft,innerWidth,innerHeight,offsetWidth,offsetHeight,offsetTop,offsetLeft,outerWidth,outerHeight,pageXOffset,pageYOffset,scrollWidth,scrollHeight,scrollTop,scrollLeft");
const elementStructurePropNames = commaSplit("childElementCount,children,firstElementChild,lastElementChild,nextElementSibling,previousElementSibling");
const structureChangingMethodNames = commaSplit("insertBefore,remove,removeChild,replaceChild");
const dimensionChangingSetterNames = commaSplit("className,width,height,hidden,innerHTML,innerText,textContent");
const dimensionChangingMethodNames = commaSplit("setAttribute,setAttributeNS,setProperty");
const eventTargetMethods = commaSplit("addEventListener,dispatchEvent,removeEventListener");
const nonBlockingMethods = eventTargetMethods.concat(dimensionChangingM
|