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T,EACD","names":["h","t","e","d","u","n","a","c","l","f","g","m","r","i","b","__vitePreload","insert","target","node","anchor","detach","createSvelteSlots","slots","svelteSlots","slotName","createSlotFn","element","detaching","findSlotParent","slot","parentEl","unwrap","from","propMapCache","attributeObserver","mutations","mutation","attributeName","newValue","renderElements","timestamp","renderQueue","svelteRetag","opts","ignoreAttribFilter","name","link","isLoading","err","oldValue","value","translatedName","existingRoot","callback","context","_b","_a","props","prop","propName","attribValue","attr","existingNamedSlots","existingDefaultSlot","slotParent","queryNamedSlots","candidate","fragment","childNodes","childHTML","childNode","slotEl","namedSlots","htmlLength","begin","rerender","navOverlay","initializeMaps","retag"],"ignoreList":[0,1,2],"sources":["../../../node_modules/@wagich/bluc-map/dist/bluc-map.js","../../../node_modules/svelte-retag/utils.js","../../../node_modules/svelte-retag/index.js","../../../Scripts/index.ts"],"sourcesContent":["function h(s, t, e) {\n s.insertBefore(t, e || null);\n}\nfunction d(s) {\n s.parentNode && s.parentNode.removeChild(s);\n}\nfunction u(s) {\n const t = {};\n for (const r in s)\n t[r] = [e(s[r])];\n function e(r) {\n return function() {\n return {\n c: function() {\n },\n // noop\n m: function(n, i) {\n h(n, r.cloneNode(!0), i);\n },\n d: function(n) {\n n && d(r);\n },\n l: function() {\n }\n // noop\n };\n };\n }\n return t;\n}\nfunction a(s) {\n let t = s.parentElement;\n for (; t; ) {\n if (t.tagName.indexOf(\"-\") !== -1)\n return t;\n t = t.parentElement;\n }\n return null;\n}\nfunction c(s) {\n let t = document.createDocumentFragment();\n for (; s.firstChild; )\n t.appendChild(s.firstChild);\n return t;\n}\nconst l = /* @__PURE__ */ new Map(), f = new MutationObserver((s) => {\n s.forEach((t) => {\n const e = t.target, r = t.attributeName, o = e.getAttribute(r);\n e.forwardAttributeToProp(r, o);\n });\n});\nfunction g(s) {\n let t = document.querySelectorAll(\"[data-svelte-retag-render]\");\n if (t.length !== 0)\n for (let e of t)\n e.isConnected && e.parentElement.closest('[data-svelte-retag-render=\"light\"]') === null && (e.removeAttribute(\"data-svelte-retag-render\"), e._renderSvelteComponent());\n}\nfunction m(s) {\n window.customElements.get(\"svelte-retag\") || (window.customElements.define(\"svelte-retag\", class extends HTMLElement {\n // noop\n }), window.customElements.define(\"svelte-retag-default\", class extends HTMLElement {\n // noop\n })), window.customElements.define(s.tagname, class extends HTMLElement {\n constructor() {\n if (super(), this._debug(\"constructor()\"), this.attributesObserved = !1, s.shadow && (this.attachShadow({ mode: \"open\" }), this._root = document.createElement(\"svelte-retag\"), this.shadowRoot.appendChild(this._root), s.href)) {\n let t = document.createElement(\"link\");\n t.setAttribute(\"href\", s.href), t.setAttribute(\"rel\", \"stylesheet\"), this.shadowRoot.appendChild(t);\n }\n }\n /**\n * Attributes we're watching for changes after render (doesn't affect attributes already present prior to render).\n *\n * NOTE: This only applies if opts.attributes is an array. If opts.attributes is true, then all attributes are\n * watched using the mutation observer instead.\n *\n * @returns string[]\n */\n static get observedAttributes() {\n return Array.isArray(s.attributes) ? s.attributes : [];\n }\n /**\n * Attached to DOM.\n */\n connectedCallback() {\n this._debug(\"connectedCallback()\"), this.slotEls = {};\n const t = document.readyState === \"loading\";\n if (!s.shadow)\n if (this.hasAttribute(\"data-svelte-retag-hydratable\"))\n if (t) {\n this._onSlotsReady(() => {\n this._initLightRoot(), this._hydrateLightSlots(), this._queueForRender();\n });\n return;\n } else\n this._initLightRoot(), this._hydrateLightSlots();\n else\n this._initLightRoot();\n s.shadow ? this._observeSlots(!0) : t && (this._observeSlots(!0), this._onSlotsReady(() => {\n this._observeSlots(!1);\n })), this._queueForRender(), s.hydratable && this.setAttribute(\"data-svelte-retag-hydratable\", \"\");\n }\n /**\n * Removed from DOM (could be called inside another custom element that starts rendering after this one). In that\n * situation, the connectedCallback() will be executed again (most likely with constructor() as well, unfortunately).\n */\n disconnectedCallback() {\n if (this._debug(\"disconnectedCallback()\"), this.removeAttribute(\"data-svelte-retag-render\"), this.removeAttribute(\"data-svelte-retag-hydratable\"), this._observeSlots(!1), this.componentInstance)\n try {\n this.componentInstance.$destroy(), delete this.componentInstance;\n } catch (t) {\n console.error(`Error destroying Svelte component in '${this.tagName}'s disconnectedCallback(): ${t}`);\n }\n s.shadow || (this._restoreLightSlots(), this.removeChild(this._root));\n }\n /**\n * Callback/hook for observedAttributes.\n *\n * @param {string} name\n * @param {string} oldValue\n * @param {string} newValue\n */\n attributeChangedCallback(t, e, r) {\n this._debug(\"attributes changed\", { name: t, oldValue: e, newValue: r }), this.forwardAttributeToProp(t, r);\n }\n /**\n * Forward modifications to element attributes to the corresponding Svelte prop (if applicable).\n *\n * @param {string} name\n * @param {string} value\n */\n forwardAttributeToProp(t, e) {\n if (this._debug(\"forwardAttributeToProp\", { name: t, value: e }), this.componentInstance) {\n let r = this._translateAttribute(t);\n this.componentInstance.$set({ [r]: e });\n }\n }\n /**\n * Setup a wrapper in the light DOM which can keep the rendered Svelte component separate from the default Slot\n * content, which is potentially being actively appended (at least while the browser parses during loading).\n */\n _initLightRoot() {\n let t = this.querySelector(\"svelte-retag\");\n t !== null && t.parentElement === this ? (this._debug(\"_initLightRoot(): Restore from existing light DOM root\"), this._root = t) : (this._root = document.createElement(\"svelte-retag\"), this.prepend(this._root));\n }\n /**\n * Queues the provided callback to execute when we think all slots are fully loaded and available to fetch and\n * manipulate.\n *\n * @param {callback} callback\n */\n _onSlotsReady(t) {\n document.addEventListener(\"readystatechange\", () => {\n document.readyState === \"interactive\" && t();\n });\n }\n /**\n * Converts the provided lowercase attribute name to the correct case-sensitive component prop name, if possible.\n *\n * @param {string} attributeName\n * @returns {string}\n */\n _translateAttribute(t) {\n return t = t.toLowerCase(), this.propMap && this.propMap.has(t) ? this.propMap.get(t) : (this._debug(`_translateAttribute(): ${t} not found`), t);\n }\n /**\n * To support context, this traverses the DOM to find potential parent elements (also managed by svelte-retag) which\n * may contain context necessary to render this component.\n *\n * See context functions at: https://svelte.dev/docs/svelte#setcontext\n *\n * @returns {Map|null}\n */\n _getAncestorContext() {\n var e, r;\n let t = this;\n for (; t.parentNode; ) {\n t = t.parentNode;\n let o = (r = (e = t == null ? void 0 : t.componentInstance) == null ? void 0 : e.$$) == null ? void 0 : r.context;\n if (o instanceof Map)\n return o;\n }\n return null;\n }\n /**\n * Queue this element for render in the next animation frame. This offers the opportunity to render known available\n * elements all at once and, ideally, from the top down (to preserve context).\n */\n _queueForRender() {\n if (!this.isConnected) {\n this._debug(\"queueForRender(): skipped, already disconnected\");\n return;\n }\n if (this.parentElement.closest('[data-svelte-retag-render=\"light\"]') !== null) {\n this._debug(\"queueForRender(): skipped, light DOM parent is queued for render\");\n return;\n }\n this.setAttribute(\"data-svelte-retag-render\", s.shadow ? \"shadow\" : \"light\"), requestAnimationFrame(g);\n }\n /**\n * Renders (or rerenders) the Svelte component into this custom element based on the latest properties and slots\n * (with slots initialized elsewhere).\n *\n * IMPORTANT:\n *\n * Despite the intuitive name, this method is private since its functionality requires a deeper understanding\n * of how it depends on current internal state and how it alters internal state. Be sure to study how it's called\n * before calling it yourself externally. (\"Yarrr! Here be dragons! 🔥🐉\")\n *\n * That said... this is currently the workflow:\n *\n * 1. Wait for connection to DOM\n * 2. Ensure slots are properly prepared (e.g. in case of hydration) or observed (in case actively parsing DOM, e.g.\n * IIFE/UMD or shadow DOM) in case there are any changes *after* this render\n * 3. _queueForRender(): Kick off to requestAnimationFrame() to queue render of the component (instead of rendering\n * immediately) to ensure that all currently connected and available components are taken into account (this is\n * necessary for properly supporting context to prevent from initializing components out of order).\n * 4. renderElements(): Renders through the DOM tree in document order and from the top down (parent to child),\n * reaching this element instantiating this component, ensuring context is preserved.\n *\n */\n _renderSvelteComponent() {\n this._debug(\"renderSvelteComponent()\"), s.shadow ? this.slotEls = this._getShadowSlots() : this.slotEls = this._getLightSlots(), this._root.innerHTML = \"\";\n const t = this._getAncestorContext() || /* @__PURE__ */ new Map();\n let e = {\n $$scope: {},\n // Convert our list of slots into Svelte-specific slot objects\n $$slots: u(this.slotEls)\n // All other *initial* props are pulled dynamically from element attributes (see proxy below)...\n };\n if (!l.has(this.tagName))\n this.propMap = /* @__PURE__ */ new Map(), l.set(this.tagName, this.propMap), e = new Proxy(e, {\n get: (r, o) => {\n let n = o.toString();\n o.indexOf(\"$$\") === -1 && this.propMap.set(n.toLowerCase(), n);\n let i = this.attributes.getNamedItem(n);\n return i !== null ? r[n] = i.value : r[o];\n }\n });\n else {\n this.propMap = l.get(this.tagName);\n for (let r of [...this.attributes])\n r.name.indexOf(\"data-svelte-retag\") === -1 && (e[this._translateAttribute(r.name)] = r.value);\n }\n this.componentInstance = new s.component({ target: this._root, props: e, context: t }), s.attributes === !0 && !this.attributesObserved && (this.attributesObserved = !0, this.propMap.size > 0 ? f.observe(this, {\n attributes: !0,\n // implicit, but... 🤷‍♂️\n attributeFilter: [...this.propMap.keys()]\n }) : this._debug(\"renderSvelteComponent(): skipped attribute observer, no props\")), this._debug(\"renderSvelteComponent(): completed\");\n }\n /**\n * Fetches slots from pre-rendered Svelte component HTML using special markers (either data attributes or custom\n * wrappers). Note that this will only work during initialization and only if the Svelte retag instance is\n * hydratable.\n */\n _hydrateLightSlots() {\n let t = this._root.querySelectorAll(\"[data-svelte-retag-slot]\");\n for (let r of t) {\n if (a(r) !== this._root)\n continue;\n let n = r.getAttribute(\"slot\");\n this.slotEls[n] = r;\n }\n let e = this.querySelector(\"svelte-retag-default\");\n return e !== null && (this.slotEls.default = e), this._restoreLightSlots(), !0;\n }\n /**\n * Indicates if the provided element instance belongs to this custom element or not.\n *\n * @param {Element} slot\n * @returns {boolean}\n */\n _isOwnSlot(t) {\n let e = a(t);\n return e === null ? !1 : e === this;\n }\n /**\n * Returns a map of slot names and the corresponding HTMLElement (named slots) or DocumentFragment (default slots).\n *\n * IMPORTANT: Since this custom element is the \"root\", these slots must be removed (which is done in THIS method).\n *\n * TODO: Problematic name. We are \"getting\" but we're also mangling/mutating state (which *is* necessary). \"Get\" may be confusing here; is there a better name?\n *\n * @returns {SlotList}\n */\n _getLightSlots() {\n this._debug(\"_getLightSlots()\");\n let t = {};\n const e = this.querySelectorAll(\"[slot]\");\n for (let i of e)\n this._isOwnSlot(i) && (t[i.slot] = i, s.hydratable && i.setAttribute(\"data-svelte-retag-slot\", \"\"), this.removeChild(i));\n let r = document.createDocumentFragment();\n s.hydratable && (r = document.createElement(\"svelte-retag-default\"));\n let o = [...this.childNodes], n = \"\";\n for (let i of o) {\n if (i instanceof HTMLElement && i.tagName === \"SVELTE-RETAG\") {\n this._debug(\"_getLightSlots(): skipping container\");\n continue;\n }\n i instanceof Text ? n += i.textContent : i.outerHTML && (n += i.outerHTML), r.appendChild(i);\n }\n return n.trim() !== \"\" && (t.default ? console.error(`svelteRetag: '${this.tagName}': Found elements without slot attribute when using slot=\"default\"`) : t.default = r), t;\n }\n /**\n * Go through originally removed slots and restore back to the custom element.\n */\n _restoreLightSlots() {\n this._debug(\"_restoreLightSlots:\", this.slotEls);\n for (let t in this.slotEls) {\n let e = this.slotEls[t];\n e.tagName === \"SVELTE-RETAG-DEFAULT\" ? this.prepend(c(e)) : (this.prepend(e), e instanceof HTMLElement && e.hasAttribute(\"data-svelte-retag-slot\") && e.removeAttribute(\"data-svelte-retag-slot\"));\n }\n this.slotEls = {};\n }\n /**\n * Fetches and returns references to the existing shadow DOM slots. Left unmodified.\n *\n * @returns {SlotList}\n */\n _getShadowSlots() {\n this._debug(\"_getShadowSlots()\");\n const t = this.querySelectorAll(\"[slot]\");\n let e = {}, r = this.innerHTML.length;\n return t.forEach((o) => {\n e[o.slot] = document.createElement(\"slot\"), e[o.slot].setAttribute(\"name\", o.slot), r -= o.outerHTML.length;\n }), r > 0 && (e.default = document.createElement(\"slot\")), e;\n }\n /**\n * Toggle on/off the MutationObserver used to watch for changes in child slots.\n */\n _observeSlots(t) {\n t !== this.slotObserverActive && (this.slotObserver || (this.slotObserver = new MutationObserver((e) => {\n this._processSlotMutations(e);\n })), t ? (this.slotObserver.observe(this, { childList: !0, subtree: !1, attributes: !1 }), this._debug(\"_observeSlots: OBSERVE\")) : (this.slotObserver.disconnect(), this._debug(\"_observeSlots: DISCONNECT\")), this.slotObserverActive = t);\n }\n /**\n * Watches for slot changes, specifically:\n *\n * 1. Shadow DOM: All slot changes will queue a rerender of the Svelte component\n *\n * 2. Light DOM: Only additions will be accounted for. This is particularly because currently we only support\n * watching for changes during document parsing (i.e. document.readyState === 'loading', prior to the\n * 'DOMContentLoaded' event.\n *\n * @param {MutationRecord[]} mutations\n */\n _processSlotMutations(t) {\n this._debug(\"_processSlotMutations()\", t);\n let e = !1;\n for (let r of t)\n if (r.type === \"childList\") {\n if (s.shadow) {\n e = !0;\n break;\n } else if (r.addedNodes.length > 0) {\n e = !0;\n break;\n }\n }\n e && (s.shadow || (this._observeSlots(!1), this._restoreLightSlots(), this._observeSlots(!0)), this._debug(\"_processMutations(): Queue rerender\"), this._queueForRender());\n }\n /**\n * Pass through to console.log() but includes a reference to the custom element in the log for easier targeting for\n * debugging purposes.\n *\n * @param {...*}\n */\n _debug() {\n s.debugMode && (s.debugMode === \"cli\" ? console.log.apply(null, [performance.now(), this.tagName, ...arguments]) : console.log.apply(null, [performance.now(), this, ...arguments]));\n }\n });\n}\nfunction b() {\n document.querySelector(\"bluc-map\") != null && import(\"./bluc-map-V5jWel-1.js\").then((s) => {\n m({\n component: s.default,\n tagname: \"bluc-map\"\n });\n });\n}\nexport {\n b as initializeMaps\n};\n//# sourceMappingURL=bluc-map.js.map\n","/**\n * Functions are placed here for better encapsulation and readability of the main codebase. This helps to isolate them\n * from the DOM API of the implemented web component (particularly if they are static and do not need access to instance\n * level information, i.e. they do not call \"this\").\n */\n\n\n/**\n * Extracted from svelte's internal API @ src/runtime/internal/dom.js\n *\n * @param {Node} target\n * @param {Node} node\n * @param {Node} [anchor]\n * @returns {void}\n */\nfunction insert(target, node, anchor) {\n\ttarget.insertBefore(node, anchor || null);\n}\n\n\n/**\n * Extracted from svelte's internal API @ src/runtime/internal/dom.js\n *\n * @param {Node} node\n * @returns {void}\n */\nfunction detach(node) {\n\tif (node.parentNode) {\n\t\tnode.parentNode.removeChild(node);\n\t}\n}\n\n\n/**\n * Creates an object where each property represents the slot name and each value represents a Svelte-specific slot\n * object containing the lifecycle hooks for each slot. This wraps our slot elements and is passed to Svelte itself.\n *\n * Much of this witchcraft is from svelte issue - https://github.com/sveltejs/svelte/issues/2588\n */\nexport function createSvelteSlots(slots) {\n\tconst svelteSlots = {};\n\tfor(const slotName in slots) {\n\t\tsvelteSlots[slotName] = [createSlotFn(slots[slotName])];\n\t}\n\n\tfunction createSlotFn(element) {\n\t\treturn function() {\n\t\t\treturn {\n\t\t\t\tc: function() {}, // noop\n\t\t\t\tm: function mount(target, anchor) {\n\t\t\t\t\tinsert(target, element.cloneNode(true), anchor);\n\t\t\t\t},\n\t\t\t\td: function destroy(detaching) {\n\t\t\t\t\tif (detaching) {\n\t\t\t\t\t\tdetach(element);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tl: function() {}, // noop\n\t\t\t};\n\t\t};\n\t}\n\n\treturn svelteSlots;\n}\n\n\n/**\n * Traverses DOM to find the first custom element that the provided element happens to belong to.\n *\n * @param {Element} slot\n * @returns {HTMLElement|null}\n */\nexport function findSlotParent(slot) {\n\tlet parentEl = slot.parentElement;\n\twhile(parentEl) {\n\t\tif (parentEl.tagName.indexOf('-') !== -1) return parentEl;\n\t\tparentEl = parentEl.parentElement;\n\t}\n\treturn null;\n}\n\n\n/**\n * Carefully \"unwraps\" the custom element tag itself from its default slot content (particularly if that content\n * is just a text node). Only used when not using shadow root.\n *\n * @param {HTMLElement} from\n *\n * @returns {DocumentFragment}\n */\nexport function unwrap(from) {\n\tlet node = document.createDocumentFragment();\n\twhile(from.firstChild) {\n\t\tnode.appendChild(from.firstChild);\n\t}\n\treturn node;\n}\n","import { createSvelteSlots, findSlotParent, unwrap } from './utils.js';\n\n\n/**\n * Tracks the mapping of case-insensitive attributes to case-sensitive component props on a per-tag basis. Setup as a\n * global cache so we can avoid setting up a Proxy on every single component render but also to assist in mapping during\n * hits to attributeChangedCallback().\n */\nconst propMapCache = new Map();\n\n\n/**\n * Mutation observer must be used to track changes to attributes on our custom elements, since we cannot know the\n * component props ahead of time (required if we were to use observedAttributes instead). In this case, only one\n * observer is necessary, since each call to .observe() can have a different \"attributeFilter\" specified.\n * NOTE: We can .observe() many separate elements and don't have to .disconnect() each one individually, since if the\n * element being observed is removed from the DOM and released by the garbage collector, the MutationObserver will\n * stop observing the removed element automatically.\n */\nconst attributeObserver = new MutationObserver((mutations) => {\n\t// Go through each mutation and forward the updated attribute value to the corresponding Svelte prop.\n\tmutations.forEach(mutation => {\n\t\tconst element = mutation.target;\n\t\tconst attributeName = mutation.attributeName;\n\t\tconst newValue = element.getAttribute(attributeName);\n\t\telement.forwardAttributeToProp(attributeName, newValue);\n\t});\n});\n\n\n/**\n * Processes the queued set of svelte-retag managed elements which have been initialized, connected and flagged as ready\n * for render. This is done just before paint with the goal of processing as many as possible at once not only for speed\n * but also to ensure we can render properly from the top down (parent to child). This is necessary, as the actual\n * construct() and connectedCallback()'s for custom elements depends largely on *when* the elements are defined and\n * encountered in the DOM (can be in any order). This allows us to better control that process.\n *\n * @param {number} timestamp\n */\n// eslint-disable-next-line no-unused-vars\nfunction renderElements(timestamp) {\n\t// This is key: Fetches elements in document order so we can render top-down (for context).\n\tlet renderQueue = document.querySelectorAll('[data-svelte-retag-render]');\n\tif (renderQueue.length === 0) {\n\t\t// TODO: Consider build of svelte-retag so we can drop console.logs() when publishing without having to comment out. See: https://github.com/vitejs/vite/discussions/7920\n\t\t//console.debug(`renderElements(${timestamp}): returned, queue is now empty`);\n\t\treturn;\n\t}\n\n\tfor(let element of renderQueue) {\n\t\t// Element was queued but likely rearranged due to the parent rendering first (resulting in a new instance and this\n\t\t// being forever orphaned).\n\t\tif (!element.isConnected) {\n\t\t\t//console.debug(`renderElements(${timestamp}): skipped, already disconnected:`, element);\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Quick double check: Skip any which have *light* DOM parents that are queued for render. See _queueForRender() for details.\n\t\tif (element.parentElement.closest('[data-svelte-retag-render=\"light\"]') === null) {\n\t\t\telement.removeAttribute('data-svelte-retag-render');\n\t\t\telement._renderSvelteComponent();\n\t\t} else {\n\t\t\t//console.debug(`renderElements(${timestamp}): skipped, light DOM parent is queued for render:`, element);\n\t\t}\n\t}\n}\n\n\n/**\n * @typedef {new(...args: any[]) => any} Newable Type alias for a really generic class constructor\n * @typedef {Newable} CmpConstructor Svelte component class constructor (basically a \"newable\" object)\n */\n\n/**\n * @typedef {object} SvelteRetagOptions Configuration options for svelte-retag. See README.md for details.\n *\n * @property {CmpConstructor} component The Svelte component *class* constructor to incorporate into your custom element (this is the imported component class, *not* an instance)\n * @property {string} tagname Name of the custom element tag you'd like to define.\n * @property {string[]|boolean} [attributes=[]] Optional array of attributes that should be reactively forwarded to the component when modified. Set to true to automatically watch all attributes.\n * @property {boolean|string[]} [ignoreCommonAttribWarnings=false] Suppresses warnings in development mode about common attributes (such as \"id\", \"class\" and \"data-*\") if they don't already exist on the component. Set to an array to customize the list of ignored attributes.\n * @property {boolean} [shadow=false] Indicates if we should build the component in the shadow root instead of in the regular (\"light\") DOM.\n * @property {string} [href=\"\"] URL to the CSS stylesheet to incorporate into the shadow DOM (if enabled).\n *\n * Experimental:\n * @property {boolean} [hydratable=false] EXPERIMENTAL. Light DOM slot hydration (specific to svelte-retag): Enables\n * \t pre-rendering of the web component (e.g. SSR) by adding extra markers\n * \t (attributes & wrappers) during rendering to enable svelte-retag to find and\n * \t restore light DOM slots when restoring interactivity. See README.md for more.\n * @property {boolean|'cli'} [debugMode=false] Hidden option to enable debugging for package development purposes.\n *\n */\n\n/**\n * Please see README.md for usage information.\n *\n * @param {SvelteRetagOptions} opts Configuration options for svelte-retag. See README.md for details.\n */\nexport default function svelteRetag(opts) {\n\t/**\n\t * Reserves our special custom element container which is used to wrap Svelte components.\n\t *\n\t * When performing light DOM rendering, this provides the opportunity to isolate the slot content away from the HTML\n\t * rendered by the component itself. This is particularly necessary if we're executing early (e.g. via IIFE formatted\n\t * bundles and not via native ESM modules, which are deferred) since we need to rerender the component as the parser\n\t * progresses along the current element's slot content. This ultimately reduces (if not eliminates) the typical\n\t * cumulative layout shift (CLS) seen when injecting components into the DOM like this (especially noticeable on\n\t * initial page loads). That CLS typically occurs because ESM modules are deferred (as noted above) but also because\n\t * it's difficult to know what the correct/final slot content will be until after the parser has rendered the DOM for\n\t * us.\n\t *\n\t * When performing shadow DOM rendering, it provides an un-styled container where we can attach the Svelte component\n\t * once it begins rendering.\n\t */\n\tif (!window.customElements.get('svelte-retag')) {\n\t\twindow.customElements.define('svelte-retag', class extends HTMLElement {\n\t\t\t// noop\n\t\t});\n\n\t\t// When the 'hydratable' option is enabled, this special wrapper will be applied around default slot content so\n\t\t// that it can be discovered and restored later after pre-rendering. NOTE: This tag is always available since\n\t\t// we can always hydrate. It is only applied to rendered content if elected for a particular component.\n\t\twindow.customElements.define('svelte-retag-default', class extends HTMLElement {\n\t\t\t// noop\n\t\t});\n\t}\n\n\t// Filter for dynamically ignoring errors when using common attributes which might potentially be on a custom element\n\t// but ALSO aren't already explicitly defined on the Svelte component. Default to false but allow user to enable.\n\tlet ignoreAttribFilter = () => false;\n\tif (opts?.ignoreCommonAttribWarnings === true) {\n\t\tignoreAttribFilter = (name) => {\n\t\t\treturn (name === 'id' || name === 'class' || name === 'style' || name.startsWith('data-'));\n\t\t};\n\t} else if (Array.isArray(opts.ignoreCommonAttribWarnings)) {\n\t\tignoreAttribFilter = (name) => {\n\t\t\treturn opts.ignoreCommonAttribWarnings.includes(name);\n\t\t};\n\t}\n\n\t/**\n\t * Object containing keys pointing to slots: Either an actual element or a document fragment created to wrap\n\t * default slot content.\n\t *\n\t * @typedef {Object.} SlotList\n\t */\n\n\t/**\n\t * Defines the actual custom element responsible for rendering the provided Svelte component.\n\t */\n\twindow.customElements.define(opts.tagname, class extends HTMLElement {\n\t\tconstructor() {\n\t\t\tsuper();\n\n\t\t\tthis._debug('constructor()');\n\n\t\t\t// New instances, attributes not yet being observed.\n\t\t\tthis.attributesObserved = false;\n\n\n\t\t\t// Setup shadow root early (light-DOM root is initialized in connectedCallback() below).\n\t\t\tif (opts.shadow) {\n\t\t\t\tthis.attachShadow({ mode: 'open' });\n\t\t\t\t// TODO: Better than
, but: Is a wrapper entirely necessary? Why not just set this._root = this.shadowRoot?\n\t\t\t\tthis._root = document.createElement('svelte-retag');\n\t\t\t\tthis.shadowRoot.appendChild(this._root);\n\n\t\t\t\t// Link generated style. Do early as possible to ensure we start downloading CSS (reduces FOUC).\n\t\t\t\tif (opts.href) {\n\t\t\t\t\tlet link = document.createElement('link');\n\t\t\t\t\tlink.setAttribute('href', opts.href);\n\t\t\t\t\tlink.setAttribute('rel', 'stylesheet');\n\t\t\t\t\tthis.shadowRoot.appendChild(link);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Attributes we're watching for changes after render (doesn't affect attributes already present prior to render).\n\t\t *\n\t\t * NOTE: This only applies if opts.attributes is an array. If opts.attributes is true, then all attributes are\n\t\t * watched using the mutation observer instead.\n\t\t *\n\t\t * @returns string[]\n\t\t */\n\t\tstatic get observedAttributes() {\n\t\t\tif (Array.isArray(opts.attributes)) {\n\t\t\t\t// User defined an explicit list or nothing at all.\n\t\t\t\treturn opts.attributes;\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Attached to DOM.\n\t\t */\n\t\tconnectedCallback() {\n\t\t\tthis._debug('connectedCallback()');\n\n\t\t\t/**\n\t\t\t * TODO: Light DOM: Potential optimization opportunities:\n\t\t\t * 1. Don't bother setting up wrapper if the component doesn't have a default slot and isn't hydratable\n\t\t\t * 2. Don't setup wrapper if we don't end up processing mutations (i.e. document not in loading state).\n\t\t\t * If this happens though, we must only setup/destroy in connected/disconnected callbacks and thus anything that\n\t\t\t * depends upon it needs a separate method of determining. Maybe getter that checks if this._root.tagName === 'SVELTE-RETAG'?\n\t\t\t */\n\n\t\t\t// Initialize the slot elements object which retains a reference to the original elements (by slot name) so they\n\t\t\t// can be restored later on disconnectedCallback(). Also useful for debugging purposes.\n\t\t\tthis.slotEls = {};\n\n\t\t\t// If compiled as IIFE/UMD and executed early, then the document is likely to be in the process of loading\n\t\t\t// and thus actively parsing tags, including not only this tag but also nested content (which may not yet be\n\t\t\t// available).\n\t\t\tconst isLoading = (document.readyState === 'loading');\n\n\t\t\t// Setup the special wrapper if not already present (which can happen when\n\t\t\t// disconnected/reconnected due to being in a slot).\n\t\t\tif (!opts.shadow) {\n\t\t\t\t// See if this component is pre-rendered and flagged as able to hydrate slots from the light DOM root.\n\t\t\t\tif (this.hasAttribute('data-svelte-retag-hydratable')) {\n\t\t\t\t\tif (isLoading) {\n\t\t\t\t\t\t// Wait for the slots to become fully available.\n\t\t\t\t\t\t// NOTE: We expect wrapper to already be present, however it may not be\n\t\t\t\t\t\t// accessible until after the browser has finished parsing the DOM.\n\t\t\t\t\t\tthis._onSlotsReady(() => {\n\t\t\t\t\t\t\tthis._initLightRoot();\n\t\t\t\t\t\t\tthis._hydrateLightSlots();\n\t\t\t\t\t\t\tthis._queueForRender();\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Light DOM slots are already all available, so hydrate them now and allow Svelte component\n\t\t\t\t\t\t// rendering to proceed normally below.\n\t\t\t\t\t\tthis._initLightRoot();\n\t\t\t\t\t\tthis._hydrateLightSlots();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Setup the wrapper now since we don't have to worry about hydration.\n\t\t\t\t\tthis._initLightRoot();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Watch for changes to slot elements and ensure they're reflected in the Svelte component.\n\t\t\tif (opts.shadow) {\n\t\t\t\tthis._observeSlots(true);\n\t\t\t} else {\n\t\t\t\tif (isLoading) {\n\t\t\t\t\t// Setup the mutation observer to watch content as parser progresses through the HTML and adds nodes under\n\t\t\t\t\t// this element. However, since this is only useful in light DOM elements *during* parsing, we should be sure\n\t\t\t\t\t// to stop observing once the HTML is fully parsed and loaded.\n\t\t\t\t\tthis._observeSlots(true);\n\t\t\t\t\tthis._onSlotsReady(() => {\n\t\t\t\t\t\tthis._observeSlots(false);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now that we're connected to the DOM, we can render the component now.\n\t\t\tthis._queueForRender();\n\n\t\t\t// If we want to enable the current component as hydratable, add the flag now that it has been fully\n\t\t\t// rendered (now that slots have been located under the Svelte component). This attribute is important since\n\t\t\t// it allows us to know immediately that this component is capable of being hydrated (useful if compiled and\n\t\t\t// executed as IIFE/UMD).\n\t\t\tif (opts.hydratable) {\n\t\t\t\tthis.setAttribute('data-svelte-retag-hydratable', '');\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Removed from DOM (could be called inside another custom element that starts rendering after this one). In that\n\t\t * situation, the connectedCallback() will be executed again (most likely with constructor() as well, unfortunately).\n\t\t */\n\t\tdisconnectedCallback() {\n\t\t\tthis._debug('disconnectedCallback()');\n\n\t\t\t// Remove render flag (if present). This could happen in case the element is disconnected while waiting to render\n\t\t\t// (particularly if slotted under a light DOM parent).\n\t\t\tthis.removeAttribute('data-svelte-retag-render');\n\n\t\t\t// Remove hydration flag, if present. This component will be able to be rendered from scratch instead.\n\t\t\tthis.removeAttribute('data-svelte-retag-hydratable');\n\n\t\t\t// Disconnect slot mutation observer (if it's currently active).\n\t\t\tthis._observeSlots(false);\n\n\t\t\t// Double check that element has been initialized already. This could happen in case connectedCallback() hasn't\n\t\t\t// fully completed yet (e.g. if initialization is async)\n\t\t\tif (this.componentInstance) {\n\t\t\t\ttry {\n\t\t\t\t\t// Clean up: Destroy Svelte component when removed from DOM.\n\t\t\t\t\tthis.componentInstance.$destroy();\n\t\t\t\t\tdelete this.componentInstance;\n\t\t\t\t} catch(err) {\n\t\t\t\t\tconsole.error(`Error destroying Svelte component in '${this.tagName}'s disconnectedCallback(): ${err}`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!opts.shadow) {\n\t\t\t\t// Restore slots back to the light DOM in case we're just being appended elsewhere (likely if we're nested under\n\t\t\t\t// another custom element that initializes after this custom element, thus causing *another* round of\n\t\t\t\t// construct/connectedCallback on this one).\n\t\t\t\tthis._restoreLightSlots();\n\n\t\t\t\t// Lastly, unwinding everything in reverse: Remove the \"light\" DOM root (the special wrapper) which\n\t\t\t\t// is only added during connectedCallback(), unlike shadow DOM which is attached in construct.\n\t\t\t\tthis.removeChild(this._root);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Callback/hook for observedAttributes.\n\t\t *\n\t\t * @param {string} name\n\t\t * @param {string} oldValue\n\t\t * @param {string} newValue\n\t\t */\n\t\tattributeChangedCallback(name, oldValue, newValue) {\n\t\t\tthis._debug('attributes changed', { name, oldValue, newValue });\n\t\t\tthis.forwardAttributeToProp(name, newValue);\n\t\t}\n\n\t\t/**\n\t\t * Forward modifications to element attributes to the corresponding Svelte prop (if applicable).\n\t\t *\n\t\t * @param {string} name\n\t\t * @param {string} value\n\t\t */\n\t\tforwardAttributeToProp(name, value) {\n\t\t\tthis._debug('forwardAttributeToProp', { name, value });\n\n\t\t\t// If instance already available, pass it through immediately.\n\t\t\tif (this.componentInstance) {\n\t\t\t\tlet translatedName = this._translateAttribute(name);\n\t\t\t\tif (translatedName !== null) {\n\t\t\t\t\tthis.componentInstance.$set({ [translatedName]: value });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Setup a wrapper in the light DOM which can keep the rendered Svelte component separate from the default Slot\n\t\t * content, which is potentially being actively appended (at least while the browser parses during loading).\n\t\t */\n\t\t_initLightRoot() {\n\t\t\t// Recycle the existing light DOM root, if already present.\n\t\t\tlet existingRoot = this.querySelector('svelte-retag');\n\t\t\tif (existingRoot !== null && existingRoot.parentElement === this) {\n\t\t\t\tthis._debug('_initLightRoot(): Restore from existing light DOM root');\n\t\t\t\tthis._root = existingRoot;\n\t\t\t} else {\n\t\t\t\t// Setup new (first time).\n\t\t\t\tthis._root = document.createElement('svelte-retag');\n\t\t\t\tthis.prepend(this._root);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Queues the provided callback to execute when we think all slots are fully loaded and available to fetch and\n\t\t * manipulate.\n\t\t *\n\t\t * @param {callback} callback\n\t\t */\n\t\t_onSlotsReady(callback) {\n\t\t\tdocument.addEventListener('readystatechange', () => {\n\t\t\t\tif (document.readyState === 'interactive') {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t/**\n\t\t * Converts the provided lowercase attribute name to the correct case-sensitive component prop name, if possible.\n\t\t *\n\t\t * @param {string} attributeName\n\t\t * @returns {string|null}\n\t\t */\n\t\t_translateAttribute(attributeName) {\n\t\t\t// In the unlikely scenario that a browser somewhere doesn't do this for us (or maybe we're in a quirks mode or something...)\n\t\t\tattributeName = attributeName.toLowerCase();\n\t\t\tif (this.propMap && this.propMap.has(attributeName)) {\n\t\t\t\treturn this.propMap.get(attributeName);\n\t\t\t} else {\n\t\t\t\t// Return it unchanged but only if it's not in our \"ignore attributes\" filter.\n\t\t\t\tif (!ignoreAttribFilter(attributeName)) {\n\t\t\t\t\tthis._debug(`_translateAttribute(): ${attributeName} not found on component, keeping unchanged`);\n\t\t\t\t\treturn attributeName;\n\t\t\t\t} else {\n\t\t\t\t\t// Ignored.\n\t\t\t\t\tthis._debug(`_translateAttribute(): ${attributeName} matched ignore filter, skipping entirely`);\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * To support context, this traverses the DOM to find potential parent elements (also managed by svelte-retag) which\n\t\t * may contain context necessary to render this component.\n\t\t *\n\t\t * See context functions at: https://svelte.dev/docs/svelte#setcontext\n\t\t *\n\t\t * @returns {Map|null}\n\t\t */\n\t\t_getAncestorContext() {\n\t\t\tlet node = this;\n\t\t\twhile(node.parentNode) {\n\t\t\t\tnode = node.parentNode;\n\t\t\t\tlet context = node?.componentInstance?.$$?.context;\n\t\t\t\tif (context instanceof Map) {\n\t\t\t\t\treturn context;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}\n\n\t\t/**\n\t\t * Queue this element for render in the next animation frame. This offers the opportunity to render known available\n\t\t * elements all at once and, ideally, from the top down (to preserve context).\n\t\t */\n\t\t_queueForRender() {\n\t\t\t// No point if already disconnected. Attempting to hit the parent element will trigger an error.\n\t\t\tif (!this.isConnected) {\n\t\t\t\tthis._debug('queueForRender(): skipped, already disconnected');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Skip the queue if a parent is already queued for render, but for the light DOM only. This is because if it's in the\n\t\t\t// light DOM slot, it will be disconnected and reconnected again (which will then also trigger a need to render).\n\t\t\tif (this.parentElement.closest('[data-svelte-retag-render=\"light\"]') !== null) {\n\t\t\t\tthis._debug('queueForRender(): skipped, light DOM parent is queued for render');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// When queuing for render, it's also necessary to identify the DOM rendering type. This is necessary for child\n\t\t\t// components which are *underneath* a parent that is using light DOM rendering (see above). This helps to ensure\n\t\t\t// rendering is performed in the correct order (useful for things like context).\n\t\t\tthis.setAttribute('data-svelte-retag-render', opts.shadow ? 'shadow' : 'light');\n\t\t\trequestAnimationFrame(renderElements);\n\t\t}\n\n\t\t/**\n\t\t * Renders (or rerenders) the Svelte component into this custom element based on the latest properties and slots\n\t\t * (with slots initialized elsewhere).\n\t\t *\n\t\t * IMPORTANT:\n\t\t *\n\t\t * Despite the intuitive name, this method is private since its functionality requires a deeper understanding\n\t\t * of how it depends on current internal state and how it alters internal state. Be sure to study how it's called\n\t\t * before calling it yourself externally. (\"Yarrr! Here be dragons! 🔥🐉\")\n\t\t *\n\t\t * That said... this is currently the workflow:\n\t\t *\n\t\t * 1. Wait for connection to DOM\n\t\t * 2. Ensure slots are properly prepared (e.g. in case of hydration) or observed (in case actively parsing DOM, e.g.\n\t\t * IIFE/UMD or shadow DOM) in case there are any changes *after* this render\n\t\t * 3. _queueForRender(): Kick off to requestAnimationFrame() to queue render of the component (instead of rendering\n\t\t * immediately) to ensure that all currently connected and available components are taken into account (this is\n\t\t * necessary for properly supporting context to prevent from initializing components out of order).\n\t\t * 4. renderElements(): Renders through the DOM tree in document order and from the top down (parent to child),\n\t\t * reaching this element instantiating this component, ensuring context is preserved.\n\t\t *\n\t\t */\n\t\t_renderSvelteComponent() {\n\t\t\tthis._debug('renderSvelteComponent()');\n\n\t\t\t// Fetch the latest set of available slot elements to use in the render. For light DOM, this must be done prior\n\t\t\t// to clearing inner HTML below since the slots exist there.\n\t\t\tif (opts.shadow) {\n\t\t\t\tthis.slotEls = this._getShadowSlots();\n\t\t\t} else {\n\t\t\t\tthis.slotEls = this._getLightSlots();\n\t\t\t}\n\n\t\t\t// On each rerender, we have to reset our root container since Svelte will just append to our target.\n\t\t\tthis._root.innerHTML = '';\n\n\t\t\t// Prep context, which is an important dependency prior to ANY instantiation of the Svelte component.\n\t\t\tconst context = this._getAncestorContext() || new Map();\n\n\t\t\t// Props always passed to Svelte component constructor.\n\t\t\tlet props = {\n\t\t\t\t$$scope: {},\n\n\t\t\t\t// Convert our list of slots into Svelte-specific slot objects\n\t\t\t\t$$slots: createSvelteSlots(this.slotEls),\n\n\t\t\t\t// All other *initial* props are pulled dynamically from element attributes (see proxy below)...\n\t\t\t};\n\n\t\t\t// Conveying props while translating them FROM a case-insensitive form like attributes (which are forced\n\t\t\t// case-insensitive) TO a case-sensitive form (which is required by the component) can be very tricky. This is\n\t\t\t// because we really cannot know the correct case until AFTER the component is instantiated. Therefore, a proxy is\n\t\t\t// a great way to infer the correct case, since by design, all components attempt to access ALL their props when\n\t\t\t// instantiated. Once accessed the first time for a particular tag, we no longer need to proxy since we know for\n\t\t\t// certain that the same tag will be used for any particular component (whose props will not change).\n\t\t\tif (!propMapCache.has(this.tagName)) {\n\t\t\t\t// Initialize mapping of props for this tag for use later. This way, we can avoid proxying on every single\n\t\t\t\t// component render/instantiation but also for attributeChangedCallback().\n\t\t\t\tthis.propMap = new Map();\n\t\t\t\tpropMapCache.set(this.tagName, this.propMap);\n\n\t\t\t\tprops = new Proxy(props, {\n\t\t\t\t\tget: (target, prop) => {\n\t\t\t\t\t\t// Warm cache with prop translations from forced lowercase to their real case.\n\t\t\t\t\t\tlet propName = prop.toString();\n\t\t\t\t\t\tif (prop.indexOf('$$') === -1) {\n\t\t\t\t\t\t\tthis.propMap.set(propName.toLowerCase(), propName);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// While here, see if this attempted access matches an element attribute. Note, this lookup is\n\t\t\t\t\t\t// already case-insensitive, see: https://dom.spec.whatwg.org/#namednodemap\n\t\t\t\t\t\tlet attribValue = this.attributes.getNamedItem(propName);\n\t\t\t\t\t\tif (attribValue !== null) {\n\t\t\t\t\t\t\t// Before returning, ensure the prop is at least initialized on the target. This ensures that Vite HMR\n\t\t\t\t\t\t\t// will be aware that the prop exists when creating the proxied component (since it enumerates all props).\n\t\t\t\t\t\t\t// This prevents it from resetting back to the props default state during HMR reloads (the same as how it\n\t\t\t\t\t\t\t// works if the component were to have been defined inside of another Svelte component instead of as a\n\t\t\t\t\t\t\t// custom element here).\n\t\t\t\t\t\t\treturn target[propName] = attribValue.value;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// IMPORTANT: Unlike above, we SHOULD NOT be initializing target[propName] here, even though it could offer benefits\n\t\t\t\t\t\t\t// (like allowing the latest *evolved* prop value to be persisted after HMR updates). The reason is that\n\t\t\t\t\t\t\t// Svelte itself will *also* reset the prop to its default value after HMR updates *unless* the parent Svelte\n\t\t\t\t\t\t\t// component explicitly sets the prop. If we set it here, we would diverge from how Svelte handles undefined\n\t\t\t\t\t\t\t// props during HMR reloads.\n\n\t\t\t\t\t\t\t// Fail over to what would have otherwise been returned.\n\t\t\t\t\t\t\treturn target[prop];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t});\n\n\t\t\t} else {\n\t\t\t\t// Skip the proxying of props and just recycle the cached mapping to populate custom element attributes into the\n\t\t\t\t// props object with the correct case.\n\t\t\t\tthis.propMap = propMapCache.get(this.tagName);\n\t\t\t\tfor(let attr of [...this.attributes]) {\n\t\t\t\t\t// Note: Skip svelte-retag specific attributes (used for hydration purposes). This is not included in the ignored\n\t\t\t\t\t// attributes filter since it's a special case and cannot be overridden.\n\t\t\t\t\tif (attr.name.startsWith('data-svelte-retag')) continue;\n\t\t\t\t\tconst translatedName = this._translateAttribute(attr.name);\n\t\t\t\t\tif (translatedName !== null) {\n\t\t\t\t\t\tprops[translatedName] = attr.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Instantiate component into our root now, which is either the \"light DOM\" (i.e. directly under this element) or\n\t\t\t// in the shadow DOM.\n\t\t\tthis.componentInstance = new opts.component({ target: this._root, props: props, context });\n\n\t\t\t// Setup mutation observer to watch for changes to attributes on this element (if not already done) now that we\n\t\t\t// know the full set of component props. Only do this if configured and if the observer hasn't already been setup\n\t\t\t// (since we can render an element multiple times).\n\t\t\tif (opts.attributes === true && !this.attributesObserved) {\n\t\t\t\tthis.attributesObserved = true;\n\t\t\t\tif (this.propMap.size > 0) {\n\t\t\t\t\tattributeObserver.observe(this, {\n\t\t\t\t\t\tattributes: true, // implicit, but... 🤷‍♂️\n\t\t\t\t\t\tattributeFilter: [...this.propMap.keys()],\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t// No props to observe, so no point in setting up the observer.\n\t\t\t\t\tthis._debug('renderSvelteComponent(): skipped attribute observer, no props');\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tthis._debug('renderSvelteComponent(): completed');\n\t\t}\n\n\t\t/**\n\t\t * Fetches slots from pre-rendered Svelte component HTML using special markers (either data attributes or custom\n\t\t * wrappers). Note that this will only work during initialization and only if the Svelte retag instance is\n\t\t * hydratable.\n\t\t */\n\t\t_hydrateLightSlots() {\n\t\t\t// Get the named slots inside the already rendered component by looking for our special data attribute.\n\t\t\tlet existingNamedSlots = this._root.querySelectorAll('[data-svelte-retag-slot]');\n\t\t\tfor(let slot of existingNamedSlots) {\n\t\t\t\t// Ensure we stick only to slots that belong to this element (avoid deeply nested components).\n\t\t\t\tlet slotParent = findSlotParent(slot);\n\t\t\t\tif (slotParent !== this._root) continue;\n\n\t\t\t\tlet slotName = slot.getAttribute('slot');\n\t\t\t\tthis.slotEls[slotName] = slot;\n\t\t\t}\n\n\t\t\t// If default slot content was used, it should still be wrapped in a special ,\n\t\t\t// which preserves all child nodes (including text nodes).\n\t\t\tlet existingDefaultSlot = this.querySelector('svelte-retag-default');\n\t\t\tif (existingDefaultSlot !== null) {\n\t\t\t\tthis.slotEls['default'] = existingDefaultSlot;\n\t\t\t}\n\n\t\t\t// Put all slots back to their original positions (including unwrapping default slot content) to\n\t\t\t// prepare for initial component render.\n\t\t\tthis._restoreLightSlots();\n\n\t\t\treturn true;\n\t\t}\n\n\t\t/**\n\t\t * Indicates if the provided element instance belongs to this custom element or not.\n\t\t *\n\t\t * @param {Element} slot\n\t\t * @returns {boolean}\n\t\t */\n\t\t_isOwnSlot(slot) {\n\t\t\tlet slotParent = findSlotParent(slot);\n\t\t\tif (slotParent === null) return false;\n\t\t\treturn (slotParent === this);\n\t\t}\n\n\t\t/**\n\t\t * Returns a map of slot names and the corresponding HTMLElement (named slots) or DocumentFragment (default slots).\n\t\t *\n\t\t * IMPORTANT: Since this custom element is the \"root\", these slots must be removed (which is done in THIS method).\n\t\t *\n\t\t * TODO: Problematic name. We are \"getting\" but we're also mangling/mutating state (which *is* necessary). \"Get\" may be confusing here; is there a better name?\n\t\t *\n\t\t * @returns {SlotList}\n\t\t */\n\t\t_getLightSlots() {\n\t\t\tthis._debug('_getLightSlots()');\n\t\t\tlet slots = {};\n\n\n\t\t\t/***************\n\t\t\t * NAMED SLOTS *\n\t\t\t ***************/\n\n\t\t\t// Look for named slots below this element. IMPORTANT: This may return slots nested deeper (see check in forEach below).\n\t\t\tconst queryNamedSlots = this.querySelectorAll('[slot]');\n\t\t\tfor(let candidate of queryNamedSlots) {\n\t\t\t\t// Skip this slot if it doesn't happen to belong to THIS custom element.\n\t\t\t\tif (!this._isOwnSlot(candidate)) continue;\n\n\t\t\t\tslots[candidate.slot] = candidate;\n\n\t\t\t\t// If this is a hydratable component, flag this slot so we can find it later once it has been relocated\n\t\t\t\t// under the fully rendered Svelte component (in the light DOM).\n\t\t\t\tif (opts.hydratable) {\n\t\t\t\t\tcandidate.setAttribute('data-svelte-retag-slot', '');\n\t\t\t\t}\n\n\t\t\t\t// TODO: Potentially problematic in edge cases where the browser may *oddly* return slots from query selector\n\t\t\t\t// above, yet their not actually a child of the current element. This seems to only happen if another\n\t\t\t\t// constructor() + connectedCallback() are BOTH called for this particular element again BEFORE a\n\t\t\t\t// disconnectedCallback() gets called (out of sync). Only experienced in Chrome when manually editing the HTML\n\t\t\t\t// when there were multiple other custom elements present inside the slot of another element (very edge case?)\n\t\t\t\tthis.removeChild(candidate);\n\t\t\t}\n\n\n\t\t\t/**************************\n\t\t\t * DEFAULT SLOT (UNNAMED) *\n\t\t\t **************************/\n\n\t\t\t// \"Unwrap\" the remainder of this tag by iterating through child nodes and placing them into a fragment which\n\t\t\t// we can use as our default slot. Importantly, we need to ensure we skip our special wrapper.\n\t\t\t// Here we use a special custom element that allows us to target it later in case we\n\t\t\t// need to hydrate it (e.g. tag was rendered via SSG/SSR and disconnectedCallback() was not run).\n\t\t\tlet fragment = document.createDocumentFragment();\n\n\t\t\t// For hydratable components, we have to nest these nodes under a tag that we can still recognize once\n\t\t\t// they're shifted inside of the fully rendered Svelte component, which could be anywhere.\n\t\t\tif (opts.hydratable) {\n\t\t\t\tfragment = document.createElement('svelte-retag-default');\n\t\t\t}\n\n\t\t\t// Important: The conversion of these children to an array is necessary since we are actually modifying the list by calling .appendChild().\n\t\t\tlet childNodes = [...this.childNodes];\n\t\t\tlet childHTML = '';\n\t\t\tfor(let childNode of childNodes) {\n\t\t\t\tif (childNode instanceof HTMLElement && childNode.tagName === 'SVELTE-RETAG') {\n\t\t\t\t\tthis._debug('_getLightSlots(): skipping container');\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Unfortunately, we must manually build HTML because DocumentFragment can be problematic with this:\n\t\t\t\t// 1. Deep clone is required in order to put it into another HTMLElement, might be slow\n\t\t\t\t// 2. Deep clone doesn't work in unit tests\n\t\t\t\tif (childNode instanceof Text) {\n\t\t\t\t\tchildHTML += childNode.textContent;\n\t\t\t\t} else if (childNode.outerHTML) {\n\t\t\t\t\tchildHTML += childNode.outerHTML;\n\t\t\t\t}\n\n\t\t\t\tfragment.appendChild(childNode);\n\t\t\t}\n\n\t\t\t// Now that we've rebuilt the default slot content, it could actually be empty (or just whitespace). So, we\n\t\t\t// have to check the HTML in the fragment to see if it has anything in it before trying to use it.\n\t\t\tif (childHTML.trim() !== '') {\n\t\t\t\t// Now that we've detected remaining content, we've got to make suer we don't already have an explicitly\n\t\t\t\t// named \"default\" slot. If one does exist, then we have a conflict.\n\t\t\t\tif (slots.default) {\n\t\t\t\t\t// Edge case: User has a named \"default\" as well as remaining HTML left over. Use same error as Svelte.\n\t\t\t\t\tconsole.error(`svelteRetag: '${this.tagName}': Found elements without slot attribute when using slot=\"default\"`);\n\t\t\t\t} else {\n\t\t\t\t\tslots.default = fragment;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn slots;\n\t\t}\n\n\t\t/**\n\t\t * Go through originally removed slots and restore back to the custom element.\n\t\t */\n\t\t_restoreLightSlots() {\n\t\t\tthis._debug('_restoreLightSlots:', this.slotEls);\n\n\t\t\tfor(let slotName in this.slotEls) {\n\t\t\t\tlet slotEl = this.slotEls[slotName];\n\n\t\t\t\t// Prepend back so that in case more default slot content has arrived, we can rebuild it in order. This is\n\t\t\t\t// important if we're executing during document.readyState === 'loading' (i.e. IIFE and not module).\n\t\t\t\tif (slotEl.tagName === 'SVELTE-RETAG-DEFAULT') {\n\t\t\t\t\tthis.prepend(unwrap(slotEl));\n\t\t\t\t} else {\n\t\t\t\t\tthis.prepend(slotEl);\n\n\t\t\t\t\t// If hydration was enabled for this particular element (not necessarily for the current context),\n\t\t\t\t\t// we should clean up hydration-specific attributes for consistency.\n\t\t\t\t\tif (slotEl instanceof HTMLElement && slotEl.hasAttribute('data-svelte-retag-slot')) {\n\t\t\t\t\t\tslotEl.removeAttribute('data-svelte-retag-slot');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Since the slots are back in the original element, we should clean up our reference to them. This is because,\n\t\t\t// symbolically and semantically at least, we think of this variable as a holding area ONCE they've been removed.\n\t\t\tthis.slotEls = {};\n\t\t}\n\n\t\t/**\n\t\t * Fetches and returns references to the existing shadow DOM slots. Left unmodified.\n\t\t *\n\t\t * @returns {SlotList}\n\t\t */\n\t\t_getShadowSlots() {\n\t\t\tthis._debug('_getShadowSlots()');\n\t\t\tconst namedSlots = this.querySelectorAll('[slot]');\n\t\t\tlet slots = {};\n\t\t\tlet htmlLength = this.innerHTML.length;\n\t\t\tnamedSlots.forEach(n => {\n\t\t\t\tslots[n.slot] = document.createElement('slot');\n\t\t\t\tslots[n.slot].setAttribute('name', n.slot);\n\t\t\t\thtmlLength -= n.outerHTML.length;\n\t\t\t});\n\t\t\tif (htmlLength > 0) {\n\t\t\t\tslots.default = document.createElement('slot');\n\t\t\t}\n\t\t\treturn slots;\n\t\t}\n\n\t\t/**\n\t\t * Toggle on/off the MutationObserver used to watch for changes in child slots.\n\t\t */\n\t\t_observeSlots(begin) {\n\t\t\t// While MutationObserver de-duplicates requests for us, this helps us with reducing noise while debugging.\n\t\t\tif (begin === this.slotObserverActive) return;\n\n\t\t\t// Setup our slot observer if not done already.\n\t\t\tif (!this.slotObserver) {\n\t\t\t\tthis.slotObserver = new MutationObserver((mutations) => {\n\t\t\t\t\tthis._processSlotMutations(mutations);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (begin) {\n\t\t\t\t// Subtree: Typically, slots (both default and named) are only ever added directly below. So, keeping\n\t\t\t\t// subtree false for now since this could be important for light DOM.\n\t\t\t\tthis.slotObserver.observe(this, { childList: true, subtree: false, attributes: false });\n\t\t\t\tthis._debug('_observeSlots: OBSERVE');\n\t\t\t} else {\n\t\t\t\tthis.slotObserver.disconnect();\n\t\t\t\tthis._debug('_observeSlots: DISCONNECT');\n\t\t\t}\n\n\t\t\tthis.slotObserverActive = begin;\n\t\t}\n\n\t\t/**\n\t\t * Watches for slot changes, specifically:\n\t\t *\n\t\t * 1. Shadow DOM: All slot changes will queue a rerender of the Svelte component\n\t\t *\n\t\t * 2. Light DOM: Only additions will be accounted for. This is particularly because currently we only support\n\t\t * watching for changes during document parsing (i.e. document.readyState === 'loading', prior to the\n\t\t * 'DOMContentLoaded' event.\n\t\t *\n\t\t * @param {MutationRecord[]} mutations\n\t\t */\n\t\t_processSlotMutations(mutations) {\n\t\t\tthis._debug('_processSlotMutations()', mutations);\n\n\t\t\t// Rerender if one of the mutations is of a child element.\n\t\t\tlet rerender = false;\n\t\t\tfor(let mutation of mutations) {\n\t\t\t\tif (mutation.type === 'childList') {\n\t\t\t\t\t// For shadow DOM, it's alright if it's a removal.\n\t\t\t\t\tif (opts.shadow) {\n\t\t\t\t\t\trerender = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// For light DOM, it only matters to rerender on newly added nodes. This is because we're only watching for\n\t\t\t\t\t\t// mutations during initial document parsing. Node removals can happen during the retrieval of light slots in\n\t\t\t\t\t\t// _getLightSlots(). These are necessary, but may cascade into an infinite loop if we're not very careful here.\n\t\t\t\t\t\tif (mutation.addedNodes.length > 0) {\n\t\t\t\t\t\t\trerender = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (rerender) {\n\t\t\t\tif (!opts.shadow) {\n\t\t\t\t\t// For light DOM, ensure original slots are available by prepending them back to the DOM so we can fetch the\n\t\t\t\t\t// latest content. This is important in case the newly visible nodes are part of default content (not just\n\t\t\t\t\t// named slots)\n\t\t\t\t\tthis._observeSlots(false);\n\t\t\t\t\tthis._restoreLightSlots();\n\t\t\t\t\tthis._observeSlots(true);\n\t\t\t\t}\n\n\t\t\t\t// Force a rerender now.\n\t\t\t\tthis._debug('_processMutations(): Queue rerender');\n\t\t\t\tthis._queueForRender();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Pass through to console.log() but includes a reference to the custom element in the log for easier targeting for\n\t\t * debugging purposes.\n\t\t *\n\t\t * @param {...*}\n\t\t */\n\t\t_debug() {\n\t\t\tif (opts.debugMode) {\n\t\t\t\tif (opts.debugMode === 'cli') {\n\t\t\t\t\tconsole.log.apply(null, [performance.now(), this.tagName, ...arguments]);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.log.apply(null, [performance.now(), this, ...arguments]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n","import \"../Styles/index.scss\";\n\nlet navOverlay = document.querySelector(\".nav-overlay\");\nif (navOverlay != null) {\n\tfor (let element of document.querySelectorAll(\".nav-toggle\")) {\n\t\telement.addEventListener(\"click\", e => {\n\t\t\tnavOverlay.classList.toggle(\"is-active\");\n\t\t});\n\t}\n}\n\nimport { initializeMaps } from \"@wagich/bluc-map\";\ninitializeMaps();\n\nimport retag from \"svelte-retag\";\nif (document.querySelector(\"reiki-signup\") != null) {\n\timport(\"./reiki-signup.svelte\").then(m => {\n\t\tretag({\n\t\t\tcomponent: m.default,\n\t\t\ttagname: \"reiki-signup\",\n\t\t});\n\t})\n}\n"],"file":"assets/main-WTACHzKG.js"}