mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
1 line
220 KiB
JSON
1 line
220 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nconst NAMESPACE = 'ionic';\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet queuePending = false;\nconst win = typeof window !== 'undefined' ? window : {};\nconst CSS = win.CSS;\nconst doc = win.document || {\n head: {}\n};\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: h => h(),\n raf: h => requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts)\n};\nconst supportsShadow = /*@__PURE__*/(() => (doc.head.attachShadow + '').indexOf('[native') > -1)();\nconst promiseResolve = v => Promise.resolve(v);\nconst supportsConstructibleStylesheets = /*@__PURE__*/(() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replace === 'function';\n } catch (e) {}\n return false;\n})();\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {\n if (listeners) {\n listeners.map(([flags, name, method]) => {\n const target = getHostListenerTarget(elm, flags);\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) => ev => {\n try {\n {\n if (hostRef.$flags$ & 256 /* isListenReady */) {\n // instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n } else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n } catch (e) {\n consoleError(e);\n }\n};\nconst getHostListenerTarget = (elm, flags) => {\n if (flags & 4 /* TargetDocument */) return doc;\n if (flags & 8 /* TargetWindow */) return win;\n if (flags & 16 /* TargetBody */) return doc.body;\n return elm;\n};\n// prettier-ignore\nconst hostListenerOpts = flags => (flags & 2 /* Capture */) !== 0;\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\nconst XLINK_NS = 'http://www.w3.org/1999/xlink';\nconst createTime = (fnName, tagName = '') => {\n {\n return () => {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) => {\n {\n return () => {\n return;\n };\n }\n};\nconst rootAppliedStyles = new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) => {\n let style = styles.get(scopeId);\n if (supportsConstructibleStylesheets && allowCS) {\n style = style || new CSSStyleSheet();\n style.replace(cssText);\n } else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {\n let scopeId = getScopeId(cmpMeta, mode);\n let style = styles.get(scopeId);\n // if an element is NOT connected then getRootNode() will return the wrong root node\n // so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, appliedStyles = new Set());\n }\n if (!appliedStyles.has(scopeId)) {\n if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n // This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n } else {\n if (plt.$cssShim$) {\n styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */));\n const newScopeId = styleElm['s-sc'];\n if (newScopeId) {\n scopeId = newScopeId;\n // we don't want to add this styleID to the appliedStyles Set\n // since the cssVarShim might need to apply several different\n // stylesheets for the same component\n appliedStyles = null;\n }\n } else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = hostRef => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);\n if (flags & 10 /* needsScopedEncapsulation */) {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n // DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (flags & 2 /* scopedCssEncapsulation */) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = css => css.replace(/\\/\\*!@([^\\/]+)\\*\\/[^\\{]+\\{/g, '$1{');\n// Private\nconst computeMode = elm => modeResolutionChain.map(h => h(elm)).find(m => !!m);\n// Public\nconst setMode = handler => modeResolutionChain.push(handler);\nconst getMode = ref => getHostRef(ref).$modeName$;\n/**\n * Default style mode id\n */\n/**\n * Reusable empty obj/array\n * Don't add values to these!!\n */\nconst EMPTY_OBJ = {};\n/**\n * Namespaces\n */\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst HTML_NS = 'http://www.w3.org/1999/xhtml';\nconst isDef = v => v != null;\nconst isComplexType = o => {\n // https://jsperf.com/typeof-fn-object/5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\n/**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n// const stack: any[] = [];\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n let vNodeChildren = [];\n const walk = c => {\n for (let i = 0; i < c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n } else if (child != null && typeof child !== 'boolean') {\n if (simple = typeof nodeName !== 'function' && !isComplexType(child)) {\n child = String(child);\n }\n if (simple && lastSimple) {\n // If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n } else {\n // Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n // normalize class / classname attributes\n if (vnodeData.key) {\n key = vnodeData.key;\n }\n if (vnodeData.name) {\n slotName = vnodeData.name;\n }\n {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class = typeof classData !== 'object' ? classData : Object.keys(classData).filter(k => classData[k]).join(' ');\n }\n }\n }\n if (typeof nodeName === 'function') {\n // nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n {\n vnode.$key$ = key;\n }\n {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\nconst newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null\n };\n {\n vnode.$attrs$ = null;\n }\n {\n vnode.$key$ = null;\n }\n {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\nconst isHost = node => node && node.$tag$ === Host;\nconst vdomFnUtils = {\n forEach: (children, cb) => children.map(convertToPublic).forEach(cb),\n map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)\n};\nconst convertToPublic = node => ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$\n});\nconst convertToPrivate = node => {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...(node.vchildren || []));\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\n/**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));\n } else if (memberName === 'style') {\n // update style attribute, css properties and values\n {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (prop.includes('-')) {\n elm.style.removeProperty(prop);\n } else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n } else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n } else if (memberName === 'key') ;else if (memberName === 'ref') {\n // minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n } else if (!isProp && memberName[0] === 'o' && memberName[1] === 'n') {\n // Event Handlers\n // so if the member name starts with \"on\" and the 3rd characters is\n // a capital letter, and it's not already a member on the element,\n // then we're assuming it's an event listener\n if (memberName[2] === '-') {\n // on- prefixed events\n // allows to be explicit about the dom event to listen without any magic\n // under the hood:\n // <my-cmp on-click> // listens for \"click\"\n // <my-cmp on-Click> // listens for \"Click\"\n // <my-cmp on-ionChange> // listens for \"ionChange\"\n // <my-cmp on-EVENTS> // listens for \"EVENTS\"\n memberName = memberName.slice(3);\n } else if (isMemberInElement(win, ln)) {\n // standard event\n // the JSX attribute could have been \"onMouseOver\" and the\n // member name \"onmouseover\" is on the window's prototype\n // so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n } else {\n // custom event\n // the JSX attribute could have been \"onMyCustomEvent\"\n // so let's trim off the \"on\" prefix and lowercase the first character\n // and add the listener \"myCustomEvent\"\n // except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, false);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, false);\n }\n } else {\n // Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || isComplex && newValue !== null) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n let n = newValue == null ? '' : newValue;\n // Workaround for Safari, moving the <input> caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n // tslint:disable-next-line: triple-equals\n } else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n } else {\n elm[memberName] = newValue;\n }\n } catch (e) {}\n }\n /**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in <svg>\n * - if the newValue is null/undefined or 'false'.\n */\n let xlink = false;\n {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n } else {\n elm.removeAttribute(memberName);\n }\n }\n } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n } else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = /\\s/;\nconst parseClassList = value => !value ? [] : value.split(parseClassListRegex);\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {\n // if the element passed in is a shadow root, which is a document fragment\n // then we want to be adding attrs/props to the shadow root's \"host\" element\n // if it's not a shadow root, then we add attrs/props to the same element\n const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;\n const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n {\n // remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n // add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {\n // tslint:disable-next-line: prefer-const\n let newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (!useNativeShadowDom) {\n // remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n // scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$ ?\n // slot element has fallback content\n 2 /* isSlotFallback */ :\n // slot element does not have fallback content\n 1 /* isSlotReference */;\n }\n }\n\n if (newVNode.$text$ !== null) {\n // create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n } else if (newVNode.$flags$ & 1 /* isSlotReference */) {\n // create a slot reference node\n elm = newVNode.$elm$ = doc.createTextNode('');\n } else {\n if (!isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n // create element\n elm = newVNode.$elm$ = doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$);\n if (isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n // add css classes, attrs, props, listeners, etc.\n {\n updateElement(null, newVNode, isSvgMode);\n }\n if (isDef(scopeId) && elm['s-si'] !== scopeId) {\n // if there is a scopeId and this is the initial render\n // then let's add the scopeId as a css class\n elm.classList.add(elm['s-si'] = scopeId);\n }\n if (newVNode.$children$) {\n for (i = 0; i < newVNode.$children$.length; ++i) {\n // create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n // return node could have been null\n if (childNode) {\n // append our new node\n elm.appendChild(childNode);\n }\n }\n }\n {\n if (newVNode.$tag$ === 'svg') {\n // Only reset the SVG context when we're exiting <svg> element\n isSvgMode = false;\n } else if (elm.tagName === 'foreignObject') {\n // Reenter SVG context when we're exiting <foreignObject> element\n isSvgMode = true;\n }\n }\n }\n {\n elm['s-hn'] = hostTagName;\n if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {\n // remember the content reference comment\n elm['s-sr'] = true;\n // remember the content reference comment\n elm['s-cr'] = contentRef;\n // remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n // check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content back to it's original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n return elm;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) => {\n plt.$flags$ |= 1 /* isTmpDisconnected */;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n // // this child node in the old element is from another component\n // // remove this node from the old slot's parent\n // childNode.remove();\n // and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n // remove the old original location comment entirely\n // later on the patch function will know what to do\n // and move this to the correct spot in need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 /* isTmpDisconnected */;\n};\n\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = parentElm['s-cr'] && parentElm['s-cr'].parentNode || parentElm;\n let childNode;\n if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, referenceNode(before));\n }\n }\n }\n};\nconst removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnode = vnodes[startIdx]) {\n elm = vnode.$elm$;\n callNodeRefs(vnode);\n {\n // we're removing this element\n // so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n // remove the original location comment\n elm['s-ol'].remove();\n } else {\n // it's possible that child nodes of the node\n // that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n // remove the vnode's element from the dom\n elm.remove();\n }\n }\n};\nconst updateChildren = (parentElm, oldCh, newVNode, newCh) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n // Vnode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n } else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n } else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newStartVnode)) {\n patch(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (isSameVnode(oldEndVnode, newEndVnode)) {\n patch(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newEndVnode)) {\n // Vnode moved right\n if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode);\n parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldEndVnode, newStartVnode)) {\n // Vnode moved left\n if (oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot') {\n putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);\n }\n patch(oldEndVnode, newStartVnode);\n parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n // createKeyToOldIdx\n idxInOld = -1;\n {\n for (i = oldStartIdx; i <= oldEndIdx; ++i) {\n if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {\n idxInOld = i;\n break;\n }\n }\n }\n if (idxInOld >= 0) {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.$tag$ !== newStartVnode.$tag$) {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);\n } else {\n patch(elmToMove, newStartVnode);\n oldCh[idxInOld] = undefined;\n node = elmToMove.$elm$;\n }\n newStartVnode = newCh[++newStartIdx];\n } else {\n // new element\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);\n newStartVnode = newCh[++newStartIdx];\n }\n if (node) {\n {\n parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));\n }\n }\n }\n }\n if (oldStartIdx > oldEndIdx) {\n addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n }\n};\nconst isSameVnode = (vnode1, vnode2) => {\n // compare if two vnode to see if they're \"technically\" the same\n // need to have the same element tag, and same key to be the same\n if (vnode1.$tag$ === vnode2.$tag$) {\n if (vnode1.$tag$ === 'slot') {\n return vnode1.$name$ === vnode2.$name$;\n }\n {\n return vnode1.$key$ === vnode2.$key$;\n }\n }\n return false;\n};\nconst referenceNode = node => {\n // this node was relocated to a new location in the dom\n // because of some other component's slot\n // but we still have an html comment in place of where\n // it's original location was according to it's original vdom\n return node && node['s-ol'] || node;\n};\nconst parentReferenceNode = node => (node['s-ol'] ? node['s-ol'] : node).parentNode;\nconst patch = (oldVNode, newVNode) => {\n const elm = newVNode.$elm$ = oldVNode.$elm$;\n const oldChildren = oldVNode.$children$;\n const newChildren = newVNode.$children$;\n const tag = newVNode.$tag$;\n const text = newVNode.$text$;\n let defaultHolder;\n if (text === null) {\n {\n // test if we're rendering an svg element, or still rendering nodes inside of one\n // only add this to the when the compiler sees we're using an svg somewhere\n isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;\n }\n // element node\n {\n if (tag === 'slot') ;else {\n // either this is the first render of an element OR it's an update\n // AND we already know it's possible it could have changed\n // this updates the element's css classes, attrs, props, listeners, etc.\n updateElement(oldVNode, newVNode, isSvgMode);\n }\n }\n if (oldChildren !== null && newChildren !== null) {\n // looks like there's child vnodes for both the old and new vnodes\n updateChildren(elm, oldChildren, newVNode, newChildren);\n } else if (newChildren !== null) {\n // no old child vnodes, but there are new child vnodes to add\n if (oldVNode.$text$ !== null) {\n // the old vnode was text, so be sure to clear it out\n elm.textContent = '';\n }\n // add the new vnode children\n addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);\n } else if (oldChildren !== null) {\n // no new child vnodes, but there are old child vnodes to remove\n removeVnodes(oldChildren, 0, oldChildren.length - 1);\n }\n if (isSvgMode && tag === 'svg') {\n isSvgMode = false;\n }\n } else if (defaultHolder = elm['s-cr']) {\n // this element has slotted content\n defaultHolder.parentNode.textContent = text;\n } else if (oldVNode.$text$ !== text) {\n // update the text content for the text only vnode\n // and also only if the text is different than before\n elm.data = text;\n }\n};\nconst updateFallbackSlotVisibility = elm => {\n // tslint:disable-next-line: prefer-const\n let childNodes = elm.childNodes;\n let childNode;\n let i;\n let ilen;\n let j;\n let slotNameAttr;\n let nodeType;\n for (i = 0, ilen = childNodes.length; i < ilen; i++) {\n childNode = childNodes[i];\n if (childNode.nodeType === 1 /* ElementNode */) {\n if (childNode['s-sr']) {\n // this is a slot fallback node\n // get the slot name for this slot reference node\n slotNameAttr = childNode['s-sn'];\n // by default always show a fallback slot node\n // then hide it if there are other slots in the light dom\n childNode.hidden = false;\n for (j = 0; j < ilen; j++) {\n nodeType = childNodes[j].nodeType;\n if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {\n // this sibling node is from a different component OR is a named fallback slot node\n if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {\n childNode.hidden = true;\n break;\n }\n } else {\n // this is a default fallback slot node\n // any element or text node (with content)\n // should hide the default fallback slot node\n if (nodeType === 1 /* ElementNode */ || nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '') {\n childNode.hidden = true;\n break;\n }\n }\n }\n }\n // keep drilling down\n updateFallbackSlotVisibility(childNode);\n }\n }\n};\nconst relocateNodes = [];\nconst relocateSlotContent = elm => {\n // tslint:disable-next-line: prefer-const\n let childNode;\n let node;\n let hostContentNodes;\n let slotNameAttr;\n let relocateNodeData;\n let j;\n let i = 0;\n let childNodes = elm.childNodes;\n let ilen = childNodes.length;\n for (; i < ilen; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {\n // first got the content reference comment node\n // then we got it's parent, which is where all the host content is in now\n hostContentNodes = node.parentNode.childNodes;\n slotNameAttr = childNode['s-sn'];\n for (j = hostContentNodes.length - 1; j >= 0; j--) {\n node = hostContentNodes[j];\n if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {\n // let's do some relocating to its new home\n // but never relocate a content reference node\n // that is suppose to always represent the original content location\n if (isNodeLocatedInSlot(node, slotNameAttr)) {\n // it's possible we've already decided to relocate this node\n relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);\n // made some changes to slots\n // let's make sure we also double check\n // fallbacks are correctly hidden or shown\n checkSlotFallbackVisibility = true;\n node['s-sn'] = node['s-sn'] || slotNameAttr;\n if (relocateNodeData) {\n // previously we never found a slot home for this node\n // but turns out we did, so let's remember it now\n relocateNodeData.$slotRefNode$ = childNode;\n } else {\n // add to our list of nodes to relocate\n relocateNodes.push({\n $slotRefNode$: childNode,\n $nodeToRelocate$: node\n });\n }\n if (node['s-sr']) {\n relocateNodes.map(relocateNode => {\n if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {\n relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);\n if (relocateNodeData && !relocateNode.$slotRefNode$) {\n relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;\n }\n }\n });\n }\n } else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {\n // so far this element does not have a slot home, not setting slotRefNode on purpose\n // if we never find a home for this element then we'll need to hide it\n relocateNodes.push({\n $nodeToRelocate$: node\n });\n }\n }\n }\n }\n if (childNode.nodeType === 1 /* ElementNode */) {\n relocateSlotContent(childNode);\n }\n }\n};\nconst isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {\n if (nodeToRelocate.nodeType === 1 /* ElementNode */) {\n if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {\n return true;\n }\n if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {\n return true;\n }\n return false;\n }\n if (nodeToRelocate['s-sn'] === slotNameAttr) {\n return true;\n }\n return slotNameAttr === '';\n};\nconst callNodeRefs = vNode => {\n {\n vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);\n vNode.$children$ && vNode.$children$.map(callNodeRefs);\n }\n};\nconst renderVdom = (hostRef, renderFnResults) => {\n const hostElm = hostRef.$hostElement$;\n const cmpMeta = hostRef.$cmpMeta$;\n const oldVNode = hostRef.$vnode$ || newVNode(null, null);\n const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);\n hostTagName = hostElm.tagName;\n if (cmpMeta.$attrsToReflect$) {\n rootVnode.$attrs$ = rootVnode.$attrs$ || {};\n cmpMeta.$attrsToReflect$.map(([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]);\n }\n rootVnode.$tag$ = null;\n rootVnode.$flags$ |= 4 /* isHost */;\n hostRef.$vnode$ = rootVnode;\n rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;\n {\n scopeId = hostElm['s-sc'];\n }\n {\n contentRef = hostElm['s-cr'];\n useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;\n // always reset\n checkSlotFallbackVisibility = false;\n }\n // synchronous patch\n patch(oldVNode, rootVnode);\n {\n // while we're moving nodes around existing nodes, temporarily disable\n // the disconnectCallback from working\n plt.$flags$ |= 1 /* isTmpDisconnected */;\n if (checkSlotRelocate) {\n relocateSlotContent(rootVnode.$elm$);\n let relocateData;\n let nodeToRelocate;\n let orgLocationNode;\n let parentNodeRef;\n let insertBeforeNode;\n let refNode;\n let i = 0;\n for (; i < relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (!nodeToRelocate['s-ol']) {\n // add a reference node marking this node's original location\n // keep a reference to this node for later lookups\n orgLocationNode = doc.createTextNode('');\n orgLocationNode['s-nr'] = nodeToRelocate;\n nodeToRelocate.parentNode.insertBefore(nodeToRelocate['s-ol'] = orgLocationNode, nodeToRelocate);\n }\n }\n for (i = 0; i < relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (relocateData.$slotRefNode$) {\n // by default we're just going to insert it directly\n // after the slot reference node\n parentNodeRef = relocateData.$slotRefNode$.parentNode;\n insertBeforeNode = relocateData.$slotRefNode$.nextSibling;\n orgLocationNode = nodeToRelocate['s-ol'];\n while (orgLocationNode = orgLocationNode.previousSibling) {\n refNode = orgLocationNode['s-nr'];\n if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {\n refNode = refNode.nextSibling;\n if (!refNode || !refNode['s-nr']) {\n insertBeforeNode = refNode;\n break;\n }\n }\n }\n if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {\n // we've checked that it's worth while to relocate\n // since that the node to relocate\n // has a different next sibling or parent relocated\n if (nodeToRelocate !== insertBeforeNode) {\n if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {\n // probably a component in the index.html that doesn't have it's hostname set\n nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;\n }\n // add it back to the dom but in its new home\n parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);\n }\n }\n } else {\n // this node doesn't have a slot home to go to, so let's hide it\n if (nodeToRelocate.nodeType === 1 /* ElementNode */) {\n nodeToRelocate.hidden = true;\n }\n }\n }\n }\n if (checkSlotFallbackVisibility) {\n updateFallbackSlotVisibility(rootVnode.$elm$);\n }\n // done moving nodes around\n // allow the disconnect callback to work again\n plt.$flags$ &= ~1 /* isTmpDisconnected */;\n // always reset\n relocateNodes.length = 0;\n }\n};\nconst getElement = ref => getHostRef(ref).$hostElement$;\nconst createEvent = (ref, name, flags) => {\n const elm = getElement(ref);\n return {\n emit: detail => {\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 /* Bubbles */),\n composed: !!(flags & 2 /* Composed */),\n cancelable: !!(flags & 1 /* Cancellable */),\n detail\n });\n }\n };\n};\nconst emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst attachToAncestor = (hostRef, ancestorComponent) => {\n if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {\n ancestorComponent['s-p'].push(new Promise(r => hostRef.$onRenderResolve$ = r));\n }\n};\nconst scheduleUpdate = (hostRef, isInitialLoad) => {\n {\n hostRef.$flags$ |= 16 /* isQueuedForUpdate */;\n }\n\n if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {\n hostRef.$flags$ |= 512 /* needsRerender */;\n return;\n }\n attachToAncestor(hostRef, hostRef.$ancestorComponent$);\n // there is no ancestor component or the ancestor component\n // has already fired off its lifecycle update then\n // fire off the initial update\n const dispatch = () => dispatchHooks(hostRef, isInitialLoad);\n return writeTask(dispatch);\n};\nconst dispatchHooks = (hostRef, isInitialLoad) => {\n const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);\n const instance = hostRef.$lazyInstance$;\n let promise;\n if (isInitialLoad) {\n {\n hostRef.$flags$ |= 256 /* isListenReady */;\n if (hostRef.$queuedListeners$) {\n hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));\n hostRef.$queuedListeners$ = null;\n }\n }\n {\n promise = safeCall(instance, 'componentWillLoad');\n }\n }\n {\n promise = then(promise, () => safeCall(instance, 'componentWillRender'));\n }\n endSchedule();\n return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));\n};\nconst updateComponent = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (hostRef, instance, isInitialLoad) {\n // updateComponent\n const elm = hostRef.$hostElement$;\n const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);\n const rc = elm['s-rc'];\n if (isInitialLoad) {\n // DOM WRITE!\n attachStyles(hostRef);\n }\n const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);\n {\n callRender(hostRef, instance);\n }\n if (plt.$cssShim$) {\n plt.$cssShim$.updateHost(elm);\n }\n if (rc) {\n // ok, so turns out there are some child host elements\n // waiting on this parent element to load\n // let's fire off all update callbacks waiting\n rc.map(cb => cb());\n elm['s-rc'] = undefined;\n }\n endRender();\n endUpdate();\n {\n const childrenPromises = elm['s-p'];\n const postUpdate = () => postUpdateComponent(hostRef);\n if (childrenPromises.length === 0) {\n postUpdate();\n } else {\n Promise.all(childrenPromises).then(postUpdate);\n hostRef.$flags$ |= 4 /* isWaitingForChildren */;\n childrenPromises.length = 0;\n }\n }\n });\n return function updateComponent(_x, _x2, _x3) {\n return _ref.apply(this, arguments);\n };\n}();\nconst callRender = (hostRef, instance, elm) => {\n try {\n instance = instance.render && instance.render();\n {\n hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;\n }\n\n {\n hostRef.$flags$ |= 2 /* hasRendered */;\n }\n\n {\n {\n // looks like we've got child nodes to render into this host element\n // or we need to update the css class/attrs on the host element\n // DOM WRITE!\n {\n renderVdom(hostRef, instance);\n }\n }\n }\n } catch (e) {\n consoleError(e, hostRef.$hostElement$);\n }\n return null;\n};\nconst postUpdateComponent = hostRef => {\n const tagName = hostRef.$cmpMeta$.$tagName$;\n const elm = hostRef.$hostElement$;\n const endPostUpdate = createTime('postUpdate', tagName);\n const instance = hostRef.$lazyInstance$;\n const ancestorComponent = hostRef.$ancestorComponent$;\n if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {\n hostRef.$flags$ |= 64 /* hasLoadedComponent */;\n {\n // DOM WRITE!\n addHydratedFlag(elm);\n }\n {\n safeCall(instance, 'componentDidLoad');\n }\n endPostUpdate();\n {\n hostRef.$onReadyResolve$(elm);\n if (!ancestorComponent) {\n appDidLoad();\n }\n }\n } else {\n {\n safeCall(instance, 'componentDidUpdate');\n }\n endPostUpdate();\n }\n {\n hostRef.$onInstanceResolve$(elm);\n }\n // load events fire from bottom to top\n // the deepest elements load first then bubbles up\n {\n if (hostRef.$onRenderResolve$) {\n hostRef.$onRenderResolve$();\n hostRef.$onRenderResolve$ = undefined;\n }\n if (hostRef.$flags$ & 512 /* needsRerender */) {\n nextTick(() => scheduleUpdate(hostRef, false));\n }\n hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);\n }\n // ( •_•)\n // ( •_•)>⌐■-■\n // (⌐■_■)\n};\n\nconst forceUpdate = ref => {\n {\n const hostRef = getHostRef(ref);\n const isConnected = hostRef.$hostElement$.isConnected;\n if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n scheduleUpdate(hostRef, false);\n }\n // Returns \"true\" when the forced update was successfully scheduled\n return isConnected;\n }\n};\nconst appDidLoad = who => {\n // on appload\n // we have finish the first big initial render\n {\n addHydratedFlag(doc.documentElement);\n }\n nextTick(() => emitEvent(win, 'appload', {\n detail: {\n namespace: NAMESPACE\n }\n }));\n};\nconst safeCall = (instance, method, arg) => {\n if (instance && instance[method]) {\n try {\n return instance[method](arg);\n } catch (e) {\n consoleError(e);\n }\n }\n return undefined;\n};\nconst then = (promise, thenFn) => {\n return promise && promise.then ? promise.then(thenFn) : thenFn();\n};\nconst addHydratedFlag = elm => elm.classList.add('hydrated');\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = shadowRoot ? [] : null;\n const vnode = hostRef.$vnode$ = newVNode(tagName, null);\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = new Map());\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map(c => {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (shadowRoot) {\n shadowRootNodes.map(shadowRootNode => {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 /* ElementNode */) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n // got the node data from the element's attribute\n // `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n // this is a new child vnode\n // so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n // add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n // this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n // recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n // keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n } else if (node.nodeType === 8 /* CommentNode */) {\n // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n // comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n // remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n } else if (childVNode.$hostId$ === hostId) {\n // this comment node is specifcally for this host id\n if (childNodeType === SLOT_NODE_ID) {\n // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n } else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (shadowRootNodes) {\n // browser support shadowRoot and this is a shadow dom component\n // create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n // add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n // insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n // remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n } else if (childNodeType === CONTENT_REF_ID) {\n // `${CONTENT_REF_ID}.${hostId}`;\n if (shadowRootNodes) {\n // remove the content ref comment since it's not needed for shadow\n node.remove();\n } else {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n } else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\nconst initializeDocumentHydrate = (node, orgLocNodes) => {\n if (node.nodeType === 1 /* ElementNode */) {\n let i = 0;\n for (; i < node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i < node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n } else if (node.nodeType === 8 /* CommentNode */) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n // useful to know if the original location is\n // the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\nconst parsePropertyValue = (propValue, propType) => {\n // ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (propType & 4 /* Boolean */) {\n // per the HTML spec, any string value means it is a boolean true value\n // but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (propType & 2 /* Number */) {\n // force it to be a number\n return parseFloat(propValue);\n }\n if (propType & 1 /* String */) {\n // could have been passed as a number or boolean\n // but we still want it as a string\n return String(propValue);\n }\n // redundant return here for better minification\n return propValue;\n }\n // not sure exactly what type we want\n // so no need to change to a different type\n return propValue;\n};\nconst getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);\nconst setValue = (ref, propName, newVal, cmpMeta) => {\n // check our new property value against our internal value\n const hostRef = getHostRef(ref);\n const elm = hostRef.$hostElement$;\n const oldVal = hostRef.$instanceValues$.get(propName);\n const flags = hostRef.$flags$;\n const instance = hostRef.$lazyInstance$;\n newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);\n if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {\n // gadzooks! the property's value has changed!!\n // set our new value!\n hostRef.$instanceValues$.set(propName, newVal);\n if (instance) {\n // get an array of method names of watch functions to call\n if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {\n const watchMethods = cmpMeta.$watchers$[propName];\n if (watchMethods) {\n // this instance is watching for when this property changed\n watchMethods.map(watchMethodName => {\n try {\n // fire off each of the watch methods that are watching this property\n instance[watchMethodName](newVal, oldVal, propName);\n } catch (e) {\n consoleError(e, elm);\n }\n });\n }\n }\n if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n // looks like this value actually changed, so we've got work to do!\n // but only if we've already rendered, otherwise just chill out\n // queue that we need to do an update, but don't worry about queuing\n // up millions cuz this function ensures it only runs once\n scheduleUpdate(hostRef, false);\n }\n }\n }\n};\nconst proxyComponent = (Cstr, cmpMeta, flags) => {\n if (cmpMeta.$members$) {\n if (Cstr.watchers) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n // It's better to have a const than two Object.entries()\n const members = Object.entries(cmpMeta.$members$);\n const prototype = Cstr.prototype;\n members.map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* Prop */ || flags & 2 /* proxyState */ && memberFlags & 32 /* State */) {\n // proxyComponent - prop\n Object.defineProperty(prototype, memberName, {\n get() {\n // proxyComponent, get value\n return getValue(this, memberName);\n },\n set(newValue) {\n // proxyComponent, set value\n setValue(this, memberName, newValue, cmpMeta);\n },\n configurable: true,\n enumerable: true\n });\n } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {\n // proxyComponent - method\n Object.defineProperty(prototype, memberName, {\n value(...args) {\n const ref = getHostRef(this);\n return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));\n }\n });\n }\n });\n if (flags & 1 /* isElementConstructor */) {\n const attrNameToPropName = new Map();\n prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {\n plt.jmp(() => {\n const propName = attrNameToPropName.get(attrName);\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n // create an array of attributes to observe\n // and also create a map of html attribute name to js property name\n Cstr.observedAttributes = members.filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes\n .map(([propName, m]) => {\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (m[0] & 512 /* ReflectAttr */) {\n cmpMeta.$attrsToReflect$.push([propName, attrName]);\n }\n return attrName;\n });\n }\n }\n return Cstr;\n};\nconst initializeComponent = /*#__PURE__*/function () {\n var _ref2 = _asyncToGenerator(function* (elm, hostRef, cmpMeta, hmrVersionId, Cstr) {\n // initializeComponent\n if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {\n {\n // we haven't initialized this element yet\n hostRef.$flags$ |= 32 /* hasInitializedComponent */;\n // lazy loaded components\n // request the component's implementation to be\n // wired up with the host element\n Cstr = loadModule(cmpMeta);\n if (Cstr.then) {\n // Await creates a micro-task avoid if possible\n const endLoad = uniqueTime();\n Cstr = yield Cstr;\n endLoad();\n }\n if (!Cstr.isProxied) {\n // we'eve never proxied this Constructor before\n // let's add the getters/setters to its prototype before\n // the first time we create an instance of the implementation\n {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n // ok, time to construct the instance\n // but let's keep track of when we start and stop\n // so that the getters/setters don't incorrectly step on data\n {\n hostRef.$flags$ |= 8 /* isConstructingInstance */;\n }\n // construct the lazy-loaded component implementation\n // passing the hostRef is very important during\n // construction in order to directly wire together the\n // host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n } catch (e) {\n consoleError(e);\n }\n {\n hostRef.$flags$ &= ~8 /* isConstructingInstance */;\n }\n\n {\n hostRef.$flags$ |= 128 /* isWatchReady */;\n }\n\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n if (Cstr.style) {\n // this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (typeof style !== 'string') {\n style = style[hostRef.$modeName$ = computeMode(elm)];\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {\n style = yield import('./shadow-css-a3f00b33.js').then(m => m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n // we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (ancestorComponent && ancestorComponent['s-rc']) {\n // this is the intial load and this component it has an ancestor component\n // but the ancestor component has NOT fired its will update lifecycle yet\n // so let's just cool our jets and wait for the ancestor to continue first\n // this will get fired off when the ancestor component\n // finally gets around to rendering its lazy self\n // fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n } else {\n schedule();\n }\n });\n return function initializeComponent(_x4, _x5, _x6, _x7, _x8) {\n return _ref2.apply(this, arguments);\n };\n}();\nconst fireConnectedCallback = instance => {\n {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = elm => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (!(hostRef.$flags$ & 1 /* hasConnected */)) {\n // first time this component has connected\n hostRef.$flags$ |= 1 /* hasConnected */;\n let hostId;\n {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n const scopeId = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode'));\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (!hostId) {\n // initUpdate\n // if the slot polyfill is required we'll need to put some nodes\n // in here to act as original content anchors as we move nodes around\n // host element has been connected to the DOM\n if (cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */)) {\n setContentReference(elm);\n }\n }\n {\n // find the first ancestor component (if there is one) and register\n // this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {\n // climb up the ancestors looking for the first\n // component that hasn't finished its lifecycle update yet\n if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p'] || ancestorComponent['s-p']) {\n // we found this components first ancestor component\n // keep a reference to this component's ancestor component\n attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);\n break;\n }\n }\n }\n // Lazy properties\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n if (cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n {\n // connectedCallback, taskQueue, initialLoad\n // angular sets attribute AFTER connectCallback\n // https://github.com/angular/angular/issues/18909\n // https://github.com/angular/angular/issues/19940\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n }\n } else {\n // not the first time this has connected\n // reattach any event listeners to the host\n // since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);\n // fire off connectedCallback() on component instance\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n endConnected();\n }\n};\nconst setContentReference = elm => {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n const contentRefElm = elm['s-cr'] = doc.createComment('');\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectedCallback = elm => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const instance = hostRef.$lazyInstance$;\n {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map(rmListener => rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n // clear CSS var-shim tracking\n if (plt.$cssShim$) {\n plt.$cssShim$.removeHost(elm);\n }\n {\n safeCall(instance, 'disconnectedCallback');\n }\n }\n};\nconst bootstrapLazy = (lazyBundles, options = {}) => {\n const endBootstrap = createTime();\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = /*@__PURE__*/head.querySelector('meta[charset]');\n const visibilityStyle = /*@__PURE__*/doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = /*@__PURE__*/doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;\n {\n // If the app is already hydrated there is not point to disable the\n // async queue. This will improve the first input delay\n plt.$flags$ |= 2 /* appLoaded */;\n }\n\n {\n for (; i < styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3]\n };\n {\n cmpMeta.$members$ = compactMeta[2];\n }\n {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n {\n cmpMeta.$attrsToReflect$ = [];\n }\n {\n cmpMeta.$watchers$ = {};\n }\n if (!supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;\n }\n\n const tagName = cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n // StencilLazyHost\n constructor(self) {\n // @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n // this component is using shadow dom\n // and this browser supports shadow dom\n // add the read-only property \"shadowRoot\" to the host element\n // adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */)\n });\n }\n } else if (!('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n // connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n } else {\n plt.jmp(() => connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() => disconnectedCallback(this));\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));\n }\n }));\n\n {\n visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;\n visibilityStyle.setAttribute('data-styles', '');\n head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n // Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map(host => host.connectedCallback());\n } else {\n {\n plt.jmp(() => appLoadFallback = setTimeout(appDidLoad, 30));\n }\n }\n // Fallback appLoad event\n endBootstrap();\n};\nconst getAssetPath = path => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst hostRefs = new WeakMap();\nconst getHostRef = ref => hostRefs.get(ref);\nconst registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);\nconst registerHost = (elm, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: elm,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map()\n };\n {\n hostRef.$onInstancePromise$ = new Promise(r => hostRef.$onInstanceResolve$ = r);\n }\n {\n hostRef.$onReadyPromise$ = new Promise(r => hostRef.$onReadyResolve$ = r);\n elm['s-p'] = [];\n elm['s-rc'] = [];\n }\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);\n return hostRefs.set(elm, hostRef);\n};\nconst isMemberInElement = (elm, memberName) => memberName in elm;\nconst consoleError = (e, el) => (0, console.error)(e, el);\nconst cmpModules = /*@__PURE__*/new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) => {\n // loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(/-/g, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n const module = cmpModules.get(bundleId);\n if (module) {\n return module[exportName];\n }\n return import( /* webpackInclude: /\\.entry\\.js$/ */\n /* webpackExclude: /\\.system\\.entry\\.js$/ */\n /* webpackMode: \"lazy\" */\n `./${bundleId}.entry.js${''}`).then(importedModule => {\n {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = new Map();\nconst modeResolutionChain = [];\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueTask = (queue, write) => cb => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* queueSync */) {\n nextTick(flush);\n } else {\n plt.raf(flush);\n }\n }\n};\nconst consume = queue => {\n for (let i = 0; i < queue.length; i++) {\n try {\n queue[i](performance.now());\n } catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst flush = () => {\n // always force a bunch of medium callbacks to run, but still have\n // a throttle on how many can run in a certain time\n // DOM READS!!!\n consume(queueDomReads);\n // DOM WRITES!!!\n {\n consume(queueDomWrites);\n if (queuePending = queueDomReads.length > 0) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = /*@__PURE__*/cb => promiseResolve().then(cb);\nconst readTask = /*@__PURE__*/queueTask(queueDomReads, false);\nconst writeTask = /*@__PURE__*/queueTask(queueDomWrites, true);\nconst Build = {\n isDev: false,\n isBrowser: true,\n isServer: false,\n isTesting: false\n};\nexport { Build as B, CSS as C, Host as H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, writeTask as c, doc as d, createEvent as e, readTask as f, getMode as g, h, getElement as i, forceUpdate as j, getAssetPath as k, plt as p, registerInstance as r, setMode as s, win as w };","map":{"version":3,"names":["NAMESPACE","scopeId","contentRef","hostTagName","useNativeShadowDom","checkSlotFallbackVisibility","checkSlotRelocate","isSvgMode","queuePending","win","window","CSS","doc","document","head","plt","$flags$","$resourcesUrl$","jmp","h","raf","requestAnimationFrame","ael","el","eventName","listener","opts","addEventListener","rel","removeEventListener","ce","CustomEvent","supportsShadow","attachShadow","indexOf","promiseResolve","v","Promise","resolve","supportsConstructibleStylesheets","CSSStyleSheet","replace","e","addHostEventListeners","elm","hostRef","listeners","attachParentListeners","map","flags","name","method","target","getHostListenerTarget","handler","hostListenerProxy","hostListenerOpts","$rmListeners$","push","methodName","ev","$lazyInstance$","$queuedListeners$","consoleError","body","CONTENT_REF_ID","ORG_LOCATION_ID","SLOT_NODE_ID","TEXT_NODE_ID","HYDRATE_ID","HYDRATED_STYLE_ID","HYDRATE_CHILD_ID","HYDRATED_CSS","XLINK_NS","createTime","fnName","tagName","uniqueTime","key","measureText","rootAppliedStyles","WeakMap","registerStyle","cssText","allowCS","style","styles","get","set","addStyle","styleContainerNode","cmpMeta","mode","hostElm","getScopeId","nodeType","appliedStyles","styleElm","Set","has","host","querySelector","innerHTML","$cssShim$","createHostStyle","newScopeId","createElement","insertBefore","add","adoptedStyleSheets","includes","attachStyles","$cmpMeta$","$hostElement$","endAttachStyles","$tagName$","shadowRoot","getRootNode","$modeName$","classList","cmp","convertScopedToShadow","css","computeMode","modeResolutionChain","find","m","setMode","getMode","ref","getHostRef","EMPTY_OBJ","SVG_NS","HTML_NS","isDef","isComplexType","o","nodeName","vnodeData","children","child","slotName","simple","lastSimple","vNodeChildren","walk","c","i","length","Array","isArray","String","$text$","newVNode","classData","className","class","Object","keys","filter","k","join","vdomFnUtils","vnode","$attrs$","$children$","$key$","$name$","tag","text","$tag$","$elm$","Host","isHost","node","forEach","cb","convertToPublic","convertToPrivate","vattrs","vchildren","vkey","vname","vtag","vtext","assign","setAccessor","memberName","oldValue","newValue","isSvg","isProp","isMemberInElement","ln","toLowerCase","oldClasses","parseClassList","newClasses","remove","prop","removeProperty","setProperty","slice","isComplex","n","xlink","getAttribute","removeAttributeNS","removeAttribute","setAttributeNS","setAttribute","parseClassListRegex","value","split","updateElement","oldVnode","newVnode","oldVnodeAttrs","newVnodeAttrs","undefined","createElm","oldParentVNode","newParentVNode","childIndex","parentElm","childNode","oldVNode","createTextNode","createElementNS","appendChild","putBackInOriginalLocation","recursive","oldSlotChildNodes","childNodes","parentReferenceNode","referenceNode","addVnodes","before","parentVNode","vnodes","startIdx","endIdx","containerElm","parentNode","removeVnodes","callNodeRefs","updateChildren","oldCh","newCh","oldStartIdx","newStartIdx","idxInOld","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","elmToMove","isSameVnode","patch","nextSibling","vnode1","vnode2","oldChildren","newChildren","defaultHolder","textContent","data","updateFallbackSlotVisibility","ilen","j","slotNameAttr","hidden","trim","relocateNodes","relocateSlotContent","hostContentNodes","relocateNodeData","isNodeLocatedInSlot","r","$nodeToRelocate$","$slotRefNode$","relocateNode","some","nodeToRelocate","vNode","renderVdom","renderFnResults","$vnode$","rootVnode","$attrsToReflect$","propName","attribute","relocateData","orgLocationNode","parentNodeRef","insertBeforeNode","refNode","previousSibling","getElement","createEvent","emit","detail","emitEvent","bubbles","composed","cancelable","dispatchEvent","attachToAncestor","ancestorComponent","$onRenderResolve$","scheduleUpdate","isInitialLoad","$ancestorComponent$","dispatch","dispatchHooks","writeTask","endSchedule","instance","promise","event","safeCall","then","updateComponent","_ref","_asyncToGenerator","endUpdate","rc","endRender","callRender","updateHost","childrenPromises","postUpdate","postUpdateComponent","all","_x","_x2","_x3","apply","arguments","render","endPostUpdate","addHydratedFlag","$onReadyResolve$","appDidLoad","$onInstanceResolve$","nextTick","forceUpdate","isConnected","who","documentElement","namespace","arg","thenFn","initializeClientHydrate","hostId","endHydrate","childRenderNodes","slotNodes","shadowRootNodes","$orgLocNodes$","initializeDocumentHydrate","Map","clientHydrate","orgLocationId","$hostId$","$nodeId$","delete","shadowRootNode","childNodeType","childIdSplt","childVNode","$depth$","$index$","nodeValue","orgLocNodes","parsePropertyValue","propValue","propType","parseFloat","getValue","$instanceValues$","setValue","newVal","oldVal","$members$","$watchers$","watchMethods","watchMethodName","proxyComponent","Cstr","watchers","members","entries","prototype","memberFlags","defineProperty","configurable","enumerable","args","$onInstancePromise$","attrNameToPropName","attributeChangedCallback","attrName","_oldValue","observedAttributes","_","initializeComponent","_ref2","hmrVersionId","loadModule","endLoad","isProxied","endNewInstance","fireConnectedCallback","endRegisterStyles","scopeCss","schedule","_x4","_x5","_x6","_x7","_x8","connectedCallback","endConnected","setContentReference","hasAttribute","hasOwnProperty","$listeners$","contentRefElm","createComment","firstChild","disconnectedCallback","rmListener","removeHost","bootstrapLazy","lazyBundles","options","endBootstrap","cmpTags","exclude","customElements","metaCharset","visibilityStyle","deferredConnectedCallbacks","querySelectorAll","appLoadFallback","isBootstrapping","URL","resourcesUrl","baseURI","href","lazyBundle","compactMeta","HostElement","HTMLElement","constructor","self","registerHost","delegatesFocus","clearTimeout","componentOnReady","$onReadyPromise$","$lazyBundleId$","define","setTimeout","getAssetPath","path","assetUrl","origin","location","pathname","hostRefs","registerInstance","lazyInstance","console","error","cmpModules","exportName","bundleId","module","importedModule","queueDomReads","queueDomWrites","queueTask","queue","write","flush","consume","performance","now","readTask","Build","isDev","isBrowser","isServer","isTesting","B","C","H","N","a","b","d","f","g","p","s","w"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/core/dist/esm/index-7a8b7a1c.js"],"sourcesContent":["const NAMESPACE = 'ionic';\n\nlet scopeId;\nlet contentRef;\nlet hostTagName;\nlet useNativeShadowDom = false;\nlet checkSlotFallbackVisibility = false;\nlet checkSlotRelocate = false;\nlet isSvgMode = false;\nlet queuePending = false;\nconst win = typeof window !== 'undefined' ? window : {};\nconst CSS = win.CSS ;\nconst doc = win.document || { head: {} };\nconst plt = {\n $flags$: 0,\n $resourcesUrl$: '',\n jmp: h => h(),\n raf: h => requestAnimationFrame(h),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts),\n};\nconst supportsShadow = /*@__PURE__*/ (() => (doc.head.attachShadow + '').indexOf('[native') > -1)() ;\nconst promiseResolve = (v) => Promise.resolve(v);\nconst supportsConstructibleStylesheets = /*@__PURE__*/ (() => {\n try {\n new CSSStyleSheet();\n return typeof (new CSSStyleSheet()).replace === 'function';\n }\n catch (e) { }\n return false;\n })()\n ;\nconst addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {\n if (listeners) {\n listeners.map(([flags, name, method]) => {\n const target = getHostListenerTarget(elm, flags) ;\n const handler = hostListenerProxy(hostRef, method);\n const opts = hostListenerOpts(flags);\n plt.ael(target, name, handler, opts);\n (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));\n });\n }\n};\nconst hostListenerProxy = (hostRef, methodName) => (ev) => {\n try {\n {\n if (hostRef.$flags$ & 256 /* isListenReady */) {\n // instance is ready, let's call it's member method for this event\n hostRef.$lazyInstance$[methodName](ev);\n }\n else {\n (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);\n }\n }\n }\n catch (e) {\n consoleError(e);\n }\n};\nconst getHostListenerTarget = (elm, flags) => {\n if (flags & 4 /* TargetDocument */)\n return doc;\n if (flags & 8 /* TargetWindow */)\n return win;\n if (flags & 16 /* TargetBody */)\n return doc.body;\n return elm;\n};\n// prettier-ignore\nconst hostListenerOpts = (flags) => (flags & 2 /* Capture */) !== 0;\nconst CONTENT_REF_ID = 'r';\nconst ORG_LOCATION_ID = 'o';\nconst SLOT_NODE_ID = 's';\nconst TEXT_NODE_ID = 't';\nconst HYDRATE_ID = 's-id';\nconst HYDRATED_STYLE_ID = 'sty-id';\nconst HYDRATE_CHILD_ID = 'c-id';\nconst HYDRATED_CSS = '{visibility:hidden}.hydrated{visibility:inherit}';\nconst XLINK_NS = 'http://www.w3.org/1999/xlink';\nconst createTime = (fnName, tagName = '') => {\n {\n return () => {\n return;\n };\n }\n};\nconst uniqueTime = (key, measureText) => {\n {\n return () => {\n return;\n };\n }\n};\nconst rootAppliedStyles = new WeakMap();\nconst registerStyle = (scopeId, cssText, allowCS) => {\n let style = styles.get(scopeId);\n if (supportsConstructibleStylesheets && allowCS) {\n style = (style || new CSSStyleSheet());\n style.replace(cssText);\n }\n else {\n style = cssText;\n }\n styles.set(scopeId, style);\n};\nconst addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {\n let scopeId = getScopeId(cmpMeta, mode);\n let style = styles.get(scopeId);\n // if an element is NOT connected then getRootNode() will return the wrong root node\n // so the fallback is to always use the document for the root node in those cases\n styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;\n if (style) {\n if (typeof style === 'string') {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, (appliedStyles = new Set()));\n }\n if (!appliedStyles.has(scopeId)) {\n if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}=\"${scopeId}\"]`))) {\n // This is only happening on native shadow-dom, do not needs CSS var shim\n styleElm.innerHTML = style;\n }\n else {\n if (plt.$cssShim$) {\n styleElm = plt.$cssShim$.createHostStyle(hostElm, scopeId, style, !!(cmpMeta.$flags$ & 10 /* needsScopedEncapsulation */));\n const newScopeId = styleElm['s-sc'];\n if (newScopeId) {\n scopeId = newScopeId;\n // we don't want to add this styleID to the appliedStyles Set\n // since the cssVarShim might need to apply several different\n // stylesheets for the same component\n appliedStyles = null;\n }\n }\n else {\n styleElm = doc.createElement('style');\n styleElm.innerHTML = style;\n }\n styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId);\n }\n }\n }\n else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];\n }\n }\n return scopeId;\n};\nconst attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime('attachStyles', cmpMeta.$tagName$);\n const scopeId = addStyle(supportsShadow && elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta, hostRef.$modeName$, elm);\n if (flags & 10 /* needsScopedEncapsulation */) {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n // DOM WRITE!!\n elm['s-sc'] = scopeId;\n elm.classList.add(scopeId + '-h');\n if (flags & 2 /* scopedCssEncapsulation */) {\n elm.classList.add(scopeId + '-s');\n }\n }\n endAttachStyles();\n};\nconst getScopeId = (cmp, mode) => 'sc-' + (mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + '-' + mode : cmp.$tagName$);\nconst convertScopedToShadow = (css) => css.replace(/\\/\\*!@([^\\/]+)\\*\\/[^\\{]+\\{/g, '$1{');\n// Private\nconst computeMode = (elm) => modeResolutionChain.map(h => h(elm)).find(m => !!m);\n// Public\nconst setMode = (handler) => modeResolutionChain.push(handler);\nconst getMode = (ref) => getHostRef(ref).$modeName$;\n/**\n * Default style mode id\n */\n/**\n * Reusable empty obj/array\n * Don't add values to these!!\n */\nconst EMPTY_OBJ = {};\n/**\n * Namespaces\n */\nconst SVG_NS = 'http://www.w3.org/2000/svg';\nconst HTML_NS = 'http://www.w3.org/1999/xhtml';\nconst isDef = (v) => v != null;\nconst isComplexType = (o) => {\n // https://jsperf.com/typeof-fn-object/5\n o = typeof o;\n return o === 'object' || o === 'function';\n};\n/**\n * Production h() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\n// const stack: any[] = [];\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;\n// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;\nconst h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let slotName = null;\n let simple = false;\n let lastSimple = false;\n let vNodeChildren = [];\n const walk = (c) => {\n for (let i = 0; i < c.length; i++) {\n child = c[i];\n if (Array.isArray(child)) {\n walk(child);\n }\n else if (child != null && typeof child !== 'boolean') {\n if ((simple = typeof nodeName !== 'function' && !isComplexType(child))) {\n child = String(child);\n }\n if (simple && lastSimple) {\n // If the previous child was simple (string), we merge both\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n }\n else {\n // Append a new vNode, if it's text, we create a text vNode\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n // normalize class / classname attributes\n if (vnodeData.key) {\n key = vnodeData.key;\n }\n if (vnodeData.name) {\n slotName = vnodeData.name;\n }\n {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class =\n typeof classData !== 'object'\n ? classData\n : Object.keys(classData)\n .filter(k => classData[k])\n .join(' ');\n }\n }\n }\n if (typeof nodeName === 'function') {\n // nodeName is a functional component\n return nodeName(vnodeData === null ? {} : vnodeData, vNodeChildren, vdomFnUtils);\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n {\n vnode.$key$ = key;\n }\n {\n vnode.$name$ = slotName;\n }\n return vnode;\n};\nconst newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null,\n };\n {\n vnode.$attrs$ = null;\n }\n {\n vnode.$key$ = null;\n }\n {\n vnode.$name$ = null;\n }\n return vnode;\n};\nconst Host = {};\nconst isHost = (node) => node && node.$tag$ === Host;\nconst vdomFnUtils = {\n forEach: (children, cb) => children.map(convertToPublic).forEach(cb),\n map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate),\n};\nconst convertToPublic = (node) => ({\n vattrs: node.$attrs$,\n vchildren: node.$children$,\n vkey: node.$key$,\n vname: node.$name$,\n vtag: node.$tag$,\n vtext: node.$text$,\n});\nconst convertToPrivate = (node) => {\n if (typeof node.vtag === 'function') {\n const vnodeData = Object.assign({}, node.vattrs);\n if (node.vkey) {\n vnodeData.key = node.vkey;\n }\n if (node.vname) {\n vnodeData.name = node.vname;\n }\n return h(node.vtag, vnodeData, ...(node.vchildren || []));\n }\n const vnode = newVNode(node.vtag, node.vtext);\n vnode.$attrs$ = node.vattrs;\n vnode.$children$ = node.vchildren;\n vnode.$key$ = node.vkey;\n vnode.$name$ = node.vname;\n return vnode;\n};\n/**\n * Production setAccessor() function based on Preact by\n * Jason Miller (@developit)\n * Licensed under the MIT License\n * https://github.com/developit/preact/blob/master/LICENSE\n *\n * Modified for Stencil's compiler and vdom\n */\nconst setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {\n if (oldValue !== newValue) {\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (memberName === 'class') {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n const newClasses = parseClassList(newValue);\n classList.remove(...oldClasses.filter(c => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter(c => c && !oldClasses.includes(c)));\n }\n else if (memberName === 'style') {\n // update style attribute, css properties and values\n {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (prop.includes('-')) {\n elm.style.removeProperty(prop);\n }\n else {\n elm.style[prop] = '';\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (prop.includes('-')) {\n elm.style.setProperty(prop, newValue[prop]);\n }\n else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n }\n else if (memberName === 'key')\n ;\n else if (memberName === 'ref') {\n // minifier will clean this up\n if (newValue) {\n newValue(elm);\n }\n }\n else if ((!isProp ) && memberName[0] === 'o' && memberName[1] === 'n') {\n // Event Handlers\n // so if the member name starts with \"on\" and the 3rd characters is\n // a capital letter, and it's not already a member on the element,\n // then we're assuming it's an event listener\n if (memberName[2] === '-') {\n // on- prefixed events\n // allows to be explicit about the dom event to listen without any magic\n // under the hood:\n // <my-cmp on-click> // listens for \"click\"\n // <my-cmp on-Click> // listens for \"Click\"\n // <my-cmp on-ionChange> // listens for \"ionChange\"\n // <my-cmp on-EVENTS> // listens for \"EVENTS\"\n memberName = memberName.slice(3);\n }\n else if (isMemberInElement(win, ln)) {\n // standard event\n // the JSX attribute could have been \"onMouseOver\" and the\n // member name \"onmouseover\" is on the window's prototype\n // so let's add the listener \"mouseover\", which is all lowercased\n memberName = ln.slice(2);\n }\n else {\n // custom event\n // the JSX attribute could have been \"onMyCustomEvent\"\n // so let's trim off the \"on\" prefix and lowercase the first character\n // and add the listener \"myCustomEvent\"\n // except for the first character, we keep the event name case\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, false);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, false);\n }\n }\n else {\n // Set property if it exists and it's not a SVG\n const isComplex = isComplexType(newValue);\n if ((isProp || (isComplex && newValue !== null)) && !isSvg) {\n try {\n if (!elm.tagName.includes('-')) {\n let n = newValue == null ? '' : newValue;\n // Workaround for Safari, moving the <input> caret when re-assigning the same valued\n if (memberName === 'list') {\n isProp = false;\n // tslint:disable-next-line: triple-equals\n }\n else if (oldValue == null || elm[memberName] != n) {\n elm[memberName] = n;\n }\n }\n else {\n elm[memberName] = newValue;\n }\n }\n catch (e) { }\n }\n /**\n * Need to manually update attribute if:\n * - memberName is not an attribute\n * - if we are rendering the host element in order to reflect attribute\n * - if it's a SVG, since properties might not work in <svg>\n * - if the newValue is null/undefined or 'false'.\n */\n let xlink = false;\n {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, ''))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === '') {\n if (xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n }\n else {\n elm.removeAttribute(memberName);\n }\n }\n }\n else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {\n newValue = newValue === true ? '' : newValue;\n if (xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n }\n else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n }\n};\nconst parseClassListRegex = /\\s/;\nconst parseClassList = (value) => (!value ? [] : value.split(parseClassListRegex));\nconst updateElement = (oldVnode, newVnode, isSvgMode, memberName) => {\n // if the element passed in is a shadow root, which is a document fragment\n // then we want to be adding attrs/props to the shadow root's \"host\" element\n // if it's not a shadow root, then we add attrs/props to the same element\n const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;\n const oldVnodeAttrs = (oldVnode && oldVnode.$attrs$) || EMPTY_OBJ;\n const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;\n {\n // remove attributes no longer present on the vnode by setting them to undefined\n for (memberName in oldVnodeAttrs) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], undefined, isSvgMode, newVnode.$flags$);\n }\n }\n }\n // add new & update changed attributes\n for (memberName in newVnodeAttrs) {\n setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode, newVnode.$flags$);\n }\n};\nconst createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {\n // tslint:disable-next-line: prefer-const\n let newVNode = newParentVNode.$children$[childIndex];\n let i = 0;\n let elm;\n let childNode;\n let oldVNode;\n if (!useNativeShadowDom) {\n // remember for later we need to check to relocate nodes\n checkSlotRelocate = true;\n if (newVNode.$tag$ === 'slot') {\n if (scopeId) {\n // scoped css needs to add its scoped id to the parent element\n parentElm.classList.add(scopeId + '-s');\n }\n newVNode.$flags$ |= newVNode.$children$\n ? // slot element has fallback content\n 2 /* isSlotFallback */\n : // slot element does not have fallback content\n 1 /* isSlotReference */;\n }\n }\n if (newVNode.$text$ !== null) {\n // create text node\n elm = newVNode.$elm$ = doc.createTextNode(newVNode.$text$);\n }\n else if (newVNode.$flags$ & 1 /* isSlotReference */) {\n // create a slot reference node\n elm = newVNode.$elm$ = doc.createTextNode('');\n }\n else {\n if (!isSvgMode) {\n isSvgMode = newVNode.$tag$ === 'svg';\n }\n // create element\n elm = newVNode.$elm$ = (doc.createElementNS(isSvgMode ? SVG_NS : HTML_NS, newVNode.$flags$ & 2 /* isSlotFallback */ ? 'slot-fb' : newVNode.$tag$)\n );\n if (isSvgMode && newVNode.$tag$ === 'foreignObject') {\n isSvgMode = false;\n }\n // add css classes, attrs, props, listeners, etc.\n {\n updateElement(null, newVNode, isSvgMode);\n }\n if (isDef(scopeId) && elm['s-si'] !== scopeId) {\n // if there is a scopeId and this is the initial render\n // then let's add the scopeId as a css class\n elm.classList.add((elm['s-si'] = scopeId));\n }\n if (newVNode.$children$) {\n for (i = 0; i < newVNode.$children$.length; ++i) {\n // create the node\n childNode = createElm(oldParentVNode, newVNode, i, elm);\n // return node could have been null\n if (childNode) {\n // append our new node\n elm.appendChild(childNode);\n }\n }\n }\n {\n if (newVNode.$tag$ === 'svg') {\n // Only reset the SVG context when we're exiting <svg> element\n isSvgMode = false;\n }\n else if (elm.tagName === 'foreignObject') {\n // Reenter SVG context when we're exiting <foreignObject> element\n isSvgMode = true;\n }\n }\n }\n {\n elm['s-hn'] = hostTagName;\n if (newVNode.$flags$ & (2 /* isSlotFallback */ | 1 /* isSlotReference */)) {\n // remember the content reference comment\n elm['s-sr'] = true;\n // remember the content reference comment\n elm['s-cr'] = contentRef;\n // remember the slot name, or empty string for default slot\n elm['s-sn'] = newVNode.$name$ || '';\n // check if we've got an old vnode for this slot\n oldVNode = oldParentVNode && oldParentVNode.$children$ && oldParentVNode.$children$[childIndex];\n if (oldVNode && oldVNode.$tag$ === newVNode.$tag$ && oldParentVNode.$elm$) {\n // we've got an old slot vnode and the wrapper is being replaced\n // so let's move the old slot content back to it's original location\n putBackInOriginalLocation(oldParentVNode.$elm$, false);\n }\n }\n }\n return elm;\n};\nconst putBackInOriginalLocation = (parentElm, recursive) => {\n plt.$flags$ |= 1 /* isTmpDisconnected */;\n const oldSlotChildNodes = parentElm.childNodes;\n for (let i = oldSlotChildNodes.length - 1; i >= 0; i--) {\n const childNode = oldSlotChildNodes[i];\n if (childNode['s-hn'] !== hostTagName && childNode['s-ol']) {\n // // this child node in the old element is from another component\n // // remove this node from the old slot's parent\n // childNode.remove();\n // and relocate it back to it's original location\n parentReferenceNode(childNode).insertBefore(childNode, referenceNode(childNode));\n // remove the old original location comment entirely\n // later on the patch function will know what to do\n // and move this to the correct spot in need be\n childNode['s-ol'].remove();\n childNode['s-ol'] = undefined;\n checkSlotRelocate = true;\n }\n if (recursive) {\n putBackInOriginalLocation(childNode, recursive);\n }\n }\n plt.$flags$ &= ~1 /* isTmpDisconnected */;\n};\nconst addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = ((parentElm['s-cr'] && parentElm['s-cr'].parentNode) || parentElm);\n let childNode;\n if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx, parentElm);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n containerElm.insertBefore(childNode, referenceNode(before) );\n }\n }\n }\n};\nconst removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {\n for (; startIdx <= endIdx; ++startIdx) {\n if ((vnode = vnodes[startIdx])) {\n elm = vnode.$elm$;\n callNodeRefs(vnode);\n {\n // we're removing this element\n // so it's possible we need to show slot fallback content now\n checkSlotFallbackVisibility = true;\n if (elm['s-ol']) {\n // remove the original location comment\n elm['s-ol'].remove();\n }\n else {\n // it's possible that child nodes of the node\n // that's being removed are slot nodes\n putBackInOriginalLocation(elm, true);\n }\n }\n // remove the vnode's element from the dom\n elm.remove();\n }\n }\n};\nconst updateChildren = (parentElm, oldCh, newVNode, newCh) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n // Vnode might have been moved left\n oldStartVnode = oldCh[++oldStartIdx];\n }\n else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n }\n else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n }\n else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newStartVnode)) {\n patch(oldStartVnode, newStartVnode);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else if (isSameVnode(oldEndVnode, newEndVnode)) {\n patch(oldEndVnode, newEndVnode);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldStartVnode, newEndVnode)) {\n // Vnode moved right\n if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);\n }\n patch(oldStartVnode, newEndVnode);\n parentElm.insertBefore(oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n }\n else if (isSameVnode(oldEndVnode, newStartVnode)) {\n // Vnode moved left\n if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {\n putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);\n }\n patch(oldEndVnode, newStartVnode);\n parentElm.insertBefore(oldEndVnode.$elm$, oldStartVnode.$elm$);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n // createKeyToOldIdx\n idxInOld = -1;\n {\n for (i = oldStartIdx; i <= oldEndIdx; ++i) {\n if (oldCh[i] && oldCh[i].$key$ !== null && oldCh[i].$key$ === newStartVnode.$key$) {\n idxInOld = i;\n break;\n }\n }\n }\n if (idxInOld >= 0) {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.$tag$ !== newStartVnode.$tag$) {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);\n }\n else {\n patch(elmToMove, newStartVnode);\n oldCh[idxInOld] = undefined;\n node = elmToMove.$elm$;\n }\n newStartVnode = newCh[++newStartIdx];\n }\n else {\n // new element\n node = createElm(oldCh && oldCh[newStartIdx], newVNode, newStartIdx, parentElm);\n newStartVnode = newCh[++newStartIdx];\n }\n if (node) {\n {\n parentReferenceNode(oldStartVnode.$elm$).insertBefore(node, referenceNode(oldStartVnode.$elm$));\n }\n }\n }\n }\n if (oldStartIdx > oldEndIdx) {\n addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode, newCh, newStartIdx, newEndIdx);\n }\n else if (newStartIdx > newEndIdx) {\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n }\n};\nconst isSameVnode = (vnode1, vnode2) => {\n // compare if two vnode to see if they're \"technically\" the same\n // need to have the same element tag, and same key to be the same\n if (vnode1.$tag$ === vnode2.$tag$) {\n if (vnode1.$tag$ === 'slot') {\n return vnode1.$name$ === vnode2.$name$;\n }\n {\n return vnode1.$key$ === vnode2.$key$;\n }\n }\n return false;\n};\nconst referenceNode = (node) => {\n // this node was relocated to a new location in the dom\n // because of some other component's slot\n // but we still have an html comment in place of where\n // it's original location was according to it's original vdom\n return (node && node['s-ol']) || node;\n};\nconst parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).parentNode;\nconst patch = (oldVNode, newVNode) => {\n const elm = (newVNode.$elm$ = oldVNode.$elm$);\n const oldChildren = oldVNode.$children$;\n const newChildren = newVNode.$children$;\n const tag = newVNode.$tag$;\n const text = newVNode.$text$;\n let defaultHolder;\n if (text === null) {\n {\n // test if we're rendering an svg element, or still rendering nodes inside of one\n // only add this to the when the compiler sees we're using an svg somewhere\n isSvgMode = tag === 'svg' ? true : tag === 'foreignObject' ? false : isSvgMode;\n }\n // element node\n {\n if (tag === 'slot')\n ;\n else {\n // either this is the first render of an element OR it's an update\n // AND we already know it's possible it could have changed\n // this updates the element's css classes, attrs, props, listeners, etc.\n updateElement(oldVNode, newVNode, isSvgMode);\n }\n }\n if (oldChildren !== null && newChildren !== null) {\n // looks like there's child vnodes for both the old and new vnodes\n updateChildren(elm, oldChildren, newVNode, newChildren);\n }\n else if (newChildren !== null) {\n // no old child vnodes, but there are new child vnodes to add\n if (oldVNode.$text$ !== null) {\n // the old vnode was text, so be sure to clear it out\n elm.textContent = '';\n }\n // add the new vnode children\n addVnodes(elm, null, newVNode, newChildren, 0, newChildren.length - 1);\n }\n else if (oldChildren !== null) {\n // no new child vnodes, but there are old child vnodes to remove\n removeVnodes(oldChildren, 0, oldChildren.length - 1);\n }\n if (isSvgMode && tag === 'svg') {\n isSvgMode = false;\n }\n }\n else if ((defaultHolder = elm['s-cr'])) {\n // this element has slotted content\n defaultHolder.parentNode.textContent = text;\n }\n else if (oldVNode.$text$ !== text) {\n // update the text content for the text only vnode\n // and also only if the text is different than before\n elm.data = text;\n }\n};\nconst updateFallbackSlotVisibility = (elm) => {\n // tslint:disable-next-line: prefer-const\n let childNodes = elm.childNodes;\n let childNode;\n let i;\n let ilen;\n let j;\n let slotNameAttr;\n let nodeType;\n for (i = 0, ilen = childNodes.length; i < ilen; i++) {\n childNode = childNodes[i];\n if (childNode.nodeType === 1 /* ElementNode */) {\n if (childNode['s-sr']) {\n // this is a slot fallback node\n // get the slot name for this slot reference node\n slotNameAttr = childNode['s-sn'];\n // by default always show a fallback slot node\n // then hide it if there are other slots in the light dom\n childNode.hidden = false;\n for (j = 0; j < ilen; j++) {\n nodeType = childNodes[j].nodeType;\n if (childNodes[j]['s-hn'] !== childNode['s-hn'] || slotNameAttr !== '') {\n // this sibling node is from a different component OR is a named fallback slot node\n if (nodeType === 1 /* ElementNode */ && slotNameAttr === childNodes[j].getAttribute('slot')) {\n childNode.hidden = true;\n break;\n }\n }\n else {\n // this is a default fallback slot node\n // any element or text node (with content)\n // should hide the default fallback slot node\n if (nodeType === 1 /* ElementNode */ ||\n (nodeType === 3 /* TextNode */ && childNodes[j].textContent.trim() !== '')) {\n childNode.hidden = true;\n break;\n }\n }\n }\n }\n // keep drilling down\n updateFallbackSlotVisibility(childNode);\n }\n }\n};\nconst relocateNodes = [];\nconst relocateSlotContent = (elm) => {\n // tslint:disable-next-line: prefer-const\n let childNode;\n let node;\n let hostContentNodes;\n let slotNameAttr;\n let relocateNodeData;\n let j;\n let i = 0;\n let childNodes = elm.childNodes;\n let ilen = childNodes.length;\n for (; i < ilen; i++) {\n childNode = childNodes[i];\n if (childNode['s-sr'] && (node = childNode['s-cr']) && node.parentNode) {\n // first got the content reference comment node\n // then we got it's parent, which is where all the host content is in now\n hostContentNodes = node.parentNode.childNodes;\n slotNameAttr = childNode['s-sn'];\n for (j = hostContentNodes.length - 1; j >= 0; j--) {\n node = hostContentNodes[j];\n if (!node['s-cn'] && !node['s-nr'] && node['s-hn'] !== childNode['s-hn']) {\n // let's do some relocating to its new home\n // but never relocate a content reference node\n // that is suppose to always represent the original content location\n if (isNodeLocatedInSlot(node, slotNameAttr)) {\n // it's possible we've already decided to relocate this node\n relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);\n // made some changes to slots\n // let's make sure we also double check\n // fallbacks are correctly hidden or shown\n checkSlotFallbackVisibility = true;\n node['s-sn'] = node['s-sn'] || slotNameAttr;\n if (relocateNodeData) {\n // previously we never found a slot home for this node\n // but turns out we did, so let's remember it now\n relocateNodeData.$slotRefNode$ = childNode;\n }\n else {\n // add to our list of nodes to relocate\n relocateNodes.push({\n $slotRefNode$: childNode,\n $nodeToRelocate$: node,\n });\n }\n if (node['s-sr']) {\n relocateNodes.map(relocateNode => {\n if (isNodeLocatedInSlot(relocateNode.$nodeToRelocate$, node['s-sn'])) {\n relocateNodeData = relocateNodes.find(r => r.$nodeToRelocate$ === node);\n if (relocateNodeData && !relocateNode.$slotRefNode$) {\n relocateNode.$slotRefNode$ = relocateNodeData.$slotRefNode$;\n }\n }\n });\n }\n }\n else if (!relocateNodes.some(r => r.$nodeToRelocate$ === node)) {\n // so far this element does not have a slot home, not setting slotRefNode on purpose\n // if we never find a home for this element then we'll need to hide it\n relocateNodes.push({\n $nodeToRelocate$: node,\n });\n }\n }\n }\n }\n if (childNode.nodeType === 1 /* ElementNode */) {\n relocateSlotContent(childNode);\n }\n }\n};\nconst isNodeLocatedInSlot = (nodeToRelocate, slotNameAttr) => {\n if (nodeToRelocate.nodeType === 1 /* ElementNode */) {\n if (nodeToRelocate.getAttribute('slot') === null && slotNameAttr === '') {\n return true;\n }\n if (nodeToRelocate.getAttribute('slot') === slotNameAttr) {\n return true;\n }\n return false;\n }\n if (nodeToRelocate['s-sn'] === slotNameAttr) {\n return true;\n }\n return slotNameAttr === '';\n};\nconst callNodeRefs = (vNode) => {\n {\n vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);\n vNode.$children$ && vNode.$children$.map(callNodeRefs);\n }\n};\nconst renderVdom = (hostRef, renderFnResults) => {\n const hostElm = hostRef.$hostElement$;\n const cmpMeta = hostRef.$cmpMeta$;\n const oldVNode = hostRef.$vnode$ || newVNode(null, null);\n const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);\n hostTagName = hostElm.tagName;\n if (cmpMeta.$attrsToReflect$) {\n rootVnode.$attrs$ = rootVnode.$attrs$ || {};\n cmpMeta.$attrsToReflect$.map(([propName, attribute]) => (rootVnode.$attrs$[attribute] = hostElm[propName]));\n }\n rootVnode.$tag$ = null;\n rootVnode.$flags$ |= 4 /* isHost */;\n hostRef.$vnode$ = rootVnode;\n rootVnode.$elm$ = oldVNode.$elm$ = (hostElm.shadowRoot || hostElm );\n {\n scopeId = hostElm['s-sc'];\n }\n {\n contentRef = hostElm['s-cr'];\n useNativeShadowDom = supportsShadow && (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;\n // always reset\n checkSlotFallbackVisibility = false;\n }\n // synchronous patch\n patch(oldVNode, rootVnode);\n {\n // while we're moving nodes around existing nodes, temporarily disable\n // the disconnectCallback from working\n plt.$flags$ |= 1 /* isTmpDisconnected */;\n if (checkSlotRelocate) {\n relocateSlotContent(rootVnode.$elm$);\n let relocateData;\n let nodeToRelocate;\n let orgLocationNode;\n let parentNodeRef;\n let insertBeforeNode;\n let refNode;\n let i = 0;\n for (; i < relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (!nodeToRelocate['s-ol']) {\n // add a reference node marking this node's original location\n // keep a reference to this node for later lookups\n orgLocationNode = doc.createTextNode('');\n orgLocationNode['s-nr'] = nodeToRelocate;\n nodeToRelocate.parentNode.insertBefore((nodeToRelocate['s-ol'] = orgLocationNode), nodeToRelocate);\n }\n }\n for (i = 0; i < relocateNodes.length; i++) {\n relocateData = relocateNodes[i];\n nodeToRelocate = relocateData.$nodeToRelocate$;\n if (relocateData.$slotRefNode$) {\n // by default we're just going to insert it directly\n // after the slot reference node\n parentNodeRef = relocateData.$slotRefNode$.parentNode;\n insertBeforeNode = relocateData.$slotRefNode$.nextSibling;\n orgLocationNode = nodeToRelocate['s-ol'];\n while ((orgLocationNode = orgLocationNode.previousSibling)) {\n refNode = orgLocationNode['s-nr'];\n if (refNode && refNode['s-sn'] === nodeToRelocate['s-sn'] && parentNodeRef === refNode.parentNode) {\n refNode = refNode.nextSibling;\n if (!refNode || !refNode['s-nr']) {\n insertBeforeNode = refNode;\n break;\n }\n }\n }\n if ((!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode) || nodeToRelocate.nextSibling !== insertBeforeNode) {\n // we've checked that it's worth while to relocate\n // since that the node to relocate\n // has a different next sibling or parent relocated\n if (nodeToRelocate !== insertBeforeNode) {\n if (!nodeToRelocate['s-hn'] && nodeToRelocate['s-ol']) {\n // probably a component in the index.html that doesn't have it's hostname set\n nodeToRelocate['s-hn'] = nodeToRelocate['s-ol'].parentNode.nodeName;\n }\n // add it back to the dom but in its new home\n parentNodeRef.insertBefore(nodeToRelocate, insertBeforeNode);\n }\n }\n }\n else {\n // this node doesn't have a slot home to go to, so let's hide it\n if (nodeToRelocate.nodeType === 1 /* ElementNode */) {\n nodeToRelocate.hidden = true;\n }\n }\n }\n }\n if (checkSlotFallbackVisibility) {\n updateFallbackSlotVisibility(rootVnode.$elm$);\n }\n // done moving nodes around\n // allow the disconnect callback to work again\n plt.$flags$ &= ~1 /* isTmpDisconnected */;\n // always reset\n relocateNodes.length = 0;\n }\n};\nconst getElement = (ref) => (getHostRef(ref).$hostElement$ );\nconst createEvent = (ref, name, flags) => {\n const elm = getElement(ref);\n return {\n emit: (detail) => {\n return emitEvent(elm, name, {\n bubbles: !!(flags & 4 /* Bubbles */),\n composed: !!(flags & 2 /* Composed */),\n cancelable: !!(flags & 1 /* Cancellable */),\n detail,\n });\n },\n };\n};\nconst emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nconst attachToAncestor = (hostRef, ancestorComponent) => {\n if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent['s-p']) {\n ancestorComponent['s-p'].push(new Promise(r => (hostRef.$onRenderResolve$ = r)));\n }\n};\nconst scheduleUpdate = (hostRef, isInitialLoad) => {\n {\n hostRef.$flags$ |= 16 /* isQueuedForUpdate */;\n }\n if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {\n hostRef.$flags$ |= 512 /* needsRerender */;\n return;\n }\n attachToAncestor(hostRef, hostRef.$ancestorComponent$);\n // there is no ancestor component or the ancestor component\n // has already fired off its lifecycle update then\n // fire off the initial update\n const dispatch = () => dispatchHooks(hostRef, isInitialLoad);\n return writeTask(dispatch) ;\n};\nconst dispatchHooks = (hostRef, isInitialLoad) => {\n const endSchedule = createTime('scheduleUpdate', hostRef.$cmpMeta$.$tagName$);\n const instance = hostRef.$lazyInstance$ ;\n let promise;\n if (isInitialLoad) {\n {\n hostRef.$flags$ |= 256 /* isListenReady */;\n if (hostRef.$queuedListeners$) {\n hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));\n hostRef.$queuedListeners$ = null;\n }\n }\n {\n promise = safeCall(instance, 'componentWillLoad');\n }\n }\n {\n promise = then(promise, () => safeCall(instance, 'componentWillRender'));\n }\n endSchedule();\n return then(promise, () => updateComponent(hostRef, instance, isInitialLoad));\n};\nconst updateComponent = async (hostRef, instance, isInitialLoad) => {\n // updateComponent\n const elm = hostRef.$hostElement$;\n const endUpdate = createTime('update', hostRef.$cmpMeta$.$tagName$);\n const rc = elm['s-rc'];\n if (isInitialLoad) {\n // DOM WRITE!\n attachStyles(hostRef);\n }\n const endRender = createTime('render', hostRef.$cmpMeta$.$tagName$);\n {\n callRender(hostRef, instance);\n }\n if (plt.$cssShim$) {\n plt.$cssShim$.updateHost(elm);\n }\n if (rc) {\n // ok, so turns out there are some child host elements\n // waiting on this parent element to load\n // let's fire off all update callbacks waiting\n rc.map(cb => cb());\n elm['s-rc'] = undefined;\n }\n endRender();\n endUpdate();\n {\n const childrenPromises = elm['s-p'];\n const postUpdate = () => postUpdateComponent(hostRef);\n if (childrenPromises.length === 0) {\n postUpdate();\n }\n else {\n Promise.all(childrenPromises).then(postUpdate);\n hostRef.$flags$ |= 4 /* isWaitingForChildren */;\n childrenPromises.length = 0;\n }\n }\n};\nconst callRender = (hostRef, instance, elm) => {\n try {\n instance = instance.render && instance.render();\n {\n hostRef.$flags$ &= ~16 /* isQueuedForUpdate */;\n }\n {\n hostRef.$flags$ |= 2 /* hasRendered */;\n }\n {\n {\n // looks like we've got child nodes to render into this host element\n // or we need to update the css class/attrs on the host element\n // DOM WRITE!\n {\n renderVdom(hostRef, instance);\n }\n }\n }\n }\n catch (e) {\n consoleError(e, hostRef.$hostElement$);\n }\n return null;\n};\nconst postUpdateComponent = (hostRef) => {\n const tagName = hostRef.$cmpMeta$.$tagName$;\n const elm = hostRef.$hostElement$;\n const endPostUpdate = createTime('postUpdate', tagName);\n const instance = hostRef.$lazyInstance$ ;\n const ancestorComponent = hostRef.$ancestorComponent$;\n if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {\n hostRef.$flags$ |= 64 /* hasLoadedComponent */;\n {\n // DOM WRITE!\n addHydratedFlag(elm);\n }\n {\n safeCall(instance, 'componentDidLoad');\n }\n endPostUpdate();\n {\n hostRef.$onReadyResolve$(elm);\n if (!ancestorComponent) {\n appDidLoad();\n }\n }\n }\n else {\n {\n safeCall(instance, 'componentDidUpdate');\n }\n endPostUpdate();\n }\n {\n hostRef.$onInstanceResolve$(elm);\n }\n // load events fire from bottom to top\n // the deepest elements load first then bubbles up\n {\n if (hostRef.$onRenderResolve$) {\n hostRef.$onRenderResolve$();\n hostRef.$onRenderResolve$ = undefined;\n }\n if (hostRef.$flags$ & 512 /* needsRerender */) {\n nextTick(() => scheduleUpdate(hostRef, false));\n }\n hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);\n }\n // ( •_•)\n // ( •_•)>⌐■-■\n // (⌐■_■)\n};\nconst forceUpdate = (ref) => {\n {\n const hostRef = getHostRef(ref);\n const isConnected = hostRef.$hostElement$.isConnected;\n if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n scheduleUpdate(hostRef, false);\n }\n // Returns \"true\" when the forced update was successfully scheduled\n return isConnected;\n }\n};\nconst appDidLoad = (who) => {\n // on appload\n // we have finish the first big initial render\n {\n addHydratedFlag(doc.documentElement);\n }\n nextTick(() => emitEvent(win, 'appload', { detail: { namespace: NAMESPACE } }));\n};\nconst safeCall = (instance, method, arg) => {\n if (instance && instance[method]) {\n try {\n return instance[method](arg);\n }\n catch (e) {\n consoleError(e);\n }\n }\n return undefined;\n};\nconst then = (promise, thenFn) => {\n return promise && promise.then ? promise.then(thenFn) : thenFn();\n};\nconst addHydratedFlag = (elm) => (elm.classList.add('hydrated') );\nconst initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {\n const endHydrate = createTime('hydrateClient', tagName);\n const shadowRoot = hostElm.shadowRoot;\n const childRenderNodes = [];\n const slotNodes = [];\n const shadowRootNodes = shadowRoot ? [] : null;\n const vnode = (hostRef.$vnode$ = newVNode(tagName, null));\n if (!plt.$orgLocNodes$) {\n initializeDocumentHydrate(doc.body, (plt.$orgLocNodes$ = new Map()));\n }\n hostElm[HYDRATE_ID] = hostId;\n hostElm.removeAttribute(HYDRATE_ID);\n clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);\n childRenderNodes.map(c => {\n const orgLocationId = c.$hostId$ + '.' + c.$nodeId$;\n const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);\n const node = c.$elm$;\n if (orgLocationNode && supportsShadow && orgLocationNode['s-en'] === '') {\n orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);\n }\n if (!shadowRoot) {\n node['s-hn'] = tagName;\n if (orgLocationNode) {\n node['s-ol'] = orgLocationNode;\n node['s-ol']['s-nr'] = node;\n }\n }\n plt.$orgLocNodes$.delete(orgLocationId);\n });\n if (shadowRoot) {\n shadowRootNodes.map(shadowRootNode => {\n if (shadowRootNode) {\n shadowRoot.appendChild(shadowRootNode);\n }\n });\n }\n endHydrate();\n};\nconst clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {\n let childNodeType;\n let childIdSplt;\n let childVNode;\n let i;\n if (node.nodeType === 1 /* ElementNode */) {\n childNodeType = node.getAttribute(HYDRATE_CHILD_ID);\n if (childNodeType) {\n // got the node data from the element's attribute\n // `${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = childNodeType.split('.');\n if (childIdSplt[0] === hostId || childIdSplt[0] === '0') {\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[0],\n $nodeId$: childIdSplt[1],\n $depth$: childIdSplt[2],\n $index$: childIdSplt[3],\n $tag$: node.tagName.toLowerCase(),\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $text$: null,\n };\n childRenderNodes.push(childVNode);\n node.removeAttribute(HYDRATE_CHILD_ID);\n // this is a new child vnode\n // so ensure its parent vnode has the vchildren array\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n // add our child vnode to a specific index of the vnode's children\n parentVNode.$children$[childVNode.$index$] = childVNode;\n // this is now the new parent vnode for all the next child checks\n parentVNode = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n // recursively drill down, end to start so we can remove nodes\n for (i = node.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.childNodes[i], hostId);\n }\n if (node.shadowRoot) {\n // keep drilling down through the shadow root nodes\n for (i = node.shadowRoot.childNodes.length - 1; i >= 0; i--) {\n clientHydrate(parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node.shadowRoot.childNodes[i], hostId);\n }\n }\n }\n else if (node.nodeType === 8 /* CommentNode */) {\n // `${COMMENT_TYPE}.${hostId}.${nodeId}.${depth}.${index}`\n childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[1] === hostId || childIdSplt[1] === '0') {\n // comment node for either the host id or a 0 host id\n childNodeType = childIdSplt[0];\n childVNode = {\n $flags$: 0,\n $hostId$: childIdSplt[1],\n $nodeId$: childIdSplt[2],\n $depth$: childIdSplt[3],\n $index$: childIdSplt[4],\n $elm$: node,\n $attrs$: null,\n $children$: null,\n $key$: null,\n $name$: null,\n $tag$: null,\n $text$: null,\n };\n if (childNodeType === TEXT_NODE_ID) {\n childVNode.$elm$ = node.nextSibling;\n if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {\n childVNode.$text$ = childVNode.$elm$.textContent;\n childRenderNodes.push(childVNode);\n // remove the text comment since it's no longer needed\n node.remove();\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n if (shadowRootNodes && childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n }\n else if (childVNode.$hostId$ === hostId) {\n // this comment node is specifcally for this host id\n if (childNodeType === SLOT_NODE_ID) {\n // `${SLOT_NODE_ID}.${hostId}.${nodeId}.${depth}.${index}.${slotName}`;\n childVNode.$tag$ = 'slot';\n if (childIdSplt[5]) {\n node['s-sn'] = childVNode.$name$ = childIdSplt[5];\n }\n else {\n node['s-sn'] = '';\n }\n node['s-sr'] = true;\n if (shadowRootNodes) {\n // browser support shadowRoot and this is a shadow dom component\n // create an actual slot element\n childVNode.$elm$ = doc.createElement(childVNode.$tag$);\n if (childVNode.$name$) {\n // add the slot name attribute\n childVNode.$elm$.setAttribute('name', childVNode.$name$);\n }\n // insert the new slot element before the slot comment\n node.parentNode.insertBefore(childVNode.$elm$, node);\n // remove the slot comment since it's not needed for shadow\n node.remove();\n if (childVNode.$depth$ === '0') {\n shadowRootNodes[childVNode.$index$] = childVNode.$elm$;\n }\n }\n slotNodes.push(childVNode);\n if (!parentVNode.$children$) {\n parentVNode.$children$ = [];\n }\n parentVNode.$children$[childVNode.$index$] = childVNode;\n }\n else if (childNodeType === CONTENT_REF_ID) {\n // `${CONTENT_REF_ID}.${hostId}`;\n if (shadowRootNodes) {\n // remove the content ref comment since it's not needed for shadow\n node.remove();\n }\n else {\n hostElm['s-cr'] = node;\n node['s-cn'] = true;\n }\n }\n }\n }\n }\n else if (parentVNode && parentVNode.$tag$ === 'style') {\n const vnode = newVNode(null, node.textContent);\n vnode.$elm$ = node;\n vnode.$index$ = '0';\n parentVNode.$children$ = [vnode];\n }\n};\nconst initializeDocumentHydrate = (node, orgLocNodes) => {\n if (node.nodeType === 1 /* ElementNode */) {\n let i = 0;\n for (; i < node.childNodes.length; i++) {\n initializeDocumentHydrate(node.childNodes[i], orgLocNodes);\n }\n if (node.shadowRoot) {\n for (i = 0; i < node.shadowRoot.childNodes.length; i++) {\n initializeDocumentHydrate(node.shadowRoot.childNodes[i], orgLocNodes);\n }\n }\n }\n else if (node.nodeType === 8 /* CommentNode */) {\n const childIdSplt = node.nodeValue.split('.');\n if (childIdSplt[0] === ORG_LOCATION_ID) {\n orgLocNodes.set(childIdSplt[1] + '.' + childIdSplt[2], node);\n node.nodeValue = '';\n // useful to know if the original location is\n // the root light-dom of a shadow dom component\n node['s-en'] = childIdSplt[3];\n }\n }\n};\nconst parsePropertyValue = (propValue, propType) => {\n // ensure this value is of the correct prop type\n if (propValue != null && !isComplexType(propValue)) {\n if (propType & 4 /* Boolean */) {\n // per the HTML spec, any string value means it is a boolean true value\n // but we'll cheat here and say that the string \"false\" is the boolean false\n return propValue === 'false' ? false : propValue === '' || !!propValue;\n }\n if (propType & 2 /* Number */) {\n // force it to be a number\n return parseFloat(propValue);\n }\n if (propType & 1 /* String */) {\n // could have been passed as a number or boolean\n // but we still want it as a string\n return String(propValue);\n }\n // redundant return here for better minification\n return propValue;\n }\n // not sure exactly what type we want\n // so no need to change to a different type\n return propValue;\n};\nconst getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);\nconst setValue = (ref, propName, newVal, cmpMeta) => {\n // check our new property value against our internal value\n const hostRef = getHostRef(ref);\n const elm = hostRef.$hostElement$ ;\n const oldVal = hostRef.$instanceValues$.get(propName);\n const flags = hostRef.$flags$;\n const instance = hostRef.$lazyInstance$ ;\n newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);\n if ((!(flags & 8 /* isConstructingInstance */) || oldVal === undefined) && newVal !== oldVal) {\n // gadzooks! the property's value has changed!!\n // set our new value!\n hostRef.$instanceValues$.set(propName, newVal);\n if (instance) {\n // get an array of method names of watch functions to call\n if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {\n const watchMethods = cmpMeta.$watchers$[propName];\n if (watchMethods) {\n // this instance is watching for when this property changed\n watchMethods.map(watchMethodName => {\n try {\n // fire off each of the watch methods that are watching this property\n instance[watchMethodName](newVal, oldVal, propName);\n }\n catch (e) {\n consoleError(e, elm);\n }\n });\n }\n }\n if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n // looks like this value actually changed, so we've got work to do!\n // but only if we've already rendered, otherwise just chill out\n // queue that we need to do an update, but don't worry about queuing\n // up millions cuz this function ensures it only runs once\n scheduleUpdate(hostRef, false);\n }\n }\n }\n};\nconst proxyComponent = (Cstr, cmpMeta, flags) => {\n if (cmpMeta.$members$) {\n if (Cstr.watchers) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n // It's better to have a const than two Object.entries()\n const members = Object.entries(cmpMeta.$members$);\n const prototype = Cstr.prototype;\n members.map(([memberName, [memberFlags]]) => {\n if ((memberFlags & 31 /* Prop */ || ((flags & 2 /* proxyState */) && memberFlags & 32 /* State */))) {\n // proxyComponent - prop\n Object.defineProperty(prototype, memberName, {\n get() {\n // proxyComponent, get value\n return getValue(this, memberName);\n },\n set(newValue) {\n // proxyComponent, set value\n setValue(this, memberName, newValue, cmpMeta);\n },\n configurable: true,\n enumerable: true,\n });\n }\n else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {\n // proxyComponent - method\n Object.defineProperty(prototype, memberName, {\n value(...args) {\n const ref = getHostRef(this);\n return ref.$onInstancePromise$.then(() => ref.$lazyInstance$[memberName](...args));\n },\n });\n }\n });\n if ((flags & 1 /* isElementConstructor */)) {\n const attrNameToPropName = new Map();\n prototype.attributeChangedCallback = function (attrName, _oldValue, newValue) {\n plt.jmp(() => {\n const propName = attrNameToPropName.get(attrName);\n this[propName] = newValue === null && typeof this[propName] === 'boolean' ? false : newValue;\n });\n };\n // create an array of attributes to observe\n // and also create a map of html attribute name to js property name\n Cstr.observedAttributes = members\n .filter(([_, m]) => m[0] & 15 /* HasAttribute */) // filter to only keep props that should match attributes\n .map(([propName, m]) => {\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (m[0] & 512 /* ReflectAttr */) {\n cmpMeta.$attrsToReflect$.push([propName, attrName]);\n }\n return attrName;\n });\n }\n }\n return Cstr;\n};\nconst initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) => {\n // initializeComponent\n if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {\n {\n // we haven't initialized this element yet\n hostRef.$flags$ |= 32 /* hasInitializedComponent */;\n // lazy loaded components\n // request the component's implementation to be\n // wired up with the host element\n Cstr = loadModule(cmpMeta);\n if (Cstr.then) {\n // Await creates a micro-task avoid if possible\n const endLoad = uniqueTime();\n Cstr = await Cstr;\n endLoad();\n }\n if (!Cstr.isProxied) {\n // we'eve never proxied this Constructor before\n // let's add the getters/setters to its prototype before\n // the first time we create an instance of the implementation\n {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);\n Cstr.isProxied = true;\n }\n const endNewInstance = createTime('createInstance', cmpMeta.$tagName$);\n // ok, time to construct the instance\n // but let's keep track of when we start and stop\n // so that the getters/setters don't incorrectly step on data\n {\n hostRef.$flags$ |= 8 /* isConstructingInstance */;\n }\n // construct the lazy-loaded component implementation\n // passing the hostRef is very important during\n // construction in order to directly wire together the\n // host element and the lazy-loaded instance\n try {\n new Cstr(hostRef);\n }\n catch (e) {\n consoleError(e);\n }\n {\n hostRef.$flags$ &= ~8 /* isConstructingInstance */;\n }\n {\n hostRef.$flags$ |= 128 /* isWatchReady */;\n }\n endNewInstance();\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n if (Cstr.style) {\n // this component has styles but we haven't registered them yet\n let style = Cstr.style;\n if (typeof style !== 'string') {\n style = style[(hostRef.$modeName$ = computeMode(elm))];\n }\n const scopeId = getScopeId(cmpMeta, hostRef.$modeName$);\n if (!styles.has(scopeId)) {\n const endRegisterStyles = createTime('registerStyles', cmpMeta.$tagName$);\n if (cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {\n style = await import('./shadow-css-a3f00b33.js').then(m => m.scopeCss(style, scopeId, false));\n }\n registerStyle(scopeId, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n // we've successfully created a lazy instance\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (ancestorComponent && ancestorComponent['s-rc']) {\n // this is the intial load and this component it has an ancestor component\n // but the ancestor component has NOT fired its will update lifecycle yet\n // so let's just cool our jets and wait for the ancestor to continue first\n // this will get fired off when the ancestor component\n // finally gets around to rendering its lazy self\n // fire off the initial update\n ancestorComponent['s-rc'].push(schedule);\n }\n else {\n schedule();\n }\n};\nconst fireConnectedCallback = (instance) => {\n {\n safeCall(instance, 'connectedCallback');\n }\n};\nconst connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime('connectedCallback', cmpMeta.$tagName$);\n if (!(hostRef.$flags$ & 1 /* hasConnected */)) {\n // first time this component has connected\n hostRef.$flags$ |= 1 /* hasConnected */;\n let hostId;\n {\n hostId = elm.getAttribute(HYDRATE_ID);\n if (hostId) {\n if (supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n const scopeId = addStyle(elm.shadowRoot, cmpMeta, elm.getAttribute('s-mode')) ;\n elm.classList.remove(scopeId + '-h', scopeId + '-s');\n }\n initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);\n }\n }\n if (!hostId) {\n // initUpdate\n // if the slot polyfill is required we'll need to put some nodes\n // in here to act as original content anchors as we move nodes around\n // host element has been connected to the DOM\n if ((cmpMeta.$flags$ & (4 /* hasSlotRelocation */ | 8 /* needsShadowDomShim */))) {\n setContentReference(elm);\n }\n }\n {\n // find the first ancestor component (if there is one) and register\n // this component as one of the actively loading child components for its ancestor\n let ancestorComponent = elm;\n while ((ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host)) {\n // climb up the ancestors looking for the first\n // component that hasn't finished its lifecycle update yet\n if ((ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute('s-id') && ancestorComponent['s-p']) ||\n ancestorComponent['s-p']) {\n // we found this components first ancestor component\n // keep a reference to this component's ancestor component\n attachToAncestor(hostRef, (hostRef.$ancestorComponent$ = ancestorComponent));\n break;\n }\n }\n }\n // Lazy properties\n // https://developers.google.com/web/fundamentals/web-components/best-practices#lazy-properties\n if (cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n {\n // connectedCallback, taskQueue, initialLoad\n // angular sets attribute AFTER connectCallback\n // https://github.com/angular/angular/issues/18909\n // https://github.com/angular/angular/issues/19940\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n }\n }\n else {\n // not the first time this has connected\n // reattach any event listeners to the host\n // since they would have been removed when disconnected\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);\n // fire off connectedCallback() on component instance\n fireConnectedCallback(hostRef.$lazyInstance$);\n }\n endConnected();\n }\n};\nconst setContentReference = (elm) => {\n // only required when we're NOT using native shadow dom (slot)\n // or this browser doesn't support native shadow dom\n // and this host element was NOT created with SSR\n // let's pick out the inner content for slot projection\n // create a node to represent where the original\n // content was first placed, which is useful later on\n const contentRefElm = (elm['s-cr'] = doc.createComment(''));\n contentRefElm['s-cn'] = true;\n elm.insertBefore(contentRefElm, elm.firstChild);\n};\nconst disconnectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const instance = hostRef.$lazyInstance$ ;\n {\n if (hostRef.$rmListeners$) {\n hostRef.$rmListeners$.map(rmListener => rmListener());\n hostRef.$rmListeners$ = undefined;\n }\n }\n // clear CSS var-shim tracking\n if (plt.$cssShim$) {\n plt.$cssShim$.removeHost(elm);\n }\n {\n safeCall(instance, 'disconnectedCallback');\n }\n }\n};\nconst bootstrapLazy = (lazyBundles, options = {}) => {\n const endBootstrap = createTime();\n const cmpTags = [];\n const exclude = options.exclude || [];\n const customElements = win.customElements;\n const head = doc.head;\n const metaCharset = /*@__PURE__*/ head.querySelector('meta[charset]');\n const visibilityStyle = /*@__PURE__*/ doc.createElement('style');\n const deferredConnectedCallbacks = [];\n const styles = /*@__PURE__*/ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);\n let appLoadFallback;\n let isBootstrapping = true;\n let i = 0;\n Object.assign(plt, options);\n plt.$resourcesUrl$ = new URL(options.resourcesUrl || './', doc.baseURI).href;\n {\n // If the app is already hydrated there is not point to disable the\n // async queue. This will improve the first input delay\n plt.$flags$ |= 2 /* appLoaded */;\n }\n {\n for (; i < styles.length; i++) {\n registerStyle(styles[i].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles[i].innerHTML), true);\n }\n }\n lazyBundles.map(lazyBundle => lazyBundle[1].map(compactMeta => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1],\n $members$: compactMeta[2],\n $listeners$: compactMeta[3],\n };\n {\n cmpMeta.$members$ = compactMeta[2];\n }\n {\n cmpMeta.$listeners$ = compactMeta[3];\n }\n {\n cmpMeta.$attrsToReflect$ = [];\n }\n {\n cmpMeta.$watchers$ = {};\n }\n if (!supportsShadow && cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n cmpMeta.$flags$ |= 8 /* needsShadowDomShim */;\n }\n const tagName = cmpMeta.$tagName$;\n const HostElement = class extends HTMLElement {\n // StencilLazyHost\n constructor(self) {\n // @ts-ignore\n super(self);\n self = this;\n registerHost(self, cmpMeta);\n if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n // this component is using shadow dom\n // and this browser supports shadow dom\n // add the read-only property \"shadowRoot\" to the host element\n // adding the shadow root build conditionals to minimize runtime\n if (supportsShadow) {\n {\n self.attachShadow({\n mode: 'open',\n delegatesFocus: !!(cmpMeta.$flags$ & 16 /* shadowDelegatesFocus */),\n });\n }\n }\n else if (!('shadowRoot' in self)) {\n self.shadowRoot = self;\n }\n }\n }\n connectedCallback() {\n if (appLoadFallback) {\n clearTimeout(appLoadFallback);\n appLoadFallback = null;\n }\n if (isBootstrapping) {\n // connectedCallback will be processed once all components have been registered\n deferredConnectedCallbacks.push(this);\n }\n else {\n plt.jmp(() => connectedCallback(this));\n }\n }\n disconnectedCallback() {\n plt.jmp(() => disconnectedCallback(this));\n }\n componentOnReady() {\n return getHostRef(this).$onReadyPromise$;\n }\n };\n cmpMeta.$lazyBundleId$ = lazyBundle[0];\n if (!exclude.includes(tagName) && !customElements.get(tagName)) {\n cmpTags.push(tagName);\n customElements.define(tagName, proxyComponent(HostElement, cmpMeta, 1 /* isElementConstructor */));\n }\n }));\n {\n visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;\n visibilityStyle.setAttribute('data-styles', '');\n head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);\n }\n // Process deferred connectedCallbacks now all components have been registered\n isBootstrapping = false;\n if (deferredConnectedCallbacks.length) {\n deferredConnectedCallbacks.map(host => host.connectedCallback());\n }\n else {\n {\n plt.jmp(() => (appLoadFallback = setTimeout(appDidLoad, 30)));\n }\n }\n // Fallback appLoad event\n endBootstrap();\n};\nconst getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nconst hostRefs = new WeakMap();\nconst getHostRef = (ref) => hostRefs.get(ref);\nconst registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);\nconst registerHost = (elm, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: elm,\n $cmpMeta$: cmpMeta,\n $instanceValues$: new Map(),\n };\n {\n hostRef.$onInstancePromise$ = new Promise(r => (hostRef.$onInstanceResolve$ = r));\n }\n {\n hostRef.$onReadyPromise$ = new Promise(r => (hostRef.$onReadyResolve$ = r));\n elm['s-p'] = [];\n elm['s-rc'] = [];\n }\n addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);\n return hostRefs.set(elm, hostRef);\n};\nconst isMemberInElement = (elm, memberName) => memberName in elm;\nconst consoleError = (e, el) => (0, console.error)(e, el);\nconst cmpModules = /*@__PURE__*/ new Map();\nconst loadModule = (cmpMeta, hostRef, hmrVersionId) => {\n // loadModuleImport\n const exportName = cmpMeta.$tagName$.replace(/-/g, '_');\n const bundleId = cmpMeta.$lazyBundleId$;\n const module = cmpModules.get(bundleId) ;\n if (module) {\n return module[exportName];\n }\n return import(\n /* webpackInclude: /\\.entry\\.js$/ */\n /* webpackExclude: /\\.system\\.entry\\.js$/ */\n /* webpackMode: \"lazy\" */\n `./${bundleId}.entry.js${''}`).then(importedModule => {\n {\n cmpModules.set(bundleId, importedModule);\n }\n return importedModule[exportName];\n }, consoleError);\n};\nconst styles = new Map();\nconst modeResolutionChain = [];\nconst queueDomReads = [];\nconst queueDomWrites = [];\nconst queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* queueSync */) {\n nextTick(flush);\n }\n else {\n plt.raf(flush);\n }\n }\n};\nconst consume = (queue) => {\n for (let i = 0; i < queue.length; i++) {\n try {\n queue[i](performance.now());\n }\n catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nconst flush = () => {\n // always force a bunch of medium callbacks to run, but still have\n // a throttle on how many can run in a certain time\n // DOM READS!!!\n consume(queueDomReads);\n // DOM WRITES!!!\n {\n consume(queueDomWrites);\n if ((queuePending = queueDomReads.length > 0)) {\n // still more to do yet, but we've run out of time\n // let's let this thing cool off and try again in the next tick\n plt.raf(flush);\n }\n }\n};\nconst nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);\nconst readTask = /*@__PURE__*/ queueTask(queueDomReads, false);\nconst writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);\nconst Build = {\n isDev: false,\n isBrowser: true,\n isServer: false,\n isTesting: false,\n};\n\nexport { Build as B, CSS as C, Host as H, NAMESPACE as N, promiseResolve as a, bootstrapLazy as b, writeTask as c, doc as d, createEvent as e, readTask as f, getMode as g, h, getElement as i, forceUpdate as j, getAssetPath as k, plt as p, registerInstance as r, setMode as s, win as w };\n"],"mappings":";AAAA,MAAMA,SAAS,GAAG,OAAO;AAEzB,IAAIC,OAAO;AACX,IAAIC,UAAU;AACd,IAAIC,WAAW;AACf,IAAIC,kBAAkB,GAAG,KAAK;AAC9B,IAAIC,2BAA2B,GAAG,KAAK;AACvC,IAAIC,iBAAiB,GAAG,KAAK;AAC7B,IAAIC,SAAS,GAAG,KAAK;AACrB,IAAIC,YAAY,GAAG,KAAK;AACxB,MAAMC,GAAG,GAAG,OAAOC,MAAM,KAAK,WAAW,GAAGA,MAAM,GAAG,CAAC,CAAC;AACvD,MAAMC,GAAG,GAAGF,GAAG,CAACE,GAAG;AACnB,M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